Page MenuHomec4science

No OneTemporary

File Metadata

Created
Fri, Jun 27, 06:03
This file is larger than 256 KB, so syntax highlighting was skipped.
diff --git a/doc/Manual.html b/doc/Manual.html
index 8eb915500..6e57e6ad5 100644
--- a/doc/Manual.html
+++ b/doc/Manual.html
@@ -1,456 +1,493 @@
+<HTML>
+<!-- HTML_ONLY -->
+<HEAD>
+<TITLE>LAMMPS-ICMS Users Manual</TITLE>
+<META NAME="docnumber" CONTENT="19 Aug 2015 version">
+<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
+<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
+</HEAD>
+<BODY>
-<!DOCTYPE html>
-<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
-<head>
- <meta charset="utf-8">
-
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- <title>LAMMPS Documentation &mdash; LAMMPS-ICMS 10 Aug 2015 version documentation</title>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
-
-
-
- <link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
-
-
-
- <link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
- <link rel="next" title="1. Introduction" href="Section_intro.html"/>
-
-
- <script src="_static/js/modernizr.min.js"></script>
-
-</head>
-
-<body class="wy-body-for-nav" role="document">
-
- <div class="wy-grid-for-nav">
-
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
- <div class="wy-side-nav-search">
-
-
-
- <a href="#" class="icon icon-home"> LAMMPS
-
-
-
- </a>
-
-
-<div role="search">
- <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
-</div>
-
-
- </div>
-
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
-
-
-
- <ul>
-<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
-</ul>
-
-
-
- </div>
- &nbsp;
- </nav>
-
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
-
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
- <a href="#">LAMMPS</a>
- </nav>
-
-
-
- <div class="wy-nav-content">
- <div class="rst-content">
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
- <li><a href="#">Docs</a> &raquo;</li>
-
- <li>LAMMPS Documentation</li>
- <li class="wy-breadcrumbs-aside">
-
-
- <a href="http://lammps.sandia.gov">Website</a>
- <a href="Section_commands.html#comm">Commands</a>
-
- </li>
- </ul>
- <hr/>
-
- <div class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
-
- <a href="Section_intro.html" class="btn btn-neutral float-right" title="1. Introduction" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
-
-
- </div>
-
-</div>
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
- <div itemprop="articleBody">
-
- <H1></H1><div class="section" id="lammps-documentation">
-<h1>LAMMPS Documentation<a class="headerlink" href="#lammps-documentation" title="Permalink to this headline">¶</a></h1>
-<div class="section" id="aug-2015-version">
-<h2>10 Aug 2015 version<a class="headerlink" href="#aug-2015-version" title="Permalink to this headline">¶</a></h2>
-</div>
-<div class="section" id="version-info">
-<h2>Version info:<a class="headerlink" href="#version-info" title="Permalink to this headline">¶</a></h2>
-<p>The LAMMPS &#8220;version&#8221; is the date when it was released, such as 1 May
+<!-- END_HTML_ONLY -->
+
+<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
+</CENTER>
+
+
+
+
+
+
+<HR>
+
+<H1></H1>
+
+<CENTER><H3>LAMMPS-ICMS Documentation
+</H3></CENTER>
+<CENTER><H4>19 Aug 2015 version
+</H4></CENTER>
+<H4>Version info:
+</H4>
+<P>The LAMMPS-ICMS "version" is the date when it was released, such as 1 May
2010. LAMMPS is updated continuously. Whenever we fix a bug or add a
-feature, we release it immediately, and post a notice on <a class="reference external" href="http://lammps.sandia.gov/bug.html">this page of the WWW site</a>. Each dated copy of LAMMPS contains all the
+feature, we release it immediately, and post a notice on <A HREF = "http://lammps.sandia.gov/bug.html">this page of
+the WWW site</A>. Each dated copy of LAMMPS contains all the
features and bug-fixes up to and including that version date. The
version date is printed to the screen and logfile every time you run
LAMMPS. It is also in the file src/version.h and in the LAMMPS
directory name created when you unpack a tarball, and at the top of
-the first page of the manual (this page).</p>
+the first page of the manual (this page).
+</P>
-<p>LAMMPS-ICMS is an experimental variant of LAMMPS with additional
+<P>LAMMPS-ICMS is an experimental variant of LAMMPS with additional
features made available for testing before they will be submitted
for inclusion into the official LAMMPS tree. The source code is
based on the official LAMMPS svn repository mirror at the Institute
for Computational Molecular Science at Temple University and generally
kept up-to-date as much as possible. Sometimes, e.g. when additional
development work is needed to adapt the upstream changes into
LAMMPS-ICMS it can take longer until synchronization; and occasionally,
e.g. in case of the rewrite of the multi-threading support, the
development will be halted except for important bugfixes until
all features of LAMMPS-ICMS fully compatible with the upstream
version or replaced by alternate implementations.
-</p>
-<ul class="simple">
-<li>If you browse the HTML doc pages on the LAMMPS WWW site, they always
-describe the most current version of LAMMPS.</li>
-<li>If you browse the HTML doc pages included in your tarball, they
-describe the version you have.</li>
-<li>The <a class="reference external" href="Manual.pdf">PDF file</a> on the WWW site or in the tarball is updated
-about once per month. This is because it is large, and we don&#8217;t want
-it to be part of every patch.</li>
-<li>There is also a <a class="reference external" href="Developer.pdf">Developer.pdf</a> file in the doc
+</P>
+
+<UL><LI>If you browse the HTML doc pages on the LAMMPS WWW site, they always
+describe the most current version of LAMMPS.
+
+<LI>If you browse the HTML doc pages included in your tarball, they
+describe the version you have.
+
+<LI>The <A HREF = "Manual.pdf">PDF file</A> on the WWW site or in the tarball is updated
+about once per month. This is because it is large, and we don't want
+it to be part of every patch.
+
+<LI>There is also a <A HREF = "Developer.pdf">Developer.pdf</A> file in the doc
directory, which describes the internal structure and algorithms of
-LAMMPS.</li>
-</ul>
-<p>LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
-Simulator.</p>
-<p>LAMMPS is a classical molecular dynamics simulation code designed to
+LAMMPS.
+</UL>
+<P>LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
+Simulator.
+</P>
+<P>LAMMPS is a classical molecular dynamics simulation code designed to
run efficiently on parallel computers. It was developed at Sandia
National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely
-under the terms of the GNU Public License (GPL).</p>
-<p>The primary developers of LAMMPS are <a class="reference external" href="http://www.sandia.gov/~sjplimp">Steve Plimpton</a>, Aidan
+under the terms of the GNU Public License (GPL).
+</P>
+<P>The primary developers of LAMMPS are <A HREF = "http://www.sandia.gov/~sjplimp">Steve Plimpton</A>, Aidan
Thompson, and Paul Crozier who can be contacted at
-sjplimp,athomps,pscrozi at sandia.gov. The <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a> at
-<a class="reference external" href="http://lammps.sandia.gov">http://lammps.sandia.gov</a> has more information about the code and its
-uses.</p>
-<hr class="docutils" />
-<p>The LAMMPS documentation is organized into the following sections. If
+sjplimp,athomps,pscrozi at sandia.gov. The <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> at
+http://lammps.sandia.gov has more information about the code and its
+uses.
+</P>
+
+
+
+
+<HR>
+
+<P>The LAMMPS documentation is organized into the following sections. If
you find errors or omissions in this manual or have suggestions for
useful information to add, please send an email to the developers so
-we can improve the LAMMPS documentation.</p>
-<p>Once you are familiar with LAMMPS, you may want to bookmark <a class="reference internal" href="Section_commands.html#comm"><span>this page</span></a> at Section_commands.html#comm since
-it gives quick access to documentation for all LAMMPS commands.</p>
-<p><a class="reference external" href="Manual.pdf">PDF file</a> of the entire manual, generated by
-<a class="reference external" href="http://freecode.com/projects/htmldoc">htmldoc</a></p>
-<div class="toctree-wrapper compound">
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_intro.html#what-is-lammps">1.1. What is LAMMPS</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_intro.html#lammps-features">1.2. LAMMPS features</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_intro.html#lammps-non-features">1.3. LAMMPS non-features</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_intro.html#open-source-distribution">1.4. Open source distribution</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_intro.html#acknowledgments-and-citations">1.5. Acknowledgments and citations</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#what-s-in-the-lammps-distribution">2.1. What&#8217;s in the LAMMPS distribution</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#making-lammps">2.2. Making LAMMPS</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#making-lammps-with-optional-packages">2.3. Making LAMMPS with optional packages</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#building-lammps-via-the-make-py-script">2.4. Building LAMMPS via the Make.py script</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#building-lammps-as-a-library">2.5. Building LAMMPS as a library</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#running-lammps">2.6. Running LAMMPS</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#command-line-options">2.7. Command-line options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#lammps-screen-output">2.8. LAMMPS screen output</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_start.html#tips-for-users-of-previous-lammps-versions">2.9. Tips for users of previous LAMMPS versions</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#lammps-input-script">3.1. LAMMPS input script</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#parsing-rules">3.2. Parsing rules</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#input-script-structure">3.3. Input script structure</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#commands-listed-by-category">3.4. Commands listed by category</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#individual-commands">3.5. Individual commands</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#fix-styles">3.6. Fix styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#compute-styles">3.7. Compute styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#pair-style-potentials">3.8. Pair_style potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#bond-style-potentials">3.9. Bond_style potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#angle-style-potentials">3.10. Angle_style potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#dihedral-style-potentials">3.11. Dihedral_style potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#improper-style-potentials">3.12. Improper_style potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_commands.html#kspace-solvers">3.13. Kspace solvers</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#standard-packages">4.1. Standard packages</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-packages">4.2. User packages</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-atc-package">4.3. USER-ATC package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-awpmd-package">4.4. USER-AWPMD package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-cg-cmm-package">4.5. USER-CG-CMM package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-colvars-package">4.6. USER-COLVARS package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-cuda-package">4.7. USER-CUDA package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-diffraction-package">4.8. USER-DIFFRACTION package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-drude-package">4.9. USER-DRUDE package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-eff-package">4.10. USER-EFF package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-fep-package">4.11. USER-FEP package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-intel-package">4.12. USER-INTEL package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-lb-package">4.13. USER-LB package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-misc-package">4.14. USER-MISC package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-molfile-package">4.15. USER-MOLFILE package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-omp-package">4.16. USER-OMP package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-phonon-package">4.17. USER-PHONON package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-qmmm-package">4.18. USER-QMMM package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-qtb-package">4.19. USER-QTB package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-reaxc-package">4.20. USER-REAXC package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-smd-package">4.21. USER-SMD package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_packages.html#user-sph-package">4.22. USER-SPH package</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#measuring-performance">5.1. Measuring performance</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#general-strategies">5.2. General strategies</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#packages-with-optimized-styles">5.3. Packages with optimized styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_accelerate.html#comparison-of-various-accelerator-packages">5.4. Comparison of various accelerator packages</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#restarting-a-simulation">6.1. Restarting a simulation</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#d-simulations">6.2. 2d simulations</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#charmm-amber-and-dreiding-force-fields">6.3. CHARMM, AMBER, and DREIDING force fields</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#running-multiple-simulations-from-one-input-script">6.4. Running multiple simulations from one input script</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#multi-replica-simulations">6.5. Multi-replica simulations</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#granular-models">6.6. Granular models</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#tip3p-water-model">6.7. TIP3P water model</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#tip4p-water-model">6.8. TIP4P water model</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#spc-water-model">6.9. SPC water model</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#coupling-lammps-to-other-codes">6.10. Coupling LAMMPS to other codes</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#visualizing-lammps-snapshots">6.11. Visualizing LAMMPS snapshots</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#triclinic-non-orthogonal-simulation-boxes">6.12. Triclinic (non-orthogonal) simulation boxes</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#nemd-simulations">6.13. NEMD simulations</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#finite-size-spherical-and-aspherical-particles">6.14. Finite-size spherical and aspherical particles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#output-from-lammps-thermo-dumps-computes-fixes-variables">6.15. Output from LAMMPS (thermo, dumps, computes, fixes, variables)</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#thermostatting-barostatting-and-computing-temperature">6.16. Thermostatting, barostatting, and computing temperature</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#walls">6.17. Walls</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#elastic-constants">6.18. Elastic constants</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#library-interface-to-lammps">6.19. Library interface to LAMMPS</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#calculating-thermal-conductivity">6.20. Calculating thermal conductivity</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#calculating-viscosity">6.21. Calculating viscosity</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#calculating-a-diffusion-coefficient">6.22. Calculating a diffusion coefficient</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#using-chunks-to-calculate-system-properties">6.23. Using chunks to calculate system properties</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#setting-parameters-for-the-kspace-style-pppm-disp-command">6.24. Setting parameters for the <code class="docutils literal"><span class="pre">kspace_style</span> <span class="pre">pppm/disp</span></code> command</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#polarizable-models">6.25. Polarizable models</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#adiabatic-core-shell-model">6.26. Adiabatic core/shell model</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_howto.html#drude-induced-dipoles">6.27. Drude induced dipoles</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
-<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#amber2lmp-tool">9.1. amber2lmp tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#binary2txt-tool">9.2. binary2txt tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#ch2lmp-tool">9.3. ch2lmp tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#chain-tool">9.4. chain tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#colvars-tools">9.5. colvars tools</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#createatoms-tool">9.6. createatoms tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#data2xmovie-tool">9.7. data2xmovie tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#eam-database-tool">9.8. eam database tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#eam-generate-tool">9.9. eam generate tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#eff-tool">9.10. eff tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#emacs-tool">9.11. emacs tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#fep-tool">9.12. fep tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#i-pi-tool">9.13. i-pi tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#ipp-tool">9.14. ipp tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#kate-tool">9.15. kate tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#lmp2arc-tool">9.16. lmp2arc tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#lmp2cfg-tool">9.17. lmp2cfg tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#lmp2vmd-tool">9.18. lmp2vmd tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#matlab-tool">9.19. matlab tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#micelle2d-tool">9.20. micelle2d tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#moltemplate-tool">9.21. moltemplate tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#msi2lmp-tool">9.22. msi2lmp tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#phonon-tool">9.23. phonon tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#polymer-bonding-tool">9.24. polymer bonding tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#pymol-asphere-tool">9.25. pymol_asphere tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#python-tool">9.26. python tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#reax-tool">9.27. reax tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#restart2data-tool">9.28. restart2data tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#vim-tool">9.29. vim tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#xmgrace-tool">9.30. xmgrace tool</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_tools.html#xmovie-tool">9.31. xmovie tool</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#atom-styles">10.1. Atom styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#bond-angle-dihedral-improper-potentials">10.2. Bond, angle, dihedral, improper potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#compute-styles">10.3. Compute styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#dump-styles">10.4. Dump styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#dump-custom-output-options">10.5. Dump custom output options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#fix-styles">10.6. Fix styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#input-script-commands">10.7. Input script commands</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#kspace-computations">10.8. Kspace computations</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#minimization-styles">10.9. Minimization styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#pairwise-potentials">10.10. Pairwise potentials</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#region-styles">10.11. Region styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#body-styles">10.12. Body styles</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#thermodynamic-output-options">10.13. Thermodynamic output options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#variable-options">10.14. Variable options</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_modify.html#submitting-new-features-for-inclusion-in-lammps">10.15. Submitting new features for inclusion in LAMMPS</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#overview-of-running-lammps-from-python">11.1. Overview of running LAMMPS from Python</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#overview-of-using-python-from-a-lammps-script">11.2. Overview of using Python from a LAMMPS script</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#building-lammps-as-a-shared-library">11.3. Building LAMMPS as a shared library</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#installing-the-python-wrapper-into-python">11.4. Installing the Python wrapper into Python</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#extending-python-with-mpi-to-run-in-parallel">11.5. Extending Python with MPI to run in parallel</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#testing-the-python-lammps-interface">11.6. Testing the Python-LAMMPS interface</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#using-lammps-from-python">11.7. Using LAMMPS from Python</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_python.html#example-python-scripts-that-use-lammps">11.8. Example Python scripts that use LAMMPS</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_errors.html#common-problems">12.1. Common problems</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_errors.html#reporting-bugs">12.2. Reporting bugs</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_errors.html#error-warning-messages">12.3. Error &amp; warning messages</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_errors.html#error">12.4. Errors:</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_errors.html#warnings">12.5. Warnings:</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Section_history.html#coming-attractions">13.1. Coming attractions</a></li>
-<li class="toctree-l2"><a class="reference internal" href="Section_history.html#past-versions">13.2. Past versions</a></li>
-</ul>
-</li>
-</ul>
-</div>
-</div>
-</div>
-<div class="section" id="indices-and-tables">
-<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
-<ul class="simple">
-<li><a class="reference internal" href="genindex.html"><span>Index</span></a></li>
-<li><a class="reference internal" href="search.html"><span>Search Page</span></a></li>
-</ul>
-</BODY></div>
-
-
- </div>
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
- <a href="Section_intro.html" class="btn btn-neutral float-right" title="1. Introduction" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
-
-
- </div>
-
-
- <hr/>
-
- <div role="contentinfo">
- <p>
- &copy; Copyright .
- </p>
- </div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
-
-</footer>
-
- </div>
- </div>
-
- </section>
-
- </div>
-
-
-
-
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT:'./',
- VERSION:'15 May 2015 version',
- COLLAPSE_INDEX:false,
- FILE_SUFFIX:'.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
- <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
- <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
-
-
-
-
-
- <script type="text/javascript" src="_static/js/theme.js"></script>
-
-
-
-
- <script type="text/javascript">
- jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
- });
- </script>
-
-
-</body>
-</html>
\ No newline at end of file
+we can improve the LAMMPS documentation.
+</P>
+<P>Once you are familiar with LAMMPS, you may want to bookmark <A HREF = "Section_commands.html#comm">this
+page</A> at Section_commands.html#comm since
+it gives quick access to documentation for all LAMMPS commands.
+</P>
+<P><A HREF = "Manual.pdf">PDF file</A> of the entire manual, generated by
+<A HREF = "http://freecode.com/projects/htmldoc">htmldoc</A>
+</P>
+<P><!-- RST
+</P>
+<P>.. toctree::
+ :maxdepth: 2
+ :numbered: // comment
+</P>
+<P> Section_intro
+ Section_start
+ Section_commands
+ Section_packages
+ Section_accelerate
+ Section_howto
+ Section_example
+ Section_perf
+ Section_tools
+ Section_modify
+ Section_python
+ Section_errors
+ Section_history
+</P>
+<P>Indices and tables
+==================
+</P>
+<P>* :ref:`genindex` // comment
+* :ref:`search` // comment
+</P>
+<P>END_RST -->
+</P>
+<OL><LI><!-- HTML_ONLY -->
+<A HREF = "Section_intro.html">Introduction</A>
+
+<UL> 1.1 <A HREF = "Section_intro.html#intro_1">What is LAMMPS</A>
+<BR>
+ 1.2 <A HREF = "Section_intro.html#intro_2">LAMMPS features</A>
+<BR>
+ 1.3 <A HREF = "Section_intro.html#intro_3">LAMMPS non-features</A>
+<BR>
+ 1.4 <A HREF = "Section_intro.html#intro_4">Open source distribution</A>
+<BR>
+ 1.5 <A HREF = "Section_intro.html#intro_5">Acknowledgments and citations</A>
+<BR></UL>
+<LI><A HREF = "Section_start.html">Getting started</A>
+
+<UL> 2.1 <A HREF = "Section_start.html#start_1">What's in the LAMMPS distribution</A>
+<BR>
+ 2.2 <A HREF = "Section_start.html#start_2">Making LAMMPS</A>
+<BR>
+ 2.3 <A HREF = "Section_start.html#start_3">Making LAMMPS with optional packages</A>
+<BR>
+ 2.4 <A HREF = "Section_start.html#start_4">Building LAMMPS via the Make.py script</A>
+<BR>
+ 2.5 <A HREF = "Section_start.html#start_5">Building LAMMPS as a library</A>
+<BR>
+ 2.6 <A HREF = "Section_start.html#start_6">Running LAMMPS</A>
+<BR>
+ 2.7 <A HREF = "Section_start.html#start_7">Command-line options</A>
+<BR>
+ 2.8 <A HREF = "Section_start.html#start_8">Screen output</A>
+<BR>
+ 2.9 <A HREF = "Section_start.html#start_9">Tips for users of previous versions</A>
+<BR></UL>
+<LI><A HREF = "Section_commands.html">Commands</A>
+
+<UL> 3.1 <A HREF = "Section_commands.html#cmd_1">LAMMPS input script</A>
+<BR>
+ 3.2 <A HREF = "Section_commands.html#cmd_2">Parsing rules</A>
+<BR>
+ 3.3 <A HREF = "Section_commands.html#cmd_3">Input script structure</A>
+<BR>
+ 3.4 <A HREF = "Section_commands.html#cmd_4">Commands listed by category</A>
+<BR>
+ 3.5 <A HREF = "Section_commands.html#cmd_5">Commands listed alphabetically</A>
+<BR></UL>
+<LI><A HREF = "Section_packages.html">Packages</A>
+
+<UL> 4.1 <A HREF = "Section_packages.html#pkg_1">Standard packages</A>
+<BR>
+ 4.2 <A HREF = "Section_packages.html#pkg_2">User packages</A>
+<BR></UL>
+<LI><A HREF = "Section_accelerate.html">Accelerating LAMMPS performance</A>
+
+<UL> 5.1 <A HREF = "Section_accelerate.html#acc_1">Measuring performance</A>
+<BR>
+ 5.2 <A HREF = "Section_accelerate.html#acc_2">Algorithms and code options to boost performace</A>
+<BR>
+ 5.3 <A HREF = "Section_accelerate.html#acc_3">Accelerator packages with optimized styles</A>
+<BR>
+<UL> 5.3.1 <A HREF = "accelerate_cuda.html">USER-CUDA package</A>
+<BR>
+ 5.3.2 <A HREF = "accelerate_gpu.html">GPU package</A>
+<BR>
+ 5.3.3 <A HREF = "accelerate_intel.html">USER-INTEL package</A>
+<BR>
+ 5.3.4 <A HREF = "accelerate_kokkos.html">KOKKOS package</A>
+<BR>
+ 5.3.5 <A HREF = "accelerate_omp.html">USER-OMP package</A>
+<BR>
+ 5.3.6 <A HREF = "accelerate_opt.html">OPT package</A>
+<BR></UL>
+ 5.4 <A HREF = "Section_accelerate.html#acc_4">Comparison of various accelerator packages</A>
+<BR></UL>
+<LI><A HREF = "Section_howto.html">How-to discussions</A>
+
+<UL> 6.1 <A HREF = "Section_howto.html#howto_1">Restarting a simulation</A>
+<BR>
+ 6.2 <A HREF = "Section_howto.html#howto_2">2d simulations</A>
+<BR>
+ 6.3 <A HREF = "Section_howto.html#howto_3">CHARMM and AMBER force fields</A>
+<BR>
+ 6.4 <A HREF = "Section_howto.html#howto_4">Running multiple simulations from one input script</A>
+<BR>
+ 6.5 <A HREF = "Section_howto.html#howto_5">Multi-replica simulations</A>
+<BR>
+ 6.6 <A HREF = "Section_howto.html#howto_6">Granular models</A>
+<BR>
+ 6.7 <A HREF = "Section_howto.html#howto_7">TIP3P water model</A>
+<BR>
+ 6.8 <A HREF = "Section_howto.html#howto_8">TIP4P water model</A>
+<BR>
+ 6.9 <A HREF = "Section_howto.html#howto_9">SPC water model</A>
+<BR>
+ 6.10 <A HREF = "Section_howto.html#howto_10">Coupling LAMMPS to other codes</A>
+<BR>
+ 6.11 <A HREF = "Section_howto.html#howto_11">Visualizing LAMMPS snapshots</A>
+<BR>
+ 6.12 <A HREF = "Section_howto.html#howto_12">Triclinic (non-orthogonal) simulation boxes</A>
+<BR>
+ 6.13 <A HREF = "Section_howto.html#howto_13">NEMD simulations</A>
+<BR>
+ 6.14 <A HREF = "Section_howto.html#howto_14">Finite-size spherical and aspherical particles</A>
+<BR>
+ 6.15 <A HREF = "Section_howto.html#howto_15">Output from LAMMPS (thermo, dumps, computes, fixes, variables)</A>
+<BR>
+ 6.16 <A HREF = "Section_howto.html#howto_16">Thermostatting, barostatting, and compute temperature</A>
+<BR>
+ 6.17 <A HREF = "Section_howto.html#howto_17">Walls</A>
+<BR>
+ 6.18 <A HREF = "Section_howto.html#howto_18">Elastic constants</A>
+<BR>
+ 6.19 <A HREF = "Section_howto.html#howto_19">Library interface to LAMMPS</A>
+<BR>
+ 6.20 <A HREF = "Section_howto.html#howto_20">Calculating thermal conductivity</A>
+<BR>
+ 6.21 <A HREF = "Section_howto.html#howto_21">Calculating viscosity</A>
+<BR>
+ 6.22 <A HREF = "Section_howto.html#howto_22">Calculating a diffusion coefficient</A>
+<BR>
+ 6.23 <A HREF = "Section_howto.html#howto_23">Using chunks to calculate system properties</A>
+<BR>
+ 6.24 <A HREF = "Section_howto.html#howto_24">Setting parameters for pppm/disp</A>
+<BR>
+ 6.25 <A HREF = "Section_howto.html#howto_25">Polarizable models</A>
+<BR>
+ 6.26 <A HREF = "Section_howto.html#howto_26">Adiabatic core/shell model</A>
+<BR>
+ 6.27 <A HREF = "Section_howto.html#howto_27">Drude induced dipoles</A>
+<BR></UL>
+<LI><A HREF = "Section_example.html">Example problems</A>
+
+<LI><A HREF = "Section_perf.html">Performance & scalability</A>
+
+<LI><A HREF = "Section_tools.html">Additional tools</A>
+
+<LI><A HREF = "Section_modify.html">Modifying & extending LAMMPS</A>
+
+<UL> 10.1 <A HREF = "Section_modify.html#mod_1">Atom styles</A>
+<BR>
+ 10.2 <A HREF = "Section_modify.html#mod_2">Bond, angle, dihedral, improper potentials</A>
+<BR>
+ 10.3 <A HREF = "Section_modify.html#mod_3">Compute styles</A>
+<BR>
+ 10.4 <A HREF = "Section_modify.html#mod_4">Dump styles</A>
+<BR>
+ 10.5 <A HREF = "Section_modify.html#mod_5">Dump custom output options</A>
+<BR>
+ 10.6 <A HREF = "Section_modify.html#mod_6">Fix styles</A>
+<BR>
+ 10.7 <A HREF = "Section_modify.html#mod_7">Input script commands</A>
+<BR>
+ 10.8 <A HREF = "Section_modify.html#mod_8">Kspace computations</A>
+<BR>
+ 10.9 <A HREF = "Section_modify.html#mod_9">Minimization styles</A>
+<BR>
+ 10.10 <A HREF = "Section_modify.html#mod_10">Pairwise potentials</A>
+<BR>
+ 10.11 <A HREF = "Section_modify.html#mod_11">Region styles</A>
+<BR>
+ 10.12 <A HREF = "Section_modify.html#mod_12">Body styles</A>
+<BR>
+ 10.13 <A HREF = "Section_modify.html#mod_13">Thermodynamic output options</A>
+<BR>
+ 10.14 <A HREF = "Section_modify.html#mod_14">Variable options</A>
+<BR>
+ 10.15 <A HREF = "Section_modify.html#mod_15">Submitting new features for inclusion in LAMMPS</A>
+<BR></UL>
+<LI><A HREF = "Section_python.html">Python interface</A>
+
+<UL> 11.1 <A HREF = "Section_python.html#py_1">Overview of running LAMMPS from Python</A>
+<BR>
+ 11.2 <A HREF = "Section_python.html#py_2">Overview of using Python from a LAMMPS script</A>
+<BR>
+ 11.3 <A HREF = "Section_python.html#py_3">Building LAMMPS as a shared library</A>
+<BR>
+ 11.4 <A HREF = "Section_python.html#py_4">Installing the Python wrapper into Python</A>
+<BR>
+ 11.5 <A HREF = "Section_python.html#py_5">Extending Python with MPI to run in parallel</A>
+<BR>
+ 11.6 <A HREF = "Section_python.html#py_6">Testing the Python-LAMMPS interface</A>
+<BR>
+ 11.7 <A HREF = "py_7">Using LAMMPS from Python</A>
+<BR>
+ 11.8 <A HREF = "py_8">Example Python scripts that use LAMMPS</A>
+<BR></UL>
+<LI><A HREF = "Section_errors.html">Errors</A>
+
+<UL> 12.1 <A HREF = "Section_errors.html#err_1">Common problems</A>
+<BR>
+ 12.2 <A HREF = "Section_errors.html#err_2">Reporting bugs</A>
+<BR>
+ 12.3 <A HREF = "Section_errors.html#err_3">Error & warning messages</A>
+<BR></UL>
+<LI><A HREF = "Section_history.html">Future and history</A>
+
+<UL> 13.1 <A HREF = "Section_history.html#hist_1">Coming attractions</A>
+<BR>
+ 13.2 <A HREF = "Section_history.html#hist_2">Past versions</A>
+<BR></UL>
+
+</OL>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<!-- END_HTML_ONLY -->
+
+</BODY>
+
+</HTML>
diff --git a/doc/Manual.html.html b/doc/Manual.html.html
deleted file mode 100644
index 8f7025630..000000000
--- a/doc/Manual.html.html
+++ /dev/null
@@ -1,318 +0,0 @@
-<HTML>
-<HTML>
-<!-- HTML_ONLY -->
-<HEAD>
-<TITLE>LAMMPS Users Manual</TITLE>
-<META NAME="docnumber" CONTENT="10 Aug 2015 version">
-<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
-<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
-</HEAD>
-
-<BODY>
-
-<!-- END_HTML_ONLY -->
-
-<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
-</CENTER>
-
-<HR>
-
-<H1></H1>
-
-<P><CENTER><H3>LAMMPS Documentation
-</H3></CENTER>
-<CENTER><H4>10 Aug 2015 version
-</H4></CENTER>
-<H4>Version info:
-</H4>
-<P>The LAMMPS "version" is the date when it was released, such as 1 May
-2010. LAMMPS is updated continuously. Whenever we fix a bug or add a
-feature, we release it immediately, and post a notice on <A HREF = "http://lammps.sandia.gov/bug.html">this page of
-the WWW site</A>. Each dated copy of LAMMPS contains all the
-features and bug-fixes up to and including that version date. The
-version date is printed to the screen and logfile every time you run
-LAMMPS. It is also in the file src/version.h and in the LAMMPS
-directory name created when you unpack a tarball, and at the top of
-the first page of the manual (this page).
-</P>
-<UL><LI>If you browse the HTML doc pages on the LAMMPS WWW site, they always
-describe the most current version of LAMMPS.
-</P>
-<P><LI>If you browse the HTML doc pages included in your tarball, they
-describe the version you have.
-</P>
-<P><LI>The <A HREF = "Manual.pdf">PDF file</A> on the WWW site or in the tarball is updated
-about once per month. This is because it is large, and we don't want
-it to be part of every patch.
-</P>
-<LI>There is also a <A HREF = "Developer.pdf">Developer.pdf</A> file in the doc
-directory, which describes the internal structure and algorithms of
-LAMMPS.
-</UL>
-<P>LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
-Simulator.
-</P>
-<P>LAMMPS is a classical molecular dynamics simulation code designed to
-run efficiently on parallel computers. It was developed at Sandia
-National Laboratories, a US Department of Energy facility, with
-funding from the DOE. It is an open-source code, distributed freely
-under the terms of the GNU Public License (GPL).
-</P>
-<P>The primary developers of LAMMPS are <A HREF = "http://www.sandia.gov/~sjplimp">Steve Plimpton</A>, Aidan
-Thompson, and Paul Crozier who can be contacted at
-sjplimp,athomps,pscrozi at sandia.gov. The <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> at
-http://lammps.sandia.gov has more information about the code and its
-uses.
-</P>
-
-<HR>
-
-<P>The LAMMPS documentation is organized into the following sections. If
-you find errors or omissions in this manual or have suggestions for
-useful information to add, please send an email to the developers so
-we can improve the LAMMPS documentation.
-</P>
-<P>Once you are familiar with LAMMPS, you may want to bookmark <A HREF = "Section_commands.html#comm">this
-page</A> at Section_commands.html#comm since
-it gives quick access to documentation for all LAMMPS commands.
-</P>
-<P><A HREF = "Manual.pdf">PDF file</A> of the entire manual, generated by
-<A HREF = "http://freecode.com/projects/htmldoc">htmldoc</A>
-</P>
-<P><!-- RST
-</P>
-<P>.. toctree::
- :maxdepth: 2
- :numbered: // comment
-</P>
-<P> Section_intro
- Section_start
- Section_commands
- Section_packages
- Section_accelerate
- Section_howto
- Section_example
- Section_perf
- Section_tools
- Section_modify
- Section_python
- Section_errors
- Section_history
-</P>
-<P>Indices and tables
-==================
-</P>
-<P>* :ref:`genindex` // comment
-* :ref:`search` // comment
-</P>
-<P>END_RST -->
-</P>
-<OL><LI><!-- HTML_ONLY -->
-<A HREF = "Section_intro.html">Introduction</A>
-
-<UL> 1.1 <A HREF = "Section_intro.html#intro_1">What is LAMMPS</A>
-<BR>
- 1.2 <A HREF = "Section_intro.html#intro_2">LAMMPS features</A>
-<BR>
- 1.3 <A HREF = "Section_intro.html#intro_3">LAMMPS non-features</A>
-<BR>
- 1.4 <A HREF = "Section_intro.html#intro_4">Open source distribution</A>
-<BR>
- 1.5 <A HREF = "Section_intro.html#intro_5">Acknowledgments and citations</A>
-<BR></UL>
-<LI><A HREF = "Section_start.html">Getting started</A>
-
-<UL> 2.1 <A HREF = "Section_start.html#start_1">What's in the LAMMPS distribution</A>
-<BR>
- 2.2 <A HREF = "Section_start.html#start_2">Making LAMMPS</A>
-<BR>
- 2.3 <A HREF = "Section_start.html#start_3">Making LAMMPS with optional packages</A>
-<BR>
- 2.4 <A HREF = "Section_start.html#start_4">Building LAMMPS via the Make.py script</A>
-<BR>
- 2.5 <A HREF = "Section_start.html#start_5">Building LAMMPS as a library</A>
-<BR>
- 2.6 <A HREF = "Section_start.html#start_6">Running LAMMPS</A>
-<BR>
- 2.7 <A HREF = "Section_start.html#start_7">Command-line options</A>
-<BR>
- 2.8 <A HREF = "Section_start.html#start_8">Screen output</A>
-<BR>
- 2.9 <A HREF = "Section_start.html#start_9">Tips for users of previous versions</A>
-<BR></UL>
-<LI><A HREF = "Section_commands.html">Commands</A>
-
-<UL> 3.1 <A HREF = "Section_commands.html#cmd_1">LAMMPS input script</A>
-<BR>
- 3.2 <A HREF = "Section_commands.html#cmd_2">Parsing rules</A>
-<BR>
- 3.3 <A HREF = "Section_commands.html#cmd_3">Input script structure</A>
-<BR>
- 3.4 <A HREF = "Section_commands.html#cmd_4">Commands listed by category</A>
-<BR>
- 3.5 <A HREF = "Section_commands.html#cmd_5">Commands listed alphabetically</A>
-<BR></UL>
-<LI><A HREF = "Section_packages.html">Packages</A>
-
-<UL> 4.1 <A HREF = "Section_packages.html#pkg_1">Standard packages</A>
-<BR>
- 4.2 <A HREF = "Section_packages.html#pkg_2">User packages</A>
-<BR></UL>
-<LI><A HREF = "Section_accelerate.html">Accelerating LAMMPS performance</A>
-
-<UL> 5.1 <A HREF = "Section_accelerate.html#acc_1">Measuring performance</A>
-<BR>
- 5.2 <A HREF = "Section_accelerate.html#acc_2">Algorithms and code options to boost performace</A>
-<BR>
- 5.3 <A HREF = "Section_accelerate.html#acc_3">Accelerator packages with optimized styles</A>
-<BR>
-<UL> 5.3.1 <A HREF = "accelerate_cuda.html">USER-CUDA package</A>
-<BR>
- 5.3.2 <A HREF = "accelerate_gpu.html">GPU package</A>
-<BR>
- 5.3.3 <A HREF = "accelerate_intel.html">USER-INTEL package</A>
-<BR>
- 5.3.4 <A HREF = "accelerate_kokkos.html">KOKKOS package</A>
-<BR>
- 5.3.5 <A HREF = "accelerate_omp.html">USER-OMP package</A>
-<BR>
- 5.3.6 <A HREF = "accelerate_opt.html">OPT package</A>
-<BR></UL>
- 5.4 <A HREF = "Section_accelerate.html#acc_4">Comparison of various accelerator packages</A>
-<BR></UL>
-<LI><A HREF = "Section_howto.html">How-to discussions</A>
-
-<UL> 6.1 <A HREF = "Section_howto.html#howto_1">Restarting a simulation</A>
-<BR>
- 6.2 <A HREF = "Section_howto.html#howto_2">2d simulations</A>
-<BR>
- 6.3 <A HREF = "Section_howto.html#howto_3">CHARMM and AMBER force fields</A>
-<BR>
- 6.4 <A HREF = "Section_howto.html#howto_4">Running multiple simulations from one input script</A>
-<BR>
- 6.5 <A HREF = "Section_howto.html#howto_5">Multi-replica simulations</A>
-<BR>
- 6.6 <A HREF = "Section_howto.html#howto_6">Granular models</A>
-<BR>
- 6.7 <A HREF = "Section_howto.html#howto_7">TIP3P water model</A>
-<BR>
- 6.8 <A HREF = "Section_howto.html#howto_8">TIP4P water model</A>
-<BR>
- 6.9 <A HREF = "Section_howto.html#howto_9">SPC water model</A>
-<BR>
- 6.10 <A HREF = "Section_howto.html#howto_10">Coupling LAMMPS to other codes</A>
-<BR>
- 6.11 <A HREF = "Section_howto.html#howto_11">Visualizing LAMMPS snapshots</A>
-<BR>
- 6.12 <A HREF = "Section_howto.html#howto_12">Triclinic (non-orthogonal) simulation boxes</A>
-<BR>
- 6.13 <A HREF = "Section_howto.html#howto_13">NEMD simulations</A>
-<BR>
- 6.14 <A HREF = "Section_howto.html#howto_14">Finite-size spherical and aspherical particles</A>
-<BR>
- 6.15 <A HREF = "Section_howto.html#howto_15">Output from LAMMPS (thermo, dumps, computes, fixes, variables)</A>
-<BR>
- 6.16 <A HREF = "Section_howto.html#howto_16">Thermostatting, barostatting, and compute temperature</A>
-<BR>
- 6.17 <A HREF = "Section_howto.html#howto_17">Walls</A>
-<BR>
- 6.18 <A HREF = "Section_howto.html#howto_18">Elastic constants</A>
-<BR>
- 6.19 <A HREF = "Section_howto.html#howto_19">Library interface to LAMMPS</A>
-<BR>
- 6.20 <A HREF = "Section_howto.html#howto_20">Calculating thermal conductivity</A>
-<BR>
- 6.21 <A HREF = "Section_howto.html#howto_21">Calculating viscosity</A>
-<BR>
- 6.22 <A HREF = "Section_howto.html#howto_22">Calculating a diffusion coefficient</A>
-<BR>
- 6.23 <A HREF = "Section_howto.html#howto_23">Using chunks to calculate system properties</A>
-<BR>
- 6.24 <A HREF = "Section_howto.html#howto_24">Setting parameters for pppm/disp</A>
-<BR>
- 6.25 <A HREF = "Section_howto.html#howto_25">Polarizable models</A>
-<BR>
- 6.26 <A HREF = "Section_howto.html#howto_26">Adiabatic core/shell model</A>
-<BR>
- 6.27 <A HREF = "Section_howto.html#howto_27">Drude induced dipoles</A>
-<BR></UL>
-<LI><A HREF = "Section_example.html">Example problems</A>
-
-<LI><A HREF = "Section_perf.html">Performance & scalability</A>
-
-<LI><A HREF = "Section_tools.html">Additional tools</A>
-
-<LI><A HREF = "Section_modify.html">Modifying & extending LAMMPS</A>
-
-<UL> 10.1 <A HREF = "Section_modify.html#mod_1">Atom styles</A>
-<BR>
- 10.2 <A HREF = "Section_modify.html#mod_2">Bond, angle, dihedral, improper potentials</A>
-<BR>
- 10.3 <A HREF = "Section_modify.html#mod_3">Compute styles</A>
-<BR>
- 10.4 <A HREF = "Section_modify.html#mod_4">Dump styles</A>
-<BR>
- 10.5 <A HREF = "Section_modify.html#mod_5">Dump custom output options</A>
-<BR>
- 10.6 <A HREF = "Section_modify.html#mod_6">Fix styles</A>
-<BR>
- 10.7 <A HREF = "Section_modify.html#mod_7">Input script commands</A>
-<BR>
- 10.8 <A HREF = "Section_modify.html#mod_8">Kspace computations</A>
-<BR>
- 10.9 <A HREF = "Section_modify.html#mod_9">Minimization styles</A>
-<BR>
- 10.10 <A HREF = "Section_modify.html#mod_10">Pairwise potentials</A>
-<BR>
- 10.11 <A HREF = "Section_modify.html#mod_11">Region styles</A>
-<BR>
- 10.12 <A HREF = "Section_modify.html#mod_12">Body styles</A>
-<BR>
- 10.13 <A HREF = "Section_modify.html#mod_13">Thermodynamic output options</A>
-<BR>
- 10.14 <A HREF = "Section_modify.html#mod_14">Variable options</A>
-<BR>
- 10.15 <A HREF = "Section_modify.html#mod_15">Submitting new features for inclusion in LAMMPS</A>
-<BR></UL>
-<LI><A HREF = "Section_python.html">Python interface</A>
-
-<UL> 11.1 <A HREF = "Section_python.html#py_1">Overview of running LAMMPS from Python</A>
-<BR>
- 11.2 <A HREF = "Section_python.html#py_2">Overview of using Python from a LAMMPS script</A>
-<BR>
- 11.3 <A HREF = "Section_python.html#py_3">Building LAMMPS as a shared library</A>
-<BR>
- 11.4 <A HREF = "Section_python.html#py_4">Installing the Python wrapper into Python</A>
-<BR>
- 11.5 <A HREF = "Section_python.html#py_5">Extending Python with MPI to run in parallel</A>
-<BR>
- 11.6 <A HREF = "Section_python.html#py_6">Testing the Python-LAMMPS interface</A>
-<BR>
- 11.7 <A HREF = "py_7">Using LAMMPS from Python</A>
-<BR>
- 11.8 <A HREF = "py_8">Example Python scripts that use LAMMPS</A>
-<BR></UL>
-<LI><A HREF = "Section_errors.html">Errors</A>
-
-<UL> 12.1 <A HREF = "Section_errors.html#err_1">Common problems</A>
-<BR>
- 12.2 <A HREF = "Section_errors.html#err_2">Reporting bugs</A>
-<BR>
- 12.3 <A HREF = "Section_errors.html#err_3">Error & warning messages</A>
-<BR></UL>
-<LI><A HREF = "Section_history.html">Future and history</A>
-
-<UL> 13.1 <A HREF = "Section_history.html#hist_1">Coming attractions</A>
-<BR>
- 13.2 <A HREF = "Section_history.html#hist_2">Past versions</A>
-<BR></UL>
-
-</OL>
-
-<!-- END_HTML_ONLY -->
-
-</BODY>
-
-</HTML>
-
-</HTML>
diff --git a/doc/Manual.txt b/doc/Manual.txt
index d0ad6b575..d8b2905b2 100644
--- a/doc/Manual.txt
+++ b/doc/Manual.txt
@@ -1,319 +1,319 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS-ICMS Users Manual</TITLE>
-<META NAME="docnumber" CONTENT="10 Aug 2015 version">
+<META NAME="docnumber" CONTENT="19 Aug 2015 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
<BODY>
<!-- END_HTML_ONLY -->
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
<H1></H1>
LAMMPS-ICMS Documentation :c,h3
-10 Aug 2015 version :c,h4
+19 Aug 2015 version :c,h4
Version info: :h4
The LAMMPS "version" is the date when it was released, such as 1 May
2010. LAMMPS is updated continuously. Whenever we fix a bug or add a
feature, we release it immediately, and post a notice on "this page of
the WWW site"_bug. Each dated copy of LAMMPS contains all the
features and bug-fixes up to and including that version date. The
version date is printed to the screen and logfile every time you run
LAMMPS. It is also in the file src/version.h and in the LAMMPS
directory name created when you unpack a tarball, and at the top of
the first page of the manual (this page).
LAMMPS-ICMS is an experimental variant of LAMMPS with additional
features made available for testing before they will be submitted
for inclusion into the official LAMMPS tree. The source code is
based on the official LAMMPS svn repository mirror at the Institute
for Computational Molecular Science at Temple University and generally
kept up-to-date as much as possible. Sometimes, e.g. when additional
development work is needed to adapt the upstream changes into
LAMMPS-ICMS it can take longer until synchronization; and occasionally,
e.g. in case of the rewrite of the multi-threading support, the
development will be halted except for important bugfixes until
all features of LAMMPS-ICMS fully compatible with the upstream
version or replaced by alternate implementations.
If you browse the HTML doc pages on the LAMMPS WWW site, they always
describe the most current version of upstream LAMMPS, but may be
missing some new features in LAMMPS-ICMS. :ulb,l
If you browse the HTML doc pages included in your tarball, they
describe the version you have, however, not all new features in
LAMMPS-ICMS are documented immediately. :l
The "PDF file"_Manual.pdf on the WWW site or in the tarball is updated
about once per month. This is because it is large, and we don't want
it to be part of every patch. :l
There is also a "Developer.pdf"_Developer.pdf file in the doc
directory, which describes the internal structure and algorithms of
LAMMPS. :ule,l
LAMMPS stands for Large-scale Atomic/Molecular Massively Parallel
Simulator.
LAMMPS is a classical molecular dynamics simulation code designed to
run efficiently on parallel computers. It was developed at Sandia
National Laboratories, a US Department of Energy facility, with
funding from the DOE. It is an open-source code, distributed freely
under the terms of the GNU Public License (GPL).
The primary developers of LAMMPS are "Steve Plimpton"_sjp, Aidan
Thompson, and Paul Crozier who can be contacted at
sjplimp,athomps,pscrozi at sandia.gov. The "LAMMPS WWW Site"_lws at
http://lammps.sandia.gov has more information about the code and its
uses.
:link(bug,http://lammps.sandia.gov/bug.html)
:link(sjp,http://www.sandia.gov/~sjplimp)
:line
The LAMMPS documentation is organized into the following sections. If
you find errors or omissions in this manual or have suggestions for
useful information to add, please send an email to the developers so
we can improve the LAMMPS documentation.
Once you are familiar with LAMMPS, you may want to bookmark "this
page"_Section_commands.html#comm at Section_commands.html#comm since
it gives quick access to documentation for all LAMMPS commands.
"PDF file"_Manual.pdf of the entire manual, generated by
"htmldoc"_http://freecode.com/projects/htmldoc
<!-- RST
.. toctree::
:maxdepth: 2
- :numbered:
+ :numbered: // comment
Section_intro
Section_start
Section_commands
Section_packages
Section_accelerate
Section_howto
Section_example
Section_perf
Section_tools
Section_modify
Section_python
Section_errors
Section_history
Indices and tables
==================
-* :ref:`genindex`
-* :ref:`search`
+* :ref:`genindex` // comment
+* :ref:`search` // comment
END_RST -->
<!-- HTML_ONLY -->
"Introduction"_Section_intro.html :olb,l
1.1 "What is LAMMPS"_intro_1 :ulb,b
1.2 "LAMMPS features"_intro_2 :b
1.3 "LAMMPS non-features"_intro_3 :b
1.4 "Open source distribution"_intro_4 :b
1.5 "Acknowledgments and citations"_intro_5 :ule,b
"Getting started"_Section_start.html :l
2.1 "What's in the LAMMPS distribution"_start_1 :ulb,b
2.2 "Making LAMMPS"_start_2 :b
2.3 "Making LAMMPS with optional packages"_start_3 :b
2.4 "Building LAMMPS via the Make.py script"_start_4 :b
2.5 "Building LAMMPS as a library"_start_5 :b
2.6 "Running LAMMPS"_start_6 :b
2.7 "Command-line options"_start_7 :b
2.8 "Screen output"_start_8 :b
2.9 "Tips for users of previous versions"_start_9 :ule,b
"Commands"_Section_commands.html :l
3.1 "LAMMPS input script"_cmd_1 :ulb,b
3.2 "Parsing rules"_cmd_2 :b
3.3 "Input script structure"_cmd_3 :b
3.4 "Commands listed by category"_cmd_4 :b
3.5 "Commands listed alphabetically"_cmd_5 :ule,b
"Packages"_Section_packages.html :l
4.1 "Standard packages"_pkg_1 :ulb,b
4.2 "User packages"_pkg_2 :ule,b
"Accelerating LAMMPS performance"_Section_accelerate.html :l
5.1 "Measuring performance"_acc_1 :ulb,b
5.2 "Algorithms and code options to boost performace"_acc_2 :b
5.3 "Accelerator packages with optimized styles"_acc_3 :b
5.3.1 "USER-CUDA package"_accelerate_cuda.html :ulb,b
5.3.2 "GPU package"_accelerate_gpu.html :b
5.3.3 "USER-INTEL package"_accelerate_intel.html :b
5.3.4 "KOKKOS package"_accelerate_kokkos.html :b
5.3.5 "USER-OMP package"_accelerate_omp.html :b
5.3.6 "OPT package"_accelerate_opt.html :ule,b
5.4 "Comparison of various accelerator packages"_acc_4 :ule,b
"How-to discussions"_Section_howto.html :l
6.1 "Restarting a simulation"_howto_1 :ulb,b
6.2 "2d simulations"_howto_2 :b
6.3 "CHARMM and AMBER force fields"_howto_3 :b
6.4 "Running multiple simulations from one input script"_howto_4 :b
6.5 "Multi-replica simulations"_howto_5 :b
6.6 "Granular models"_howto_6 :b
6.7 "TIP3P water model"_howto_7 :b
6.8 "TIP4P water model"_howto_8 :b
6.9 "SPC water model"_howto_9 :b
6.10 "Coupling LAMMPS to other codes"_howto_10 :b
6.11 "Visualizing LAMMPS snapshots"_howto_11 :b
6.12 "Triclinic (non-orthogonal) simulation boxes"_howto_12 :b
6.13 "NEMD simulations"_howto_13 :b
6.14 "Finite-size spherical and aspherical particles"_howto_14 :b
6.15 "Output from LAMMPS (thermo, dumps, computes, fixes, variables)"_howto_15 :b
6.16 "Thermostatting, barostatting, and compute temperature"_howto_16 :b
6.17 "Walls"_howto_17 :b
6.18 "Elastic constants"_howto_18 :b
6.19 "Library interface to LAMMPS"_howto_19 :b
6.20 "Calculating thermal conductivity"_howto_20 :b
6.21 "Calculating viscosity"_howto_21 :b
6.22 "Calculating a diffusion coefficient"_howto_22 :b
6.23 "Using chunks to calculate system properties"_howto_23 :b
6.24 "Setting parameters for pppm/disp"_howto_24 :b
6.25 "Polarizable models"_howto_25 :b
6.26 "Adiabatic core/shell model"_howto_26 :b
6.27 "Drude induced dipoles"_howto_27 :ule,b
"Example problems"_Section_example.html :l
"Performance & scalability"_Section_perf.html :l
"Additional tools"_Section_tools.html :l
"Modifying & extending LAMMPS"_Section_modify.html :l
10.1 "Atom styles"_mod_1 :ulb,b
10.2 "Bond, angle, dihedral, improper potentials"_mod_2 :b
10.3 "Compute styles"_mod_3 :b
10.4 "Dump styles"_mod_4 :b
10.5 "Dump custom output options"_mod_5 :b
10.6 "Fix styles"_mod_6 :b
10.7 "Input script commands"_mod_7 :b
10.8 "Kspace computations"_mod_8 :b
10.9 "Minimization styles"_mod_9 :b
10.10 "Pairwise potentials"_mod_10 :b
10.11 "Region styles"_mod_11 :b
10.12 "Body styles"_mod_12 :b
10.13 "Thermodynamic output options"_mod_13 :b
10.14 "Variable options"_mod_14 :b
10.15 "Submitting new features for inclusion in LAMMPS"_mod_15 :ule,b
"Python interface"_Section_python.html :l
11.1 "Overview of running LAMMPS from Python"_py_1 :ulb,b
11.2 "Overview of using Python from a LAMMPS script"_py_2 :b
11.3 "Building LAMMPS as a shared library"_py_3 :b
11.4 "Installing the Python wrapper into Python"_py_4 :b
11.5 "Extending Python with MPI to run in parallel"_py_5 :b
11.6 "Testing the Python-LAMMPS interface"_py_6 :b
11.7 "Using LAMMPS from Python"_py_7 :b
11.8 "Example Python scripts that use LAMMPS"_py_8 :ule,b
"Errors"_Section_errors.html :l
12.1 "Common problems"_err_1 :ulb,b
12.2 "Reporting bugs"_err_2 :b
12.3 "Error & warning messages"_err_3 :ule,b
"Future and history"_Section_history.html :l
13.1 "Coming attractions"_hist_1 :ulb,b
13.2 "Past versions"_hist_2 :ule,b
:ole
:link(intro_1,Section_intro.html#intro_1)
:link(intro_2,Section_intro.html#intro_2)
:link(intro_3,Section_intro.html#intro_3)
:link(intro_4,Section_intro.html#intro_4)
:link(intro_5,Section_intro.html#intro_5)
:link(start_1,Section_start.html#start_1)
:link(start_2,Section_start.html#start_2)
:link(start_3,Section_start.html#start_3)
:link(start_4,Section_start.html#start_4)
:link(start_5,Section_start.html#start_5)
:link(start_6,Section_start.html#start_6)
:link(start_7,Section_start.html#start_7)
:link(start_8,Section_start.html#start_8)
:link(start_9,Section_start.html#start_9)
:link(cmd_1,Section_commands.html#cmd_1)
:link(cmd_2,Section_commands.html#cmd_2)
:link(cmd_3,Section_commands.html#cmd_3)
:link(cmd_4,Section_commands.html#cmd_4)
:link(cmd_5,Section_commands.html#cmd_5)
:link(pkg_1,Section_packages.html#pkg_1)
:link(pkg_2,Section_packages.html#pkg_2)
:link(acc_1,Section_accelerate.html#acc_1)
:link(acc_2,Section_accelerate.html#acc_2)
:link(acc_3,Section_accelerate.html#acc_3)
:link(acc_4,Section_accelerate.html#acc_4)
:link(howto_1,Section_howto.html#howto_1)
:link(howto_2,Section_howto.html#howto_2)
:link(howto_3,Section_howto.html#howto_3)
:link(howto_4,Section_howto.html#howto_4)
:link(howto_5,Section_howto.html#howto_5)
:link(howto_6,Section_howto.html#howto_6)
:link(howto_7,Section_howto.html#howto_7)
:link(howto_8,Section_howto.html#howto_8)
:link(howto_9,Section_howto.html#howto_9)
:link(howto_10,Section_howto.html#howto_10)
:link(howto_11,Section_howto.html#howto_11)
:link(howto_12,Section_howto.html#howto_12)
:link(howto_13,Section_howto.html#howto_13)
:link(howto_14,Section_howto.html#howto_14)
:link(howto_15,Section_howto.html#howto_15)
:link(howto_16,Section_howto.html#howto_16)
:link(howto_17,Section_howto.html#howto_17)
:link(howto_18,Section_howto.html#howto_18)
:link(howto_19,Section_howto.html#howto_19)
:link(howto_20,Section_howto.html#howto_20)
:link(howto_21,Section_howto.html#howto_21)
:link(howto_22,Section_howto.html#howto_22)
:link(howto_23,Section_howto.html#howto_23)
:link(howto_24,Section_howto.html#howto_24)
:link(howto_25,Section_howto.html#howto_25)
:link(howto_26,Section_howto.html#howto_26)
:link(howto_27,Section_howto.html#howto_27)
:link(mod_1,Section_modify.html#mod_1)
:link(mod_2,Section_modify.html#mod_2)
:link(mod_3,Section_modify.html#mod_3)
:link(mod_4,Section_modify.html#mod_4)
:link(mod_5,Section_modify.html#mod_5)
:link(mod_6,Section_modify.html#mod_6)
:link(mod_7,Section_modify.html#mod_7)
:link(mod_8,Section_modify.html#mod_8)
:link(mod_9,Section_modify.html#mod_9)
:link(mod_10,Section_modify.html#mod_10)
:link(mod_11,Section_modify.html#mod_11)
:link(mod_12,Section_modify.html#mod_12)
:link(mod_13,Section_modify.html#mod_13)
:link(mod_14,Section_modify.html#mod_14)
:link(mod_15,Section_modify.html#mod_15)
:link(py_1,Section_python.html#py_1)
:link(py_2,Section_python.html#py_2)
:link(py_3,Section_python.html#py_3)
:link(py_4,Section_python.html#py_4)
:link(py_5,Section_python.html#py_5)
:link(py_6,Section_python.html#py_6)
:link(err_1,Section_errors.html#err_1)
:link(err_2,Section_errors.html#err_2)
:link(err_3,Section_errors.html#err_3)
:link(hist_1,Section_history.html#hist_1)
:link(hist_2,Section_history.html#hist_2)
<!-- END_HTML_ONLY -->
</BODY>
diff --git a/doc/Section_commands.html b/doc/Section_commands.html
index b8bcf0b55..98a353ebf 100644
--- a/doc/Section_commands.html
+++ b/doc/Section_commands.html
@@ -1,1510 +1,1510 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3. Commands &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<link rel="next" title="4. Packages" href="Section_packages.html"/>
<link rel="prev" title="2. Getting Started" href="Section_start.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">3. Commands</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#lammps-input-script">3.1. LAMMPS input script</a></li>
<li class="toctree-l2"><a class="reference internal" href="#parsing-rules">3.2. Parsing rules</a></li>
<li class="toctree-l2"><a class="reference internal" href="#input-script-structure">3.3. Input script structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="#commands-listed-by-category">3.4. Commands listed by category</a></li>
<li class="toctree-l2"><a class="reference internal" href="#individual-commands">3.5. Individual commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="#fix-styles">3.6. Fix styles</a></li>
<li class="toctree-l2"><a class="reference internal" href="#compute-styles">3.7. Compute styles</a></li>
<li class="toctree-l2"><a class="reference internal" href="#pair-style-potentials">3.8. Pair_style potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="#bond-style-potentials">3.9. Bond_style potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="#angle-style-potentials">3.10. Angle_style potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dihedral-style-potentials">3.11. Dihedral_style potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="#improper-style-potentials">3.12. Improper_style potentials</a></li>
<li class="toctree-l2"><a class="reference internal" href="#kspace-solvers">3.13. Kspace solvers</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>3. Commands</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
<div class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
<a href="Section_packages.html" class="btn btn-neutral float-right" title="4. Packages" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_start.html" class="btn btn-neutral" title="2. Getting Started" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="commands">
<h1>3. Commands<a class="headerlink" href="#commands" title="Permalink to this headline">¶</a></h1>
<p>This section describes how a LAMMPS input script is formatted and the
input script commands used to define a LAMMPS simulation.</p>
<div class="line-block">
<div class="line">3.1 <a class="reference internal" href="#cmd-1"><span>LAMMPS input script</span></a></div>
<div class="line">3.2 <a class="reference internal" href="#cmd-2"><span>Parsing rules</span></a></div>
<div class="line">3.3 <a class="reference internal" href="#cmd-3"><span>Input script structure</span></a></div>
<div class="line">3.4 <a class="reference internal" href="#cmd-4"><span>Commands listed by category</span></a></div>
<div class="line">3.5 <a class="reference internal" href="#cmd-5"><span>Commands listed alphabetically</span></a></div>
<div class="line"><br /></div>
</div>
<div class="section" id="lammps-input-script">
<span id="cmd-1"></span><h2>3.1. LAMMPS input script<a class="headerlink" href="#lammps-input-script" title="Permalink to this headline">¶</a></h2>
<p>LAMMPS executes by reading commands from a input script (text file),
one line at a time. When the input script ends, LAMMPS exits. Each
command causes LAMMPS to take some action. It may set an internal
variable, read in a file, or run a simulation. Most commands have
default settings, which means you only need to use the command if you
wish to change the default.</p>
<p>In many cases, the ordering of commands in an input script is not
important. However the following rules apply:</p>
<p>(1) LAMMPS does not read your entire input script and then perform a
simulation with all the settings. Rather, the input script is read
one line at a time and each command takes effect when it is read.
Thus this sequence of commands:</p>
<div class="highlight-python"><div class="highlight"><pre>timestep 0.5
run 100
run 100
</pre></div>
</div>
<p>does something different than this sequence:</p>
<div class="highlight-python"><div class="highlight"><pre>run 100
timestep 0.5
run 100
</pre></div>
</div>
<p>In the first case, the specified timestep (0.5 fmsec) is used for two
simulations of 100 timesteps each. In the 2nd case, the default
timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5
fmsec timestep is used for the 2nd one.</p>
<p>(2) Some commands are only valid when they follow other commands. For
example you cannot set the temperature of a group of atoms until atoms
have been defined and a group command is used to define which atoms
belong to the group.</p>
<p>(3) Sometimes command B will use values that can be set by command A.
This means command A must precede command B in the input script if it
is to have the desired effect. For example, the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> command initializes the system by setting
up the simulation box and assigning atoms to processors. If default
values are not desired, the <a class="reference internal" href="processors.html"><em>processors</em></a> and
<a class="reference internal" href="boundary.html"><em>boundary</em></a> commands need to be used before read_data to
tell LAMMPS how to map processors to the simulation box.</p>
<p>Many input script errors are detected by LAMMPS and an ERROR or
WARNING message is printed. <a class="reference internal" href="Section_errors.html"><em>This section</em></a> gives
more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used.</p>
<hr class="docutils" />
</div>
<div class="section" id="parsing-rules">
<span id="cmd-2"></span><h2>3.2. Parsing rules<a class="headerlink" href="#parsing-rules" title="Permalink to this headline">¶</a></h2>
<p>Each non-blank line in the input script is treated as a command.
LAMMPS commands are case sensitive. Command names are lower-case, as
are specified command arguments. Upper case letters may be used in
file names or user-chosen ID strings.</p>
<p>Here is how each line in the input script is parsed by LAMMPS:</p>
<p>(1) If the last printable character on the line is a &#8220;&amp;&#8221; character,
the command is assumed to continue on the next line. The next line is
concatenated to the previous line by removing the &#8220;&amp;&#8221; character and
line break. This allows long commands to be continued across two or
more lines. See the discussion of triple quotes in (6) for how to
continue a command across multiple line without using &#8220;&amp;&#8221; characters.</p>
<p>(2) All characters from the first &#8220;#&#8221; character onward are treated as
comment and discarded. See an exception in (6). Note that a
comment after a trailing &#8220;&amp;&#8221; character will prevent the command from
continuing on the next line. Also note that for multi-line commands a
single leading &#8220;#&#8221; will comment out the entire command.</p>
<p>(3) The line is searched repeatedly for $ characters, which indicate
variables that are replaced with a text string. See an exception in
(6).</p>
<p>If the $ is followed by curly brackets, then the variable name is the
text inside the curly brackets. If no curly brackets follow the $,
then the variable name is the single character immediately following
the $. Thus ${myTemp} and $x refer to variable names &#8220;myTemp&#8221; and
&#8220;x&#8221;.</p>
<p>How the variable is converted to a text string depends on what style
of variable it is; see the <a class="reference external" href="variable">variable</a> doc page for details.
It can be a variable that stores multiple text strings, and return one
of them. The returned text string can be multiple &#8220;words&#8221; (space
separated) which will then be interpreted as multiple arguments in the
input command. The variable can also store a numeric formula which
will be evaluated and its numeric result returned as a string.</p>
<p>As a special case, if the $ is followed by parenthesis, then the text
inside the parenthesis is treated as an &#8220;immediate&#8221; variable and
evaluated as an <a class="reference internal" href="variable.html"><em>equal-style variable</em></a>. This is a way
to use numeric formulas in an input script without having to assign
them to variable names. For example, these 3 input script lines:</p>
<div class="highlight-python"><div class="highlight"><pre>variable X equal (xlo+xhi)/2+sqrt(v_area)
region 1 block $X 2 INF INF EDGE EDGE
variable X delete
</pre></div>
</div>
<p>can be replaced by</p>
<div class="highlight-python"><div class="highlight"><pre>region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE
</pre></div>
</div>
<p>so that you do not have to define (or discard) a temporary variable X.</p>
<p>Note that neither the curly-bracket or immediate form of variables can
contain nested $ characters for other variables to substitute for.
Thus you cannot do this:</p>
<div class="highlight-python"><div class="highlight"><pre>variable a equal 2
variable b2 equal 4
print &quot;B2 = ${b$a}&quot;
</pre></div>
</div>
<p>Nor can you specify this $($x-1.0) for an immediate variable, but
you could use $(v_x-1.0), since the latter is valid syntax for an
<a class="reference internal" href="variable.html"><em>equal-style variable</em></a>.</p>
<p>See the <a class="reference internal" href="variable.html"><em>variable</em></a> command for more details of how
strings are assigned to variables and evaluated, and how they can be
used in input script commands.</p>
<p>(4) The line is broken into &#8220;words&#8221; separated by whitespace (tabs,
spaces). Note that words can thus contain letters, digits,
underscores, or punctuation characters.</p>
<p>(5) The first word is the command name. All successive words in the
line are arguments.</p>
<p>(6) If you want text with spaces to be treated as a single argument,
it can be enclosed in either single or double or triple quotes. A
long single argument enclosed in single or double quotes can span
multiple lines if the &#8220;&amp;&#8221; character is used, as described above. When
the lines are concatenated together (and the &#8220;&amp;&#8221; characters and line
breaks removed), the text will become a single line. If you want
multiple lines of an argument to retain their line breaks, the text
can be enclosed in triple quotes, in which case &#8220;&amp;&#8221; characters are not
needed. For example:</p>
<div class="highlight-python"><div class="highlight"><pre>print &quot;Volume = $v&quot;
print &#39;Volume = $v&#39;
if &quot;${steps} &gt; 1000&quot; then quit
variable a string &quot;red green blue &amp;
purple orange cyan&quot;
print &quot;&quot;&quot;
System volume = $v
System temperature = $t
&quot;&quot;&quot;
</pre></div>
</div>
<p>In each case, the single, double, or triple quotes are removed when
the single argument they enclose is stored internally.</p>
<p>See the <a class="reference internal" href="dump_modify.html"><em>dump modify format</em></a>, <a class="reference internal" href="print.html"><em>print</em></a>,
<a class="reference internal" href="if.html"><em>if</em></a>, and <a class="reference internal" href="python.html"><em>python</em></a> commands for examples.</p>
<p>A &#8220;#&#8221; or &#8220;$&#8221; character that is between quotes will not be treated as a
comment indicator in (2) or substituted for as a variable in (3).</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If the argument is itself a command that requires a
quoted argument (e.g. using a <a class="reference internal" href="print.html"><em>print</em></a> command as part of an
<a class="reference internal" href="if.html"><em>if</em></a> or <a class="reference internal" href="run.html"><em>run every</em></a> command), then single, double, or
triple quotes can be nested in the usual manner. See the doc pages
for those commands for examples. Only one of level of nesting is
allowed, but that should be sufficient for most use cases.</p>
</div>
<hr class="docutils" />
</div>
<div class="section" id="input-script-structure">
<span id="cmd-3"></span><h2>3.3. Input script structure<a class="headerlink" href="#input-script-structure" title="Permalink to this headline">¶</a></h2>
<p>This section describes the structure of a typical LAMMPS input script.
The &#8220;examples&#8221; directory in the LAMMPS distribution contains many
sample input scripts; the corresponding problems are discussed in
<a class="reference internal" href="Section_example.html"><em>Section_example</em></a>, and animated on the <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a>.</p>
<p>A LAMMPS input script typically has 4 parts:</p>
<ol class="arabic simple">
<li>Initialization</li>
<li>Atom definition</li>
<li>Settings</li>
<li>Run a simulation</li>
</ol>
<p>The last 2 parts can be repeated as many times as desired. I.e. run a
simulation, change some settings, run some more, etc. Each of the 4
parts is now described in more detail. Remember that almost all the
commands need only be used if a non-default value is desired.</p>
<ol class="arabic simple">
<li>Initialization</li>
</ol>
<p>Set parameters that need to be defined before atoms are created or
read-in from a file.</p>
<p>The relevant commands are <a class="reference internal" href="units.html"><em>units</em></a>,
<a class="reference internal" href="dimension.html"><em>dimension</em></a>, <a class="reference internal" href="newton.html"><em>newton</em></a>,
<a class="reference internal" href="processors.html"><em>processors</em></a>, <a class="reference internal" href="boundary.html"><em>boundary</em></a>,
<a class="reference internal" href="atom_style.html"><em>atom_style</em></a>, <a class="reference internal" href="atom_modify.html"><em>atom_modify</em></a>.</p>
<p>If force-field parameters appear in the files that will be read, these
commands tell LAMMPS what kinds of force fields are being used:
<a class="reference internal" href="pair_style.html"><em>pair_style</em></a>, <a class="reference internal" href="bond_style.html"><em>bond_style</em></a>,
<a class="reference internal" href="angle_style.html"><em>angle_style</em></a>, <a class="reference internal" href="dihedral_style.html"><em>dihedral_style</em></a>,
<a class="reference internal" href="improper_style.html"><em>improper_style</em></a>.</p>
<ol class="arabic simple" start="2">
<li>Atom definition</li>
</ol>
<p>There are 3 ways to define atoms in LAMMPS. Read them in from a data
or restart file via the <a class="reference internal" href="read_data.html"><em>read_data</em></a> or
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> commands. These files can contain
molecular topology information. Or create atoms on a lattice (with no
molecular topology), using these commands: <a class="reference internal" href="lattice.html"><em>lattice</em></a>,
<a class="reference internal" href="region.html"><em>region</em></a>, <a class="reference internal" href="create_box.html"><em>create_box</em></a>,
<a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a>. The entire set of atoms can be
duplicated to make a larger simulation using the
<a class="reference internal" href="replicate.html"><em>replicate</em></a> command.</p>
<ol class="arabic simple" start="3">
<li>Settings</li>
</ol>
<p>Once atoms and molecular topology are defined, a variety of settings
can be specified: force field coefficients, simulation parameters,
output options, etc.</p>
<p>Force field coefficients are set by these commands (they can also be
set in the read-in files): <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a>,
<a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a>, <a class="reference internal" href="angle_coeff.html"><em>angle_coeff</em></a>,
<a class="reference internal" href="dihedral_coeff.html"><em>dihedral_coeff</em></a>,
<a class="reference internal" href="improper_coeff.html"><em>improper_coeff</em></a>,
<a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a>, <a class="reference internal" href="dielectric.html"><em>dielectric</em></a>,
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a>.</p>
<p>Various simulation parameters are set by these commands:
<a class="reference internal" href="neighbor.html"><em>neighbor</em></a>, <a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a>,
<a class="reference internal" href="group.html"><em>group</em></a>, <a class="reference internal" href="timestep.html"><em>timestep</em></a>,
<a class="reference internal" href="reset_timestep.html"><em>reset_timestep</em></a>, <a class="reference internal" href="run_style.html"><em>run_style</em></a>,
<a class="reference internal" href="min_style.html"><em>min_style</em></a>, <a class="reference internal" href="min_modify.html"><em>min_modify</em></a>.</p>
<p>Fixes impose a variety of boundary conditions, time integration, and
diagnostic options. The <a class="reference internal" href="fix.html"><em>fix</em></a> command comes in many flavors.</p>
<p>Various computations can be specified for execution during a
simulation using the <a class="reference internal" href="compute.html"><em>compute</em></a>,
<a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a>, and <a class="reference internal" href="variable.html"><em>variable</em></a>
commands.</p>
<p>Output options are set by the <a class="reference internal" href="thermo.html"><em>thermo</em></a>, <a class="reference internal" href="dump.html"><em>dump</em></a>,
and <a class="reference internal" href="restart.html"><em>restart</em></a> commands.</p>
<ol class="arabic simple" start="4">
<li>Run a simulation</li>
</ol>
<p>A molecular dynamics simulation is run using the <a class="reference internal" href="run.html"><em>run</em></a>
command. Energy minimization (molecular statics) is performed using
the <a class="reference internal" href="minimize.html"><em>minimize</em></a> command. A parallel tempering
(replica-exchange) simulation can be run using the
<a class="reference internal" href="temper.html"><em>temper</em></a> command.</p>
<hr class="docutils" />
</div>
<div class="section" id="commands-listed-by-category">
<span id="cmd-4"></span><h2>3.4. Commands listed by category<a class="headerlink" href="#commands-listed-by-category" title="Permalink to this headline">¶</a></h2>
<p>This section lists all LAMMPS commands, grouped by category. The
<a class="reference internal" href="#cmd-5"><span>next section</span></a> lists the same commands alphabetically. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command&#8217;s documentation.</p>
<p>Initialization:</p>
<p><a class="reference internal" href="atom_modify.html"><em>atom_modify</em></a>, <a class="reference internal" href="atom_style.html"><em>atom_style</em></a>,
<a class="reference internal" href="boundary.html"><em>boundary</em></a>, <a class="reference internal" href="dimension.html"><em>dimension</em></a>,
<a class="reference internal" href="newton.html"><em>newton</em></a>, <a class="reference internal" href="processors.html"><em>processors</em></a>, <a class="reference internal" href="units.html"><em>units</em></a></p>
<p>Atom definition:</p>
<p><a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a>, <a class="reference internal" href="create_box.html"><em>create_box</em></a>,
<a class="reference internal" href="lattice.html"><em>lattice</em></a>, <a class="reference internal" href="read_data.html"><em>read_data</em></a>,
<a class="reference internal" href="read_dump.html"><em>read_dump</em></a>, <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>,
<a class="reference internal" href="region.html"><em>region</em></a>, <a class="reference internal" href="replicate.html"><em>replicate</em></a></p>
<p>Force fields:</p>
<p><a class="reference internal" href="angle_coeff.html"><em>angle_coeff</em></a>, <a class="reference internal" href="angle_style.html"><em>angle_style</em></a>,
<a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a>, <a class="reference internal" href="bond_style.html"><em>bond_style</em></a>,
<a class="reference internal" href="dielectric.html"><em>dielectric</em></a>, <a class="reference internal" href="dihedral_coeff.html"><em>dihedral_coeff</em></a>,
<a class="reference internal" href="dihedral_style.html"><em>dihedral_style</em></a>,
<a class="reference internal" href="improper_coeff.html"><em>improper_coeff</em></a>,
<a class="reference internal" href="improper_style.html"><em>improper_style</em></a>,
<a class="reference internal" href="kspace_modify.html"><em>kspace_modify</em></a>, <a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a>,
<a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a>, <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a>,
<a class="reference internal" href="pair_style.html"><em>pair_style</em></a>, <a class="reference internal" href="pair_write.html"><em>pair_write</em></a>,
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a></p>
<p>Settings:</p>
<p><a class="reference internal" href="comm_style.html"><em>comm_style</em></a>, <a class="reference internal" href="group.html"><em>group</em></a>, <a class="reference internal" href="mass.html"><em>mass</em></a>,
<a class="reference internal" href="min_modify.html"><em>min_modify</em></a>, <a class="reference internal" href="min_style.html"><em>min_style</em></a>,
<a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a>, <a class="reference internal" href="neighbor.html"><em>neighbor</em></a>,
<a class="reference internal" href="reset_timestep.html"><em>reset_timestep</em></a>, <a class="reference internal" href="run_style.html"><em>run_style</em></a>,
<a class="reference internal" href="set.html"><em>set</em></a>, <a class="reference internal" href="timestep.html"><em>timestep</em></a>, <a class="reference internal" href="velocity.html"><em>velocity</em></a></p>
<p>Fixes:</p>
<p><a class="reference internal" href="fix.html"><em>fix</em></a>, <a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a>, <a class="reference internal" href="unfix.html"><em>unfix</em></a></p>
<p>Computes:</p>
<p><a class="reference internal" href="compute.html"><em>compute</em></a>, <a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a>,
<a class="reference internal" href="uncompute.html"><em>uncompute</em></a></p>
<p>Output:</p>
<p><a class="reference internal" href="dump.html"><em>dump</em></a>, <a class="reference internal" href="dump_image.html"><em>dump image</em></a>,
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a>, <a class="reference internal" href="dump_image.html"><em>dump movie</em></a>,
<a class="reference internal" href="restart.html"><em>restart</em></a>, <a class="reference internal" href="thermo.html"><em>thermo</em></a>,
<a class="reference internal" href="thermo_modify.html"><em>thermo_modify</em></a>, <a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a>,
<a class="reference internal" href="undump.html"><em>undump</em></a>, <a class="reference internal" href="write_data.html"><em>write_data</em></a>,
<a class="reference internal" href="write_dump.html"><em>write_dump</em></a>, <a class="reference internal" href="write_restart.html"><em>write_restart</em></a></p>
<p>Actions:</p>
<p><a class="reference internal" href="delete_atoms.html"><em>delete_atoms</em></a>, <a class="reference internal" href="delete_bonds.html"><em>delete_bonds</em></a>,
<a class="reference internal" href="displace_atoms.html"><em>displace_atoms</em></a>, <a class="reference internal" href="change_box.html"><em>change_box</em></a>,
<a class="reference internal" href="minimize.html"><em>minimize</em></a>, <a class="reference internal" href="neb.html"><em>neb</em></a> <a class="reference internal" href="prd.html"><em>prd</em></a>,
<a class="reference internal" href="rerun.html"><em>rerun</em></a>, <a class="reference internal" href="run.html"><em>run</em></a>, <a class="reference internal" href="temper.html"><em>temper</em></a></p>
<p>Miscellaneous:</p>
<p><a class="reference internal" href="clear.html"><em>clear</em></a>, <a class="reference internal" href="echo.html"><em>echo</em></a>, <a class="reference internal" href="if.html"><em>if</em></a>,
<a class="reference internal" href="include.html"><em>include</em></a>, <a class="reference internal" href="jump.html"><em>jump</em></a>, <a class="reference internal" href="label.html"><em>label</em></a>,
<a class="reference internal" href="log.html"><em>log</em></a>, <a class="reference internal" href="next.html"><em>next</em></a>, <a class="reference internal" href="print.html"><em>print</em></a>,
<a class="reference internal" href="shell.html"><em>shell</em></a>, <a class="reference internal" href="variable.html"><em>variable</em></a></p>
<hr class="docutils" />
</div>
<div class="section" id="individual-commands">
<span id="comm"></span><span id="cmd-5"></span><h2>3.5. Individual commands<a class="headerlink" href="#individual-commands" title="Permalink to this headline">¶</a></h2>
<p>This section lists all LAMMPS commands alphabetically, with a separate
listing below of styles within certain commands. The <a class="reference internal" href="#cmd-4"><span>previous section</span></a> lists the same commands, grouped by category. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command&#8217;s documentation.</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="15%" />
<col width="17%" />
<col width="17%" />
<col width="17%" />
<col width="17%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="angle_coeff.html"><em>angle_coeff</em></a></td>
<td><a class="reference internal" href="angle_style.html"><em>angle_style</em></a></td>
<td><a class="reference internal" href="atom_modify.html"><em>atom_modify</em></a></td>
<td><a class="reference internal" href="atom_style.html"><em>atom_style</em></a></td>
<td><a class="reference internal" href="balance.html"><em>balance</em></a></td>
<td><a class="reference internal" href="bond_coeff.html"><em>bond_coeff</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="bond_style.html"><em>bond_style</em></a></td>
<td><a class="reference internal" href="boundary.html"><em>boundary</em></a></td>
<td><a class="reference internal" href="box.html"><em>box</em></a></td>
<td><a class="reference internal" href="change_box.html"><em>change_box</em></a></td>
<td><a class="reference internal" href="clear.html"><em>clear</em></a></td>
<td><a class="reference internal" href="comm_modify.html"><em>comm_modify</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="comm_style.html"><em>comm_style</em></a></td>
<td><a class="reference internal" href="compute.html"><em>compute</em></a></td>
<td><a class="reference internal" href="compute_modify.html"><em>compute_modify</em></a></td>
<td><a class="reference internal" href="create_atoms.html"><em>create_atoms</em></a></td>
<td><a class="reference internal" href="create_bonds.html"><em>create_bonds</em></a></td>
<td><a class="reference internal" href="create_box.html"><em>create_box</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="delete_atoms.html"><em>delete_atoms</em></a></td>
<td><a class="reference internal" href="delete_bonds.html"><em>delete_bonds</em></a></td>
<td><a class="reference internal" href="dielectric.html"><em>dielectric</em></a></td>
<td><a class="reference internal" href="dihedral_coeff.html"><em>dihedral_coeff</em></a></td>
<td><a class="reference internal" href="dihedral_style.html"><em>dihedral_style</em></a></td>
<td><a class="reference internal" href="dimension.html"><em>dimension</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="displace_atoms.html"><em>displace_atoms</em></a></td>
<td><a class="reference internal" href="dump.html"><em>dump</em></a></td>
<td><a class="reference internal" href="dump_image.html"><em>dump image</em></a></td>
<td><a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a></td>
<td><a class="reference internal" href="dump_image.html"><em>dump movie</em></a></td>
<td><a class="reference internal" href="echo.html"><em>echo</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix.html"><em>fix</em></a></td>
<td><a class="reference internal" href="fix_modify.html"><em>fix_modify</em></a></td>
<td><a class="reference internal" href="group.html"><em>group</em></a></td>
<td><a class="reference internal" href="if.html"><em>if</em></a></td>
<td><a class="reference internal" href="info.html"><em>info</em></a></td>
<td><a class="reference internal" href="improper_coeff.html"><em>improper_coeff</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="improper_style.html"><em>improper_style</em></a></td>
<td><a class="reference internal" href="include.html"><em>include</em></a></td>
<td><a class="reference internal" href="jump.html"><em>jump</em></a></td>
<td><a class="reference internal" href="kspace_modify.html"><em>kspace_modify</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a></td>
<td><a class="reference internal" href="label.html"><em>label</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="lattice.html"><em>lattice</em></a></td>
<td><a class="reference internal" href="log.html"><em>log</em></a></td>
<td><a class="reference internal" href="mass.html"><em>mass</em></a></td>
<td><a class="reference internal" href="minimize.html"><em>minimize</em></a></td>
<td><a class="reference internal" href="min_modify.html"><em>min_modify</em></a></td>
<td><a class="reference internal" href="min_style.html"><em>min_style</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="molecule.html"><em>molecule</em></a></td>
<td><a class="reference internal" href="neb.html"><em>neb</em></a></td>
<td><a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a></td>
<td><a class="reference internal" href="neighbor.html"><em>neighbor</em></a></td>
<td><a class="reference internal" href="newton.html"><em>newton</em></a></td>
<td><a class="reference internal" href="next.html"><em>next</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="package.html"><em>package</em></a></td>
<td><a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a></td>
<td><a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a></td>
<td><a class="reference internal" href="pair_style.html"><em>pair_style</em></a></td>
<td><a class="reference internal" href="pair_write.html"><em>pair_write</em></a></td>
<td><a class="reference internal" href="partition.html"><em>partition</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="prd.html"><em>prd</em></a></td>
<td><a class="reference internal" href="print.html"><em>print</em></a></td>
<td><a class="reference internal" href="processors.html"><em>processors</em></a></td>
<td><a class="reference internal" href="python.html"><em>python</em></a></td>
<td><a class="reference internal" href="quit.html"><em>quit</em></a></td>
<td><a class="reference internal" href="read_data.html"><em>read_data</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="read_dump.html"><em>read_dump</em></a></td>
<td><a class="reference internal" href="read_restart.html"><em>read_restart</em></a></td>
<td><a class="reference internal" href="region.html"><em>region</em></a></td>
<td><a class="reference internal" href="replicate.html"><em>replicate</em></a></td>
<td><a class="reference internal" href="rerun.html"><em>rerun</em></a></td>
<td><a class="reference internal" href="reset_timestep.html"><em>reset_timestep</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="restart.html"><em>restart</em></a></td>
<td><a class="reference internal" href="run.html"><em>run</em></a></td>
<td><a class="reference internal" href="run_style.html"><em>run_style</em></a></td>
<td><a class="reference internal" href="set.html"><em>set</em></a></td>
<td><a class="reference internal" href="shell.html"><em>shell</em></a></td>
<td><a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="suffix.html"><em>suffix</em></a></td>
<td><a class="reference internal" href="tad.html"><em>tad</em></a></td>
<td><a class="reference internal" href="temper.html"><em>temper</em></a></td>
<td><a class="reference internal" href="thermo.html"><em>thermo</em></a></td>
<td><a class="reference internal" href="thermo_modify.html"><em>thermo_modify</em></a></td>
<td><a class="reference internal" href="thermo_style.html"><em>thermo_style</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="timestep.html"><em>timestep</em></a></td>
<td><a class="reference internal" href="uncompute.html"><em>uncompute</em></a></td>
<td><a class="reference internal" href="undump.html"><em>undump</em></a></td>
<td><a class="reference internal" href="unfix.html"><em>unfix</em></a></td>
<td><a class="reference internal" href="units.html"><em>units</em></a></td>
<td><a class="reference internal" href="variable.html"><em>variable</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="velocity.html"><em>velocity</em></a></td>
<td><a class="reference internal" href="write_data.html"><em>write_data</em></a></td>
<td><a class="reference internal" href="write_dump.html"><em>write_dump</em></a></td>
<td><a class="reference internal" href="write_restart.html"><em>write_restart</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>These are additional commands in USER packages, which can be used if
<a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="100%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="group2ndx.html"><em>group2ndx</em></a></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="fix-styles">
<h2>3.6. Fix styles<a class="headerlink" href="#fix-styles" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="fix.html"><em>fix</em></a> command for one-line descriptions of each style
or click on the style itself for a full description. Some of the
styles have accelerated versions, which can be used if LAMMPS is built
with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>.
This is indicated by additional letters in parenthesis: c = USER-CUDA,
g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="11%" />
<col width="12%" />
<col width="13%" />
<col width="10%" />
<col width="11%" />
<col width="15%" />
<col width="12%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="fix_adapt.html"><em>adapt</em></a></td>
<td><a class="reference internal" href="fix_addforce.html"><em>addforce (c)</em></a></td>
<td><a class="reference internal" href="fix_append_atoms.html"><em>append/atoms</em></a></td>
<td><a class="reference internal" href="fix_atom_swap.html"><em>atom/swap</em></a></td>
<td><a class="reference internal" href="fix_aveforce.html"><em>aveforce (c)</em></a></td>
<td><a class="reference internal" href="fix_ave_atom.html"><em>ave/atom</em></a></td>
<td><a class="reference internal" href="fix_ave_chunk.html"><em>ave/chunk</em></a></td>
<td><a class="reference internal" href="fix_ave_correlate.html"><em>ave/correlate</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_ave_histo.html"><em>ave/histo</em></a></td>
<td><a class="reference internal" href="fix_ave_histo.html"><em>ave/histo/weight</em></a></td>
<td><a class="reference internal" href="fix_ave_spatial.html"><em>ave/spatial</em></a></td>
<td><a class="reference internal" href="fix_ave_time.html"><em>ave/time</em></a></td>
<td><a class="reference internal" href="fix_balance.html"><em>balance</em></a></td>
<td><a class="reference internal" href="fix_bond_break.html"><em>bond/break</em></a></td>
<td><a class="reference internal" href="fix_bond_create.html"><em>bond/create</em></a></td>
<td><a class="reference internal" href="fix_bond_swap.html"><em>bond/swap</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_box_relax.html"><em>box/relax</em></a></td>
<td><a class="reference internal" href="fix_deform.html"><em>deform</em></a></td>
<td><a class="reference internal" href="fix_deposit.html"><em>deposit</em></a></td>
<td><a class="reference internal" href="fix_drag.html"><em>drag</em></a></td>
<td><a class="reference internal" href="fix_dt_reset.html"><em>dt/reset</em></a></td>
<td><a class="reference internal" href="fix_efield.html"><em>efield</em></a></td>
<td><a class="reference internal" href="fix_enforce2d.html"><em>enforce2d (c)</em></a></td>
<td><a class="reference internal" href="fix_evaporate.html"><em>evaporate</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_external.html"><em>external</em></a></td>
<td><a class="reference internal" href="fix_freeze.html"><em>freeze (c)</em></a></td>
<td><a class="reference internal" href="fix_gcmc.html"><em>gcmc</em></a></td>
<td><a class="reference internal" href="fix_gld.html"><em>gld</em></a></td>
<td><a class="reference internal" href="fix_gravity.html"><em>gravity (co)</em></a></td>
<td><a class="reference internal" href="fix_heat.html"><em>heat</em></a></td>
<td><a class="reference internal" href="fix_indent.html"><em>indent</em></a></td>
<td><a class="reference internal" href="fix_langevin.html"><em>langevin (k)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_lineforce.html"><em>lineforce</em></a></td>
<td><a class="reference internal" href="fix_momentum.html"><em>momentum</em></a></td>
<td><a class="reference internal" href="fix_move.html"><em>move</em></a></td>
<td><a class="reference internal" href="fix_msst.html"><em>msst</em></a></td>
<td><a class="reference internal" href="fix_neb.html"><em>neb</em></a></td>
<td><a class="reference internal" href="fix_nh.html"><em>nph (o)</em></a></td>
<td><a class="reference internal" href="fix_nphug.html"><em>nphug (o)</em></a></td>
<td><a class="reference internal" href="fix_nph_asphere.html"><em>nph/asphere (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_nph_sphere.html"><em>nph/sphere (o)</em></a></td>
<td><a class="reference internal" href="fix_nh.html"><em>npt (co)</em></a></td>
<td><a class="reference internal" href="fix_npt_asphere.html"><em>npt/asphere (o)</em></a></td>
<td><a class="reference internal" href="fix_npt_sphere.html"><em>npt/sphere (o)</em></a></td>
<td><a class="reference internal" href="fix_nve.html"><em>nve (cko)</em></a></td>
<td><a class="reference internal" href="fix_nve_asphere.html"><em>nve/asphere</em></a></td>
<td><a class="reference internal" href="fix_nve_asphere_noforce.html"><em>nve/asphere/noforce</em></a></td>
<td><a class="reference internal" href="fix_nve_body.html"><em>nve/body</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_nve_limit.html"><em>nve/limit</em></a></td>
<td><a class="reference internal" href="fix_nve_line.html"><em>nve/line</em></a></td>
<td><a class="reference internal" href="fix_nve_noforce.html"><em>nve/noforce</em></a></td>
<td><a class="reference internal" href="fix_nve_sphere.html"><em>nve/sphere (o)</em></a></td>
<td><a class="reference internal" href="fix_nve_tri.html"><em>nve/tri</em></a></td>
<td><a class="reference internal" href="fix_nh.html"><em>nvt (co)</em></a></td>
<td><a class="reference internal" href="fix_nvt_asphere.html"><em>nvt/asphere (o)</em></a></td>
<td><a class="reference internal" href="fix_nvt_sllod.html"><em>nvt/sllod (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_nvt_sphere.html"><em>nvt/sphere (o)</em></a></td>
<td><a class="reference internal" href="fix_oneway.html"><em>oneway</em></a></td>
<td><a class="reference internal" href="fix_orient_fcc.html"><em>orient/fcc</em></a></td>
<td><a class="reference internal" href="fix_planeforce.html"><em>planeforce</em></a></td>
<td><a class="reference internal" href="fix_poems.html"><em>poems</em></a></td>
<td><a class="reference internal" href="fix_pour.html"><em>pour</em></a></td>
<td><a class="reference internal" href="fix_press_berendsen.html"><em>press/berendsen</em></a></td>
<td><a class="reference internal" href="fix_print.html"><em>print</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_property_atom.html"><em>property/atom</em></a></td>
<td><a class="reference internal" href="fix_qeq_comb.html"><em>qeq/comb (o)</em></a></td>
<td><a class="reference internal" href="fix_qeq.html"><em>qeq/dynamic</em></a></td>
<td><a class="reference internal" href="fix_qeq.html"><em>qeq/point</em></a></td>
<td><a class="reference internal" href="fix_qeq.html"><em>qeq/shielded</em></a></td>
<td><a class="reference internal" href="fix_qeq.html"><em>qeq/slater</em></a></td>
<td><a class="reference internal" href="fix_reax_bonds.html"><em>reax/bonds</em></a></td>
<td><a class="reference internal" href="fix_recenter.html"><em>recenter</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_restrain.html"><em>restrain</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/nph (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/npt (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/nve (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/nvt (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/small (o)</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/small/nph</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_rigid.html"><em>rigid/small/npt</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/small/nve</em></a></td>
<td><a class="reference internal" href="fix_rigid.html"><em>rigid/small/nvt</em></a></td>
<td><a class="reference internal" href="fix_setforce.html"><em>setforce (c)</em></a></td>
<td><a class="reference internal" href="fix_shake.html"><em>shake (c)</em></a></td>
<td><a class="reference internal" href="fix_spring.html"><em>spring</em></a></td>
<td><a class="reference internal" href="fix_spring_rg.html"><em>spring/rg</em></a></td>
<td><a class="reference internal" href="fix_spring_self.html"><em>spring/self</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_srd.html"><em>srd</em></a></td>
<td><a class="reference internal" href="fix_store_force.html"><em>store/force</em></a></td>
<td><a class="reference internal" href="fix_store_state.html"><em>store/state</em></a></td>
<td><a class="reference internal" href="fix_temp_berendsen.html"><em>temp/berendsen (c)</em></a></td>
<td><a class="reference internal" href="fix_temp_csvr.html"><em>temp/csld</em></a></td>
<td><a class="reference internal" href="fix_temp_csvr.html"><em>temp/csvr</em></a></td>
<td><a class="reference internal" href="fix_temp_rescale.html"><em>temp/rescale (c)</em></a></td>
<td><a class="reference internal" href="fix_tfmc.html"><em>tfmc</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_thermal_conductivity.html"><em>thermal/conductivity</em></a></td>
<td><a class="reference internal" href="fix_tmd.html"><em>tmd</em></a></td>
<td><a class="reference internal" href="fix_ttm.html"><em>ttm</em></a></td>
<td><a class="reference internal" href="fix_tune_kspace.html"><em>tune/kspace</em></a></td>
<td><a class="reference internal" href="fix_vector.html"><em>vector</em></a></td>
<td><a class="reference internal" href="fix_viscosity.html"><em>viscosity</em></a></td>
<td><a class="reference internal" href="fix_viscous.html"><em>viscous (c)</em></a></td>
<td><a class="reference internal" href="fix_wall.html"><em>wall/colloid</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_wall_gran.html"><em>wall/gran</em></a></td>
<td><a class="reference internal" href="fix_wall.html"><em>wall/harmonic</em></a></td>
<td><a class="reference internal" href="fix_wall.html"><em>wall/lj1043</em></a></td>
<td><a class="reference internal" href="fix_wall.html"><em>wall/lj126</em></a></td>
<td><a class="reference internal" href="fix_wall.html"><em>wall/lj93</em></a></td>
<td><a class="reference internal" href="fix_wall_piston.html"><em>wall/piston</em></a></td>
<td><a class="reference internal" href="fix_wall_reflect.html"><em>wall/reflect</em></a></td>
<td><a class="reference internal" href="fix_wall_region.html"><em>wall/region</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_wall_srd.html"><em>wall/srd</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>These are additional fix styles in USER packages, which can be used if
<a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="15%" />
<col width="20%" />
<col width="14%" />
<col width="22%" />
<col width="14%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="fix_adapt_fep.html"><em>adapt/fep</em></a></td>
<td><a class="reference internal" href="fix_addtorque.html"><em>addtorque</em></a></td>
<td><a class="reference internal" href="fix_atc.html"><em>atc</em></a></td>
<td><a class="reference internal" href="fix_ave_spatial_sphere.html"><em>ave/spatial/sphere</em></a></td>
<td><a class="reference internal" href="fix_drude.html"><em>drude</em></a></td>
<td><a class="reference internal" href="fix_drude_transform.html"><em>drude/transform/direct</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_drude_transform.html"><em>drude/transform/reverse</em></a></td>
<td><a class="reference internal" href="fix_colvars.html"><em>colvars</em></a></td>
<td><a class="reference internal" href="fix_gle.html"><em>gle</em></a></td>
<td><a class="reference internal" href="fix_imd.html"><em>imd</em></a></td>
<td><a class="reference internal" href="fix_ipi.html"><em>ipi</em></a></td>
<td><a class="reference internal" href="fix_langevin_drude.html"><em>langevin/drude</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_langevin_eff.html"><em>langevin/eff</em></a></td>
<td><a class="reference internal" href="fix_lb_fluid.html"><em>lb/fluid</em></a></td>
<td><a class="reference internal" href="fix_lb_momentum.html"><em>lb/momentum</em></a></td>
<td><a class="reference internal" href="fix_lb_pc.html"><em>lb/pc</em></a></td>
<td><a class="reference internal" href="fix_lb_rigid_pc_sphere.html"><em>lb/rigid/pc/sphere</em></a></td>
<td><a class="reference internal" href="fix_lb_viscous.html"><em>lb/viscous</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_meso.html"><em>meso</em></a></td>
<td><a class="reference internal" href="fix_meso_stationary.html"><em>meso/stationary</em></a></td>
<td><a class="reference internal" href="fix_nh_eff.html"><em>nph/eff</em></a></td>
<td><a class="reference internal" href="fix_nh_eff.html"><em>npt/eff</em></a></td>
<td><a class="reference internal" href="fix_nve_eff.html"><em>nve/eff</em></a></td>
<td><a class="reference internal" href="fix_nh_eff.html"><em>nvt/eff</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_nvt_sllod_eff.html"><em>nvt/sllod/eff</em></a></td>
<td><a class="reference internal" href="fix_phonon.html"><em>phonon</em></a></td>
<td><a class="reference internal" href="fix_pimd.html"><em>pimd</em></a></td>
<td><a class="reference internal" href="fix_qbmsst.html"><em>qbmsst</em></a></td>
<td><a class="reference internal" href="fix_qeq_reax.html"><em>qeq/reax</em></a></td>
<td><a class="reference internal" href="fix_qmmm.html"><em>qmmm</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_qtb.html"><em>qtb</em></a></td>
<td><a class="reference internal" href="fix_reax_bonds.html"><em>reax/c/bonds</em></a></td>
<td><a class="reference internal" href="fix_reaxc_species.html"><em>reax/c/species</em></a></td>
<td><a class="reference internal" href="fix_saed_vtk.html"><em>saed/vtk</em></a></td>
<td><a class="reference internal" href="fix_smd.html"><em>smd</em></a></td>
<td><a class="reference internal" href="fix_smd_adjust_dt.html"><em>smd/adjust/dt</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="fix_smd_integrate_tlsph.html"><em>smd/integrate/tlsph</em></a></td>
<td><a class="reference internal" href="fix_smd_integrate_ulsph.html"><em>smd/integrate/ulsph</em></a></td>
<td><a class="reference internal" href="fix_smd_move_triangulated_surface.html"><em>smd/move/triangulated/surface</em></a></td>
<td><a class="reference internal" href="fix_smd_setvel.html"><em>smd/setvel</em></a></td>
<td><a class="reference internal" href="fix_smd_tlsph_reference_configuration.html"><em>smd/tlsph/reference/configuration</em></a></td>
<td><a class="reference internal" href="fix_smd_wall_surface.html"><em>smd/wall/surface</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="fix_temp_rescale_eff.html"><em>temp/rescale/eff</em></a></td>
<td><a class="reference internal" href="fix_ti_rs.html"><em>ti/rs</em></a></td>
<td><a class="reference internal" href="fix_ti_spring.html"><em>ti/spring</em></a></td>
<td><a class="reference internal" href="fix_ttm.html"><em>ttm/mod</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="compute-styles">
<h2>3.7. Compute styles<a class="headerlink" href="#compute-styles" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="compute.html"><em>compute</em></a> command for one-line descriptions of
each style or click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="19%" />
<col width="17%" />
<col width="15%" />
<col width="17%" />
<col width="16%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="compute_angle_local.html"><em>angle/local</em></a></td>
<td><a class="reference internal" href="compute_angmom_chunk.html"><em>angmom/chunk</em></a></td>
<td><a class="reference internal" href="compute_body_local.html"><em>body/local</em></a></td>
<td><a class="reference internal" href="compute_bond_local.html"><em>bond/local</em></a></td>
<td><a class="reference internal" href="compute_centro_atom.html"><em>centro/atom</em></a></td>
<td><a class="reference internal" href="compute_chunk_atom.html"><em>chunk/atom</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_cluster_atom.html"><em>cluster/atom</em></a></td>
<td><a class="reference internal" href="compute_cna_atom.html"><em>cna/atom</em></a></td>
<td><a class="reference internal" href="compute_com.html"><em>com</em></a></td>
<td><a class="reference internal" href="compute_com_chunk.html"><em>com/chunk</em></a></td>
<td><a class="reference internal" href="compute_contact_atom.html"><em>contact/atom</em></a></td>
<td><a class="reference internal" href="compute_coord_atom.html"><em>coord/atom</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_damage_atom.html"><em>damage/atom</em></a></td>
<td><a class="reference internal" href="compute_dihedral_local.html"><em>dihedral/local</em></a></td>
<td><a class="reference internal" href="compute_dilatation_atom.html"><em>dilatation/atom</em></a></td>
<td><a class="reference internal" href="compute_displace_atom.html"><em>displace/atom</em></a></td>
<td><a class="reference internal" href="compute_erotate_asphere.html"><em>erotate/asphere</em></a></td>
<td><a class="reference internal" href="compute_erotate_rigid.html"><em>erotate/rigid</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_erotate_sphere.html"><em>erotate/sphere</em></a></td>
<td><a class="reference internal" href="compute_erotate_sphere_atom.html"><em>erotate/sphere/atom</em></a></td>
<td><a class="reference internal" href="compute_event_displace.html"><em>event/displace</em></a></td>
<td><a class="reference internal" href="compute_group_group.html"><em>group/group</em></a></td>
<td><a class="reference internal" href="compute_gyration.html"><em>gyration</em></a></td>
<td><a class="reference internal" href="compute_gyration_chunk.html"><em>gyration/chunk</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_heat_flux.html"><em>heat/flux</em></a></td>
<td><a class="reference internal" href="compute_improper_local.html"><em>improper/local</em></a></td>
<td><a class="reference internal" href="compute_inertia_chunk.html"><em>inertia/chunk</em></a></td>
<td><a class="reference internal" href="compute_ke.html"><em>ke</em></a></td>
<td><a class="reference internal" href="compute_ke_atom.html"><em>ke/atom</em></a></td>
<td><a class="reference internal" href="compute_ke_rigid.html"><em>ke/rigid</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_msd.html"><em>msd</em></a></td>
<td><a class="reference internal" href="compute_msd_chunk.html"><em>msd/chunk</em></a></td>
<td><a class="reference internal" href="compute_msd_nongauss.html"><em>msd/nongauss</em></a></td>
<td><a class="reference internal" href="compute_omega_chunk.html"><em>omega/chunk</em></a></td>
<td><a class="reference internal" href="compute_pair.html"><em>pair</em></a></td>
<td><a class="reference internal" href="compute_pair_local.html"><em>pair/local</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_pe.html"><em>pe (c)</em></a></td>
<td><a class="reference internal" href="compute_pe_atom.html"><em>pe/atom</em></a></td>
<td><a class="reference internal" href="compute_plasticity_atom.html"><em>plasticity/atom</em></a></td>
<td><a class="reference internal" href="compute_pressure.html"><em>pressure (c)</em></a></td>
<td><a class="reference internal" href="compute_property_atom.html"><em>property/atom</em></a></td>
<td><a class="reference internal" href="compute_property_local.html"><em>property/local</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_property_chunk.html"><em>property/chunk</em></a></td>
<td><a class="reference internal" href="compute_rdf.html"><em>rdf</em></a></td>
<td><a class="reference internal" href="compute_reduce.html"><em>reduce</em></a></td>
<td><a class="reference internal" href="compute_reduce.html"><em>reduce/region</em></a></td>
<td><a class="reference internal" href="compute_slice.html"><em>slice</em></a></td>
<td><a class="reference internal" href="compute_sna_atom.html"><em>sna/atom</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_sna_atom.html"><em>snad/atom</em></a></td>
<td><a class="reference internal" href="compute_sna_atom.html"><em>snav/atom</em></a></td>
<td><a class="reference internal" href="compute_stress_atom.html"><em>stress/atom</em></a></td>
<td><a class="reference internal" href="compute_temp.html"><em>temp (c)</em></a></td>
<td><a class="reference internal" href="compute_temp_asphere.html"><em>temp/asphere</em></a></td>
<td><a class="reference internal" href="compute_temp_com.html"><em>temp/com</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_temp_chunk.html"><em>temp/chunk</em></a></td>
<td><a class="reference internal" href="compute_temp_deform.html"><em>temp/deform</em></a></td>
<td><a class="reference internal" href="compute_temp_partial.html"><em>temp/partial (c)</em></a></td>
<td><a class="reference internal" href="compute_temp_profile.html"><em>temp/profile</em></a></td>
<td><a class="reference internal" href="compute_temp_ramp.html"><em>temp/ramp</em></a></td>
<td><a class="reference internal" href="compute_temp_region.html"><em>temp/region</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_temp_sphere.html"><em>temp/sphere</em></a></td>
<td><a class="reference internal" href="compute_ti.html"><em>ti</em></a></td>
<td><a class="reference internal" href="compute_torque_chunk.html"><em>torque/chunk</em></a></td>
<td><a class="reference internal" href="compute_vacf.html"><em>vacf</em></a></td>
<td><a class="reference internal" href="compute_vcm_chunk.html"><em>vcm/chunk</em></a></td>
<td><a class="reference internal" href="compute_voronoi_atom.html"><em>voronoi/atom</em></a></td>
</tr>
</tbody>
</table>
<p>These are additional compute styles in USER packages, which can be
used if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="15%" />
<col width="18%" />
<col width="17%" />
<col width="15%" />
<col width="19%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="compute_ackland_atom.html"><em>ackland/atom</em></a></td>
<td><a class="reference internal" href="compute_basal_atom.html"><em>basal/atom</em></a></td>
<td><a class="reference internal" href="compute_fep.html"><em>fep</em></a></td>
<td><a class="reference internal" href="compute_ke_eff.html"><em>ke/eff</em></a></td>
<td><a class="reference internal" href="compute_ke_atom_eff.html"><em>ke/atom/eff</em></a></td>
<td><a class="reference internal" href="compute_meso_e_atom.html"><em>meso_e/atom</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_meso_rho_atom.html"><em>meso_rho/atom</em></a></td>
<td><a class="reference internal" href="compute_meso_t_atom.html"><em>meso_t/atom</em></a></td>
<td><a class="reference internal" href="compute_saed.html"><em>saed</em></a></td>
<td><a class="reference internal" href="compute_smd_contact_radius.html"><em>smd/contact/radius</em></a></td>
<td><a class="reference internal" href="compute_smd_damage.html"><em>smd/damage</em></a></td>
<td><a class="reference internal" href="compute_smd_hourglass_error.html"><em>smd/hourglass/error</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_smd_internal_energy.html"><em>smd/internal/energy</em></a></td>
<td><a class="reference internal" href="compute_smd_plastic_strain.html"><em>smd/plastic/strain</em></a></td>
<td><a class="reference internal" href="compute_smd_plastic_strain_rate.html"><em>smd/plastic/strain/rate</em></a></td>
<td><a class="reference internal" href="compute_smd_rho.html"><em>smd/rho</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_defgrad.html"><em>smd/tlsph/defgrad</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_dt.html"><em>smd/tlsph/dt</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_smd_tlsph_num_neighs.html"><em>smd/tlsph/num/neighs</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_shape.html"><em>smd/tlsph/shape</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_strain.html"><em>smd/tlsph/strain</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_strain_rate.html"><em>smd/tlsph/strain/rate</em></a></td>
<td><a class="reference internal" href="compute_smd_tlsph_stress.html"><em>smd/tlsph/stress</em></a></td>
<td><a class="reference internal" href="compute_smd_triangle_mesh_vertices.html"><em>smd/triangle/mesh/vertices</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="compute_smd_ulsph_num_neighs.html"><em>smd/ulsph/num/neighs</em></a></td>
<td><a class="reference internal" href="compute_smd_ulsph_strain.html"><em>smd/ulsph/strain</em></a></td>
<td><code class="xref doc docutils literal"><span class="pre">smd/ulsph/strain/rate</span></code></td>
<td><code class="xref doc docutils literal"><span class="pre">smd/ulpsh/stress</span></code></td>
<td><a class="reference internal" href="compute_smd_vol.html"><em>smd/vol</em></a></td>
<td><a class="reference internal" href="compute_temp_drude.html"><em>temp/drude</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="compute_temp_eff.html"><em>temp/eff</em></a></td>
<td><a class="reference internal" href="compute_temp_deform_eff.html"><em>temp/deform/eff</em></a></td>
<td><a class="reference internal" href="compute_temp_region_eff.html"><em>temp/region/eff</em></a></td>
<td><a class="reference internal" href="compute_temp_rotate.html"><em>temp/rotate</em></a></td>
<td><a class="reference internal" href="compute_xrd.html"><em>xrd</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="pair-style-potentials">
<h2>3.8. Pair_style potentials<a class="headerlink" href="#pair-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="pair_style.html"><em>pair_style</em></a> command for an overview of pair
potentials. Click on the style itself for a full description. Many
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="25%" />
<col width="27%" />
<col width="23%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="pair_none.html"><em>none</em></a></td>
<td><a class="reference internal" href="pair_hybrid.html"><em>hybrid</em></a></td>
<td><a class="reference internal" href="pair_hybrid.html"><em>hybrid/overlay</em></a></td>
<td><a class="reference internal" href="pair_adp.html"><em>adp (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_airebo.html"><em>airebo (o)</em></a></td>
<td><a class="reference internal" href="pair_beck.html"><em>beck (go)</em></a></td>
<td><a class="reference internal" href="pair_body.html"><em>body</em></a></td>
<td><a class="reference internal" href="pair_bop.html"><em>bop</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_born.html"><em>born (go)</em></a></td>
<td><a class="reference internal" href="pair_born.html"><em>born/coul/long (cgo)</em></a></td>
<td><a class="reference internal" href="pair_born.html"><em>born/coul/long/cs</em></a></td>
<td><a class="reference internal" href="pair_born.html"><em>born/coul/msm (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_born.html"><em>born/coul/wolf (go)</em></a></td>
<td><a class="reference internal" href="pair_brownian.html"><em>brownian (o)</em></a></td>
<td><a class="reference internal" href="pair_brownian.html"><em>brownian/poly (o)</em></a></td>
<td><a class="reference internal" href="pair_buck.html"><em>buck (cgko)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_buck.html"><em>buck/coul/cut (cgko)</em></a></td>
<td><a class="reference internal" href="pair_buck.html"><em>buck/coul/long (cgko)</em></a></td>
<td><a class="reference internal" href="pair_buck.html"><em>buck/coul/long/cs</em></a></td>
<td><a class="reference internal" href="pair_buck.html"><em>buck/coul/msm (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_buck_long.html"><em>buck/long/coul/long (o)</em></a></td>
<td><a class="reference internal" href="pair_colloid.html"><em>colloid (go)</em></a></td>
<td><a class="reference internal" href="pair_comb.html"><em>comb (o)</em></a></td>
<td><a class="reference internal" href="pair_comb.html"><em>comb3</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_coul.html"><em>coul/cut (gko)</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/debye (gko)</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/dsf (gko)</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/long (gko)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_coul.html"><em>coul/long/cs</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/msm</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/streitz</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>coul/wolf (ko)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_dpd.html"><em>dpd (o)</em></a></td>
<td><a class="reference internal" href="pair_dpd.html"><em>dpd/tstat (o)</em></a></td>
<td><a class="reference internal" href="pair_dsmc.html"><em>dsmc</em></a></td>
<td><a class="reference internal" href="pair_eam.html"><em>eam (cgkot)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_eam.html"><em>eam/alloy (cgkot)</em></a></td>
<td><a class="reference internal" href="pair_eam.html"><em>eam/fs (cgkot)</em></a></td>
<td><a class="reference internal" href="pair_eim.html"><em>eim (o)</em></a></td>
<td><a class="reference internal" href="pair_gauss.html"><em>gauss (go)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_gayberne.html"><em>gayberne (gio)</em></a></td>
<td><a class="reference internal" href="pair_gran.html"><em>gran/hertz/history (o)</em></a></td>
<td><a class="reference internal" href="pair_gran.html"><em>gran/hooke (co)</em></a></td>
<td><a class="reference internal" href="pair_gran.html"><em>gran/hooke/history (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_hbond_dreiding.html"><em>hbond/dreiding/lj (o)</em></a></td>
<td><a class="reference internal" href="pair_hbond_dreiding.html"><em>hbond/dreiding/morse (o)</em></a></td>
<td><a class="reference internal" href="pair_kim.html"><em>kim</em></a></td>
<td><a class="reference internal" href="pair_lcbop.html"><em>lcbop</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_line_lj.html"><em>line/lj (o)</em></a></td>
<td><a class="reference internal" href="pair_charmm.html"><em>lj/charmm/coul/charmm (cko)</em></a></td>
<td><a class="reference internal" href="pair_charmm.html"><em>lj/charmm/coul/charmm/implicit (cko)</em></a></td>
<td><a class="reference internal" href="pair_charmm.html"><em>lj/charmm/coul/long (cgiko)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_charmm.html"><em>lj/charmm/coul/msm</em></a></td>
<td><a class="reference internal" href="pair_class2.html"><em>lj/class2 (cgko)</em></a></td>
<td><a class="reference internal" href="pair_class2.html"><em>lj/class2/coul/cut (cko)</em></a></td>
<td><a class="reference internal" href="pair_class2.html"><em>lj/class2/coul/long (cgko)</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_lj.html"><em>lj/cut (cgikot)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_lj_cubic.html"><em>lj/cubic (go)</em></a></td>
+<td><a class="reference internal" href="pair_lj.html"><em>lj/cut (cgikot)</em></a></td>
<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/cut (cgko)</em></a></td>
<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/debye (cgko)</em></a></td>
-<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/dsf (gko)</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/long (cgikot)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/dsf (gko)</em></a></td>
+<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/long (cgikot)</em></a></td>
<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/coul/msm (go)</em></a></td>
<td><a class="reference internal" href="pair_dipole.html"><em>lj/cut/dipole/cut (go)</em></a></td>
-<td><a class="reference internal" href="pair_dipole.html"><em>lj/cut/dipole/long</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_lj.html"><em>lj/cut/tip4p/cut (o)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_dipole.html"><em>lj/cut/dipole/long</em></a></td>
+<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/tip4p/cut (o)</em></a></td>
<td><a class="reference internal" href="pair_lj.html"><em>lj/cut/tip4p/long (ot)</em></a></td>
<td><a class="reference internal" href="pair_lj_expand.html"><em>lj/expand (cgko)</em></a></td>
-<td><a class="reference internal" href="pair_gromacs.html"><em>lj/gromacs (cgko)</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_gromacs.html"><em>lj/gromacs/coul/gromacs (cko)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_gromacs.html"><em>lj/gromacs (cgko)</em></a></td>
+<td><a class="reference internal" href="pair_gromacs.html"><em>lj/gromacs/coul/gromacs (cko)</em></a></td>
<td><a class="reference internal" href="pair_lj_long.html"><em>lj/long/coul/long (o)</em></a></td>
<td><a class="reference internal" href="pair_dipole.html"><em>lj/long/dipole/long</em></a></td>
-<td><a class="reference internal" href="pair_lj_long.html"><em>lj/long/tip4p/long</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_lj_smooth.html"><em>lj/smooth (co)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_lj_long.html"><em>lj/long/tip4p/long</em></a></td>
+<td><a class="reference internal" href="pair_lj_smooth.html"><em>lj/smooth (co)</em></a></td>
<td><a class="reference internal" href="pair_lj_smooth_linear.html"><em>lj/smooth/linear (o)</em></a></td>
<td><a class="reference internal" href="pair_lj96.html"><em>lj96/cut (cgo)</em></a></td>
-<td><a class="reference internal" href="pair_lubricate.html"><em>lubricate (o)</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_lubricate.html"><em>lubricate/poly (o)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_lubricate.html"><em>lubricate (o)</em></a></td>
+<td><a class="reference internal" href="pair_lubricate.html"><em>lubricate/poly (o)</em></a></td>
<td><a class="reference internal" href="pair_lubricateU.html"><em>lubricateU</em></a></td>
<td><a class="reference internal" href="pair_lubricateU.html"><em>lubricateU/poly</em></a></td>
-<td><a class="reference internal" href="pair_meam.html"><em>meam (o)</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_mie.html"><em>mie/cut (o)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_meam.html"><em>meam (o)</em></a></td>
+<td><a class="reference internal" href="pair_mie.html"><em>mie/cut (o)</em></a></td>
<td><a class="reference internal" href="pair_morse.html"><em>morse (cgot)</em></a></td>
<td><a class="reference internal" href="pair_nb3b_harmonic.html"><em>nb3b/harmonic (o)</em></a></td>
-<td><a class="reference internal" href="pair_nm.html"><em>nm/cut (o)</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_nm.html"><em>nm/cut/coul/cut (o)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_nm.html"><em>nm/cut (o)</em></a></td>
+<td><a class="reference internal" href="pair_nm.html"><em>nm/cut/coul/cut (o)</em></a></td>
<td><a class="reference internal" href="pair_nm.html"><em>nm/cut/coul/long (o)</em></a></td>
<td><a class="reference internal" href="pair_peri.html"><em>peri/eps</em></a></td>
-<td><a class="reference internal" href="pair_peri.html"><em>peri/lps (o)</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_peri.html"><em>peri/pmb (o)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_peri.html"><em>peri/lps (o)</em></a></td>
+<td><a class="reference internal" href="pair_peri.html"><em>peri/pmb (o)</em></a></td>
<td><a class="reference internal" href="pair_peri.html"><em>peri/ves</em></a></td>
<td><a class="reference internal" href="pair_polymorphic.html"><em>polymorphic</em></a></td>
-<td><a class="reference internal" href="pair_reax.html"><em>reax</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_airebo.html"><em>rebo (o)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_reax.html"><em>reax</em></a></td>
+<td><a class="reference internal" href="pair_airebo.html"><em>rebo (o)</em></a></td>
<td><a class="reference internal" href="pair_resquared.html"><em>resquared (go)</em></a></td>
<td><a class="reference internal" href="pair_snap.html"><em>snap</em></a></td>
-<td><a class="reference internal" href="pair_soft.html"><em>soft (go)</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_sw.html"><em>sw (cgkio)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_soft.html"><em>soft (go)</em></a></td>
+<td><a class="reference internal" href="pair_sw.html"><em>sw (cgkio)</em></a></td>
<td><a class="reference internal" href="pair_table.html"><em>table (gko)</em></a></td>
-<td><a class="reference internal" href="pair_tersoff.html"><em>tersoff (cko)</em></a></td>
-<td><a class="reference internal" href="pair_tersoff_mod.html"><em>tersoff/mod (ko)</em></a></td>
+<td><a class="reference internal" href="pair_tersoff.html"><em>tersoff (cgko)</em></a></td>
</tr>
-<tr class="row-even"><td><a class="reference internal" href="pair_tersoff_zbl.html"><em>tersoff/zbl (ko)</em></a></td>
+<tr class="row-even"><td><a class="reference internal" href="pair_tersoff_mod.html"><em>tersoff/mod (ko)</em></a></td>
+<td><a class="reference internal" href="pair_tersoff_zbl.html"><em>tersoff/zbl (ko)</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>tip4p/cut (o)</em></a></td>
<td><a class="reference internal" href="pair_coul.html"><em>tip4p/long (o)</em></a></td>
-<td><a class="reference internal" href="pair_tri_lj.html"><em>tri/lj (o)</em></a></td>
</tr>
-<tr class="row-odd"><td><a class="reference internal" href="pair_yukawa.html"><em>yukawa (go)</em></a></td>
+<tr class="row-odd"><td><a class="reference internal" href="pair_tri_lj.html"><em>tri/lj (o)</em></a></td>
+<td><a class="reference internal" href="pair_yukawa.html"><em>yukawa (go)</em></a></td>
<td><a class="reference internal" href="pair_yukawa_colloid.html"><em>yukawa/colloid (go)</em></a></td>
-<td><a class="reference internal" href="pair_zbl.html"><em>zbl (o)</em></a></td>
-<td>&nbsp;</td>
+<td><a class="reference internal" href="pair_zbl.html"><em>zbl (go)</em></a></td>
</tr>
</tbody>
</table>
<p>These are additional pair styles in USER packages, which can be used
if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="29%" />
<col width="22%" />
<col width="24%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="pair_awpmd.html"><em>awpmd/cut</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>coul/cut/soft (o)</em></a></td>
<td><a class="reference internal" href="pair_coul_diel.html"><em>coul/diel (o)</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>coul/long/soft (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_eam.html"><em>eam/cd (o)</em></a></td>
<td><a class="reference internal" href="pair_edip.html"><em>edip (o)</em></a></td>
<td><a class="reference internal" href="pair_eff.html"><em>eff/cut</em></a></td>
<td><a class="reference internal" href="pair_gauss.html"><em>gauss/cut</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_list.html"><em>list</em></a></td>
<td><a class="reference internal" href="pair_charmm.html"><em>lj/charmm/coul/long/soft (o)</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>lj/cut/coul/cut/soft (o)</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>lj/cut/coul/long/soft (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_dipole.html"><em>lj/cut/dipole/sf (go)</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>lj/cut/soft (o)</em></a></td>
<td><a class="reference internal" href="pair_lj_soft.html"><em>lj/cut/tip4p/long/soft (o)</em></a></td>
<td><a class="reference internal" href="pair_sdk.html"><em>lj/sdk (gko)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_sdk.html"><em>lj/sdk/coul/long (go)</em></a></td>
<td><a class="reference internal" href="pair_sdk.html"><em>lj/sdk/coul/msm (o)</em></a></td>
<td><a class="reference internal" href="pair_lj_sf.html"><em>lj/sf (o)</em></a></td>
<td><a class="reference internal" href="pair_meam_spline.html"><em>meam/spline</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_meam_sw_spline.html"><em>meam/sw/spline</em></a></td>
<td><a class="reference internal" href="pair_quip.html"><em>quip</em></a></td>
<td><a class="reference internal" href="pair_reax_c.html"><em>reax/c</em></a></td>
<td><a class="reference internal" href="pair_smd_hertz.html"><em>smd/hertz</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_smd_tlsph.html"><em>smd/tlsph</em></a></td>
<td><a class="reference internal" href="pair_smd_triangulated_surface.html"><em>smd/triangulated/surface</em></a></td>
<td><a class="reference internal" href="pair_smd_ulsph.html"><em>smd/ulsph</em></a></td>
<td><a class="reference internal" href="pair_sph_heatconduction.html"><em>sph/heatconduction</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_sph_idealgas.html"><em>sph/idealgas</em></a></td>
<td><a class="reference internal" href="pair_sph_lj.html"><em>sph/lj</em></a></td>
<td><a class="reference internal" href="pair_sph_rhosum.html"><em>sph/rhosum</em></a></td>
<td><a class="reference internal" href="pair_sph_taitwater.html"><em>sph/taitwater</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="pair_sph_taitwater_morris.html"><em>sph/taitwater/morris</em></a></td>
<td><a class="reference internal" href="pair_srp.html"><em>srp</em></a></td>
<td><a class="reference internal" href="pair_tersoff.html"><em>tersoff/table (o)</em></a></td>
<td><a class="reference internal" href="pair_thole.html"><em>thole</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="pair_lj_soft.html"><em>tip4p/long/soft (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="bond-style-potentials">
<h2>3.9. Bond_style potentials<a class="headerlink" href="#bond-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="bond_style.html"><em>bond_style</em></a> command for an overview of bond
potentials. Click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="28%" />
<col width="25%" />
<col width="22%" />
<col width="25%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="bond_none.html"><em>none</em></a></td>
<td><a class="reference internal" href="bond_hybrid.html"><em>hybrid</em></a></td>
<td><a class="reference internal" href="bond_class2.html"><em>class2 (o)</em></a></td>
<td><a class="reference internal" href="bond_fene.html"><em>fene (ko)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="bond_fene_expand.html"><em>fene/expand (o)</em></a></td>
<td><a class="reference internal" href="bond_harmonic.html"><em>harmonic (ko)</em></a></td>
<td><a class="reference internal" href="bond_morse.html"><em>morse (o)</em></a></td>
<td><a class="reference internal" href="bond_nonlinear.html"><em>nonlinear (o)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="bond_quartic.html"><em>quartic (o)</em></a></td>
<td><a class="reference internal" href="bond_table.html"><em>table (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>These are additional bond styles in USER packages, which can be used
if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="46%" />
<col width="54%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="bond_harmonic_shift.html"><em>harmonic/shift (o)</em></a></td>
<td><a class="reference internal" href="bond_harmonic_shift_cut.html"><em>harmonic/shift/cut (o)</em></a></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="angle-style-potentials">
<h2>3.10. Angle_style potentials<a class="headerlink" href="#angle-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="angle_style.html"><em>angle_style</em></a> command for an overview of
angle potentials. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="25%" />
<col width="28%" />
<col width="27%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="angle_none.html"><em>none</em></a></td>
<td><a class="reference internal" href="angle_hybrid.html"><em>hybrid</em></a></td>
<td><a class="reference internal" href="angle_charmm.html"><em>charmm (ko)</em></a></td>
<td><a class="reference internal" href="angle_class2.html"><em>class2 (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="angle_cosine.html"><em>cosine (o)</em></a></td>
<td><a class="reference internal" href="angle_cosine_delta.html"><em>cosine/delta (o)</em></a></td>
<td><a class="reference internal" href="angle_cosine_periodic.html"><em>cosine/periodic (o)</em></a></td>
<td><a class="reference internal" href="angle_cosine_squared.html"><em>cosine/squared (o)</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="angle_harmonic.html"><em>harmonic (ko)</em></a></td>
<td><a class="reference internal" href="angle_table.html"><em>table (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>These are additional angle styles in USER packages, which can be used
if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="29%" />
<col width="31%" />
<col width="20%" />
<col width="21%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="angle_cosine_shift.html"><em>cosine/shift (o)</em></a></td>
<td><a class="reference internal" href="angle_cosine_shift_exp.html"><em>cosine/shift/exp (o)</em></a></td>
<td><a class="reference internal" href="angle_dipole.html"><em>dipole (o)</em></a></td>
<td><a class="reference internal" href="angle_fourier.html"><em>fourier (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="angle_fourier_simple.html"><em>fourier/simple (o)</em></a></td>
<td><a class="reference internal" href="angle_quartic.html"><em>quartic (o)</em></a></td>
<td><a class="reference internal" href="angle_sdk.html"><em>sdk</em></a></td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="dihedral-style-potentials">
<h2>3.11. Dihedral_style potentials<a class="headerlink" href="#dihedral-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="dihedral_style.html"><em>dihedral_style</em></a> command for an overview
of dihedral potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="21%" />
<col width="32%" />
<col width="22%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="dihedral_none.html"><em>none</em></a></td>
<td><a class="reference internal" href="dihedral_hybrid.html"><em>hybrid</em></a></td>
<td><a class="reference internal" href="dihedral_charmm.html"><em>charmm (ko)</em></a></td>
<td><a class="reference internal" href="dihedral_class2.html"><em>class2 (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="dihedral_harmonic.html"><em>harmonic (o)</em></a></td>
<td><a class="reference internal" href="dihedral_helix.html"><em>helix (o)</em></a></td>
<td><a class="reference internal" href="dihedral_multi_harmonic.html"><em>multi/harmonic (o)</em></a></td>
<td><a class="reference internal" href="dihedral_opls.html"><em>opls (ko)</em></a></td>
</tr>
</tbody>
</table>
<p>These are additional dihedral styles in USER packages, which can be
used if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="31%" />
<col width="21%" />
<col width="24%" />
<col width="24%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="dihedral_cosine_shift_exp.html"><em>cosine/shift/exp (o)</em></a></td>
<td><a class="reference internal" href="dihedral_fourier.html"><em>fourier (o)</em></a></td>
<td><a class="reference internal" href="dihedral_nharmonic.html"><em>nharmonic (o)</em></a></td>
<td><a class="reference internal" href="dihedral_quadratic.html"><em>quadratic (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="dihedral_table.html"><em>table (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="improper-style-potentials">
<h2>3.12. Improper_style potentials<a class="headerlink" href="#improper-style-potentials" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="improper_style.html"><em>improper_style</em></a> command for an overview
of improper potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="27%" />
<col width="24%" />
<col width="22%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="improper_none.html"><em>none</em></a></td>
<td><a class="reference internal" href="improper_hybrid.html"><em>hybrid</em></a></td>
<td><a class="reference internal" href="improper_class2.html"><em>class2 (o)</em></a></td>
<td><a class="reference internal" href="improper_cvff.html"><em>cvff (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="improper_harmonic.html"><em>harmonic (ko)</em></a></td>
<td><a class="reference internal" href="improper_umbrella.html"><em>umbrella (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>These are additional improper styles in USER packages, which can be
used if <a class="reference internal" href="Section_start.html#start-3"><span>LAMMPS is built with the appropriate package</span></a>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="36%" />
<col width="31%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="improper_cossq.html"><em>cossq (o)</em></a></td>
<td><a class="reference internal" href="improper_fourier.html"><em>fourier (o)</em></a></td>
<td><a class="reference internal" href="improper_ring.html"><em>ring (o)</em></a></td>
</tr>
</tbody>
</table>
</div>
<hr class="docutils" />
<div class="section" id="kspace-solvers">
<h2>3.13. Kspace solvers<a class="headerlink" href="#kspace-solvers" title="Permalink to this headline">¶</a></h2>
<p>See the <a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a> command for an overview of
Kspace solvers. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <a class="reference internal" href="Section_accelerate.html"><em>appropriate accelerated package</em></a>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.</p>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
<col width="24%" />
<col width="23%" />
<col width="27%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="kspace_style.html"><em>ewald (o)</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>ewald/disp</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>msm (o)</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>msm/cg (o)</em></a></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="kspace_style.html"><em>pppm (cgo)</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>pppm/cg (o)</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>pppm/disp</em></a></td>
<td><a class="reference internal" href="kspace_style.html"><em>pppm/disp/tip4p</em></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="kspace_style.html"><em>pppm/tip4p (o)</em></a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Section_packages.html" class="btn btn-neutral float-right" title="4. Packages" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_start.html" class="btn btn-neutral" title="2. Getting Started" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt
index af09b6cc9..4a7b60ebd 100644
--- a/doc/Section_commands.txt
+++ b/doc/Section_commands.txt
@@ -1,1072 +1,1073 @@
"Previous Section"_Section_start.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_packages.html :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
3. Commands :h3
This section describes how a LAMMPS input script is formatted and the
input script commands used to define a LAMMPS simulation.
3.1 "LAMMPS input script"_#cmd_1
3.2 "Parsing rules"_#cmd_2
3.3 "Input script structure"_#cmd_3
3.4 "Commands listed by category"_#cmd_4
3.5 "Commands listed alphabetically"_#cmd_5 :all(b)
:line
:line
3.1 LAMMPS input script :link(cmd_1),h4
LAMMPS executes by reading commands from a input script (text file),
one line at a time. When the input script ends, LAMMPS exits. Each
command causes LAMMPS to take some action. It may set an internal
variable, read in a file, or run a simulation. Most commands have
default settings, which means you only need to use the command if you
wish to change the default.
In many cases, the ordering of commands in an input script is not
important. However the following rules apply:
(1) LAMMPS does not read your entire input script and then perform a
simulation with all the settings. Rather, the input script is read
one line at a time and each command takes effect when it is read.
Thus this sequence of commands:
timestep 0.5
run 100
run 100 :pre
does something different than this sequence:
run 100
timestep 0.5
run 100 :pre
In the first case, the specified timestep (0.5 fmsec) is used for two
simulations of 100 timesteps each. In the 2nd case, the default
timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5
fmsec timestep is used for the 2nd one.
(2) Some commands are only valid when they follow other commands. For
example you cannot set the temperature of a group of atoms until atoms
have been defined and a group command is used to define which atoms
belong to the group.
(3) Sometimes command B will use values that can be set by command A.
This means command A must precede command B in the input script if it
is to have the desired effect. For example, the
"read_data"_read_data.html command initializes the system by setting
up the simulation box and assigning atoms to processors. If default
values are not desired, the "processors"_processors.html and
"boundary"_boundary.html commands need to be used before read_data to
tell LAMMPS how to map processors to the simulation box.
Many input script errors are detected by LAMMPS and an ERROR or
WARNING message is printed. "This section"_Section_errors.html gives
more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used.
:line
3.2 Parsing rules :link(cmd_2),h4
Each non-blank line in the input script is treated as a command.
LAMMPS commands are case sensitive. Command names are lower-case, as
are specified command arguments. Upper case letters may be used in
file names or user-chosen ID strings.
Here is how each line in the input script is parsed by LAMMPS:
(1) If the last printable character on the line is a "&" character,
the command is assumed to continue on the next line. The next line is
concatenated to the previous line by removing the "&" character and
line break. This allows long commands to be continued across two or
more lines. See the discussion of triple quotes in (6) for how to
continue a command across multiple line without using "&" characters.
(2) All characters from the first "#" character onward are treated as
comment and discarded. See an exception in (6). Note that a
comment after a trailing "&" character will prevent the command from
continuing on the next line. Also note that for multi-line commands a
single leading "#" will comment out the entire command.
(3) The line is searched repeatedly for $ characters, which indicate
variables that are replaced with a text string. See an exception in
(6).
If the $ is followed by curly brackets, then the variable name is the
text inside the curly brackets. If no curly brackets follow the $,
then the variable name is the single character immediately following
the $. Thus $\{myTemp\} and $x refer to variable names "myTemp" and
"x".
How the variable is converted to a text string depends on what style
of variable it is; see the "variable"_variable doc page for details.
It can be a variable that stores multiple text strings, and return one
of them. The returned text string can be multiple "words" (space
separated) which will then be interpreted as multiple arguments in the
input command. The variable can also store a numeric formula which
will be evaluated and its numeric result returned as a string.
As a special case, if the $ is followed by parenthesis, then the text
inside the parenthesis is treated as an "immediate" variable and
evaluated as an "equal-style variable"_variable.html. This is a way
to use numeric formulas in an input script without having to assign
them to variable names. For example, these 3 input script lines:
variable X equal (xlo+xhi)/2+sqrt(v_area)
region 1 block $X 2 INF INF EDGE EDGE
variable X delete :pre
can be replaced by
region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE :pre
so that you do not have to define (or discard) a temporary variable X.
Note that neither the curly-bracket or immediate form of variables can
contain nested $ characters for other variables to substitute for.
Thus you cannot do this:
variable a equal 2
variable b2 equal 4
print "B2 = $\{b$a\}" :pre
Nor can you specify this $($x-1.0) for an immediate variable, but
you could use $(v_x-1.0), since the latter is valid syntax for an
"equal-style variable"_variable.html.
See the "variable"_variable.html command for more details of how
strings are assigned to variables and evaluated, and how they can be
used in input script commands.
(4) The line is broken into "words" separated by whitespace (tabs,
spaces). Note that words can thus contain letters, digits,
underscores, or punctuation characters.
(5) The first word is the command name. All successive words in the
line are arguments.
(6) If you want text with spaces to be treated as a single argument,
it can be enclosed in either single or double or triple quotes. A
long single argument enclosed in single or double quotes can span
multiple lines if the "&" character is used, as described above. When
the lines are concatenated together (and the "&" characters and line
breaks removed), the text will become a single line. If you want
multiple lines of an argument to retain their line breaks, the text
can be enclosed in triple quotes, in which case "&" characters are not
needed. For example:
print "Volume = $v"
print 'Volume = $v'
if "$\{steps\} > 1000" then quit
variable a string "red green blue &
purple orange cyan"
print """
System volume = $v
System temperature = $t
""" :pre
In each case, the single, double, or triple quotes are removed when
the single argument they enclose is stored internally.
See the "dump modify format"_dump_modify.html, "print"_print.html,
"if"_if.html, and "python"_python.html commands for examples.
A "#" or "$" character that is between quotes will not be treated as a
comment indicator in (2) or substituted for as a variable in (3).
IMPORTANT NOTE: If the argument is itself a command that requires a
quoted argument (e.g. using a "print"_print.html command as part of an
"if"_if.html or "run every"_run.html command), then single, double, or
triple quotes can be nested in the usual manner. See the doc pages
for those commands for examples. Only one of level of nesting is
allowed, but that should be sufficient for most use cases.
:line
3.3 Input script structure :h4,link(cmd_3)
This section describes the structure of a typical LAMMPS input script.
The "examples" directory in the LAMMPS distribution contains many
sample input scripts; the corresponding problems are discussed in
"Section_example"_Section_example.html, and animated on the "LAMMPS
WWW Site"_lws.
A LAMMPS input script typically has 4 parts:
Initialization
Atom definition
Settings
Run a simulation :ol
The last 2 parts can be repeated as many times as desired. I.e. run a
simulation, change some settings, run some more, etc. Each of the 4
parts is now described in more detail. Remember that almost all the
commands need only be used if a non-default value is desired.
(1) Initialization
Set parameters that need to be defined before atoms are created or
read-in from a file.
The relevant commands are "units"_units.html,
"dimension"_dimension.html, "newton"_newton.html,
"processors"_processors.html, "boundary"_boundary.html,
"atom_style"_atom_style.html, "atom_modify"_atom_modify.html.
If force-field parameters appear in the files that will be read, these
commands tell LAMMPS what kinds of force fields are being used:
"pair_style"_pair_style.html, "bond_style"_bond_style.html,
"angle_style"_angle_style.html, "dihedral_style"_dihedral_style.html,
"improper_style"_improper_style.html.
(2) Atom definition
There are 3 ways to define atoms in LAMMPS. Read them in from a data
or restart file via the "read_data"_read_data.html or
"read_restart"_read_restart.html commands. These files can contain
molecular topology information. Or create atoms on a lattice (with no
molecular topology), using these commands: "lattice"_lattice.html,
"region"_region.html, "create_box"_create_box.html,
"create_atoms"_create_atoms.html. The entire set of atoms can be
duplicated to make a larger simulation using the
"replicate"_replicate.html command.
(3) Settings
Once atoms and molecular topology are defined, a variety of settings
can be specified: force field coefficients, simulation parameters,
output options, etc.
Force field coefficients are set by these commands (they can also be
set in the read-in files): "pair_coeff"_pair_coeff.html,
"bond_coeff"_bond_coeff.html, "angle_coeff"_angle_coeff.html,
"dihedral_coeff"_dihedral_coeff.html,
"improper_coeff"_improper_coeff.html,
"kspace_style"_kspace_style.html, "dielectric"_dielectric.html,
"special_bonds"_special_bonds.html.
Various simulation parameters are set by these commands:
"neighbor"_neighbor.html, "neigh_modify"_neigh_modify.html,
"group"_group.html, "timestep"_timestep.html,
"reset_timestep"_reset_timestep.html, "run_style"_run_style.html,
"min_style"_min_style.html, "min_modify"_min_modify.html.
Fixes impose a variety of boundary conditions, time integration, and
diagnostic options. The "fix"_fix.html command comes in many flavors.
Various computations can be specified for execution during a
simulation using the "compute"_compute.html,
"compute_modify"_compute_modify.html, and "variable"_variable.html
commands.
Output options are set by the "thermo"_thermo.html, "dump"_dump.html,
and "restart"_restart.html commands.
(4) Run a simulation
A molecular dynamics simulation is run using the "run"_run.html
command. Energy minimization (molecular statics) is performed using
the "minimize"_minimize.html command. A parallel tempering
(replica-exchange) simulation can be run using the
"temper"_temper.html command.
:line
3.4 Commands listed by category :link(cmd_4),h4
This section lists all LAMMPS commands, grouped by category. The
"next section"_#cmd_5 lists the same commands alphabetically. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command's documentation.
Initialization:
"atom_modify"_atom_modify.html, "atom_style"_atom_style.html,
"boundary"_boundary.html, "dimension"_dimension.html,
"newton"_newton.html, "processors"_processors.html, "units"_units.html
Atom definition:
"create_atoms"_create_atoms.html, "create_box"_create_box.html,
"lattice"_lattice.html, "read_data"_read_data.html,
"read_dump"_read_dump.html, "read_restart"_read_restart.html,
"region"_region.html, "replicate"_replicate.html
Force fields:
"angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html,
"bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html,
"dielectric"_dielectric.html, "dihedral_coeff"_dihedral_coeff.html,
"dihedral_style"_dihedral_style.html,
"improper_coeff"_improper_coeff.html,
"improper_style"_improper_style.html,
"kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html,
"pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html,
"pair_style"_pair_style.html, "pair_write"_pair_write.html,
"special_bonds"_special_bonds.html
Settings:
"comm_style"_comm_style.html, "group"_group.html, "mass"_mass.html,
"min_modify"_min_modify.html, "min_style"_min_style.html,
"neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html,
"reset_timestep"_reset_timestep.html, "run_style"_run_style.html,
"set"_set.html, "timestep"_timestep.html, "velocity"_velocity.html
Fixes:
"fix"_fix.html, "fix_modify"_fix_modify.html, "unfix"_unfix.html
Computes:
"compute"_compute.html, "compute_modify"_compute_modify.html,
"uncompute"_uncompute.html
Output:
"dump"_dump.html, "dump image"_dump_image.html,
"dump_modify"_dump_modify.html, "dump movie"_dump_image.html,
"restart"_restart.html, "thermo"_thermo.html,
"thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html,
"undump"_undump.html, "write_data"_write_data.html,
"write_dump"_write_dump.html, "write_restart"_write_restart.html
Actions:
"delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html,
"displace_atoms"_displace_atoms.html, "change_box"_change_box.html,
"minimize"_minimize.html, "neb"_neb.html "prd"_prd.html,
"rerun"_rerun.html, "run"_run.html, "temper"_temper.html
Miscellaneous:
"clear"_clear.html, "echo"_echo.html, "if"_if.html,
"include"_include.html, "jump"_jump.html, "label"_label.html,
"log"_log.html, "next"_next.html, "print"_print.html,
"shell"_shell.html, "variable"_variable.html
:line
3.5 Individual commands :h4,link(cmd_5),link(comm)
This section lists all LAMMPS commands alphabetically, with a separate
listing below of styles within certain commands. The "previous
section"_#cmd_4 lists the same commands, grouped by category. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command's documentation.
"angle_coeff"_angle_coeff.html,
"angle_style"_angle_style.html,
"atom_modify"_atom_modify.html,
"atom_style"_atom_style.html,
"balance"_balance.html,
"bond_coeff"_bond_coeff.html,
"bond_style"_bond_style.html,
"boundary"_boundary.html,
"box"_box.html,
"change_box"_change_box.html,
"clear"_clear.html,
"comm_modify"_comm_modify.html,
"comm_style"_comm_style.html,
"compute"_compute.html,
"compute_modify"_compute_modify.html,
"create_atoms"_create_atoms.html,
"create_bonds"_create_bonds.html,
"create_box"_create_box.html,
"delete_atoms"_delete_atoms.html,
"delete_bonds"_delete_bonds.html,
"dielectric"_dielectric.html,
"dihedral_coeff"_dihedral_coeff.html,
"dihedral_style"_dihedral_style.html,
"dimension"_dimension.html,
"displace_atoms"_displace_atoms.html,
"dump"_dump.html,
"dump image"_dump_image.html,
"dump_modify"_dump_modify.html,
"dump movie"_dump_image.html,
"echo"_echo.html,
"fix"_fix.html,
"fix_modify"_fix_modify.html,
"group"_group.html,
"if"_if.html,
"info"_info.html,
"improper_coeff"_improper_coeff.html,
"improper_style"_improper_style.html,
"include"_include.html,
"jump"_jump.html,
"kspace_modify"_kspace_modify.html,
"kspace_style"_kspace_style.html,
"label"_label.html,
"lattice"_lattice.html,
"log"_log.html,
"mass"_mass.html,
"minimize"_minimize.html,
"min_modify"_min_modify.html,
"min_style"_min_style.html,
"molecule"_molecule.html,
"neb"_neb.html,
"neigh_modify"_neigh_modify.html,
"neighbor"_neighbor.html,
"newton"_newton.html,
"next"_next.html,
"package"_package.html,
"pair_coeff"_pair_coeff.html,
"pair_modify"_pair_modify.html,
"pair_style"_pair_style.html,
"pair_write"_pair_write.html,
"partition"_partition.html,
"prd"_prd.html,
"print"_print.html,
"processors"_processors.html,
"python"_python.html,
"quit"_quit.html,
"read_data"_read_data.html,
"read_dump"_read_dump.html,
"read_restart"_read_restart.html,
"region"_region.html,
"replicate"_replicate.html,
"rerun"_rerun.html,
"reset_timestep"_reset_timestep.html,
"restart"_restart.html,
"run"_run.html,
"run_style"_run_style.html,
"set"_set.html,
"shell"_shell.html,
"special_bonds"_special_bonds.html,
"suffix"_suffix.html,
"tad"_tad.html,
"temper"_temper.html,
"thermo"_thermo.html,
"thermo_modify"_thermo_modify.html,
"thermo_style"_thermo_style.html,
"timestep"_timestep.html,
"uncompute"_uncompute.html,
"undump"_undump.html,
"unfix"_unfix.html,
"units"_units.html,
"variable"_variable.html,
"velocity"_velocity.html,
"write_data"_write_data.html,
"write_dump"_write_dump.html,
"write_restart"_write_restart.html :tb(c=6,ea=c)
These are additional commands in USER packages, which can be used if
"LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"group2ndx"_group2ndx.html :tb(c=1,ea=c)
:line
Fix styles :h4
See the "fix"_fix.html command for one-line descriptions of each style
or click on the style itself for a full description. Some of the
styles have accelerated versions, which can be used if LAMMPS is built
with the "appropriate accelerated package"_Section_accelerate.html.
This is indicated by additional letters in parenthesis: c = USER-CUDA,
g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
"adapt"_fix_adapt.html,
"addforce (c)"_fix_addforce.html,
"append/atoms"_fix_append_atoms.html,
"atom/swap"_fix_atom_swap.html,
"aveforce (c)"_fix_aveforce.html,
"ave/atom"_fix_ave_atom.html,
"ave/chunk"_fix_ave_chunk.html,
"ave/correlate"_fix_ave_correlate.html,
"ave/histo"_fix_ave_histo.html,
"ave/histo/weight"_fix_ave_histo.html,
"ave/spatial"_fix_ave_spatial.html,
"ave/time"_fix_ave_time.html,
"balance"_fix_balance.html,
"bond/break"_fix_bond_break.html,
"bond/create"_fix_bond_create.html,
"bond/swap"_fix_bond_swap.html,
"box/relax"_fix_box_relax.html,
"deform"_fix_deform.html,
"deposit"_fix_deposit.html,
"drag"_fix_drag.html,
"dt/reset"_fix_dt_reset.html,
"efield"_fix_efield.html,
"enforce2d (c)"_fix_enforce2d.html,
"evaporate"_fix_evaporate.html,
"external"_fix_external.html,
"freeze (c)"_fix_freeze.html,
"gcmc"_fix_gcmc.html,
"gld"_fix_gld.html,
"gravity (co)"_fix_gravity.html,
"heat"_fix_heat.html,
"indent"_fix_indent.html,
"langevin (k)"_fix_langevin.html,
"lineforce"_fix_lineforce.html,
"momentum"_fix_momentum.html,
"move"_fix_move.html,
"msst"_fix_msst.html,
"neb"_fix_neb.html,
"nph (o)"_fix_nh.html,
"nphug (o)"_fix_nphug.html,
"nph/asphere (o)"_fix_nph_asphere.html,
"nph/sphere (o)"_fix_nph_sphere.html,
"npt (co)"_fix_nh.html,
"npt/asphere (o)"_fix_npt_asphere.html,
"npt/sphere (o)"_fix_npt_sphere.html,
"nve (cko)"_fix_nve.html,
"nve/asphere"_fix_nve_asphere.html,
"nve/asphere/noforce"_fix_nve_asphere_noforce.html,
"nve/body"_fix_nve_body.html,
"nve/limit"_fix_nve_limit.html,
"nve/line"_fix_nve_line.html,
"nve/noforce"_fix_nve_noforce.html,
"nve/sphere (o)"_fix_nve_sphere.html,
"nve/tri"_fix_nve_tri.html,
"nvt (co)"_fix_nh.html,
"nvt/asphere (o)"_fix_nvt_asphere.html,
"nvt/sllod (o)"_fix_nvt_sllod.html,
"nvt/sphere (o)"_fix_nvt_sphere.html,
"oneway"_fix_oneway.html,
"orient/fcc"_fix_orient_fcc.html,
"planeforce"_fix_planeforce.html,
"poems"_fix_poems.html,
"pour"_fix_pour.html,
"press/berendsen"_fix_press_berendsen.html,
"print"_fix_print.html,
"property/atom"_fix_property_atom.html,
"qeq/comb (o)"_fix_qeq_comb.html,
"qeq/dynamic"_fix_qeq.html,
"qeq/point"_fix_qeq.html,
"qeq/shielded"_fix_qeq.html,
"qeq/slater"_fix_qeq.html,
"reax/bonds"_fix_reax_bonds.html,
"recenter"_fix_recenter.html,
"restrain"_fix_restrain.html,
"rigid (o)"_fix_rigid.html,
"rigid/nph (o)"_fix_rigid.html,
"rigid/npt (o)"_fix_rigid.html,
"rigid/nve (o)"_fix_rigid.html,
"rigid/nvt (o)"_fix_rigid.html,
"rigid/small (o)"_fix_rigid.html,
"rigid/small/nph"_fix_rigid.html,
"rigid/small/npt"_fix_rigid.html,
"rigid/small/nve"_fix_rigid.html,
"rigid/small/nvt"_fix_rigid.html,
"setforce (c)"_fix_setforce.html,
"shake (c)"_fix_shake.html,
"spring"_fix_spring.html,
"spring/rg"_fix_spring_rg.html,
"spring/self"_fix_spring_self.html,
"srd"_fix_srd.html,
"store/force"_fix_store_force.html,
"store/state"_fix_store_state.html,
"temp/berendsen (c)"_fix_temp_berendsen.html,
"temp/csld"_fix_temp_csvr.html,
"temp/csvr"_fix_temp_csvr.html,
"temp/rescale (c)"_fix_temp_rescale.html,
"tfmc"_fix_tfmc.html,
"thermal/conductivity"_fix_thermal_conductivity.html,
"tmd"_fix_tmd.html,
"ttm"_fix_ttm.html,
"tune/kspace"_fix_tune_kspace.html,
"vector"_fix_vector.html,
"viscosity"_fix_viscosity.html,
"viscous (c)"_fix_viscous.html,
"wall/colloid"_fix_wall.html,
"wall/gran"_fix_wall_gran.html,
"wall/harmonic"_fix_wall.html,
"wall/lj1043"_fix_wall.html,
"wall/lj126"_fix_wall.html,
"wall/lj93"_fix_wall.html,
"wall/piston"_fix_wall_piston.html,
"wall/reflect"_fix_wall_reflect.html,
"wall/region"_fix_wall_region.html,
"wall/srd"_fix_wall_srd.html :tb(c=8,ea=c)
These are additional fix styles in USER packages, which can be used if
"LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"adapt/fep"_fix_adapt_fep.html,
"addtorque"_fix_addtorque.html,
"atc"_fix_atc.html,
"ave/spatial/sphere"_fix_ave_spatial_sphere.html,
"drude"_fix_drude.html,
"drude/transform/direct"_fix_drude_transform.html,
"drude/transform/reverse"_fix_drude_transform.html,
"colvars"_fix_colvars.html,
"gle"_fix_gle.html,
"imd"_fix_imd.html,
"ipi"_fix_ipi.html,
"langevin/drude"_fix_langevin_drude.html,
"langevin/eff"_fix_langevin_eff.html,
"lb/fluid"_fix_lb_fluid.html,
"lb/momentum"_fix_lb_momentum.html,
"lb/pc"_fix_lb_pc.html,
"lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html,
"lb/viscous"_fix_lb_viscous.html,
"meso"_fix_meso.html,
"meso/stationary"_fix_meso_stationary.html,
"nph/eff"_fix_nh_eff.html,
"npt/eff"_fix_nh_eff.html,
"nve/eff"_fix_nve_eff.html,
"nvt/eff"_fix_nh_eff.html,
"nvt/sllod/eff"_fix_nvt_sllod_eff.html,
"phonon"_fix_phonon.html,
"pimd"_fix_pimd.html,
"qbmsst"_fix_qbmsst.html,
"qeq/reax"_fix_qeq_reax.html,
"qmmm"_fix_qmmm.html,
"qtb"_fix_qtb.html,
"reax/c/bonds"_fix_reax_bonds.html,
"reax/c/species"_fix_reaxc_species.html,
"saed/vtk"_fix_saed_vtk.html,
"smd"_fix_smd.html,
"smd/adjust/dt"_fix_smd_adjust_dt.html,
"smd/integrate/tlsph"_fix_smd_integrate_tlsph.html,
"smd/integrate/ulsph"_fix_smd_integrate_ulsph.html,
"smd/move/triangulated/surface"_fix_smd_move_triangulated_surface.html,
"smd/setvel"_fix_smd_setvel.html,
"smd/tlsph/reference/configuration"_fix_smd_tlsph_reference_configuration.html,
"smd/wall/surface"_fix_smd_wall_surface.html,
"temp/rescale/eff"_fix_temp_rescale_eff.html,
"ti/rs"_fix_ti_rs.html,
"ti/spring"_fix_ti_spring.html,
"ttm/mod"_fix_ttm.html :tb(c=6,ea=c)
:line
Compute styles :h4
See the "compute"_compute.html command for one-line descriptions of
each style or click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"angle/local"_compute_angle_local.html,
"angmom/chunk"_compute_angmom_chunk.html,
"body/local"_compute_body_local.html,
"bond/local"_compute_bond_local.html,
"centro/atom"_compute_centro_atom.html,
"chunk/atom"_compute_chunk_atom.html,
"cluster/atom"_compute_cluster_atom.html,
"cna/atom"_compute_cna_atom.html,
"com"_compute_com.html,
"com/chunk"_compute_com_chunk.html,
"contact/atom"_compute_contact_atom.html,
"coord/atom"_compute_coord_atom.html,
"damage/atom"_compute_damage_atom.html,
"dihedral/local"_compute_dihedral_local.html,
"dilatation/atom"_compute_dilatation_atom.html,
"displace/atom"_compute_displace_atom.html,
"erotate/asphere"_compute_erotate_asphere.html,
"erotate/rigid"_compute_erotate_rigid.html,
"erotate/sphere"_compute_erotate_sphere.html,
"erotate/sphere/atom"_compute_erotate_sphere_atom.html,
"event/displace"_compute_event_displace.html,
"group/group"_compute_group_group.html,
"gyration"_compute_gyration.html,
"gyration/chunk"_compute_gyration_chunk.html,
"heat/flux"_compute_heat_flux.html,
"improper/local"_compute_improper_local.html,
"inertia/chunk"_compute_inertia_chunk.html,
"ke"_compute_ke.html,
"ke/atom"_compute_ke_atom.html,
"ke/rigid"_compute_ke_rigid.html,
"msd"_compute_msd.html,
"msd/chunk"_compute_msd_chunk.html,
"msd/nongauss"_compute_msd_nongauss.html,
"omega/chunk"_compute_omega_chunk.html,
"pair"_compute_pair.html,
"pair/local"_compute_pair_local.html,
"pe (c)"_compute_pe.html,
"pe/atom"_compute_pe_atom.html,
"plasticity/atom"_compute_plasticity_atom.html,
"pressure (c)"_compute_pressure.html,
"property/atom"_compute_property_atom.html,
"property/local"_compute_property_local.html,
"property/chunk"_compute_property_chunk.html,
"rdf"_compute_rdf.html,
"reduce"_compute_reduce.html,
"reduce/region"_compute_reduce.html,
"slice"_compute_slice.html,
"sna/atom"_compute_sna_atom.html,
"snad/atom"_compute_sna_atom.html,
"snav/atom"_compute_sna_atom.html,
"stress/atom"_compute_stress_atom.html,
"temp (c)"_compute_temp.html,
"temp/asphere"_compute_temp_asphere.html,
"temp/com"_compute_temp_com.html,
"temp/chunk"_compute_temp_chunk.html,
"temp/deform"_compute_temp_deform.html,
"temp/partial (c)"_compute_temp_partial.html,
"temp/profile"_compute_temp_profile.html,
"temp/ramp"_compute_temp_ramp.html,
"temp/region"_compute_temp_region.html,
"temp/sphere"_compute_temp_sphere.html,
"ti"_compute_ti.html,
"torque/chunk"_compute_torque_chunk.html,
"vacf"_compute_vacf.html,
"vcm/chunk"_compute_vcm_chunk.html,
"voronoi/atom"_compute_voronoi_atom.html :tb(c=6,ea=c)
These are additional compute styles in USER packages, which can be
used if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"ackland/atom"_compute_ackland_atom.html,
"basal/atom"_compute_basal_atom.html,
"fep"_compute_fep.html,
"ke/eff"_compute_ke_eff.html,
"ke/atom/eff"_compute_ke_atom_eff.html,
"meso_e/atom"_compute_meso_e_atom.html,
"meso_rho/atom"_compute_meso_rho_atom.html,
"meso_t/atom"_compute_meso_t_atom.html,
"saed"_compute_saed.html,
"smd/contact/radius"_compute_smd_contact_radius.html,
"smd/damage"_compute_smd_damage.html,
"smd/hourglass/error"_compute_smd_hourglass_error.html,
"smd/internal/energy"_compute_smd_internal_energy.html,
"smd/plastic/strain"_compute_smd_plastic_strain.html,
"smd/plastic/strain/rate"_compute_smd_plastic_strain_rate.html,
"smd/rho"_compute_smd_rho.html,
"smd/tlsph/defgrad"_compute_smd_tlsph_defgrad.html,
"smd/tlsph/dt"_compute_smd_tlsph_dt.html,
"smd/tlsph/num/neighs"_compute_smd_tlsph_num_neighs.html,
"smd/tlsph/shape"_compute_smd_tlsph_shape.html,
"smd/tlsph/strain"_compute_smd_tlsph_strain.html,
"smd/tlsph/strain/rate"_compute_smd_tlsph_strain_rate.html,
"smd/tlsph/stress"_compute_smd_tlsph_stress.html,
"smd/triangle/mesh/vertices"_compute_smd_triangle_mesh_vertices.html,
"smd/ulsph/num/neighs"_compute_smd_ulsph_num_neighs.html,
"smd/ulsph/strain"_compute_smd_ulsph_strain.html,
"smd/ulsph/strain/rate"_compute_smd_ulsph_strain_rate.html,
"smd/ulsph/stress"_compute_smd_ulsph_stress.html,
"smd/vol"_compute_smd_vol.html,
"temp/drude"_compute_temp_drude.html,
"temp/eff"_compute_temp_eff.html,
"temp/deform/eff"_compute_temp_deform_eff.html,
"temp/region/eff"_compute_temp_region_eff.html,
"temp/rotate"_compute_temp_rotate.html,
"xrd"_compute_xrd.html :tb(c=6,ea=c)
:line
Pair_style potentials :h4
See the "pair_style"_pair_style.html command for an overview of pair
potentials. Click on the style itself for a full description. Many
of the styles have accelerated versions, which can be used if LAMMPS
is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"none"_pair_none.html,
"hybrid"_pair_hybrid.html,
"hybrid/overlay"_pair_hybrid.html,
"adp (o)"_pair_adp.html,
"airebo (o)"_pair_airebo.html,
"beck (go)"_pair_beck.html,
"body"_pair_body.html,
"bop"_pair_bop.html,
"born (go)"_pair_born.html,
"born/coul/long (cgo)"_pair_born.html,
"born/coul/long/cs"_pair_born.html,
"born/coul/msm (o)"_pair_born.html,
"born/coul/wolf (go)"_pair_born.html,
"brownian (o)"_pair_brownian.html,
"brownian/poly (o)"_pair_brownian.html,
"buck (cgko)"_pair_buck.html,
"buck/coul/cut (cgko)"_pair_buck.html,
"buck/coul/long (cgko)"_pair_buck.html,
"buck/coul/long/cs"_pair_buck.html,
"buck/coul/msm (o)"_pair_buck.html,
"buck/long/coul/long (o)"_pair_buck_long.html,
"colloid (go)"_pair_colloid.html,
"comb (o)"_pair_comb.html,
"comb3"_pair_comb.html,
"coul/cut (gko)"_pair_coul.html,
"coul/debye (gko)"_pair_coul.html,
"coul/dsf (gko)"_pair_coul.html,
"coul/long (gko)"_pair_coul.html,
"coul/long/cs"_pair_coul.html,
"coul/msm"_pair_coul.html,
"coul/streitz"_pair_coul.html,
"coul/wolf (ko)"_pair_coul.html,
"dpd (o)"_pair_dpd.html,
"dpd/tstat (o)"_pair_dpd.html,
"dsmc"_pair_dsmc.html,
"eam (cgkot)"_pair_eam.html,
"eam/alloy (cgkot)"_pair_eam.html,
"eam/fs (cgkot)"_pair_eam.html,
"eim (o)"_pair_eim.html,
"gauss (go)"_pair_gauss.html,
"gayberne (gio)"_pair_gayberne.html,
"gran/hertz/history (o)"_pair_gran.html,
"gran/hooke (co)"_pair_gran.html,
"gran/hooke/history (o)"_pair_gran.html,
"hbond/dreiding/lj (o)"_pair_hbond_dreiding.html,
"hbond/dreiding/morse (o)"_pair_hbond_dreiding.html,
"kim"_pair_kim.html,
"lcbop"_pair_lcbop.html,
"line/lj (o)"_pair_line_lj.html,
"lj/charmm/coul/charmm (cko)"_pair_charmm.html,
"lj/charmm/coul/charmm/implicit (cko)"_pair_charmm.html,
"lj/charmm/coul/long (cgiko)"_pair_charmm.html,
"lj/charmm/coul/msm"_pair_charmm.html,
"lj/class2 (cgko)"_pair_class2.html,
"lj/class2/coul/cut (cko)"_pair_class2.html,
"lj/class2/coul/long (cgko)"_pair_class2.html,
+"lj/cubic (go)"_pair_lj_cubic.html,
"lj/cut (cgikot)"_pair_lj.html,
"lj/cut/coul/cut (cgko)"_pair_lj.html,
"lj/cut/coul/debye (cgko)"_pair_lj.html,
"lj/cut/coul/dsf (gko)"_pair_lj.html,
"lj/cut/coul/long (cgikot)"_pair_lj.html,
"lj/cut/coul/msm (go)"_pair_lj.html,
"lj/cut/dipole/cut (go)"_pair_dipole.html,
"lj/cut/dipole/long"_pair_dipole.html,
"lj/cut/tip4p/cut (o)"_pair_lj.html,
"lj/cut/tip4p/long (ot)"_pair_lj.html,
"lj/expand (cgko)"_pair_lj_expand.html,
"lj/gromacs (cgko)"_pair_gromacs.html,
"lj/gromacs/coul/gromacs (cko)"_pair_gromacs.html,
"lj/long/coul/long (o)"_pair_lj_long.html,
"lj/long/dipole/long"_pair_dipole.html,
"lj/long/tip4p/long"_pair_lj_long.html,
"lj/smooth (co)"_pair_lj_smooth.html,
"lj/smooth/linear (o)"_pair_lj_smooth_linear.html,
"lj96/cut (cgo)"_pair_lj96.html,
"lubricate (o)"_pair_lubricate.html,
"lubricate/poly (o)"_pair_lubricate.html,
"lubricateU"_pair_lubricateU.html,
"lubricateU/poly"_pair_lubricateU.html,
"meam (o)"_pair_meam.html,
"mie/cut (o)"_pair_mie.html,
"morse (cgot)"_pair_morse.html,
"nb3b/harmonic (o)"_pair_nb3b_harmonic.html,
"nm/cut (o)"_pair_nm.html,
"nm/cut/coul/cut (o)"_pair_nm.html,
"nm/cut/coul/long (o)"_pair_nm.html,
"peri/eps"_pair_peri.html,
"peri/lps (o)"_pair_peri.html,
"peri/pmb (o)"_pair_peri.html,
"peri/ves"_pair_peri.html,
"polymorphic"_pair_polymorphic.html,
"reax"_pair_reax.html,
"rebo (o)"_pair_airebo.html,
"resquared (go)"_pair_resquared.html,
"snap"_pair_snap.html,
"soft (go)"_pair_soft.html,
"sw (cgkio)"_pair_sw.html,
"table (gko)"_pair_table.html,
-"tersoff (cko)"_pair_tersoff.html,
+"tersoff (cgko)"_pair_tersoff.html,
"tersoff/mod (ko)"_pair_tersoff_mod.html,
"tersoff/zbl (ko)"_pair_tersoff_zbl.html,
"tip4p/cut (o)"_pair_coul.html,
"tip4p/long (o)"_pair_coul.html,
"tri/lj (o)"_pair_tri_lj.html,
"yukawa (go)"_pair_yukawa.html,
"yukawa/colloid (go)"_pair_yukawa_colloid.html,
-"zbl (o)"_pair_zbl.html :tb(c=4,ea=c)
+"zbl (go)"_pair_zbl.html :tb(c=4,ea=c)
These are additional pair styles in USER packages, which can be used
if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"awpmd/cut"_pair_awpmd.html,
"coul/cut/soft (o)"_pair_lj_soft.html,
"coul/diel (o)"_pair_coul_diel.html,
"coul/long/soft (o)"_pair_lj_soft.html,
"eam/cd (o)"_pair_eam.html,
"edip (o)"_pair_edip.html,
"eff/cut"_pair_eff.html,
"gauss/cut"_pair_gauss.html,
"list"_pair_list.html,
"lj/charmm/coul/long/soft (o)"_pair_charmm.html,
"lj/cut/coul/cut/soft (o)"_pair_lj_soft.html,
"lj/cut/coul/long/soft (o)"_pair_lj_soft.html,
"lj/cut/dipole/sf (go)"_pair_dipole.html,
"lj/cut/soft (o)"_pair_lj_soft.html,
"lj/cut/tip4p/long/soft (o)"_pair_lj_soft.html,
"lj/sdk (gko)"_pair_sdk.html,
"lj/sdk/coul/long (go)"_pair_sdk.html,
"lj/sdk/coul/msm (o)"_pair_sdk.html,
"lj/sf (o)"_pair_lj_sf.html,
"meam/spline"_pair_meam_spline.html,
"meam/sw/spline"_pair_meam_sw_spline.html,
"quip"_pair_quip.html,
"reax/c"_pair_reax_c.html,
"smd/hertz"_pair_smd_hertz.html,
"smd/tlsph"_pair_smd_tlsph.html,
"smd/triangulated/surface"_pair_smd_triangulated_surface.html,
"smd/ulsph"_pair_smd_ulsph.html,
"sph/heatconduction"_pair_sph_heatconduction.html,
"sph/idealgas"_pair_sph_idealgas.html,
"sph/lj"_pair_sph_lj.html,
"sph/rhosum"_pair_sph_rhosum.html,
"sph/taitwater"_pair_sph_taitwater.html,
"sph/taitwater/morris"_pair_sph_taitwater_morris.html,
"srp"_pair_srp.html,
"tersoff/table (o)"_pair_tersoff.html,
"thole"_pair_thole.html,
"tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c)
:line
Bond_style potentials :h4
See the "bond_style"_bond_style.html command for an overview of bond
potentials. Click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"none"_bond_none.html,
"hybrid"_bond_hybrid.html,
"class2 (o)"_bond_class2.html,
"fene (ko)"_bond_fene.html,
"fene/expand (o)"_bond_fene_expand.html,
"harmonic (ko)"_bond_harmonic.html,
"morse (o)"_bond_morse.html,
"nonlinear (o)"_bond_nonlinear.html,
"quartic (o)"_bond_quartic.html,
"table (o)"_bond_table.html :tb(c=4,ea=c)
These are additional bond styles in USER packages, which can be used
if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"harmonic/shift (o)"_bond_harmonic_shift.html,
"harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html :tb(c=4,ea=c)
:line
Angle_style potentials :h4
See the "angle_style"_angle_style.html command for an overview of
angle potentials. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"none"_angle_none.html,
"hybrid"_angle_hybrid.html,
"charmm (ko)"_angle_charmm.html,
"class2 (o)"_angle_class2.html,
"cosine (o)"_angle_cosine.html,
"cosine/delta (o)"_angle_cosine_delta.html,
"cosine/periodic (o)"_angle_cosine_periodic.html,
"cosine/squared (o)"_angle_cosine_squared.html,
"harmonic (ko)"_angle_harmonic.html,
"table (o)"_angle_table.html :tb(c=4,ea=c)
These are additional angle styles in USER packages, which can be used
if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"cosine/shift (o)"_angle_cosine_shift.html,
"cosine/shift/exp (o)"_angle_cosine_shift_exp.html,
"dipole (o)"_angle_dipole.html,
"fourier (o)"_angle_fourier.html,
"fourier/simple (o)"_angle_fourier_simple.html,
"quartic (o)"_angle_quartic.html,
"sdk"_angle_sdk.html :tb(c=4,ea=c)
:line
Dihedral_style potentials :h4
See the "dihedral_style"_dihedral_style.html command for an overview
of dihedral potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"none"_dihedral_none.html,
"hybrid"_dihedral_hybrid.html,
"charmm (ko)"_dihedral_charmm.html,
"class2 (o)"_dihedral_class2.html,
"harmonic (o)"_dihedral_harmonic.html,
"helix (o)"_dihedral_helix.html,
"multi/harmonic (o)"_dihedral_multi_harmonic.html,
"opls (ko)"_dihedral_opls.html :tb(c=4,ea=c)
These are additional dihedral styles in USER packages, which can be
used if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"cosine/shift/exp (o)"_dihedral_cosine_shift_exp.html,
"fourier (o)"_dihedral_fourier.html,
"nharmonic (o)"_dihedral_nharmonic.html,
"quadratic (o)"_dihedral_quadratic.html,
"table (o)"_dihedral_table.html :tb(c=4,ea=c)
:line
Improper_style potentials :h4
See the "improper_style"_improper_style.html command for an overview
of improper potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"none"_improper_none.html,
"hybrid"_improper_hybrid.html,
"class2 (o)"_improper_class2.html,
"cvff (o)"_improper_cvff.html,
"harmonic (ko)"_improper_harmonic.html,
"umbrella (o)"_improper_umbrella.html :tb(c=4,ea=c)
These are additional improper styles in USER packages, which can be
used if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"cossq (o)"_improper_cossq.html,
"fourier (o)"_improper_fourier.html,
"ring (o)"_improper_ring.html :tb(c=4,ea=c)
:line
Kspace solvers :h4
See the "kspace_style"_kspace_style.html command for an overview of
Kspace solvers. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the "appropriate accelerated
package"_Section_accelerate.html. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"ewald (o)"_kspace_style.html,
"ewald/disp"_kspace_style.html,
"msm (o)"_kspace_style.html,
"msm/cg (o)"_kspace_style.html,
"pppm (cgo)"_kspace_style.html,
"pppm/cg (o)"_kspace_style.html,
"pppm/disp"_kspace_style.html,
"pppm/disp/tip4p"_kspace_style.html,
"pppm/tip4p (o)"_kspace_style.html :tb(c=4,ea=c)
diff --git a/doc/Section_packages.html b/doc/Section_packages.html
index dd1a8b95b..d1730c62d 100644
--- a/doc/Section_packages.html
+++ b/doc/Section_packages.html
@@ -1,1372 +1,1414 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>4. Packages &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<link rel="next" title="5. Accelerating LAMMPS performance" href="Section_accelerate.html"/>
<link rel="prev" title="3. Commands" href="Section_commands.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">4. Packages</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#standard-packages">4.1. Standard packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-packages">4.2. User packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-atc-package">4.3. USER-ATC package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-awpmd-package">4.4. USER-AWPMD package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-cg-cmm-package">4.5. USER-CG-CMM package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-colvars-package">4.6. USER-COLVARS package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-cuda-package">4.7. USER-CUDA package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-diffraction-package">4.8. USER-DIFFRACTION package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-drude-package">4.9. USER-DRUDE package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-eff-package">4.10. USER-EFF package</a></li>
<li class="toctree-l2"><a class="reference internal" href="#user-fep-package">4.11. USER-FEP package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-intel-package">4.12. USER-INTEL package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-lb-package">4.13. USER-LB package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-misc-package">4.14. USER-MISC package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-molfile-package">4.15. USER-MOLFILE package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-omp-package">4.16. USER-OMP package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-phonon-package">4.17. USER-PHONON package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-qmmm-package">4.18. USER-QMMM package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-qtb-package">4.19. USER-QTB package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-reaxc-package">4.20. USER-REAXC package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-smd-package">4.21. USER-SMD package</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#user-sph-package">4.22. USER-SPH package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-h5md-package">4.12. USER-H5MD package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-intel-package">4.13. USER-INTEL package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-lb-package">4.14. USER-LB package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-misc-package">4.15. USER-MISC package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-molfile-package">4.16. USER-MOLFILE package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-omp-package">4.17. USER-OMP package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-phonon-package">4.18. USER-PHONON package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-qmmm-package">4.19. USER-QMMM package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-qtb-package">4.20. USER-QTB package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-reaxc-package">4.21. USER-REAXC package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-smd-package">4.22. USER-SMD package</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#user-sph-package">4.23. USER-SPH package</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>4. Packages</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
<div class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
<a href="Section_accelerate.html" class="btn btn-neutral float-right" title="5. Accelerating LAMMPS performance" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_commands.html" class="btn btn-neutral" title="3. Commands" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="packages">
<h1>4. Packages<a class="headerlink" href="#packages" title="Permalink to this headline">¶</a></h1>
<p>This section gives a quick overview of the add-on packages that extend
LAMMPS functionality.</p>
<div class="line-block">
<div class="line">4.1 <a class="reference internal" href="#pkg-1"><span>Standard packages</span></a></div>
<div class="line">4.2 <a class="reference internal" href="#pkg-2"><span>User packages</span></a></div>
<div class="line"><br /></div>
</div>
<p>LAMMPS includes many optional packages, which are groups of files that
enable a specific set of features. For example, force fields for
molecular systems or granular systems are in packages. You can see
the list of all packages by typing &#8220;make package&#8221; from within the src
directory of the LAMMPS distribution.</p>
<p>See <a class="reference internal" href="Section_start.html#start-3"><span>Section_start 3</span></a> of the manual for
details on how to include/exclude specific packages as part of the
LAMMPS build process, and for more details about the differences
between standard packages and user packages in LAMMPS.</p>
<p>Below, the packages currently availabe in LAMMPS are listed. For
standard packages, just a one-line description is given. For user
packages, more details are provided.</p>
<div class="section" id="standard-packages">
<span id="pkg-1"></span><h2>4.1. Standard packages<a class="headerlink" href="#standard-packages" title="Permalink to this headline">¶</a></h2>
<p>The current list of standard packages is as follows:</p>
<table border="1" class="docutils">
<colgroup>
<col width="7%" />
<col width="23%" />
<col width="24%" />
<col width="32%" />
<col width="7%" />
<col width="7%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Package</td>
<td>Description</td>
<td>Author(s)</td>
<td>Doc page</td>
<td>Example</td>
<td>Library</td>
</tr>
<tr class="row-even"><td>ASPHERE</td>
<td>aspherical particles</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="Section_howto.html#howto-14"><span>Section_howto 6.14</span></a></td>
<td>ellipse</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>BODY</td>
<td>body-style particles</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="body.html"><em>body</em></a></td>
<td>body</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-even"><td>CLASS2</td>
<td>class 2 force fields</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="pair_class2.html"><em>pair_style lj/class2</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>COLLOID</td>
<td>colloidal particles</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="atom_style.html"><em>atom_style colloid</em></a></td>
<td>colloid</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>CORESHELL</td>
+<tr class="row-even"><td>COMPRESS</td>
+<td>I/O compression</td>
+<td>Axel Kohlmeyer (Temple U)</td>
+<td><a class="reference internal" href="dump.html"><em>dump */gz</em></a></td>
+<td><ul class="first last simple">
+<li></li>
+</ul>
+</td>
+<td><ul class="first last simple">
+<li></li>
+</ul>
+</td>
+</tr>
+<tr class="row-odd"><td>CORESHELL</td>
<td>adiabatic core/shell model</td>
<td>Hendrik Heenen (Technical U of Munich)</td>
<td><a class="reference internal" href="Section_howto.html#howto-25"><span>Section_howto 6.25</span></a></td>
<td>coreshell</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>DIPOLE</td>
+<tr class="row-even"><td>DIPOLE</td>
<td>point dipole particles</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="pair_dipole.html"><em>pair_style dipole/cut</em></a></td>
<td>dipole</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>FLD</td>
+<tr class="row-odd"><td>FLD</td>
<td>Fast Lubrication Dynamics</td>
<td>Kumar &amp; Bybee &amp; Higdon (1)</td>
<td><a class="reference internal" href="pair_lubricateU.html"><em>pair_style lubricateU</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>GPU</td>
+<tr class="row-even"><td>GPU</td>
<td>GPU-enabled styles</td>
<td>Mike Brown (ORNL)</td>
<td><a class="reference internal" href="accelerate_gpu.html"><em>Section accelerate</em></a></td>
<td>gpu</td>
<td>lib/gpu</td>
</tr>
-<tr class="row-even"><td>GRANULAR</td>
+<tr class="row-odd"><td>GRANULAR</td>
<td>granular systems</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="Section_howto.html#howto-6"><span>Section_howto 6.6</span></a></td>
<td>pour</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>KIM</td>
+<tr class="row-even"><td>KIM</td>
<td>openKIM potentials</td>
<td>Smirichinski &amp; Elliot &amp; Tadmor (3)</td>
<td><a class="reference internal" href="pair_kim.html"><em>pair_style kim</em></a></td>
<td>kim</td>
<td>KIM</td>
</tr>
-<tr class="row-even"><td>KOKKOS</td>
+<tr class="row-odd"><td>KOKKOS</td>
<td>Kokkos-enabled styles</td>
<td>Trott &amp; Edwards (4)</td>
<td><a class="reference internal" href="accelerate_kokkos.html"><em>Section_accelerate</em></a></td>
<td>kokkos</td>
<td>lib/kokkos</td>
</tr>
-<tr class="row-odd"><td>KSPACE</td>
+<tr class="row-even"><td>KSPACE</td>
<td>long-range Coulombic solvers</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a></td>
<td>peptide</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>MANYBODY</td>
+<tr class="row-odd"><td>MANYBODY</td>
<td>many-body potentials</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="pair_tersoff.html"><em>pair_style tersoff</em></a></td>
<td>shear</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>MEAM</td>
+<tr class="row-even"><td>MEAM</td>
<td>modified EAM potential</td>
<td>Greg Wagner (Sandia)</td>
<td><a class="reference internal" href="pair_meam.html"><em>pair_style meam</em></a></td>
<td>meam</td>
<td>lib/meam</td>
</tr>
-<tr class="row-even"><td>MC</td>
+<tr class="row-odd"><td>MC</td>
<td>Monte Carlo options</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="fix_gcmc.html"><em>fix gcmc</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>MOLECULE</td>
+<tr class="row-even"><td>MOLECULE</td>
<td>molecular system force fields</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="Section_howto.html#howto-3"><span>Section_howto 6.3</span></a></td>
<td>peptide</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>OPT</td>
+<tr class="row-odd"><td>OPT</td>
<td>optimized pair styles</td>
<td>Fischer &amp; Richie &amp; Natoli (2)</td>
<td><a class="reference internal" href="accelerate_opt.html"><em>Section accelerate</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>PERI</td>
+<tr class="row-even"><td>PERI</td>
<td>Peridynamics models</td>
<td>Mike Parks (Sandia)</td>
<td><a class="reference internal" href="pair_peri.html"><em>pair_style peri</em></a></td>
<td>peri</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>POEMS</td>
+<tr class="row-odd"><td>POEMS</td>
<td>coupled rigid body motion</td>
<td>Rudra Mukherjee (JPL)</td>
<td><a class="reference internal" href="fix_poems.html"><em>fix poems</em></a></td>
<td>rigid</td>
<td>lib/poems</td>
</tr>
-<tr class="row-odd"><td>PYTHON</td>
+<tr class="row-even"><td>PYTHON</td>
<td>embed Python code in an input script</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="python.html"><em>python</em></a></td>
<td>python</td>
<td>lib/python</td>
</tr>
-<tr class="row-even"><td>REAX</td>
+<tr class="row-odd"><td>REAX</td>
<td>ReaxFF potential</td>
<td>Aidan Thompson (Sandia)</td>
<td><a class="reference internal" href="pair_reax.html"><em>pair_style reax</em></a></td>
<td>reax</td>
<td>lib/reax</td>
</tr>
-<tr class="row-odd"><td>REPLICA</td>
+<tr class="row-even"><td>REPLICA</td>
<td>multi-replica methods</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="Section_howto.html#howto-5"><span>Section_howto 6.5</span></a></td>
<td>tad</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>RIGID</td>
+<tr class="row-odd"><td>RIGID</td>
<td>rigid bodies</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="fix_rigid.html"><em>fix rigid</em></a></td>
<td>rigid</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>SHOCK</td>
+<tr class="row-even"><td>SHOCK</td>
<td>shock loading methods</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="fix_msst.html"><em>fix msst</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>SNAP</td>
+<tr class="row-odd"><td>SNAP</td>
<td>quantum-fit potential</td>
<td>Aidan Thompson (Sandia)</td>
<td><a class="reference internal" href="pair_snap.html"><em>pair snap</em></a></td>
<td>snap</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>SRD</td>
+<tr class="row-even"><td>SRD</td>
<td>stochastic rotation dynamics</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="fix_srd.html"><em>fix srd</em></a></td>
<td>srd</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>VORONOI</td>
+<tr class="row-odd"><td>VORONOI</td>
<td>Voronoi tesselations</td>
<td>Daniel Schwen (LANL)</td>
<td><a class="reference internal" href="compute_voronoi_atom.html"><em>compute voronoi/atom</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>Voro++</td>
</tr>
-<tr class="row-odd"><td>XTC</td>
+<tr class="row-even"><td>XTC</td>
<td>dumps in XTC format</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><a class="reference internal" href="dump.html"><em>dump</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>&nbsp;</td>
+<tr class="row-odd"><td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>The &#8220;Authors&#8221; column lists a name(s) if a specific person is
responible for creating and maintaining the package.</p>
<p>(1) The FLD package was created by Amit Kumar and Michael Bybee from
Jonathan Higdon&#8217;s group at UIUC.</p>
<p>(2) The OPT package was created by James Fischer (High Performance
Technologies), David Richie, and Vincent Natoli (Stone Ridge
Technolgy).</p>
<p>(3) The KIM package was created by Valeriu Smirichinski, Ryan Elliott,
and Ellad Tadmor (U Minn).</p>
<p>(4) The KOKKOS package was created primarily by Christian Trott
(Sandia). It uses the Kokkos library which was developed by Carter
Edwards, Christian, and collaborators at Sandia.</p>
<p>The &#8220;Doc page&#8221; column links to either a portion of the
<a class="reference internal" href="Section_howto.html"><em>Section_howto</em></a> of the manual, or an input script
command implemented as part of the package.</p>
<p>The &#8220;Example&#8221; column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. &#8220;peptide&#8221; refers to the examples/peptide directory.</p>
<p>The &#8220;Library&#8221; column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/README or src/package/Makefile.lammps file for
info on where to download the library. <a class="reference internal" href="Section_start.html#start-3-3"><span>Section start</span></a> of the manual also gives details
on how to build LAMMPS with both kinds of auxiliary libraries.</p>
</div>
<div class="section" id="user-packages">
<span id="pkg-2"></span><h2>4.2. User packages<a class="headerlink" href="#user-packages" title="Permalink to this headline">¶</a></h2>
<p>The current list of user-contributed packages is as follows:</p>
<table border="1" class="docutils">
<colgroup>
<col width="8%" />
<col width="21%" />
<col width="22%" />
<col width="25%" />
<col width="8%" />
<col width="10%" />
<col width="6%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Package</td>
<td>Description</td>
<td>Author(s)</td>
<td>Doc page</td>
<td>Example</td>
<td>Pic/movie</td>
<td>Library</td>
</tr>
<tr class="row-even"><td>USER-ATC</td>
<td>atom-to-continuum coupling</td>
<td>Jones &amp; Templeton &amp; Zimmerman (1)</td>
<td><a class="reference internal" href="fix_atc.html"><em>fix atc</em></a></td>
<td>USER/atc</td>
<td><a class="reference external" href="http://lammps.sandia.gov/pictures.html#atc">atc</a></td>
<td>lib/atc</td>
</tr>
<tr class="row-odd"><td>USER-AWPMD</td>
<td>wave-packet MD</td>
<td>Ilya Valuev (JIHT)</td>
<td><a class="reference internal" href="pair_awpmd.html"><em>pair_style awpmd/cut</em></a></td>
<td>USER/awpmd</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>lib/awpmd</td>
</tr>
<tr class="row-even"><td>USER-CG-CMM</td>
<td>coarse-graining model</td>
<td>Axel Kohlmeyer (Temple U)</td>
<td><a class="reference internal" href="pair_sdk.html"><em>pair_style lj/sdk</em></a></td>
<td>USER/cg-cmm</td>
<td><a class="reference external" href="http://lammps.sandia.gov/pictures.html#cg">cg</a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>USER-COLVARS</td>
<td>collective variables</td>
<td>Fiorin &amp; Henin &amp; Kohlmeyer (2)</td>
<td><a class="reference internal" href="fix_colvars.html"><em>fix colvars</em></a></td>
<td>USER/colvars</td>
<td><a class="reference external" href="colvars">colvars</a></td>
<td>lib/colvars</td>
</tr>
<tr class="row-even"><td>USER-CUDA</td>
<td>NVIDIA GPU styles</td>
<td>Christian Trott (U Tech Ilmenau)</td>
<td><a class="reference internal" href="accelerate_cuda.html"><em>Section accelerate</em></a></td>
<td>USER/cuda</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>lib/cuda</td>
</tr>
<tr class="row-odd"><td>USER-DIFFRACTION</td>
<td>virutal x-ray and electron diffraction</td>
<td>Shawn Coleman (ARL)</td>
<td><a class="reference internal" href="compute_xrd.html"><em>compute xrd</em></a></td>
<td>USER/diffraction</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-even"><td>USER-DRUDE</td>
<td>Drude oscillators</td>
<td>Dequidt &amp; Devemy &amp; Padua (3)</td>
<td><a class="reference internal" href="tutorial_drude.html"><em>tutorial</em></a></td>
<td>USER/drude</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>USER-EFF</td>
<td>electron force field</td>
<td>Andres Jaramillo-Botero (Caltech)</td>
<td><a class="reference internal" href="pair_eff.html"><em>pair_style eff/cut</em></a></td>
<td>USER/eff</td>
<td><a class="reference external" href="http://lammps.sandia.gov/movies.html#eff">eff</a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
<tr class="row-even"><td>USER-FEP</td>
<td>free energy perturbation</td>
<td>Agilio Padua (U Blaise Pascal Clermont-Ferrand)</td>
<td><a class="reference internal" href="compute_fep.html"><em>compute fep</em></a></td>
<td>USER/fep</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>USER-INTEL</td>
+<tr class="row-odd"><td>USER-H5MD</td>
+<td>dump output via HDF5</td>
+<td>Pierre de Buyl (KU Leuven)</td>
+<td><a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a></td>
+<td><ul class="first last simple">
+<li></li>
+</ul>
+</td>
+<td><ul class="first last simple">
+<li></li>
+</ul>
+</td>
+<td>h5md</td>
+</tr>
+<tr class="row-even"><td>USER-INTEL</td>
<td>Vectorized CPU and Intel(R) coprocessor styles</td>
<td><ol class="first last upperalpha simple" start="23">
<li>Michael Brown (Intel)</li>
</ol>
</td>
<td><a class="reference internal" href="accelerate_intel.html"><em>Section accelerate</em></a></td>
<td>examples/intel</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>USER-LB</td>
+<tr class="row-odd"><td>USER-LB</td>
<td>Lattice Boltzmann fluid</td>
<td>Colin Denniston (U Western Ontario)</td>
<td><a class="reference internal" href="fix_lb_fluid.html"><em>fix lb/fluid</em></a></td>
<td>USER/lb</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>USER-MISC</td>
+<tr class="row-even"><td>USER-MISC</td>
<td>single-file contributions</td>
<td>USER-MISC/README</td>
<td>USER-MISC/README</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>USER-MOLFILE</td>
+<tr class="row-odd"><td>USER-MOLFILE</td>
<td><a class="reference external" href="http://www.ks.uiuc.edu/Research/vmd">VMD</a> molfile plug-ins</td>
<td>Axel Kohlmeyer (Temple U)</td>
<td><a class="reference internal" href="dump_molfile.html"><em>dump molfile</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>VMD-MOLFILE</td>
</tr>
-<tr class="row-odd"><td>USER-OMP</td>
+<tr class="row-even"><td>USER-OMP</td>
<td>OpenMP threaded styles</td>
<td>Axel Kohlmeyer (Temple U)</td>
<td><a class="reference internal" href="accelerate_omp.html"><em>Section accelerate</em></a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>USER-PHONON</td>
+<tr class="row-odd"><td>USER-PHONON</td>
<td>phonon dynamical matrix</td>
<td>Ling-Ti Kong (Shanghai Jiao Tong U)</td>
<td><a class="reference internal" href="fix_phonon.html"><em>fix phonon</em></a></td>
<td>USER/phonon</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>USER-QMMM</td>
+<tr class="row-even"><td>USER-QMMM</td>
<td>QM/MM coupling</td>
<td>Axel Kohlmeyer (Temple U)</td>
<td><a class="reference internal" href="fix_qmmm.html"><em>fix qmmm</em></a></td>
<td>USER/qmmm</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>lib/qmmm</td>
</tr>
-<tr class="row-even"><td>USER-QTB</td>
+<tr class="row-odd"><td>USER-QTB</td>
<td>quantum nuclear effects</td>
<td>Yuan Shen (Stanford)</td>
<td><a class="reference internal" href="fix_qtb.html"><em>fix qtb</em></a> <a class="reference internal" href="fix_qbmsst.html"><em>fix_qbmsst</em></a></td>
<td>qtb</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>USER-QUIP</td>
+<tr class="row-even"><td>USER-QUIP</td>
<td>QUIP/libatoms interface</td>
<td>Albert Bartok-Partay (U Cambridge)</td>
<td><a class="reference internal" href="pair_quip.html"><em>pair_style quip</em></a></td>
<td>USER/quip</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td>lib/quip</td>
</tr>
-<tr class="row-even"><td>USER-REAXC</td>
+<tr class="row-odd"><td>USER-REAXC</td>
<td>C version of ReaxFF</td>
<td>Metin Aktulga (LBNL)</td>
<td><a class="reference internal" href="pair_reax_c.html"><em>pair_style reaxc</em></a></td>
<td>reax</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>USER-SMD</td>
+<tr class="row-even"><td>USER-SMD</td>
<td>smoothed Mach dynamics</td>
<td>Georg Ganzenmuller (EMI)</td>
<td><a class="reference external" href="PDF/SMD_LAMMPS_userguide.pdf">userguide.pdf</a></td>
<td>USER/smd</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-even"><td>USER-SPH</td>
+<tr class="row-odd"><td>USER-SPH</td>
<td>smoothed particle hydrodynamics</td>
<td>Georg Ganzenmuller (EMI)</td>
<td><a class="reference external" href="PDF/SPH_LAMMPS_userguide.pdf">userguide.pdf</a></td>
<td>USER/sph</td>
<td><a class="reference external" href="http://lammps.sandia.gov/movies.html#sph">sph</a></td>
<td><ul class="first last simple">
<li></li>
</ul>
</td>
</tr>
-<tr class="row-odd"><td>&nbsp;</td>
+<tr class="row-even"><td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<p>The &#8220;Authors&#8221; column lists a name(s) if a specific person is
responible for creating and maintaining the package.</p>
<p>If the Library is not listed as lib/package, then it is a third-party
library not included in the LAMMPS distribution. See the
src/package/Makefile.lammps file for info on where to download the
library from.</p>
<p>(2) The ATC package was created by Reese Jones, Jeremy Templeton, and
Jon Zimmerman (Sandia).</p>
<p>(2) The COLVARS package was created by Axel Kohlmeyer (Temple U) using
the colvars module library written by Giacomo Fiorin (Temple U) and
Jerome Henin (LISM, Marseille, France).</p>
<p>(3) The DRUDE package was created by Alain Dequidt (U Blaise Pascal
Clermont-Ferrand) and co-authors Julien Devemy (CNRS) and Agilio Padua
(U Blaise Pascal).</p>
<p>The &#8220;Doc page&#8221; column links to either a portion of the
<a class="reference internal" href="Section_howto.html"><em>Section_howto</em></a> of the manual, or an input script
command implemented as part of the package, or to additional
documentation provided witht he package.</p>
<p>The &#8220;Example&#8221; column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. &#8220;peptide&#8221; refers to the examples/peptide directory. USER/cuda
refers to the examples/USER/cuda directory.</p>
<p>The &#8220;Library&#8221; column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/Makefile.lammps file for info on where to download
the library. <a class="reference internal" href="Section_start.html#start-3-3"><span>Section start</span></a> of the
manual also gives details on how to build LAMMPS with both kinds of
auxiliary libraries.</p>
<p>More details on each package, from the USER-<a href="#id2"><span class="problematic" id="id3">*</span></a>/README file is given
below.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-atc-package">
<h2>4.3. USER-ATC package<a class="headerlink" href="#user-atc-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements a &#8220;fix atc&#8221; command which can be used in a
LAMMPS input script. This fix can be employed to either do concurrent
coupling of MD with FE-based physics surrogates or on-the-fly
post-processing of atomic information to continuum fields.</p>
<p>See the doc page for the fix atc command to get started. At the
bottom of the doc page are many links to additional documentation
contained in the doc/USER/atc directory.</p>
<p>There are example scripts for using this package in examples/USER/atc.</p>
<p>This package uses an external library in lib/atc which must be
compiled before making LAMMPS. See the lib/atc/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.</p>
<p>The primary people who created this package are Reese Jones (rjones at
sandia.gov), Jeremy Templeton (jatempl at sandia.gov) and Jon
Zimmerman (jzimmer at sandia.gov) at Sandia. Contact them directly if
you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-awpmd-package">
<h2>4.4. USER-AWPMD package<a class="headerlink" href="#user-awpmd-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a LAMMPS implementation of the Antisymmetrized
Wave Packet Molecular Dynamics (AWPMD) method.</p>
<p>See the doc page for the pair_style awpmd/cut command to get started.</p>
<p>There are example scripts for using this package in examples/USER/awpmd.</p>
<p>This package uses an external library in lib/awpmd which must be
compiled before making LAMMPS. See the lib/awpmd/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.</p>
<p>The person who created this package is Ilya Valuev at the JIHT in
Russia (valuev at physik.hu-berlin.de). Contact him directly if you
have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-cg-cmm-package">
<h2>4.5. USER-CG-CMM package<a class="headerlink" href="#user-cg-cmm-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements 3 commands which can be used in a LAMMPS input
script:</p>
<ul class="simple">
<li>pair_style lj/sdk</li>
<li>pair_style lj/sdk/coul/long</li>
<li>angle_style sdk</li>
</ul>
<p>These styles allow coarse grained MD simulations with the
parametrization of Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007)
(SDK), with extensions to simulate ionic liquids, electrolytes, lipids
and charged amino acids.</p>
<p>See the doc pages for these commands for details.</p>
<p>There are example scripts for using this package in
examples/USER/cg-cmm.</p>
<p>This is the second generation implementation reducing the the clutter
of the previous version. For many systems with electrostatics, it will
be faster to use pair_style hybrid/overlay with lj/sdk and coul/long
instead of the combined lj/sdk/coul/long style. since the number of
charged atom types is usually small. For any other coulomb
interactions this is now required. To exploit this property, the use
of the kspace_style pppm/cg is recommended over regular pppm. For all
new styles, input file backward compatibility is provided. The old
implementation is still available through appending the /old
suffix. These will be discontinued and removed after the new
implementation has been fully validated.</p>
<p>The current version of this package should be considered beta
quality. The CG potentials work correctly for &#8220;normal&#8221; situations, but
have not been testing with all kinds of potential parameters and
simulation systems.</p>
<p>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-colvars-package">
<h2>4.6. USER-COLVARS package<a class="headerlink" href="#user-colvars-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements the &#8220;fix colvars&#8221; command which can be
used in a LAMMPS input script.</p>
<p>This fix allows to use &#8220;collective variables&#8221; to implement
Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella
Sampling and Restraints. This code consists of two parts:</p>
<ul class="simple">
<li>A portable collective variable module library written and maintained</li>
<li>by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and</li>
<li>Jerome Henin (LISM, CNRS, Marseille, France). This code is located in</li>
<li>the directory lib/colvars and needs to be compiled first. The colvars</li>
<li>fix and an interface layer, exchanges information between LAMMPS and</li>
<li>the collective variable module.</li>
</ul>
<p>See the doc page of <a class="reference internal" href="fix_colvars.html"><em>fix colvars</em></a> for more details.</p>
<p>There are example scripts for using this package in
examples/USER/colvars</p>
<p>This is a very new interface that does not yet support all
features in the module and will see future optimizations
and improvements. The colvars module library is also available
in NAMD has been thoroughly used and tested there. Bugs and
problems are likely due to the interface layers code.
Thus the current version of this package should be considered
beta quality.</p>
<p>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-cuda-package">
<h2>4.7. USER-CUDA package<a class="headerlink" href="#user-cuda-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides acceleration of various LAMMPS pair styles, fix
styles, compute styles, and long-range Coulombics via PPPM for NVIDIA
GPUs.</p>
<p>See this section of the manual to get started:</p>
<p><span class="xref std std-ref">Section_accelerate</span></p>
<p>There are example scripts for using this package in
examples/USER/cuda.</p>
<p>This package uses an external library in lib/cuda which must be
compiled before making LAMMPS. See the lib/cuda/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.</p>
<p>The person who created this package is Christian Trott at the
University of Technology Ilmenau, Germany (christian.trott at
tu-ilmenau.de). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-diffraction-package">
<h2>4.8. USER-DIFFRACTION package<a class="headerlink" href="#user-diffraction-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains the commands neeed to calculate x-ray and
electron diffraction intensities based on kinematic diffraction
theory.</p>
<p>See these doc pages and their related commands to get started:</p>
<ul class="simple">
<li><a class="reference internal" href="compute_xrd.html"><em>compute xrd</em></a></li>
<li><a class="reference internal" href="compute_saed.html"><em>compute saed</em></a></li>
<li><a class="reference internal" href="fix_saed_vtk.html"><em>fix saed/vtk</em></a></li>
</ul>
<p>The person who created this package is Shawn P. Coleman
(shawn.p.coleman8.ctr at mail.mil) while at the University of
Arkansas. Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-drude-package">
<h2>4.9. USER-DRUDE package<a class="headerlink" href="#user-drude-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements methods for simulating polarizable systems
in LAMMPS using thermalized Drude oscillators.</p>
<p>See these doc pages and their related commands to get started:</p>
<ul class="simple">
<li><a class="reference internal" href="tutorial_drude.html"><em>Drude tutorial</em></a></li>
<li><a class="reference internal" href="fix_drude.html"><em>fix drude</em></a></li>
<li><a class="reference internal" href="compute_temp_drude.html"><em>compute temp/drude</em></a></li>
<li><a class="reference internal" href="fix_langevin_drude.html"><em>fix langevin/drude</em></a></li>
<li><a class="reference internal" href="fix_drude_transform.html"><em>fix drude/transform/...</em></a></li>
<li><a class="reference internal" href="pair_thole.html"><em>pair thole</em></a></li>
</ul>
<p>There are auxiliary tools for using this package in tools/drude.</p>
<p>The person who created this package is Alain Dequidt at Universite
Blaise Pascal Clermont-Ferrand (alain.dequidt at univ-bpclermont.fr)
Contact him directly if you have questions. Co-authors: Julien Devemy,
Agilio Padua.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-eff-package">
<h2>4.10. USER-EFF package<a class="headerlink" href="#user-eff-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a LAMMPS implementation of the electron Force
Field (eFF) currently under development at Caltech, as described in
A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, JCC,
2010. The eFF potential was first introduced by Su and Goddard, in
2007.</p>
<p>eFF can be viewed as an approximation to QM wave packet dynamics and
Fermionic molecular dynamics, combining the ability of electronic
structure methods to describe atomic structure, bonding, and chemistry
in materials, and of plasma methods to describe nonequilibrium
dynamics of large systems with a large number of highly excited
electrons. We classify it as a mixed QM-classical approach rather than
a conventional force field method, which introduces QM-based terms (a
spin-dependent repulsion term to account for the Pauli exclusion
principle and the electron wavefunction kinetic energy associated with
the Heisenberg principle) that reduce, along with classical
electrostatic terms between nuclei and electrons, to the sum of a set
of effective pairwise potentials. This makes eFF uniquely suited to
simulate materials over a wide range of temperatures and pressures
where electronically excited and ionized states of matter can occur
and coexist.</p>
<p>The necessary customizations to the LAMMPS core are in place to
enable the correct handling of explicit electron properties during
minimization and dynamics.</p>
<p>See the doc page for the pair_style eff/cut command to get started.</p>
<p>There are example scripts for using this package in
examples/USER/eff.</p>
<p>There are auxiliary tools for using this package in tools/eff.</p>
<p>The person who created this package is Andres Jaramillo-Botero at
CalTech (ajaramil at wag.caltech.edu). Contact him directly if you
have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-fep-package">
<h2>4.11. USER-FEP package<a class="headerlink" href="#user-fep-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides methods for performing free energy perturbation
simulations with soft-core pair potentials in LAMMPS.</p>
<p>See these doc pages and their related commands to get started:</p>
<ul class="simple">
<li><a class="reference internal" href="fix_adapt_fep.html"><em>fix adapt/fep</em></a></li>
<li><a class="reference internal" href="compute_fep.html"><em>compute fep</em></a></li>
<li><a class="reference internal" href="pair_lj_soft.html"><em>soft pair styles</em></a></li>
</ul>
<p>The person who created this package is Agilio Padua at Universite
Blaise Pascal Clermont-Ferrand (agilio.padua at univ-bpclermont.fr)
Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
+<div class="section" id="user-h5md-package">
+<h2>4.12. USER-H5MD package<a class="headerlink" href="#user-h5md-package" title="Permalink to this headline">¶</a></h2>
+<p>This package contains a <a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a> command for
+performing a dump of atom properties in HDF5 format. <a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5 files</a> are binary, portable and self-describing and can be
+examined and used by a variety of auxiliary tools. The output HDF5
+files are structured in a format called H5MD, which was designed to
+store molecular data, and can be used and produced by various MD and
+MD-related codes. The <code class="xref doc docutils literal"><span class="pre">dump</span> <span class="pre">h5md</span></code> command gives a
+citation to a paper describing the format.</p>
+<p>The person who created this package and the underlying H5MD format is
+Pierre de Buyl at KU Leuven (see <a class="reference external" href="http://pdebuyl.be">http://pdebuyl.be</a>). Contact him
+directly if you have questions.</p>
+</div>
+<hr class="docutils" />
<div class="section" id="user-intel-package">
-<h2>4.12. USER-INTEL package<a class="headerlink" href="#user-intel-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.13. USER-INTEL package<a class="headerlink" href="#user-intel-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides options for performing neighbor list and
non-bonded force calculations in single, mixed, or double precision
and also a capability for accelerating calculations with an
Intel(R) Xeon Phi(TM) coprocessor.</p>
<p>See this section of the manual to get started:</p>
<p><span class="xref std std-ref">Section_accelerate</span></p>
<p>The person who created this package is W. Michael Brown at Intel
(michael.w.brown at intel.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-lb-package">
-<h2>4.13. USER-LB package<a class="headerlink" href="#user-lb-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.14. USER-LB package<a class="headerlink" href="#user-lb-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a LAMMPS implementation of a background
Lattice-Boltzmann fluid, which can be used to model MD particles
influenced by hydrodynamic forces.</p>
<p>See this doc page and its related commands to get started:</p>
<p><a class="reference internal" href="fix_lb_fluid.html"><em>fix lb/fluid</em></a></p>
<p>The people who created this package are Frances Mackay (fmackay at
uwo.ca) and Colin (cdennist at uwo.ca) Denniston, University of
Western Ontario. Contact them directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-misc-package">
-<h2>4.14. USER-MISC package<a class="headerlink" href="#user-misc-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.15. USER-MISC package<a class="headerlink" href="#user-misc-package" title="Permalink to this headline">¶</a></h2>
<p>The files in this package are a potpourri of (mostly) unrelated
features contributed to LAMMPS by users. Each feature is a single
pair of files (<a href="#id4"><span class="problematic" id="id5">*</span></a>.cpp and <a href="#id6"><span class="problematic" id="id7">*</span></a>.h).</p>
<p>More information about each feature can be found by reading its doc
page in the LAMMPS doc directory. The doc page which lists all LAMMPS
input script commands is as follows:</p>
<p><a class="reference internal" href="Section_commands.html#cmd-5"><span>Section_commands</span></a></p>
<p>User-contributed features are listed at the bottom of the fix,
compute, pair, etc sections.</p>
<p>The list of features and author of each is given in the
src/USER-MISC/README file.</p>
<p>You should contact the author directly if you have specific questions
about the feature or its coding.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-molfile-package">
-<h2>4.15. USER-MOLFILE package<a class="headerlink" href="#user-molfile-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.16. USER-MOLFILE package<a class="headerlink" href="#user-molfile-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a dump molfile command which uses molfile
plugins that are bundled with the
<a class="reference external" href="http://www.ks.uiuc.edu/Research/vmd">VMD</a> molecular visualization and
analysis program, to enable LAMMPS to dump its information in formats
compatible with various molecular simulation tools.</p>
<p>The package only provides the interface code, not the plugins. These
can be obtained from a VMD installation which has to match the
platform that you are using to compile LAMMPS for. By adding plugins
to VMD, support for new file formats can be added to LAMMPS (or VMD or
other programs that use them) without having to recompile the
application itself.</p>
<p>See this doc page to get started:</p>
<p><span class="xref std std-ref">dump molfile</span></p>
<p>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-omp-package">
-<h2>4.16. USER-OMP package<a class="headerlink" href="#user-omp-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.17. USER-OMP package<a class="headerlink" href="#user-omp-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides OpenMP multi-threading support and
other optimizations of various LAMMPS pair styles, dihedral
styles, and fix styles.</p>
<p>See this section of the manual to get started:</p>
<p><span class="xref std std-ref">Section_accelerate</span></p>
<p>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-phonon-package">
-<h2>4.17. USER-PHONON package<a class="headerlink" href="#user-phonon-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.18. USER-PHONON package<a class="headerlink" href="#user-phonon-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a fix phonon command that calculates dynamical
matrices, which can then be used to compute phonon dispersion
relations, directly from molecular dynamics simulations.</p>
<p>See this doc page to get started:</p>
<p><a class="reference internal" href="fix_phonon.html"><em>fix phonon</em></a></p>
<p>The person who created this package is Ling-Ti Kong (konglt at
sjtu.edu.cn) at Shanghai Jiao Tong University. Contact him directly
if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-qmmm-package">
-<h2>4.18. USER-QMMM package<a class="headerlink" href="#user-qmmm-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.19. USER-QMMM package<a class="headerlink" href="#user-qmmm-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides a fix qmmm command which allows LAMMPS to be
used in a QM/MM simulation, currently only in combination with pw.x
code from the <a class="reference external" href="http://www.quantum-espresso.org">Quantum ESPRESSO</a> package.</p>
<p>The current implementation only supports an ONIOM style mechanical
coupling to the Quantum ESPRESSO plane wave DFT package.
Electrostatic coupling is in preparation and the interface has been
written in a manner that coupling to other QM codes should be possible
without changes to LAMMPS itself.</p>
<p>See this doc page to get started:</p>
<p><a class="reference internal" href="fix_qmmm.html"><em>fix qmmm</em></a></p>
<p>as well as the lib/qmmm/README file.</p>
<p>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-qtb-package">
-<h2>4.19. USER-QTB package<a class="headerlink" href="#user-qtb-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.20. USER-QTB package<a class="headerlink" href="#user-qtb-package" title="Permalink to this headline">¶</a></h2>
<p>This package provides a self-consistent quantum treatment of the
vibrational modes in a classical molecular dynamics simulation. By
coupling the MD simulation to a colored thermostat, it introduces zero
point energy into the system, alter the energy power spectrum and the
heat capacity towards their quantum nature. This package could be of
interest if one wants to model systems at temperatures lower than
their classical limits or when temperatures ramp up across the
classical limits in the simulation.</p>
<p>See these two doc pages to get started:</p>
<p><a class="reference internal" href="fix_qtb.html"><em>fix qtb</em></a> provides quantum nulcear correction through a
colored thermostat and can be used with other time integration schemes
like <a class="reference internal" href="fix_nve.html"><em>fix nve</em></a> or <a class="reference internal" href="fix_nh.html"><em>fix nph</em></a>.</p>
<p><a class="reference internal" href="fix_qbmsst.html"><em>fix qbmsst</em></a> enables quantum nuclear correction of a
multi-scale shock technique simulation by coupling the quantum thermal
bath with the shocked system.</p>
<p>The person who created this package is Yuan Shen (sy0302 at
stanford.edu) at Stanford University. Contact him directly if you
have questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-reaxc-package">
-<h2>4.20. USER-REAXC package<a class="headerlink" href="#user-reaxc-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.21. USER-REAXC package<a class="headerlink" href="#user-reaxc-package" title="Permalink to this headline">¶</a></h2>
<p>This package contains a implementation for LAMMPS of the ReaxFF force
field. ReaxFF uses distance-dependent bond-order functions to
represent the contributions of chemical bonding to the potential
energy. It was originally developed by Adri van Duin and the Goddard
group at CalTech.</p>
<p>The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in
C, should give identical or very similar results to pair_style reax,
which is a ReaxFF implementation on top of a Fortran library, a
version of which library was originally authored by Adri van Duin.</p>
<p>The reax/c version should be somewhat faster and more scalable,
particularly with respect to the charge equilibration calculation. It
should also be easier to build and use since there are no complicating
issues with Fortran memory allocation or linking to a Fortran library.</p>
<p>For technical details about this implemention of ReaxFF, see
this paper:</p>
<p>Parallel and Scalable Reactive Molecular Dynamics: Numerical Methods
and Algorithmic Techniques, H. M. Aktulga, J. C. Fogarty,
S. A. Pandit, A. Y. Grama, Parallel Computing, in press (2011).</p>
<p>See the doc page for the pair_style reax/c command for details
of how to use it in LAMMPS.</p>
<p>The person who created this package is Hasan Metin Aktulga (hmaktulga
at lbl.gov), while at Purdue University. Contact him directly, or
Aidan Thompson at Sandia (athomps at sandia.gov), if you have
questions.</p>
</div>
<hr class="docutils" />
<div class="section" id="user-smd-package">
-<h2>4.21. USER-SMD package<a class="headerlink" href="#user-smd-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.22. USER-SMD package<a class="headerlink" href="#user-smd-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements smoothed Mach dynamics (SMD) in
LAMMPS. Currently, the package has the following features:</p>
<ul class="simple">
<li>Does liquids via traditional Smooth Particle Hydrodynamics (SPH)</li>
<li>Also solves solids mechanics problems via a state of the art
stabilized meshless method with hourglass control.</li>
<li>Can specify hydrostatic interactions independently from material
strength models, i.e. pressure and deviatoric stresses are separated.</li>
<li>Many material models available (Johnson-Cook, plasticity with
hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new
material models.</li>
<li>Rigid boundary conditions (walls) can be loaded as surface geometries
from <a href="#id9"><span class="problematic" id="id10">*</span></a>.STL files.</li>
</ul>
<p>See the file doc/PDF/SMD_LAMMPS_userguide.pdf to get started.</p>
<p>There are example scripts for using this package in examples/USER/smd.</p>
<p>The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.</p>
</div>
<div class="section" id="user-sph-package">
-<h2>4.22. USER-SPH package<a class="headerlink" href="#user-sph-package" title="Permalink to this headline">¶</a></h2>
+<h2>4.23. USER-SPH package<a class="headerlink" href="#user-sph-package" title="Permalink to this headline">¶</a></h2>
<p>This package implements smoothed particle hydrodynamics (SPH) in
LAMMPS. Currently, the package has the following features:</p>
<ul class="simple">
<li>Tait, ideal gas, Lennard-Jones equation of states, full support for
complete (i.e. internal-energy dependent) equations of state</li>
<li>Plain or Monaghans XSPH integration of the equations of motion</li>
<li>Density continuity or density summation to propagate the density field</li>
<li>Commands to set internal energy and density of particles from the
input script</li>
<li>Output commands to access internal energy and density for dumping and
thermo output</li>
</ul>
<p>See the file doc/PDF/SPH_LAMMPS_userguide.pdf to get started.</p>
<p>There are example scripts for using this package in examples/USER/sph.</p>
<p>The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Section_accelerate.html" class="btn btn-neutral float-right" title="5. Accelerating LAMMPS performance" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_commands.html" class="btn btn-neutral" title="3. Commands" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/Section_packages.txt b/doc/Section_packages.txt
index db0d3ed7e..8e01c6bbb 100644
--- a/doc/Section_packages.txt
+++ b/doc/Section_packages.txt
@@ -1,684 +1,705 @@
"Previous Section"_Section_commands.html - "LAMMPS WWW Site"_lws -
"LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next
Section"_Section_accelerate.html :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
4. Packages :h3
This section gives a quick overview of the add-on packages that extend
LAMMPS functionality.
4.1 "Standard packages"_#pkg_1
4.2 "User packages"_#pkg_2 :all(b)
LAMMPS includes many optional packages, which are groups of files that
enable a specific set of features. For example, force fields for
molecular systems or granular systems are in packages. You can see
the list of all packages by typing "make package" from within the src
directory of the LAMMPS distribution.
See "Section_start 3"_Section_start.html#start_3 of the manual for
details on how to include/exclude specific packages as part of the
LAMMPS build process, and for more details about the differences
between standard packages and user packages in LAMMPS.
Below, the packages currently availabe in LAMMPS are listed. For
standard packages, just a one-line description is given. For user
packages, more details are provided.
:line
:line
4.1 Standard packages :h4,link(pkg_1)
The current list of standard packages is as follows:
Package, Description, Author(s), Doc page, Example, Library
ASPHERE, aspherical particles, -, "Section_howto 6.14"_Section_howto.html#howto_14, ellipse, -
BODY, body-style particles, -, "body"_body.html, body, -
CLASS2, class 2 force fields, -, "pair_style lj/class2"_pair_class2.html, -, -
COLLOID, colloidal particles, -, "atom_style colloid"_atom_style.html, colloid, -
+COMPRESS, I/O compression, Axel Kohlmeyer (Temple U), "dump */gz"_dump.html, -, -
CORESHELL, adiabatic core/shell model, Hendrik Heenen (Technical U of Munich), "Section_howto 6.25"_Section_howto.html#howto_25, coreshell, -
DIPOLE, point dipole particles, -, "pair_style dipole/cut"_pair_dipole.html, dipole, -
FLD, Fast Lubrication Dynamics, Kumar & Bybee & Higdon (1), "pair_style lubricateU"_pair_lubricateU.html, -, -
GPU, GPU-enabled styles, Mike Brown (ORNL), "Section accelerate"_accelerate_gpu.html, gpu, lib/gpu
GRANULAR, granular systems, -, "Section_howto 6.6"_Section_howto.html#howto_6, pour, -
KIM, openKIM potentials, Smirichinski & Elliot & Tadmor (3), "pair_style kim"_pair_kim.html, kim, KIM
KOKKOS, Kokkos-enabled styles, Trott & Edwards (4), "Section_accelerate"_accelerate_kokkos.html, kokkos, lib/kokkos
KSPACE, long-range Coulombic solvers, -, "kspace_style"_kspace_style.html, peptide, -
MANYBODY, many-body potentials, -, "pair_style tersoff"_pair_tersoff.html, shear, -
MEAM, modified EAM potential, Greg Wagner (Sandia), "pair_style meam"_pair_meam.html, meam, lib/meam
MC, Monte Carlo options, -, "fix gcmc"_fix_gcmc.html, -, -
MOLECULE, molecular system force fields, -, "Section_howto 6.3"_Section_howto.html#howto_3, peptide, -
OPT, optimized pair styles, Fischer & Richie & Natoli (2), "Section accelerate"_accelerate_opt.html, -, -
PERI, Peridynamics models, Mike Parks (Sandia), "pair_style peri"_pair_peri.html, peri, -
POEMS, coupled rigid body motion, Rudra Mukherjee (JPL), "fix poems"_fix_poems.html, rigid, lib/poems
PYTHON, embed Python code in an input script, -, "python"_python.html, python, lib/python
REAX, ReaxFF potential, Aidan Thompson (Sandia), "pair_style reax"_pair_reax.html, reax, lib/reax
REPLICA, multi-replica methods, -, "Section_howto 6.5"_Section_howto.html#howto_5, tad, -
RIGID, rigid bodies, -, "fix rigid"_fix_rigid.html, rigid, -
SHOCK, shock loading methods, -, "fix msst"_fix_msst.html, -, -
SNAP, quantum-fit potential, Aidan Thompson (Sandia), "pair snap"_pair_snap.html, snap, -
SRD, stochastic rotation dynamics, -, "fix srd"_fix_srd.html, srd, -
VORONOI, Voronoi tesselations, Daniel Schwen (LANL), "compute voronoi/atom"_compute_voronoi_atom.html, -, Voro++
XTC, dumps in XTC format, -, "dump"_dump.html, -, -
:tb(ea=c)
The "Authors" column lists a name(s) if a specific person is
responible for creating and maintaining the package.
(1) The FLD package was created by Amit Kumar and Michael Bybee from
Jonathan Higdon's group at UIUC.
(2) The OPT package was created by James Fischer (High Performance
Technologies), David Richie, and Vincent Natoli (Stone Ridge
Technolgy).
(3) The KIM package was created by Valeriu Smirichinski, Ryan Elliott,
and Ellad Tadmor (U Minn).
(4) The KOKKOS package was created primarily by Christian Trott
(Sandia). It uses the Kokkos library which was developed by Carter
Edwards, Christian, and collaborators at Sandia.
The "Doc page" column links to either a portion of the
"Section_howto"_Section_howto.html of the manual, or an input script
command implemented as part of the package.
The "Example" column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. "peptide" refers to the examples/peptide directory.
The "Library" column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/README or src/package/Makefile.lammps file for
info on where to download the library. "Section
start"_Section_start.html#start_3_3 of the manual also gives details
on how to build LAMMPS with both kinds of auxiliary libraries.
:line
:line
4.2 User packages :h4,link(pkg_2)
The current list of user-contributed packages is as follows:
Package, Description, Author(s), Doc page, Example, Pic/movie, Library
USER-ATC, atom-to-continuum coupling, Jones & Templeton & Zimmerman (1), "fix atc"_fix_atc.html, USER/atc, "atc"_atc, lib/atc
USER-AWPMD, wave-packet MD, Ilya Valuev (JIHT), "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, -, lib/awpmd
USER-CG-CMM, coarse-graining model, Axel Kohlmeyer (Temple U), "pair_style lj/sdk"_pair_sdk.html, USER/cg-cmm, "cg"_cg, -
USER-COLVARS, collective variables, Fiorin & Henin & Kohlmeyer (2), "fix colvars"_fix_colvars.html, USER/colvars, "colvars"_colvars, lib/colvars
USER-CUDA, NVIDIA GPU styles, Christian Trott (U Tech Ilmenau), "Section accelerate"_accelerate_cuda.html, USER/cuda, -, lib/cuda
USER-DIFFRACTION, virutal x-ray and electron diffraction, Shawn Coleman (ARL),"compute xrd"_compute_xrd.html, USER/diffraction, -, -
USER-DRUDE, Drude oscillators, Dequidt & Devemy & Padua (3), "tutorial"_tutorial_drude.html, USER/drude, -, -
USER-EFF, electron force field, Andres Jaramillo-Botero (Caltech), "pair_style eff/cut"_pair_eff.html, USER/eff, "eff"_eff, -
USER-FEP, free energy perturbation, Agilio Padua (U Blaise Pascal Clermont-Ferrand), "compute fep"_compute_fep.html, USER/fep, -, -
+USER-H5MD, dump output via HDF5, Pierre de Buyl (KU Leuven), "dump h5md"_dump_h5md.html, -, -, h5md
USER-INTEL, Vectorized CPU and Intel(R) coprocessor styles, W. Michael Brown (Intel), "Section accelerate"_accelerate_intel.html, examples/intel, -, -
USER-LB, Lattice Boltzmann fluid, Colin Denniston (U Western Ontario), "fix lb/fluid"_fix_lb_fluid.html, USER/lb, -, -
USER-MISC, single-file contributions, USER-MISC/README, USER-MISC/README, -, -, -
USER-MOLFILE, "VMD"_VMD molfile plug-ins, Axel Kohlmeyer (Temple U), "dump molfile"_dump_molfile.html, -, -, VMD-MOLFILE
USER-OMP, OpenMP threaded styles, Axel Kohlmeyer (Temple U), "Section accelerate"_accelerate_omp.html, -, -, -
USER-PHONON, phonon dynamical matrix, Ling-Ti Kong (Shanghai Jiao Tong U), "fix phonon"_fix_phonon.html, USER/phonon, -, -
USER-QMMM, QM/MM coupling, Axel Kohlmeyer (Temple U), "fix qmmm"_fix_qmmm.html, USER/qmmm, -, lib/qmmm
USER-QTB, quantum nuclear effects, Yuan Shen (Stanford), "fix qtb"_fix_qtb.html "fix_qbmsst"_fix_qbmsst.html, qtb, -, -
USER-QUIP, QUIP/libatoms interface, Albert Bartok-Partay (U Cambridge), "pair_style quip"_pair_quip.html, USER/quip, -, lib/quip
USER-REAXC, C version of ReaxFF, Metin Aktulga (LBNL), "pair_style reaxc"_pair_reax_c.html, reax, -, -
USER-SMD, smoothed Mach dynamics, Georg Ganzenmuller (EMI), "userguide.pdf"_PDF/SMD_LAMMPS_userguide.pdf, USER/smd, -, -
USER-SPH, smoothed particle hydrodynamics, Georg Ganzenmuller (EMI), "userguide.pdf"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, "sph"_sph, -
:tb(ea=c)
:link(atc,http://lammps.sandia.gov/pictures.html#atc)
:link(cg,http://lammps.sandia.gov/pictures.html#cg)
:link(eff,http://lammps.sandia.gov/movies.html#eff)
:link(sph,http://lammps.sandia.gov/movies.html#sph)
:link(VMD,http://www.ks.uiuc.edu/Research/vmd)
The "Authors" column lists a name(s) if a specific person is
responible for creating and maintaining the package.
If the Library is not listed as lib/package, then it is a third-party
library not included in the LAMMPS distribution. See the
src/package/Makefile.lammps file for info on where to download the
library from.
(2) The ATC package was created by Reese Jones, Jeremy Templeton, and
Jon Zimmerman (Sandia).
(2) The COLVARS package was created by Axel Kohlmeyer (Temple U) using
the colvars module library written by Giacomo Fiorin (Temple U) and
Jerome Henin (LISM, Marseille, France).
(3) The DRUDE package was created by Alain Dequidt (U Blaise Pascal
Clermont-Ferrand) and co-authors Julien Devemy (CNRS) and Agilio Padua
(U Blaise Pascal).
The "Doc page" column links to either a portion of the
"Section_howto"_Section_howto.html of the manual, or an input script
command implemented as part of the package, or to additional
documentation provided witht he package.
The "Example" column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. "peptide" refers to the examples/peptide directory. USER/cuda
refers to the examples/USER/cuda directory.
The "Library" column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/Makefile.lammps file for info on where to download
the library. "Section start"_Section_start.html#start_3_3 of the
manual also gives details on how to build LAMMPS with both kinds of
auxiliary libraries.
More details on each package, from the USER-*/README file is given
below.
:line
USER-ATC package :h4
This package implements a "fix atc" command which can be used in a
LAMMPS input script. This fix can be employed to either do concurrent
coupling of MD with FE-based physics surrogates or on-the-fly
post-processing of atomic information to continuum fields.
See the doc page for the fix atc command to get started. At the
bottom of the doc page are many links to additional documentation
contained in the doc/USER/atc directory.
There are example scripts for using this package in examples/USER/atc.
This package uses an external library in lib/atc which must be
compiled before making LAMMPS. See the lib/atc/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
The primary people who created this package are Reese Jones (rjones at
sandia.gov), Jeremy Templeton (jatempl at sandia.gov) and Jon
Zimmerman (jzimmer at sandia.gov) at Sandia. Contact them directly if
you have questions.
:line
USER-AWPMD package :h4
This package contains a LAMMPS implementation of the Antisymmetrized
Wave Packet Molecular Dynamics (AWPMD) method.
See the doc page for the pair_style awpmd/cut command to get started.
There are example scripts for using this package in examples/USER/awpmd.
This package uses an external library in lib/awpmd which must be
compiled before making LAMMPS. See the lib/awpmd/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
The person who created this package is Ilya Valuev at the JIHT in
Russia (valuev at physik.hu-berlin.de). Contact him directly if you
have questions.
:line
USER-CG-CMM package :h4
This package implements 3 commands which can be used in a LAMMPS input
script:
pair_style lj/sdk
pair_style lj/sdk/coul/long
angle_style sdk :ul
These styles allow coarse grained MD simulations with the
parametrization of Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007)
(SDK), with extensions to simulate ionic liquids, electrolytes, lipids
and charged amino acids.
See the doc pages for these commands for details.
There are example scripts for using this package in
examples/USER/cg-cmm.
This is the second generation implementation reducing the the clutter
of the previous version. For many systems with electrostatics, it will
be faster to use pair_style hybrid/overlay with lj/sdk and coul/long
instead of the combined lj/sdk/coul/long style. since the number of
charged atom types is usually small. For any other coulomb
interactions this is now required. To exploit this property, the use
of the kspace_style pppm/cg is recommended over regular pppm. For all
new styles, input file backward compatibility is provided. The old
implementation is still available through appending the /old
suffix. These will be discontinued and removed after the new
implementation has been fully validated.
The current version of this package should be considered beta
quality. The CG potentials work correctly for "normal" situations, but
have not been testing with all kinds of potential parameters and
simulation systems.
The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
:line
USER-COLVARS package :h4
This package implements the "fix colvars" command which can be
used in a LAMMPS input script.
This fix allows to use "collective variables" to implement
Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella
Sampling and Restraints. This code consists of two parts:
A portable collective variable module library written and maintained
by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and
Jerome Henin (LISM, CNRS, Marseille, France). This code is located in
the directory lib/colvars and needs to be compiled first. The colvars
fix and an interface layer, exchanges information between LAMMPS and
the collective variable module. :ul
See the doc page of "fix colvars"_fix_colvars.html for more details.
There are example scripts for using this package in
examples/USER/colvars
This is a very new interface that does not yet support all
features in the module and will see future optimizations
and improvements. The colvars module library is also available
in NAMD has been thoroughly used and tested there. Bugs and
problems are likely due to the interface layers code.
Thus the current version of this package should be considered
beta quality.
The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
:line
USER-CUDA package :h4
This package provides acceleration of various LAMMPS pair styles, fix
styles, compute styles, and long-range Coulombics via PPPM for NVIDIA
GPUs.
See this section of the manual to get started:
"Section_accelerate"_Section_accelerate.html#acc_7
There are example scripts for using this package in
examples/USER/cuda.
This package uses an external library in lib/cuda which must be
compiled before making LAMMPS. See the lib/cuda/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
The person who created this package is Christian Trott at the
University of Technology Ilmenau, Germany (christian.trott at
tu-ilmenau.de). Contact him directly if you have questions.
:line
USER-DIFFRACTION package :h4
This package contains the commands neeed to calculate x-ray and
electron diffraction intensities based on kinematic diffraction
theory.
See these doc pages and their related commands to get started:
"compute xrd"_compute_xrd.html
"compute saed"_compute_saed.html
"fix saed/vtk"_fix_saed_vtk.html :ul
The person who created this package is Shawn P. Coleman
(shawn.p.coleman8.ctr at mail.mil) while at the University of
Arkansas. Contact him directly if you have questions.
:line
USER-DRUDE package :h4
This package implements methods for simulating polarizable systems
in LAMMPS using thermalized Drude oscillators.
See these doc pages and their related commands to get started:
"Drude tutorial"_tutorial_drude.html
"fix drude"_fix_drude.html
"compute temp/drude"_compute_temp_drude.html
"fix langevin/drude"_fix_langevin_drude.html
"fix drude/transform/..."_fix_drude_transform.html
"pair thole"_pair_thole.html :ul
There are auxiliary tools for using this package in tools/drude.
The person who created this package is Alain Dequidt at Universite
Blaise Pascal Clermont-Ferrand (alain.dequidt at univ-bpclermont.fr)
Contact him directly if you have questions. Co-authors: Julien Devemy,
Agilio Padua.
:line
USER-EFF package :h4
This package contains a LAMMPS implementation of the electron Force
Field (eFF) currently under development at Caltech, as described in
A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, JCC,
2010. The eFF potential was first introduced by Su and Goddard, in
2007.
eFF can be viewed as an approximation to QM wave packet dynamics and
Fermionic molecular dynamics, combining the ability of electronic
structure methods to describe atomic structure, bonding, and chemistry
in materials, and of plasma methods to describe nonequilibrium
dynamics of large systems with a large number of highly excited
electrons. We classify it as a mixed QM-classical approach rather than
a conventional force field method, which introduces QM-based terms (a
spin-dependent repulsion term to account for the Pauli exclusion
principle and the electron wavefunction kinetic energy associated with
the Heisenberg principle) that reduce, along with classical
electrostatic terms between nuclei and electrons, to the sum of a set
of effective pairwise potentials. This makes eFF uniquely suited to
simulate materials over a wide range of temperatures and pressures
where electronically excited and ionized states of matter can occur
and coexist.
The necessary customizations to the LAMMPS core are in place to
enable the correct handling of explicit electron properties during
minimization and dynamics.
See the doc page for the pair_style eff/cut command to get started.
There are example scripts for using this package in
examples/USER/eff.
There are auxiliary tools for using this package in tools/eff.
The person who created this package is Andres Jaramillo-Botero at
CalTech (ajaramil at wag.caltech.edu). Contact him directly if you
have questions.
:line
USER-FEP package :h4
This package provides methods for performing free energy perturbation
simulations with soft-core pair potentials in LAMMPS.
See these doc pages and their related commands to get started:
"fix adapt/fep"_fix_adapt_fep.html
"compute fep"_compute_fep.html
"soft pair styles"_pair_lj_soft.html :ul
The person who created this package is Agilio Padua at Universite
Blaise Pascal Clermont-Ferrand (agilio.padua at univ-bpclermont.fr)
Contact him directly if you have questions.
:line
+USER-H5MD package :h4
+
+This package contains a "dump h5md"_dump_h5md.html command for
+performing a dump of atom properties in HDF5 format. "HDF5
+files"_HDF5 are binary, portable and self-describing and can be
+examined and used by a variety of auxiliary tools. The output HDF5
+files are structured in a format called H5MD, which was designed to
+store molecular data, and can be used and produced by various MD and
+MD-related codes. The "dump h5md"_doc/dump_h5md.html command gives a
+citation to a paper describing the format.
+
+:link(HDF5,http://www.hdfgroup.org/HDF5/)
+
+The person who created this package and the underlying H5MD format is
+Pierre de Buyl at KU Leuven (see http://pdebuyl.be). Contact him
+directly if you have questions.
+
+:line
+
USER-INTEL package :h4
This package provides options for performing neighbor list and
non-bonded force calculations in single, mixed, or double precision
and also a capability for accelerating calculations with an
Intel(R) Xeon Phi(TM) coprocessor.
See this section of the manual to get started:
"Section_accelerate"_Section_accelerate.html#acc_9
The person who created this package is W. Michael Brown at Intel
(michael.w.brown at intel.com). Contact him directly if you have questions.
:line
USER-LB package :h4
This package contains a LAMMPS implementation of a background
Lattice-Boltzmann fluid, which can be used to model MD particles
influenced by hydrodynamic forces.
See this doc page and its related commands to get started:
"fix lb/fluid"_fix_lb_fluid.html
The people who created this package are Frances Mackay (fmackay at
uwo.ca) and Colin (cdennist at uwo.ca) Denniston, University of
Western Ontario. Contact them directly if you have questions.
:line
USER-MISC package :h4
The files in this package are a potpourri of (mostly) unrelated
features contributed to LAMMPS by users. Each feature is a single
pair of files (*.cpp and *.h).
More information about each feature can be found by reading its doc
page in the LAMMPS doc directory. The doc page which lists all LAMMPS
input script commands is as follows:
"Section_commands"_Section_commands.html#cmd_5
User-contributed features are listed at the bottom of the fix,
compute, pair, etc sections.
The list of features and author of each is given in the
src/USER-MISC/README file.
You should contact the author directly if you have specific questions
about the feature or its coding.
:line
USER-MOLFILE package :h4
This package contains a dump molfile command which uses molfile
plugins that are bundled with the
"VMD"_http://www.ks.uiuc.edu/Research/vmd molecular visualization and
analysis program, to enable LAMMPS to dump its information in formats
compatible with various molecular simulation tools.
The package only provides the interface code, not the plugins. These
can be obtained from a VMD installation which has to match the
platform that you are using to compile LAMMPS for. By adding plugins
to VMD, support for new file formats can be added to LAMMPS (or VMD or
other programs that use them) without having to recompile the
application itself.
See this doc page to get started:
"dump molfile"_dump_molfile.html#acc_5
The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
:line
USER-OMP package :h4
This package provides OpenMP multi-threading support and
other optimizations of various LAMMPS pair styles, dihedral
styles, and fix styles.
See this section of the manual to get started:
"Section_accelerate"_Section_accelerate.html#acc_5
The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
:line
USER-PHONON package :h4
This package contains a fix phonon command that calculates dynamical
matrices, which can then be used to compute phonon dispersion
relations, directly from molecular dynamics simulations.
See this doc page to get started:
"fix phonon"_fix_phonon.html
The person who created this package is Ling-Ti Kong (konglt at
sjtu.edu.cn) at Shanghai Jiao Tong University. Contact him directly
if you have questions.
:line
USER-QMMM package :h4
This package provides a fix qmmm command which allows LAMMPS to be
used in a QM/MM simulation, currently only in combination with pw.x
code from the "Quantum ESPRESSO"_espresso package.
:link(espresso,http://www.quantum-espresso.org)
The current implementation only supports an ONIOM style mechanical
coupling to the Quantum ESPRESSO plane wave DFT package.
Electrostatic coupling is in preparation and the interface has been
written in a manner that coupling to other QM codes should be possible
without changes to LAMMPS itself.
See this doc page to get started:
"fix qmmm"_fix_qmmm.html
as well as the lib/qmmm/README file.
The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
:line
USER-QTB package :h4
This package provides a self-consistent quantum treatment of the
vibrational modes in a classical molecular dynamics simulation. By
coupling the MD simulation to a colored thermostat, it introduces zero
point energy into the system, alter the energy power spectrum and the
heat capacity towards their quantum nature. This package could be of
interest if one wants to model systems at temperatures lower than
their classical limits or when temperatures ramp up across the
classical limits in the simulation.
See these two doc pages to get started:
"fix qtb"_fix_qtb.html provides quantum nulcear correction through a
colored thermostat and can be used with other time integration schemes
like "fix nve"_fix_nve.html or "fix nph"_fix_nh.html.
"fix qbmsst"_fix_qbmsst.html enables quantum nuclear correction of a
multi-scale shock technique simulation by coupling the quantum thermal
bath with the shocked system.
The person who created this package is Yuan Shen (sy0302 at
stanford.edu) at Stanford University. Contact him directly if you
have questions.
:line
USER-REAXC package :h4
This package contains a implementation for LAMMPS of the ReaxFF force
field. ReaxFF uses distance-dependent bond-order functions to
represent the contributions of chemical bonding to the potential
energy. It was originally developed by Adri van Duin and the Goddard
group at CalTech.
The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in
C, should give identical or very similar results to pair_style reax,
which is a ReaxFF implementation on top of a Fortran library, a
version of which library was originally authored by Adri van Duin.
The reax/c version should be somewhat faster and more scalable,
particularly with respect to the charge equilibration calculation. It
should also be easier to build and use since there are no complicating
issues with Fortran memory allocation or linking to a Fortran library.
For technical details about this implemention of ReaxFF, see
this paper:
Parallel and Scalable Reactive Molecular Dynamics: Numerical Methods
and Algorithmic Techniques, H. M. Aktulga, J. C. Fogarty,
S. A. Pandit, A. Y. Grama, Parallel Computing, in press (2011).
See the doc page for the pair_style reax/c command for details
of how to use it in LAMMPS.
The person who created this package is Hasan Metin Aktulga (hmaktulga
at lbl.gov), while at Purdue University. Contact him directly, or
Aidan Thompson at Sandia (athomps at sandia.gov), if you have
questions.
:line
USER-SMD package :h4
This package implements smoothed Mach dynamics (SMD) in
LAMMPS. Currently, the package has the following features:
* Does liquids via traditional Smooth Particle Hydrodynamics (SPH)
* Also solves solids mechanics problems via a state of the art
stabilized meshless method with hourglass control.
* Can specify hydrostatic interactions independently from material
strength models, i.e. pressure and deviatoric stresses are separated.
* Many material models available (Johnson-Cook, plasticity with
hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new
material models.
* Rigid boundary conditions (walls) can be loaded as surface geometries
from *.STL files.
See the file doc/PDF/SMD_LAMMPS_userguide.pdf to get started.
There are example scripts for using this package in examples/USER/smd.
The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.
USER-SPH package :h4
This package implements smoothed particle hydrodynamics (SPH) in
LAMMPS. Currently, the package has the following features:
* Tait, ideal gas, Lennard-Jones equation of states, full support for
complete (i.e. internal-energy dependent) equations of state
* Plain or Monaghans XSPH integration of the equations of motion
* Density continuity or density summation to propagate the density field
* Commands to set internal energy and density of particles from the
input script
* Output commands to access internal energy and density for dumping and
thermo output
See the file doc/PDF/SPH_LAMMPS_userguide.pdf to get started.
There are example scripts for using this package in examples/USER/sph.
The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.
diff --git a/doc/Section_start.html b/doc/Section_start.html
index 9dbc32b4a..dea1518fd 100644
--- a/doc/Section_start.html
+++ b/doc/Section_start.html
@@ -1,1914 +1,1929 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2. Getting Started &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<link rel="next" title="3. Commands" href="Section_commands.html"/>
<link rel="prev" title="1. Introduction" href="Section_intro.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">2. Getting Started</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#what-s-in-the-lammps-distribution">2.1. What&#8217;s in the LAMMPS distribution</a></li>
<li class="toctree-l2"><a class="reference internal" href="#making-lammps">2.2. Making LAMMPS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#making-lammps-with-optional-packages">2.3. Making LAMMPS with optional packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-lammps-via-the-make-py-script">2.4. Building LAMMPS via the Make.py script</a></li>
<li class="toctree-l2"><a class="reference internal" href="#building-lammps-as-a-library">2.5. Building LAMMPS as a library</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#static-library">2.5.1. <strong>Static library:</strong></a></li>
<li class="toctree-l3"><a class="reference internal" href="#shared-library">2.5.2. <strong>Shared library:</strong></a></li>
<li class="toctree-l3"><a class="reference internal" href="#additional-requirement-for-using-a-shared-library">2.5.3. <strong>Additional requirement for using a shared library:</strong></a></li>
<li class="toctree-l3"><a class="reference internal" href="#calling-the-lammps-library">2.5.4. <strong>Calling the LAMMPS library:</strong></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#running-lammps">2.6. Running LAMMPS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#command-line-options">2.7. Command-line options</a></li>
<li class="toctree-l2"><a class="reference internal" href="#lammps-screen-output">2.8. LAMMPS screen output</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tips-for-users-of-previous-lammps-versions">2.9. Tips for users of previous LAMMPS versions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>2. Getting Started</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
<div class="rst-footer-buttons" style="margin-bottom: 1em" role="navigation" aria-label="footer navigation">
<a href="Section_commands.html" class="btn btn-neutral float-right" title="3. Commands" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_intro.html" class="btn btn-neutral" title="1. Introduction" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="getting-started">
<h1>2. Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline">¶</a></h1>
<p>This section describes how to build and run LAMMPS, for both new and
experienced users.</p>
<div class="line-block">
<div class="line">2.1 <a class="reference internal" href="#start-1"><span>What&#8217;s in the LAMMPS distribution</span></a></div>
<div class="line">2.2 <a class="reference internal" href="#start-2"><span>Making LAMMPS</span></a></div>
<div class="line">2.3 <a class="reference internal" href="#start-3"><span>Making LAMMPS with optional packages</span></a></div>
<div class="line">2.4 <a class="reference internal" href="#start-4"><span>Building LAMMPS via the Make.py script</span></a></div>
<div class="line">2.5 <a class="reference internal" href="#start-5"><span>Building LAMMPS as a library</span></a></div>
<div class="line">2.6 <a class="reference internal" href="#start-6"><span>Running LAMMPS</span></a></div>
<div class="line">2.7 <a class="reference internal" href="#start-7"><span>Command-line options</span></a></div>
<div class="line">2.8 <a class="reference internal" href="#start-8"><span>Screen output</span></a></div>
<div class="line">2.9 <a class="reference internal" href="#start-9"><span>Tips for users of previous versions</span></a></div>
<div class="line"><br /></div>
</div>
<div class="section" id="what-s-in-the-lammps-distribution">
<span id="start-1"></span><h2>2.1. What&#8217;s in the LAMMPS distribution<a class="headerlink" href="#what-s-in-the-lammps-distribution" title="Permalink to this headline">¶</a></h2>
<p>When you download a LAMMPS tarball you will need to unzip and untar
the downloaded file with the following commands, after placing the
tarball in an appropriate directory.</p>
<div class="highlight-python"><div class="highlight"><pre>gunzip lammps*.tar.gz
tar xvf lammps*.tar
</pre></div>
</div>
<p>This will create a LAMMPS directory containing two files and several
sub-directories:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>README</td>
<td>text file</td>
</tr>
<tr class="row-even"><td>LICENSE</td>
<td>the GNU General Public License (GPL)</td>
</tr>
<tr class="row-odd"><td>bench</td>
<td>benchmark problems</td>
</tr>
<tr class="row-even"><td>doc</td>
<td>documentation</td>
</tr>
<tr class="row-odd"><td>examples</td>
<td>simple test problems</td>
</tr>
<tr class="row-even"><td>potentials</td>
<td>embedded atom method (EAM) potential files</td>
</tr>
<tr class="row-odd"><td>src</td>
<td>source files</td>
</tr>
<tr class="row-even"><td>tools</td>
<td>pre- and post-processing tools</td>
</tr>
</tbody>
</table>
<p>Note that the <a class="reference external" href="download">download page</a> also has links to download
Windows exectubles and installers, as well as pre-built executables
for a few specific Linux distributions. It also has instructions for
how to download/install LAMMPS for Macs (via Homebrew), and to
download and update LAMMPS from SVN and Git repositories, which gives
you the same files that are in the download tarball.</p>
<p>The Windows and Linux executables for serial or parallel only include
certain packages and bug-fixes/upgrades listed on <a class="reference external" href="http://lammps.sandia.gov/bug.html">this page</a> up to a certain date, as
stated on the download page. If you want an executable with
non-included packages or that is more current, then you&#8217;ll need to
build LAMMPS yourself, as discussed in the next section.</p>
<p>Skip to the <a class="reference internal" href="#start-6"><span>Running LAMMPS</span></a> sections for info on how to
launch a LAMMPS Windows executable on a Windows box.</p>
<hr class="docutils" />
</div>
<div class="section" id="making-lammps">
<span id="start-2"></span><h2>2.2. Making LAMMPS<a class="headerlink" href="#making-lammps" title="Permalink to this headline">¶</a></h2>
<p>This section has the following sub-sections:</p>
<ul class="simple">
<li><a class="reference internal" href="#start-2-1"><span>Read this first</span></a></li>
<li><a class="reference internal" href="#start-2-2"><span>Steps to build a LAMMPS executable</span></a></li>
<li><a class="reference internal" href="#start-2-3"><span>Common errors that can occur when making LAMMPS</span></a></li>
<li><a class="reference internal" href="#start-2-4"><span>Additional build tips</span></a></li>
<li><a class="reference internal" href="#start-2-5"><span>Building for a Mac</span></a></li>
<li><a class="reference internal" href="#start-2-6"><span>Building for Windows</span></a></li>
</ul>
<hr class="docutils" />
<p id="start-2-1"><strong>*Read this first:*</strong></p>
<p>If you want to avoid building LAMMPS yourself, read the preceeding
section about options available for downloading and installing
executables. Details are discussed on the <a class="reference external" href="download">download</a> page.</p>
<p>Building LAMMPS can be simple or not-so-simple. If all you need are
the default packages installed in LAMMPS, and MPI is already installed
on your machine, or you just want to run LAMMPS in serial, then you
can typically use the Makefile.mpi or Makefile.serial files in
src/MAKE by typing one of these lines (from the src dir):</p>
<div class="highlight-python"><div class="highlight"><pre>make mpi
make serial
</pre></div>
</div>
<p>Note that on a facility supercomputer, there are often &#8220;modules&#8221;
loaded in your environment that provide the compilers and MPI you
should use. In this case, the &#8220;mpicxx&#8221; compile/link command in
Makefile.mpi should just work by accessing those modules.</p>
<p>It may be the case that one of the other Makefile.machine files in the
src/MAKE sub-directories is a better match to your system (type &#8220;make&#8221;
to see a list), you can use it as-is by typing (for example):</p>
<div class="highlight-python"><div class="highlight"><pre>make stampede
</pre></div>
</div>
<p>If any of these builds (with an existing Makefile.machine) works on
your system, then you&#8217;re done!</p>
<p>If you want to do one of the following:</p>
<ul class="simple">
<li>use optional LAMMPS features that require additional libraries</li>
<li>use optional packages that require additional libraries</li>
<li>use optional accelerator packages that require special compiler/linker settings</li>
<li>run on a specialized platform that has its own compilers, settings, or other libs to use</li>
</ul>
<p>then building LAMMPS is more complicated. You may need to find where
auxiliary libraries exist on your machine or install them if they
don&#8217;t. You may need to build additional libraries that are part of
the LAMMPS package, before building LAMMPS. You may need to edit a
Makefile.machine file to make it compatible with your system.</p>
<p>Note that there is a Make.py tool in the src directory that automates
several of these steps, but you still have to know what you are doing.
<a class="reference internal" href="#start-4"><span>Section 2.4</span></a> below describes the tool. It is a convenient
way to work with installing/un-installing various packages, the
Makefile.machine changes required by some packages, and the auxiliary
libraries some of them use.</p>
<p>Please read the following sections carefully. If you are not
comfortable with makefiles, or building codes on a Unix platform, or
running an MPI job on your machine, please find a local expert to help
you. Many compilation, linking, and run problems that users have are
often not really LAMMPS issues - they are peculiar to the user&#8217;s
system, compilers, libraries, etc. Such questions are better answered
by a local expert.</p>
<p>If you have a build problem that you are convinced is a LAMMPS issue
(e.g. the compiler complains about a line of LAMMPS source code), then
please post the issue to the <a class="reference external" href="http://lammps.sandia.gov/mail.html">LAMMPS mail list</a>.</p>
<p>If you succeed in building LAMMPS on a new kind of machine, for which
there isn&#8217;t a similar machine Makefile included in the
src/MAKE/MACHINES directory, then send it to the developers and we can
include it in the LAMMPS distribution.</p>
<hr class="docutils" />
<p id="start-2-2"><strong>*Steps to build a LAMMPS executable:*</strong></p>
<p><strong>Step 0</strong></p>
<p>The src directory contains the C++ source and header files for LAMMPS.
It also contains a top-level Makefile and a MAKE sub-directory with
low-level Makefile.* files for many systems and machines. See the
src/MAKE/README file for a quick overview of what files are available
and what sub-directories they are in.</p>
<p>The src/MAKE dir has a few files that should work as-is on many
platforms. The src/MAKE/OPTIONS dir has more that invoke additional
compiler, MPI, and other setting options commonly used by LAMMPS, to
illustrate their syntax. The src/MAKE/MACHINES dir has many more that
have been tweaked or optimized for specific machines. These files are
all good starting points if you find you need to change them for your
machine. Put any file you edit into the src/MAKE/MINE directory and
it will be never be touched by any LAMMPS updates.</p>
<p>&gt;From within the src directory, type &#8220;make&#8221; or &#8220;gmake&#8221;. You should see
a list of available choices from src/MAKE and all of its
sub-directories. If one of those has the options you want or is the
machine you want, you can type a command like:</p>
<div class="highlight-python"><div class="highlight"><pre>make mpi
or
make serial_icc
or
gmake mac
</pre></div>
</div>
<p>Note that the corresponding Makefile.machine can exist in src/MAKE or
any of its sub-directories. If a file with the same name appears in
multiple places (not a good idea), the order they are used is as
follows: src/MAKE/MINE, src/MAKE, src/MAKE/OPTIONS, src/MAKE/MACHINES.
This gives preference to a file you have created/edited and put in
src/MAKE/MINE.</p>
<p>Note that on a multi-processor or multi-core platform you can launch a
parallel make, by using the &#8220;-j&#8221; switch with the make command, which
will build LAMMPS more quickly.</p>
<p>If you get no errors and an executable like lmp_mpi or lmp_g++_serial
or lmp_mac is produced, then you&#8217;re done; it&#8217;s your lucky day.</p>
<p>Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see <a class="reference internal" href="#start-3"><span>this section</span></a> below.</p>
<p><strong>Step 1</strong></p>
<p>If Step 0 did not work, you will need to create a low-level Makefile
for your machine, like Makefile.foo. You should make a copy of an
existing Makefile.* in src/MAKE or one of its sub-directories as a
starting point. The only portions of the file you need to edit are
the first line, the &#8220;compiler/linker settings&#8221; section, and the
&#8220;LAMMPS-specific settings&#8221; section. When it works, put the edited
file in src/MAKE/MINE and it will not be altered by any future LAMMPS
updates.</p>
<p><strong>Step 2</strong></p>
<p>Change the first line of Makefile.foo to list the word &#8220;foo&#8221; after the
&#8220;#&#8221;, and whatever other options it will set. This is the line you
will see if you just type &#8220;make&#8221;.</p>
<p><strong>Step 3</strong></p>
<p>The &#8220;compiler/linker settings&#8221; section lists compiler and linker
settings for your C++ compiler, including optimization flags. You can
use g++, the open-source GNU compiler, which is available on all Unix
systems. You can also use mpicxx which will typically be available if
MPI is installed on your system, though you should check which actual
compiler it wraps. Vendor compilers often produce faster code. On
boxes with Intel CPUs, we suggest using the Intel icc compiler, which
can be downloaded from <a class="reference external" href="http://www.intel.com/software/products/noncom">Intel&#8217;s compiler site</a>.</p>
<p>If building a C++ code on your machine requires additional libraries,
then you should list them as part of the LIB variable. You should
not need to do this if you use mpicxx.</p>
<p>The DEPFLAGS setting is what triggers the C++ compiler to create a
dependency list for a source file. This speeds re-compilation when
source (<em>.cpp) or header (</em>.h) files are edited. Some compilers do
not support dependency file creation, or may use a different switch
than -D. GNU g++ and Intel icc works with -D. If your compiler can&#8217;t
create dependency files, then you&#8217;ll need to create a Makefile.foo
patterned after Makefile.storm, which uses different rules that do not
involve dependency files. Note that when you build LAMMPS for the
first time on a new platform, a long list of <a href="#id1"><span class="problematic" id="id2">*</span></a>.d files will be printed
out rapidly. This is not an error; it is the Makefile doing its
normal creation of dependencies.</p>
<p><strong>Step 4</strong></p>
<p>The &#8220;system-specific settings&#8221; section has several parts. Note that
if you change any -D setting in this section, you should do a full
re-compile, after typing &#8220;make clean&#8221; (which will describe different
clean options).</p>
<p>The LMP_INC variable is used to include options that turn on ifdefs
within the LAMMPS code. The options that are currently recogized are:</p>
<ul class="simple">
<li>-DLAMMPS_GZIP</li>
<li>-DLAMMPS_JPEG</li>
<li>-DLAMMPS_PNG</li>
<li>-DLAMMPS_FFMPEG</li>
<li>-DLAMMPS_MEMALIGN</li>
<li>-DLAMMPS_XDR</li>
<li>-DLAMMPS_SMALLBIG</li>
<li>-DLAMMPS_BIGBIG</li>
<li>-DLAMMPS_SMALLSMALL</li>
<li>-DLAMMPS_LONGLONG_TO_LONG</li>
<li>-DPACK_ARRAY</li>
<li>-DPACK_POINTER</li>
<li>-DPACK_MEMCPY</li>
</ul>
<p>The read_data and dump commands will read/write gzipped files if you
compile with -DLAMMPS_GZIP. It requires that your machine supports
-the &#8220;popen&#8221; function in the standard runtime library and that a gzip
+the &#8220;popen()&#8221; function in the standard runtime library and that a gzip
executable can be found by LAMMPS during a run.</p>
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">on some clusters with high-speed networks, using the
+fork() library calls (required by popen()) can interfere with the fast
+communication library and lead to simulations using compressed output
+or input to hang or crash. For selected operations, compressed file
+I/O is also available using a compression library instead, which are
+provided in the COMPRESS package. From more details about compiling
+LAMMPS with packages, please see below.</p>
+</div>
<p>If you use -DLAMMPS_JPEG, the <a class="reference internal" href="dump_image.html"><em>dump image</em></a> command
will be able to write out JPEG image files. For JPEG files, you must
also link LAMMPS with a JPEG library, as described below. If you use
-DLAMMPS_PNG, the <a class="reference internal" href="dump.html"><em>dump image</em></a> command will be able to write
out PNG image files. For PNG files, you must also link LAMMPS with a
PNG library, as described below. If neither of those two defines are
used, LAMMPS will only be able to write out uncompressed PPM image
files.</p>
<p>If you use -DLAMMPS_FFMPEG, the <a class="reference internal" href="dump_image.html"><em>dump movie</em></a> command
will be available to support on-the-fly generation of rendered movies
the need to store intermediate image files. It requires that your
machines supports the &#8220;popen&#8221; function in the standard runtime library
and that an FFmpeg executable can be found by LAMMPS during the run.</p>
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Similar to the note above, this option can conflict
+with high-speed networks, because it uses popen().</p>
+</div>
<p>Using -DLAMMPS_MEMALIGN=&lt;bytes&gt; enables the use of the
posix_memalign() call instead of malloc() when large chunks or memory
are allocated by LAMMPS. This can help to make more efficient use of
vector instructions of modern CPUS, since dynamically allocated memory
has to be aligned on larger than default byte boundaries (e.g. 16
bytes instead of 8 bytes on x86 type platforms) for optimal
performance.</p>
<p>If you use -DLAMMPS_XDR, the build will include XDR compatibility
files for doing particle dumps in XTC format. This is only necessary
if your platform does have its own XDR files available. See the
Restrictions section of the <a class="reference internal" href="dump.html"><em>dump</em></a> command for details.</p>
<p>Use at most one of the -DLAMMPS_SMALLBIG, -DLAMMPS_BIGBIG, -D-
DLAMMPS_SMALLSMALL settings. The default is -DLAMMPS_SMALLBIG. These
settings refer to use of 4-byte (small) vs 8-byte (big) integers
within LAMMPS, as specified in src/lmptype.h. The only reason to use
the BIGBIG setting is to enable simulation of huge molecular systems
(which store bond topology info) with more than 2 billion atoms, or to
track the image flags of moving atoms that wrap around a periodic box
more than 512 times. Normally, the only reason to use SMALLSMALL is
if your machine does not support 64-bit integers, though you can use
SMALLSMALL setting if you are running in serial or on a desktop
machine or small cluster where you will never run large systems or for
long time (more than 2 billion atoms, more than 2 billion timesteps).
See the <a class="reference internal" href="#start-2-4"><span>Additional build tips</span></a> section below for more
details on these settings.</p>
<p>Note that two packages, USER-ATC and USER-CUDA are not currently
compatible with -DLAMMPS_BIGBIG. Also the GPU package requires the
lib/gpu library to be compiled with the same setting, or the link will
fail.</p>
<p>The -DLAMMPS_LONGLONG_TO_LONG setting may be needed if your system or
MPI version does not recognize &#8220;long long&#8221; data types. In this case a
&#8220;long&#8221; data type is likely already 64-bits, in which case this setting
will convert to that data type.</p>
<p>Using one of the -DPACK_ARRAY, -DPACK_POINTER, and -DPACK_MEMCPY
options can make for faster parallel FFTs (in the PPPM solver) on some
platforms. The -DPACK_ARRAY setting is the default. See the
<a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a> command for info about PPPM. See
Step 6 below for info about building LAMMPS with an FFT library.</p>
<p><strong>Step 5</strong></p>
<p>The 3 MPI variables are used to specify an MPI library to build LAMMPS
with. Note that you do not need to set these if you use the MPI
compiler mpicxx for your CC and LINK setting in the section above.
The MPI wrapper knows where to find the needed files.</p>
<p>If you want LAMMPS to run in parallel, you must have an MPI library
installed on your platform. If MPI is installed on your system in the
usual place (under /usr/local), you also may not need to specify these
3 variables, assuming /usr/local is in your path. On some large
parallel machines which use &#8220;modules&#8221; for their compile/link
environements, you may simply need to include the correct module in
your build environment, before building LAMMPS. Or the parallel
machine may have a vendor-provided MPI which the compiler has no
trouble finding.</p>
<p>Failing this, these 3 variables can be used to specify where the mpi.h
file (MPI_INC) and the MPI library file (MPI_PATH) are found and the
name of the library file (MPI_LIB).</p>
<p>If you are installing MPI yourself, we recommend Argonne&#8217;s MPICH2
or OpenMPI. MPICH can be downloaded from the <a class="reference external" href="http://www.mcs.anl.gov/research/projects/mpich2/">Argonne MPI site</a>. OpenMPI can
be downloaded from the <a class="reference external" href="http://www.open-mpi.org">OpenMPI site</a>.
Other MPI packages should also work. If you are running on a big
parallel platform, your system people or the vendor should have
already installed a version of MPI, which is likely to be faster
than a self-installed MPICH or OpenMPI, so find out how to build
and link with it. If you use MPICH or OpenMPI, you will have to
configure and build it for your platform. The MPI configure script
should have compiler options to enable you to use the same compiler
you are using for the LAMMPS build, which can avoid problems that can
arise when linking LAMMPS to the MPI library.</p>
<p>If you just want to run LAMMPS on a single processor, you can use the
dummy MPI library provided in src/STUBS, since you don&#8217;t need a true
MPI library installed on your system. See src/MAKE/Makefile.serial
for how to specify the 3 MPI variables in this case. You will also
need to build the STUBS library for your platform before making LAMMPS
itself. Note that if you are building with src/MAKE/Makefile.serial,
e.g. by typing &#8220;make serial&#8221;, then the STUBS library is built for you.</p>
<p>To build the STUBS library from the src directory, type &#8220;make
mpi-stubs&#8221;, or from the src/STUBS dir, type &#8220;make&#8221;. This should
create a libmpi_stubs.a file suitable for linking to LAMMPS. If the
build fails, you will need to edit the STUBS/Makefile for your
platform.</p>
<p>The file STUBS/mpi.c provides a CPU timer function called MPI_Wtime()
that calls gettimeofday() . If your system doesn&#8217;t support
gettimeofday() , you&#8217;ll need to insert code to call another timer.
Note that the ANSI-standard function clock() rolls over after an hour
or so, and is therefore insufficient for timing long LAMMPS
simulations.</p>
<p><strong>Step 6</strong></p>
<p>The 3 FFT variables allow you to specify an FFT library which LAMMPS
uses (for performing 1d FFTs) when running the particle-particle
particle-mesh (PPPM) option for long-range Coulombics via the
<a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a> command.</p>
<p>LAMMPS supports various open-source or vendor-supplied FFT libraries
for this purpose. If you leave these 3 variables blank, LAMMPS will
use the open-source <a class="reference external" href="http://kissfft.sf.net">KISS FFT library</a>, which is
included in the LAMMPS distribution. This library is portable to all
platforms and for typical LAMMPS simulations is almost as fast as FFTW
or vendor optimized libraries. If you are not including the KSPACE
package in your build, you can also leave the 3 variables blank.</p>
<p>Otherwise, select which kinds of FFTs to use as part of the FFT_INC
setting by a switch of the form -DFFT_XXX. Recommended values for XXX
are: MKL, SCSL, FFTW2, and FFTW3. Legacy options are: INTEL, SGI,
ACML, and T3E. For backward compatability, using -DFFT_FFTW will use
the FFTW2 library. Using -DFFT_NONE will use the KISS library
described above.</p>
<p>You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables,
so the compiler and linker can find the needed FFT header and library
files. Note that on some large parallel machines which use &#8220;modules&#8221;
for their compile/link environements, you may simply need to include
the correct module in your build environment. Or the parallel machine
may have a vendor-provided FFT library which the compiler has no
trouble finding.</p>
<p>FFTW is a fast, portable library that should also work on any
platform. You can download it from
<a class="reference external" href="http://www.fftw.org">www.fftw.org</a>. Both the legacy version 2.1.X and
the newer 3.X versions are supported as -DFFT_FFTW2 or -DFFT_FFTW3.
Building FFTW for your box should be as simple as ./configure; make.
Note that on some platforms FFTW2 has been pre-installed, and uses
renamed files indicating the precision it was compiled with,
e.g. sfftw.h, or dfftw.h instead of fftw.h. In this case, you can
specify an additional define variable for FFT_INC called -DFFTW_SIZE,
which will select the correct include file. In this case, for FFT_LIB
you must also manually specify the correct library, namely -lsfftw or
-ldfftw.</p>
<p>The FFT_INC variable also allows for a -DFFT_SINGLE setting that will
use single-precision FFTs with PPPM, which can speed-up long-range
calulations, particularly in parallel or on GPUs. Fourier transform
and related PPPM operations are somewhat insensitive to floating point
truncation errors and thus do not always need to be performed in
double precision. Using the -DFFT_SINGLE setting trades off a little
accuracy for reduced memory use and parallel communication costs for
transposing 3d FFT data. Note that single precision FFTs have only
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.</p>
<p><strong>Step 7</strong></p>
<p>The 3 JPG variables allow you to specify a JPEG and/or PNG library
which LAMMPS uses when writing out JPEG or PNG files via the <a class="reference internal" href="dump_image.html"><em>dump image</em></a> command. These can be left blank if you do not
use the -DLAMMPS_JPEG or -DLAMMPS_PNG switches discussed above in Step
4, since in that case JPEG/PNG output will be disabled.</p>
<p>A standard JPEG library usually goes by the name libjpeg.a or
libjpeg.so and has an associated header file jpeglib.h. Whichever
JPEG library you have on your platform, you&#8217;ll need to set the
appropriate JPG_INC, JPG_PATH, and JPG_LIB variables, so that the
compiler and linker can find it.</p>
<p>A standard PNG library usually goes by the name libpng.a or libpng.so
and has an associated header file png.h. Whichever PNG library you
have on your platform, you&#8217;ll need to set the appropriate JPG_INC,
JPG_PATH, and JPG_LIB variables, so that the compiler and linker can
find it.</p>
<p>As before, if these header and library files are in the usual place on
your machine, you may not need to set these variables.</p>
<p><strong>Step 8</strong></p>
<p>Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see <a class="reference internal" href="#start-3"><span>this section</span></a> below, before proceeding to Step 9.</p>
<p><strong>Step 9</strong></p>
<p>That&#8217;s it. Once you have a correct Makefile.foo, and you have
pre-built any other needed libraries (e.g. MPI, FFT, etc) all you need
to do from the src directory is type something like this:</p>
<div class="highlight-python"><div class="highlight"><pre>make foo
or
gmake foo
</pre></div>
</div>
<p>You should get the executable lmp_foo when the build is complete.</p>
<hr class="docutils" />
<p id="start-2-3"><strong>*Errors that can occur when making LAMMPS:*</strong></p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If an error occurs when building LAMMPS, the compiler
or linker will state very explicitly what the problem is. The error
message should give you a hint as to which of the steps above has
failed, and what you need to do in order to fix it. Building a code
with a Makefile is a very logical process. The compiler and linker
need to find the appropriate files and those files need to be
compatible with LAMMPS source files. When a make fails, there is
usually a very simple reason, which you or a local expert will need to
fix.</p>
</div>
<p>Here are two non-obvious errors that can occur:</p>
<p>(1) If the make command breaks immediately with errors that indicate
it can&#8217;t find files with a &#8220;*&#8221; in their names, this can be because
your machine&#8217;s native make doesn&#8217;t support wildcard expansion in a
makefile. Try gmake instead of make. If that doesn&#8217;t work, try using
a -f switch with your make command to use a pre-generated
Makefile.list which explicitly lists all the needed files, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>make makelist
make -f Makefile.list linux
gmake -f Makefile.list mac
</pre></div>
</div>
<p>The first &#8220;make&#8221; command will create a current Makefile.list with all
the file names in your src dir. The 2nd &#8220;make&#8221; command (make or
gmake) will use it to build LAMMPS. Note that you should
include/exclude any desired optional packages before using the &#8220;make
makelist&#8221; command.</p>
<p>(2) If you get an error that says something like &#8216;identifier &#8220;atoll&#8221;
is undefined&#8217;, then your machine does not support &#8220;long long&#8221;
integers. Try using the -DLAMMPS_LONGLONG_TO_LONG setting described
above in Step 4.</p>
<hr class="docutils" />
<p id="start-2-4"><strong>*Additional build tips:*</strong></p>
<ol class="arabic simple">
<li>Building LAMMPS for multiple platforms.</li>
</ol>
<p>You can make LAMMPS for multiple platforms from the same src
directory. Each target creates its own object sub-directory called
Obj_target where it stores the system-specific <a href="#id3"><span class="problematic" id="id4">*</span></a>.o files.</p>
<ol class="arabic simple" start="2">
<li>Cleaning up.</li>
</ol>
<p>Typing &#8220;make clean-all&#8221; or &#8220;make clean-machine&#8221; will delete <a href="#id5"><span class="problematic" id="id6">*</span></a>.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.</p>
<p>(3) Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL</p>
<p>As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.</p>
<p>The default is -DLAMMPS_SMALLBIG which allows for systems with up to
2^63 atoms and 2^63 timesteps (about 9e18). The atom limit is for
atomic systems which do not store bond topology info and thus do not
require atom IDs. If you use atom IDs for atomic systems (which is
the default) or if you use a molecular model, which stores bond
topology info and thus requires atom IDs, the limit is 2^31 atoms
(about 2 billion). This is because the IDs are stored in 32-bit
integers.</p>
<p>Likewise, with this setting, the 3 image flags for each atom (see the
<a class="reference internal" href="dump.html"><em>dump</em></a> doc page for a discussion) are stored in a 32-bit
integer, which means the atoms can only wrap around a periodic box (in
each dimension) at most 512 times. If atoms move through the periodic
box more than this many times, the image flags will &#8220;roll over&#8221;,
e.g. from 511 to -512, which can cause diagnostics like the
mean-squared displacement, as calculated by the <a class="reference internal" href="compute_msd.html"><em>compute msd</em></a> command, to be faulty.</p>
<p>To allow for larger atomic systems with atom IDs or larger molecular
systems or larger image flags, compile with -DLAMMPS_BIGBIG. This
stores atom IDs and image flags in 64-bit integers. This enables
atomic or molecular systems with atom IDS of up to 2^63 atoms (about
9e18). And image flags will not &#8220;roll over&#8221; until they reach 2^20 =
1048576.</p>
<p>If your system does not support 8-byte integers, you will need to
compile with the -DLAMMPS_SMALLSMALL setting. This will restrict the
total number of atoms (for atomic or molecular systems) and timesteps
to 2^31 (about 2 billion). Image flags will roll over at 2^9 = 512.</p>
<p>Note that in src/lmptype.h there are definitions of all these data
types as well as the MPI data types associated with them. The MPI
types need to be consistent with the associated C data types, or else
LAMMPS will generate a run-time error. As far as we know, the
settings defined in src/lmptype.h are portable and work on every
current system.</p>
<p>In all cases, the size of problem that can be run on a per-processor
basis is limited by 4-byte integer storage to 2^31 atoms per processor
(about 2 billion). This should not normally be a limitation since such
a problem would have a huge per-processor memory footprint due to
neighbor lists and would run very slowly in terms of CPU secs/timestep.</p>
<hr class="docutils" />
<p id="start-2-5"><strong>*Building for a Mac:*</strong></p>
<p>OS X is BSD Unix, so it should just work. See the
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.</p>
<hr class="docutils" />
<p id="start-2-6"><strong>*Building for Windows:*</strong></p>
<p>The LAMMPS download page has an option to download both a serial and
parallel pre-built Windows executable. See the <a class="reference internal" href="#start-6"><span>Running LAMMPS</span></a> section for instructions on running these executables
on a Windows box.</p>
<p>The pre-built executables hosted on the <a class="reference external" href="http://lammps.sandia.gov/download.html">LAMMPS download page</a> are built with a subset
of the available packages; see the download page for the list. These
are single executable files. No examples or documentation in
included. You will need to download the full source code package to
obtain those.</p>
<p>As an alternative, you can download &#8220;daily builds&#8221; (and some older
versions) of the installer packages from
<a class="reference external" href="http://rpm.lammps.org/windows.html">rpm.lammps.org/windows.html</a>.
These executables are built with most optional packages and the
download includes documentation, some tools and most examples.</p>
<p>If you want a Windows version with specific packages included and
excluded, you can build it yourself.</p>
<p>One way to do this is install and use cygwin to build LAMMPS with a
standard unix style make program, just as you would on a Linux box;
see src/MAKE/MACHINES/Makefile.cygwin.</p>
<p>The other way to do this is using Visual Studio and project files.
See the src/WINDOWS directory and its README.txt file for instructions
on both a basic build and a customized build with pacakges you select.</p>
<hr class="docutils" />
</div>
<div class="section" id="making-lammps-with-optional-packages">
<span id="start-3"></span><h2>2.3. Making LAMMPS with optional packages<a class="headerlink" href="#making-lammps-with-optional-packages" title="Permalink to this headline">¶</a></h2>
<p>This section has the following sub-sections:</p>
<ul class="simple">
<li><a class="reference internal" href="#start-3-1"><span>Package basics</span></a></li>
<li><a class="reference internal" href="#start-3-2"><span>Including/excluding packages</span></a></li>
<li><a class="reference internal" href="#start-3-3"><span>Packages that require extra libraries</span></a></li>
<li><a class="reference internal" href="#start-3-4"><span>Packages that require Makefile.machine settings</span></a></li>
</ul>
<p>Note that the following <a class="reference internal" href="#start-4"><span>Section 2.4</span></a> describes the Make.py
tool which can be used to install/un-install packages and build the
auxiliary libraries which some of them use. It can also auto-edit a
Makefile.machine to add settings needed by some packages.</p>
<hr class="docutils" />
<p id="start-3-1"><strong>*Package basics:*</strong></p>
<p>The source code for LAMMPS is structured as a set of core files which
are always included, plus optional packages. Packages are groups of
files that enable a specific set of features. For example, force
fields for molecular systems or granular systems are in packages.</p>
<p>You can see the list of all packages by typing &#8220;make package&#8221; from
within the src directory of the LAMMPS distribution. This also lists
various make commands that can be used to manipulate packages.</p>
<p>If you use a command in a LAMMPS input script that is specific to a
particular package, you must have built LAMMPS with that package, else
you will get an error that the style is invalid or the command is
unknown. Every command&#8217;s doc page specfies if it is part of a
package. You can also type</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">lmp_machine</span> <span class="o">-</span><span class="n">h</span>
</pre></div>
</div>
<p>to run your executable with the optional <a class="reference internal" href="#start-7"><span>-h command-line switch</span></a> for &#8220;help&#8221;, which will list the styles and commands
known to your executable.</p>
<p>There are two kinds of packages in LAMMPS, standard and user packages.
More information about the contents of standard and user packages is
given in <a class="reference internal" href="Section_packages.html"><em>Section_packages</em></a> of the manual. The
difference between standard and user packages is as follows:</p>
<p>Standard packages are supported by the LAMMPS developers and are
written in a syntax and style consistent with the rest of LAMMPS.
This means we will answer questions about them, debug and fix them if
necessary, and keep them compatible with future changes to LAMMPS.</p>
<p>User packages have been contributed by users, and always begin with
the user prefix. If they are a single command (single file), they are
typically in the user-misc package. Otherwise, they are a a set of
files grouped together which add a specific functionality to the code.</p>
<p>User packages don&#8217;t necessarily meet the requirements of the standard
packages. If you have problems using a feature provided in a user
package, you will likely need to contact the contributor directly to
get help. Information on how to submit additions you make to LAMMPS
as a user-contributed package is given in <a class="reference internal" href="Section_modify.html#mod-15"><span>this section</span></a> of the documentation.</p>
<p>Some packages (both standard and user) require additional libraries.
See more details below.</p>
<hr class="docutils" />
<p id="start-3-2"><strong>*Including/excluding packages:*</strong></p>
<p>To use or not use a package you must include or exclude it before
building LAMMPS. From the src directory, this is typically as simple
as:</p>
<div class="highlight-python"><div class="highlight"><pre>make yes-colloid
make g++
</pre></div>
</div>
<p>or</p>
<div class="highlight-python"><div class="highlight"><pre>make no-manybody
make g++
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">You should NOT include/exclude packages and build
LAMMPS in a single make command by using multiple targets, e.g. make
yes-colloid g++. This is because the make procedure creates a list of
source files that will be out-of-date for the build if the package
configuration changes during the same command.</p>
</div>
<p>Some packages have individual files that depend on other packages
being included. LAMMPS checks for this and does the right thing.
I.e. individual files are only included if their dependencies are
already included. Likewise, if a package is excluded, other files
dependent on that package are also excluded.</p>
<p>If you will never run simulations that use the features in a
particular packages, there is no reason to include it in your build.
For some packages, this will keep you from having to build auxiliary
libraries (see below), and will also produce a smaller executable
which may run a bit faster.</p>
<p>When you download a LAMMPS tarball, these packages are pre-installed
in the src directory: KSPACE, MANYBODY,MOLECULE. When you download
LAMMPS source files from the SVN or Git repositories, no packages are
pre-installed.</p>
<p>Packages are included or excluded by typing &#8220;make yes-name&#8221; or &#8220;make
no-name&#8221;, where &#8220;name&#8221; is the name of the package in lower-case, e.g.
name = kspace for the KSPACE package or name = user-atc for the
USER-ATC package. You can also type &#8220;make yes-standard&#8221;, &#8220;make
no-standard&#8221;, &#8220;make yes-std&#8221;, &#8220;make no-std&#8221;, &#8220;make yes-user&#8221;, &#8220;make
no-user&#8221;, &#8220;make yes-all&#8221; or &#8220;make no-all&#8221; to include/exclude various
sets of packages. Type &#8220;make package&#8221; to see the all of the
package-related make options.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Inclusion/exclusion of a package works by simply
moving files back and forth between the main src directory and
sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC),
so that the files are seen or not seen when LAMMPS is built. After
you have included or excluded a package, you must re-build LAMMPS.</p>
</div>
<p>Additional package-related make options exist to help manage LAMMPS
files that exist in both the src directory and in package
sub-directories. You do not normally need to use these commands
unless you are editing LAMMPS files or have downloaded a patch from
the LAMMPS WWW site.</p>
<p>Typing &#8220;make package-update&#8221; or &#8220;make pu&#8221; will overwrite src files
with files from the package sub-directories if the package has been
included. It should be used after a patch is installed, since patches
only update the files in the package sub-directory, but not the src
files. Typing &#8220;make package-overwrite&#8221; will overwrite files in the
package sub-directories with src files.</p>
<p>Typing &#8220;make package-status&#8221; or &#8220;make ps&#8221; will show which packages are
currently included. Of those that are included, it will list files
that are different in the src directory and package sub-directory.
Typing &#8220;make package-diff&#8221; lists all differences between these files.
Again, type &#8220;make package&#8221; to see all of the package-related make
options.</p>
<hr class="docutils" />
<p id="start-3-3"><strong>*Packages that require extra libraries:*</strong></p>
<p>A few of the standard and user packages require additional auxiliary
libraries. Most of them are provided with LAMMPS, in which case they
must be compiled first, before LAMMPS is built if you wish to include
that package. If you get a LAMMPS build error about a missing
library, this is likely the reason. See the
<a class="reference internal" href="Section_packages.html"><em>Section_packages</em></a> doc page for a list of
packages that have these kinds of auxiliary libraries.</p>
<p>The lib directory in the distribution has sub-directories with package
names that correspond to the needed auxiliary libs, e.g. lib/reax.
Each sub-directory has a README file that gives more details. Code
for most of the auxiliary libraries is included in that directory.
Examples are the USER-ATC and MEAM packages.</p>
<p>A few of the lib sub-directories do not include code, but do include
instructions and sometimes scripts that automate the process of
downloading the auxiliary library and installing it so LAMMPS can link
to it. Examples are the KIM and VORONOI and USER-MOLFILE and USER-SMD
packages.</p>
<p>The lib/python directory (for the PYTHON package) contains only a
choice of Makefile.lammps.* files. This is because no auxiliary code
or libraries are needed, only the Python library and other system libs
that already available on your system. However, the Makefile.lammps
file is needed to tell the LAMMPS build which libs to use and where to
find them.</p>
<p>For libraries with provided code, the sub-directory README file
(e.g. lib/reax/README) has instructions on how to build that library.
Typically this is done by typing something like:</p>
<div class="highlight-python"><div class="highlight"><pre>make -f Makefile.g++
</pre></div>
</div>
<p>If one of the provided Makefiles is not appropriate for your system
you will need to edit or add one. Note that all the Makefiles have a
setting for EXTRAMAKE at the top that specifies a Makefile.lammps.*
file.</p>
<p>If the library build is successful, it will produce 2 files in the lib
directory:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">libpackage</span><span class="o">.</span><span class="n">a</span>
<span class="n">Makefile</span><span class="o">.</span><span class="n">lammps</span>
</pre></div>
</div>
<p>The Makefile.lammps file will be a copy of the EXTRAMAKE file setting
specified in the library Makefile.* you used.</p>
<p>Note that you must insure that the settings in Makefile.lammps are
appropriate for your system. If they are not, the LAMMPS build will
fail.</p>
<p>As explained in the lib/package/README files, the settings in
Makefile.lammps are used to specify additional system libraries and
their locations so that LAMMPS can build with the auxiliary library.
For example, if the MEAM or REAX packages are used, the auxiliary
libraries consist of F90 code, built with a Fortran complier. To link
that library with LAMMPS (a C++ code) via whatever C++ compiler LAMMPS
is built with, typically requires additional Fortran-to-C libraries be
included in the link. Another example are the BLAS and LAPACK
libraries needed to use the USER-ATC or USER-AWPMD packages.</p>
<p>For libraries without provided code, the sub-directory README file has
information on where to download the library and how to build it,
e.g. lib/voronoi/README and lib/smd/README. The README files also
describe how you must either (a) create soft links, via the &#8220;ln&#8221;
command, in those directories to point to where you built or installed
the packages, or (b) check or edit the Makefile.lammps file in the
same directory to provide that information.</p>
<p>Some of the sub-directories, e.g. lib/voronoi, also have an install.py
script which can be used to automate the process of
downloading/building/installing the auxiliary library, and setting the
needed soft links. Type &#8220;python install.py&#8221; for further instructions.</p>
<p>As with the sub-directories containing library code, if the soft links
or settings in the lib/package/Makefile.lammps files are not correct,
the LAMMPS build will typically fail.</p>
<hr class="docutils" />
<p id="start-3-4"><strong>*Packages that require Makefile.machine settings*</strong></p>
<p>A few packages require specific settings in Makefile.machine, to
either build or use the package effectively. These are the
USER-INTEL, KOKKOS, USER-OMP, and OPT packages. The details of what
flags to add or what variables to define are given on the doc pages
that describe each of these accelerator packages in detail:</p>
<ul class="simple">
<li><a class="reference internal" href="accelerate_intel.html"><em>USER-INTEL package</em></a></li>
<li><a class="reference internal" href="accelerate_kokkos.html"><em>KOKKOS package</em></a></li>
<li><a class="reference internal" href="accelerate_omp.html"><em>USER-OMP package</em></a></li>
<li><a class="reference internal" href="accelerate_opt.html"><em>OPT package</em></a></li>
</ul>
<p>Here is a brief summary of what Makefile.machine changes are needed.
Note that the Make.py tool, described in the next <a class="reference internal" href="#start-4"><span>Section 2.4</span></a> can automatically add the needed info to an existing
machine Makefile, using simple command-line arguments.</p>
<p>In src/MAKE/OPTIONS see the following Makefiles for examples of the
changes described below:</p>
<ul class="simple">
<li>Makefile.intel_cpu</li>
<li>Makefile.intel_phi</li>
<li>Makefile.kokkos_omp</li>
<li>Makefile.kokkos_cuda</li>
<li>Makefile.kokkos_phi</li>
<li>Makefile.omp</li>
</ul>
<p>For the USER-INTEL package, you have 2 choices when building. You can
build with CPU or Phi support. The latter uses Xeon Phi chips in
&#8220;offload&#8221; mode. Each of these modes requires additional settings in
your Makefile.machine for CCFLAGS and LINKFLAGS.</p>
<p>For CPU mode (if using an Intel compiler):</p>
<ul class="simple">
<li>CCFLAGS: add -fopenmp, -DLAMMPS_MEMALIGN=64, -restrict, -xHost, -fno-alias, -ansi-alias, -override-limits</li>
<li>LINKFLAGS: add -fopenmp</li>
</ul>
<p>For Phi mode add the following in addition to the CPU mode flags:</p>
<ul class="simple">
<li>CCFLAGS: add -DLMP_INTEL_OFFLOAD and</li>
<li>LINKFLAGS: add -offload</li>
</ul>
<p>And also add this to CCFLAGS:</p>
<pre class="literal-block">
-offload-option,mic,compiler,&quot;-fp-model fast=2 -mGLOB_default_function_attrs=&quot;gather_scatter_loop_unroll=4&quot;&quot;
</pre>
<p>For the KOKKOS package, you have 3 choices when building. You can
build with OMP or Cuda or Phi support. Phi support uses Xeon Phi
chips in &#8220;native&#8221; mode. This can be done by setting the following
variables in your Makefile.machine:</p>
<ul class="simple">
<li>for OMP support, set OMP = yes</li>
<li>for Cuda support, set OMP = yes and CUDA = yes</li>
<li>for Phi support, set OMP = yes and MIC = yes</li>
</ul>
<p>These can also be set as additional arguments to the make command, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>make g++ OMP=yes MIC=yes
</pre></div>
</div>
<p>Building the KOKKOS package with CUDA support requires a Makefile
machine that uses the NVIDIA &#8220;nvcc&#8221; compiler, as well as an
appropriate &#8220;arch&#8221; setting appropriate to the GPU hardware and NVIDIA
software you have on your machine. See
src/MAKE/OPTIONS/Makefile.kokkos_cuda for an example of such a machine
Makefile.</p>
<p>For the USER-OMP package, your Makefile.machine needs additional
settings for CCFLAGS and LINKFLAGS.</p>
<ul class="simple">
<li>CCFLAGS: add -fopenmp and -restrict</li>
<li>LINKFLAGS: add -fopenmp</li>
</ul>
<p>For the OPT package, your Makefile.machine needs an additional
settings for CCFLAGS.</p>
<ul class="simple">
<li>CCFLAGS: add -restrict</li>
</ul>
<hr class="docutils" />
</div>
<div class="section" id="building-lammps-via-the-make-py-script">
<span id="start-4"></span><h2>2.4. Building LAMMPS via the Make.py script<a class="headerlink" href="#building-lammps-via-the-make-py-script" title="Permalink to this headline">¶</a></h2>
<p>The src directory includes a Make.py script, written in Python, which
can be used to automate various steps of the build process. It is
particularly useful for working with the accelerator packages, as well
as other packages which require auxiliary libraries to be built.</p>
<p>The goal of the Make.py tool is to allow any complex multi-step LAMMPS
build to be performed as a single Make.py command. And you can
archive the commands, so they can be re-invoked later via the -r
(redo) switch. If you find some LAMMPS build procedure that can&#8217;t be
done in a single Make.py command, let the developers know, and we&#8217;ll
see if we can augment the tool.</p>
<p>You can run Make.py from the src directory by typing either:</p>
<div class="highlight-python"><div class="highlight"><pre>Make.py -h
python Make.py -h
</pre></div>
</div>
<p>which will give you help info about the tool. For the former to work,
you may need to edit the first line of Make.py to point to your local
Python. And you may need to insure the script is executable:</p>
<div class="highlight-python"><div class="highlight"><pre>chmod +x Make.py
</pre></div>
</div>
<p>Here are examples of build tasks you can perform with Make.py:</p>
<table border="1" class="docutils">
<colgroup>
<col width="58%" />
<col width="42%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Install/uninstall packages</td>
<td>Make.py -p no-lib kokkos omp intel</td>
</tr>
<tr class="row-even"><td>Build specific auxiliary libs</td>
<td>Make.py -a lib-atc lib-meam</td>
</tr>
<tr class="row-odd"><td>Build libs for all installed packages</td>
<td>Make.py -p cuda gpu -gpu mode=double arch=31 -a lib-all</td>
</tr>
<tr class="row-even"><td>Create a Makefile from scratch with compiler and MPI settings</td>
<td>Make.py -m none -cc g++ -mpi mpich -a file</td>
</tr>
<tr class="row-odd"><td>Augment Makefile.serial with settings for installed packages</td>
<td>Make.py -p intel -intel cpu -m serial -a file</td>
</tr>
<tr class="row-even"><td>Add JPG and FFTW support to Makefile.mpi</td>
<td>Make.py -m mpi -jpg -fft fftw -a file</td>
</tr>
<tr class="row-odd"><td>Build LAMMPS with a parallel make using Makefile.mpi</td>
<td>Make.py -j 16 -m mpi -a exe</td>
</tr>
<tr class="row-even"><td>Build LAMMPS and libs it needs using Makefile.serial with accelerator settings</td>
<td>Make.py -p gpu intel -intel cpu -a lib-all file serial</td>
</tr>
</tbody>
</table>
<p>The bench and examples directories give Make.py commands that can be
used to build LAMMPS with the various packages and options needed to
run all the benchmark and example input scripts. See these files for
more details:</p>
<ul class="simple">
<li>bench/README</li>
<li>bench/FERMI/README</li>
<li>bench/KEPLER/README</li>
<li>bench/PHI/README</li>
<li>examples/README</li>
<li>examples/accelerate/README</li>
<li>examples/accelerate/make.list</li>
</ul>
<p>All of the Make.py options and syntax help can be accessed by using
the &#8220;-h&#8221; switch.</p>
<p>E.g. typing &#8220;Make.py -h&#8221; gives</p>
<div class="highlight-python"><div class="highlight"><pre>Syntax: Make.py switch args ...
switches can be listed in any order
help switch:
-h prints help and syntax for all other specified switches
switch for actions:
-a lib-all, lib-dir, clean, file, exe or machine
list one or more actions, in any order
machine is a Makefile.machine suffix, must be last if used
one-letter switches:
-d (dir), -j (jmake), -m (makefile), -o (output),
-p (packages), -r (redo), -s (settings), -v (verbose)
switches for libs:
-atc, -awpmd, -colvars, -cuda
-gpu, -meam, -poems, -qmmm, -reax
switches for build and makefile options:
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png
</pre></div>
</div>
<p>Using the &#8220;-h&#8221; switch with other switches and actions gives additional
info on all the other specified switches or actions. The &#8220;-h&#8221; can be
anywhere in the command-line and the other switches do not need their
arguments. E.g. type &#8220;Make.py -h -d -atc -intel&#8221; will print:</p>
<div class="highlight-python"><div class="highlight"><pre>-d dir
dir = LAMMPS home dir
if -d not specified, working dir must be lammps/src
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>-atc make=suffix lammps=suffix2
all args are optional and can be in any order
make = use Makefile.suffix (def = g++)
lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile)
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>-intel mode
mode = cpu or phi (def = cpu)
build Intel package for CPU or Xeon Phi
</pre></div>
</div>
<p>Note that Make.py never overwrites an existing Makefile.machine.
Instead, it creates src/MAKE/MINE/Makefile.auto, which you can save or
rename if desired. Likewise it creates an executable named
src/lmp_auto, which you can rename using the -o switch if desired.</p>
<p>The most recently executed Make.py commmand is saved in
src/Make.py.last. You can use the &#8220;-r&#8221; switch (for redo) to re-invoke
the last command, or you can save a sequence of one or more Make.py
commands to a file and invoke the file of commands using &#8220;-r&#8221;. You
can also label the commands in the file and invoke one or more of them
by name.</p>
<p>A typical use of Make.py is to start with a valid Makefile.machine for
your system, that works for a vanilla LAMMPS build, i.e. when optional
packages are not installed. You can then use Make.py to add various
settings (FFT, JPG, PNG) to the Makefile.machine as well as change its
compiler and MPI options. You can also add additional packages to the
build, as well as build the needed supporting libraries.</p>
<p>You can also use Make.py to create a new Makefile.machine from
scratch, using the &#8220;-m none&#8221; switch, if you also specify what compiler
and MPI options to use, via the &#8220;-cc&#8221; and &#8220;-mpi&#8221; switches.</p>
<hr class="docutils" />
</div>
<div class="section" id="building-lammps-as-a-library">
<span id="start-5"></span><h2>2.5. Building LAMMPS as a library<a class="headerlink" href="#building-lammps-as-a-library" title="Permalink to this headline">¶</a></h2>
<p>LAMMPS can be built as either a static or shared library, which can
then be called from another application or a scripting language. See
<a class="reference internal" href="Section_howto.html#howto-10"><span>this section</span></a> for more info on coupling
LAMMPS to other codes. See <a class="reference internal" href="Section_python.html"><em>this section</em></a> for
more info on wrapping and running LAMMPS from Python.</p>
<div class="section" id="static-library">
<h3>2.5.1. <strong>Static library:</strong><a class="headerlink" href="#static-library" title="Permalink to this headline">¶</a></h3>
<p>To build LAMMPS as a static library (<a href="#id7"><span class="problematic" id="id8">*</span></a>.a file on Linux), type</p>
<div class="highlight-python"><div class="highlight"><pre>make foo mode=lib
</pre></div>
</div>
<p>where foo is the machine name. This kind of library is typically used
to statically link a driver application to LAMMPS, so that you can
insure all dependencies are satisfied at compile time. This will use
the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The build
will create the file liblammps_foo.a which another application can
link to. It will also create a soft link liblammps.a, which will
point to the most recently built static library.</p>
</div>
<div class="section" id="shared-library">
<h3>2.5.2. <strong>Shared library:</strong><a class="headerlink" href="#shared-library" title="Permalink to this headline">¶</a></h3>
<p>To build LAMMPS as a shared library (<a href="#id9"><span class="problematic" id="id10">*</span></a>.so file on Linux), which can be
dynamically loaded, e.g. from Python, type</p>
<div class="highlight-python"><div class="highlight"><pre>make foo mode=shlib
</pre></div>
</div>
<p>where foo is the machine name. This kind of library is required when
wrapping LAMMPS with Python; see <a class="reference internal" href="Section_python.html"><em>Section_python</em></a>
for details. This will use the SHFLAGS and SHLIBFLAGS settings in
src/MAKE/Makefile.foo and perform the build in the directory
Obj_shared_foo. This is so that each file can be compiled with the
-fPIC flag which is required for inclusion in a shared library. The
build will create the file liblammps_foo.so which another application
can link to dyamically. It will also create a soft link liblammps.so,
which will point to the most recently built shared library. This is
the file the Python wrapper loads by default.</p>
<p>Note that for a shared library to be usable by a calling program, all
the auxiliary libraries it depends on must also exist as shared
libraries. This will be the case for libraries included with LAMMPS,
such as the dummy MPI library in src/STUBS or any package libraries in
lib/packages, since they are always built as shared libraries using
the -fPIC switch. However, if a library like MPI or FFTW does not
exist as a shared library, the shared library build will generate an
error. This means you will need to install a shared library version
of the auxiliary library. The build instructions for the library
should tell you how to do this.</p>
<p>Here is an example of such errors when the system FFTW or provided
lib/colvars library have not been built as shared libraries:</p>
<div class="highlight-python"><div class="highlight"><pre>/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
R_X86_64_32 against `.rodata&#39; can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>/usr/bin/ld: ../../lib/colvars/libcolvars.a(colvarmodule.o):
relocation R_X86_64_32 against `__pthread_key_create&#39; can not be used
when making a shared object; recompile with -fPIC
../../lib/colvars/libcolvars.a: error adding symbols: Bad value
</pre></div>
</div>
<p>As an example, here is how to build and install the <a class="reference external" href="http://www-unix.mcs.anl.gov/mpi">MPICH library</a>, a popular open-source version of MPI, distributed by
Argonne National Labs, as a shared library in the default
/usr/local/lib location:</p>
<div class="highlight-python"><div class="highlight"><pre>./configure --enable-shared
make
make install
</pre></div>
</div>
<p>You may need to use &#8220;sudo make install&#8221; in place of the last line if
you do not have write privileges for /usr/local/lib. The end result
should be the file /usr/local/lib/libmpich.so.</p>
</div>
<div class="section" id="additional-requirement-for-using-a-shared-library">
<h3>2.5.3. <strong>Additional requirement for using a shared library:</strong><a class="headerlink" href="#additional-requirement-for-using-a-shared-library" title="Permalink to this headline">¶</a></h3>
<p>The operating system finds shared libraries to load at run-time using
the environment variable LD_LIBRARY_PATH. So you may wish to copy the
file src/liblammps.so or src/liblammps_g++.so (for example) to a place
the system can find it by default, such as /usr/local/lib, or you may
wish to add the LAMMPS src directory to LD_LIBRARY_PATH, so that the
current version of the shared library is always available to programs
that use it.</p>
<p>For the csh or tcsh shells, you would add something like this to your
~/.cshrc file:</p>
<div class="highlight-python"><div class="highlight"><pre>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</pre></div>
</div>
</div>
<div class="section" id="calling-the-lammps-library">
<h3>2.5.4. <strong>Calling the LAMMPS library:</strong><a class="headerlink" href="#calling-the-lammps-library" title="Permalink to this headline">¶</a></h3>
<p>Either flavor of library (static or shared) allows one or more LAMMPS
objects to be instantiated from the calling program.</p>
<p>When used from a C++ program, all of LAMMPS is wrapped in a LAMMPS_NS
namespace; you can safely use any of its classes and methods from
within the calling code, as needed.</p>
<p>When used from a C or Fortran program or a scripting language like
Python, the library has a simple function-style interface, provided in
src/library.cpp and src/library.h.</p>
<p>See the sample codes in examples/COUPLE/simple for examples of C++ and
C and Fortran codes that invoke LAMMPS thru its library interface.
There are other examples as well in the COUPLE directory which are
discussed in <a class="reference internal" href="Section_howto.html#howto-10"><span>Section_howto 10</span></a> of the
manual. See <a class="reference internal" href="Section_python.html"><em>Section_python</em></a> of the manual for a
description of the Python wrapper provided with LAMMPS that operates
through the LAMMPS library interface.</p>
<p>The files src/library.cpp and library.h define the C-style API for
using LAMMPS as a library. See <a class="reference internal" href="Section_howto.html#howto-19"><span>Section_howto 19</span></a> of the manual for a description of the
interface and how to extend it for your needs.</p>
<hr class="docutils" />
</div>
</div>
<div class="section" id="running-lammps">
<span id="start-6"></span><h2>2.6. Running LAMMPS<a class="headerlink" href="#running-lammps" title="Permalink to this headline">¶</a></h2>
<p>By default, LAMMPS runs by reading commands from standard input. Thus
if you run the LAMMPS executable by itself, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">lmp_linux</span>
</pre></div>
</div>
<p>it will simply wait, expecting commands from the keyboard. Typically
you should put commands in an input script and use I/O redirection,
e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>lmp_linux &lt; in.file
</pre></div>
</div>
<p>For parallel environments this should also work. If it does not, use
the &#8216;-in&#8217; command-line switch, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>lmp_linux -in in.file
</pre></div>
</div>
<p><a class="reference internal" href="Section_commands.html"><em>This section</em></a> describes how input scripts are
structured and what commands they contain.</p>
<p>You can test LAMMPS on any of the sample inputs provided in the
examples or bench directory. Input scripts are named in.* and sample
outputs are named log.*.name.P where name is a machine and P is the
number of processors it was run on.</p>
<p>Here is how you might run a standard Lennard-Jones benchmark on a
Linux box, using mpirun to launch a parallel job:</p>
<div class="highlight-python"><div class="highlight"><pre>cd src
make linux
cp lmp_linux ../bench
cd ../bench
mpirun -np 4 lmp_linux &lt; in.lj
</pre></div>
</div>
<p>See <a class="reference external" href="http://lammps.sandia.gov/bench.html">this page</a> for timings for this and the other benchmarks on
various platforms. Note that some of the example scripts require
LAMMPS to be built with one or more of its optional packages.</p>
<hr class="docutils" />
<p>On a Windows box, you can skip making LAMMPS and simply download an
executable, as described above, though the pre-packaged executables
include only certain packages.</p>
<p>To run a LAMMPS executable on a Windows machine, first decide whether
you want to download the non-MPI (serial) or the MPI (parallel)
version of the executable. Download and save the version you have
chosen.</p>
<p>For the non-MPI version, follow these steps:</p>
<ul class="simple">
<li>Get a command prompt by going to Start-&gt;Run... ,
then typing &#8220;cmd&#8221;.</li>
<li>Move to the directory where you have saved lmp_win_no-mpi.exe
(e.g. by typing: cd &#8220;Documents&#8221;).</li>
<li>At the command prompt, type &#8220;lmp_win_no-mpi -in in.lj&#8221;, replacing in.lj
with the name of your LAMMPS input script.</li>
</ul>
<p>For the MPI version, which allows you to run LAMMPS under Windows on
multiple processors, follow these steps:</p>
<ul class="simple">
<li>Download and install
<a class="reference external" href="http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads">MPICH2</a>
for Windows.</li>
<li>You&#8217;ll need to use the mpiexec.exe and smpd.exe files from the MPICH2
package. Put them in same directory (or path) as the LAMMPS Windows
executable.</li>
<li>Get a command prompt by going to Start-&gt;Run... ,
then typing &#8220;cmd&#8221;.</li>
<li>Move to the directory where you have saved lmp_win_mpi.exe
(e.g. by typing: cd &#8220;Documents&#8221;).</li>
<li>Then type something like this: &#8220;mpiexec -localonly 4 lmp_win_mpi -in
in.lj&#8221;, replacing in.lj with the name of your LAMMPS input script.</li>
<li>Note that you may need to provide smpd with a passphrase (it doesn&#8217;t
matter what you type).</li>
<li>In this mode, output may not immediately show up on the screen, so if
your input script takes a long time to execute, you may need to be
patient before the output shows up. :l Alternatively, you can still
use this executable to run on a single processor by typing something
like: &#8220;lmp_win_mpi -in in.lj&#8221;.</li>
</ul>
<hr class="docutils" />
<p>The screen output from LAMMPS is described in the next section. As it
runs, LAMMPS also writes a log.lammps file with the same information.</p>
<p>Note that this sequence of commands copies the LAMMPS executable
(lmp_linux) to the directory with the input files. This may not be
necessary, but some versions of MPI reset the working directory to
where the executable is, rather than leave it as the directory where
you launch mpirun from (if you launch lmp_linux on its own and not
under mpirun). If that happens, LAMMPS will look for additional input
files and write its output files to the executable directory, rather
than your working directory, which is probably not what you want.</p>
<p>If LAMMPS encounters errors in the input script or while running a
simulation it will print an ERROR message and stop or a WARNING
message and continue. See <a class="reference internal" href="Section_errors.html"><em>Section_errors</em></a> for a
discussion of the various kinds of errors LAMMPS can or can&#8217;t detect,
a list of all ERROR and WARNING messages, and what to do about them.</p>
<p>LAMMPS can run a problem on any number of processors, including a
single processor. In theory you should get identical answers on any
number of processors and on any machine. In practice, numerical
round-off can cause slight differences and eventual divergence of
molecular dynamics phase space trajectories.</p>
<p>LAMMPS can run as large a problem as will fit in the physical memory
of one or more processors. If you run out of memory, you must run on
more processors or setup a smaller problem.</p>
<hr class="docutils" />
</div>
<div class="section" id="command-line-options">
<span id="start-7"></span><h2>2.7. Command-line options<a class="headerlink" href="#command-line-options" title="Permalink to this headline">¶</a></h2>
<p>At run time, LAMMPS recognizes several optional command-line switches
which may be used in any order. Either the full word or a one-or-two
letter abbreviation can be used:</p>
<ul class="simple">
<li>-c or -cuda</li>
<li>-e or -echo</li>
<li>-h or -help</li>
<li>-i or -in</li>
<li>-k or -kokkos</li>
<li>-l or -log</li>
<li>-nc or -nocite</li>
<li>-pk or -package</li>
<li>-p or -partition</li>
<li>-pl or -plog</li>
<li>-ps or -pscreen</li>
<li>-r or -restart</li>
<li>-ro or -reorder</li>
<li>-sc or -screen</li>
<li>-sf or -suffix</li>
<li>-v or -var</li>
</ul>
<p>For example, lmp_ibm might be launched as follows:</p>
<div class="highlight-python"><div class="highlight"><pre>mpirun -np 16 lmp_ibm -v f tmp.out -l my.log -sc none &lt; in.alloy
mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none &lt; in.alloy
</pre></div>
</div>
<p>Here are the details on the options:</p>
<div class="highlight-python"><div class="highlight"><pre>-cuda on/off
</pre></div>
</div>
<p>Explicitly enable or disable CUDA support, as provided by the
USER-CUDA package. Even if LAMMPS is built with this package, as
described above in <a class="reference internal" href="#start-3"><span>Section 2.3</span></a>, this switch must be set to
enable running with the CUDA-enabled styles the package provides. If
the switch is not set (the default), LAMMPS will operate as if the
USER-CUDA package were not installed; i.e. you can run standard LAMMPS
or with the GPU package, for testing or benchmarking purposes.</p>
<div class="highlight-python"><div class="highlight"><pre>-echo style
</pre></div>
</div>
<p>Set the style of command echoing. The style can be <em>none</em> or <em>screen</em>
or <em>log</em> or <em>both</em>. Depending on the style, each command read from
the input script will be echoed to the screen and/or logfile. This
can be useful to figure out which line of your script is causing an
input error. The default value is <em>log</em>. The echo style can also be
set by using the <a class="reference internal" href="echo.html"><em>echo</em></a> command in the input script itself.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="o">-</span><span class="n">help</span>
</pre></div>
</div>
<p>Print a brief help summary and a list of options compiled into this
executable for each LAMMPS style (atom_style, fix, compute,
pair_style, bond_style, etc). This can tell you if the command you
want to use was included via the appropriate package at compile time.
LAMMPS will print the info and immediately exit if this switch is
used.</p>
<div class="highlight-python"><div class="highlight"><pre>-in file
</pre></div>
</div>
<p>Specify a file to use as an input script. This is an optional switch
when running LAMMPS in one-partition mode. If it is not specified,
LAMMPS reads its script from standard input, typically from a script
via I/O redirection; e.g. lmp_linux &lt; in.run. I/O redirection should
also work in parallel, but if it does not (in the unlikely case that
an MPI implementation does not support it), then use the -in flag.
Note that this is a required switch when running LAMMPS in
multi-partition mode, since multiple processors cannot all read from
stdin.</p>
<div class="highlight-python"><div class="highlight"><pre>-kokkos on/off keyword/value ...
</pre></div>
</div>
<p>Explicitly enable or disable KOKKOS support, as provided by the KOKKOS
package. Even if LAMMPS is built with this package, as described
above in <a class="reference internal" href="#start-3"><span>Section 2.3</span></a>, this switch must be set to enable
running with the KOKKOS-enabled styles the package provides. If the
switch is not set (the default), LAMMPS will operate as if the KOKKOS
package were not installed; i.e. you can run standard LAMMPS or with
the GPU or USER-CUDA or USER-OMP packages, for testing or benchmarking
purposes.</p>
<p>Additional optional keyword/value pairs can be specified which
determine how Kokkos will use the underlying hardware on your
platform. These settings apply to each MPI task you launch via the
&#8220;mpirun&#8221; or &#8220;mpiexec&#8221; command. You may choose to run one or more MPI
tasks per physical node. Note that if you are running on a desktop
machine, you typically have one physical node. On a cluster or
supercomputer there may be dozens or 1000s of physical nodes.</p>
<p>Either the full word or an abbreviation can be used for the keywords.
Note that the keywords do not use a leading minus sign. I.e. the
keyword is &#8220;t&#8221;, not &#8220;-t&#8221;. Also note that each of the keywords has a
default setting. Example of when to use these options and what
settings to use on different platforms is given in <span class="xref std std-ref">Section 5.8</span>.</p>
<ul class="simple">
<li>d or device</li>
<li>g or gpus</li>
<li>t or threads</li>
<li>n or numa</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre>device Nd
</pre></div>
</div>
<p>This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and if you are running with only one
MPI task per node. The Nd setting is the ID of the GPU on the node to
run on. By default Nd = 0. If you have multiple GPUs per node, they
have consecutive IDs numbered as 0,1,2,etc. This setting allows you
to launch multiple independent jobs on the node, each with a single
MPI task per node, and assign each job to run on a different GPU.</p>
<div class="highlight-python"><div class="highlight"><pre>gpus Ng Ns
</pre></div>
</div>
<p>This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and you are running with multiple MPI
tasks per node (up to one per GPU). The Ng setting is how many GPUs
you will use. The Ns setting is optional. If set, it is the ID of a
GPU to skip when assigning MPI tasks to GPUs. This may be useful if
your desktop system reserves one GPU to drive the screen and the rest
are intended for computational work like running LAMMPS. By default
Ng = 1 and Ns is not set.</p>
<p>Depending on which flavor of MPI you are running, LAMMPS will look for
one of these 3 environment variables</p>
<div class="highlight-python"><div class="highlight"><pre>SLURM_LOCALID (various MPI variants compiled with SLURM support)
MV2_COMM_WORLD_LOCAL_RANK (Mvapich)
OMPI_COMM_WORLD_LOCAL_RANK (OpenMPI)
</pre></div>
</div>
<p>which are initialized by the &#8220;srun&#8221;, &#8220;mpirun&#8221; or &#8220;mpiexec&#8221; commands.
The environment variable setting for each MPI rank is used to assign a
unique GPU ID to the MPI task.</p>
<div class="highlight-python"><div class="highlight"><pre>threads Nt
</pre></div>
</div>
<p>This option assigns Nt number of threads to each MPI task for
performing work when Kokkos is executing in OpenMP or pthreads mode.
The default is Nt = 1, which essentially runs in MPI-only mode. If
there are Np MPI tasks per physical node, you generally want Np*Nt =
the number of physical cores per node, to use your available hardware
optimally. This also sets the number of threads used by the host when
LAMMPS is compiled with CUDA=yes.</p>
<div class="highlight-python"><div class="highlight"><pre>numa Nm
</pre></div>
</div>
<p>This option is only relevant when using pthreads with hwloc support.
In this case Nm defines the number of NUMA regions (typicaly sockets)
on a node which will be utilizied by a single MPI rank. By default Nm
= 1. If this option is used the total number of worker-threads per
MPI rank is threads*numa. Currently it is always almost better to
assign at least one MPI rank per NUMA region, and leave numa set to
its default value of 1. This is because letting a single process span
multiple NUMA regions induces a significant amount of cross NUMA data
traffic which is slow.</p>
<div class="highlight-python"><div class="highlight"><pre>-log file
</pre></div>
</div>
<p>Specify a log file for LAMMPS to write status information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
file log.lammps. If this switch is used, LAMMPS writes to the
specified file. In multi-partition mode, if the switch is not used, a
log.lammps file is created with hi-level status information. Each
partition also writes to a log.lammps.N file where N is the partition
ID. If the switch is specified in multi-partition mode, the hi-level
logfile is named &#8220;file&#8221; and each partition also logs information to a
file.N. For both one-partition and multi-partition mode, if the
specified file is &#8220;none&#8221;, then no log files are created. Using a
<a class="reference internal" href="log.html"><em>log</em></a> command in the input script will override this setting.
Option -plog will override the name of the partition log files file.N.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="o">-</span><span class="n">nocite</span>
</pre></div>
</div>
<p>Disable writing the log.cite file which is normally written to list
references for specific cite-able features used during a LAMMPS run.
See the <a class="reference external" href="http://lammps.sandia.gov/cite.html">citation page</a> for more
details.</p>
<div class="highlight-python"><div class="highlight"><pre>-package style args ....
</pre></div>
</div>
<p>Invoke the <a class="reference internal" href="package.html"><em>package</em></a> command with style and args. The
syntax is the same as if the command appeared at the top of the input
script. For example &#8220;-package gpu 2&#8221; or &#8220;-pk gpu 2&#8221; is the same as
<a class="reference internal" href="package.html"><em>package gpu 2</em></a> in the input script. The possible styles
and args are documented on the <a class="reference internal" href="package.html"><em>package</em></a> doc page. This
switch can be used multiple times, e.g. to set options for the
USER-INTEL and USER-OMP packages which can be used together.</p>
<p>Along with the &#8220;-suffix&#8221; command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.</p>
<div class="highlight-python"><div class="highlight"><pre>-partition 8x2 4 5 ...
</pre></div>
</div>
<p>Invoke LAMMPS in multi-partition mode. When LAMMPS is run on P
processors and this switch is not used, LAMMPS runs in one partition,
i.e. all P processors run a single simulation. If this switch is
used, the P processors are split into separate partitions and each
partition runs its own simulation. The arguments to the switch
specify the number of processors in each partition. Arguments of the
form MxN mean M partitions, each with N processors. Arguments of the
form N mean a single partition with N processors. The sum of
processors in all partitions must equal P. Thus the command
&#8220;-partition 8x2 4 5&#8221; has 10 partitions and runs on a total of 25
processors.</p>
<p>Running with multiple partitions can e useful for running
<a class="reference internal" href="Section_howto.html#howto-5"><span>multi-replica simulations</span></a>, where each
replica runs on on one or a few processors. Note that with MPI
installed on a machine (e.g. your desktop), you can run on more
(virtual) processors than you have physical processors.</p>
<p>To run multiple independent simulatoins from one input script, using
multiple partitions, see <a class="reference internal" href="Section_howto.html#howto-4"><span>Section_howto 4</span></a>
of the manual. World- and universe-style <a class="reference internal" href="variable.html"><em>variables</em></a>
are useful in this context.</p>
<div class="highlight-python"><div class="highlight"><pre>-plog file
</pre></div>
</div>
<p>Specify the base name for the partition log files, so partition N
writes log information to file.N. If file is none, then no partition
log files are created. This overrides the filename specified in the
-log command-line option. This option is useful when working with
large numbers of partitions, allowing the partition log files to be
suppressed (-plog none) or placed in a sub-directory (-plog
replica_files/log.lammps) If this option is not used the log file for
partition N is log.lammps.N or whatever is specified by the -log
command-line option.</p>
<div class="highlight-python"><div class="highlight"><pre>-pscreen file
</pre></div>
</div>
<p>Specify the base name for the partition screen file, so partition N
writes screen information to file.N. If file is none, then no
partition screen files are created. This overrides the filename
specified in the -screen command-line option. This option is useful
when working with large numbers of partitions, allowing the partition
screen files to be suppressed (-pscreen none) or placed in a
sub-directory (-pscreen replica_files/screen). If this option is not
used the screen file for partition N is screen.N or whatever is
specified by the -screen command-line option.</p>
<pre class="literal-block">
-restart restartfile <em>remap</em> datafile keyword value ...
</pre>
<p>Convert the restart file into a data file and immediately exit. This
is the same operation as if the following 2-line input script were
run:</p>
<pre class="literal-block">
read_restart restartfile <em>remap</em>
write_data datafile keyword value ...
</pre>
<p>Note that the specified restartfile and datafile can have wild-card
characters (&#8220;*&#8221;,%&#8221;) as described by the
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> and <a class="reference internal" href="write_data.html"><em>write_data</em></a>
commands. But a filename such as file.* will need to be enclosed in
quotes to avoid shell expansion of the &#8220;*&#8221; character.</p>
<p>Note that following restartfile, the optional flag <em>remap</em> can be
used. This has the same effect as adding it to the
<a class="reference internal" href="read_restart.html"><em>read_restart</em></a> command, as explained on its doc
page. This is only useful if the reading of the restart file triggers
an error that atoms have been lost. In that case, use of the remap
flag should allow the data file to still be produced.</p>
<p>Also note that following datafile, the same optional keyword/value
pairs can be listed as used by the <a class="reference internal" href="write_data.html"><em>write_data</em></a>
command.</p>
<div class="highlight-python"><div class="highlight"><pre>-reorder nth N
-reorder custom filename
</pre></div>
</div>
<p>Reorder the processors in the MPI communicator used to instantiate
LAMMPS, in one of several ways. The original MPI communicator ranks
all P processors from 0 to P-1. The mapping of these ranks to
physical processors is done by MPI before LAMMPS begins. It may be
useful in some cases to alter the rank order. E.g. to insure that
cores within each node are ranked in a desired order. Or when using
the <a class="reference internal" href="run_style.html"><em>run_style verlet/split</em></a> command with 2 partitions
to insure that a specific Kspace processor (in the 2nd partition) is
matched up with a specific set of processors in the 1st partition.
See the <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> doc pages for
more details.</p>
<p>If the keyword <em>nth</em> is used with a setting <em>N</em>, then it means every
Nth processor will be moved to the end of the ranking. This is useful
when using the <a class="reference internal" href="run_style.html"><em>run_style verlet/split</em></a> command with 2
partitions via the -partition command-line switch. The first set of
processors will be in the first partition, the 2nd set in the 2nd
partition. The -reorder command-line switch can alter this so that
the 1st N procs in the 1st partition and one proc in the 2nd partition
will be ordered consecutively, e.g. as the cores on one physical node.
This can boost performance. For example, if you use &#8220;-reorder nth 4&#8221;
and &#8220;-partition 9 3&#8221; and you are running on 12 processors, the
processors will be reordered from</p>
<div class="highlight-python"><div class="highlight"><pre>0 1 2 3 4 5 6 7 8 9 10 11
</pre></div>
</div>
<p>to</p>
<div class="highlight-python"><div class="highlight"><pre>0 1 2 4 5 6 8 9 10 3 7 11
</pre></div>
</div>
<p>so that the processors in each partition will be</p>
<div class="highlight-python"><div class="highlight"><pre>0 1 2 4 5 6 8 9 10
3 7 11
</pre></div>
</div>
<p>See the &#8220;processors&#8221; command for how to insure processors from each
partition could then be grouped optimally for quad-core nodes.</p>
<p>If the keyword is <em>custom</em>, then a file that specifies a permutation
of the processor ranks is also specified. The format of the reorder
file is as follows. Any number of initial blank or comment lines
(starting with a &#8220;#&#8221; character) can be present. These should be
followed by P lines of the form:</p>
<div class="highlight-python"><div class="highlight"><pre>I J
</pre></div>
</div>
<p>where P is the number of processors LAMMPS was launched with. Note
that if running in multi-partition mode (see the -partition switch
above) P is the total number of processors in all partitions. The I
and J values describe a permutation of the P processors. Every I and
J should be values from 0 to P-1 inclusive. In the set of P I values,
every proc ID should appear exactly once. Ditto for the set of P J
values. A single I,J pairing means that the physical processor with
rank I in the original MPI communicator will have rank J in the
reordered communicator.</p>
<p>Note that rank ordering can also be specified by many MPI
implementations, either by environment variables that specify how to
order physical processors, or by config files that specify what
physical processors to assign to each MPI rank. The -reorder switch
simply gives you a portable way to do this without relying on MPI
itself. See the <a class="reference external" href="processors">processors out</a> command for how to output
info on the final assignment of physical processors to the LAMMPS
simulation domain.</p>
<div class="highlight-python"><div class="highlight"><pre>-screen file
</pre></div>
</div>
<p>Specify a file for LAMMPS to write its screen information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
screen. If this switch is used, LAMMPS writes to the specified file
instead and you will see no screen output. In multi-partition mode,
if the switch is not used, hi-level status information is written to
the screen. Each partition also writes to a screen.N file where N is
the partition ID. If the switch is specified in multi-partition mode,
the hi-level screen dump is named &#8220;file&#8221; and each partition also
writes screen information to a file.N. For both one-partition and
multi-partition mode, if the specified file is &#8220;none&#8221;, then no screen
output is performed. Option -pscreen will override the name of the
partition screen files file.N.</p>
<div class="highlight-python"><div class="highlight"><pre>-suffix style
</pre></div>
</div>
<p>Use variants of various styles if they exist. The specified style can
be <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em>. These refer to
optional packages that LAMMPS can be built with, as described above in
<a class="reference internal" href="#start-3"><span>Section 2.3</span></a>. The &#8220;cuda&#8221; style corresponds to the USER-CUDA
package, the &#8220;gpu&#8221; style to the GPU package, the &#8220;intel&#8221; style to the
USER-INTEL package, the &#8220;kk&#8221; style to the KOKKOS package, the &#8220;opt&#8221;
style to the OPT package, and the &#8220;omp&#8221; style to the USER-OMP package.</p>
<p>Along with the &#8220;-package&#8221; command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.</p>
<p>As an example, all of the packages provide a <a class="reference internal" href="pair_lj.html"><em>pair_style lj/cut</em></a> variant, with style names lj/cut/cuda,
lj/cut/gpu, lj/cut/intel, lj/cut/kk, lj/cut/omp, and lj/cut/opt. A
variant style can be specified explicitly in your input script,
e.g. pair_style lj/cut/gpu. If the -suffix switch is used the
specified suffix (cuda,gpu,intel,kk,omp,opt) is automatically appended
whenever your input script command creates a new
<a class="reference internal" href="atom_style.html"><em>atom</em></a>, <a class="reference internal" href="pair_style.html"><em>pair</em></a>, <a class="reference internal" href="fix.html"><em>fix</em></a>,
<a class="reference internal" href="compute.html"><em>compute</em></a>, or <a class="reference internal" href="run_style.html"><em>run</em></a> style. If the variant
version does not exist, the standard version is created.</p>
<p>For the GPU package, using this command-line switch also invokes the
default GPU settings, as if the command &#8220;package gpu 1&#8221; were used at
the top of your input script. These settings can be changed by using
the &#8220;-package gpu&#8221; command-line switch or the <a class="reference internal" href="package.html"><em>package gpu</em></a> command in your script.</p>
<p>For the USER-INTEL package, using this command-line switch also
invokes the default USER-INTEL settings, as if the command &#8220;package
intel 1&#8221; were used at the top of your input script. These settings
can be changed by using the &#8220;-package intel&#8221; command-line switch or
the <a class="reference internal" href="package.html"><em>package intel</em></a> command in your script. If the
USER-OMP package is also installed, the intel suffix will make the omp
suffix a second choice, if a requested style is not available in the
USER-INTEL package. It will also invoke the default USER-OMP
settings, as if the command &#8220;package omp 0&#8221; were used at the top of
your input script. These settings can be changed by using the
&#8220;-package omp&#8221; command-line switch or the <a class="reference internal" href="package.html"><em>package omp</em></a>
command in your script.</p>
<p>For the KOKKOS package, using this command-line switch also invokes
the default KOKKOS settings, as if the command &#8220;package kokkos&#8221; were
used at the top of your input script. These settings can be changed
by using the &#8220;-package kokkos&#8221; command-line switch or the <a class="reference internal" href="package.html"><em>package kokkos</em></a> command in your script.</p>
<p>For the OMP package, using this command-line switch also invokes the
default OMP settings, as if the command &#8220;package omp 0&#8221; were used at
the top of your input script. These settings can be changed by using
the &#8220;-package omp&#8221; command-line switch or the <a class="reference internal" href="package.html"><em>package omp</em></a> command in your script.</p>
<p>The <a class="reference internal" href="suffix.html"><em>suffix</em></a> command can also be used within an input
script to set a suffix, or to turn off or back on any suffix setting
made via the command line.</p>
<div class="highlight-python"><div class="highlight"><pre>-var name value1 value2 ...
</pre></div>
</div>
<p>Specify a variable that will be defined for substitution purposes when
the input script is read. This switch can be used multiple times to
define multiple variables. &#8220;Name&#8221; is the variable name which can be a
single character (referenced as $x in the input script) or a full
string (referenced as ${abc}). An <a class="reference internal" href="variable.html"><em>index-style variable</em></a> will be created and populated with the
subsequent values, e.g. a set of filenames. Using this command-line
option is equivalent to putting the line &#8220;variable name index value1
value2 ...&#8221; at the beginning of the input script. Defining an index
variable as a command-line argument overrides any setting for the same
index variable in the input script, since index variables cannot be
re-defined. See the <a class="reference internal" href="variable.html"><em>variable</em></a> command for more info on
defining index and other kinds of variables and <a class="reference internal" href="Section_commands.html#cmd-2"><span>this section</span></a> for more info on using variables
in input scripts.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Currently, the command-line parser looks for arguments that
start with &#8220;-&#8221; to indicate new switches. Thus you cannot specify
multiple variable values if any of they start with a &#8220;-&#8221;, e.g. a
negative numeric value. It is OK if the first value1 starts with a
&#8220;-&#8221;, since it is automatically skipped.</p>
</div>
<hr class="docutils" />
</div>
<div class="section" id="lammps-screen-output">
<span id="start-8"></span><h2>2.8. LAMMPS screen output<a class="headerlink" href="#lammps-screen-output" title="Permalink to this headline">¶</a></h2>
<p>As LAMMPS reads an input script, it prints information to both the
screen and a log file about significant actions it takes to setup a
simulation. When the simulation is ready to begin, LAMMPS performs
various initializations and prints the amount of memory (in MBytes per
processor) that the simulation requires. It also prints details of
the initial thermodynamic state of the system. During the run itself,
thermodynamic information is printed periodically, every few
timesteps. When the run concludes, LAMMPS prints the final
thermodynamic state and a total run time for the simulation. It then
appends statistics about the CPU time and storage requirements for the
simulation. An example set of statistics is shown here:</p>
<div class="highlight-python"><div class="highlight"><pre>Loop time of 49.002 on 2 procs for 2004 atoms
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>Pair time (%) = 35.0495 (71.5267)
Bond time (%) = 0.092046 (0.187841)
Kspce time (%) = 6.42073 (13.103)
Neigh time (%) = 2.73485 (5.5811)
Comm time (%) = 1.50291 (3.06703)
Outpt time (%) = 0.013799 (0.0281601)
Other time (%) = 2.13669 (4.36041)
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>Nlocal: 1002 ave, 1015 max, 989 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 8720 ave, 8724 max, 8716 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 354141 ave, 361422 max, 346860 min
Histogram: 1 0 0 0 0 0 0 0 0 1
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>Total # of neighbors = 708282
Ave neighs/atom = 353.434
Ave special neighs/atom = 2.34032
Number of reneighborings = 42
Dangerous reneighborings = 2
</pre></div>
</div>
<p>The first section gives the breakdown of the CPU run time (in seconds)
into major categories. The second section lists the number of owned
atoms (Nlocal), ghost atoms (Nghost), and pair-wise neighbors stored
per processor. The max and min values give the spread of these values
across processors with a 10-bin histogram showing the distribution.
The total number of histogram counts is equal to the number of
processors.</p>
<p>The last section gives aggregate statistics for pair-wise neighbors
and special neighbors that LAMMPS keeps track of (see the
<a class="reference internal" href="special_bonds.html"><em>special_bonds</em></a> command). The number of times
neighbor lists were rebuilt during the run is given as well as the
number of potentially &#8220;dangerous&#8221; rebuilds. If atom movement
triggered neighbor list rebuilding (see the
<a class="reference internal" href="neigh_modify.html"><em>neigh_modify</em></a> command), then dangerous
reneighborings are those that were triggered on the first timestep
atom movement was checked for. If this count is non-zero you may wish
to reduce the delay factor to insure no force interactions are missed
by atoms moving beyond the neighbor skin distance before a rebuild
takes place.</p>
<p>If an energy minimization was performed via the
<a class="reference internal" href="minimize.html"><em>minimize</em></a> command, additional information is printed,
e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>Minimization stats:
E initial, next-to-last, final = -0.895962 -2.94193 -2.94342
Gradient 2-norm init/final= 1920.78 20.9992
Gradient inf-norm init/final= 304.283 9.61216
Iterations = 36
Force evaluations = 177
</pre></div>
</div>
<p>The first line lists the initial and final energy, as well as the
energy on the next-to-last iteration. The next 2 lines give a measure
of the gradient of the energy (force on all atoms). The 2-norm is the
&#8220;length&#8221; of this force vector; the inf-norm is the largest component.
The last 2 lines are statistics on how many iterations and
force-evaluations the minimizer required. Multiple force evaluations
are typically done at each iteration to perform a 1d line minimization
in the search direction.</p>
<p>If a <a class="reference internal" href="kspace_style.html"><em>kspace_style</em></a> long-range Coulombics solve was
performed during the run (PPPM, Ewald), then additional information is
printed, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>FFT time (% of Kspce) = 0.200313 (8.34477)
FFT Gflps 3d 1d-only = 2.31074 9.19989
</pre></div>
</div>
<p>The first line gives the time spent doing 3d FFTs (4 per timestep) and
the fraction it represents of the total KSpace time (listed above).
Each 3d FFT requires computation (3 sets of 1d FFTs) and communication
(transposes). The total flops performed is 5Nlog_2(N), where N is the
number of points in the 3d grid. The FFTs are timed with and without
the communication and a Gflop rate is computed. The 3d rate is with
communication; the 1d rate is without (just the 1d FFTs). Thus you
can estimate what fraction of your FFT time was spent in
communication, roughly 75% in the example above.</p>
<hr class="docutils" />
</div>
<div class="section" id="tips-for-users-of-previous-lammps-versions">
<span id="start-9"></span><h2>2.9. Tips for users of previous LAMMPS versions<a class="headerlink" href="#tips-for-users-of-previous-lammps-versions" title="Permalink to this headline">¶</a></h2>
<p>The current C++ began with a complete rewrite of LAMMPS 2001, which
was written in F90. Features of earlier versions of LAMMPS are listed
in <a class="reference internal" href="Section_history.html"><em>Section_history</em></a>. The F90 and F77 versions
(2001 and 99) are also freely distributed as open-source codes; check
the <a class="reference external" href="http://lammps.sandia.gov">LAMMPS WWW Site</a> for distribution information if you prefer
those versions. The 99 and 2001 versions are no longer under active
development; they do not have all the features of C++ LAMMPS.</p>
<p>If you are a previous user of LAMMPS 2001, these are the most
significant changes you will notice in C++ LAMMPS:</p>
<p>(1) The names and arguments of many input script commands have
changed. All commands are now a single word (e.g. read_data instead
of read data).</p>
<p>(2) All the functionality of LAMMPS 2001 is included in C++ LAMMPS,
but you may need to specify the relevant commands in different ways.</p>
<p>(3) The format of the data file can be streamlined for some problems.
See the <a class="reference internal" href="read_data.html"><em>read_data</em></a> command for details. The data file
section &#8220;Nonbond Coeff&#8221; has been renamed to &#8220;Pair Coeff&#8221; in C++ LAMMPS.</p>
<p>(4) Binary restart files written by LAMMPS 2001 cannot be read by C++
LAMMPS with a <a class="reference internal" href="read_restart.html"><em>read_restart</em></a> command. This is
because they were output by F90 which writes in a different binary
format than C or C++ writes or reads. Use the <em>restart2data</em> tool
provided with LAMMPS 2001 to convert the 2001 restart file to a text
data file. Then edit the data file as necessary before using the C++
LAMMPS <a class="reference internal" href="read_data.html"><em>read_data</em></a> command to read it in.</p>
<p>(5) There are numerous small numerical changes in C++ LAMMPS that mean
you will not get identical answers when comparing to a 2001 run.
However, your initial thermodynamic energy and MD trajectory should be
close if you have setup the problem for both codes the same.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="Section_commands.html" class="btn btn-neutral float-right" title="3. Commands" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="Section_intro.html" class="btn btn-neutral" title="1. Introduction" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/Section_start.txt b/doc/Section_start.txt
index e11f9db28..f259d2238 100644
--- a/doc/Section_start.txt
+++ b/doc/Section_start.txt
@@ -1,1865 +1,1866 @@
"Previous Section"_Section_intro.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_commands.html :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
2. Getting Started :h3
This section describes how to build and run LAMMPS, for both new and
experienced users.
2.1 "What's in the LAMMPS distribution"_#start_1
2.2 "Making LAMMPS"_#start_2
2.3 "Making LAMMPS with optional packages"_#start_3
2.4 "Building LAMMPS via the Make.py script"_#start_4
2.5 "Building LAMMPS as a library"_#start_5
2.6 "Running LAMMPS"_#start_6
2.7 "Command-line options"_#start_7
2.8 "Screen output"_#start_8
2.9 "Tips for users of previous versions"_#start_9 :all(b)
:line
:line
2.1 What's in the LAMMPS distribution :h4,link(start_1)
When you download a LAMMPS tarball you will need to unzip and untar
the downloaded file with the following commands, after placing the
tarball in an appropriate directory.
gunzip lammps*.tar.gz
tar xvf lammps*.tar :pre
This will create a LAMMPS directory containing two files and several
sub-directories:
README: text file
LICENSE: the GNU General Public License (GPL)
bench: benchmark problems
doc: documentation
examples: simple test problems
potentials: embedded atom method (EAM) potential files
src: source files
tools: pre- and post-processing tools :tb(s=:)
Note that the "download page"_download also has links to download
Windows exectubles and installers, as well as pre-built executables
for a few specific Linux distributions. It also has instructions for
how to download/install LAMMPS for Macs (via Homebrew), and to
download and update LAMMPS from SVN and Git repositories, which gives
you the same files that are in the download tarball.
The Windows and Linux executables for serial or parallel only include
certain packages and bug-fixes/upgrades listed on "this
page"_http://lammps.sandia.gov/bug.html up to a certain date, as
stated on the download page. If you want an executable with
non-included packages or that is more current, then you'll need to
build LAMMPS yourself, as discussed in the next section.
Skip to the "Running LAMMPS"_#start_6 sections for info on how to
launch a LAMMPS Windows executable on a Windows box.
:line
2.2 Making LAMMPS :h4,link(start_2)
This section has the following sub-sections:
"Read this first"_#start_2_1
"Steps to build a LAMMPS executable"_#start_2_2
"Common errors that can occur when making LAMMPS"_#start_2_3
"Additional build tips"_#start_2_4
"Building for a Mac"_#start_2_5
"Building for Windows"_#start_2_6 :ul
:line
[{Read this first:}] :link(start_2_1)
If you want to avoid building LAMMPS yourself, read the preceeding
section about options available for downloading and installing
executables. Details are discussed on the "download"_download page.
Building LAMMPS can be simple or not-so-simple. If all you need are
the default packages installed in LAMMPS, and MPI is already installed
on your machine, or you just want to run LAMMPS in serial, then you
can typically use the Makefile.mpi or Makefile.serial files in
src/MAKE by typing one of these lines (from the src dir):
make mpi
make serial :pre
Note that on a facility supercomputer, there are often "modules"
loaded in your environment that provide the compilers and MPI you
should use. In this case, the "mpicxx" compile/link command in
Makefile.mpi should just work by accessing those modules.
It may be the case that one of the other Makefile.machine files in the
src/MAKE sub-directories is a better match to your system (type "make"
to see a list), you can use it as-is by typing (for example):
make stampede :pre
If any of these builds (with an existing Makefile.machine) works on
your system, then you're done!
If you want to do one of the following:
use optional LAMMPS features that require additional libraries
use optional packages that require additional libraries
use optional accelerator packages that require special compiler/linker settings
run on a specialized platform that has its own compilers, settings, or other libs to use :ul
then building LAMMPS is more complicated. You may need to find where
auxiliary libraries exist on your machine or install them if they
don't. You may need to build additional libraries that are part of
the LAMMPS package, before building LAMMPS. You may need to edit a
Makefile.machine file to make it compatible with your system.
Note that there is a Make.py tool in the src directory that automates
several of these steps, but you still have to know what you are doing.
"Section 2.4"_#start_4 below describes the tool. It is a convenient
way to work with installing/un-installing various packages, the
Makefile.machine changes required by some packages, and the auxiliary
libraries some of them use.
Please read the following sections carefully. If you are not
comfortable with makefiles, or building codes on a Unix platform, or
running an MPI job on your machine, please find a local expert to help
you. Many compilation, linking, and run problems that users have are
often not really LAMMPS issues - they are peculiar to the user's
system, compilers, libraries, etc. Such questions are better answered
by a local expert.
If you have a build problem that you are convinced is a LAMMPS issue
(e.g. the compiler complains about a line of LAMMPS source code), then
please post the issue to the "LAMMPS mail
list"_http://lammps.sandia.gov/mail.html.
If you succeed in building LAMMPS on a new kind of machine, for which
there isn't a similar machine Makefile included in the
src/MAKE/MACHINES directory, then send it to the developers and we can
include it in the LAMMPS distribution.
:line
[{Steps to build a LAMMPS executable:}] :link(start_2_2)
[Step 0]
The src directory contains the C++ source and header files for LAMMPS.
It also contains a top-level Makefile and a MAKE sub-directory with
low-level Makefile.* files for many systems and machines. See the
src/MAKE/README file for a quick overview of what files are available
and what sub-directories they are in.
The src/MAKE dir has a few files that should work as-is on many
platforms. The src/MAKE/OPTIONS dir has more that invoke additional
compiler, MPI, and other setting options commonly used by LAMMPS, to
illustrate their syntax. The src/MAKE/MACHINES dir has many more that
have been tweaked or optimized for specific machines. These files are
all good starting points if you find you need to change them for your
machine. Put any file you edit into the src/MAKE/MINE directory and
it will be never be touched by any LAMMPS updates.
>From within the src directory, type "make" or "gmake". You should see
a list of available choices from src/MAKE and all of its
sub-directories. If one of those has the options you want or is the
machine you want, you can type a command like:
make mpi
or
make serial_icc
or
gmake mac :pre
Note that the corresponding Makefile.machine can exist in src/MAKE or
any of its sub-directories. If a file with the same name appears in
multiple places (not a good idea), the order they are used is as
follows: src/MAKE/MINE, src/MAKE, src/MAKE/OPTIONS, src/MAKE/MACHINES.
This gives preference to a file you have created/edited and put in
src/MAKE/MINE.
Note that on a multi-processor or multi-core platform you can launch a
parallel make, by using the "-j" switch with the make command, which
will build LAMMPS more quickly.
If you get no errors and an executable like lmp_mpi or lmp_g++_serial
or lmp_mac is produced, then you're done; it's your lucky day.
Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see "this
section"_#start_3 below.
[Step 1]
If Step 0 did not work, you will need to create a low-level Makefile
for your machine, like Makefile.foo. You should make a copy of an
existing Makefile.* in src/MAKE or one of its sub-directories as a
starting point. The only portions of the file you need to edit are
the first line, the "compiler/linker settings" section, and the
"LAMMPS-specific settings" section. When it works, put the edited
file in src/MAKE/MINE and it will not be altered by any future LAMMPS
updates.
[Step 2]
Change the first line of Makefile.foo to list the word "foo" after the
"#", and whatever other options it will set. This is the line you
will see if you just type "make".
[Step 3]
The "compiler/linker settings" section lists compiler and linker
settings for your C++ compiler, including optimization flags. You can
use g++, the open-source GNU compiler, which is available on all Unix
systems. You can also use mpicxx which will typically be available if
MPI is installed on your system, though you should check which actual
compiler it wraps. Vendor compilers often produce faster code. On
boxes with Intel CPUs, we suggest using the Intel icc compiler, which
can be downloaded from "Intel's compiler site"_intel.
:link(intel,http://www.intel.com/software/products/noncom)
If building a C++ code on your machine requires additional libraries,
then you should list them as part of the LIB variable. You should
not need to do this if you use mpicxx.
The DEPFLAGS setting is what triggers the C++ compiler to create a
dependency list for a source file. This speeds re-compilation when
source (*.cpp) or header (*.h) files are edited. Some compilers do
not support dependency file creation, or may use a different switch
than -D. GNU g++ and Intel icc works with -D. If your compiler can't
create dependency files, then you'll need to create a Makefile.foo
patterned after Makefile.storm, which uses different rules that do not
involve dependency files. Note that when you build LAMMPS for the
first time on a new platform, a long list of *.d files will be printed
out rapidly. This is not an error; it is the Makefile doing its
normal creation of dependencies.
[Step 4]
The "system-specific settings" section has several parts. Note that
if you change any -D setting in this section, you should do a full
re-compile, after typing "make clean" (which will describe different
clean options).
The LMP_INC variable is used to include options that turn on ifdefs
within the LAMMPS code. The options that are currently recogized are:
-DLAMMPS_GZIP
-DLAMMPS_JPEG
-DLAMMPS_PNG
-DLAMMPS_FFMPEG
-DLAMMPS_MEMALIGN
-DLAMMPS_XDR
-DLAMMPS_SMALLBIG
-DLAMMPS_BIGBIG
-DLAMMPS_SMALLSMALL
-DLAMMPS_LONGLONG_TO_LONG
-DPACK_ARRAY
-DPACK_POINTER
-DPACK_MEMCPY :ul
The read_data and dump commands will read/write gzipped files if you
compile with -DLAMMPS_GZIP. It requires that your machine supports
the "popen()" function in the standard runtime library and that a gzip
executable can be found by LAMMPS during a run.
IMPORTANT NOTE: on some clusters with high-speed networks, using the
fork() library calls (required by popen()) can interfere with the fast
communication library and lead to simulations using compressed output
or input to hang or crash. For selected operations, compressed file
I/O is also available using a compression library instead, which are
provided in the COMPRESS package. From more details about compiling
LAMMPS with packages, please see below.
If you use -DLAMMPS_JPEG, the "dump image"_dump_image.html command
will be able to write out JPEG image files. For JPEG files, you must
also link LAMMPS with a JPEG library, as described below. If you use
-DLAMMPS_PNG, the "dump image"_dump.html command will be able to write
out PNG image files. For PNG files, you must also link LAMMPS with a
PNG library, as described below. If neither of those two defines are
used, LAMMPS will only be able to write out uncompressed PPM image
files.
If you use -DLAMMPS_FFMPEG, the "dump movie"_dump_image.html command
will be available to support on-the-fly generation of rendered movies
the need to store intermediate image files. It requires that your
machines supports the "popen" function in the standard runtime library
and that an FFmpeg executable can be found by LAMMPS during the run.
-IMPORTANT NOTE: also this option can conflict with high-speed networks.
+IMPORTANT NOTE: Similar to the note above, this option can conflict
+with high-speed networks, because it uses popen().
Using -DLAMMPS_MEMALIGN=<bytes> enables the use of the
posix_memalign() call instead of malloc() when large chunks or memory
are allocated by LAMMPS. This can help to make more efficient use of
vector instructions of modern CPUS, since dynamically allocated memory
has to be aligned on larger than default byte boundaries (e.g. 16
bytes instead of 8 bytes on x86 type platforms) for optimal
performance.
If you use -DLAMMPS_XDR, the build will include XDR compatibility
files for doing particle dumps in XTC format. This is only necessary
if your platform does have its own XDR files available. See the
Restrictions section of the "dump"_dump.html command for details.
Use at most one of the -DLAMMPS_SMALLBIG, -DLAMMPS_BIGBIG, -D-
DLAMMPS_SMALLSMALL settings. The default is -DLAMMPS_SMALLBIG. These
settings refer to use of 4-byte (small) vs 8-byte (big) integers
within LAMMPS, as specified in src/lmptype.h. The only reason to use
the BIGBIG setting is to enable simulation of huge molecular systems
(which store bond topology info) with more than 2 billion atoms, or to
track the image flags of moving atoms that wrap around a periodic box
more than 512 times. Normally, the only reason to use SMALLSMALL is
if your machine does not support 64-bit integers, though you can use
SMALLSMALL setting if you are running in serial or on a desktop
machine or small cluster where you will never run large systems or for
long time (more than 2 billion atoms, more than 2 billion timesteps).
See the "Additional build tips"_#start_2_4 section below for more
details on these settings.
Note that two packages, USER-ATC and USER-CUDA are not currently
compatible with -DLAMMPS_BIGBIG. Also the GPU package requires the
lib/gpu library to be compiled with the same setting, or the link will
fail.
The -DLAMMPS_LONGLONG_TO_LONG setting may be needed if your system or
MPI version does not recognize "long long" data types. In this case a
"long" data type is likely already 64-bits, in which case this setting
will convert to that data type.
Using one of the -DPACK_ARRAY, -DPACK_POINTER, and -DPACK_MEMCPY
options can make for faster parallel FFTs (in the PPPM solver) on some
platforms. The -DPACK_ARRAY setting is the default. See the
"kspace_style"_kspace_style.html command for info about PPPM. See
Step 6 below for info about building LAMMPS with an FFT library.
[Step 5]
The 3 MPI variables are used to specify an MPI library to build LAMMPS
with. Note that you do not need to set these if you use the MPI
compiler mpicxx for your CC and LINK setting in the section above.
The MPI wrapper knows where to find the needed files.
If you want LAMMPS to run in parallel, you must have an MPI library
installed on your platform. If MPI is installed on your system in the
usual place (under /usr/local), you also may not need to specify these
3 variables, assuming /usr/local is in your path. On some large
parallel machines which use "modules" for their compile/link
environements, you may simply need to include the correct module in
your build environment, before building LAMMPS. Or the parallel
machine may have a vendor-provided MPI which the compiler has no
trouble finding.
Failing this, these 3 variables can be used to specify where the mpi.h
file (MPI_INC) and the MPI library file (MPI_PATH) are found and the
name of the library file (MPI_LIB).
If you are installing MPI yourself, we recommend Argonne's MPICH2
or OpenMPI. MPICH can be downloaded from the "Argonne MPI
site"_http://www.mcs.anl.gov/research/projects/mpich2/. OpenMPI can
be downloaded from the "OpenMPI site"_http://www.open-mpi.org.
Other MPI packages should also work. If you are running on a big
parallel platform, your system people or the vendor should have
already installed a version of MPI, which is likely to be faster
than a self-installed MPICH or OpenMPI, so find out how to build
and link with it. If you use MPICH or OpenMPI, you will have to
configure and build it for your platform. The MPI configure script
should have compiler options to enable you to use the same compiler
you are using for the LAMMPS build, which can avoid problems that can
arise when linking LAMMPS to the MPI library.
If you just want to run LAMMPS on a single processor, you can use the
dummy MPI library provided in src/STUBS, since you don't need a true
MPI library installed on your system. See src/MAKE/Makefile.serial
for how to specify the 3 MPI variables in this case. You will also
need to build the STUBS library for your platform before making LAMMPS
itself. Note that if you are building with src/MAKE/Makefile.serial,
e.g. by typing "make serial", then the STUBS library is built for you.
To build the STUBS library from the src directory, type "make
mpi-stubs", or from the src/STUBS dir, type "make". This should
create a libmpi_stubs.a file suitable for linking to LAMMPS. If the
build fails, you will need to edit the STUBS/Makefile for your
platform.
The file STUBS/mpi.c provides a CPU timer function called MPI_Wtime()
that calls gettimeofday() . If your system doesn't support
gettimeofday() , you'll need to insert code to call another timer.
Note that the ANSI-standard function clock() rolls over after an hour
or so, and is therefore insufficient for timing long LAMMPS
simulations.
[Step 6]
The 3 FFT variables allow you to specify an FFT library which LAMMPS
uses (for performing 1d FFTs) when running the particle-particle
particle-mesh (PPPM) option for long-range Coulombics via the
"kspace_style"_kspace_style.html command.
LAMMPS supports various open-source or vendor-supplied FFT libraries
for this purpose. If you leave these 3 variables blank, LAMMPS will
use the open-source "KISS FFT library"_http://kissfft.sf.net, which is
included in the LAMMPS distribution. This library is portable to all
platforms and for typical LAMMPS simulations is almost as fast as FFTW
or vendor optimized libraries. If you are not including the KSPACE
package in your build, you can also leave the 3 variables blank.
Otherwise, select which kinds of FFTs to use as part of the FFT_INC
setting by a switch of the form -DFFT_XXX. Recommended values for XXX
are: MKL, SCSL, FFTW2, and FFTW3. Legacy options are: INTEL, SGI,
ACML, and T3E. For backward compatability, using -DFFT_FFTW will use
the FFTW2 library. Using -DFFT_NONE will use the KISS library
described above.
You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables,
so the compiler and linker can find the needed FFT header and library
files. Note that on some large parallel machines which use "modules"
for their compile/link environements, you may simply need to include
the correct module in your build environment. Or the parallel machine
may have a vendor-provided FFT library which the compiler has no
trouble finding.
FFTW is a fast, portable library that should also work on any
platform. You can download it from
"www.fftw.org"_http://www.fftw.org. Both the legacy version 2.1.X and
the newer 3.X versions are supported as -DFFT_FFTW2 or -DFFT_FFTW3.
Building FFTW for your box should be as simple as ./configure; make.
Note that on some platforms FFTW2 has been pre-installed, and uses
renamed files indicating the precision it was compiled with,
e.g. sfftw.h, or dfftw.h instead of fftw.h. In this case, you can
specify an additional define variable for FFT_INC called -DFFTW_SIZE,
which will select the correct include file. In this case, for FFT_LIB
you must also manually specify the correct library, namely -lsfftw or
-ldfftw.
The FFT_INC variable also allows for a -DFFT_SINGLE setting that will
use single-precision FFTs with PPPM, which can speed-up long-range
calulations, particularly in parallel or on GPUs. Fourier transform
and related PPPM operations are somewhat insensitive to floating point
truncation errors and thus do not always need to be performed in
double precision. Using the -DFFT_SINGLE setting trades off a little
accuracy for reduced memory use and parallel communication costs for
transposing 3d FFT data. Note that single precision FFTs have only
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.
[Step 7]
The 3 JPG variables allow you to specify a JPEG and/or PNG library
which LAMMPS uses when writing out JPEG or PNG files via the "dump
image"_dump_image.html command. These can be left blank if you do not
use the -DLAMMPS_JPEG or -DLAMMPS_PNG switches discussed above in Step
4, since in that case JPEG/PNG output will be disabled.
A standard JPEG library usually goes by the name libjpeg.a or
libjpeg.so and has an associated header file jpeglib.h. Whichever
JPEG library you have on your platform, you'll need to set the
appropriate JPG_INC, JPG_PATH, and JPG_LIB variables, so that the
compiler and linker can find it.
A standard PNG library usually goes by the name libpng.a or libpng.so
and has an associated header file png.h. Whichever PNG library you
have on your platform, you'll need to set the appropriate JPG_INC,
JPG_PATH, and JPG_LIB variables, so that the compiler and linker can
find it.
As before, if these header and library files are in the usual place on
your machine, you may not need to set these variables.
[Step 8]
Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see "this
section"_#start_3 below, before proceeding to Step 9.
[Step 9]
That's it. Once you have a correct Makefile.foo, and you have
pre-built any other needed libraries (e.g. MPI, FFT, etc) all you need
to do from the src directory is type something like this:
make foo
or
gmake foo :pre
You should get the executable lmp_foo when the build is complete.
:line
[{Errors that can occur when making LAMMPS:}] :link(start_2_3)
IMPORTANT NOTE: If an error occurs when building LAMMPS, the compiler
or linker will state very explicitly what the problem is. The error
message should give you a hint as to which of the steps above has
failed, and what you need to do in order to fix it. Building a code
with a Makefile is a very logical process. The compiler and linker
need to find the appropriate files and those files need to be
compatible with LAMMPS source files. When a make fails, there is
usually a very simple reason, which you or a local expert will need to
fix.
Here are two non-obvious errors that can occur:
(1) If the make command breaks immediately with errors that indicate
it can't find files with a "*" in their names, this can be because
your machine's native make doesn't support wildcard expansion in a
makefile. Try gmake instead of make. If that doesn't work, try using
a -f switch with your make command to use a pre-generated
Makefile.list which explicitly lists all the needed files, e.g.
make makelist
make -f Makefile.list linux
gmake -f Makefile.list mac :pre
The first "make" command will create a current Makefile.list with all
the file names in your src dir. The 2nd "make" command (make or
gmake) will use it to build LAMMPS. Note that you should
include/exclude any desired optional packages before using the "make
makelist" command.
(2) If you get an error that says something like 'identifier "atoll"
is undefined', then your machine does not support "long long"
integers. Try using the -DLAMMPS_LONGLONG_TO_LONG setting described
above in Step 4.
:line
[{Additional build tips:}] :link(start_2_4)
(1) Building LAMMPS for multiple platforms.
You can make LAMMPS for multiple platforms from the same src
directory. Each target creates its own object sub-directory called
Obj_target where it stores the system-specific *.o files.
(2) Cleaning up.
Typing "make clean-all" or "make clean-machine" will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.
(3) Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL
As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.
The default is -DLAMMPS_SMALLBIG which allows for systems with up to
2^63 atoms and 2^63 timesteps (about 9e18). The atom limit is for
atomic systems which do not store bond topology info and thus do not
require atom IDs. If you use atom IDs for atomic systems (which is
the default) or if you use a molecular model, which stores bond
topology info and thus requires atom IDs, the limit is 2^31 atoms
(about 2 billion). This is because the IDs are stored in 32-bit
integers.
Likewise, with this setting, the 3 image flags for each atom (see the
"dump"_dump.html doc page for a discussion) are stored in a 32-bit
integer, which means the atoms can only wrap around a periodic box (in
each dimension) at most 512 times. If atoms move through the periodic
box more than this many times, the image flags will "roll over",
e.g. from 511 to -512, which can cause diagnostics like the
mean-squared displacement, as calculated by the "compute
msd"_compute_msd.html command, to be faulty.
To allow for larger atomic systems with atom IDs or larger molecular
systems or larger image flags, compile with -DLAMMPS_BIGBIG. This
stores atom IDs and image flags in 64-bit integers. This enables
atomic or molecular systems with atom IDS of up to 2^63 atoms (about
9e18). And image flags will not "roll over" until they reach 2^20 =
1048576.
If your system does not support 8-byte integers, you will need to
compile with the -DLAMMPS_SMALLSMALL setting. This will restrict the
total number of atoms (for atomic or molecular systems) and timesteps
to 2^31 (about 2 billion). Image flags will roll over at 2^9 = 512.
Note that in src/lmptype.h there are definitions of all these data
types as well as the MPI data types associated with them. The MPI
types need to be consistent with the associated C data types, or else
LAMMPS will generate a run-time error. As far as we know, the
settings defined in src/lmptype.h are portable and work on every
current system.
In all cases, the size of problem that can be run on a per-processor
basis is limited by 4-byte integer storage to 2^31 atoms per processor
(about 2 billion). This should not normally be a limitation since such
a problem would have a huge per-processor memory footprint due to
neighbor lists and would run very slowly in terms of CPU secs/timestep.
:line
[{Building for a Mac:}] :link(start_2_5)
OS X is BSD Unix, so it should just work. See the
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.
:line
[{Building for Windows:}] :link(start_2_6)
The LAMMPS download page has an option to download both a serial and
parallel pre-built Windows executable. See the "Running
LAMMPS"_#start_6 section for instructions on running these executables
on a Windows box.
The pre-built executables hosted on the "LAMMPS download
page"_http://lammps.sandia.gov/download.html are built with a subset
of the available packages; see the download page for the list. These
are single executable files. No examples or documentation in
included. You will need to download the full source code package to
obtain those.
As an alternative, you can download "daily builds" (and some older
versions) of the installer packages from
"rpm.lammps.org/windows.html"_http://rpm.lammps.org/windows.html.
These executables are built with most optional packages and the
download includes documentation, some tools and most examples.
If you want a Windows version with specific packages included and
excluded, you can build it yourself.
One way to do this is install and use cygwin to build LAMMPS with a
standard unix style make program, just as you would on a Linux box;
see src/MAKE/MACHINES/Makefile.cygwin.
The other way to do this is using Visual Studio and project files.
See the src/WINDOWS directory and its README.txt file for instructions
on both a basic build and a customized build with pacakges you select.
:line
2.3 Making LAMMPS with optional packages :h4,link(start_3)
This section has the following sub-sections:
"Package basics"_#start_3_1
"Including/excluding packages"_#start_3_2
"Packages that require extra libraries"_#start_3_3
"Packages that require Makefile.machine settings"_#start_3_4 :ul
Note that the following "Section 2.4"_#start_4 describes the Make.py
tool which can be used to install/un-install packages and build the
auxiliary libraries which some of them use. It can also auto-edit a
Makefile.machine to add settings needed by some packages.
:line
[{Package basics:}] :link(start_3_1)
The source code for LAMMPS is structured as a set of core files which
are always included, plus optional packages. Packages are groups of
files that enable a specific set of features. For example, force
fields for molecular systems or granular systems are in packages.
You can see the list of all packages by typing "make package" from
within the src directory of the LAMMPS distribution. This also lists
various make commands that can be used to manipulate packages.
If you use a command in a LAMMPS input script that is specific to a
particular package, you must have built LAMMPS with that package, else
you will get an error that the style is invalid or the command is
unknown. Every command's doc page specfies if it is part of a
package. You can also type
lmp_machine -h :pre
to run your executable with the optional "-h command-line
switch"_#start_7 for "help", which will list the styles and commands
known to your executable.
There are two kinds of packages in LAMMPS, standard and user packages.
More information about the contents of standard and user packages is
given in "Section_packages"_Section_packages.html of the manual. The
difference between standard and user packages is as follows:
Standard packages are supported by the LAMMPS developers and are
written in a syntax and style consistent with the rest of LAMMPS.
This means we will answer questions about them, debug and fix them if
necessary, and keep them compatible with future changes to LAMMPS.
User packages have been contributed by users, and always begin with
the user prefix. If they are a single command (single file), they are
typically in the user-misc package. Otherwise, they are a a set of
files grouped together which add a specific functionality to the code.
User packages don't necessarily meet the requirements of the standard
packages. If you have problems using a feature provided in a user
package, you will likely need to contact the contributor directly to
get help. Information on how to submit additions you make to LAMMPS
as a user-contributed package is given in "this
section"_Section_modify.html#mod_15 of the documentation.
Some packages (both standard and user) require additional libraries.
See more details below.
:line
[{Including/excluding packages:}] :link(start_3_2)
To use or not use a package you must include or exclude it before
building LAMMPS. From the src directory, this is typically as simple
as:
make yes-colloid
make g++ :pre
or
make no-manybody
make g++ :pre
IMPORTANT NOTE: You should NOT include/exclude packages and build
LAMMPS in a single make command by using multiple targets, e.g. make
yes-colloid g++. This is because the make procedure creates a list of
source files that will be out-of-date for the build if the package
configuration changes during the same command.
Some packages have individual files that depend on other packages
being included. LAMMPS checks for this and does the right thing.
I.e. individual files are only included if their dependencies are
already included. Likewise, if a package is excluded, other files
dependent on that package are also excluded.
If you will never run simulations that use the features in a
particular packages, there is no reason to include it in your build.
For some packages, this will keep you from having to build auxiliary
libraries (see below), and will also produce a smaller executable
which may run a bit faster.
When you download a LAMMPS tarball, these packages are pre-installed
in the src directory: KSPACE, MANYBODY,MOLECULE. When you download
LAMMPS source files from the SVN or Git repositories, no packages are
pre-installed.
Packages are included or excluded by typing "make yes-name" or "make
no-name", where "name" is the name of the package in lower-case, e.g.
name = kspace for the KSPACE package or name = user-atc for the
USER-ATC package. You can also type "make yes-standard", "make
no-standard", "make yes-std", "make no-std", "make yes-user", "make
no-user", "make yes-all" or "make no-all" to include/exclude various
sets of packages. Type "make package" to see the all of the
package-related make options.
IMPORTANT NOTE: Inclusion/exclusion of a package works by simply
moving files back and forth between the main src directory and
sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC),
so that the files are seen or not seen when LAMMPS is built. After
you have included or excluded a package, you must re-build LAMMPS.
Additional package-related make options exist to help manage LAMMPS
files that exist in both the src directory and in package
sub-directories. You do not normally need to use these commands
unless you are editing LAMMPS files or have downloaded a patch from
the LAMMPS WWW site.
Typing "make package-update" or "make pu" will overwrite src files
with files from the package sub-directories if the package has been
included. It should be used after a patch is installed, since patches
only update the files in the package sub-directory, but not the src
files. Typing "make package-overwrite" will overwrite files in the
package sub-directories with src files.
Typing "make package-status" or "make ps" will show which packages are
currently included. Of those that are included, it will list files
that are different in the src directory and package sub-directory.
Typing "make package-diff" lists all differences between these files.
Again, type "make package" to see all of the package-related make
options.
:line
[{Packages that require extra libraries:}] :link(start_3_3)
A few of the standard and user packages require additional auxiliary
libraries. Most of them are provided with LAMMPS, in which case they
must be compiled first, before LAMMPS is built if you wish to include
that package. If you get a LAMMPS build error about a missing
library, this is likely the reason. See the
"Section_packages"_Section_packages.html doc page for a list of
packages that have these kinds of auxiliary libraries.
The lib directory in the distribution has sub-directories with package
names that correspond to the needed auxiliary libs, e.g. lib/reax.
Each sub-directory has a README file that gives more details. Code
for most of the auxiliary libraries is included in that directory.
Examples are the USER-ATC and MEAM packages.
A few of the lib sub-directories do not include code, but do include
instructions and sometimes scripts that automate the process of
downloading the auxiliary library and installing it so LAMMPS can link
to it. Examples are the KIM and VORONOI and USER-MOLFILE and USER-SMD
packages.
The lib/python directory (for the PYTHON package) contains only a
choice of Makefile.lammps.* files. This is because no auxiliary code
or libraries are needed, only the Python library and other system libs
that already available on your system. However, the Makefile.lammps
file is needed to tell the LAMMPS build which libs to use and where to
find them.
For libraries with provided code, the sub-directory README file
(e.g. lib/reax/README) has instructions on how to build that library.
Typically this is done by typing something like:
make -f Makefile.g++ :pre
If one of the provided Makefiles is not appropriate for your system
you will need to edit or add one. Note that all the Makefiles have a
setting for EXTRAMAKE at the top that specifies a Makefile.lammps.*
file.
If the library build is successful, it will produce 2 files in the lib
directory:
libpackage.a
Makefile.lammps :pre
The Makefile.lammps file will be a copy of the EXTRAMAKE file setting
specified in the library Makefile.* you used.
Note that you must insure that the settings in Makefile.lammps are
appropriate for your system. If they are not, the LAMMPS build will
fail.
As explained in the lib/package/README files, the settings in
Makefile.lammps are used to specify additional system libraries and
their locations so that LAMMPS can build with the auxiliary library.
For example, if the MEAM or REAX packages are used, the auxiliary
libraries consist of F90 code, built with a Fortran complier. To link
that library with LAMMPS (a C++ code) via whatever C++ compiler LAMMPS
is built with, typically requires additional Fortran-to-C libraries be
included in the link. Another example are the BLAS and LAPACK
libraries needed to use the USER-ATC or USER-AWPMD packages.
For libraries without provided code, the sub-directory README file has
information on where to download the library and how to build it,
e.g. lib/voronoi/README and lib/smd/README. The README files also
describe how you must either (a) create soft links, via the "ln"
command, in those directories to point to where you built or installed
the packages, or (b) check or edit the Makefile.lammps file in the
same directory to provide that information.
Some of the sub-directories, e.g. lib/voronoi, also have an install.py
script which can be used to automate the process of
downloading/building/installing the auxiliary library, and setting the
needed soft links. Type "python install.py" for further instructions.
As with the sub-directories containing library code, if the soft links
or settings in the lib/package/Makefile.lammps files are not correct,
the LAMMPS build will typically fail.
:line
[{Packages that require Makefile.machine settings}] :link(start_3_4)
A few packages require specific settings in Makefile.machine, to
either build or use the package effectively. These are the
USER-INTEL, KOKKOS, USER-OMP, and OPT packages. The details of what
flags to add or what variables to define are given on the doc pages
that describe each of these accelerator packages in detail:
"USER-INTEL package"_accelerate_intel.html
"KOKKOS package"_accelerate_kokkos.html
"USER-OMP package"_accelerate_omp.html
"OPT package"_accelerate_opt.html :ul
Here is a brief summary of what Makefile.machine changes are needed.
Note that the Make.py tool, described in the next "Section
2.4"_#start_4 can automatically add the needed info to an existing
machine Makefile, using simple command-line arguments.
In src/MAKE/OPTIONS see the following Makefiles for examples of the
changes described below:
Makefile.intel_cpu
Makefile.intel_phi
Makefile.kokkos_omp
Makefile.kokkos_cuda
Makefile.kokkos_phi
Makefile.omp :ul
For the USER-INTEL package, you have 2 choices when building. You can
build with CPU or Phi support. The latter uses Xeon Phi chips in
"offload" mode. Each of these modes requires additional settings in
your Makefile.machine for CCFLAGS and LINKFLAGS.
For CPU mode (if using an Intel compiler):
CCFLAGS: add -fopenmp, -DLAMMPS_MEMALIGN=64, -restrict, -xHost, -fno-alias, -ansi-alias, -override-limits
LINKFLAGS: add -fopenmp :ul
For Phi mode add the following in addition to the CPU mode flags:
CCFLAGS: add -DLMP_INTEL_OFFLOAD and
LINKFLAGS: add -offload :ul
And also add this to CCFLAGS:
-offload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\"" :pre
For the KOKKOS package, you have 3 choices when building. You can
build with OMP or Cuda or Phi support. Phi support uses Xeon Phi
chips in "native" mode. This can be done by setting the following
variables in your Makefile.machine:
for OMP support, set OMP = yes
for Cuda support, set OMP = yes and CUDA = yes
for Phi support, set OMP = yes and MIC = yes :ul
These can also be set as additional arguments to the make command, e.g.
make g++ OMP=yes MIC=yes :pre
Building the KOKKOS package with CUDA support requires a Makefile
machine that uses the NVIDIA "nvcc" compiler, as well as an
appropriate "arch" setting appropriate to the GPU hardware and NVIDIA
software you have on your machine. See
src/MAKE/OPTIONS/Makefile.kokkos_cuda for an example of such a machine
Makefile.
For the USER-OMP package, your Makefile.machine needs additional
settings for CCFLAGS and LINKFLAGS.
CCFLAGS: add -fopenmp and -restrict
LINKFLAGS: add -fopenmp :ul
For the OPT package, your Makefile.machine needs an additional
settings for CCFLAGS.
CCFLAGS: add -restrict :ul
:line
2.4 Building LAMMPS via the Make.py script :h4,link(start_4)
The src directory includes a Make.py script, written in Python, which
can be used to automate various steps of the build process. It is
particularly useful for working with the accelerator packages, as well
as other packages which require auxiliary libraries to be built.
The goal of the Make.py tool is to allow any complex multi-step LAMMPS
build to be performed as a single Make.py command. And you can
archive the commands, so they can be re-invoked later via the -r
(redo) switch. If you find some LAMMPS build procedure that can't be
done in a single Make.py command, let the developers know, and we'll
see if we can augment the tool.
You can run Make.py from the src directory by typing either:
Make.py -h
python Make.py -h :pre
which will give you help info about the tool. For the former to work,
you may need to edit the first line of Make.py to point to your local
Python. And you may need to insure the script is executable:
chmod +x Make.py :pre
Here are examples of build tasks you can perform with Make.py:
Install/uninstall packages: Make.py -p no-lib kokkos omp intel
Build specific auxiliary libs: Make.py -a lib-atc lib-meam
Build libs for all installed packages: Make.py -p cuda gpu -gpu mode=double arch=31 -a lib-all
Create a Makefile from scratch with compiler and MPI settings: Make.py -m none -cc g++ -mpi mpich -a file
Augment Makefile.serial with settings for installed packages: Make.py -p intel -intel cpu -m serial -a file
Add JPG and FFTW support to Makefile.mpi: Make.py -m mpi -jpg -fft fftw -a file
Build LAMMPS with a parallel make using Makefile.mpi: Make.py -j 16 -m mpi -a exe
Build LAMMPS and libs it needs using Makefile.serial with accelerator settings: Make.py -p gpu intel -intel cpu -a lib-all file serial :tb(s=:)
The bench and examples directories give Make.py commands that can be
used to build LAMMPS with the various packages and options needed to
run all the benchmark and example input scripts. See these files for
more details:
bench/README
bench/FERMI/README
bench/KEPLER/README
bench/PHI/README
examples/README
examples/accelerate/README
examples/accelerate/make.list :ul
All of the Make.py options and syntax help can be accessed by using
the "-h" switch.
E.g. typing "Make.py -h" gives
Syntax: Make.py switch args ...
switches can be listed in any order
help switch:
-h prints help and syntax for all other specified switches
switch for actions:
-a lib-all, lib-dir, clean, file, exe or machine
list one or more actions, in any order
machine is a Makefile.machine suffix, must be last if used
one-letter switches:
-d (dir), -j (jmake), -m (makefile), -o (output),
-p (packages), -r (redo), -s (settings), -v (verbose)
switches for libs:
-atc, -awpmd, -colvars, -cuda
-gpu, -meam, -poems, -qmmm, -reax
switches for build and makefile options:
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png :pre
Using the "-h" switch with other switches and actions gives additional
info on all the other specified switches or actions. The "-h" can be
anywhere in the command-line and the other switches do not need their
arguments. E.g. type "Make.py -h -d -atc -intel" will print:
-d dir
dir = LAMMPS home dir
if -d not specified, working dir must be lammps/src :pre
-atc make=suffix lammps=suffix2
all args are optional and can be in any order
make = use Makefile.suffix (def = g++)
lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile) :pre
-intel mode
mode = cpu or phi (def = cpu)
build Intel package for CPU or Xeon Phi :pre
Note that Make.py never overwrites an existing Makefile.machine.
Instead, it creates src/MAKE/MINE/Makefile.auto, which you can save or
rename if desired. Likewise it creates an executable named
src/lmp_auto, which you can rename using the -o switch if desired.
The most recently executed Make.py commmand is saved in
src/Make.py.last. You can use the "-r" switch (for redo) to re-invoke
the last command, or you can save a sequence of one or more Make.py
commands to a file and invoke the file of commands using "-r". You
can also label the commands in the file and invoke one or more of them
by name.
A typical use of Make.py is to start with a valid Makefile.machine for
your system, that works for a vanilla LAMMPS build, i.e. when optional
packages are not installed. You can then use Make.py to add various
settings (FFT, JPG, PNG) to the Makefile.machine as well as change its
compiler and MPI options. You can also add additional packages to the
build, as well as build the needed supporting libraries.
You can also use Make.py to create a new Makefile.machine from
scratch, using the "-m none" switch, if you also specify what compiler
and MPI options to use, via the "-cc" and "-mpi" switches.
:line
2.5 Building LAMMPS as a library :h4,link(start_5)
LAMMPS can be built as either a static or shared library, which can
then be called from another application or a scripting language. See
"this section"_Section_howto.html#howto_10 for more info on coupling
LAMMPS to other codes. See "this section"_Section_python.html for
more info on wrapping and running LAMMPS from Python.
[Static library:] :h5
To build LAMMPS as a static library (*.a file on Linux), type
make foo mode=lib :pre
where foo is the machine name. This kind of library is typically used
to statically link a driver application to LAMMPS, so that you can
insure all dependencies are satisfied at compile time. This will use
the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The build
will create the file liblammps_foo.a which another application can
link to. It will also create a soft link liblammps.a, which will
point to the most recently built static library.
[Shared library:] :h5
To build LAMMPS as a shared library (*.so file on Linux), which can be
dynamically loaded, e.g. from Python, type
make foo mode=shlib :pre
where foo is the machine name. This kind of library is required when
wrapping LAMMPS with Python; see "Section_python"_Section_python.html
for details. This will use the SHFLAGS and SHLIBFLAGS settings in
src/MAKE/Makefile.foo and perform the build in the directory
Obj_shared_foo. This is so that each file can be compiled with the
-fPIC flag which is required for inclusion in a shared library. The
build will create the file liblammps_foo.so which another application
can link to dyamically. It will also create a soft link liblammps.so,
which will point to the most recently built shared library. This is
the file the Python wrapper loads by default.
Note that for a shared library to be usable by a calling program, all
the auxiliary libraries it depends on must also exist as shared
libraries. This will be the case for libraries included with LAMMPS,
such as the dummy MPI library in src/STUBS or any package libraries in
lib/packages, since they are always built as shared libraries using
the -fPIC switch. However, if a library like MPI or FFTW does not
exist as a shared library, the shared library build will generate an
error. This means you will need to install a shared library version
of the auxiliary library. The build instructions for the library
should tell you how to do this.
Here is an example of such errors when the system FFTW or provided
lib/colvars library have not been built as shared libraries:
/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value :pre
/usr/bin/ld: ../../lib/colvars/libcolvars.a(colvarmodule.o):
relocation R_X86_64_32 against `__pthread_key_create' can not be used
when making a shared object; recompile with -fPIC
../../lib/colvars/libcolvars.a: error adding symbols: Bad value :pre
As an example, here is how to build and install the "MPICH
library"_mpich, a popular open-source version of MPI, distributed by
Argonne National Labs, as a shared library in the default
/usr/local/lib location:
:link(mpich,http://www-unix.mcs.anl.gov/mpi)
./configure --enable-shared
make
make install :pre
You may need to use "sudo make install" in place of the last line if
you do not have write privileges for /usr/local/lib. The end result
should be the file /usr/local/lib/libmpich.so.
[Additional requirement for using a shared library:] :h5
The operating system finds shared libraries to load at run-time using
the environment variable LD_LIBRARY_PATH. So you may wish to copy the
file src/liblammps.so or src/liblammps_g++.so (for example) to a place
the system can find it by default, such as /usr/local/lib, or you may
wish to add the LAMMPS src directory to LD_LIBRARY_PATH, so that the
current version of the shared library is always available to programs
that use it.
For the csh or tcsh shells, you would add something like this to your
~/.cshrc file:
setenv LD_LIBRARY_PATH $\{LD_LIBRARY_PATH\}:/home/sjplimp/lammps/src :pre
[Calling the LAMMPS library:] :h5
Either flavor of library (static or shared) allows one or more LAMMPS
objects to be instantiated from the calling program.
When used from a C++ program, all of LAMMPS is wrapped in a LAMMPS_NS
namespace; you can safely use any of its classes and methods from
within the calling code, as needed.
When used from a C or Fortran program or a scripting language like
Python, the library has a simple function-style interface, provided in
src/library.cpp and src/library.h.
See the sample codes in examples/COUPLE/simple for examples of C++ and
C and Fortran codes that invoke LAMMPS thru its library interface.
There are other examples as well in the COUPLE directory which are
discussed in "Section_howto 10"_Section_howto.html#howto_10 of the
manual. See "Section_python"_Section_python.html of the manual for a
description of the Python wrapper provided with LAMMPS that operates
through the LAMMPS library interface.
The files src/library.cpp and library.h define the C-style API for
using LAMMPS as a library. See "Section_howto
19"_Section_howto.html#howto_19 of the manual for a description of the
interface and how to extend it for your needs.
:line
2.6 Running LAMMPS :h4,link(start_6)
By default, LAMMPS runs by reading commands from standard input. Thus
if you run the LAMMPS executable by itself, e.g.
lmp_linux :pre
it will simply wait, expecting commands from the keyboard. Typically
you should put commands in an input script and use I/O redirection,
e.g.
lmp_linux < in.file :pre
For parallel environments this should also work. If it does not, use
the '-in' command-line switch, e.g.
lmp_linux -in in.file :pre
"This section"_Section_commands.html describes how input scripts are
structured and what commands they contain.
You can test LAMMPS on any of the sample inputs provided in the
examples or bench directory. Input scripts are named in.* and sample
outputs are named log.*.name.P where name is a machine and P is the
number of processors it was run on.
Here is how you might run a standard Lennard-Jones benchmark on a
Linux box, using mpirun to launch a parallel job:
cd src
make linux
cp lmp_linux ../bench
cd ../bench
mpirun -np 4 lmp_linux -in in.lj :pre
See "this page"_bench for timings for this and the other benchmarks on
various platforms. Note that some of the example scripts require
LAMMPS to be built with one or more of its optional packages.
:link(bench,http://lammps.sandia.gov/bench.html)
:line
On a Windows box, you can skip making LAMMPS and simply download an
executable, as described above, though the pre-packaged executables
include only certain packages.
To run a LAMMPS executable on a Windows machine, first decide whether
you want to download the non-MPI (serial) or the MPI (parallel)
version of the executable. Download and save the version you have
chosen.
For the non-MPI version, follow these steps:
Get a command prompt by going to Start->Run... ,
then typing "cmd". :ulb,l
Move to the directory where you have saved lmp_win_no-mpi.exe
(e.g. by typing: cd "Documents"). :l
At the command prompt, type "lmp_win_no-mpi -in in.lj", replacing in.lj
with the name of your LAMMPS input script. :l,ule
For the MPI version, which allows you to run LAMMPS under Windows on
multiple processors, follow these steps:
Download and install
"MPICH2"_http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads
for Windows. :ulb,l
You'll need to use the mpiexec.exe and smpd.exe files from the MPICH2
package. Put them in same directory (or path) as the LAMMPS Windows
executable. :l
Get a command prompt by going to Start->Run... ,
then typing "cmd". :l
Move to the directory where you have saved lmp_win_mpi.exe
(e.g. by typing: cd "Documents"). :l
Then type something like this: "mpiexec -localonly 4 lmp_win_mpi -in
in.lj", replacing in.lj with the name of your LAMMPS input script. :l
Note that you may need to provide smpd with a passphrase (it doesn't
matter what you type). :l
In this mode, output may not immediately show up on the screen, so if
your input script takes a long time to execute, you may need to be
patient before the output shows up. :l Alternatively, you can still
use this executable to run on a single processor by typing something
like: "lmp_win_mpi -in in.lj". :l,ule
:line
The screen output from LAMMPS is described in the next section. As it
runs, LAMMPS also writes a log.lammps file with the same information.
Note that this sequence of commands copies the LAMMPS executable
(lmp_linux) to the directory with the input files. This may not be
necessary, but some versions of MPI reset the working directory to
where the executable is, rather than leave it as the directory where
you launch mpirun from (if you launch lmp_linux on its own and not
under mpirun). If that happens, LAMMPS will look for additional input
files and write its output files to the executable directory, rather
than your working directory, which is probably not what you want.
If LAMMPS encounters errors in the input script or while running a
simulation it will print an ERROR message and stop or a WARNING
message and continue. See "Section_errors"_Section_errors.html for a
discussion of the various kinds of errors LAMMPS can or can't detect,
a list of all ERROR and WARNING messages, and what to do about them.
LAMMPS can run a problem on any number of processors, including a
single processor. In theory you should get identical answers on any
number of processors and on any machine. In practice, numerical
round-off can cause slight differences and eventual divergence of
molecular dynamics phase space trajectories.
LAMMPS can run as large a problem as will fit in the physical memory
of one or more processors. If you run out of memory, you must run on
more processors or setup a smaller problem.
:line
2.7 Command-line options :h4,link(start_7)
At run time, LAMMPS recognizes several optional command-line switches
which may be used in any order. Either the full word or a one-or-two
letter abbreviation can be used:
-c or -cuda
-e or -echo
-h or -help
-i or -in
-k or -kokkos
-l or -log
-nc or -nocite
-pk or -package
-p or -partition
-pl or -plog
-ps or -pscreen
-r or -restart
-ro or -reorder
-sc or -screen
-sf or -suffix
-v or -var :ul
For example, lmp_ibm might be launched as follows:
mpirun -np 16 lmp_ibm -v f tmp.out -l my.log -sc none -in in.alloy
mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none -in in.alloy :pre
Here are the details on the options:
-cuda on/off :pre
Explicitly enable or disable CUDA support, as provided by the
USER-CUDA package. Even if LAMMPS is built with this package, as
described above in "Section 2.3"_#start_3, this switch must be set to
enable running with the CUDA-enabled styles the package provides. If
the switch is not set (the default), LAMMPS will operate as if the
USER-CUDA package were not installed; i.e. you can run standard LAMMPS
or with the GPU package, for testing or benchmarking purposes.
-echo style :pre
Set the style of command echoing. The style can be {none} or {screen}
or {log} or {both}. Depending on the style, each command read from
the input script will be echoed to the screen and/or logfile. This
can be useful to figure out which line of your script is causing an
input error. The default value is {log}. The echo style can also be
set by using the "echo"_echo.html command in the input script itself.
-help :pre
Print a brief help summary and a list of options compiled into this
executable for each LAMMPS style (atom_style, fix, compute,
pair_style, bond_style, etc). This can tell you if the command you
want to use was included via the appropriate package at compile time.
LAMMPS will print the info and immediately exit if this switch is
used.
-in file :pre
Specify a file to use as an input script. This is an optional switch
when running LAMMPS in one-partition mode. If it is not specified,
LAMMPS reads its script from standard input, typically from a script
via I/O redirection; e.g. lmp_linux < in.run. I/O redirection should
also work in parallel, but if it does not (in the unlikely case that
an MPI implementation does not support it), then use the -in flag.
Note that this is a required switch when running LAMMPS in
multi-partition mode, since multiple processors cannot all read from
stdin.
-kokkos on/off keyword/value ... :pre
Explicitly enable or disable KOKKOS support, as provided by the KOKKOS
package. Even if LAMMPS is built with this package, as described
above in "Section 2.3"_#start_3, this switch must be set to enable
running with the KOKKOS-enabled styles the package provides. If the
switch is not set (the default), LAMMPS will operate as if the KOKKOS
package were not installed; i.e. you can run standard LAMMPS or with
the GPU or USER-CUDA or USER-OMP packages, for testing or benchmarking
purposes.
Additional optional keyword/value pairs can be specified which
determine how Kokkos will use the underlying hardware on your
platform. These settings apply to each MPI task you launch via the
"mpirun" or "mpiexec" command. You may choose to run one or more MPI
tasks per physical node. Note that if you are running on a desktop
machine, you typically have one physical node. On a cluster or
supercomputer there may be dozens or 1000s of physical nodes.
Either the full word or an abbreviation can be used for the keywords.
Note that the keywords do not use a leading minus sign. I.e. the
keyword is "t", not "-t". Also note that each of the keywords has a
default setting. Example of when to use these options and what
settings to use on different platforms is given in "Section
5.8"_Section_accelerate.html#acc_8.
d or device
g or gpus
t or threads
n or numa :ul
device Nd :pre
This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and if you are running with only one
MPI task per node. The Nd setting is the ID of the GPU on the node to
run on. By default Nd = 0. If you have multiple GPUs per node, they
have consecutive IDs numbered as 0,1,2,etc. This setting allows you
to launch multiple independent jobs on the node, each with a single
MPI task per node, and assign each job to run on a different GPU.
gpus Ng Ns :pre
This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and you are running with multiple MPI
tasks per node (up to one per GPU). The Ng setting is how many GPUs
you will use. The Ns setting is optional. If set, it is the ID of a
GPU to skip when assigning MPI tasks to GPUs. This may be useful if
your desktop system reserves one GPU to drive the screen and the rest
are intended for computational work like running LAMMPS. By default
Ng = 1 and Ns is not set.
Depending on which flavor of MPI you are running, LAMMPS will look for
one of these 3 environment variables
SLURM_LOCALID (various MPI variants compiled with SLURM support)
MV2_COMM_WORLD_LOCAL_RANK (Mvapich)
OMPI_COMM_WORLD_LOCAL_RANK (OpenMPI) :pre
which are initialized by the "srun", "mpirun" or "mpiexec" commands.
The environment variable setting for each MPI rank is used to assign a
unique GPU ID to the MPI task.
threads Nt :pre
This option assigns Nt number of threads to each MPI task for
performing work when Kokkos is executing in OpenMP or pthreads mode.
The default is Nt = 1, which essentially runs in MPI-only mode. If
there are Np MPI tasks per physical node, you generally want Np*Nt =
the number of physical cores per node, to use your available hardware
optimally. This also sets the number of threads used by the host when
LAMMPS is compiled with CUDA=yes.
numa Nm :pre
This option is only relevant when using pthreads with hwloc support.
In this case Nm defines the number of NUMA regions (typicaly sockets)
on a node which will be utilizied by a single MPI rank. By default Nm
= 1. If this option is used the total number of worker-threads per
MPI rank is threads*numa. Currently it is always almost better to
assign at least one MPI rank per NUMA region, and leave numa set to
its default value of 1. This is because letting a single process span
multiple NUMA regions induces a significant amount of cross NUMA data
traffic which is slow.
-log file :pre
Specify a log file for LAMMPS to write status information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
file log.lammps. If this switch is used, LAMMPS writes to the
specified file. In multi-partition mode, if the switch is not used, a
log.lammps file is created with hi-level status information. Each
partition also writes to a log.lammps.N file where N is the partition
ID. If the switch is specified in multi-partition mode, the hi-level
logfile is named "file" and each partition also logs information to a
file.N. For both one-partition and multi-partition mode, if the
specified file is "none", then no log files are created. Using a
"log"_log.html command in the input script will override this setting.
Option -plog will override the name of the partition log files file.N.
-nocite :pre
Disable writing the log.cite file which is normally written to list
references for specific cite-able features used during a LAMMPS run.
See the "citation page"_http://lammps.sandia.gov/cite.html for more
details.
-package style args .... :pre
Invoke the "package"_package.html command with style and args. The
syntax is the same as if the command appeared at the top of the input
script. For example "-package gpu 2" or "-pk gpu 2" is the same as
"package gpu 2"_package.html in the input script. The possible styles
and args are documented on the "package"_package.html doc page. This
switch can be used multiple times, e.g. to set options for the
USER-INTEL and USER-OMP packages which can be used together.
Along with the "-suffix" command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.
-partition 8x2 4 5 ... :pre
Invoke LAMMPS in multi-partition mode. When LAMMPS is run on P
processors and this switch is not used, LAMMPS runs in one partition,
i.e. all P processors run a single simulation. If this switch is
used, the P processors are split into separate partitions and each
partition runs its own simulation. The arguments to the switch
specify the number of processors in each partition. Arguments of the
form MxN mean M partitions, each with N processors. Arguments of the
form N mean a single partition with N processors. The sum of
processors in all partitions must equal P. Thus the command
"-partition 8x2 4 5" has 10 partitions and runs on a total of 25
processors.
Running with multiple partitions can e useful for running
"multi-replica simulations"_Section_howto.html#howto_5, where each
replica runs on on one or a few processors. Note that with MPI
installed on a machine (e.g. your desktop), you can run on more
(virtual) processors than you have physical processors.
To run multiple independent simulatoins from one input script, using
multiple partitions, see "Section_howto 4"_Section_howto.html#howto_4
of the manual. World- and universe-style "variables"_variable.html
are useful in this context.
-plog file :pre
Specify the base name for the partition log files, so partition N
writes log information to file.N. If file is none, then no partition
log files are created. This overrides the filename specified in the
-log command-line option. This option is useful when working with
large numbers of partitions, allowing the partition log files to be
suppressed (-plog none) or placed in a sub-directory (-plog
replica_files/log.lammps) If this option is not used the log file for
partition N is log.lammps.N or whatever is specified by the -log
command-line option.
-pscreen file :pre
Specify the base name for the partition screen file, so partition N
writes screen information to file.N. If file is none, then no
partition screen files are created. This overrides the filename
specified in the -screen command-line option. This option is useful
when working with large numbers of partitions, allowing the partition
screen files to be suppressed (-pscreen none) or placed in a
sub-directory (-pscreen replica_files/screen). If this option is not
used the screen file for partition N is screen.N or whatever is
specified by the -screen command-line option.
-restart restartfile {remap} datafile keyword value ... :pre
Convert the restart file into a data file and immediately exit. This
is the same operation as if the following 2-line input script were
run:
read_restart restartfile {remap}
write_data datafile keyword value ... :pre
Note that the specified restartfile and datafile can have wild-card
characters ("*",%") as described by the
"read_restart"_read_restart.html and "write_data"_write_data.html
commands. But a filename such as file.* will need to be enclosed in
quotes to avoid shell expansion of the "*" character.
Note that following restartfile, the optional flag {remap} can be
used. This has the same effect as adding it to the
"read_restart"_read_restart.html command, as explained on its doc
page. This is only useful if the reading of the restart file triggers
an error that atoms have been lost. In that case, use of the remap
flag should allow the data file to still be produced.
Also note that following datafile, the same optional keyword/value
pairs can be listed as used by the "write_data"_write_data.html
command.
-reorder nth N
-reorder custom filename :pre
Reorder the processors in the MPI communicator used to instantiate
LAMMPS, in one of several ways. The original MPI communicator ranks
all P processors from 0 to P-1. The mapping of these ranks to
physical processors is done by MPI before LAMMPS begins. It may be
useful in some cases to alter the rank order. E.g. to insure that
cores within each node are ranked in a desired order. Or when using
the "run_style verlet/split"_run_style.html command with 2 partitions
to insure that a specific Kspace processor (in the 2nd partition) is
matched up with a specific set of processors in the 1st partition.
See the "Section_accelerate"_Section_accelerate.html doc pages for
more details.
If the keyword {nth} is used with a setting {N}, then it means every
Nth processor will be moved to the end of the ranking. This is useful
when using the "run_style verlet/split"_run_style.html command with 2
partitions via the -partition command-line switch. The first set of
processors will be in the first partition, the 2nd set in the 2nd
partition. The -reorder command-line switch can alter this so that
the 1st N procs in the 1st partition and one proc in the 2nd partition
will be ordered consecutively, e.g. as the cores on one physical node.
This can boost performance. For example, if you use "-reorder nth 4"
and "-partition 9 3" and you are running on 12 processors, the
processors will be reordered from
0 1 2 3 4 5 6 7 8 9 10 11 :pre
to
0 1 2 4 5 6 8 9 10 3 7 11 :pre
so that the processors in each partition will be
0 1 2 4 5 6 8 9 10
3 7 11 :pre
See the "processors" command for how to insure processors from each
partition could then be grouped optimally for quad-core nodes.
If the keyword is {custom}, then a file that specifies a permutation
of the processor ranks is also specified. The format of the reorder
file is as follows. Any number of initial blank or comment lines
(starting with a "#" character) can be present. These should be
followed by P lines of the form:
I J :pre
where P is the number of processors LAMMPS was launched with. Note
that if running in multi-partition mode (see the -partition switch
above) P is the total number of processors in all partitions. The I
and J values describe a permutation of the P processors. Every I and
J should be values from 0 to P-1 inclusive. In the set of P I values,
every proc ID should appear exactly once. Ditto for the set of P J
values. A single I,J pairing means that the physical processor with
rank I in the original MPI communicator will have rank J in the
reordered communicator.
Note that rank ordering can also be specified by many MPI
implementations, either by environment variables that specify how to
order physical processors, or by config files that specify what
physical processors to assign to each MPI rank. The -reorder switch
simply gives you a portable way to do this without relying on MPI
itself. See the "processors out"_processors command for how to output
info on the final assignment of physical processors to the LAMMPS
simulation domain.
-screen file :pre
Specify a file for LAMMPS to write its screen information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
screen. If this switch is used, LAMMPS writes to the specified file
instead and you will see no screen output. In multi-partition mode,
if the switch is not used, hi-level status information is written to
the screen. Each partition also writes to a screen.N file where N is
the partition ID. If the switch is specified in multi-partition mode,
the hi-level screen dump is named "file" and each partition also
writes screen information to a file.N. For both one-partition and
multi-partition mode, if the specified file is "none", then no screen
output is performed. Option -pscreen will override the name of the
partition screen files file.N.
-suffix style :pre
Use variants of various styles if they exist. The specified style can
be {cuda}, {gpu}, {intel}, {kk}, {omp}, or {opt}. These refer to
optional packages that LAMMPS can be built with, as described above in
"Section 2.3"_#start_3. The "cuda" style corresponds to the USER-CUDA
package, the "gpu" style to the GPU package, the "intel" style to the
USER-INTEL package, the "kk" style to the KOKKOS package, the "opt"
style to the OPT package, and the "omp" style to the USER-OMP package.
Along with the "-package" command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.
As an example, all of the packages provide a "pair_style
lj/cut"_pair_lj.html variant, with style names lj/cut/cuda,
lj/cut/gpu, lj/cut/intel, lj/cut/kk, lj/cut/omp, and lj/cut/opt. A
variant style can be specified explicitly in your input script,
e.g. pair_style lj/cut/gpu. If the -suffix switch is used the
specified suffix (cuda,gpu,intel,kk,omp,opt) is automatically appended
whenever your input script command creates a new
"atom"_atom_style.html, "pair"_pair_style.html, "fix"_fix.html,
"compute"_compute.html, or "run"_run_style.html style. If the variant
version does not exist, the standard version is created.
For the GPU package, using this command-line switch also invokes the
default GPU settings, as if the command "package gpu 1" were used at
the top of your input script. These settings can be changed by using
the "-package gpu" command-line switch or the "package
gpu"_package.html command in your script.
For the USER-INTEL package, using this command-line switch also
invokes the default USER-INTEL settings, as if the command "package
intel 1" were used at the top of your input script. These settings
can be changed by using the "-package intel" command-line switch or
the "package intel"_package.html command in your script. If the
USER-OMP package is also installed, the intel suffix will make the omp
suffix a second choice, if a requested style is not available in the
USER-INTEL package. It will also invoke the default USER-OMP
settings, as if the command "package omp 0" were used at the top of
your input script. These settings can be changed by using the
"-package omp" command-line switch or the "package omp"_package.html
command in your script.
For the KOKKOS package, using this command-line switch also invokes
the default KOKKOS settings, as if the command "package kokkos" were
used at the top of your input script. These settings can be changed
by using the "-package kokkos" command-line switch or the "package
kokkos"_package.html command in your script.
For the OMP package, using this command-line switch also invokes the
default OMP settings, as if the command "package omp 0" were used at
the top of your input script. These settings can be changed by using
the "-package omp" command-line switch or the "package
omp"_package.html command in your script.
The "suffix"_suffix.html command can also be used within an input
script to set a suffix, or to turn off or back on any suffix setting
made via the command line.
-var name value1 value2 ... :pre
Specify a variable that will be defined for substitution purposes when
the input script is read. This switch can be used multiple times to
define multiple variables. "Name" is the variable name which can be a
single character (referenced as $x in the input script) or a full
string (referenced as $\{abc\}). An "index-style
variable"_variable.html will be created and populated with the
subsequent values, e.g. a set of filenames. Using this command-line
option is equivalent to putting the line "variable name index value1
value2 ..." at the beginning of the input script. Defining an index
variable as a command-line argument overrides any setting for the same
index variable in the input script, since index variables cannot be
re-defined. See the "variable"_variable.html command for more info on
defining index and other kinds of variables and "this
section"_Section_commands.html#cmd_2 for more info on using variables
in input scripts.
NOTE: Currently, the command-line parser looks for arguments that
start with "-" to indicate new switches. Thus you cannot specify
multiple variable values if any of they start with a "-", e.g. a
negative numeric value. It is OK if the first value1 starts with a
"-", since it is automatically skipped.
:line
2.8 LAMMPS screen output :h4,link(start_8)
As LAMMPS reads an input script, it prints information to both the
screen and a log file about significant actions it takes to setup a
simulation. When the simulation is ready to begin, LAMMPS performs
various initializations and prints the amount of memory (in MBytes per
processor) that the simulation requires. It also prints details of
the initial thermodynamic state of the system. During the run itself,
thermodynamic information is printed periodically, every few
timesteps. When the run concludes, LAMMPS prints the final
thermodynamic state and a total run time for the simulation. It then
appends statistics about the CPU time and storage requirements for the
simulation. An example set of statistics is shown here:
Loop time of 49.002 on 2 procs for 2004 atoms :pre
Pair time (%) = 35.0495 (71.5267)
Bond time (%) = 0.092046 (0.187841)
Kspce time (%) = 6.42073 (13.103)
Neigh time (%) = 2.73485 (5.5811)
Comm time (%) = 1.50291 (3.06703)
Outpt time (%) = 0.013799 (0.0281601)
Other time (%) = 2.13669 (4.36041) :pre
Nlocal: 1002 ave, 1015 max, 989 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 8720 ave, 8724 max, 8716 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 354141 ave, 361422 max, 346860 min
Histogram: 1 0 0 0 0 0 0 0 0 1 :pre
Total # of neighbors = 708282
Ave neighs/atom = 353.434
Ave special neighs/atom = 2.34032
Number of reneighborings = 42
Dangerous reneighborings = 2 :pre
The first section gives the breakdown of the CPU run time (in seconds)
into major categories. The second section lists the number of owned
atoms (Nlocal), ghost atoms (Nghost), and pair-wise neighbors stored
per processor. The max and min values give the spread of these values
across processors with a 10-bin histogram showing the distribution.
The total number of histogram counts is equal to the number of
processors.
The last section gives aggregate statistics for pair-wise neighbors
and special neighbors that LAMMPS keeps track of (see the
"special_bonds"_special_bonds.html command). The number of times
neighbor lists were rebuilt during the run is given as well as the
number of potentially "dangerous" rebuilds. If atom movement
triggered neighbor list rebuilding (see the
"neigh_modify"_neigh_modify.html command), then dangerous
reneighborings are those that were triggered on the first timestep
atom movement was checked for. If this count is non-zero you may wish
to reduce the delay factor to insure no force interactions are missed
by atoms moving beyond the neighbor skin distance before a rebuild
takes place.
If an energy minimization was performed via the
"minimize"_minimize.html command, additional information is printed,
e.g.
Minimization stats:
E initial, next-to-last, final = -0.895962 -2.94193 -2.94342
Gradient 2-norm init/final= 1920.78 20.9992
Gradient inf-norm init/final= 304.283 9.61216
Iterations = 36
Force evaluations = 177 :pre
The first line lists the initial and final energy, as well as the
energy on the next-to-last iteration. The next 2 lines give a measure
of the gradient of the energy (force on all atoms). The 2-norm is the
"length" of this force vector; the inf-norm is the largest component.
The last 2 lines are statistics on how many iterations and
force-evaluations the minimizer required. Multiple force evaluations
are typically done at each iteration to perform a 1d line minimization
in the search direction.
If a "kspace_style"_kspace_style.html long-range Coulombics solve was
performed during the run (PPPM, Ewald), then additional information is
printed, e.g.
FFT time (% of Kspce) = 0.200313 (8.34477)
FFT Gflps 3d 1d-only = 2.31074 9.19989 :pre
The first line gives the time spent doing 3d FFTs (4 per timestep) and
the fraction it represents of the total KSpace time (listed above).
Each 3d FFT requires computation (3 sets of 1d FFTs) and communication
(transposes). The total flops performed is 5Nlog_2(N), where N is the
number of points in the 3d grid. The FFTs are timed with and without
the communication and a Gflop rate is computed. The 3d rate is with
communication; the 1d rate is without (just the 1d FFTs). Thus you
can estimate what fraction of your FFT time was spent in
communication, roughly 75% in the example above.
:line
2.9 Tips for users of previous LAMMPS versions :h4,link(start_9)
The current C++ began with a complete rewrite of LAMMPS 2001, which
was written in F90. Features of earlier versions of LAMMPS are listed
in "Section_history"_Section_history.html. The F90 and F77 versions
(2001 and 99) are also freely distributed as open-source codes; check
the "LAMMPS WWW Site"_lws for distribution information if you prefer
those versions. The 99 and 2001 versions are no longer under active
development; they do not have all the features of C++ LAMMPS.
If you are a previous user of LAMMPS 2001, these are the most
significant changes you will notice in C++ LAMMPS:
(1) The names and arguments of many input script commands have
changed. All commands are now a single word (e.g. read_data instead
of read data).
(2) All the functionality of LAMMPS 2001 is included in C++ LAMMPS,
but you may need to specify the relevant commands in different ways.
(3) The format of the data file can be streamlined for some problems.
See the "read_data"_read_data.html command for details. The data file
section "Nonbond Coeff" has been renamed to "Pair Coeff" in C++ LAMMPS.
(4) Binary restart files written by LAMMPS 2001 cannot be read by C++
LAMMPS with a "read_restart"_read_restart.html command. This is
because they were output by F90 which writes in a different binary
format than C or C++ writes or reads. Use the {restart2data} tool
provided with LAMMPS 2001 to convert the 2001 restart file to a text
data file. Then edit the data file as necessary before using the C++
LAMMPS "read_data"_read_data.html command to read it in.
(5) There are numerous small numerical changes in C++ LAMMPS that mean
you will not get identical answers when comparing to a 2001 run.
However, your initial thermodynamic energy and MD trajectory should be
close if you have setup the problem for both codes the same.
diff --git a/doc/doc2/Section_commands.html b/doc/doc2/Section_commands.html
index 427f4b825..bb0a097c9 100644
--- a/doc/doc2/Section_commands.html
+++ b/doc/doc2/Section_commands.html
@@ -1,666 +1,666 @@
<HTML>
<CENTER><A HREF = "Section_start.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_packages.html">Next Section</A>
</CENTER>
<HR>
<H3>3. Commands
</H3>
<P>This section describes how a LAMMPS input script is formatted and the
input script commands used to define a LAMMPS simulation.
</P>
3.1 <A HREF = "#cmd_1">LAMMPS input script</A><BR>
3.2 <A HREF = "#cmd_2">Parsing rules</A><BR>
3.3 <A HREF = "#cmd_3">Input script structure</A><BR>
3.4 <A HREF = "#cmd_4">Commands listed by category</A><BR>
3.5 <A HREF = "#cmd_5">Commands listed alphabetically</A> <BR>
<HR>
<HR>
<A NAME = "cmd_1"></A><H4>3.1 LAMMPS input script
</H4>
<P>LAMMPS executes by reading commands from a input script (text file),
one line at a time. When the input script ends, LAMMPS exits. Each
command causes LAMMPS to take some action. It may set an internal
variable, read in a file, or run a simulation. Most commands have
default settings, which means you only need to use the command if you
wish to change the default.
</P>
<P>In many cases, the ordering of commands in an input script is not
important. However the following rules apply:
</P>
<P>(1) LAMMPS does not read your entire input script and then perform a
simulation with all the settings. Rather, the input script is read
one line at a time and each command takes effect when it is read.
Thus this sequence of commands:
</P>
<PRE>timestep 0.5
run 100
run 100
</PRE>
<P>does something different than this sequence:
</P>
<PRE>run 100
timestep 0.5
run 100
</PRE>
<P>In the first case, the specified timestep (0.5 fmsec) is used for two
simulations of 100 timesteps each. In the 2nd case, the default
timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5
fmsec timestep is used for the 2nd one.
</P>
<P>(2) Some commands are only valid when they follow other commands. For
example you cannot set the temperature of a group of atoms until atoms
have been defined and a group command is used to define which atoms
belong to the group.
</P>
<P>(3) Sometimes command B will use values that can be set by command A.
This means command A must precede command B in the input script if it
is to have the desired effect. For example, the
<A HREF = "read_data.html">read_data</A> command initializes the system by setting
up the simulation box and assigning atoms to processors. If default
values are not desired, the <A HREF = "processors.html">processors</A> and
<A HREF = "boundary.html">boundary</A> commands need to be used before read_data to
tell LAMMPS how to map processors to the simulation box.
</P>
<P>Many input script errors are detected by LAMMPS and an ERROR or
WARNING message is printed. <A HREF = "Section_errors.html">This section</A> gives
more information on what errors mean. The documentation for each
command lists restrictions on how the command can be used.
</P>
<HR>
<A NAME = "cmd_2"></A><H4>3.2 Parsing rules
</H4>
<P>Each non-blank line in the input script is treated as a command.
LAMMPS commands are case sensitive. Command names are lower-case, as
are specified command arguments. Upper case letters may be used in
file names or user-chosen ID strings.
</P>
<P>Here is how each line in the input script is parsed by LAMMPS:
</P>
<P>(1) If the last printable character on the line is a "&" character,
the command is assumed to continue on the next line. The next line is
concatenated to the previous line by removing the "&" character and
line break. This allows long commands to be continued across two or
more lines. See the discussion of triple quotes in (6) for how to
continue a command across multiple line without using "&" characters.
</P>
<P>(2) All characters from the first "#" character onward are treated as
comment and discarded. See an exception in (6). Note that a
comment after a trailing "&" character will prevent the command from
continuing on the next line. Also note that for multi-line commands a
single leading "#" will comment out the entire command.
</P>
<P>(3) The line is searched repeatedly for $ characters, which indicate
variables that are replaced with a text string. See an exception in
(6).
</P>
<P>If the $ is followed by curly brackets, then the variable name is the
text inside the curly brackets. If no curly brackets follow the $,
then the variable name is the single character immediately following
the $. Thus ${myTemp} and $x refer to variable names "myTemp" and
"x".
</P>
<P>How the variable is converted to a text string depends on what style
of variable it is; see the <A HREF = "variable">variable</A> doc page for details.
It can be a variable that stores multiple text strings, and return one
of them. The returned text string can be multiple "words" (space
separated) which will then be interpreted as multiple arguments in the
input command. The variable can also store a numeric formula which
will be evaluated and its numeric result returned as a string.
</P>
<P>As a special case, if the $ is followed by parenthesis, then the text
inside the parenthesis is treated as an "immediate" variable and
evaluated as an <A HREF = "variable.html">equal-style variable</A>. This is a way
to use numeric formulas in an input script without having to assign
them to variable names. For example, these 3 input script lines:
</P>
<PRE>variable X equal (xlo+xhi)/2+sqrt(v_area)
region 1 block $X 2 INF INF EDGE EDGE
variable X delete
</PRE>
<P>can be replaced by
</P>
<PRE>region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE
</PRE>
<P>so that you do not have to define (or discard) a temporary variable X.
</P>
<P>Note that neither the curly-bracket or immediate form of variables can
contain nested $ characters for other variables to substitute for.
Thus you cannot do this:
</P>
<PRE>variable a equal 2
variable b2 equal 4
print "B2 = ${b$a}"
</PRE>
<P>Nor can you specify this $($x-1.0) for an immediate variable, but
you could use $(v_x-1.0), since the latter is valid syntax for an
<A HREF = "variable.html">equal-style variable</A>.
</P>
<P>See the <A HREF = "variable.html">variable</A> command for more details of how
strings are assigned to variables and evaluated, and how they can be
used in input script commands.
</P>
<P>(4) The line is broken into "words" separated by whitespace (tabs,
spaces). Note that words can thus contain letters, digits,
underscores, or punctuation characters.
</P>
<P>(5) The first word is the command name. All successive words in the
line are arguments.
</P>
<P>(6) If you want text with spaces to be treated as a single argument,
it can be enclosed in either single or double or triple quotes. A
long single argument enclosed in single or double quotes can span
multiple lines if the "&" character is used, as described above. When
the lines are concatenated together (and the "&" characters and line
breaks removed), the text will become a single line. If you want
multiple lines of an argument to retain their line breaks, the text
can be enclosed in triple quotes, in which case "&" characters are not
needed. For example:
</P>
<PRE>print "Volume = $v"
print 'Volume = $v'
if "${steps} > 1000" then quit
variable a string "red green blue &
purple orange cyan"
print """
System volume = $v
System temperature = $t
"""
</PRE>
<P>In each case, the single, double, or triple quotes are removed when
the single argument they enclose is stored internally.
</P>
<P>See the <A HREF = "dump_modify.html">dump modify format</A>, <A HREF = "print.html">print</A>,
<A HREF = "if.html">if</A>, and <A HREF = "python.html">python</A> commands for examples.
</P>
<P>A "#" or "$" character that is between quotes will not be treated as a
comment indicator in (2) or substituted for as a variable in (3).
</P>
<P>IMPORTANT NOTE: If the argument is itself a command that requires a
quoted argument (e.g. using a <A HREF = "print.html">print</A> command as part of an
<A HREF = "if.html">if</A> or <A HREF = "run.html">run every</A> command), then single, double, or
triple quotes can be nested in the usual manner. See the doc pages
for those commands for examples. Only one of level of nesting is
allowed, but that should be sufficient for most use cases.
</P>
<HR>
<H4><A NAME = "cmd_3"></A>3.3 Input script structure
</H4>
<P>This section describes the structure of a typical LAMMPS input script.
The "examples" directory in the LAMMPS distribution contains many
sample input scripts; the corresponding problems are discussed in
<A HREF = "Section_example.html">Section_example</A>, and animated on the <A HREF = "http://lammps.sandia.gov">LAMMPS
WWW Site</A>.
</P>
<P>A LAMMPS input script typically has 4 parts:
</P>
<OL><LI>Initialization
<LI>Atom definition
<LI>Settings
<LI>Run a simulation
</OL>
<P>The last 2 parts can be repeated as many times as desired. I.e. run a
simulation, change some settings, run some more, etc. Each of the 4
parts is now described in more detail. Remember that almost all the
commands need only be used if a non-default value is desired.
</P>
<P>(1) Initialization
</P>
<P>Set parameters that need to be defined before atoms are created or
read-in from a file.
</P>
<P>The relevant commands are <A HREF = "units.html">units</A>,
<A HREF = "dimension.html">dimension</A>, <A HREF = "newton.html">newton</A>,
<A HREF = "processors.html">processors</A>, <A HREF = "boundary.html">boundary</A>,
<A HREF = "atom_style.html">atom_style</A>, <A HREF = "atom_modify.html">atom_modify</A>.
</P>
<P>If force-field parameters appear in the files that will be read, these
commands tell LAMMPS what kinds of force fields are being used:
<A HREF = "pair_style.html">pair_style</A>, <A HREF = "bond_style.html">bond_style</A>,
<A HREF = "angle_style.html">angle_style</A>, <A HREF = "dihedral_style.html">dihedral_style</A>,
<A HREF = "improper_style.html">improper_style</A>.
</P>
<P>(2) Atom definition
</P>
<P>There are 3 ways to define atoms in LAMMPS. Read them in from a data
or restart file via the <A HREF = "read_data.html">read_data</A> or
<A HREF = "read_restart.html">read_restart</A> commands. These files can contain
molecular topology information. Or create atoms on a lattice (with no
molecular topology), using these commands: <A HREF = "lattice.html">lattice</A>,
<A HREF = "region.html">region</A>, <A HREF = "create_box.html">create_box</A>,
<A HREF = "create_atoms.html">create_atoms</A>. The entire set of atoms can be
duplicated to make a larger simulation using the
<A HREF = "replicate.html">replicate</A> command.
</P>
<P>(3) Settings
</P>
<P>Once atoms and molecular topology are defined, a variety of settings
can be specified: force field coefficients, simulation parameters,
output options, etc.
</P>
<P>Force field coefficients are set by these commands (they can also be
set in the read-in files): <A HREF = "pair_coeff.html">pair_coeff</A>,
<A HREF = "bond_coeff.html">bond_coeff</A>, <A HREF = "angle_coeff.html">angle_coeff</A>,
<A HREF = "dihedral_coeff.html">dihedral_coeff</A>,
<A HREF = "improper_coeff.html">improper_coeff</A>,
<A HREF = "kspace_style.html">kspace_style</A>, <A HREF = "dielectric.html">dielectric</A>,
<A HREF = "special_bonds.html">special_bonds</A>.
</P>
<P>Various simulation parameters are set by these commands:
<A HREF = "neighbor.html">neighbor</A>, <A HREF = "neigh_modify.html">neigh_modify</A>,
<A HREF = "group.html">group</A>, <A HREF = "timestep.html">timestep</A>,
<A HREF = "reset_timestep.html">reset_timestep</A>, <A HREF = "run_style.html">run_style</A>,
<A HREF = "min_style.html">min_style</A>, <A HREF = "min_modify.html">min_modify</A>.
</P>
<P>Fixes impose a variety of boundary conditions, time integration, and
diagnostic options. The <A HREF = "fix.html">fix</A> command comes in many flavors.
</P>
<P>Various computations can be specified for execution during a
simulation using the <A HREF = "compute.html">compute</A>,
<A HREF = "compute_modify.html">compute_modify</A>, and <A HREF = "variable.html">variable</A>
commands.
</P>
<P>Output options are set by the <A HREF = "thermo.html">thermo</A>, <A HREF = "dump.html">dump</A>,
and <A HREF = "restart.html">restart</A> commands.
</P>
<P>(4) Run a simulation
</P>
<P>A molecular dynamics simulation is run using the <A HREF = "run.html">run</A>
command. Energy minimization (molecular statics) is performed using
the <A HREF = "minimize.html">minimize</A> command. A parallel tempering
(replica-exchange) simulation can be run using the
<A HREF = "temper.html">temper</A> command.
</P>
<HR>
<A NAME = "cmd_4"></A><H4>3.4 Commands listed by category
</H4>
<P>This section lists all LAMMPS commands, grouped by category. The
<A HREF = "#cmd_5">next section</A> lists the same commands alphabetically. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command's documentation.
</P>
<P>Initialization:
</P>
<P><A HREF = "atom_modify.html">atom_modify</A>, <A HREF = "atom_style.html">atom_style</A>,
<A HREF = "boundary.html">boundary</A>, <A HREF = "dimension.html">dimension</A>,
<A HREF = "newton.html">newton</A>, <A HREF = "processors.html">processors</A>, <A HREF = "units.html">units</A>
</P>
<P>Atom definition:
</P>
<P><A HREF = "create_atoms.html">create_atoms</A>, <A HREF = "create_box.html">create_box</A>,
<A HREF = "lattice.html">lattice</A>, <A HREF = "read_data.html">read_data</A>,
<A HREF = "read_dump.html">read_dump</A>, <A HREF = "read_restart.html">read_restart</A>,
<A HREF = "region.html">region</A>, <A HREF = "replicate.html">replicate</A>
</P>
<P>Force fields:
</P>
<P><A HREF = "angle_coeff.html">angle_coeff</A>, <A HREF = "angle_style.html">angle_style</A>,
<A HREF = "bond_coeff.html">bond_coeff</A>, <A HREF = "bond_style.html">bond_style</A>,
<A HREF = "dielectric.html">dielectric</A>, <A HREF = "dihedral_coeff.html">dihedral_coeff</A>,
<A HREF = "dihedral_style.html">dihedral_style</A>,
<A HREF = "improper_coeff.html">improper_coeff</A>,
<A HREF = "improper_style.html">improper_style</A>,
<A HREF = "kspace_modify.html">kspace_modify</A>, <A HREF = "kspace_style.html">kspace_style</A>,
<A HREF = "pair_coeff.html">pair_coeff</A>, <A HREF = "pair_modify.html">pair_modify</A>,
<A HREF = "pair_style.html">pair_style</A>, <A HREF = "pair_write.html">pair_write</A>,
<A HREF = "special_bonds.html">special_bonds</A>
</P>
<P>Settings:
</P>
<P><A HREF = "comm_style.html">comm_style</A>, <A HREF = "group.html">group</A>, <A HREF = "mass.html">mass</A>,
<A HREF = "min_modify.html">min_modify</A>, <A HREF = "min_style.html">min_style</A>,
<A HREF = "neigh_modify.html">neigh_modify</A>, <A HREF = "neighbor.html">neighbor</A>,
<A HREF = "reset_timestep.html">reset_timestep</A>, <A HREF = "run_style.html">run_style</A>,
<A HREF = "set.html">set</A>, <A HREF = "timestep.html">timestep</A>, <A HREF = "velocity.html">velocity</A>
</P>
<P>Fixes:
</P>
<P><A HREF = "fix.html">fix</A>, <A HREF = "fix_modify.html">fix_modify</A>, <A HREF = "unfix.html">unfix</A>
</P>
<P>Computes:
</P>
<P><A HREF = "compute.html">compute</A>, <A HREF = "compute_modify.html">compute_modify</A>,
<A HREF = "uncompute.html">uncompute</A>
</P>
<P>Output:
</P>
<P><A HREF = "dump.html">dump</A>, <A HREF = "dump_image.html">dump image</A>,
<A HREF = "dump_modify.html">dump_modify</A>, <A HREF = "dump_image.html">dump movie</A>,
<A HREF = "restart.html">restart</A>, <A HREF = "thermo.html">thermo</A>,
<A HREF = "thermo_modify.html">thermo_modify</A>, <A HREF = "thermo_style.html">thermo_style</A>,
<A HREF = "undump.html">undump</A>, <A HREF = "write_data.html">write_data</A>,
<A HREF = "write_dump.html">write_dump</A>, <A HREF = "write_restart.html">write_restart</A>
</P>
<P>Actions:
</P>
<P><A HREF = "delete_atoms.html">delete_atoms</A>, <A HREF = "delete_bonds.html">delete_bonds</A>,
<A HREF = "displace_atoms.html">displace_atoms</A>, <A HREF = "change_box.html">change_box</A>,
<A HREF = "minimize.html">minimize</A>, <A HREF = "neb.html">neb</A> <A HREF = "prd.html">prd</A>,
<A HREF = "rerun.html">rerun</A>, <A HREF = "run.html">run</A>, <A HREF = "temper.html">temper</A>
</P>
<P>Miscellaneous:
</P>
<P><A HREF = "clear.html">clear</A>, <A HREF = "echo.html">echo</A>, <A HREF = "if.html">if</A>,
<A HREF = "include.html">include</A>, <A HREF = "jump.html">jump</A>, <A HREF = "label.html">label</A>,
<A HREF = "log.html">log</A>, <A HREF = "next.html">next</A>, <A HREF = "print.html">print</A>,
<A HREF = "shell.html">shell</A>, <A HREF = "variable.html">variable</A>
</P>
<HR>
<H4><A NAME = "cmd_5"></A><A NAME = "comm"></A>3.5 Individual commands
</H4>
<P>This section lists all LAMMPS commands alphabetically, with a separate
listing below of styles within certain commands. The <A HREF = "#cmd_4">previous
section</A> lists the same commands, grouped by category. Note
that some style options for some commands are part of specific LAMMPS
packages, which means they cannot be used unless the package was
included when LAMMPS was built. Not all packages are included in a
default LAMMPS build. These dependencies are listed as Restrictions
in the command's documentation.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "angle_coeff.html">angle_coeff</A></TD><TD ><A HREF = "angle_style.html">angle_style</A></TD><TD ><A HREF = "atom_modify.html">atom_modify</A></TD><TD ><A HREF = "atom_style.html">atom_style</A></TD><TD ><A HREF = "balance.html">balance</A></TD><TD ><A HREF = "bond_coeff.html">bond_coeff</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "bond_style.html">bond_style</A></TD><TD ><A HREF = "boundary.html">boundary</A></TD><TD ><A HREF = "box.html">box</A></TD><TD ><A HREF = "change_box.html">change_box</A></TD><TD ><A HREF = "clear.html">clear</A></TD><TD ><A HREF = "comm_modify.html">comm_modify</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "comm_style.html">comm_style</A></TD><TD ><A HREF = "compute.html">compute</A></TD><TD ><A HREF = "compute_modify.html">compute_modify</A></TD><TD ><A HREF = "create_atoms.html">create_atoms</A></TD><TD ><A HREF = "create_bonds.html">create_bonds</A></TD><TD ><A HREF = "create_box.html">create_box</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "delete_atoms.html">delete_atoms</A></TD><TD ><A HREF = "delete_bonds.html">delete_bonds</A></TD><TD ><A HREF = "dielectric.html">dielectric</A></TD><TD ><A HREF = "dihedral_coeff.html">dihedral_coeff</A></TD><TD ><A HREF = "dihedral_style.html">dihedral_style</A></TD><TD ><A HREF = "dimension.html">dimension</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "displace_atoms.html">displace_atoms</A></TD><TD ><A HREF = "dump.html">dump</A></TD><TD ><A HREF = "dump_image.html">dump image</A></TD><TD ><A HREF = "dump_modify.html">dump_modify</A></TD><TD ><A HREF = "dump_image.html">dump movie</A></TD><TD ><A HREF = "echo.html">echo</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix.html">fix</A></TD><TD ><A HREF = "fix_modify.html">fix_modify</A></TD><TD ><A HREF = "group.html">group</A></TD><TD ><A HREF = "if.html">if</A></TD><TD ><A HREF = "info.html">info</A></TD><TD ><A HREF = "improper_coeff.html">improper_coeff</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "improper_style.html">improper_style</A></TD><TD ><A HREF = "include.html">include</A></TD><TD ><A HREF = "jump.html">jump</A></TD><TD ><A HREF = "kspace_modify.html">kspace_modify</A></TD><TD ><A HREF = "kspace_style.html">kspace_style</A></TD><TD ><A HREF = "label.html">label</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "lattice.html">lattice</A></TD><TD ><A HREF = "log.html">log</A></TD><TD ><A HREF = "mass.html">mass</A></TD><TD ><A HREF = "minimize.html">minimize</A></TD><TD ><A HREF = "min_modify.html">min_modify</A></TD><TD ><A HREF = "min_style.html">min_style</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "molecule.html">molecule</A></TD><TD ><A HREF = "neb.html">neb</A></TD><TD ><A HREF = "neigh_modify.html">neigh_modify</A></TD><TD ><A HREF = "neighbor.html">neighbor</A></TD><TD ><A HREF = "newton.html">newton</A></TD><TD ><A HREF = "next.html">next</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "package.html">package</A></TD><TD ><A HREF = "pair_coeff.html">pair_coeff</A></TD><TD ><A HREF = "pair_modify.html">pair_modify</A></TD><TD ><A HREF = "pair_style.html">pair_style</A></TD><TD ><A HREF = "pair_write.html">pair_write</A></TD><TD ><A HREF = "partition.html">partition</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "prd.html">prd</A></TD><TD ><A HREF = "print.html">print</A></TD><TD ><A HREF = "processors.html">processors</A></TD><TD ><A HREF = "python.html">python</A></TD><TD ><A HREF = "quit.html">quit</A></TD><TD ><A HREF = "read_data.html">read_data</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "read_dump.html">read_dump</A></TD><TD ><A HREF = "read_restart.html">read_restart</A></TD><TD ><A HREF = "region.html">region</A></TD><TD ><A HREF = "replicate.html">replicate</A></TD><TD ><A HREF = "rerun.html">rerun</A></TD><TD ><A HREF = "reset_timestep.html">reset_timestep</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "restart.html">restart</A></TD><TD ><A HREF = "run.html">run</A></TD><TD ><A HREF = "run_style.html">run_style</A></TD><TD ><A HREF = "set.html">set</A></TD><TD ><A HREF = "shell.html">shell</A></TD><TD ><A HREF = "special_bonds.html">special_bonds</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "suffix.html">suffix</A></TD><TD ><A HREF = "tad.html">tad</A></TD><TD ><A HREF = "temper.html">temper</A></TD><TD ><A HREF = "thermo.html">thermo</A></TD><TD ><A HREF = "thermo_modify.html">thermo_modify</A></TD><TD ><A HREF = "thermo_style.html">thermo_style</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "timestep.html">timestep</A></TD><TD ><A HREF = "uncompute.html">uncompute</A></TD><TD ><A HREF = "undump.html">undump</A></TD><TD ><A HREF = "unfix.html">unfix</A></TD><TD ><A HREF = "units.html">units</A></TD><TD ><A HREF = "variable.html">variable</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "velocity.html">velocity</A></TD><TD ><A HREF = "write_data.html">write_data</A></TD><TD ><A HREF = "write_dump.html">write_dump</A></TD><TD ><A HREF = "write_restart.html">write_restart</A>
</TD></TR></TABLE></DIV>
<P>These are additional commands in USER packages, which can be used if
<A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "group2ndx.html">group2ndx</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Fix styles
</H4>
<P>See the <A HREF = "fix.html">fix</A> command for one-line descriptions of each style
or click on the style itself for a full description. Some of the
styles have accelerated versions, which can be used if LAMMPS is built
with the <A HREF = "Section_accelerate.html">appropriate accelerated package</A>.
This is indicated by additional letters in parenthesis: c = USER-CUDA,
g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "fix_adapt.html">adapt</A></TD><TD ><A HREF = "fix_addforce.html">addforce (c)</A></TD><TD ><A HREF = "fix_append_atoms.html">append/atoms</A></TD><TD ><A HREF = "fix_atom_swap.html">atom/swap</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce (c)</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_chunk.html">ave/chunk</A></TD><TD ><A HREF = "fix_ave_correlate.html">ave/correlate</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_ave_histo.html">ave/histo</A></TD><TD ><A HREF = "fix_ave_histo.html">ave/histo/weight</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_balance.html">balance</A></TD><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_box_relax.html">box/relax</A></TD><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d (c)</A></TD><TD ><A HREF = "fix_evaporate.html">evaporate</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_external.html">external</A></TD><TD ><A HREF = "fix_freeze.html">freeze (c)</A></TD><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD><TD ><A HREF = "fix_gld.html">gld</A></TD><TD ><A HREF = "fix_gravity.html">gravity (co)</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin (k)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_move.html">move</A></TD><TD ><A HREF = "fix_msst.html">msst</A></TD><TD ><A HREF = "fix_neb.html">neb</A></TD><TD ><A HREF = "fix_nh.html">nph (o)</A></TD><TD ><A HREF = "fix_nphug.html">nphug (o)</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nph_sphere.html">nph/sphere (o)</A></TD><TD ><A HREF = "fix_nh.html">npt (co)</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere (o)</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere (o)</A></TD><TD ><A HREF = "fix_nve.html">nve (cko)</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A></TD><TD ><A HREF = "fix_nve_body.html">nve/body</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_line.html">nve/line</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere (o)</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt (co)</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere (o)</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere (o)</A></TD><TD ><A HREF = "fix_oneway.html">oneway</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_property_atom.html">property/atom</A></TD><TD ><A HREF = "fix_qeq_comb.html">qeq/comb (o)</A></TD><TD ><A HREF = "fix_qeq.html">qeq/dynamic</A></TD><TD ><A HREF = "fix_qeq.html">qeq/point</A></TD><TD ><A HREF = "fix_qeq.html">qeq/shielded</A></TD><TD ><A HREF = "fix_qeq.html">qeq/slater</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/bonds</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_restrain.html">restrain</A></TD><TD ><A HREF = "fix_rigid.html">rigid (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nph (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/npt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nvt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nph</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/small/npt</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nve</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nvt</A></TD><TD ><A HREF = "fix_setforce.html">setforce (c)</A></TD><TD ><A HREF = "fix_shake.html">shake (c)</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_srd.html">srd</A></TD><TD ><A HREF = "fix_store_force.html">store/force</A></TD><TD ><A HREF = "fix_store_state.html">store/state</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen (c)</A></TD><TD ><A HREF = "fix_temp_csvr.html">temp/csld</A></TD><TD ><A HREF = "fix_temp_csvr.html">temp/csvr</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale (c)</A></TD><TD ><A HREF = "fix_tfmc.html">tfmc</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_ttm.html">ttm</A></TD><TD ><A HREF = "fix_tune_kspace.html">tune/kspace</A></TD><TD ><A HREF = "fix_vector.html">vector</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous (c)</A></TD><TD ><A HREF = "fix_wall.html">wall/colloid</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall.html">wall/harmonic</A></TD><TD ><A HREF = "fix_wall.html">wall/lj1043</A></TD><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_piston.html">wall/piston</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wall_region.html">wall/region</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_wall_srd.html">wall/srd</A>
</TD></TR></TABLE></DIV>
<P>These are additional fix styles in USER packages, which can be used if
<A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "fix_adapt_fep.html">adapt/fep</A></TD><TD ><A HREF = "fix_addtorque.html">addtorque</A></TD><TD ><A HREF = "fix_atc.html">atc</A></TD><TD ><A HREF = "fix_ave_spatial_sphere.html">ave/spatial/sphere</A></TD><TD ><A HREF = "fix_drude.html">drude</A></TD><TD ><A HREF = "fix_drude_transform.html">drude/transform/direct</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_drude_transform.html">drude/transform/reverse</A></TD><TD ><A HREF = "fix_colvars.html">colvars</A></TD><TD ><A HREF = "fix_gle.html">gle</A></TD><TD ><A HREF = "fix_imd.html">imd</A></TD><TD ><A HREF = "fix_ipi.html">ipi</A></TD><TD ><A HREF = "fix_langevin_drude.html">langevin/drude</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_langevin_eff.html">langevin/eff</A></TD><TD ><A HREF = "fix_lb_fluid.html">lb/fluid</A></TD><TD ><A HREF = "fix_lb_momentum.html">lb/momentum</A></TD><TD ><A HREF = "fix_lb_pc.html">lb/pc</A></TD><TD ><A HREF = "fix_lb_rigid_pc_sphere.html">lb/rigid/pc/sphere</A></TD><TD ><A HREF = "fix_lb_viscous.html">lb/viscous</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_meso.html">meso</A></TD><TD ><A HREF = "fix_meso_stationary.html">meso/stationary</A></TD><TD ><A HREF = "fix_nh_eff.html">nph/eff</A></TD><TD ><A HREF = "fix_nh_eff.html">npt/eff</A></TD><TD ><A HREF = "fix_nve_eff.html">nve/eff</A></TD><TD ><A HREF = "fix_nh_eff.html">nvt/eff</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nvt_sllod_eff.html">nvt/sllod/eff</A></TD><TD ><A HREF = "fix_phonon.html">phonon</A></TD><TD ><A HREF = "fix_pimd.html">pimd</A></TD><TD ><A HREF = "fix_qbmsst.html">qbmsst</A></TD><TD ><A HREF = "fix_qeq_reax.html">qeq/reax</A></TD><TD ><A HREF = "fix_qmmm.html">qmmm</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_qtb.html">qtb</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/c/bonds</A></TD><TD ><A HREF = "fix_reaxc_species.html">reax/c/species</A></TD><TD ><A HREF = "fix_saed_vtk.html">saed/vtk</A></TD><TD ><A HREF = "fix_smd.html">smd</A></TD><TD ><A HREF = "fix_smd_adjust_dt.html">smd/adjust/dt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_smd_integrate_tlsph.html">smd/integrate/tlsph</A></TD><TD ><A HREF = "fix_smd_integrate_ulsph.html">smd/integrate/ulsph</A></TD><TD ><A HREF = "fix_smd_move_triangulated_surface.html">smd/move/triangulated/surface</A></TD><TD ><A HREF = "fix_smd_setvel.html">smd/setvel</A></TD><TD ><A HREF = "fix_smd_tlsph_reference_configuration.html">smd/tlsph/reference/configuration</A></TD><TD ><A HREF = "fix_smd_wall_surface.html">smd/wall/surface</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_temp_rescale_eff.html">temp/rescale/eff</A></TD><TD ><A HREF = "fix_ti_rs.html">ti/rs</A></TD><TD ><A HREF = "fix_ti_spring.html">ti/spring</A></TD><TD ><A HREF = "fix_ttm.html">ttm/mod</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Compute styles
</H4>
<P>See the <A HREF = "compute.html">compute</A> command for one-line descriptions of
each style or click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "compute_angle_local.html">angle/local</A></TD><TD ><A HREF = "compute_angmom_chunk.html">angmom/chunk</A></TD><TD ><A HREF = "compute_body_local.html">body/local</A></TD><TD ><A HREF = "compute_bond_local.html">bond/local</A></TD><TD ><A HREF = "compute_centro_atom.html">centro/atom</A></TD><TD ><A HREF = "compute_chunk_atom.html">chunk/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_cluster_atom.html">cluster/atom</A></TD><TD ><A HREF = "compute_cna_atom.html">cna/atom</A></TD><TD ><A HREF = "compute_com.html">com</A></TD><TD ><A HREF = "compute_com_chunk.html">com/chunk</A></TD><TD ><A HREF = "compute_contact_atom.html">contact/atom</A></TD><TD ><A HREF = "compute_coord_atom.html">coord/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_damage_atom.html">damage/atom</A></TD><TD ><A HREF = "compute_dihedral_local.html">dihedral/local</A></TD><TD ><A HREF = "compute_dilatation_atom.html">dilatation/atom</A></TD><TD ><A HREF = "compute_displace_atom.html">displace/atom</A></TD><TD ><A HREF = "compute_erotate_asphere.html">erotate/asphere</A></TD><TD ><A HREF = "compute_erotate_rigid.html">erotate/rigid</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_erotate_sphere.html">erotate/sphere</A></TD><TD ><A HREF = "compute_erotate_sphere_atom.html">erotate/sphere/atom</A></TD><TD ><A HREF = "compute_event_displace.html">event/displace</A></TD><TD ><A HREF = "compute_group_group.html">group/group</A></TD><TD ><A HREF = "compute_gyration.html">gyration</A></TD><TD ><A HREF = "compute_gyration_chunk.html">gyration/chunk</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_inertia_chunk.html">inertia/chunk</A></TD><TD ><A HREF = "compute_ke.html">ke</A></TD><TD ><A HREF = "compute_ke_atom.html">ke/atom</A></TD><TD ><A HREF = "compute_ke_rigid.html">ke/rigid</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_msd.html">msd</A></TD><TD ><A HREF = "compute_msd_chunk.html">msd/chunk</A></TD><TD ><A HREF = "compute_msd_nongauss.html">msd/nongauss</A></TD><TD ><A HREF = "compute_omega_chunk.html">omega/chunk</A></TD><TD ><A HREF = "compute_pair.html">pair</A></TD><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_pe.html">pe (c)</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD><TD ><A HREF = "compute_plasticity_atom.html">plasticity/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure (c)</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><TD ><A HREF = "compute_property_local.html">property/local</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_property_chunk.html">property/chunk</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_slice.html">slice</A></TD><TD ><A HREF = "compute_sna_atom.html">sna/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_sna_atom.html">snad/atom</A></TD><TD ><A HREF = "compute_sna_atom.html">snav/atom</A></TD><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_chunk.html">temp/chunk</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial (c)</A></TD><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A></TD><TD ><A HREF = "compute_torque_chunk.html">torque/chunk</A></TD><TD ><A HREF = "compute_vacf.html">vacf</A></TD><TD ><A HREF = "compute_vcm_chunk.html">vcm/chunk</A></TD><TD ><A HREF = "compute_voronoi_atom.html">voronoi/atom</A>
</TD></TR></TABLE></DIV>
<P>These are additional compute styles in USER packages, which can be
used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "compute_ackland_atom.html">ackland/atom</A></TD><TD ><A HREF = "compute_basal_atom.html">basal/atom</A></TD><TD ><A HREF = "compute_fep.html">fep</A></TD><TD ><A HREF = "compute_ke_eff.html">ke/eff</A></TD><TD ><A HREF = "compute_ke_atom_eff.html">ke/atom/eff</A></TD><TD ><A HREF = "compute_meso_e_atom.html">meso_e/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_meso_rho_atom.html">meso_rho/atom</A></TD><TD ><A HREF = "compute_meso_t_atom.html">meso_t/atom</A></TD><TD ><A HREF = "compute_saed.html">saed</A></TD><TD ><A HREF = "compute_smd_contact_radius.html">smd/contact/radius</A></TD><TD ><A HREF = "compute_smd_damage.html">smd/damage</A></TD><TD ><A HREF = "compute_smd_hourglass_error.html">smd/hourglass/error</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_smd_internal_energy.html">smd/internal/energy</A></TD><TD ><A HREF = "compute_smd_plastic_strain.html">smd/plastic/strain</A></TD><TD ><A HREF = "compute_smd_plastic_strain_rate.html">smd/plastic/strain/rate</A></TD><TD ><A HREF = "compute_smd_rho.html">smd/rho</A></TD><TD ><A HREF = "compute_smd_tlsph_defgrad.html">smd/tlsph/defgrad</A></TD><TD ><A HREF = "compute_smd_tlsph_dt.html">smd/tlsph/dt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_smd_tlsph_num_neighs.html">smd/tlsph/num/neighs</A></TD><TD ><A HREF = "compute_smd_tlsph_shape.html">smd/tlsph/shape</A></TD><TD ><A HREF = "compute_smd_tlsph_strain.html">smd/tlsph/strain</A></TD><TD ><A HREF = "compute_smd_tlsph_strain_rate.html">smd/tlsph/strain/rate</A></TD><TD ><A HREF = "compute_smd_tlsph_stress.html">smd/tlsph/stress</A></TD><TD ><A HREF = "compute_smd_triangle_mesh_vertices.html">smd/triangle/mesh/vertices</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_smd_ulsph_num_neighs.html">smd/ulsph/num/neighs</A></TD><TD ><A HREF = "compute_smd_ulsph_strain.html">smd/ulsph/strain</A></TD><TD ><A HREF = "compute_smd_ulsph_strain/rate.html">smd/ulsph/strain/rate</A></TD><TD ><A HREF = "compute_smd_ulpsh_stress.html">smd/ulpsh/stress</A></TD><TD ><A HREF = "compute_smd_vol.html">smd/vol</A></TD><TD ><A HREF = "compute_temp_drude.html">temp/drude</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_eff.html">temp/eff</A></TD><TD ><A HREF = "compute_temp_deform_eff.html">temp/deform/eff</A></TD><TD ><A HREF = "compute_temp_region_eff.html">temp/region/eff</A></TD><TD ><A HREF = "compute_temp_rotate.html">temp/rotate</A></TD><TD ><A HREF = "compute_xrd.html">xrd</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Pair_style potentials
</H4>
<P>See the <A HREF = "pair_style.html">pair_style</A> command for an overview of pair
potentials. Click on the style itself for a full description. Many
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "pair_none.html">none</A></TD><TD ><A HREF = "pair_hybrid.html">hybrid</A></TD><TD ><A HREF = "pair_hybrid.html">hybrid/overlay</A></TD><TD ><A HREF = "pair_adp.html">adp (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_airebo.html">airebo (o)</A></TD><TD ><A HREF = "pair_beck.html">beck (go)</A></TD><TD ><A HREF = "pair_body.html">body</A></TD><TD ><A HREF = "pair_bop.html">bop</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_born.html">born (go)</A></TD><TD ><A HREF = "pair_born.html">born/coul/long (cgo)</A></TD><TD ><A HREF = "pair_born.html">born/coul/long/cs</A></TD><TD ><A HREF = "pair_born.html">born/coul/msm (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_born.html">born/coul/wolf (go)</A></TD><TD ><A HREF = "pair_brownian.html">brownian (o)</A></TD><TD ><A HREF = "pair_brownian.html">brownian/poly (o)</A></TD><TD ><A HREF = "pair_buck.html">buck (cgko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/cut (cgko)</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long (cgko)</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/cs</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/msm (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck_long.html">buck/long/coul/long (o)</A></TD><TD ><A HREF = "pair_colloid.html">colloid (go)</A></TD><TD ><A HREF = "pair_comb.html">comb (o)</A></TD><TD ><A HREF = "pair_comb.html">comb3</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/cut (gko)</A></TD><TD ><A HREF = "pair_coul.html">coul/debye (gko)</A></TD><TD ><A HREF = "pair_coul.html">coul/dsf (gko)</A></TD><TD ><A HREF = "pair_coul.html">coul/long (gko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/long/cs</A></TD><TD ><A HREF = "pair_coul.html">coul/msm</A></TD><TD ><A HREF = "pair_coul.html">coul/streitz</A></TD><TD ><A HREF = "pair_coul.html">coul/wolf (ko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_dpd.html">dpd (o)</A></TD><TD ><A HREF = "pair_dpd.html">dpd/tstat (o)</A></TD><TD ><A HREF = "pair_dsmc.html">dsmc</A></TD><TD ><A HREF = "pair_eam.html">eam (cgkot)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/alloy (cgkot)</A></TD><TD ><A HREF = "pair_eam.html">eam/fs (cgkot)</A></TD><TD ><A HREF = "pair_eim.html">eim (o)</A></TD><TD ><A HREF = "pair_gauss.html">gauss (go)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gayberne.html">gayberne (gio)</A></TD><TD ><A HREF = "pair_gran.html">gran/hertz/history (o)</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke (co)</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/history (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj (o)</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse (o)</A></TD><TD ><A HREF = "pair_kim.html">kim</A></TD><TD ><A HREF = "pair_lcbop.html">lcbop</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_line_lj.html">line/lj (o)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm (cko)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit (cko)</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long (cgiko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/msm</A></TD><TD ><A HREF = "pair_class2.html">lj/class2 (cgko)</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut (cko)</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long (cgko)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut (cgko)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye (cgko)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/dsf (gko)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/msm (go)</A></TD><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/cut (go)</A></TD><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/long</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/cut (o)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/long (ot)</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand (cgko)</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs (cgko)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs (cko)</A></TD><TD ><A HREF = "pair_lj_long.html">lj/long/coul/long (o)</A></TD><TD ><A HREF = "pair_dipole.html">lj/long/dipole/long</A></TD><TD ><A HREF = "pair_lj_long.html">lj/long/tip4p/long</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth.html">lj/smooth (co)</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear (o)</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut (cgo)</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate (o)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_lubricate.html">lubricate/poly (o)</A></TD><TD ><A HREF = "pair_lubricateU.html">lubricateU</A></TD><TD ><A HREF = "pair_lubricateU.html">lubricateU/poly</A></TD><TD ><A HREF = "pair_meam.html">meam (o)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_mie.html">mie/cut (o)</A></TD><TD ><A HREF = "pair_morse.html">morse (cgot)</A></TD><TD ><A HREF = "pair_nb3b_harmonic.html">nb3b/harmonic (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut (o)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_nm.html">nm/cut/coul/cut (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut/coul/long (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/eps</A></TD><TD ><A HREF = "pair_peri.html">peri/lps (o)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_peri.html">peri/pmb (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/ves</A></TD><TD ><A HREF = "pair_polymorphic.html">polymorphic</A></TD><TD ><A HREF = "pair_reax.html">reax</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_airebo.html">rebo (o)</A></TD><TD ><A HREF = "pair_resquared.html">resquared (go)</A></TD><TD ><A HREF = "pair_snap.html">snap</A></TD><TD ><A HREF = "pair_soft.html">soft (go)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_sw.html">sw (cgkio)</A></TD><TD ><A HREF = "pair_table.html">table (gko)</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff (cko)</A></TD><TD ><A HREF = "pair_tersoff_mod.html">tersoff/mod (ko)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl (ko)</A></TD><TD ><A HREF = "pair_coul.html">tip4p/cut (o)</A></TD><TD ><A HREF = "pair_coul.html">tip4p/long (o)</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj (o)</A></TD></TR>
-<TR ALIGN="center"><TD ><A HREF = "pair_yukawa.html">yukawa (go)</A></TD><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid (go)</A></TD><TD ><A HREF = "pair_zbl.html">zbl (o)</A>
+<TR ALIGN="center"><TD ><A HREF = "pair_lj_cubic.html">lj/cubic (go)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut (cgko)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye (cgko)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/dsf (gko)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long (cgikot)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/msm (go)</A></TD><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/cut (go)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/long</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/cut (o)</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/tip4p/long (ot)</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand (cgko)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs (cgko)</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs (cko)</A></TD><TD ><A HREF = "pair_lj_long.html">lj/long/coul/long (o)</A></TD><TD ><A HREF = "pair_dipole.html">lj/long/dipole/long</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_lj_long.html">lj/long/tip4p/long</A></TD><TD ><A HREF = "pair_lj_smooth.html">lj/smooth (co)</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear (o)</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut (cgo)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_lubricate.html">lubricate (o)</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/poly (o)</A></TD><TD ><A HREF = "pair_lubricateU.html">lubricateU</A></TD><TD ><A HREF = "pair_lubricateU.html">lubricateU/poly</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_meam.html">meam (o)</A></TD><TD ><A HREF = "pair_mie.html">mie/cut (o)</A></TD><TD ><A HREF = "pair_morse.html">morse (cgot)</A></TD><TD ><A HREF = "pair_nb3b_harmonic.html">nb3b/harmonic (o)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_nm.html">nm/cut (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut/coul/cut (o)</A></TD><TD ><A HREF = "pair_nm.html">nm/cut/coul/long (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/eps</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_peri.html">peri/lps (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/pmb (o)</A></TD><TD ><A HREF = "pair_peri.html">peri/ves</A></TD><TD ><A HREF = "pair_polymorphic.html">polymorphic</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_reax.html">reax</A></TD><TD ><A HREF = "pair_airebo.html">rebo (o)</A></TD><TD ><A HREF = "pair_resquared.html">resquared (go)</A></TD><TD ><A HREF = "pair_snap.html">snap</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_soft.html">soft (go)</A></TD><TD ><A HREF = "pair_sw.html">sw (cgkio)</A></TD><TD ><A HREF = "pair_table.html">table (gko)</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff (cgko)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_tersoff_mod.html">tersoff/mod (ko)</A></TD><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl (ko)</A></TD><TD ><A HREF = "pair_coul.html">tip4p/cut (o)</A></TD><TD ><A HREF = "pair_coul.html">tip4p/long (o)</A></TD></TR>
+<TR ALIGN="center"><TD ><A HREF = "pair_tri_lj.html">tri/lj (o)</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa (go)</A></TD><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid (go)</A></TD><TD ><A HREF = "pair_zbl.html">zbl (go)</A>
</TD></TR></TABLE></DIV>
<P>These are additional pair styles in USER packages, which can be used
if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "pair_awpmd.html">awpmd/cut</A></TD><TD ><A HREF = "pair_lj_soft.html">coul/cut/soft (o)</A></TD><TD ><A HREF = "pair_coul_diel.html">coul/diel (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">coul/long/soft (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/cd (o)</A></TD><TD ><A HREF = "pair_edip.html">edip (o)</A></TD><TD ><A HREF = "pair_eff.html">eff/cut</A></TD><TD ><A HREF = "pair_gauss.html">gauss/cut</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_list.html">list</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/cut/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/coul/long/soft (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_dipole.html">lj/cut/dipole/sf (go)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/soft (o)</A></TD><TD ><A HREF = "pair_lj_soft.html">lj/cut/tip4p/long/soft (o)</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk (gko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long (go)</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/msm (o)</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf (o)</A></TD><TD ><A HREF = "pair_meam_spline.html">meam/spline</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_meam_sw_spline.html">meam/sw/spline</A></TD><TD ><A HREF = "pair_quip.html">quip</A></TD><TD ><A HREF = "pair_reax_c.html">reax/c</A></TD><TD ><A HREF = "pair_smd_hertz.html">smd/hertz</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_smd_tlsph.html">smd/tlsph</A></TD><TD ><A HREF = "pair_smd_triangulated_surface.html">smd/triangulated/surface</A></TD><TD ><A HREF = "pair_smd_ulsph.html">smd/ulsph</A></TD><TD ><A HREF = "pair_sph_heatconduction.html">sph/heatconduction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sph_idealgas.html">sph/idealgas</A></TD><TD ><A HREF = "pair_sph_lj.html">sph/lj</A></TD><TD ><A HREF = "pair_sph_rhosum.html">sph/rhosum</A></TD><TD ><A HREF = "pair_sph_taitwater.html">sph/taitwater</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sph_taitwater_morris.html">sph/taitwater/morris</A></TD><TD ><A HREF = "pair_srp.html">srp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/table (o)</A></TD><TD ><A HREF = "pair_thole.html">thole</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_soft.html">tip4p/long/soft (o)</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Bond_style potentials
</H4>
<P>See the <A HREF = "bond_style.html">bond_style</A> command for an overview of bond
potentials. Click on the style itself for a full description. Some
of the styles have accelerated versions, which can be used if LAMMPS
is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "bond_none.html">none</A></TD><TD ><A HREF = "bond_hybrid.html">hybrid</A></TD><TD ><A HREF = "bond_class2.html">class2 (o)</A></TD><TD ><A HREF = "bond_fene.html">fene (ko)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "bond_fene_expand.html">fene/expand (o)</A></TD><TD ><A HREF = "bond_harmonic.html">harmonic (ko)</A></TD><TD ><A HREF = "bond_morse.html">morse (o)</A></TD><TD ><A HREF = "bond_nonlinear.html">nonlinear (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "bond_quartic.html">quartic (o)</A></TD><TD ><A HREF = "bond_table.html">table (o)</A>
</TD></TR></TABLE></DIV>
<P>These are additional bond styles in USER packages, which can be used
if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "bond_harmonic_shift.html">harmonic/shift (o)</A></TD><TD ><A HREF = "bond_harmonic_shift_cut.html">harmonic/shift/cut (o)</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Angle_style potentials
</H4>
<P>See the <A HREF = "angle_style.html">angle_style</A> command for an overview of
angle potentials. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "angle_none.html">none</A></TD><TD ><A HREF = "angle_hybrid.html">hybrid</A></TD><TD ><A HREF = "angle_charmm.html">charmm (ko)</A></TD><TD ><A HREF = "angle_class2.html">class2 (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "angle_cosine.html">cosine (o)</A></TD><TD ><A HREF = "angle_cosine_delta.html">cosine/delta (o)</A></TD><TD ><A HREF = "angle_cosine_periodic.html">cosine/periodic (o)</A></TD><TD ><A HREF = "angle_cosine_squared.html">cosine/squared (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "angle_harmonic.html">harmonic (ko)</A></TD><TD ><A HREF = "angle_table.html">table (o)</A>
</TD></TR></TABLE></DIV>
<P>These are additional angle styles in USER packages, which can be used
if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "angle_cosine_shift.html">cosine/shift (o)</A></TD><TD ><A HREF = "angle_cosine_shift_exp.html">cosine/shift/exp (o)</A></TD><TD ><A HREF = "angle_dipole.html">dipole (o)</A></TD><TD ><A HREF = "angle_fourier.html">fourier (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "angle_fourier_simple.html">fourier/simple (o)</A></TD><TD ><A HREF = "angle_quartic.html">quartic (o)</A></TD><TD ><A HREF = "angle_sdk.html">sdk</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Dihedral_style potentials
</H4>
<P>See the <A HREF = "dihedral_style.html">dihedral_style</A> command for an overview
of dihedral potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "dihedral_none.html">none</A></TD><TD ><A HREF = "dihedral_hybrid.html">hybrid</A></TD><TD ><A HREF = "dihedral_charmm.html">charmm (ko)</A></TD><TD ><A HREF = "dihedral_class2.html">class2 (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "dihedral_harmonic.html">harmonic (o)</A></TD><TD ><A HREF = "dihedral_helix.html">helix (o)</A></TD><TD ><A HREF = "dihedral_multi_harmonic.html">multi/harmonic (o)</A></TD><TD ><A HREF = "dihedral_opls.html">opls (ko)</A>
</TD></TR></TABLE></DIV>
<P>These are additional dihedral styles in USER packages, which can be
used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "dihedral_cosine_shift_exp.html">cosine/shift/exp (o)</A></TD><TD ><A HREF = "dihedral_fourier.html">fourier (o)</A></TD><TD ><A HREF = "dihedral_nharmonic.html">nharmonic (o)</A></TD><TD ><A HREF = "dihedral_quadratic.html">quadratic (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "dihedral_table.html">table (o)</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Improper_style potentials
</H4>
<P>See the <A HREF = "improper_style.html">improper_style</A> command for an overview
of improper potentials. Click on the style itself for a full
description. Some of the styles have accelerated versions, which can
be used if LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "improper_none.html">none</A></TD><TD ><A HREF = "improper_hybrid.html">hybrid</A></TD><TD ><A HREF = "improper_class2.html">class2 (o)</A></TD><TD ><A HREF = "improper_cvff.html">cvff (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "improper_harmonic.html">harmonic (ko)</A></TD><TD ><A HREF = "improper_umbrella.html">umbrella (o)</A>
</TD></TR></TABLE></DIV>
<P>These are additional improper styles in USER packages, which can be
used if <A HREF = "Section_start.html#start_3">LAMMPS is built with the appropriate
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "improper_cossq.html">cossq (o)</A></TD><TD ><A HREF = "improper_fourier.html">fourier (o)</A></TD><TD ><A HREF = "improper_ring.html">ring (o)</A>
</TD></TR></TABLE></DIV>
<HR>
<H4>Kspace solvers
</H4>
<P>See the <A HREF = "kspace_style.html">kspace_style</A> command for an overview of
Kspace solvers. Click on the style itself for a full description.
Some of the styles have accelerated versions, which can be used if
LAMMPS is built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>. This is indicated by additional
letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "kspace_style.html">ewald (o)</A></TD><TD ><A HREF = "kspace_style.html">ewald/disp</A></TD><TD ><A HREF = "kspace_style.html">msm (o)</A></TD><TD ><A HREF = "kspace_style.html">msm/cg (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "kspace_style.html">pppm (cgo)</A></TD><TD ><A HREF = "kspace_style.html">pppm/cg (o)</A></TD><TD ><A HREF = "kspace_style.html">pppm/disp</A></TD><TD ><A HREF = "kspace_style.html">pppm/disp/tip4p</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "kspace_style.html">pppm/tip4p (o)</A>
</TD></TR></TABLE></DIV>
</HTML>
diff --git a/doc/doc2/Section_packages.html b/doc/doc2/Section_packages.html
index 723c49377..65418cd7b 100644
--- a/doc/doc2/Section_packages.html
+++ b/doc/doc2/Section_packages.html
@@ -1,699 +1,720 @@
<HTML>
<CENTER><A HREF = "Section_commands.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> -
<A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_accelerate.html">Next
Section</A>
</CENTER>
<HR>
<H3>4. Packages
</H3>
<P>This section gives a quick overview of the add-on packages that extend
LAMMPS functionality.
</P>
4.1 <A HREF = "#pkg_1">Standard packages</A><BR>
4.2 <A HREF = "#pkg_2">User packages</A> <BR>
<P>LAMMPS includes many optional packages, which are groups of files that
enable a specific set of features. For example, force fields for
molecular systems or granular systems are in packages. You can see
the list of all packages by typing "make package" from within the src
directory of the LAMMPS distribution.
</P>
<P>See <A HREF = "Section_start.html#start_3">Section_start 3</A> of the manual for
details on how to include/exclude specific packages as part of the
LAMMPS build process, and for more details about the differences
between standard packages and user packages in LAMMPS.
</P>
<P>Below, the packages currently availabe in LAMMPS are listed. For
standard packages, just a one-line description is given. For user
packages, more details are provided.
</P>
<HR>
<HR>
<H4><A NAME = "pkg_1"></A>4.1 Standard packages
</H4>
<P>The current list of standard packages is as follows:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD >Package</TD><TD > Description</TD><TD > Author(s)</TD><TD > Doc page</TD><TD > Example</TD><TD > Library</TD></TR>
<TR ALIGN="center"><TD >ASPHERE</TD><TD > aspherical particles</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_14">Section_howto 6.14</A></TD><TD > ellipse</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >BODY</TD><TD > body-style particles</TD><TD > -</TD><TD > <A HREF = "body.html">body</A></TD><TD > body</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >CLASS2</TD><TD > class 2 force fields</TD><TD > -</TD><TD > <A HREF = "pair_class2.html">pair_style lj/class2</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >COLLOID</TD><TD > colloidal particles</TD><TD > -</TD><TD > <A HREF = "atom_style.html">atom_style colloid</A></TD><TD > colloid</TD><TD > -</TD></TR>
+<TR ALIGN="center"><TD >COMPRESS</TD><TD > I/O compression</TD><TD > Axel Kohlmeyer (Temple U)</TD><TD > <A HREF = "dump.html">dump */gz</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >CORESHELL</TD><TD > adiabatic core/shell model</TD><TD > Hendrik Heenen (Technical U of Munich)</TD><TD > <A HREF = "Section_howto.html#howto_25">Section_howto 6.25</A></TD><TD > coreshell</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >DIPOLE</TD><TD > point dipole particles</TD><TD > -</TD><TD > <A HREF = "pair_dipole.html">pair_style dipole/cut</A></TD><TD > dipole</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >FLD</TD><TD > Fast Lubrication Dynamics</TD><TD > Kumar & Bybee & Higdon (1)</TD><TD > <A HREF = "pair_lubricateU.html">pair_style lubricateU</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >GPU</TD><TD > GPU-enabled styles</TD><TD > Mike Brown (ORNL)</TD><TD > <A HREF = "accelerate_gpu.html">Section accelerate</A></TD><TD > gpu</TD><TD > lib/gpu</TD></TR>
<TR ALIGN="center"><TD >GRANULAR</TD><TD > granular systems</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_6">Section_howto 6.6</A></TD><TD > pour</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >KIM</TD><TD > openKIM potentials</TD><TD > Smirichinski & Elliot & Tadmor (3)</TD><TD > <A HREF = "pair_kim.html">pair_style kim</A></TD><TD > kim</TD><TD > KIM</TD></TR>
<TR ALIGN="center"><TD >KOKKOS</TD><TD > Kokkos-enabled styles</TD><TD > Trott & Edwards (4)</TD><TD > <A HREF = "accelerate_kokkos.html">Section_accelerate</A></TD><TD > kokkos</TD><TD > lib/kokkos</TD></TR>
<TR ALIGN="center"><TD >KSPACE</TD><TD > long-range Coulombic solvers</TD><TD > -</TD><TD > <A HREF = "kspace_style.html">kspace_style</A></TD><TD > peptide</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >MANYBODY</TD><TD > many-body potentials</TD><TD > -</TD><TD > <A HREF = "pair_tersoff.html">pair_style tersoff</A></TD><TD > shear</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >MEAM</TD><TD > modified EAM potential</TD><TD > Greg Wagner (Sandia)</TD><TD > <A HREF = "pair_meam.html">pair_style meam</A></TD><TD > meam</TD><TD > lib/meam</TD></TR>
<TR ALIGN="center"><TD >MC</TD><TD > Monte Carlo options</TD><TD > -</TD><TD > <A HREF = "fix_gcmc.html">fix gcmc</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >MOLECULE</TD><TD > molecular system force fields</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_3">Section_howto 6.3</A></TD><TD > peptide</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >OPT</TD><TD > optimized pair styles</TD><TD > Fischer & Richie & Natoli (2)</TD><TD > <A HREF = "accelerate_opt.html">Section accelerate</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >PERI</TD><TD > Peridynamics models</TD><TD > Mike Parks (Sandia)</TD><TD > <A HREF = "pair_peri.html">pair_style peri</A></TD><TD > peri</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >POEMS</TD><TD > coupled rigid body motion</TD><TD > Rudra Mukherjee (JPL)</TD><TD > <A HREF = "fix_poems.html">fix poems</A></TD><TD > rigid</TD><TD > lib/poems</TD></TR>
<TR ALIGN="center"><TD >PYTHON</TD><TD > embed Python code in an input script</TD><TD > -</TD><TD > <A HREF = "python.html">python</A></TD><TD > python</TD><TD > lib/python</TD></TR>
<TR ALIGN="center"><TD >REAX</TD><TD > ReaxFF potential</TD><TD > Aidan Thompson (Sandia)</TD><TD > <A HREF = "pair_reax.html">pair_style reax</A></TD><TD > reax</TD><TD > lib/reax</TD></TR>
<TR ALIGN="center"><TD >REPLICA</TD><TD > multi-replica methods</TD><TD > -</TD><TD > <A HREF = "Section_howto.html#howto_5">Section_howto 6.5</A></TD><TD > tad</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >RIGID</TD><TD > rigid bodies</TD><TD > -</TD><TD > <A HREF = "fix_rigid.html">fix rigid</A></TD><TD > rigid</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >SHOCK</TD><TD > shock loading methods</TD><TD > -</TD><TD > <A HREF = "fix_msst.html">fix msst</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >SNAP</TD><TD > quantum-fit potential</TD><TD > Aidan Thompson (Sandia)</TD><TD > <A HREF = "pair_snap.html">pair snap</A></TD><TD > snap</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >SRD</TD><TD > stochastic rotation dynamics</TD><TD > -</TD><TD > <A HREF = "fix_srd.html">fix srd</A></TD><TD > srd</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >VORONOI</TD><TD > Voronoi tesselations</TD><TD > Daniel Schwen (LANL)</TD><TD > <A HREF = "compute_voronoi_atom.html">compute voronoi/atom</A></TD><TD > -</TD><TD > Voro++</TD></TR>
<TR ALIGN="center"><TD >XTC</TD><TD > dumps in XTC format</TD><TD > -</TD><TD > <A HREF = "dump.html">dump</A></TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >
</TD></TR></TABLE></DIV>
<P>The "Authors" column lists a name(s) if a specific person is
responible for creating and maintaining the package.
</P>
<P>(1) The FLD package was created by Amit Kumar and Michael Bybee from
Jonathan Higdon's group at UIUC.
</P>
<P>(2) The OPT package was created by James Fischer (High Performance
Technologies), David Richie, and Vincent Natoli (Stone Ridge
Technolgy).
</P>
<P>(3) The KIM package was created by Valeriu Smirichinski, Ryan Elliott,
and Ellad Tadmor (U Minn).
</P>
<P>(4) The KOKKOS package was created primarily by Christian Trott
(Sandia). It uses the Kokkos library which was developed by Carter
Edwards, Christian, and collaborators at Sandia.
</P>
<P>The "Doc page" column links to either a portion of the
<A HREF = "Section_howto.html">Section_howto</A> of the manual, or an input script
command implemented as part of the package.
</P>
<P>The "Example" column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. "peptide" refers to the examples/peptide directory.
</P>
<P>The "Library" column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/README or src/package/Makefile.lammps file for
info on where to download the library. <A HREF = "Section_start.html#start_3_3">Section
start</A> of the manual also gives details
on how to build LAMMPS with both kinds of auxiliary libraries.
</P>
<HR>
<HR>
<H4><A NAME = "pkg_2"></A>4.2 User packages
</H4>
<P>The current list of user-contributed packages is as follows:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD >Package</TD><TD > Description</TD><TD > Author(s)</TD><TD > Doc page</TD><TD > Example</TD><TD > Pic/movie</TD><TD > Library</TD></TR>
<TR ALIGN="center"><TD >USER-ATC</TD><TD > atom-to-continuum coupling</TD><TD > Jones & Templeton & Zimmerman (1)</TD><TD > <A HREF = "fix_atc.html">fix atc</A></TD><TD > USER/atc</TD><TD > <A HREF = "http://lammps.sandia.gov/pictures.html#atc">atc</A></TD><TD > lib/atc</TD></TR>
<TR ALIGN="center"><TD >USER-AWPMD</TD><TD > wave-packet MD</TD><TD > Ilya Valuev (JIHT)</TD><TD > <A HREF = "pair_awpmd.html">pair_style awpmd/cut</A></TD><TD > USER/awpmd</TD><TD > -</TD><TD > lib/awpmd</TD></TR>
<TR ALIGN="center"><TD >USER-CG-CMM</TD><TD > coarse-graining model</TD><TD > Axel Kohlmeyer (Temple U)</TD><TD > <A HREF = "pair_sdk.html">pair_style lj/sdk</A></TD><TD > USER/cg-cmm</TD><TD > <A HREF = "http://lammps.sandia.gov/pictures.html#cg">cg</A></TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-COLVARS</TD><TD > collective variables</TD><TD > Fiorin & Henin & Kohlmeyer (2)</TD><TD > <A HREF = "fix_colvars.html">fix colvars</A></TD><TD > USER/colvars</TD><TD > <A HREF = "colvars">colvars</A></TD><TD > lib/colvars</TD></TR>
<TR ALIGN="center"><TD >USER-CUDA</TD><TD > NVIDIA GPU styles</TD><TD > Christian Trott (U Tech Ilmenau)</TD><TD > <A HREF = "accelerate_cuda.html">Section accelerate</A></TD><TD > USER/cuda</TD><TD > -</TD><TD > lib/cuda</TD></TR>
<TR ALIGN="center"><TD >USER-DIFFRACTION</TD><TD > virutal x-ray and electron diffraction</TD><TD > Shawn Coleman (ARL)</TD><TD ><A HREF = "compute_xrd.html">compute xrd</A></TD><TD > USER/diffraction</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-DRUDE</TD><TD > Drude oscillators</TD><TD > Dequidt & Devemy & Padua (3)</TD><TD > <A HREF = "tutorial_drude.html">tutorial</A></TD><TD > USER/drude</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-EFF</TD><TD > electron force field</TD><TD > Andres Jaramillo-Botero (Caltech)</TD><TD > <A HREF = "pair_eff.html">pair_style eff/cut</A></TD><TD > USER/eff</TD><TD > <A HREF = "http://lammps.sandia.gov/movies.html#eff">eff</A></TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-FEP</TD><TD > free energy perturbation</TD><TD > Agilio Padua (U Blaise Pascal Clermont-Ferrand)</TD><TD > <A HREF = "compute_fep.html">compute fep</A></TD><TD > USER/fep</TD><TD > -</TD><TD > -</TD></TR>
+<TR ALIGN="center"><TD >USER-H5MD</TD><TD > dump output via HDF5</TD><TD > Pierre de Buyl (KU Leuven)</TD><TD > <A HREF = "dump_h5md.html">dump h5md</A></TD><TD > -</TD><TD > -</TD><TD > h5md</TD></TR>
<TR ALIGN="center"><TD >USER-INTEL</TD><TD > Vectorized CPU and Intel(R) coprocessor styles</TD><TD > W. Michael Brown (Intel)</TD><TD > <A HREF = "accelerate_intel.html">Section accelerate</A></TD><TD > examples/intel</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-LB</TD><TD > Lattice Boltzmann fluid</TD><TD > Colin Denniston (U Western Ontario)</TD><TD > <A HREF = "fix_lb_fluid.html">fix lb/fluid</A></TD><TD > USER/lb</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-MISC</TD><TD > single-file contributions</TD><TD > USER-MISC/README</TD><TD > USER-MISC/README</TD><TD > -</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-MOLFILE</TD><TD > <A HREF = "http://www.ks.uiuc.edu/Research/vmd">VMD</A> molfile plug-ins</TD><TD > Axel Kohlmeyer (Temple U)</TD><TD > <A HREF = "dump_molfile.html">dump molfile</A></TD><TD > -</TD><TD > -</TD><TD > VMD-MOLFILE</TD></TR>
<TR ALIGN="center"><TD >USER-OMP</TD><TD > OpenMP threaded styles</TD><TD > Axel Kohlmeyer (Temple U)</TD><TD > <A HREF = "accelerate_omp.html">Section accelerate</A></TD><TD > -</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-PHONON</TD><TD > phonon dynamical matrix</TD><TD > Ling-Ti Kong (Shanghai Jiao Tong U)</TD><TD > <A HREF = "fix_phonon.html">fix phonon</A></TD><TD > USER/phonon</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-QMMM</TD><TD > QM/MM coupling</TD><TD > Axel Kohlmeyer (Temple U)</TD><TD > <A HREF = "fix_qmmm.html">fix qmmm</A></TD><TD > USER/qmmm</TD><TD > -</TD><TD > lib/qmmm</TD></TR>
<TR ALIGN="center"><TD >USER-QTB</TD><TD > quantum nuclear effects</TD><TD > Yuan Shen (Stanford)</TD><TD > <A HREF = "fix_qtb.html">fix qtb</A> <A HREF = "fix_qbmsst.html">fix_qbmsst</A></TD><TD > qtb</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-QUIP</TD><TD > QUIP/libatoms interface</TD><TD > Albert Bartok-Partay (U Cambridge)</TD><TD > <A HREF = "pair_quip.html">pair_style quip</A></TD><TD > USER/quip</TD><TD > -</TD><TD > lib/quip</TD></TR>
<TR ALIGN="center"><TD >USER-REAXC</TD><TD > C version of ReaxFF</TD><TD > Metin Aktulga (LBNL)</TD><TD > <A HREF = "pair_reax_c.html">pair_style reaxc</A></TD><TD > reax</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-SMD</TD><TD > smoothed Mach dynamics</TD><TD > Georg Ganzenmuller (EMI)</TD><TD > <A HREF = "PDF/SMD_LAMMPS_userguide.pdf">userguide.pdf</A></TD><TD > USER/smd</TD><TD > -</TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >USER-SPH</TD><TD > smoothed particle hydrodynamics</TD><TD > Georg Ganzenmuller (EMI)</TD><TD > <A HREF = "PDF/SPH_LAMMPS_userguide.pdf">userguide.pdf</A></TD><TD > USER/sph</TD><TD > <A HREF = "http://lammps.sandia.gov/movies.html#sph">sph</A></TD><TD > -</TD></TR>
<TR ALIGN="center"><TD >
</TD></TR></TABLE></DIV>
<P>The "Authors" column lists a name(s) if a specific person is
responible for creating and maintaining the package.
</P>
<P>If the Library is not listed as lib/package, then it is a third-party
library not included in the LAMMPS distribution. See the
src/package/Makefile.lammps file for info on where to download the
library from.
</P>
<P>(2) The ATC package was created by Reese Jones, Jeremy Templeton, and
Jon Zimmerman (Sandia).
</P>
<P>(2) The COLVARS package was created by Axel Kohlmeyer (Temple U) using
the colvars module library written by Giacomo Fiorin (Temple U) and
Jerome Henin (LISM, Marseille, France).
</P>
<P>(3) The DRUDE package was created by Alain Dequidt (U Blaise Pascal
Clermont-Ferrand) and co-authors Julien Devemy (CNRS) and Agilio Padua
(U Blaise Pascal).
</P>
<P>The "Doc page" column links to either a portion of the
<A HREF = "Section_howto.html">Section_howto</A> of the manual, or an input script
command implemented as part of the package, or to additional
documentation provided witht he package.
</P>
<P>The "Example" column is a sub-directory in the examples directory of
the distribution which has an input script that uses the package.
E.g. "peptide" refers to the examples/peptide directory. USER/cuda
refers to the examples/USER/cuda directory.
</P>
<P>The "Library" column lists an external library which must be built
first and which LAMMPS links to when it is built. If it is listed as
lib/package, then the code for the library is under the lib directory
of the LAMMPS distribution. See the lib/package/README file for info
on how to build the library. If it is not listed as lib/package, then
it is a third-party library not included in the LAMMPS distribution.
See the src/package/Makefile.lammps file for info on where to download
the library. <A HREF = "Section_start.html#start_3_3">Section start</A> of the
manual also gives details on how to build LAMMPS with both kinds of
auxiliary libraries.
</P>
<P>More details on each package, from the USER-*/README file is given
below.
</P>
<HR>
<H4>USER-ATC package
</H4>
<P>This package implements a "fix atc" command which can be used in a
LAMMPS input script. This fix can be employed to either do concurrent
coupling of MD with FE-based physics surrogates or on-the-fly
post-processing of atomic information to continuum fields.
</P>
<P>See the doc page for the fix atc command to get started. At the
bottom of the doc page are many links to additional documentation
contained in the doc/USER/atc directory.
</P>
<P>There are example scripts for using this package in examples/USER/atc.
</P>
<P>This package uses an external library in lib/atc which must be
compiled before making LAMMPS. See the lib/atc/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
</P>
<P>The primary people who created this package are Reese Jones (rjones at
sandia.gov), Jeremy Templeton (jatempl at sandia.gov) and Jon
Zimmerman (jzimmer at sandia.gov) at Sandia. Contact them directly if
you have questions.
</P>
<HR>
<H4>USER-AWPMD package
</H4>
<P>This package contains a LAMMPS implementation of the Antisymmetrized
Wave Packet Molecular Dynamics (AWPMD) method.
</P>
<P>See the doc page for the pair_style awpmd/cut command to get started.
</P>
<P>There are example scripts for using this package in examples/USER/awpmd.
</P>
<P>This package uses an external library in lib/awpmd which must be
compiled before making LAMMPS. See the lib/awpmd/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
</P>
<P>The person who created this package is Ilya Valuev at the JIHT in
Russia (valuev at physik.hu-berlin.de). Contact him directly if you
have questions.
</P>
<HR>
<H4>USER-CG-CMM package
</H4>
<P>This package implements 3 commands which can be used in a LAMMPS input
script:
</P>
<UL><LI>pair_style lj/sdk
<LI>pair_style lj/sdk/coul/long
<LI>angle_style sdk
</UL>
<P>These styles allow coarse grained MD simulations with the
parametrization of Shinoda, DeVane, Klein, Mol Sim, 33, 27 (2007)
(SDK), with extensions to simulate ionic liquids, electrolytes, lipids
and charged amino acids.
</P>
<P>See the doc pages for these commands for details.
</P>
<P>There are example scripts for using this package in
examples/USER/cg-cmm.
</P>
<P>This is the second generation implementation reducing the the clutter
of the previous version. For many systems with electrostatics, it will
be faster to use pair_style hybrid/overlay with lj/sdk and coul/long
instead of the combined lj/sdk/coul/long style. since the number of
charged atom types is usually small. For any other coulomb
interactions this is now required. To exploit this property, the use
of the kspace_style pppm/cg is recommended over regular pppm. For all
new styles, input file backward compatibility is provided. The old
implementation is still available through appending the /old
suffix. These will be discontinued and removed after the new
implementation has been fully validated.
</P>
<P>The current version of this package should be considered beta
quality. The CG potentials work correctly for "normal" situations, but
have not been testing with all kinds of potential parameters and
simulation systems.
</P>
<P>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-COLVARS package
</H4>
<P>This package implements the "fix colvars" command which can be
used in a LAMMPS input script.
</P>
<P>This fix allows to use "collective variables" to implement
Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella
Sampling and Restraints. This code consists of two parts:
</P>
<UL><LI>A portable collective variable module library written and maintained
<LI>by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and
<LI>Jerome Henin (LISM, CNRS, Marseille, France). This code is located in
<LI>the directory lib/colvars and needs to be compiled first. The colvars
<LI>fix and an interface layer, exchanges information between LAMMPS and
<LI>the collective variable module.
</UL>
<P>See the doc page of <A HREF = "fix_colvars.html">fix colvars</A> for more details.
</P>
<P>There are example scripts for using this package in
examples/USER/colvars
</P>
<P>This is a very new interface that does not yet support all
features in the module and will see future optimizations
and improvements. The colvars module library is also available
in NAMD has been thoroughly used and tested there. Bugs and
problems are likely due to the interface layers code.
Thus the current version of this package should be considered
beta quality.
</P>
<P>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-CUDA package
</H4>
<P>This package provides acceleration of various LAMMPS pair styles, fix
styles, compute styles, and long-range Coulombics via PPPM for NVIDIA
GPUs.
</P>
<P>See this section of the manual to get started:
</P>
<P><A HREF = "Section_accelerate.html#acc_7">Section_accelerate</A>
</P>
<P>There are example scripts for using this package in
examples/USER/cuda.
</P>
<P>This package uses an external library in lib/cuda which must be
compiled before making LAMMPS. See the lib/cuda/README file and the
LAMMPS manual for information on building LAMMPS with external
libraries.
</P>
<P>The person who created this package is Christian Trott at the
University of Technology Ilmenau, Germany (christian.trott at
tu-ilmenau.de). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-DIFFRACTION package
</H4>
<P>This package contains the commands neeed to calculate x-ray and
electron diffraction intensities based on kinematic diffraction
theory.
</P>
<P>See these doc pages and their related commands to get started:
</P>
<UL><LI><A HREF = "compute_xrd.html">compute xrd</A>
<LI><A HREF = "compute_saed.html">compute saed</A>
<LI><A HREF = "fix_saed_vtk.html">fix saed/vtk</A>
</UL>
<P>The person who created this package is Shawn P. Coleman
(shawn.p.coleman8.ctr at mail.mil) while at the University of
Arkansas. Contact him directly if you have questions.
</P>
<HR>
<H4>USER-DRUDE package
</H4>
<P>This package implements methods for simulating polarizable systems
in LAMMPS using thermalized Drude oscillators.
</P>
<P>See these doc pages and their related commands to get started:
</P>
<UL><LI><A HREF = "tutorial_drude.html">Drude tutorial</A>
<LI><A HREF = "fix_drude.html">fix drude</A>
<LI><A HREF = "compute_temp_drude.html">compute temp/drude</A>
<LI><A HREF = "fix_langevin_drude.html">fix langevin/drude</A>
<LI><A HREF = "fix_drude_transform.html">fix drude/transform/...</A>
<LI><A HREF = "pair_thole.html">pair thole</A>
</UL>
<P>There are auxiliary tools for using this package in tools/drude.
</P>
<P>The person who created this package is Alain Dequidt at Universite
Blaise Pascal Clermont-Ferrand (alain.dequidt at univ-bpclermont.fr)
Contact him directly if you have questions. Co-authors: Julien Devemy,
Agilio Padua.
</P>
<HR>
<H4>USER-EFF package
</H4>
<P>This package contains a LAMMPS implementation of the electron Force
Field (eFF) currently under development at Caltech, as described in
A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, JCC,
2010. The eFF potential was first introduced by Su and Goddard, in
2007.
</P>
<P>eFF can be viewed as an approximation to QM wave packet dynamics and
Fermionic molecular dynamics, combining the ability of electronic
structure methods to describe atomic structure, bonding, and chemistry
in materials, and of plasma methods to describe nonequilibrium
dynamics of large systems with a large number of highly excited
electrons. We classify it as a mixed QM-classical approach rather than
a conventional force field method, which introduces QM-based terms (a
spin-dependent repulsion term to account for the Pauli exclusion
principle and the electron wavefunction kinetic energy associated with
the Heisenberg principle) that reduce, along with classical
electrostatic terms between nuclei and electrons, to the sum of a set
of effective pairwise potentials. This makes eFF uniquely suited to
simulate materials over a wide range of temperatures and pressures
where electronically excited and ionized states of matter can occur
and coexist.
</P>
<P>The necessary customizations to the LAMMPS core are in place to
enable the correct handling of explicit electron properties during
minimization and dynamics.
</P>
<P>See the doc page for the pair_style eff/cut command to get started.
</P>
<P>There are example scripts for using this package in
examples/USER/eff.
</P>
<P>There are auxiliary tools for using this package in tools/eff.
</P>
<P>The person who created this package is Andres Jaramillo-Botero at
CalTech (ajaramil at wag.caltech.edu). Contact him directly if you
have questions.
</P>
<HR>
<H4>USER-FEP package
</H4>
<P>This package provides methods for performing free energy perturbation
simulations with soft-core pair potentials in LAMMPS.
</P>
<P>See these doc pages and their related commands to get started:
</P>
<UL><LI><A HREF = "fix_adapt_fep.html">fix adapt/fep</A>
<LI><A HREF = "compute_fep.html">compute fep</A>
<LI><A HREF = "pair_lj_soft.html">soft pair styles</A>
</UL>
<P>The person who created this package is Agilio Padua at Universite
Blaise Pascal Clermont-Ferrand (agilio.padua at univ-bpclermont.fr)
Contact him directly if you have questions.
</P>
<HR>
+<H4>USER-H5MD package
+</H4>
+<P>This package contains a <A HREF = "dump_h5md.html">dump h5md</A> command for
+performing a dump of atom properties in HDF5 format. <A HREF = "http://www.hdfgroup.org/HDF5/">HDF5
+files</A> are binary, portable and self-describing and can be
+examined and used by a variety of auxiliary tools. The output HDF5
+files are structured in a format called H5MD, which was designed to
+store molecular data, and can be used and produced by various MD and
+MD-related codes. The <A HREF = "doc/dump_h5md.html">dump h5md</A> command gives a
+citation to a paper describing the format.
+</P>
+
+
+<P>The person who created this package and the underlying H5MD format is
+Pierre de Buyl at KU Leuven (see http://pdebuyl.be). Contact him
+directly if you have questions.
+</P>
+<HR>
+
<H4>USER-INTEL package
</H4>
<P>This package provides options for performing neighbor list and
non-bonded force calculations in single, mixed, or double precision
and also a capability for accelerating calculations with an
Intel(R) Xeon Phi(TM) coprocessor.
</P>
<P>See this section of the manual to get started:
</P>
<P><A HREF = "Section_accelerate.html#acc_9">Section_accelerate</A>
</P>
<P>The person who created this package is W. Michael Brown at Intel
(michael.w.brown at intel.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-LB package
</H4>
<P>This package contains a LAMMPS implementation of a background
Lattice-Boltzmann fluid, which can be used to model MD particles
influenced by hydrodynamic forces.
</P>
<P>See this doc page and its related commands to get started:
</P>
<P><A HREF = "fix_lb_fluid.html">fix lb/fluid</A>
</P>
<P>The people who created this package are Frances Mackay (fmackay at
uwo.ca) and Colin (cdennist at uwo.ca) Denniston, University of
Western Ontario. Contact them directly if you have questions.
</P>
<HR>
<H4>USER-MISC package
</H4>
<P>The files in this package are a potpourri of (mostly) unrelated
features contributed to LAMMPS by users. Each feature is a single
pair of files (*.cpp and *.h).
</P>
<P>More information about each feature can be found by reading its doc
page in the LAMMPS doc directory. The doc page which lists all LAMMPS
input script commands is as follows:
</P>
<P><A HREF = "Section_commands.html#cmd_5">Section_commands</A>
</P>
<P>User-contributed features are listed at the bottom of the fix,
compute, pair, etc sections.
</P>
<P>The list of features and author of each is given in the
src/USER-MISC/README file.
</P>
<P>You should contact the author directly if you have specific questions
about the feature or its coding.
</P>
<HR>
<H4>USER-MOLFILE package
</H4>
<P>This package contains a dump molfile command which uses molfile
plugins that are bundled with the
<A HREF = "http://www.ks.uiuc.edu/Research/vmd">VMD</A> molecular visualization and
analysis program, to enable LAMMPS to dump its information in formats
compatible with various molecular simulation tools.
</P>
<P>The package only provides the interface code, not the plugins. These
can be obtained from a VMD installation which has to match the
platform that you are using to compile LAMMPS for. By adding plugins
to VMD, support for new file formats can be added to LAMMPS (or VMD or
other programs that use them) without having to recompile the
application itself.
</P>
<P>See this doc page to get started:
</P>
<P><A HREF = "dump_molfile.html#acc_5">dump molfile</A>
</P>
<P>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-OMP package
</H4>
<P>This package provides OpenMP multi-threading support and
other optimizations of various LAMMPS pair styles, dihedral
styles, and fix styles.
</P>
<P>See this section of the manual to get started:
</P>
<P><A HREF = "Section_accelerate.html#acc_5">Section_accelerate</A>
</P>
<P>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-PHONON package
</H4>
<P>This package contains a fix phonon command that calculates dynamical
matrices, which can then be used to compute phonon dispersion
relations, directly from molecular dynamics simulations.
</P>
<P>See this doc page to get started:
</P>
<P><A HREF = "fix_phonon.html">fix phonon</A>
</P>
<P>The person who created this package is Ling-Ti Kong (konglt at
sjtu.edu.cn) at Shanghai Jiao Tong University. Contact him directly
if you have questions.
</P>
<HR>
<H4>USER-QMMM package
</H4>
<P>This package provides a fix qmmm command which allows LAMMPS to be
used in a QM/MM simulation, currently only in combination with pw.x
code from the <A HREF = "http://www.quantum-espresso.org">Quantum ESPRESSO</A> package.
</P>
<P>The current implementation only supports an ONIOM style mechanical
coupling to the Quantum ESPRESSO plane wave DFT package.
Electrostatic coupling is in preparation and the interface has been
written in a manner that coupling to other QM codes should be possible
without changes to LAMMPS itself.
</P>
<P>See this doc page to get started:
</P>
<P><A HREF = "fix_qmmm.html">fix qmmm</A>
</P>
<P>as well as the lib/qmmm/README file.
</P>
<P>The person who created this package is Axel Kohlmeyer at Temple U
(akohlmey at gmail.com). Contact him directly if you have questions.
</P>
<HR>
<H4>USER-QTB package
</H4>
<P>This package provides a self-consistent quantum treatment of the
vibrational modes in a classical molecular dynamics simulation. By
coupling the MD simulation to a colored thermostat, it introduces zero
point energy into the system, alter the energy power spectrum and the
heat capacity towards their quantum nature. This package could be of
interest if one wants to model systems at temperatures lower than
their classical limits or when temperatures ramp up across the
classical limits in the simulation.
</P>
<P>See these two doc pages to get started:
</P>
<P><A HREF = "fix_qtb.html">fix qtb</A> provides quantum nulcear correction through a
colored thermostat and can be used with other time integration schemes
like <A HREF = "fix_nve.html">fix nve</A> or <A HREF = "fix_nh.html">fix nph</A>.
</P>
<P><A HREF = "fix_qbmsst.html">fix qbmsst</A> enables quantum nuclear correction of a
multi-scale shock technique simulation by coupling the quantum thermal
bath with the shocked system.
</P>
<P>The person who created this package is Yuan Shen (sy0302 at
stanford.edu) at Stanford University. Contact him directly if you
have questions.
</P>
<HR>
<H4>USER-REAXC package
</H4>
<P>This package contains a implementation for LAMMPS of the ReaxFF force
field. ReaxFF uses distance-dependent bond-order functions to
represent the contributions of chemical bonding to the potential
energy. It was originally developed by Adri van Duin and the Goddard
group at CalTech.
</P>
<P>The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in
C, should give identical or very similar results to pair_style reax,
which is a ReaxFF implementation on top of a Fortran library, a
version of which library was originally authored by Adri van Duin.
</P>
<P>The reax/c version should be somewhat faster and more scalable,
particularly with respect to the charge equilibration calculation. It
should also be easier to build and use since there are no complicating
issues with Fortran memory allocation or linking to a Fortran library.
</P>
<P>For technical details about this implemention of ReaxFF, see
this paper:
</P>
<P>Parallel and Scalable Reactive Molecular Dynamics: Numerical Methods
and Algorithmic Techniques, H. M. Aktulga, J. C. Fogarty,
S. A. Pandit, A. Y. Grama, Parallel Computing, in press (2011).
</P>
<P>See the doc page for the pair_style reax/c command for details
of how to use it in LAMMPS.
</P>
<P>The person who created this package is Hasan Metin Aktulga (hmaktulga
at lbl.gov), while at Purdue University. Contact him directly, or
Aidan Thompson at Sandia (athomps at sandia.gov), if you have
questions.
</P>
<HR>
<H4>USER-SMD package
</H4>
<P>This package implements smoothed Mach dynamics (SMD) in
LAMMPS. Currently, the package has the following features:
</P>
<P>* Does liquids via traditional Smooth Particle Hydrodynamics (SPH)
</P>
<P>* Also solves solids mechanics problems via a state of the art
stabilized meshless method with hourglass control.
</P>
<P>* Can specify hydrostatic interactions independently from material
strength models, i.e. pressure and deviatoric stresses are separated.
</P>
<P>* Many material models available (Johnson-Cook, plasticity with
hardening, Mie-Grueneisen, Polynomial EOS). Easy to add new
material models.
</P>
<P>* Rigid boundary conditions (walls) can be loaded as surface geometries
from *.STL files.
</P>
<P>See the file doc/PDF/SMD_LAMMPS_userguide.pdf to get started.
</P>
<P>There are example scripts for using this package in examples/USER/smd.
</P>
<P>The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.
</P>
<H4>USER-SPH package
</H4>
<P>This package implements smoothed particle hydrodynamics (SPH) in
LAMMPS. Currently, the package has the following features:
</P>
<P>* Tait, ideal gas, Lennard-Jones equation of states, full support for
complete (i.e. internal-energy dependent) equations of state
</P>
<P>* Plain or Monaghans XSPH integration of the equations of motion
</P>
<P>* Density continuity or density summation to propagate the density field
</P>
<P>* Commands to set internal energy and density of particles from the
input script
</P>
<P>* Output commands to access internal energy and density for dumping and
thermo output
</P>
<P>See the file doc/PDF/SPH_LAMMPS_userguide.pdf to get started.
</P>
<P>There are example scripts for using this package in examples/USER/sph.
</P>
<P>The person who created this package is Georg Ganzenmuller at the
Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute in
Germany (georg.ganzenmueller at emi.fhg.de). Contact him directly if
you have questions.
</P>
</HTML>
diff --git a/doc/doc2/Section_start.html b/doc/doc2/Section_start.html
index bf0da8798..acc1beac4 100644
--- a/doc/doc2/Section_start.html
+++ b/doc/doc2/Section_start.html
@@ -1,1865 +1,1876 @@
<HTML>
<CENTER><A HREF = "Section_intro.html">Previous Section</A> - <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A> - <A HREF = "Section_commands.html">Next Section</A>
</CENTER>
<HR>
<H3>2. Getting Started
</H3>
<P>This section describes how to build and run LAMMPS, for both new and
experienced users.
</P>
2.1 <A HREF = "#start_1">What's in the LAMMPS distribution</A><BR>
2.2 <A HREF = "#start_2">Making LAMMPS</A><BR>
2.3 <A HREF = "#start_3">Making LAMMPS with optional packages</A><BR>
2.4 <A HREF = "#start_4">Building LAMMPS via the Make.py script</A><BR>
2.5 <A HREF = "#start_5">Building LAMMPS as a library</A><BR>
2.6 <A HREF = "#start_6">Running LAMMPS</A><BR>
2.7 <A HREF = "#start_7">Command-line options</A><BR>
2.8 <A HREF = "#start_8">Screen output</A><BR>
2.9 <A HREF = "#start_9">Tips for users of previous versions</A> <BR>
<HR>
<HR>
<H4><A NAME = "start_1"></A>2.1 What's in the LAMMPS distribution
</H4>
<P>When you download a LAMMPS tarball you will need to unzip and untar
the downloaded file with the following commands, after placing the
tarball in an appropriate directory.
</P>
<PRE>gunzip lammps*.tar.gz
tar xvf lammps*.tar
</PRE>
<P>This will create a LAMMPS directory containing two files and several
sub-directories:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD >README</TD><TD > text file</TD></TR>
<TR><TD >LICENSE</TD><TD > the GNU General Public License (GPL)</TD></TR>
<TR><TD >bench</TD><TD > benchmark problems</TD></TR>
<TR><TD >doc</TD><TD > documentation</TD></TR>
<TR><TD >examples</TD><TD > simple test problems</TD></TR>
<TR><TD >potentials</TD><TD > embedded atom method (EAM) potential files</TD></TR>
<TR><TD >src</TD><TD > source files</TD></TR>
<TR><TD >tools</TD><TD > pre- and post-processing tools
</TD></TR></TABLE></DIV>
<P>Note that the <A HREF = "download">download page</A> also has links to download
Windows exectubles and installers, as well as pre-built executables
for a few specific Linux distributions. It also has instructions for
how to download/install LAMMPS for Macs (via Homebrew), and to
download and update LAMMPS from SVN and Git repositories, which gives
you the same files that are in the download tarball.
</P>
<P>The Windows and Linux executables for serial or parallel only include
certain packages and bug-fixes/upgrades listed on <A HREF = "http://lammps.sandia.gov/bug.html">this
page</A> up to a certain date, as
stated on the download page. If you want an executable with
non-included packages or that is more current, then you'll need to
build LAMMPS yourself, as discussed in the next section.
</P>
<P>Skip to the <A HREF = "#start_6">Running LAMMPS</A> sections for info on how to
launch a LAMMPS Windows executable on a Windows box.
</P>
<HR>
<H4><A NAME = "start_2"></A>2.2 Making LAMMPS
</H4>
<P>This section has the following sub-sections:
</P>
<UL><LI><A HREF = "#start_2_1">Read this first</A>
<LI><A HREF = "#start_2_2">Steps to build a LAMMPS executable</A>
<LI><A HREF = "#start_2_3">Common errors that can occur when making LAMMPS</A>
<LI><A HREF = "#start_2_4">Additional build tips</A>
<LI><A HREF = "#start_2_5">Building for a Mac</A>
<LI><A HREF = "#start_2_6">Building for Windows</A>
</UL>
<HR>
<A NAME = "start_2_1"></A><B><I>Read this first:</I></B>
<P>If you want to avoid building LAMMPS yourself, read the preceeding
section about options available for downloading and installing
executables. Details are discussed on the <A HREF = "download">download</A> page.
</P>
<P>Building LAMMPS can be simple or not-so-simple. If all you need are
the default packages installed in LAMMPS, and MPI is already installed
on your machine, or you just want to run LAMMPS in serial, then you
can typically use the Makefile.mpi or Makefile.serial files in
src/MAKE by typing one of these lines (from the src dir):
</P>
<PRE>make mpi
make serial
</PRE>
<P>Note that on a facility supercomputer, there are often "modules"
loaded in your environment that provide the compilers and MPI you
should use. In this case, the "mpicxx" compile/link command in
Makefile.mpi should just work by accessing those modules.
</P>
<P>It may be the case that one of the other Makefile.machine files in the
src/MAKE sub-directories is a better match to your system (type "make"
to see a list), you can use it as-is by typing (for example):
</P>
<PRE>make stampede
</PRE>
<P>If any of these builds (with an existing Makefile.machine) works on
your system, then you're done!
</P>
<P>If you want to do one of the following:
</P>
<UL><LI>use optional LAMMPS features that require additional libraries
<LI>use optional packages that require additional libraries
<LI>use optional accelerator packages that require special compiler/linker settings
<LI>run on a specialized platform that has its own compilers, settings, or other libs to use
</UL>
<P>then building LAMMPS is more complicated. You may need to find where
auxiliary libraries exist on your machine or install them if they
don't. You may need to build additional libraries that are part of
the LAMMPS package, before building LAMMPS. You may need to edit a
Makefile.machine file to make it compatible with your system.
</P>
<P>Note that there is a Make.py tool in the src directory that automates
several of these steps, but you still have to know what you are doing.
<A HREF = "#start_4">Section 2.4</A> below describes the tool. It is a convenient
way to work with installing/un-installing various packages, the
Makefile.machine changes required by some packages, and the auxiliary
libraries some of them use.
</P>
<P>Please read the following sections carefully. If you are not
comfortable with makefiles, or building codes on a Unix platform, or
running an MPI job on your machine, please find a local expert to help
you. Many compilation, linking, and run problems that users have are
often not really LAMMPS issues - they are peculiar to the user's
system, compilers, libraries, etc. Such questions are better answered
by a local expert.
</P>
<P>If you have a build problem that you are convinced is a LAMMPS issue
(e.g. the compiler complains about a line of LAMMPS source code), then
please post the issue to the <A HREF = "http://lammps.sandia.gov/mail.html">LAMMPS mail
list</A>.
</P>
<P>If you succeed in building LAMMPS on a new kind of machine, for which
there isn't a similar machine Makefile included in the
src/MAKE/MACHINES directory, then send it to the developers and we can
include it in the LAMMPS distribution.
</P>
<HR>
<A NAME = "start_2_2"></A><B><I>Steps to build a LAMMPS executable:</I></B>
<P><B>Step 0</B>
</P>
<P>The src directory contains the C++ source and header files for LAMMPS.
It also contains a top-level Makefile and a MAKE sub-directory with
low-level Makefile.* files for many systems and machines. See the
src/MAKE/README file for a quick overview of what files are available
and what sub-directories they are in.
</P>
<P>The src/MAKE dir has a few files that should work as-is on many
platforms. The src/MAKE/OPTIONS dir has more that invoke additional
compiler, MPI, and other setting options commonly used by LAMMPS, to
illustrate their syntax. The src/MAKE/MACHINES dir has many more that
have been tweaked or optimized for specific machines. These files are
all good starting points if you find you need to change them for your
machine. Put any file you edit into the src/MAKE/MINE directory and
it will be never be touched by any LAMMPS updates.
</P>
<P>>From within the src directory, type "make" or "gmake". You should see
a list of available choices from src/MAKE and all of its
sub-directories. If one of those has the options you want or is the
machine you want, you can type a command like:
</P>
<PRE>make mpi
or
make serial_icc
or
gmake mac
</PRE>
<P>Note that the corresponding Makefile.machine can exist in src/MAKE or
any of its sub-directories. If a file with the same name appears in
multiple places (not a good idea), the order they are used is as
follows: src/MAKE/MINE, src/MAKE, src/MAKE/OPTIONS, src/MAKE/MACHINES.
This gives preference to a file you have created/edited and put in
src/MAKE/MINE.
</P>
<P>Note that on a multi-processor or multi-core platform you can launch a
parallel make, by using the "-j" switch with the make command, which
will build LAMMPS more quickly.
</P>
<P>If you get no errors and an executable like lmp_mpi or lmp_g++_serial
or lmp_mac is produced, then you're done; it's your lucky day.
</P>
<P>Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see <A HREF = "#start_3">this
section</A> below.
</P>
<P><B>Step 1</B>
</P>
<P>If Step 0 did not work, you will need to create a low-level Makefile
for your machine, like Makefile.foo. You should make a copy of an
existing Makefile.* in src/MAKE or one of its sub-directories as a
starting point. The only portions of the file you need to edit are
the first line, the "compiler/linker settings" section, and the
"LAMMPS-specific settings" section. When it works, put the edited
file in src/MAKE/MINE and it will not be altered by any future LAMMPS
updates.
</P>
<P><B>Step 2</B>
</P>
<P>Change the first line of Makefile.foo to list the word "foo" after the
"#", and whatever other options it will set. This is the line you
will see if you just type "make".
</P>
<P><B>Step 3</B>
</P>
<P>The "compiler/linker settings" section lists compiler and linker
settings for your C++ compiler, including optimization flags. You can
use g++, the open-source GNU compiler, which is available on all Unix
systems. You can also use mpicxx which will typically be available if
MPI is installed on your system, though you should check which actual
compiler it wraps. Vendor compilers often produce faster code. On
boxes with Intel CPUs, we suggest using the Intel icc compiler, which
can be downloaded from <A HREF = "http://www.intel.com/software/products/noncom">Intel's compiler site</A>.
</P>
<P>If building a C++ code on your machine requires additional libraries,
then you should list them as part of the LIB variable. You should
not need to do this if you use mpicxx.
</P>
<P>The DEPFLAGS setting is what triggers the C++ compiler to create a
dependency list for a source file. This speeds re-compilation when
source (*.cpp) or header (*.h) files are edited. Some compilers do
not support dependency file creation, or may use a different switch
than -D. GNU g++ and Intel icc works with -D. If your compiler can't
create dependency files, then you'll need to create a Makefile.foo
patterned after Makefile.storm, which uses different rules that do not
involve dependency files. Note that when you build LAMMPS for the
first time on a new platform, a long list of *.d files will be printed
out rapidly. This is not an error; it is the Makefile doing its
normal creation of dependencies.
</P>
<P><B>Step 4</B>
</P>
<P>The "system-specific settings" section has several parts. Note that
if you change any -D setting in this section, you should do a full
re-compile, after typing "make clean" (which will describe different
clean options).
</P>
<P>The LMP_INC variable is used to include options that turn on ifdefs
within the LAMMPS code. The options that are currently recogized are:
</P>
<UL><LI>-DLAMMPS_GZIP
<LI>-DLAMMPS_JPEG
<LI>-DLAMMPS_PNG
<LI>-DLAMMPS_FFMPEG
<LI>-DLAMMPS_MEMALIGN
<LI>-DLAMMPS_XDR
<LI>-DLAMMPS_SMALLBIG
<LI>-DLAMMPS_BIGBIG
<LI>-DLAMMPS_SMALLSMALL
<LI>-DLAMMPS_LONGLONG_TO_LONG
<LI>-DPACK_ARRAY
<LI>-DPACK_POINTER
<LI>-DPACK_MEMCPY
</UL>
<P>The read_data and dump commands will read/write gzipped files if you
compile with -DLAMMPS_GZIP. It requires that your machine supports
-the "popen" function in the standard runtime library and that a gzip
+the "popen()" function in the standard runtime library and that a gzip
executable can be found by LAMMPS during a run.
</P>
+<P>IMPORTANT NOTE: on some clusters with high-speed networks, using the
+fork() library calls (required by popen()) can interfere with the fast
+communication library and lead to simulations using compressed output
+or input to hang or crash. For selected operations, compressed file
+I/O is also available using a compression library instead, which are
+provided in the COMPRESS package. From more details about compiling
+LAMMPS with packages, please see below.
+</P>
<P>If you use -DLAMMPS_JPEG, the <A HREF = "dump_image.html">dump image</A> command
will be able to write out JPEG image files. For JPEG files, you must
also link LAMMPS with a JPEG library, as described below. If you use
-DLAMMPS_PNG, the <A HREF = "dump.html">dump image</A> command will be able to write
out PNG image files. For PNG files, you must also link LAMMPS with a
PNG library, as described below. If neither of those two defines are
used, LAMMPS will only be able to write out uncompressed PPM image
files.
</P>
<P>If you use -DLAMMPS_FFMPEG, the <A HREF = "dump_image.html">dump movie</A> command
will be available to support on-the-fly generation of rendered movies
the need to store intermediate image files. It requires that your
machines supports the "popen" function in the standard runtime library
and that an FFmpeg executable can be found by LAMMPS during the run.
</P>
+<P>IMPORTANT NOTE: Similar to the note above, this option can conflict
+with high-speed networks, because it uses popen().
+</P>
<P>Using -DLAMMPS_MEMALIGN=<bytes> enables the use of the
posix_memalign() call instead of malloc() when large chunks or memory
are allocated by LAMMPS. This can help to make more efficient use of
vector instructions of modern CPUS, since dynamically allocated memory
has to be aligned on larger than default byte boundaries (e.g. 16
bytes instead of 8 bytes on x86 type platforms) for optimal
performance.
</P>
<P>If you use -DLAMMPS_XDR, the build will include XDR compatibility
files for doing particle dumps in XTC format. This is only necessary
if your platform does have its own XDR files available. See the
Restrictions section of the <A HREF = "dump.html">dump</A> command for details.
</P>
<P>Use at most one of the -DLAMMPS_SMALLBIG, -DLAMMPS_BIGBIG, -D-
DLAMMPS_SMALLSMALL settings. The default is -DLAMMPS_SMALLBIG. These
settings refer to use of 4-byte (small) vs 8-byte (big) integers
within LAMMPS, as specified in src/lmptype.h. The only reason to use
the BIGBIG setting is to enable simulation of huge molecular systems
(which store bond topology info) with more than 2 billion atoms, or to
track the image flags of moving atoms that wrap around a periodic box
more than 512 times. Normally, the only reason to use SMALLSMALL is
if your machine does not support 64-bit integers, though you can use
SMALLSMALL setting if you are running in serial or on a desktop
machine or small cluster where you will never run large systems or for
long time (more than 2 billion atoms, more than 2 billion timesteps).
See the <A HREF = "#start_2_4">Additional build tips</A> section below for more
details on these settings.
</P>
<P>Note that two packages, USER-ATC and USER-CUDA are not currently
compatible with -DLAMMPS_BIGBIG. Also the GPU package requires the
lib/gpu library to be compiled with the same setting, or the link will
fail.
</P>
<P>The -DLAMMPS_LONGLONG_TO_LONG setting may be needed if your system or
MPI version does not recognize "long long" data types. In this case a
"long" data type is likely already 64-bits, in which case this setting
will convert to that data type.
</P>
<P>Using one of the -DPACK_ARRAY, -DPACK_POINTER, and -DPACK_MEMCPY
options can make for faster parallel FFTs (in the PPPM solver) on some
platforms. The -DPACK_ARRAY setting is the default. See the
<A HREF = "kspace_style.html">kspace_style</A> command for info about PPPM. See
Step 6 below for info about building LAMMPS with an FFT library.
</P>
<P><B>Step 5</B>
</P>
<P>The 3 MPI variables are used to specify an MPI library to build LAMMPS
with. Note that you do not need to set these if you use the MPI
compiler mpicxx for your CC and LINK setting in the section above.
The MPI wrapper knows where to find the needed files.
</P>
<P>If you want LAMMPS to run in parallel, you must have an MPI library
installed on your platform. If MPI is installed on your system in the
usual place (under /usr/local), you also may not need to specify these
3 variables, assuming /usr/local is in your path. On some large
parallel machines which use "modules" for their compile/link
environements, you may simply need to include the correct module in
your build environment, before building LAMMPS. Or the parallel
machine may have a vendor-provided MPI which the compiler has no
trouble finding.
</P>
<P>Failing this, these 3 variables can be used to specify where the mpi.h
file (MPI_INC) and the MPI library file (MPI_PATH) are found and the
name of the library file (MPI_LIB).
</P>
<P>If you are installing MPI yourself, we recommend Argonne's MPICH2
or OpenMPI. MPICH can be downloaded from the <A HREF = "http://www.mcs.anl.gov/research/projects/mpich2/">Argonne MPI
site</A>. OpenMPI can
be downloaded from the <A HREF = "http://www.open-mpi.org">OpenMPI site</A>.
Other MPI packages should also work. If you are running on a big
parallel platform, your system people or the vendor should have
already installed a version of MPI, which is likely to be faster
than a self-installed MPICH or OpenMPI, so find out how to build
and link with it. If you use MPICH or OpenMPI, you will have to
configure and build it for your platform. The MPI configure script
should have compiler options to enable you to use the same compiler
you are using for the LAMMPS build, which can avoid problems that can
arise when linking LAMMPS to the MPI library.
</P>
<P>If you just want to run LAMMPS on a single processor, you can use the
dummy MPI library provided in src/STUBS, since you don't need a true
MPI library installed on your system. See src/MAKE/Makefile.serial
for how to specify the 3 MPI variables in this case. You will also
need to build the STUBS library for your platform before making LAMMPS
itself. Note that if you are building with src/MAKE/Makefile.serial,
e.g. by typing "make serial", then the STUBS library is built for you.
</P>
<P>To build the STUBS library from the src directory, type "make
mpi-stubs", or from the src/STUBS dir, type "make". This should
create a libmpi_stubs.a file suitable for linking to LAMMPS. If the
build fails, you will need to edit the STUBS/Makefile for your
platform.
</P>
<P>The file STUBS/mpi.c provides a CPU timer function called MPI_Wtime()
that calls gettimeofday() . If your system doesn't support
gettimeofday() , you'll need to insert code to call another timer.
Note that the ANSI-standard function clock() rolls over after an hour
or so, and is therefore insufficient for timing long LAMMPS
simulations.
</P>
<P><B>Step 6</B>
</P>
<P>The 3 FFT variables allow you to specify an FFT library which LAMMPS
uses (for performing 1d FFTs) when running the particle-particle
particle-mesh (PPPM) option for long-range Coulombics via the
<A HREF = "kspace_style.html">kspace_style</A> command.
</P>
<P>LAMMPS supports various open-source or vendor-supplied FFT libraries
for this purpose. If you leave these 3 variables blank, LAMMPS will
use the open-source <A HREF = "http://kissfft.sf.net">KISS FFT library</A>, which is
included in the LAMMPS distribution. This library is portable to all
platforms and for typical LAMMPS simulations is almost as fast as FFTW
or vendor optimized libraries. If you are not including the KSPACE
package in your build, you can also leave the 3 variables blank.
</P>
<P>Otherwise, select which kinds of FFTs to use as part of the FFT_INC
setting by a switch of the form -DFFT_XXX. Recommended values for XXX
are: MKL, SCSL, FFTW2, and FFTW3. Legacy options are: INTEL, SGI,
ACML, and T3E. For backward compatability, using -DFFT_FFTW will use
the FFTW2 library. Using -DFFT_NONE will use the KISS library
described above.
</P>
<P>You may also need to set the FFT_INC, FFT_PATH, and FFT_LIB variables,
so the compiler and linker can find the needed FFT header and library
files. Note that on some large parallel machines which use "modules"
for their compile/link environements, you may simply need to include
the correct module in your build environment. Or the parallel machine
may have a vendor-provided FFT library which the compiler has no
trouble finding.
</P>
<P>FFTW is a fast, portable library that should also work on any
platform. You can download it from
<A HREF = "http://www.fftw.org">www.fftw.org</A>. Both the legacy version 2.1.X and
the newer 3.X versions are supported as -DFFT_FFTW2 or -DFFT_FFTW3.
Building FFTW for your box should be as simple as ./configure; make.
Note that on some platforms FFTW2 has been pre-installed, and uses
renamed files indicating the precision it was compiled with,
e.g. sfftw.h, or dfftw.h instead of fftw.h. In this case, you can
specify an additional define variable for FFT_INC called -DFFTW_SIZE,
which will select the correct include file. In this case, for FFT_LIB
you must also manually specify the correct library, namely -lsfftw or
-ldfftw.
</P>
<P>The FFT_INC variable also allows for a -DFFT_SINGLE setting that will
use single-precision FFTs with PPPM, which can speed-up long-range
calulations, particularly in parallel or on GPUs. Fourier transform
and related PPPM operations are somewhat insensitive to floating point
truncation errors and thus do not always need to be performed in
double precision. Using the -DFFT_SINGLE setting trades off a little
accuracy for reduced memory use and parallel communication costs for
transposing 3d FFT data. Note that single precision FFTs have only
been tested with the FFTW3, FFTW2, MKL, and KISS FFT options.
</P>
<P><B>Step 7</B>
</P>
<P>The 3 JPG variables allow you to specify a JPEG and/or PNG library
which LAMMPS uses when writing out JPEG or PNG files via the <A HREF = "dump_image.html">dump
image</A> command. These can be left blank if you do not
use the -DLAMMPS_JPEG or -DLAMMPS_PNG switches discussed above in Step
4, since in that case JPEG/PNG output will be disabled.
</P>
<P>A standard JPEG library usually goes by the name libjpeg.a or
libjpeg.so and has an associated header file jpeglib.h. Whichever
JPEG library you have on your platform, you'll need to set the
appropriate JPG_INC, JPG_PATH, and JPG_LIB variables, so that the
compiler and linker can find it.
</P>
<P>A standard PNG library usually goes by the name libpng.a or libpng.so
and has an associated header file png.h. Whichever PNG library you
have on your platform, you'll need to set the appropriate JPG_INC,
JPG_PATH, and JPG_LIB variables, so that the compiler and linker can
find it.
</P>
<P>As before, if these header and library files are in the usual place on
your machine, you may not need to set these variables.
</P>
<P><B>Step 8</B>
</P>
<P>Note that by default only a few of LAMMPS optional packages are
installed. To build LAMMPS with optional packages, see <A HREF = "#start_3">this
section</A> below, before proceeding to Step 9.
</P>
<P><B>Step 9</B>
</P>
<P>That's it. Once you have a correct Makefile.foo, and you have
pre-built any other needed libraries (e.g. MPI, FFT, etc) all you need
to do from the src directory is type something like this:
</P>
<PRE>make foo
or
gmake foo
</PRE>
<P>You should get the executable lmp_foo when the build is complete.
</P>
<HR>
<A NAME = "start_2_3"></A><B><I>Errors that can occur when making LAMMPS:</I></B>
<P>IMPORTANT NOTE: If an error occurs when building LAMMPS, the compiler
or linker will state very explicitly what the problem is. The error
message should give you a hint as to which of the steps above has
failed, and what you need to do in order to fix it. Building a code
with a Makefile is a very logical process. The compiler and linker
need to find the appropriate files and those files need to be
compatible with LAMMPS source files. When a make fails, there is
usually a very simple reason, which you or a local expert will need to
fix.
</P>
<P>Here are two non-obvious errors that can occur:
</P>
<P>(1) If the make command breaks immediately with errors that indicate
it can't find files with a "*" in their names, this can be because
your machine's native make doesn't support wildcard expansion in a
makefile. Try gmake instead of make. If that doesn't work, try using
a -f switch with your make command to use a pre-generated
Makefile.list which explicitly lists all the needed files, e.g.
</P>
<PRE>make makelist
make -f Makefile.list linux
gmake -f Makefile.list mac
</PRE>
<P>The first "make" command will create a current Makefile.list with all
the file names in your src dir. The 2nd "make" command (make or
gmake) will use it to build LAMMPS. Note that you should
include/exclude any desired optional packages before using the "make
makelist" command.
</P>
<P>(2) If you get an error that says something like 'identifier "atoll"
is undefined', then your machine does not support "long long"
integers. Try using the -DLAMMPS_LONGLONG_TO_LONG setting described
above in Step 4.
</P>
<HR>
<A NAME = "start_2_4"></A><B><I>Additional build tips:</I></B>
<P>(1) Building LAMMPS for multiple platforms.
</P>
<P>You can make LAMMPS for multiple platforms from the same src
directory. Each target creates its own object sub-directory called
Obj_target where it stores the system-specific *.o files.
</P>
<P>(2) Cleaning up.
</P>
<P>Typing "make clean-all" or "make clean-machine" will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.
</P>
<P>(3) Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL
</P>
<P>As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.
</P>
<P>The default is -DLAMMPS_SMALLBIG which allows for systems with up to
2^63 atoms and 2^63 timesteps (about 9e18). The atom limit is for
atomic systems which do not store bond topology info and thus do not
require atom IDs. If you use atom IDs for atomic systems (which is
the default) or if you use a molecular model, which stores bond
topology info and thus requires atom IDs, the limit is 2^31 atoms
(about 2 billion). This is because the IDs are stored in 32-bit
integers.
</P>
<P>Likewise, with this setting, the 3 image flags for each atom (see the
<A HREF = "dump.html">dump</A> doc page for a discussion) are stored in a 32-bit
integer, which means the atoms can only wrap around a periodic box (in
each dimension) at most 512 times. If atoms move through the periodic
box more than this many times, the image flags will "roll over",
e.g. from 511 to -512, which can cause diagnostics like the
mean-squared displacement, as calculated by the <A HREF = "compute_msd.html">compute
msd</A> command, to be faulty.
</P>
<P>To allow for larger atomic systems with atom IDs or larger molecular
systems or larger image flags, compile with -DLAMMPS_BIGBIG. This
stores atom IDs and image flags in 64-bit integers. This enables
atomic or molecular systems with atom IDS of up to 2^63 atoms (about
9e18). And image flags will not "roll over" until they reach 2^20 =
1048576.
</P>
<P>If your system does not support 8-byte integers, you will need to
compile with the -DLAMMPS_SMALLSMALL setting. This will restrict the
total number of atoms (for atomic or molecular systems) and timesteps
to 2^31 (about 2 billion). Image flags will roll over at 2^9 = 512.
</P>
<P>Note that in src/lmptype.h there are definitions of all these data
types as well as the MPI data types associated with them. The MPI
types need to be consistent with the associated C data types, or else
LAMMPS will generate a run-time error. As far as we know, the
settings defined in src/lmptype.h are portable and work on every
current system.
</P>
<P>In all cases, the size of problem that can be run on a per-processor
basis is limited by 4-byte integer storage to 2^31 atoms per processor
(about 2 billion). This should not normally be a limitation since such
a problem would have a huge per-processor memory footprint due to
neighbor lists and would run very slowly in terms of CPU secs/timestep.
</P>
<HR>
<A NAME = "start_2_5"></A><B><I>Building for a Mac:</I></B>
<P>OS X is BSD Unix, so it should just work. See the
src/MAKE/MACHINES/Makefile.mac and Makefile.mac_mpi files.
</P>
<HR>
<A NAME = "start_2_6"></A><B><I>Building for Windows:</I></B>
<P>The LAMMPS download page has an option to download both a serial and
parallel pre-built Windows executable. See the <A HREF = "#start_6">Running
LAMMPS</A> section for instructions on running these executables
on a Windows box.
</P>
<P>The pre-built executables hosted on the <A HREF = "http://lammps.sandia.gov/download.html">LAMMPS download
page</A> are built with a subset
of the available packages; see the download page for the list. These
are single executable files. No examples or documentation in
included. You will need to download the full source code package to
obtain those.
</P>
<P>As an alternative, you can download "daily builds" (and some older
versions) of the installer packages from
<A HREF = "http://rpm.lammps.org/windows.html">rpm.lammps.org/windows.html</A>.
These executables are built with most optional packages and the
download includes documentation, some tools and most examples.
</P>
<P>If you want a Windows version with specific packages included and
excluded, you can build it yourself.
</P>
<P>One way to do this is install and use cygwin to build LAMMPS with a
standard unix style make program, just as you would on a Linux box;
see src/MAKE/MACHINES/Makefile.cygwin.
</P>
<P>The other way to do this is using Visual Studio and project files.
See the src/WINDOWS directory and its README.txt file for instructions
on both a basic build and a customized build with pacakges you select.
</P>
<HR>
<H4><A NAME = "start_3"></A>2.3 Making LAMMPS with optional packages
</H4>
<P>This section has the following sub-sections:
</P>
<UL><LI><A HREF = "#start_3_1">Package basics</A>
<LI><A HREF = "#start_3_2">Including/excluding packages</A>
<LI><A HREF = "#start_3_3">Packages that require extra libraries</A>
<LI><A HREF = "#start_3_4">Packages that require Makefile.machine settings</A>
</UL>
<P>Note that the following <A HREF = "#start_4">Section 2.4</A> describes the Make.py
tool which can be used to install/un-install packages and build the
auxiliary libraries which some of them use. It can also auto-edit a
Makefile.machine to add settings needed by some packages.
</P>
<HR>
<A NAME = "start_3_1"></A><B><I>Package basics:</I></B>
<P>The source code for LAMMPS is structured as a set of core files which
are always included, plus optional packages. Packages are groups of
files that enable a specific set of features. For example, force
fields for molecular systems or granular systems are in packages.
</P>
<P>You can see the list of all packages by typing "make package" from
within the src directory of the LAMMPS distribution. This also lists
various make commands that can be used to manipulate packages.
</P>
<P>If you use a command in a LAMMPS input script that is specific to a
particular package, you must have built LAMMPS with that package, else
you will get an error that the style is invalid or the command is
unknown. Every command's doc page specfies if it is part of a
package. You can also type
</P>
<PRE>lmp_machine -h
</PRE>
<P>to run your executable with the optional <A HREF = "#start_7">-h command-line
switch</A> for "help", which will list the styles and commands
known to your executable.
</P>
<P>There are two kinds of packages in LAMMPS, standard and user packages.
More information about the contents of standard and user packages is
given in <A HREF = "Section_packages.html">Section_packages</A> of the manual. The
difference between standard and user packages is as follows:
</P>
<P>Standard packages are supported by the LAMMPS developers and are
written in a syntax and style consistent with the rest of LAMMPS.
This means we will answer questions about them, debug and fix them if
necessary, and keep them compatible with future changes to LAMMPS.
</P>
<P>User packages have been contributed by users, and always begin with
the user prefix. If they are a single command (single file), they are
typically in the user-misc package. Otherwise, they are a a set of
files grouped together which add a specific functionality to the code.
</P>
<P>User packages don't necessarily meet the requirements of the standard
packages. If you have problems using a feature provided in a user
package, you will likely need to contact the contributor directly to
get help. Information on how to submit additions you make to LAMMPS
as a user-contributed package is given in <A HREF = "Section_modify.html#mod_15">this
section</A> of the documentation.
</P>
<P>Some packages (both standard and user) require additional libraries.
See more details below.
</P>
<HR>
<A NAME = "start_3_2"></A><B><I>Including/excluding packages:</I></B>
<P>To use or not use a package you must include or exclude it before
building LAMMPS. From the src directory, this is typically as simple
as:
</P>
<PRE>make yes-colloid
make g++
</PRE>
<P>or
</P>
<PRE>make no-manybody
make g++
</PRE>
<P>IMPORTANT NOTE: You should NOT include/exclude packages and build
LAMMPS in a single make command by using multiple targets, e.g. make
yes-colloid g++. This is because the make procedure creates a list of
source files that will be out-of-date for the build if the package
configuration changes during the same command.
</P>
<P>Some packages have individual files that depend on other packages
being included. LAMMPS checks for this and does the right thing.
I.e. individual files are only included if their dependencies are
already included. Likewise, if a package is excluded, other files
dependent on that package are also excluded.
</P>
<P>If you will never run simulations that use the features in a
particular packages, there is no reason to include it in your build.
For some packages, this will keep you from having to build auxiliary
libraries (see below), and will also produce a smaller executable
which may run a bit faster.
</P>
<P>When you download a LAMMPS tarball, these packages are pre-installed
in the src directory: KSPACE, MANYBODY,MOLECULE. When you download
LAMMPS source files from the SVN or Git repositories, no packages are
pre-installed.
</P>
<P>Packages are included or excluded by typing "make yes-name" or "make
no-name", where "name" is the name of the package in lower-case, e.g.
name = kspace for the KSPACE package or name = user-atc for the
USER-ATC package. You can also type "make yes-standard", "make
no-standard", "make yes-std", "make no-std", "make yes-user", "make
no-user", "make yes-all" or "make no-all" to include/exclude various
sets of packages. Type "make package" to see the all of the
package-related make options.
</P>
<P>IMPORTANT NOTE: Inclusion/exclusion of a package works by simply
moving files back and forth between the main src directory and
sub-directories with the package name (e.g. src/KSPACE, src/USER-ATC),
so that the files are seen or not seen when LAMMPS is built. After
you have included or excluded a package, you must re-build LAMMPS.
</P>
<P>Additional package-related make options exist to help manage LAMMPS
files that exist in both the src directory and in package
sub-directories. You do not normally need to use these commands
unless you are editing LAMMPS files or have downloaded a patch from
the LAMMPS WWW site.
</P>
<P>Typing "make package-update" or "make pu" will overwrite src files
with files from the package sub-directories if the package has been
included. It should be used after a patch is installed, since patches
only update the files in the package sub-directory, but not the src
files. Typing "make package-overwrite" will overwrite files in the
package sub-directories with src files.
</P>
<P>Typing "make package-status" or "make ps" will show which packages are
currently included. Of those that are included, it will list files
that are different in the src directory and package sub-directory.
Typing "make package-diff" lists all differences between these files.
Again, type "make package" to see all of the package-related make
options.
</P>
<HR>
<A NAME = "start_3_3"></A><B><I>Packages that require extra libraries:</I></B>
<P>A few of the standard and user packages require additional auxiliary
libraries. Most of them are provided with LAMMPS, in which case they
must be compiled first, before LAMMPS is built if you wish to include
that package. If you get a LAMMPS build error about a missing
library, this is likely the reason. See the
<A HREF = "Section_packages.html">Section_packages</A> doc page for a list of
packages that have these kinds of auxiliary libraries.
</P>
<P>The lib directory in the distribution has sub-directories with package
names that correspond to the needed auxiliary libs, e.g. lib/reax.
Each sub-directory has a README file that gives more details. Code
for most of the auxiliary libraries is included in that directory.
Examples are the USER-ATC and MEAM packages.
</P>
<P>A few of the lib sub-directories do not include code, but do include
instructions and sometimes scripts that automate the process of
downloading the auxiliary library and installing it so LAMMPS can link
to it. Examples are the KIM and VORONOI and USER-MOLFILE and USER-SMD
packages.
</P>
<P>The lib/python directory (for the PYTHON package) contains only a
choice of Makefile.lammps.* files. This is because no auxiliary code
or libraries are needed, only the Python library and other system libs
that already available on your system. However, the Makefile.lammps
file is needed to tell the LAMMPS build which libs to use and where to
find them.
</P>
<P>For libraries with provided code, the sub-directory README file
(e.g. lib/reax/README) has instructions on how to build that library.
Typically this is done by typing something like:
</P>
<PRE>make -f Makefile.g++
</PRE>
<P>If one of the provided Makefiles is not appropriate for your system
you will need to edit or add one. Note that all the Makefiles have a
setting for EXTRAMAKE at the top that specifies a Makefile.lammps.*
file.
</P>
<P>If the library build is successful, it will produce 2 files in the lib
directory:
</P>
<PRE>libpackage.a
Makefile.lammps
</PRE>
<P>The Makefile.lammps file will be a copy of the EXTRAMAKE file setting
specified in the library Makefile.* you used.
</P>
<P>Note that you must insure that the settings in Makefile.lammps are
appropriate for your system. If they are not, the LAMMPS build will
fail.
</P>
<P>As explained in the lib/package/README files, the settings in
Makefile.lammps are used to specify additional system libraries and
their locations so that LAMMPS can build with the auxiliary library.
For example, if the MEAM or REAX packages are used, the auxiliary
libraries consist of F90 code, built with a Fortran complier. To link
that library with LAMMPS (a C++ code) via whatever C++ compiler LAMMPS
is built with, typically requires additional Fortran-to-C libraries be
included in the link. Another example are the BLAS and LAPACK
libraries needed to use the USER-ATC or USER-AWPMD packages.
</P>
<P>For libraries without provided code, the sub-directory README file has
information on where to download the library and how to build it,
e.g. lib/voronoi/README and lib/smd/README. The README files also
describe how you must either (a) create soft links, via the "ln"
command, in those directories to point to where you built or installed
the packages, or (b) check or edit the Makefile.lammps file in the
same directory to provide that information.
</P>
<P>Some of the sub-directories, e.g. lib/voronoi, also have an install.py
script which can be used to automate the process of
downloading/building/installing the auxiliary library, and setting the
needed soft links. Type "python install.py" for further instructions.
</P>
<P>As with the sub-directories containing library code, if the soft links
or settings in the lib/package/Makefile.lammps files are not correct,
the LAMMPS build will typically fail.
</P>
<HR>
<A NAME = "start_3_4"></A><B><I>Packages that require Makefile.machine settings</I></B>
<P>A few packages require specific settings in Makefile.machine, to
either build or use the package effectively. These are the
USER-INTEL, KOKKOS, USER-OMP, and OPT packages. The details of what
flags to add or what variables to define are given on the doc pages
that describe each of these accelerator packages in detail:
</P>
<UL><LI><A HREF = "accelerate_intel.html">USER-INTEL package</A>
<LI><A HREF = "accelerate_kokkos.html">KOKKOS package</A>
<LI><A HREF = "accelerate_omp.html">USER-OMP package</A>
<LI><A HREF = "accelerate_opt.html">OPT package</A>
</UL>
<P>Here is a brief summary of what Makefile.machine changes are needed.
Note that the Make.py tool, described in the next <A HREF = "#start_4">Section
2.4</A> can automatically add the needed info to an existing
machine Makefile, using simple command-line arguments.
</P>
<P>In src/MAKE/OPTIONS see the following Makefiles for examples of the
changes described below:
</P>
<UL><LI>Makefile.intel_cpu
<LI>Makefile.intel_phi
<LI>Makefile.kokkos_omp
<LI>Makefile.kokkos_cuda
<LI>Makefile.kokkos_phi
<LI>Makefile.omp
</UL>
<P>For the USER-INTEL package, you have 2 choices when building. You can
build with CPU or Phi support. The latter uses Xeon Phi chips in
"offload" mode. Each of these modes requires additional settings in
your Makefile.machine for CCFLAGS and LINKFLAGS.
</P>
<P>For CPU mode (if using an Intel compiler):
</P>
<UL><LI>CCFLAGS: add -fopenmp, -DLAMMPS_MEMALIGN=64, -restrict, -xHost, -fno-alias, -ansi-alias, -override-limits
<LI>LINKFLAGS: add -fopenmp
</UL>
<P>For Phi mode add the following in addition to the CPU mode flags:
</P>
<UL><LI>CCFLAGS: add -DLMP_INTEL_OFFLOAD and
<LI>LINKFLAGS: add -offload
</UL>
<P>And also add this to CCFLAGS:
</P>
<PRE>-offload-option,mic,compiler,"-fp-model fast=2 -mGLOB_default_function_attrs=\"gather_scatter_loop_unroll=4\""
</PRE>
<P>For the KOKKOS package, you have 3 choices when building. You can
build with OMP or Cuda or Phi support. Phi support uses Xeon Phi
chips in "native" mode. This can be done by setting the following
variables in your Makefile.machine:
</P>
<UL><LI>for OMP support, set OMP = yes
<LI>for Cuda support, set OMP = yes and CUDA = yes
<LI>for Phi support, set OMP = yes and MIC = yes
</UL>
<P>These can also be set as additional arguments to the make command, e.g.
</P>
<PRE>make g++ OMP=yes MIC=yes
</PRE>
<P>Building the KOKKOS package with CUDA support requires a Makefile
machine that uses the NVIDIA "nvcc" compiler, as well as an
appropriate "arch" setting appropriate to the GPU hardware and NVIDIA
software you have on your machine. See
src/MAKE/OPTIONS/Makefile.kokkos_cuda for an example of such a machine
Makefile.
</P>
<P>For the USER-OMP package, your Makefile.machine needs additional
settings for CCFLAGS and LINKFLAGS.
</P>
<UL><LI>CCFLAGS: add -fopenmp and -restrict
<LI>LINKFLAGS: add -fopenmp
</UL>
<P>For the OPT package, your Makefile.machine needs an additional
settings for CCFLAGS.
</P>
<UL><LI>CCFLAGS: add -restrict
</UL>
<HR>
<H4><A NAME = "start_4"></A>2.4 Building LAMMPS via the Make.py script
</H4>
<P>The src directory includes a Make.py script, written in Python, which
can be used to automate various steps of the build process. It is
particularly useful for working with the accelerator packages, as well
as other packages which require auxiliary libraries to be built.
</P>
<P>The goal of the Make.py tool is to allow any complex multi-step LAMMPS
build to be performed as a single Make.py command. And you can
archive the commands, so they can be re-invoked later via the -r
(redo) switch. If you find some LAMMPS build procedure that can't be
done in a single Make.py command, let the developers know, and we'll
see if we can augment the tool.
</P>
<P>You can run Make.py from the src directory by typing either:
</P>
<PRE>Make.py -h
python Make.py -h
</PRE>
<P>which will give you help info about the tool. For the former to work,
you may need to edit the first line of Make.py to point to your local
Python. And you may need to insure the script is executable:
</P>
<PRE>chmod +x Make.py
</PRE>
<P>Here are examples of build tasks you can perform with Make.py:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD >Install/uninstall packages</TD><TD > Make.py -p no-lib kokkos omp intel</TD></TR>
<TR><TD >Build specific auxiliary libs</TD><TD > Make.py -a lib-atc lib-meam</TD></TR>
<TR><TD >Build libs for all installed packages</TD><TD > Make.py -p cuda gpu -gpu mode=double arch=31 -a lib-all</TD></TR>
<TR><TD >Create a Makefile from scratch with compiler and MPI settings</TD><TD > Make.py -m none -cc g++ -mpi mpich -a file</TD></TR>
<TR><TD >Augment Makefile.serial with settings for installed packages</TD><TD > Make.py -p intel -intel cpu -m serial -a file</TD></TR>
<TR><TD >Add JPG and FFTW support to Makefile.mpi</TD><TD > Make.py -m mpi -jpg -fft fftw -a file</TD></TR>
<TR><TD >Build LAMMPS with a parallel make using Makefile.mpi</TD><TD > Make.py -j 16 -m mpi -a exe</TD></TR>
<TR><TD >Build LAMMPS and libs it needs using Makefile.serial with accelerator settings</TD><TD > Make.py -p gpu intel -intel cpu -a lib-all file serial
</TD></TR></TABLE></DIV>
<P>The bench and examples directories give Make.py commands that can be
used to build LAMMPS with the various packages and options needed to
run all the benchmark and example input scripts. See these files for
more details:
</P>
<UL><LI>bench/README
<LI>bench/FERMI/README
<LI>bench/KEPLER/README
<LI>bench/PHI/README
<LI>examples/README
<LI>examples/accelerate/README
<LI>examples/accelerate/make.list
</UL>
<P>All of the Make.py options and syntax help can be accessed by using
the "-h" switch.
</P>
<P>E.g. typing "Make.py -h" gives
</P>
<PRE>Syntax: Make.py switch args ...
switches can be listed in any order
help switch:
-h prints help and syntax for all other specified switches
switch for actions:
-a lib-all, lib-dir, clean, file, exe or machine
list one or more actions, in any order
machine is a Makefile.machine suffix, must be last if used
one-letter switches:
-d (dir), -j (jmake), -m (makefile), -o (output),
-p (packages), -r (redo), -s (settings), -v (verbose)
switches for libs:
-atc, -awpmd, -colvars, -cuda
-gpu, -meam, -poems, -qmmm, -reax
switches for build and makefile options:
-intel, -kokkos, -cc, -mpi, -fft, -jpg, -png
</PRE>
<P>Using the "-h" switch with other switches and actions gives additional
info on all the other specified switches or actions. The "-h" can be
anywhere in the command-line and the other switches do not need their
arguments. E.g. type "Make.py -h -d -atc -intel" will print:
</P>
<PRE>-d dir
dir = LAMMPS home dir
if -d not specified, working dir must be lammps/src
</PRE>
<PRE>-atc make=suffix lammps=suffix2
all args are optional and can be in any order
make = use Makefile.suffix (def = g++)
lammps = use Makefile.lammps.suffix2 (def = EXTRAMAKE in makefile)
</PRE>
<PRE>-intel mode
mode = cpu or phi (def = cpu)
build Intel package for CPU or Xeon Phi
</PRE>
<P>Note that Make.py never overwrites an existing Makefile.machine.
Instead, it creates src/MAKE/MINE/Makefile.auto, which you can save or
rename if desired. Likewise it creates an executable named
src/lmp_auto, which you can rename using the -o switch if desired.
</P>
<P>The most recently executed Make.py commmand is saved in
src/Make.py.last. You can use the "-r" switch (for redo) to re-invoke
the last command, or you can save a sequence of one or more Make.py
commands to a file and invoke the file of commands using "-r". You
can also label the commands in the file and invoke one or more of them
by name.
</P>
<P>A typical use of Make.py is to start with a valid Makefile.machine for
your system, that works for a vanilla LAMMPS build, i.e. when optional
packages are not installed. You can then use Make.py to add various
settings (FFT, JPG, PNG) to the Makefile.machine as well as change its
compiler and MPI options. You can also add additional packages to the
build, as well as build the needed supporting libraries.
</P>
<P>You can also use Make.py to create a new Makefile.machine from
scratch, using the "-m none" switch, if you also specify what compiler
and MPI options to use, via the "-cc" and "-mpi" switches.
</P>
<HR>
<H4><A NAME = "start_5"></A>2.5 Building LAMMPS as a library
</H4>
<P>LAMMPS can be built as either a static or shared library, which can
then be called from another application or a scripting language. See
<A HREF = "Section_howto.html#howto_10">this section</A> for more info on coupling
LAMMPS to other codes. See <A HREF = "Section_python.html">this section</A> for
more info on wrapping and running LAMMPS from Python.
</P>
<H5><B>Static library:</B>
</H5>
<P>To build LAMMPS as a static library (*.a file on Linux), type
</P>
<PRE>make foo mode=lib
</PRE>
<P>where foo is the machine name. This kind of library is typically used
to statically link a driver application to LAMMPS, so that you can
insure all dependencies are satisfied at compile time. This will use
the ARCHIVE and ARFLAGS settings in src/MAKE/Makefile.foo. The build
will create the file liblammps_foo.a which another application can
link to. It will also create a soft link liblammps.a, which will
point to the most recently built static library.
</P>
<H5><B>Shared library:</B>
</H5>
<P>To build LAMMPS as a shared library (*.so file on Linux), which can be
dynamically loaded, e.g. from Python, type
</P>
<PRE>make foo mode=shlib
</PRE>
<P>where foo is the machine name. This kind of library is required when
wrapping LAMMPS with Python; see <A HREF = "Section_python.html">Section_python</A>
for details. This will use the SHFLAGS and SHLIBFLAGS settings in
src/MAKE/Makefile.foo and perform the build in the directory
Obj_shared_foo. This is so that each file can be compiled with the
-fPIC flag which is required for inclusion in a shared library. The
build will create the file liblammps_foo.so which another application
can link to dyamically. It will also create a soft link liblammps.so,
which will point to the most recently built shared library. This is
the file the Python wrapper loads by default.
</P>
<P>Note that for a shared library to be usable by a calling program, all
the auxiliary libraries it depends on must also exist as shared
libraries. This will be the case for libraries included with LAMMPS,
such as the dummy MPI library in src/STUBS or any package libraries in
lib/packages, since they are always built as shared libraries using
the -fPIC switch. However, if a library like MPI or FFTW does not
exist as a shared library, the shared library build will generate an
error. This means you will need to install a shared library version
of the auxiliary library. The build instructions for the library
should tell you how to do this.
</P>
<P>Here is an example of such errors when the system FFTW or provided
lib/colvars library have not been built as shared libraries:
</P>
<PRE>/usr/bin/ld: /usr/local/lib/libfftw3.a(mapflags.o): relocation
R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/usr/local/lib/libfftw3.a: could not read symbols: Bad value
</PRE>
<PRE>/usr/bin/ld: ../../lib/colvars/libcolvars.a(colvarmodule.o):
relocation R_X86_64_32 against `__pthread_key_create' can not be used
when making a shared object; recompile with -fPIC
../../lib/colvars/libcolvars.a: error adding symbols: Bad value
</PRE>
<P>As an example, here is how to build and install the <A HREF = "http://www-unix.mcs.anl.gov/mpi">MPICH
library</A>, a popular open-source version of MPI, distributed by
Argonne National Labs, as a shared library in the default
/usr/local/lib location:
</P>
<PRE>./configure --enable-shared
make
make install
</PRE>
<P>You may need to use "sudo make install" in place of the last line if
you do not have write privileges for /usr/local/lib. The end result
should be the file /usr/local/lib/libmpich.so.
</P>
<H5><B>Additional requirement for using a shared library:</B>
</H5>
<P>The operating system finds shared libraries to load at run-time using
the environment variable LD_LIBRARY_PATH. So you may wish to copy the
file src/liblammps.so or src/liblammps_g++.so (for example) to a place
the system can find it by default, such as /usr/local/lib, or you may
wish to add the LAMMPS src directory to LD_LIBRARY_PATH, so that the
current version of the shared library is always available to programs
that use it.
</P>
<P>For the csh or tcsh shells, you would add something like this to your
~/.cshrc file:
</P>
<PRE>setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/sjplimp/lammps/src
</PRE>
<H5><B>Calling the LAMMPS library:</B>
</H5>
<P>Either flavor of library (static or shared) allows one or more LAMMPS
objects to be instantiated from the calling program.
</P>
<P>When used from a C++ program, all of LAMMPS is wrapped in a LAMMPS_NS
namespace; you can safely use any of its classes and methods from
within the calling code, as needed.
</P>
<P>When used from a C or Fortran program or a scripting language like
Python, the library has a simple function-style interface, provided in
src/library.cpp and src/library.h.
</P>
<P>See the sample codes in examples/COUPLE/simple for examples of C++ and
C and Fortran codes that invoke LAMMPS thru its library interface.
There are other examples as well in the COUPLE directory which are
discussed in <A HREF = "Section_howto.html#howto_10">Section_howto 10</A> of the
manual. See <A HREF = "Section_python.html">Section_python</A> of the manual for a
description of the Python wrapper provided with LAMMPS that operates
through the LAMMPS library interface.
</P>
<P>The files src/library.cpp and library.h define the C-style API for
using LAMMPS as a library. See <A HREF = "Section_howto.html#howto_19">Section_howto
19</A> of the manual for a description of the
interface and how to extend it for your needs.
</P>
<HR>
<H4><A NAME = "start_6"></A>2.6 Running LAMMPS
</H4>
<P>By default, LAMMPS runs by reading commands from standard input. Thus
if you run the LAMMPS executable by itself, e.g.
</P>
<PRE>lmp_linux
</PRE>
<P>it will simply wait, expecting commands from the keyboard. Typically
you should put commands in an input script and use I/O redirection,
e.g.
</P>
<PRE>lmp_linux < in.file
</PRE>
<P>For parallel environments this should also work. If it does not, use
the '-in' command-line switch, e.g.
</P>
<PRE>lmp_linux -in in.file
</PRE>
<P><A HREF = "Section_commands.html">This section</A> describes how input scripts are
structured and what commands they contain.
</P>
<P>You can test LAMMPS on any of the sample inputs provided in the
examples or bench directory. Input scripts are named in.* and sample
outputs are named log.*.name.P where name is a machine and P is the
number of processors it was run on.
</P>
<P>Here is how you might run a standard Lennard-Jones benchmark on a
Linux box, using mpirun to launch a parallel job:
</P>
<PRE>cd src
make linux
cp lmp_linux ../bench
cd ../bench
mpirun -np 4 lmp_linux < in.lj
</PRE>
<P>See <A HREF = "http://lammps.sandia.gov/bench.html">this page</A> for timings for this and the other benchmarks on
various platforms. Note that some of the example scripts require
LAMMPS to be built with one or more of its optional packages.
</P>
<HR>
<P>On a Windows box, you can skip making LAMMPS and simply download an
executable, as described above, though the pre-packaged executables
include only certain packages.
</P>
<P>To run a LAMMPS executable on a Windows machine, first decide whether
you want to download the non-MPI (serial) or the MPI (parallel)
version of the executable. Download and save the version you have
chosen.
</P>
<P>For the non-MPI version, follow these steps:
</P>
<UL><LI>Get a command prompt by going to Start->Run... ,
then typing "cmd".
<LI>Move to the directory where you have saved lmp_win_no-mpi.exe
(e.g. by typing: cd "Documents").
<LI>At the command prompt, type "lmp_win_no-mpi -in in.lj", replacing in.lj
with the name of your LAMMPS input script.
</UL>
<P>For the MPI version, which allows you to run LAMMPS under Windows on
multiple processors, follow these steps:
</P>
<UL><LI>Download and install
<A HREF = "http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads">MPICH2</A>
for Windows.
<LI>You'll need to use the mpiexec.exe and smpd.exe files from the MPICH2
package. Put them in same directory (or path) as the LAMMPS Windows
executable.
<LI>Get a command prompt by going to Start->Run... ,
then typing "cmd".
<LI>Move to the directory where you have saved lmp_win_mpi.exe
(e.g. by typing: cd "Documents").
<LI>Then type something like this: "mpiexec -localonly 4 lmp_win_mpi -in
in.lj", replacing in.lj with the name of your LAMMPS input script.
<LI>Note that you may need to provide smpd with a passphrase (it doesn't
matter what you type).
<LI>In this mode, output may not immediately show up on the screen, so if
your input script takes a long time to execute, you may need to be
patient before the output shows up. :l Alternatively, you can still
use this executable to run on a single processor by typing something
like: "lmp_win_mpi -in in.lj".
</UL>
<HR>
<P>The screen output from LAMMPS is described in the next section. As it
runs, LAMMPS also writes a log.lammps file with the same information.
</P>
<P>Note that this sequence of commands copies the LAMMPS executable
(lmp_linux) to the directory with the input files. This may not be
necessary, but some versions of MPI reset the working directory to
where the executable is, rather than leave it as the directory where
you launch mpirun from (if you launch lmp_linux on its own and not
under mpirun). If that happens, LAMMPS will look for additional input
files and write its output files to the executable directory, rather
than your working directory, which is probably not what you want.
</P>
<P>If LAMMPS encounters errors in the input script or while running a
simulation it will print an ERROR message and stop or a WARNING
message and continue. See <A HREF = "Section_errors.html">Section_errors</A> for a
discussion of the various kinds of errors LAMMPS can or can't detect,
a list of all ERROR and WARNING messages, and what to do about them.
</P>
<P>LAMMPS can run a problem on any number of processors, including a
single processor. In theory you should get identical answers on any
number of processors and on any machine. In practice, numerical
round-off can cause slight differences and eventual divergence of
molecular dynamics phase space trajectories.
</P>
<P>LAMMPS can run as large a problem as will fit in the physical memory
of one or more processors. If you run out of memory, you must run on
more processors or setup a smaller problem.
</P>
<HR>
<H4><A NAME = "start_7"></A>2.7 Command-line options
</H4>
<P>At run time, LAMMPS recognizes several optional command-line switches
which may be used in any order. Either the full word or a one-or-two
letter abbreviation can be used:
</P>
<UL><LI>-c or -cuda
<LI>-e or -echo
<LI>-h or -help
<LI>-i or -in
<LI>-k or -kokkos
<LI>-l or -log
<LI>-nc or -nocite
<LI>-pk or -package
<LI>-p or -partition
<LI>-pl or -plog
<LI>-ps or -pscreen
<LI>-r or -restart
<LI>-ro or -reorder
<LI>-sc or -screen
<LI>-sf or -suffix
<LI>-v or -var
</UL>
<P>For example, lmp_ibm might be launched as follows:
</P>
<PRE>mpirun -np 16 lmp_ibm -v f tmp.out -l my.log -sc none < in.alloy
mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none < in.alloy
</PRE>
<P>Here are the details on the options:
</P>
<PRE>-cuda on/off
</PRE>
<P>Explicitly enable or disable CUDA support, as provided by the
USER-CUDA package. Even if LAMMPS is built with this package, as
described above in <A HREF = "#start_3">Section 2.3</A>, this switch must be set to
enable running with the CUDA-enabled styles the package provides. If
the switch is not set (the default), LAMMPS will operate as if the
USER-CUDA package were not installed; i.e. you can run standard LAMMPS
or with the GPU package, for testing or benchmarking purposes.
</P>
<PRE>-echo style
</PRE>
<P>Set the style of command echoing. The style can be <I>none</I> or <I>screen</I>
or <I>log</I> or <I>both</I>. Depending on the style, each command read from
the input script will be echoed to the screen and/or logfile. This
can be useful to figure out which line of your script is causing an
input error. The default value is <I>log</I>. The echo style can also be
set by using the <A HREF = "echo.html">echo</A> command in the input script itself.
</P>
<PRE>-help
</PRE>
<P>Print a brief help summary and a list of options compiled into this
executable for each LAMMPS style (atom_style, fix, compute,
pair_style, bond_style, etc). This can tell you if the command you
want to use was included via the appropriate package at compile time.
LAMMPS will print the info and immediately exit if this switch is
used.
</P>
<PRE>-in file
</PRE>
<P>Specify a file to use as an input script. This is an optional switch
when running LAMMPS in one-partition mode. If it is not specified,
LAMMPS reads its script from standard input, typically from a script
via I/O redirection; e.g. lmp_linux < in.run. I/O redirection should
also work in parallel, but if it does not (in the unlikely case that
an MPI implementation does not support it), then use the -in flag.
Note that this is a required switch when running LAMMPS in
multi-partition mode, since multiple processors cannot all read from
stdin.
</P>
<PRE>-kokkos on/off keyword/value ...
</PRE>
<P>Explicitly enable or disable KOKKOS support, as provided by the KOKKOS
package. Even if LAMMPS is built with this package, as described
above in <A HREF = "#start_3">Section 2.3</A>, this switch must be set to enable
running with the KOKKOS-enabled styles the package provides. If the
switch is not set (the default), LAMMPS will operate as if the KOKKOS
package were not installed; i.e. you can run standard LAMMPS or with
the GPU or USER-CUDA or USER-OMP packages, for testing or benchmarking
purposes.
</P>
<P>Additional optional keyword/value pairs can be specified which
determine how Kokkos will use the underlying hardware on your
platform. These settings apply to each MPI task you launch via the
"mpirun" or "mpiexec" command. You may choose to run one or more MPI
tasks per physical node. Note that if you are running on a desktop
machine, you typically have one physical node. On a cluster or
supercomputer there may be dozens or 1000s of physical nodes.
</P>
<P>Either the full word or an abbreviation can be used for the keywords.
Note that the keywords do not use a leading minus sign. I.e. the
keyword is "t", not "-t". Also note that each of the keywords has a
default setting. Example of when to use these options and what
settings to use on different platforms is given in <A HREF = "Section_accelerate.html#acc_8">Section
5.8</A>.
</P>
<UL><LI>d or device
<LI>g or gpus
<LI>t or threads
<LI>n or numa
</UL>
<PRE>device Nd
</PRE>
<P>This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and if you are running with only one
MPI task per node. The Nd setting is the ID of the GPU on the node to
run on. By default Nd = 0. If you have multiple GPUs per node, they
have consecutive IDs numbered as 0,1,2,etc. This setting allows you
to launch multiple independent jobs on the node, each with a single
MPI task per node, and assign each job to run on a different GPU.
</P>
<PRE>gpus Ng Ns
</PRE>
<P>This option is only relevant if you built LAMMPS with CUDA=yes, you
have more than one GPU per node, and you are running with multiple MPI
tasks per node (up to one per GPU). The Ng setting is how many GPUs
you will use. The Ns setting is optional. If set, it is the ID of a
GPU to skip when assigning MPI tasks to GPUs. This may be useful if
your desktop system reserves one GPU to drive the screen and the rest
are intended for computational work like running LAMMPS. By default
Ng = 1 and Ns is not set.
</P>
<P>Depending on which flavor of MPI you are running, LAMMPS will look for
one of these 3 environment variables
</P>
<PRE>SLURM_LOCALID (various MPI variants compiled with SLURM support)
MV2_COMM_WORLD_LOCAL_RANK (Mvapich)
OMPI_COMM_WORLD_LOCAL_RANK (OpenMPI)
</PRE>
<P>which are initialized by the "srun", "mpirun" or "mpiexec" commands.
The environment variable setting for each MPI rank is used to assign a
unique GPU ID to the MPI task.
</P>
<PRE>threads Nt
</PRE>
<P>This option assigns Nt number of threads to each MPI task for
performing work when Kokkos is executing in OpenMP or pthreads mode.
The default is Nt = 1, which essentially runs in MPI-only mode. If
there are Np MPI tasks per physical node, you generally want Np*Nt =
the number of physical cores per node, to use your available hardware
optimally. This also sets the number of threads used by the host when
LAMMPS is compiled with CUDA=yes.
</P>
<PRE>numa Nm
</PRE>
<P>This option is only relevant when using pthreads with hwloc support.
In this case Nm defines the number of NUMA regions (typicaly sockets)
on a node which will be utilizied by a single MPI rank. By default Nm
= 1. If this option is used the total number of worker-threads per
MPI rank is threads*numa. Currently it is always almost better to
assign at least one MPI rank per NUMA region, and leave numa set to
its default value of 1. This is because letting a single process span
multiple NUMA regions induces a significant amount of cross NUMA data
traffic which is slow.
</P>
<PRE>-log file
</PRE>
<P>Specify a log file for LAMMPS to write status information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
file log.lammps. If this switch is used, LAMMPS writes to the
specified file. In multi-partition mode, if the switch is not used, a
log.lammps file is created with hi-level status information. Each
partition also writes to a log.lammps.N file where N is the partition
ID. If the switch is specified in multi-partition mode, the hi-level
logfile is named "file" and each partition also logs information to a
file.N. For both one-partition and multi-partition mode, if the
specified file is "none", then no log files are created. Using a
<A HREF = "log.html">log</A> command in the input script will override this setting.
Option -plog will override the name of the partition log files file.N.
</P>
<PRE>-nocite
</PRE>
<P>Disable writing the log.cite file which is normally written to list
references for specific cite-able features used during a LAMMPS run.
See the <A HREF = "http://lammps.sandia.gov/cite.html">citation page</A> for more
details.
</P>
<PRE>-package style args ....
</PRE>
<P>Invoke the <A HREF = "package.html">package</A> command with style and args. The
syntax is the same as if the command appeared at the top of the input
script. For example "-package gpu 2" or "-pk gpu 2" is the same as
<A HREF = "package.html">package gpu 2</A> in the input script. The possible styles
and args are documented on the <A HREF = "package.html">package</A> doc page. This
switch can be used multiple times, e.g. to set options for the
USER-INTEL and USER-OMP packages which can be used together.
</P>
<P>Along with the "-suffix" command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.
</P>
<PRE>-partition 8x2 4 5 ...
</PRE>
<P>Invoke LAMMPS in multi-partition mode. When LAMMPS is run on P
processors and this switch is not used, LAMMPS runs in one partition,
i.e. all P processors run a single simulation. If this switch is
used, the P processors are split into separate partitions and each
partition runs its own simulation. The arguments to the switch
specify the number of processors in each partition. Arguments of the
form MxN mean M partitions, each with N processors. Arguments of the
form N mean a single partition with N processors. The sum of
processors in all partitions must equal P. Thus the command
"-partition 8x2 4 5" has 10 partitions and runs on a total of 25
processors.
</P>
<P>Running with multiple partitions can e useful for running
<A HREF = "Section_howto.html#howto_5">multi-replica simulations</A>, where each
replica runs on on one or a few processors. Note that with MPI
installed on a machine (e.g. your desktop), you can run on more
(virtual) processors than you have physical processors.
</P>
<P>To run multiple independent simulatoins from one input script, using
multiple partitions, see <A HREF = "Section_howto.html#howto_4">Section_howto 4</A>
of the manual. World- and universe-style <A HREF = "variable.html">variables</A>
are useful in this context.
</P>
<PRE>-plog file
</PRE>
<P>Specify the base name for the partition log files, so partition N
writes log information to file.N. If file is none, then no partition
log files are created. This overrides the filename specified in the
-log command-line option. This option is useful when working with
large numbers of partitions, allowing the partition log files to be
suppressed (-plog none) or placed in a sub-directory (-plog
replica_files/log.lammps) If this option is not used the log file for
partition N is log.lammps.N or whatever is specified by the -log
command-line option.
</P>
<PRE>-pscreen file
</PRE>
<P>Specify the base name for the partition screen file, so partition N
writes screen information to file.N. If file is none, then no
partition screen files are created. This overrides the filename
specified in the -screen command-line option. This option is useful
when working with large numbers of partitions, allowing the partition
screen files to be suppressed (-pscreen none) or placed in a
sub-directory (-pscreen replica_files/screen). If this option is not
used the screen file for partition N is screen.N or whatever is
specified by the -screen command-line option.
</P>
<PRE>-restart restartfile <I>remap</I> datafile keyword value ...
</PRE>
<P>Convert the restart file into a data file and immediately exit. This
is the same operation as if the following 2-line input script were
run:
</P>
<PRE>read_restart restartfile <I>remap</I>
write_data datafile keyword value ...
</PRE>
<P>Note that the specified restartfile and datafile can have wild-card
characters ("*",%") as described by the
<A HREF = "read_restart.html">read_restart</A> and <A HREF = "write_data.html">write_data</A>
commands. But a filename such as file.* will need to be enclosed in
quotes to avoid shell expansion of the "*" character.
</P>
<P>Note that following restartfile, the optional flag <I>remap</I> can be
used. This has the same effect as adding it to the
<A HREF = "read_restart.html">read_restart</A> command, as explained on its doc
page. This is only useful if the reading of the restart file triggers
an error that atoms have been lost. In that case, use of the remap
flag should allow the data file to still be produced.
</P>
<P>Also note that following datafile, the same optional keyword/value
pairs can be listed as used by the <A HREF = "write_data.html">write_data</A>
command.
</P>
<PRE>-reorder nth N
-reorder custom filename
</PRE>
<P>Reorder the processors in the MPI communicator used to instantiate
LAMMPS, in one of several ways. The original MPI communicator ranks
all P processors from 0 to P-1. The mapping of these ranks to
physical processors is done by MPI before LAMMPS begins. It may be
useful in some cases to alter the rank order. E.g. to insure that
cores within each node are ranked in a desired order. Or when using
the <A HREF = "run_style.html">run_style verlet/split</A> command with 2 partitions
to insure that a specific Kspace processor (in the 2nd partition) is
matched up with a specific set of processors in the 1st partition.
See the <A HREF = "Section_accelerate.html">Section_accelerate</A> doc pages for
more details.
</P>
<P>If the keyword <I>nth</I> is used with a setting <I>N</I>, then it means every
Nth processor will be moved to the end of the ranking. This is useful
when using the <A HREF = "run_style.html">run_style verlet/split</A> command with 2
partitions via the -partition command-line switch. The first set of
processors will be in the first partition, the 2nd set in the 2nd
partition. The -reorder command-line switch can alter this so that
the 1st N procs in the 1st partition and one proc in the 2nd partition
will be ordered consecutively, e.g. as the cores on one physical node.
This can boost performance. For example, if you use "-reorder nth 4"
and "-partition 9 3" and you are running on 12 processors, the
processors will be reordered from
</P>
<PRE>0 1 2 3 4 5 6 7 8 9 10 11
</PRE>
<P>to
</P>
<PRE>0 1 2 4 5 6 8 9 10 3 7 11
</PRE>
<P>so that the processors in each partition will be
</P>
<PRE>0 1 2 4 5 6 8 9 10
3 7 11
</PRE>
<P>See the "processors" command for how to insure processors from each
partition could then be grouped optimally for quad-core nodes.
</P>
<P>If the keyword is <I>custom</I>, then a file that specifies a permutation
of the processor ranks is also specified. The format of the reorder
file is as follows. Any number of initial blank or comment lines
(starting with a "#" character) can be present. These should be
followed by P lines of the form:
</P>
<PRE>I J
</PRE>
<P>where P is the number of processors LAMMPS was launched with. Note
that if running in multi-partition mode (see the -partition switch
above) P is the total number of processors in all partitions. The I
and J values describe a permutation of the P processors. Every I and
J should be values from 0 to P-1 inclusive. In the set of P I values,
every proc ID should appear exactly once. Ditto for the set of P J
values. A single I,J pairing means that the physical processor with
rank I in the original MPI communicator will have rank J in the
reordered communicator.
</P>
<P>Note that rank ordering can also be specified by many MPI
implementations, either by environment variables that specify how to
order physical processors, or by config files that specify what
physical processors to assign to each MPI rank. The -reorder switch
simply gives you a portable way to do this without relying on MPI
itself. See the <A HREF = "processors">processors out</A> command for how to output
info on the final assignment of physical processors to the LAMMPS
simulation domain.
</P>
<PRE>-screen file
</PRE>
<P>Specify a file for LAMMPS to write its screen information to. In
one-partition mode, if the switch is not used, LAMMPS writes to the
screen. If this switch is used, LAMMPS writes to the specified file
instead and you will see no screen output. In multi-partition mode,
if the switch is not used, hi-level status information is written to
the screen. Each partition also writes to a screen.N file where N is
the partition ID. If the switch is specified in multi-partition mode,
the hi-level screen dump is named "file" and each partition also
writes screen information to a file.N. For both one-partition and
multi-partition mode, if the specified file is "none", then no screen
output is performed. Option -pscreen will override the name of the
partition screen files file.N.
</P>
<PRE>-suffix style
</PRE>
<P>Use variants of various styles if they exist. The specified style can
be <I>cuda</I>, <I>gpu</I>, <I>intel</I>, <I>kk</I>, <I>omp</I>, or <I>opt</I>. These refer to
optional packages that LAMMPS can be built with, as described above in
<A HREF = "#start_3">Section 2.3</A>. The "cuda" style corresponds to the USER-CUDA
package, the "gpu" style to the GPU package, the "intel" style to the
USER-INTEL package, the "kk" style to the KOKKOS package, the "opt"
style to the OPT package, and the "omp" style to the USER-OMP package.
</P>
<P>Along with the "-package" command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without
having to edit an input script.
</P>
<P>As an example, all of the packages provide a <A HREF = "pair_lj.html">pair_style
lj/cut</A> variant, with style names lj/cut/cuda,
lj/cut/gpu, lj/cut/intel, lj/cut/kk, lj/cut/omp, and lj/cut/opt. A
variant style can be specified explicitly in your input script,
e.g. pair_style lj/cut/gpu. If the -suffix switch is used the
specified suffix (cuda,gpu,intel,kk,omp,opt) is automatically appended
whenever your input script command creates a new
<A HREF = "atom_style.html">atom</A>, <A HREF = "pair_style.html">pair</A>, <A HREF = "fix.html">fix</A>,
<A HREF = "compute.html">compute</A>, or <A HREF = "run_style.html">run</A> style. If the variant
version does not exist, the standard version is created.
</P>
<P>For the GPU package, using this command-line switch also invokes the
default GPU settings, as if the command "package gpu 1" were used at
the top of your input script. These settings can be changed by using
the "-package gpu" command-line switch or the <A HREF = "package.html">package
gpu</A> command in your script.
</P>
<P>For the USER-INTEL package, using this command-line switch also
invokes the default USER-INTEL settings, as if the command "package
intel 1" were used at the top of your input script. These settings
can be changed by using the "-package intel" command-line switch or
the <A HREF = "package.html">package intel</A> command in your script. If the
USER-OMP package is also installed, the intel suffix will make the omp
suffix a second choice, if a requested style is not available in the
USER-INTEL package. It will also invoke the default USER-OMP
settings, as if the command "package omp 0" were used at the top of
your input script. These settings can be changed by using the
"-package omp" command-line switch or the <A HREF = "package.html">package omp</A>
command in your script.
</P>
<P>For the KOKKOS package, using this command-line switch also invokes
the default KOKKOS settings, as if the command "package kokkos" were
used at the top of your input script. These settings can be changed
by using the "-package kokkos" command-line switch or the <A HREF = "package.html">package
kokkos</A> command in your script.
</P>
<P>For the OMP package, using this command-line switch also invokes the
default OMP settings, as if the command "package omp 0" were used at
the top of your input script. These settings can be changed by using
the "-package omp" command-line switch or the <A HREF = "package.html">package
omp</A> command in your script.
</P>
<P>The <A HREF = "suffix.html">suffix</A> command can also be used within an input
script to set a suffix, or to turn off or back on any suffix setting
made via the command line.
</P>
<PRE>-var name value1 value2 ...
</PRE>
<P>Specify a variable that will be defined for substitution purposes when
the input script is read. This switch can be used multiple times to
define multiple variables. "Name" is the variable name which can be a
single character (referenced as $x in the input script) or a full
string (referenced as ${abc}). An <A HREF = "variable.html">index-style
variable</A> will be created and populated with the
subsequent values, e.g. a set of filenames. Using this command-line
option is equivalent to putting the line "variable name index value1
value2 ..." at the beginning of the input script. Defining an index
variable as a command-line argument overrides any setting for the same
index variable in the input script, since index variables cannot be
re-defined. See the <A HREF = "variable.html">variable</A> command for more info on
defining index and other kinds of variables and <A HREF = "Section_commands.html#cmd_2">this
section</A> for more info on using variables
in input scripts.
</P>
<P>NOTE: Currently, the command-line parser looks for arguments that
start with "-" to indicate new switches. Thus you cannot specify
multiple variable values if any of they start with a "-", e.g. a
negative numeric value. It is OK if the first value1 starts with a
"-", since it is automatically skipped.
</P>
<HR>
<H4><A NAME = "start_8"></A>2.8 LAMMPS screen output
</H4>
<P>As LAMMPS reads an input script, it prints information to both the
screen and a log file about significant actions it takes to setup a
simulation. When the simulation is ready to begin, LAMMPS performs
various initializations and prints the amount of memory (in MBytes per
processor) that the simulation requires. It also prints details of
the initial thermodynamic state of the system. During the run itself,
thermodynamic information is printed periodically, every few
timesteps. When the run concludes, LAMMPS prints the final
thermodynamic state and a total run time for the simulation. It then
appends statistics about the CPU time and storage requirements for the
simulation. An example set of statistics is shown here:
</P>
<PRE>Loop time of 49.002 on 2 procs for 2004 atoms
</PRE>
<PRE>Pair time (%) = 35.0495 (71.5267)
Bond time (%) = 0.092046 (0.187841)
Kspce time (%) = 6.42073 (13.103)
Neigh time (%) = 2.73485 (5.5811)
Comm time (%) = 1.50291 (3.06703)
Outpt time (%) = 0.013799 (0.0281601)
Other time (%) = 2.13669 (4.36041)
</PRE>
<PRE>Nlocal: 1002 ave, 1015 max, 989 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Nghost: 8720 ave, 8724 max, 8716 min
Histogram: 1 0 0 0 0 0 0 0 0 1
Neighs: 354141 ave, 361422 max, 346860 min
Histogram: 1 0 0 0 0 0 0 0 0 1
</PRE>
<PRE>Total # of neighbors = 708282
Ave neighs/atom = 353.434
Ave special neighs/atom = 2.34032
Number of reneighborings = 42
Dangerous reneighborings = 2
</PRE>
<P>The first section gives the breakdown of the CPU run time (in seconds)
into major categories. The second section lists the number of owned
atoms (Nlocal), ghost atoms (Nghost), and pair-wise neighbors stored
per processor. The max and min values give the spread of these values
across processors with a 10-bin histogram showing the distribution.
The total number of histogram counts is equal to the number of
processors.
</P>
<P>The last section gives aggregate statistics for pair-wise neighbors
and special neighbors that LAMMPS keeps track of (see the
<A HREF = "special_bonds.html">special_bonds</A> command). The number of times
neighbor lists were rebuilt during the run is given as well as the
number of potentially "dangerous" rebuilds. If atom movement
triggered neighbor list rebuilding (see the
<A HREF = "neigh_modify.html">neigh_modify</A> command), then dangerous
reneighborings are those that were triggered on the first timestep
atom movement was checked for. If this count is non-zero you may wish
to reduce the delay factor to insure no force interactions are missed
by atoms moving beyond the neighbor skin distance before a rebuild
takes place.
</P>
<P>If an energy minimization was performed via the
<A HREF = "minimize.html">minimize</A> command, additional information is printed,
e.g.
</P>
<PRE>Minimization stats:
E initial, next-to-last, final = -0.895962 -2.94193 -2.94342
Gradient 2-norm init/final= 1920.78 20.9992
Gradient inf-norm init/final= 304.283 9.61216
Iterations = 36
Force evaluations = 177
</PRE>
<P>The first line lists the initial and final energy, as well as the
energy on the next-to-last iteration. The next 2 lines give a measure
of the gradient of the energy (force on all atoms). The 2-norm is the
"length" of this force vector; the inf-norm is the largest component.
The last 2 lines are statistics on how many iterations and
force-evaluations the minimizer required. Multiple force evaluations
are typically done at each iteration to perform a 1d line minimization
in the search direction.
</P>
<P>If a <A HREF = "kspace_style.html">kspace_style</A> long-range Coulombics solve was
performed during the run (PPPM, Ewald), then additional information is
printed, e.g.
</P>
<PRE>FFT time (% of Kspce) = 0.200313 (8.34477)
FFT Gflps 3d 1d-only = 2.31074 9.19989
</PRE>
<P>The first line gives the time spent doing 3d FFTs (4 per timestep) and
the fraction it represents of the total KSpace time (listed above).
Each 3d FFT requires computation (3 sets of 1d FFTs) and communication
(transposes). The total flops performed is 5Nlog_2(N), where N is the
number of points in the 3d grid. The FFTs are timed with and without
the communication and a Gflop rate is computed. The 3d rate is with
communication; the 1d rate is without (just the 1d FFTs). Thus you
can estimate what fraction of your FFT time was spent in
communication, roughly 75% in the example above.
</P>
<HR>
<H4><A NAME = "start_9"></A>2.9 Tips for users of previous LAMMPS versions
</H4>
<P>The current C++ began with a complete rewrite of LAMMPS 2001, which
was written in F90. Features of earlier versions of LAMMPS are listed
in <A HREF = "Section_history.html">Section_history</A>. The F90 and F77 versions
(2001 and 99) are also freely distributed as open-source codes; check
the <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> for distribution information if you prefer
those versions. The 99 and 2001 versions are no longer under active
development; they do not have all the features of C++ LAMMPS.
</P>
<P>If you are a previous user of LAMMPS 2001, these are the most
significant changes you will notice in C++ LAMMPS:
</P>
<P>(1) The names and arguments of many input script commands have
changed. All commands are now a single word (e.g. read_data instead
of read data).
</P>
<P>(2) All the functionality of LAMMPS 2001 is included in C++ LAMMPS,
but you may need to specify the relevant commands in different ways.
</P>
<P>(3) The format of the data file can be streamlined for some problems.
See the <A HREF = "read_data.html">read_data</A> command for details. The data file
section "Nonbond Coeff" has been renamed to "Pair Coeff" in C++ LAMMPS.
</P>
<P>(4) Binary restart files written by LAMMPS 2001 cannot be read by C++
LAMMPS with a <A HREF = "read_restart.html">read_restart</A> command. This is
because they were output by F90 which writes in a different binary
format than C or C++ writes or reads. Use the <I>restart2data</I> tool
provided with LAMMPS 2001 to convert the 2001 restart file to a text
data file. Then edit the data file as necessary before using the C++
LAMMPS <A HREF = "read_data.html">read_data</A> command to read it in.
</P>
<P>(5) There are numerous small numerical changes in C++ LAMMPS that mean
you will not get identical answers when comparing to a 2001 run.
However, your initial thermodynamic energy and MD trajectory should be
close if you have setup the problem for both codes the same.
</P>
</HTML>
diff --git a/doc/doc2/dump.html b/doc/doc2/dump.html
index 05256568a..08d97ed84 100644
--- a/doc/doc2/dump.html
+++ b/doc/doc2/dump.html
@@ -1,622 +1,649 @@
<HTML>
<CENTER> <A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>dump command
</H3>
+<H3><A HREF = "dump_h5md.html">dump h5md</A> command
+</H3>
<H3><A HREF = "dump_image.html">dump image</A> command
</H3>
<H3><A HREF = "dump_image.html">dump movie</A> command
</H3>
<H3><A HREF = "dump_molfile.html">dump molfile</A> command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>dump ID group-ID style N file args
</PRE>
<UL><LI>ID = user-assigned name for the dump
<LI>group-ID = ID of the group of atoms to be dumped
-<LI>style = <I>atom</I> or <I>atom/mpiio</I> or <I>cfg</I> or <I>cfg/mpiio</I> or <I>dcd</I> or <I>xtc</I> or <I>xyz</I> or <I>xyz/mpiio</I> or <I>image</I> or <I>movie</I> or <I>molfile</I> or <I>local</I> or <I>custom</I> or <I>custom/mpiio</I>
+<LI>style = <I>atom</I> or <I>atom/gz</I> or <I>atom/mpiio</I> or <I>cfg</I> or <I>cfg/gz</I> or <I>cfg/mpiio</I> or <I>dcd</I> or <I>xtc</I> or <I>xyz</I> or <I>xyz/gz</I> or <I>xyz/mpiio</I> or <I>h5md</I> or <I>image</I> or <I>movie</I> or <I>molfile</I> or <I>local</I> or <I>custom</I> or <I>custom/gz</I> or <I>custom/mpiio</I>
<LI>N = dump every this many timesteps
<LI>file = name of file to write dump info to
<LI>args = list of arguments for a particular style
<PRE> <I>atom</I> args = none
+ <I>atom/gz</I> args = none
<I>atom/mpiio</I> args = none
<I>cfg</I> args = same as <I>custom</I> args, see below
+ <I>cfg/gz</I> args = same as <I>custom</I> args, see below
<I>cfg/mpiio</I> args = same as <I>custom</I> args, see below
<I>dcd</I> args = none
<I>xtc</I> args = none
<I>xyz</I> args = none
</PRE>
+<PRE> <I>xyz/gz</I> args = none
+</PRE>
<PRE> <I>xyz/mpiio</I> args = none
</PRE>
+<PRE> <I>h5md</I> args = discussed on <A HREF = "dump_h5md.html">dump h5md</A> doc page
+</PRE>
<PRE> <I>image</I> args = discussed on <A HREF = "dump_image.html">dump image</A> doc page
</PRE>
<PRE> <I>movie</I> args = discussed on <A HREF = "dump_image.html">dump image</A> doc page
</PRE>
<PRE> <I>molfile</I> args = discussed on <A HREF = "dump_molfile.html">dump molfile</A> doc page
</PRE>
<PRE> <I>local</I> args = list of local attributes
possible attributes = index, c_ID, c_ID[N], f_ID, f_ID[N]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID[N] = Nth column of local array calculated by a compute with ID
f_ID = local vector calculated by a fix with ID
f_ID[N] = Nth column of local array calculated by a fix with ID
</PRE>
-<PRE> <I>custom</I> or <I>custom/mpiio</I> args = list of atom attributes
+<PRE> <I>custom</I> or <I>custom/gz</I> or <I>custom/mpiio</I> args = list of atom attributes
possible attributes = id, mol, proc, procp1, type, element, mass,
x, y, z, xs, ys, zs, xu, yu, zu,
xsu, ysu, zsu, ix, iy, iz,
vx, vy, vz, fx, fy, fz,
q, mux, muy, muz, mu,
radius, diameter, omegax, omegay, omegaz,
angmomx, angmomy, angmomz, tqx, tqy, tqz,
c_ID, c_ID[N], f_ID, f_ID[N], v_name
</PRE>
<PRE> id = atom ID
mol = molecule ID
proc = ID of processor that owns atom
procp1 = ID+1 of processor that owns atom
type = atom type
element = name of atom element, as defined by <A HREF = "dump_modify.html">dump_modify</A> command
mass = atom mass
x,y,z = unscaled atom coordinates
xs,ys,zs = scaled atom coordinates
xu,yu,zu = unwrapped atom coordinates
xsu,ysu,zsu = scaled unwrapped atom coordinates
ix,iy,iz = box image that the atom is in
vx,vy,vz = atom velocities
fx,fy,fz = forces on atoms
q = atom charge
mux,muy,muz = orientation of dipole moment of atom
mu = magnitude of dipole moment of atom
radius,diameter = radius,diameter of spherical particle
omegax,omegay,omegaz = angular velocity of spherical particle
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[N] = Nth column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>dump myDump all atom 100 dump.atom
dump myDump all atom/mpiio 100 dump.atom.mpiio
+dump myDump all atom/gz 100 dump.atom.gz
dump 2 subgroup atom 50 dump.run.bin
dump 2 subgroup atom 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
dump snap all cfg 100 dump.config.*.cfg mass type xs ys zs id type c_Stress[2]
dump 1 all xtc 1000 file.xtc
</PRE>
<P><B>Description:</B>
</P>
<P>Dump a snapshot of atom quantities to one or more files every N
timesteps in one of several styles. The <I>image</I> and <I>movie</I> styles are
the exception: the <I>image</I> style renders a JPG, PNG, or PPM image file
of the atom configuration every N timesteps while the <I>movie</I> style
combines and compresses them into a movie file; both are discussed in
detail on the <A HREF = "dump_image.html">dump image</A> doc page. The timesteps on
which dump output is written can also be controlled by a variable.
See the <A HREF = "dump_modify.html">dump_modify every</A> command.
</P>
<P>Only information for atoms in the specified group is dumped. The
<A HREF = "dump_modify.html">dump_modify thresh and region</A> commands can also
alter what atoms are included. Not all styles support all these
options; see details below.
</P>
<P>As described below, the filename determines the kind of output (text
or binary or gzipped, one big file or one per timestep, one big file
or multiple smaller files).
</P>
<P>IMPORTANT NOTE: Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
box.
</P>
<P>IMPORTANT NOTE: Unless the <A HREF = "dump_modify.html">dump_modify sort</A> option
is invoked, the lines of atom information written to dump files
(typically one line per atom) will be in an indeterminate order for
each snapshot. This is even true when running on a single processor,
if the <A HREF = "atom_modify.html">atom_modify sort</A> option is on, which it is
by default. In this case atoms are re-ordered periodically during a
simulation, due to spatial sorting. It is also true when running in
parallel, because data for a single snapshot is collected from
multiple processors, each of which owns a subset of the atoms.
</P>
<P>For the <I>atom</I>, <I>custom</I>, <I>cfg</I>, and <I>local</I> styles, sorting is off by
default. For the <I>dcd</I>, <I>xtc</I>, <I>xyz</I>, and <I>molfile</I> styles, sorting by
atom ID is on by default. See the <A HREF = "dump_modify.html">dump_modify</A> doc
page for details.
</P>
+<P>The <I>atom/gz</I>, <I>cfg/gz</I>, <I>custom/gz</I>, and <I>xyz/gz</I> styles are identical
+in command syntax to the corresponding styles without "gz", however,
+they generate compressed files using the zlib library. Thus the filename
+suffix ".gz" is mandatory. This is an alternative approach to writing
+compressed files via a pipe, as done by the regular dump styles, which
+may be required on clusters where the interface to the high-speed network
+disallows using the fork() library call (which is needed for a pipe).
+For the remainder of this doc page, you should thus consider the <I>atom</I>
+and <I>atom/gz</I> styles (etc) to be inter-changeable, with the exception
+of the required filename suffix.
+</P>
<P>As explained below, the <I>atom/mpiio</I>, <I>cfg/mpiio</I>, <I>custom/mpiio</I>, and
<I>xyz/mpiio</I> styles are identical in command syntax and in the format
of the dump files they create, to the corresponding styles without
"mpiio", except the single dump file they produce is written in
parallel via the MPI-IO library. For the remainder of this doc page,
you should thus consider the <I>atom</I> and <I>atom/mpiio</I> styles (etc) to
be inter-changeable. The one exception is how the filename is
specified for the MPI-IO styles, as explained below.
</P>
<HR>
<P>The <I>style</I> keyword determines what atom quantities are written to the
file and in what format. Settings made via the
<A HREF = "dump_modify.html">dump_modify</A> command can also alter the format of
individual values and the file itself.
</P>
<P>The <I>atom</I>, <I>local</I>, and <I>custom</I> styles create files in a simple text
format that is self-explanatory when viewing a dump file. Many of the
LAMMPS <A HREF = "Section_tools.html">post-processing tools</A>, including
<A HREF = "http://www.sandia.gov/~sjplimp/pizza.html">Pizza.py</A>, work with this
format, as does the <A HREF = "rerun.html">rerun</A> command.
</P>
<P>For post-processing purposes the <I>atom</I>, <I>local</I>, and <I>custom</I> text
files are self-describing in the following sense.
</P>
<P>The dimensions of the simulation box are included in each snapshot.
For an orthogonal simulation box this information is is formatted as:
</P>
<PRE>ITEM: BOX BOUNDS xx yy zz
xlo xhi
ylo yhi
zlo zhi
</PRE>
<P>where xlo,xhi are the maximum extents of the simulation box in the
x-dimension, and similarly for y and z. The "xx yy zz" represent 6
characters that encode the style of boundary for each of the 6
simulation box boundaries (xlo,xhi and ylo,yhi and zlo,zhi). Each of
the 6 characters is either p = periodic, f = fixed, s = shrink wrap,
or m = shrink wrapped with a minimum value. See the
<A HREF = "boundary.html">boundary</A> command for details.
</P>
<P>For triclinic simulation boxes (non-orthogonal), an orthogonal
bounding box which encloses the triclinic simulation box is output,
along with the 3 tilt factors (xy, xz, yz) of the triclinic box,
formatted as follows:
</P>
<PRE>ITEM: BOX BOUNDS xy xz yz xx yy zz
xlo_bound xhi_bound xy
ylo_bound yhi_bound xz
zlo_bound zhi_bound yz
</PRE>
<P>The presence of the text "xy xz yz" in the ITEM line indicates that
the 3 tilt factors will be included on each of the 3 following lines.
This bounding box is convenient for many visualization programs. The
meaning of the 6 character flags for "xx yy zz" is the same as above.
</P>
<P>Note that the first two numbers on each line are now xlo_bound instead
of xlo, etc, since they repesent a bounding box. See <A HREF = "Section_howto.html#howto_12">this
section</A> of the doc pages for a geometric
description of triclinic boxes, as defined by LAMMPS, simple formulas
for how the 6 bounding box extents (xlo_bound,xhi_bound,etc) are
calculated from the triclinic parameters, and how to transform those
parameters to and from other commonly used triclinic representations.
</P>
<P>The "ITEM: ATOMS" line in each snapshot lists column descriptors for
the per-atom lines that follow. For example, the descriptors would be
"id type xs ys zs" for the default <I>atom</I> style, and would be the atom
attributes you specify in the dump command for the <I>custom</I> style.
</P>
<P>For style <I>atom</I>, atom coordinates are written to the file, along with
the atom ID and atom type. By default, atom coords are written in a
scaled format (from 0 to 1). I.e. an x value of 0.25 means the atom
is at a location 1/4 of the distance from xlo to xhi of the box
boundaries. The format can be changed to unscaled coords via the
<A HREF = "dump_modify.html">dump_modify</A> settings. Image flags can also be
added for each atom via dump_modify.
</P>
<P>Style <I>custom</I> allows you to specify a list of atom attributes to be
written to the dump file for each atom. Possible attributes are
listed above and will appear in the order specified. You cannot
specify a quantity that is not defined for a particular simulation -
such as <I>q</I> for atom style <I>bond</I>, since that atom style doesn't
assign charges. Dumps occur at the very end of a timestep, so atom
attributes will include effects due to fixes that are applied during
the timestep. An explanation of the possible dump custom attributes
is given below.
</P>
<P>For style <I>local</I>, local output generated by <A HREF = "compute.html">computes</A>
and <A HREF = "fix.html">fixes</A> is used to generate lines of output that is
written to the dump file. This local data is typically calculated by
each processor based on the atoms it owns, but there may be zero or
more entities per atom, e.g. a list of bond distances. An explanation
of the possible dump local attributes is given below. Note that by
using input from the <A HREF = "compute_property_local.html">compute
property/local</A> command with dump local,
it is possible to generate information on bonds, angles, etc that can
be cut and pasted directly into a data file read by the
<A HREF = "read_data.html">read_data</A> command.
</P>
<P>Style <I>cfg</I> has the same command syntax as style <I>custom</I> and writes
extended CFG format files, as used by the
<A HREF = "http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</A> visualization
package. Since the extended CFG format uses a single snapshot of the
system per file, a wildcard "*" must be included in the filename, as
discussed below. The list of atom attributes for style <I>cfg</I> must
begin with either "mass type xs ys zs" or "mass type xsu ysu zsu"
since these quantities are needed to write the CFG files in the
appropriate format (though the "mass" and "type" fields do not appear
explicitly in the file). Any remaining attributes will be stored as
"auxiliary properties" in the CFG files. Note that you will typically
want to use the <A HREF = "dump_modify.html">dump_modify element</A> command with
CFG-formatted files, to associate element names with atom types, so
that AtomEye can render atoms appropriately. When unwrapped
coordinates <I>xsu</I>, <I>ysu</I>, and <I>zsu</I> are requested, the nominal AtomEye
periodic cell dimensions are expanded by a large factor UNWRAPEXPAND =
10.0, which ensures atoms that are displayed correctly for up to
UNWRAPEXPAND/2 periodic boundary crossings in any direction. Beyond
this, AtomEye will rewrap the unwrapped coordinates. The expansion
causes the atoms to be drawn farther away from the viewer, but it is
easy to zoom the atoms closer, and the interatomic distances are
unaffected.
</P>
<P>The <I>dcd</I> style writes DCD files, a standard atomic trajectory format
used by the CHARMM, NAMD, and XPlor molecular dynamics packages. DCD
files are binary and thus may not be portable to different machines.
The number of atoms per snapshot cannot change with the <I>dcd</I> style.
The <I>unwrap</I> option of the <A HREF = "dump_modify.html">dump_modify</A> command
allows DCD coordinates to be written "unwrapped" by the image flags
for each atom. Unwrapped means that if the atom has passed through
a periodic boundary one or more times, the value is printed for what
the coordinate would be if it had not been wrapped back into the
periodic box. Note that these coordinates may thus be far outside
the box size stored with the snapshot.
</P>
<P>The <I>xtc</I> style writes XTC files, a compressed trajectory format used
by the GROMACS molecular dynamics package, and described
<A HREF = "http://manual.gromacs.org/current/online/xtc.html">here</A>.
The precision used in XTC files can be adjusted via the
<A HREF = "dump_modify.html">dump_modify</A> command. The default value of 1000
means that coordinates are stored to 1/1000 nanometer accuracy. XTC
files are portable binary files written in the NFS XDR data format,
so that any machine which supports XDR should be able to read them.
The number of atoms per snapshot cannot change with the <I>xtc</I> style.
The <I>unwrap</I> option of the <A HREF = "dump_modify.html">dump_modify</A> command allows
XTC coordinates to be written "unwrapped" by the image flags for each
atom. Unwrapped means that if the atom has passed thru a periodic
boundary one or more times, the value is printed for what the
coordinate would be if it had not been wrapped back into the periodic
box. Note that these coordinates may thus be far outside the box size
stored with the snapshot.
</P>
<P>The <I>xyz</I> style writes XYZ files, which is a simple text-based
coordinate format that many codes can read. Specifically it has
a line with the number of atoms, then a comment line that is
usually ignored followed by one line per atom with the atom type
and the x-, y-, and z-coordinate of that atom. You can use the
<A HREF = "dump_modify.html">dump_modify element</A> option to change the output
from using the (numerical) atom type to an element name (or some
other label). This will help many visualization programs to guess
bonds and colors.
</P>
<P>Note that <I>atom</I>, <I>custom</I>, <I>dcd</I>, <I>xtc</I>, and <I>xyz</I> style dump files
can be read directly by <A HREF = "http://www.ks.uiuc.edu/Research/vmd">VMD</A>, a
popular molecular viewing program. See <A HREF = "Section_tools.html#vmd">Section
tools</A> of the manual and the
tools/lmp2vmd/README.txt file for more information about support in
VMD for reading and visualizing LAMMPS dump files.
</P>
<HR>
<P>Dumps are performed on timesteps that are a multiple of N (including
timestep 0) and on the last timestep of a minimization if the
minimization converges. Note that this means a dump will not be
performed on the initial timestep after the dump command is invoked,
if the current timestep is not a multiple of N. This behavior can be
changed via the <A HREF = "dump_modify.html">dump_modify first</A> command, which
can also be useful if the dump command is invoked after a minimization
ended on an arbitrary timestep. N can be changed between runs by
using the <A HREF = "dump_modify.html">dump_modify every</A> command (not allowed
for <I>dcd</I> style). The <A HREF = "dump_modify.html">dump_modify every</A> command
also allows a variable to be used to determine the sequence of
timesteps on which dump files are written. In this mode a dump on the
first timestep of a run will also not be written unless the
<A HREF = "dump_modify.html">dump_modify first</A> command is used.
</P>
<P>The specified filename determines how the dump file(s) is written.
The default is to write one large text file, which is opened when the
dump command is invoked and closed when an <A HREF = "undump.html">undump</A>
command is used or when LAMMPS exits. For the <I>dcd</I> and <I>xtc</I> styles,
this is a single large binary file.
</P>
<P>Dump filenames can contain two wildcard characters. If a "*"
character appears in the filename, then one file per snapshot is
written and the "*" character is replaced with the timestep value.
For example, tmp.dump.* becomes tmp.dump.0, tmp.dump.10000,
tmp.dump.20000, etc. This option is not available for the <I>dcd</I> and
<I>xtc</I> styles. Note that the <A HREF = "dump_modify.html">dump_modify pad</A>
command can be used to insure all timestep numbers are the same length
(e.g. 00010), which can make it easier to read a series of dump files
in order with some post-processing tools.
</P>
<P>If a "%" character appears in the filename, then each of P processors
writes a portion of the dump file, and the "%" character is replaced
with the processor ID from 0 to P-1. For example, tmp.dump.% becomes
tmp.dump.0, tmp.dump.1, ... tmp.dump.P-1, etc. This creates smaller
files and can be a fast mode of output on parallel machines that
support parallel I/O for output. This option is not available for the
<I>dcd</I>, <I>xtc</I>, and <I>xyz</I> styles.
</P>
<P>By default, P = the number of processors meaning one file per
processor, but P can be set to a smaller value via the <I>nfile</I> or
<I>fileper</I> keywords of the <A HREF = "dump_modify.html">dump_modify</A> command.
These options can be the most efficient way of writing out dump files
when running on large numbers of processors.
</P>
<P>Note that using the "*" and "%" characters together can produce a
large number of small dump files!
</P>
<P>For the <I>atom/mpiio</I>, <I>cfg/mpiio</I>, <I>custom/mpiio</I>, and <I>xyz/mpiio</I>
styles, a single dump file is written in parallel via the MPI-IO
library, which is part of the MPI standard for versions 2.0 and above.
Using MPI-IO requires two steps. First, build LAMMPS with its MPIIO
package installed, e.g.
</P>
<PRE>make yes-mpiio # installs the MPIIO package
make g++ # build LAMMPS for your platform
</PRE>
<P>Second, use a dump filename which contains ".mpiio". Note that it
does not have to end in ".mpiio", just contain those characters.
Unlike MPI-IO restart files, which must be both written and read using
MPI-IO, the dump files produced by these MPI-IO styles are identical
in format to the files produced by their non-MPI-IO style
counterparts. This means you can write a dump file using MPI-IO and
use the <A HREF = "read_dump.html">read_dump</A> command or perform other
post-processing, just as if the dump file was not written using
MPI-IO.
</P>
<P>Note that MPI-IO dump files are one large file which all processors
write to. You thus cannot use the "%" wildcard character described
above in the filename since that specifies generation of multiple
files. You can use the ".bin" suffix described below in an MPI-IO
dump file; again this file will be written in parallel and have the
same binary format as if it were written without MPI-IO.
</P>
<P>If the filename ends with ".bin", the dump file (or files, if "*" or
"%" is also used) is written in binary format. A binary dump file
will be about the same size as a text version, but will typically
write out much faster. Of course, when post-processing, you will need
to convert it back to text format (see the <A HREF = "Section_tools.html#binary">binary2txt
tool</A>) or write your own code to read the
binary file. The format of the binary file can be understood by
looking at the tools/binary2txt.cpp file. This option is only
available for the <I>atom</I> and <I>custom</I> styles.
</P>
<P>If the filename ends with ".gz", the dump file (or files, if "*" or "%"
is also used) is written in gzipped format. A gzipped dump file will
be about 3x smaller than the text version, but will also take longer
to write. This option is not available for the <I>dcd</I> and <I>xtc</I>
styles.
</P>
<HR>
<P>This section explains the local attributes that can be specified as
part of the <I>local</I> style.
</P>
<P>The <I>index</I> attribute can be used to generate an index number from 1
to N for each line written into the dump file, where N is the total
number of local datums from all processors, or lines of output that
will appear in the snapshot. Note that because data from different
processors depend on what atoms they currently own, and atoms migrate
between processor, there is no guarantee that the same index will be
used for the same info (e.g. a particular bond) in successive
snapshots.
</P>
<P>The <I>c_ID</I> and <I>c_ID[N]</I> attributes allow local vectors or arrays
calculated by a <A HREF = "compute.html">compute</A> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
<A HREF = "compute.html">compute</A> command for details. There are computes for
calculating local information such as indices, types, and energies for
bonds and angles.
</P>
<P>Note that computes which calculate global or per-atom quantities, as
opposed to local quantities, cannot be output in a dump local command.
Instead, global quantities can be output by the <A HREF = "thermo_style.html">thermo_style
custom</A> command, and per-atom quantities can be
output by the dump custom command.
</P>
<P>If <I>c_ID</I> is used as a attribute, then the local vector calculated by
the compute is printed. If <I>c_ID[N]</I> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the compute.
</P>
<P>The <I>f_ID</I> and <I>f_ID[N]</I> attributes allow local vectors or arrays
calculated by a <A HREF = "fix.html">fix</A> to be output. The ID in the attribute
should be replaced by the actual ID of the fix that has been defined
previously in the input script.
</P>
<P>If <I>f_ID</I> is used as a attribute, then the local vector calculated by
the fix is printed. If <I>f_ID[N]</I> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the fix.
</P>
<P>Here is an example of how to dump bond info for a system,
including the distance and energy of each bond:
</P>
<PRE>compute 1 all property/local batom1 batom2 btype
compute 2 all bond/local dist eng
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_2[1] c_2[2]
</PRE>
<HR>
<P>This section explains the atom attributes that can be specified as
part of the <I>custom</I> and <I>cfg</I> styles.
</P>
<P>The <I>id</I>, <I>mol</I>, <I>proc</I>, <I>procp1</I>, <I>type</I>, <I>element</I>, <I>mass</I>, <I>vx</I>,
<I>vy</I>, <I>vz</I>, <I>fx</I>, <I>fy</I>, <I>fz</I>, <I>q</I> attributes are self-explanatory.
</P>
<P><I>Id</I> is the atom ID. <I>Mol</I> is the molecule ID, included in the data
file for molecular systems. <I>Proc</I> is the ID of the processor (0 to
Nprocs-1) that currently owns the atom. <I>Procp1</I> is the proc ID+1,
which can be convenient in place of a <I>type</I> attribute (1 to Ntypes)
for coloring atoms in a visualization program. <I>Type</I> is the atom
type (1 to Ntypes). <I>Element</I> is typically the chemical name of an
element, which you must assign to each type via the <A HREF = "dump_modify.html">dump_modify
element</A> command. More generally, it can be any
string you wish to associated with an atom type. <I>Mass</I> is the atom
mass. <I>Vx</I>, <I>vy</I>, <I>vz</I>, <I>fx</I>, <I>fy</I>, <I>fz</I>, and <I>q</I> are components of
atom velocity and force and atomic charge.
</P>
<P>There are several options for outputting atom coordinates. The <I>x</I>,
<I>y</I>, <I>z</I> attributes write atom coordinates "unscaled", in the
appropriate distance <A HREF = "units.html">units</A> (Angstroms, sigma, etc). Use
<I>xs</I>, <I>ys</I>, <I>zs</I> if you want the coordinates "scaled" to the box size,
so that each value is 0.0 to 1.0. If the simulation box is triclinic
(tilted), then all atom coords will still be between 0.0 and 1.0. Use
<I>xu</I>, <I>yu</I>, <I>zu</I> if you want the coordinates "unwrapped" by the image
flags for each atom. Unwrapped means that if the atom has passed thru
a periodic boundary one or more times, the value is printed for what
the coordinate would be if it had not been wrapped back into the
periodic box. Note that using <I>xu</I>, <I>yu</I>, <I>zu</I> means that the
coordinate values may be far outside the box bounds printed with the
snapshot. Using <I>xsu</I>, <I>ysu</I>, <I>zsu</I> is similar to using <I>xu</I>, <I>yu</I>, <I>zu</I>,
except that the unwrapped coordinates are scaled by the box size. Atoms
that have passed through a periodic boundary will have the corresponding
cooordinate increased or decreased by 1.0.
</P>
<P>The image flags can be printed directly using the <I>ix</I>, <I>iy</I>, <I>iz</I>
attributes. For periodic dimensions, they specify which image of the
simulation box the atom is considered to be in. An image of 0 means
it is inside the box as defined. A value of 2 means add 2 box lengths
to get the true value. A value of -1 means subtract 1 box length to
get the true value. LAMMPS updates these flags as atoms cross
periodic boundaries during the simulation.
</P>
<P>The <I>mux</I>, <I>muy</I>, <I>muz</I> attributes are specific to dipolar systems
defined with an atom style of <I>dipole</I>. They give the orientation of
the atom's point dipole moment. The <I>mu</I> attribute gives the
magnitude of the atom's dipole moment.
</P>
<P>The <I>radius</I> and <I>diameter</I> attributes are specific to spherical
particles that have a finite size, such as those defined with an atom
style of <I>sphere</I>.
</P>
<P>The <I>omegax</I>, <I>omegay</I>, and <I>omegaz</I> attributes are specific to
finite-size spherical particles that have an angular velocity. Only
certain atom styles, such as <I>sphere</I> define this quantity.
</P>
<P>The <I>angmomx</I>, <I>angmomy</I>, and <I>angmomz</I> attributes are specific to
finite-size aspherical particles that have an angular momentum. Only
the <I>ellipsoid</I> atom style defines this quantity.
</P>
<P>The <I>tqx</I>, <I>tqy</I>, <I>tqz</I> attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.
</P>
<P>The <I>c_ID</I> and <I>c_ID[N]</I> attributes allow per-atom vectors or arrays
calculated by a <A HREF = "compute.html">compute</A> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
<A HREF = "compute.html">compute</A> command for details. There are computes for
calculating the per-atom energy, stress, centro-symmetry parameter,
and coordination number of individual atoms.
</P>
<P>Note that computes which calculate global or local quantities, as
opposed to per-atom quantities, cannot be output in a dump custom
command. Instead, global quantities can be output by the
<A HREF = "thermo_style.html">thermo_style custom</A> command, and local quantities
can be output by the dump local command.
</P>
<P>If <I>c_ID</I> is used as a attribute, then the per-atom vector calculated
by the compute is printed. If <I>c_ID[N]</I> is used, then N must be in
the range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the compute.
</P>
<P>The <I>f_ID</I> and <I>f_ID[N]</I> attributes allow vector or array per-atom
quantities calculated by a <A HREF = "fix.html">fix</A> to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The <A HREF = "fix_ave_atom.html">fix
ave/atom</A> command is one that calculates per-atom
quantities. Since it can time-average per-atom quantities produced by
any <A HREF = "compute.html">compute</A>, <A HREF = "fix.html">fix</A>, or atom-style
<A HREF = "variable.html">variable</A>, this allows those time-averaged results to
be written to a dump file.
</P>
<P>If <I>f_ID</I> is used as a attribute, then the per-atom vector calculated
by the fix is printed. If <I>f_ID[N]</I> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the fix.
</P>
<P>The <I>v_name</I> attribute allows per-atom vectors calculated by a
<A HREF = "variable.html">variable</A> to be output. The name in the attribute
should be replaced by the actual name of the variable that has been
defined previously in the input script. Only an atom-style variable
can be referenced, since it is the only style that generates per-atom
values. Variables of style <I>atom</I> can reference individual atom
attributes, per-atom atom attributes, thermodynamic keywords, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of creating quantities to output to a
dump file.
</P>
<P>The <I>d_name</I> and <I>i_name</I> attributes allow to output custom per atom
floating point or integer properties that are managed by
<A HREF = "fix_property_atom.html">fix property/atom</A>.
</P>
<P>See <A HREF = "Section_modify.html">Section_modify</A> of the manual for information
on how to add new compute and fix styles to LAMMPS to calculate
per-atom quantities which could then be output into dump files.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
-<P>To write gzipped dump files, you must compile LAMMPS with the
--DLAMMPS_GZIP option - see the <A HREF = "Section_start.html#start_2">Making
-LAMMPS</A> section of the documentation.
+<P>To write gzipped dump files, you must either compile LAMMPS with the
+-DLAMMPS_GZIP option or use the styles from the COMPRESS package
+- see the <A HREF = "Section_start.html#start_2">Making LAMMPS</A> section of
+the documentation.
+</P>
+<P>The <I>atom/gz</I>, <I>cfg/gz</I>, <I>custom/gz</I>, and <I>xyz/gz</I> styles are part
+of the COMPRESS package. They are only enabled if LAMMPS was built
+with that package. See the <A HREF = "Section_start.html#start_3">Making
+LAMMPS</A> section for more info.
</P>
<P>The <I>atom/mpiio</I>, <I>cfg/mpiio</I>, <I>custom/mpiio</I>, and <I>xyz/mpiio</I> styles
are part of the MPIIO package. They are only enabled if LAMMPS was
built with that package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>The <I>xtc</I> style is part of the XTC package. It is only enabled if
LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info. This is
because some machines may not support the low-level XDR data format
that XTC files are written with, which will result in a compile-time
error when a low-level include file is not found. Putting this style
in a package makes it easy to exclude from a LAMMPS build for those
machines. However, the XTC package also includes two compatibility
header files and associated functions, which should be a suitable
substitute on machines that do not have the appropriate native header
files. This option can be invoked at build time by adding
-DLAMMPS_XDR to the CCFLAGS variable in the appropriate low-level
Makefile, e.g. src/MAKE/Makefile.foo. This compatibility mode has
been tested successfully on Cray XT3/XT4/XT5 and IBM BlueGene/L
machines and should also work on IBM BG/P, and Windows XP/Vista/7
machines.
</P>
<P><B>Related commands:</B>
</P>
-<P><A HREF = "dump_image.html">dump image</A>, <A HREF = "dump_modify.html">dump_modify</A>,
+<P><A HREF = "dump_h5md.html">dump h5md</A>, <A HREF = "dump_image.html">dump image</A>,
+<A HREF = "dump_molfile.html">dump molfile</A>, <A HREF = "dump_modify.html">dump_modify</A>,
<A HREF = "undump.html">undump</A>
</P>
<P><B>Default:</B>
</P>
<P>The defaults for the <I>image</I> and <I>movie</I> styles are listed on the
<A HREF = "dump_image.html">dump image</A> doc page.
</P>
</HTML>
diff --git a/doc/doc2/dump_h5md.html b/doc/doc2/dump_h5md.html
new file mode 100644
index 000000000..0c6db4323
--- /dev/null
+++ b/doc/doc2/dump_h5md.html
@@ -0,0 +1,136 @@
+<HTML>
+<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
+</CENTER>
+
+
+
+
+
+
+<HR>
+
+<H3>dump h5md command
+</H3>
+<P><B>Syntax:</B>
+</P>
+<PRE>dump ID group-ID h5md N file.h5 args
+</PRE>
+<UL><LI>ID = user-assigned name for the dump
+
+<LI>group-ID = ID of the group of atoms to be imaged
+
+<LI>h5md = style of dump command (other styles <I>atom</I> or <I>cfg</I> or <I>dcd</I> or <I>xtc</I> or <I>xyz</I> or <I>local</I> or <I>custom</I> are discussed on the <A HREF = "dump.html">dump</A> doc page)
+
+<LI>N = dump every this many timesteps
+
+<LI>file.h5 = name of file to write to
+
+<LI>args = list of data elements to dump, with their dump "subintervals".
+At least one element must be given and image may only be present if
+position is specified first.
+
+<PRE> position options
+ image
+ velocity options
+ force options
+ species options
+ file_from ID: do not open a new file, re-use the already opened file from dump ID
+ box value = <I>yes</I> or <I>no</I>
+ create_group value = <I>yes</I> or <I>no</I>
+ author value = quoted string
+</PRE>
+<P>For the elements <I>position</I>, <I>velocity</I>, <I>force</I> and <I>species</I>, one
+may specify a sub-interval to write the data only every N_element
+iterations of the dump (i.e. every N*N_element time steps). This is
+specified by the option
+</P>
+<PRE> every N_element
+</PRE>
+<P>that follows directly the element declaration.
+</P>
+
+</UL>
+<P><B>Examples:</B>
+</P>
+<PRE>dump h5md1 all h5md 100 dump_h5md.h5 position image
+dump h5md1 all h5md 100 dump_h5md.h5 position velocity every 10
+dump h5md1 all h5md 100 dump_h5md.h5 velocity author "John Doe"
+</PRE>
+<P><B>Description:</B>
+</P>
+<P>Dump a snapshot of atom coordinates every N timesteps in the
+<A HREF = "http://www.hdfgroup.org/HDF5/">HDF5</A> based <A HREF = "http://nongnu.org/h5md/">H5MD</A> file format <A HREF = "#h5md_cpc">(de Buyl)</A>.
+HDF5 files are binary, portable and self-describing. This dump style
+will write only one file, on the root node.
+</P>
+<P>Several dumps may write to the same file, by using file_from and
+referring to a previously defined dump. Several groups may also be
+stored within the same file by defining several dumps. A dump that
+refers (via <I>file_from</I>) to an already open dump ID and that concerns
+another particle group must specify <I>create_group yes</I>.
+</P>
+
+
+<P>Each data element is written every N*N_element steps. For <I>image</I>, no
+subinterval is needed as it must be present at the same interval as
+<I>position</I>. <I>image</I> must be given after <I>position</I> in any case. The
+box information (edges in each dimension) is stored at the same
+interval than the <I>position</I> element, if present. Else it is stored
+every N steps.
+</P>
+<P>IMPORTANT NOTE: Because periodic boundary conditions are enforced only
+on timesteps when neighbor lists are rebuilt, the coordinates of an
+atom written to a dump file may be slightly outside the simulation
+box.
+</P>
+<P><B>Use from write_dump:</B>
+</P>
+<P>It is possible to use this dump style with the
+<A HREF = "write_dump.html">write_dump</A> command. In this case, the subintervals
+must not be set at all. The write_dump command can be used either to
+create a new file or to add current data to an existing dump file by
+using the <I>file_from</I> keyword.
+</P>
+<P>Typically, the <I>species</I> data is fixed. The following two commands
+store the position data every 100 timesteps, with the image data, and
+store once the species data in the same file.
+</P>
+<PRE>dump h5md1 all h5md 100 dump.h5 position image
+write_dump all h5md dump.h5 file_from h5md1 species
+</PRE>
+<HR>
+
+<P><B>Restrictions:</B>
+</P>
+<P>The number of atoms per snapshot cannot change with the h5md style.
+The position data is stored wrapped (box boundaries not enforced, see
+note above). Only orthogonal domains are currently supported. This is
+a limitation of the present dump h5md command and not of H5MD itself.
+</P>
+<P>The <I>h5md</I> dump style is part of the USER-H5MD package. It is only
+enabled if LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
+LAMMPS</A> section for more info. It also
+requires (i) building the ch5md library provided with LAMMPS (See the
+<A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info.) and
+(ii) having the <A HREF = "http://www.hdfgroup.org/HDF5/">HDF5</A> library installed (C bindings are
+sufficient) on your system. The library ch5md is compiled with the
+h5cc wrapper provided by the HDF5 library.
+</P>
+
+
+<HR>
+
+<P><B>Related commands:</B>
+</P>
+<P><A HREF = "dump.html">dump</A>, <A HREF = "dump_modify.html">dump_modify</A>, <A HREF = "undump.html">undump</A>
+</P>
+<HR>
+
+<A NAME = "h5md_cpc"></A>
+
+<P><B>(de Buyl)</B> de Buyl, Colberg and Hofling, H5MD: A structured,
+efficient, and portable file format for molecular data,
+Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
+<A HREF = "http://arxiv.org/abs/1308.6382/">[arXiv:1308.6382]</A>.
+</P>
+</HTML>
diff --git a/doc/doc2/genindex.html b/doc/doc2/genindex.html
index 2592e637a..4ba82769c 100644
--- a/doc/doc2/genindex.html
+++ b/doc/doc2/genindex.html
@@ -1,2208 +1,2212 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li></li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#J"><strong>J</strong></a>
| <a href="#K"><strong>K</strong></a>
| <a href="#L"><strong>L</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#Q"><strong>Q</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
| <a href="#U"><strong>U</strong></a>
| <a href="#V"><strong>V</strong></a>
| <a href="#W"><strong>W</strong></a>
</div>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="angle_coeff.html#index-0">angle_coeff</a>
</dt>
<dt><a href="angle_style.html#index-0">angle_style</a>
</dt>
<dt><a href="angle_charmm.html#index-0">angle_style charmm</a>
</dt>
<dt><a href="angle_class2.html#index-0">angle_style class2</a>
</dt>
<dt><a href="angle_cosine.html#index-0">angle_style cosine</a>
</dt>
<dt><a href="angle_cosine_delta.html#index-0">angle_style cosine/delta</a>
</dt>
<dt><a href="angle_cosine_periodic.html#index-0">angle_style cosine/periodic</a>
</dt>
<dt><a href="angle_cosine_shift.html#index-0">angle_style cosine/shift</a>
</dt>
<dt><a href="angle_cosine_shift_exp.html#index-0">angle_style cosine/shift/exp</a>
</dt>
<dt><a href="angle_cosine_squared.html#index-0">angle_style cosine/squared</a>
</dt>
<dt><a href="angle_dipole.html#index-0">angle_style dipole</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="angle_fourier.html#index-0">angle_style fourier</a>
</dt>
<dt><a href="angle_fourier_simple.html#index-0">angle_style fourier/simple</a>
</dt>
<dt><a href="angle_harmonic.html#index-0">angle_style harmonic</a>
</dt>
<dt><a href="angle_hybrid.html#index-0">angle_style hybrid</a>
</dt>
<dt><a href="angle_none.html#index-0">angle_style none</a>
</dt>
<dt><a href="angle_quartic.html#index-0">angle_style quartic</a>
</dt>
<dt><a href="angle_sdk.html#index-0">angle_style sdk</a>
</dt>
<dt><a href="angle_table.html#index-0">angle_style table</a>
</dt>
<dt><a href="atom_modify.html#index-0">atom_modify</a>
</dt>
<dt><a href="atom_style.html#index-0">atom_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="balance.html#index-0">balance</a>
</dt>
<dt><a href="bond_coeff.html#index-0">bond_coeff</a>
</dt>
<dt><a href="bond_style.html#index-0">bond_style</a>
</dt>
<dt><a href="bond_class2.html#index-0">bond_style class2</a>
</dt>
<dt><a href="bond_fene.html#index-0">bond_style fene</a>
</dt>
<dt><a href="bond_fene_expand.html#index-0">bond_style fene/expand</a>
</dt>
<dt><a href="bond_harmonic.html#index-0">bond_style harmonic</a>
</dt>
<dt><a href="bond_harmonic_shift.html#index-0">bond_style harmonic/shift</a>
</dt>
<dt><a href="bond_harmonic_shift_cut.html#index-0">bond_style harmonic/shift/cut</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="bond_hybrid.html#index-0">bond_style hybrid</a>
</dt>
<dt><a href="bond_morse.html#index-0">bond_style morse</a>
</dt>
<dt><a href="bond_none.html#index-0">bond_style none</a>
</dt>
<dt><a href="bond_nonlinear.html#index-0">bond_style nonlinear</a>
</dt>
<dt><a href="bond_quartic.html#index-0">bond_style quartic</a>
</dt>
<dt><a href="bond_table.html#index-0">bond_style table</a>
</dt>
<dt><a href="boundary.html#index-0">boundary</a>
</dt>
<dt><a href="box.html#index-0">box</a>
</dt>
</dl></td>
</tr></table>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="change_box.html#index-0">change_box</a>
</dt>
<dt><a href="clear.html#index-0">clear</a>
</dt>
<dt><a href="comm_modify.html#index-0">comm_modify</a>
</dt>
<dt><a href="comm_style.html#index-0">comm_style</a>
</dt>
<dt><a href="compute.html#index-0">compute</a>
</dt>
<dt><a href="compute_ackland_atom.html#index-0">compute ackland/atom</a>
</dt>
<dt><a href="compute_angle_local.html#index-0">compute angle/local</a>
</dt>
<dt><a href="compute_angmom_chunk.html#index-0">compute angmom/chunk</a>
</dt>
<dt><a href="compute_basal_atom.html#index-0">compute basal/atom</a>
</dt>
<dt><a href="compute_body_local.html#index-0">compute body/local</a>
</dt>
<dt><a href="compute_bond_local.html#index-0">compute bond/local</a>
</dt>
<dt><a href="compute_centro_atom.html#index-0">compute centro/atom</a>
</dt>
<dt><a href="compute_chunk_atom.html#index-0">compute chunk/atom</a>
</dt>
<dt><a href="compute_cluster_atom.html#index-0">compute cluster/atom</a>
</dt>
<dt><a href="compute_cna_atom.html#index-0">compute cna/atom</a>
</dt>
<dt><a href="compute_com.html#index-0">compute com</a>
</dt>
<dt><a href="compute_com_chunk.html#index-0">compute com/chunk</a>
</dt>
<dt><a href="compute_contact_atom.html#index-0">compute contact/atom</a>
</dt>
<dt><a href="compute_coord_atom.html#index-0">compute coord/atom</a>
</dt>
<dt><a href="compute_damage_atom.html#index-0">compute damage/atom</a>
</dt>
<dt><a href="compute_dihedral_local.html#index-0">compute dihedral/local</a>
</dt>
<dt><a href="compute_dilatation_atom.html#index-0">compute dilatation/atom</a>
</dt>
<dt><a href="compute_displace_atom.html#index-0">compute displace/atom</a>
</dt>
<dt><a href="compute_erotate_asphere.html#index-0">compute erotate/asphere</a>
</dt>
<dt><a href="compute_erotate_rigid.html#index-0">compute erotate/rigid</a>
</dt>
<dt><a href="compute_erotate_sphere.html#index-0">compute erotate/sphere</a>
</dt>
<dt><a href="compute_erotate_sphere_atom.html#index-0">compute erotate/sphere/atom</a>
</dt>
<dt><a href="compute_event_displace.html#index-0">compute event/displace</a>
</dt>
<dt><a href="compute_fep.html#index-0">compute fep</a>
</dt>
<dt><a href="compute_group_group.html#index-0">compute group/group</a>
</dt>
<dt><a href="compute_gyration.html#index-0">compute gyration</a>
</dt>
<dt><a href="compute_gyration_chunk.html#index-0">compute gyration/chunk</a>
</dt>
<dt><a href="compute_heat_flux.html#index-0">compute heat/flux</a>
</dt>
<dt><a href="compute_improper_local.html#index-0">compute improper/local</a>
</dt>
<dt><a href="compute_inertia_chunk.html#index-0">compute inertia/chunk</a>
</dt>
<dt><a href="compute_ke.html#index-0">compute ke</a>
</dt>
<dt><a href="compute_ke_atom.html#index-0">compute ke/atom</a>
</dt>
<dt><a href="compute_ke_atom_eff.html#index-0">compute ke/atom/eff</a>
</dt>
<dt><a href="compute_ke_eff.html#index-0">compute ke/eff</a>
</dt>
<dt><a href="compute_ke_rigid.html#index-0">compute ke/rigid</a>
</dt>
<dt><a href="compute_meso_e_atom.html#index-0">compute meso_e/atom</a>
</dt>
<dt><a href="compute_meso_rho_atom.html#index-0">compute meso_rho/atom</a>
</dt>
<dt><a href="compute_meso_t_atom.html#index-0">compute meso_t/atom</a>
</dt>
<dt><a href="compute_msd.html#index-0">compute msd</a>
</dt>
<dt><a href="compute_msd_chunk.html#index-0">compute msd/chunk</a>
</dt>
<dt><a href="compute_msd_nongauss.html#index-0">compute msd/nongauss</a>
</dt>
<dt><a href="compute_omega_chunk.html#index-0">compute omega/chunk</a>
</dt>
<dt><a href="compute_pair.html#index-0">compute pair</a>
</dt>
<dt><a href="compute_pair_local.html#index-0">compute pair/local</a>
</dt>
<dt><a href="compute_pe.html#index-0">compute pe</a>
</dt>
<dt><a href="compute_pe_atom.html#index-0">compute pe/atom</a>
</dt>
<dt><a href="compute_plasticity_atom.html#index-0">compute plasticity/atom</a>
</dt>
<dt><a href="compute_pressure.html#index-0">compute pressure</a>
</dt>
<dt><a href="compute_property_atom.html#index-0">compute property/atom</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="compute_property_chunk.html#index-0">compute property/chunk</a>
</dt>
<dt><a href="compute_property_local.html#index-0">compute property/local</a>
</dt>
<dt><a href="compute_rdf.html#index-0">compute rdf</a>
</dt>
<dt><a href="compute_reduce.html#index-0">compute reduce</a>
</dt>
<dt><a href="compute_saed.html#index-0">compute saed</a>
</dt>
<dt><a href="compute_slice.html#index-0">compute slice</a>
</dt>
<dt><a href="compute_smd_contact_radius.html#index-0">compute smd/contact_radius</a>
</dt>
<dt><a href="compute_smd_damage.html#index-0">compute smd/damage</a>
</dt>
<dt><a href="compute_smd_hourglass_error.html#index-0">compute smd/hourglass_error</a>
</dt>
<dt><a href="compute_smd_internal_energy.html#index-0">compute smd/internal_energy</a>
</dt>
<dt><a href="compute_smd_plastic_strain.html#index-0">compute smd/plastic_strain</a>
</dt>
<dt><a href="compute_smd_plastic_strain_rate.html#index-0">compute smd/plastic_strain_rate</a>
</dt>
<dt><a href="compute_smd_rho.html#index-0">compute smd/rho</a>
</dt>
<dt><a href="compute_smd_tlsph_defgrad.html#index-0">compute smd/tlsph_defgrad</a>
</dt>
<dt><a href="compute_smd_tlsph_dt.html#index-0">compute smd/tlsph_dt</a>
</dt>
<dt><a href="compute_smd_tlsph_num_neighs.html#index-0">compute smd/tlsph_num_neighs</a>
</dt>
<dt><a href="compute_smd_tlsph_shape.html#index-0">compute smd/tlsph_shape</a>
</dt>
<dt><a href="compute_smd_tlsph_strain.html#index-0">compute smd/tlsph_strain</a>
</dt>
<dt><a href="compute_smd_tlsph_strain_rate.html#index-0">compute smd/tlsph_strain_rate</a>
</dt>
<dt><a href="compute_smd_tlsph_stress.html#index-0">compute smd/tlsph_stress</a>
</dt>
<dt><a href="compute_smd_ulsph_num_neighs.html#index-0">compute smd/ulsph_num_neighs</a>
</dt>
<dt><a href="compute_smd_ulsph_strain.html#index-0">compute smd/ulsph_strain</a>
</dt>
<dt><a href="compute_smd_ulsph_strain_rate.html#index-0">compute smd/ulsph_strain_rate</a>
</dt>
<dt><a href="compute_smd_ulsph_stress.html#index-0">compute smd/ulsph_stress</a>
</dt>
<dt><a href="compute_smd_vol.html#index-0">compute smd/vol</a>
</dt>
<dt><a href="compute_sna_atom.html#index-0">compute sna/atom</a>
</dt>
<dt><a href="compute_stress_atom.html#index-0">compute stress/atom</a>
</dt>
<dt><a href="compute_temp.html#index-0">compute temp</a>
</dt>
<dt><a href="compute_temp_asphere.html#index-0">compute temp/asphere</a>
</dt>
<dt><a href="compute_temp_chunk.html#index-0">compute temp/chunk</a>
</dt>
<dt><a href="compute_temp_com.html#index-0">compute temp/com</a>
</dt>
<dt><a href="compute_temp_cs.html#index-0">compute temp/cs</a>
</dt>
<dt><a href="compute_temp_deform.html#index-0">compute temp/deform</a>
</dt>
<dt><a href="compute_temp_deform_eff.html#index-0">compute temp/deform/eff</a>
</dt>
<dt><a href="compute_temp_drude.html#index-0">compute temp/drude</a>
</dt>
<dt><a href="compute_temp_eff.html#index-0">compute temp/eff</a>
</dt>
<dt><a href="compute_temp_partial.html#index-0">compute temp/partial</a>
</dt>
<dt><a href="compute_temp_profile.html#index-0">compute temp/profile</a>
</dt>
<dt><a href="compute_temp_ramp.html#index-0">compute temp/ramp</a>
</dt>
<dt><a href="compute_temp_region.html#index-0">compute temp/region</a>
</dt>
<dt><a href="compute_temp_region_eff.html#index-0">compute temp/region/eff</a>
</dt>
<dt><a href="compute_temp_rotate.html#index-0">compute temp/rotate</a>
</dt>
<dt><a href="compute_temp_sphere.html#index-0">compute temp/sphere</a>
</dt>
<dt><a href="compute_ti.html#index-0">compute ti</a>
</dt>
<dt><a href="compute_torque_chunk.html#index-0">compute torque/chunk</a>
</dt>
<dt><a href="compute_vacf.html#index-0">compute vacf</a>
</dt>
<dt><a href="compute_vcm_chunk.html#index-0">compute vcm/chunk</a>
</dt>
<dt><a href="compute_voronoi_atom.html#index-0">compute voronoi/atom</a>
</dt>
<dt><a href="compute_xrd.html#index-0">compute xrd</a>
</dt>
<dt><a href="compute_modify.html#index-0">compute_modify</a>
</dt>
<dt><a href="create_atoms.html#index-0">create_atoms</a>
</dt>
<dt><a href="create_bonds.html#index-0">create_bonds</a>
</dt>
<dt><a href="create_box.html#index-0">create_box</a>
</dt>
</dl></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="delete_atoms.html#index-0">delete_atoms</a>
</dt>
<dt><a href="delete_bonds.html#index-0">delete_bonds</a>
</dt>
<dt><a href="dielectric.html#index-0">dielectric</a>
</dt>
<dt><a href="dihedral_coeff.html#index-0">dihedral_coeff</a>
</dt>
<dt><a href="dihedral_style.html#index-0">dihedral_style</a>
</dt>
<dt><a href="dihedral_charmm.html#index-0">dihedral_style charmm</a>
</dt>
<dt><a href="dihedral_class2.html#index-0">dihedral_style class2</a>
</dt>
<dt><a href="dihedral_cosine_shift_exp.html#index-0">dihedral_style cosine/shift/exp</a>
</dt>
<dt><a href="dihedral_fourier.html#index-0">dihedral_style fourier</a>
</dt>
<dt><a href="dihedral_harmonic.html#index-0">dihedral_style harmonic</a>
</dt>
<dt><a href="dihedral_helix.html#index-0">dihedral_style helix</a>
</dt>
<dt><a href="dihedral_hybrid.html#index-0">dihedral_style hybrid</a>
</dt>
- </dl></td>
- <td style="width: 33%" valign="top"><dl>
<dt><a href="dihedral_multi_harmonic.html#index-0">dihedral_style multi/harmonic</a>
</dt>
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
<dt><a href="dihedral_nharmonic.html#index-0">dihedral_style nharmonic</a>
</dt>
<dt><a href="dihedral_none.html#index-0">dihedral_style none</a>
</dt>
<dt><a href="dihedral_opls.html#index-0">dihedral_style opls</a>
</dt>
<dt><a href="dihedral_quadratic.html#index-0">dihedral_style quadratic</a>
</dt>
<dt><a href="dihedral_table.html#index-0">dihedral_style table</a>
</dt>
<dt><a href="dimension.html#index-0">dimension</a>
</dt>
<dt><a href="displace_atoms.html#index-0">displace_atoms</a>
</dt>
<dt><a href="dump.html#index-0">dump</a>
</dt>
+ <dt><a href="dump_h5md.html#index-0">dump h5md</a>
+ </dt>
+
+
<dt><a href="dump_image.html#index-0">dump image</a>
</dt>
<dt><a href="dump_molfile.html#index-0">dump molfile</a>
</dt>
<dt><a href="dump_modify.html#index-0">dump_modify</a>
</dt>
</dl></td>
</tr></table>
<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="echo.html#index-0">echo</a>
</dt>
</dl></td>
</tr></table>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="fix.html#index-0">fix</a>
</dt>
<dt><a href="fix_adapt.html#index-0">fix adapt</a>
</dt>
<dt><a href="fix_adapt_fep.html#index-0">fix adapt/fep</a>
</dt>
<dt><a href="fix_addforce.html#index-0">fix addforce</a>
</dt>
<dt><a href="fix_addtorque.html#index-0">fix addtorque</a>
</dt>
<dt><a href="fix_append_atoms.html#index-0">fix append/atoms</a>
</dt>
<dt><a href="fix_atc.html#index-0">fix atc</a>
</dt>
<dt><a href="fix_atom_swap.html#index-0">fix atom/swap</a>
</dt>
<dt><a href="fix_ave_atom.html#index-0">fix ave/atom</a>
</dt>
<dt><a href="fix_ave_chunk.html#index-0">fix ave/chunk</a>
</dt>
<dt><a href="fix_ave_correlate.html#index-0">fix ave/correlate</a>
</dt>
<dt><a href="fix_ave_histo.html#index-0">fix ave/histo</a>
</dt>
<dt><a href="fix_ave_spatial.html#index-0">fix ave/spatial</a>
</dt>
<dt><a href="fix_ave_spatial_sphere.html#index-0">fix ave/spatial/sphere</a>
</dt>
<dt><a href="fix_ave_time.html#index-0">fix ave/time</a>
</dt>
<dt><a href="fix_aveforce.html#index-0">fix aveforce</a>
</dt>
<dt><a href="fix_balance.html#index-0">fix balance</a>
</dt>
<dt><a href="fix_bond_break.html#index-0">fix bond/break</a>
</dt>
<dt><a href="fix_bond_create.html#index-0">fix bond/create</a>
</dt>
<dt><a href="fix_bond_swap.html#index-0">fix bond/swap</a>
</dt>
<dt><a href="fix_box_relax.html#index-0">fix box/relax</a>
</dt>
<dt><a href="fix_colvars.html#index-0">fix colvars</a>
</dt>
<dt><a href="fix_deform.html#index-0">fix deform</a>
</dt>
<dt><a href="fix_deposit.html#index-0">fix deposit</a>
</dt>
<dt><a href="fix_drag.html#index-0">fix drag</a>
</dt>
<dt><a href="fix_drude.html#index-0">fix drude</a>
</dt>
<dt><a href="fix_drude_transform.html#index-0">fix drude/transform/direct</a>
</dt>
<dt><a href="fix_dt_reset.html#index-0">fix dt/reset</a>
</dt>
<dt><a href="fix_efield.html#index-0">fix efield</a>
</dt>
<dt><a href="fix_enforce2d.html#index-0">fix enforce2d</a>
</dt>
<dt><a href="fix_evaporate.html#index-0">fix evaporate</a>
</dt>
<dt><a href="fix_external.html#index-0">fix external</a>
</dt>
<dt><a href="fix_freeze.html#index-0">fix freeze</a>
</dt>
<dt><a href="fix_gcmc.html#index-0">fix gcmc</a>
</dt>
<dt><a href="fix_gld.html#index-0">fix gld</a>
</dt>
<dt><a href="fix_gle.html#index-0">fix gle</a>
</dt>
<dt><a href="fix_gravity.html#index-0">fix gravity</a>
</dt>
<dt><a href="fix_heat.html#index-0">fix heat</a>
</dt>
<dt><a href="fix_imd.html#index-0">fix imd</a>
</dt>
<dt><a href="fix_indent.html#index-0">fix indent</a>
</dt>
<dt><a href="fix_ipi.html#index-0">fix ipi</a>
</dt>
<dt><a href="fix_langevin.html#index-0">fix langevin</a>
</dt>
<dt><a href="fix_langevin_drude.html#index-0">fix langevin/drude</a>
</dt>
<dt><a href="fix_langevin_eff.html#index-0">fix langevin/eff</a>
</dt>
<dt><a href="fix_lb_fluid.html#index-0">fix lb/fluid</a>
</dt>
<dt><a href="fix_lb_momentum.html#index-0">fix lb/momentum</a>
</dt>
<dt><a href="fix_lb_pc.html#index-0">fix lb/pc</a>
</dt>
<dt><a href="fix_lb_rigid_pc_sphere.html#index-0">fix lb/rigid/pc/sphere</a>
</dt>
<dt><a href="fix_lb_viscous.html#index-0">fix lb/viscous</a>
</dt>
<dt><a href="fix_lineforce.html#index-0">fix lineforce</a>
</dt>
<dt><a href="fix_meso.html#index-0">fix meso</a>
</dt>
<dt><a href="fix_meso_stationary.html#index-0">fix meso/stationary</a>
</dt>
<dt><a href="fix_momentum.html#index-0">fix momentum</a>
</dt>
<dt><a href="fix_move.html#index-0">fix move</a>
</dt>
<dt><a href="fix_msst.html#index-0">fix msst</a>
</dt>
<dt><a href="fix_neb.html#index-0">fix neb</a>
</dt>
<dt><a href="fix_nph_asphere.html#index-0">fix nph/asphere</a>
</dt>
<dt><a href="fix_nph_sphere.html#index-0">fix nph/sphere</a>
</dt>
<dt><a href="fix_nphug.html#index-0">fix nphug</a>
</dt>
<dt><a href="fix_npt_asphere.html#index-0">fix npt/asphere</a>
</dt>
<dt><a href="fix_npt_sphere.html#index-0">fix npt/sphere</a>
</dt>
<dt><a href="fix_nve.html#index-0">fix nve</a>
</dt>
<dt><a href="fix_nve_asphere.html#index-0">fix nve/asphere</a>
</dt>
<dt><a href="fix_nve_asphere_noforce.html#index-0">fix nve/asphere/noforce</a>
</dt>
<dt><a href="fix_nve_body.html#index-0">fix nve/body</a>
</dt>
<dt><a href="fix_nve_eff.html#index-0">fix nve/eff</a>
</dt>
<dt><a href="fix_nve_limit.html#index-0">fix nve/limit</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="fix_nve_line.html#index-0">fix nve/line</a>
</dt>
<dt><a href="fix_nve_noforce.html#index-0">fix nve/noforce</a>
</dt>
<dt><a href="fix_nve_sphere.html#index-0">fix nve/sphere</a>
</dt>
<dt><a href="fix_nve_tri.html#index-0">fix nve/tri</a>
</dt>
<dt><a href="fix_nh.html#index-0">fix nvt</a>
</dt>
<dt><a href="fix_nvt_asphere.html#index-0">fix nvt/asphere</a>
</dt>
<dt><a href="fix_nh_eff.html#index-0">fix nvt/eff</a>
</dt>
<dt><a href="fix_nvt_sllod.html#index-0">fix nvt/sllod</a>
</dt>
<dt><a href="fix_nvt_sllod_eff.html#index-0">fix nvt/sllod/eff</a>
</dt>
<dt><a href="fix_nvt_sphere.html#index-0">fix nvt/sphere</a>
</dt>
<dt><a href="fix_oneway.html#index-0">fix oneway</a>
</dt>
<dt><a href="fix_orient_fcc.html#index-0">fix orient/fcc</a>
</dt>
<dt><a href="fix_phonon.html#index-0">fix phonon</a>
</dt>
<dt><a href="fix_pimd.html#index-0">fix pimd</a>
</dt>
<dt><a href="fix_planeforce.html#index-0">fix planeforce</a>
</dt>
<dt><a href="fix_pour.html#index-0">fix pour</a>
</dt>
<dt><a href="fix_press_berendsen.html#index-0">fix press/berendsen</a>
</dt>
<dt><a href="fix_print.html#index-0">fix print</a>
</dt>
<dt><a href="fix_property_atom.html#index-0">fix property/atom</a>
</dt>
<dt><a href="fix_qbmsst.html#index-0">fix qbmsst</a>
</dt>
<dt><a href="fix_qeq_comb.html#index-0">fix qeq/comb</a>
</dt>
<dt><a href="fix_qeq.html#index-0">fix qeq/point</a>
</dt>
<dt><a href="fix_qeq_reax.html#index-0">fix qeq/reax</a>
</dt>
<dt><a href="fix_qmmm.html#index-0">fix qmmm</a>
</dt>
<dt><a href="fix_qtb.html#index-0">fix qtb</a>
</dt>
<dt><a href="fix_reax_bonds.html#index-0">fix reax/bonds</a>
</dt>
<dt><a href="fix_reaxc_species.html#index-0">fix reax/c/species</a>
</dt>
<dt><a href="fix_recenter.html#index-0">fix recenter</a>
</dt>
<dt><a href="fix_restrain.html#index-0">fix restrain</a>
</dt>
<dt><a href="fix_rigid.html#index-0">fix rigid</a>
</dt>
<dt><a href="fix_saed_vtk.html#index-0">fix saed/vtk</a>
</dt>
<dt><a href="fix_setforce.html#index-0">fix setforce</a>
</dt>
<dt><a href="fix_shake.html#index-0">fix shake</a>
</dt>
<dt><a href="fix_smd.html#index-0">fix smd</a>
</dt>
<dt><a href="fix_smd_adjust_dt.html#index-0">fix smd/adjust_dt</a>
</dt>
<dt><a href="fix_smd_integrate_tlsph.html#index-0">fix smd/integrate_tlsph</a>
</dt>
<dt><a href="fix_smd_integrate_ulsph.html#index-0">fix smd/integrate_ulsph</a>
</dt>
<dt><a href="fix_smd_move_triangulated_surface.html#index-0">fix smd/move_tri_surf</a>
</dt>
<dt><a href="fix_smd_setvel.html#index-0">fix smd/setvel</a>
</dt>
<dt><a href="fix_smd_wall_surface.html#index-0">fix smd/wall_surface</a>
</dt>
<dt><a href="fix_spring.html#index-0">fix spring</a>
</dt>
<dt><a href="fix_spring_rg.html#index-0">fix spring/rg</a>
</dt>
<dt><a href="fix_spring_self.html#index-0">fix spring/self</a>
</dt>
<dt><a href="fix_srd.html#index-0">fix srd</a>
</dt>
<dt><a href="fix_store_force.html#index-0">fix store/force</a>
</dt>
<dt><a href="fix_store_state.html#index-0">fix store/state</a>
</dt>
<dt><a href="fix_temp_berendsen.html#index-0">fix temp/berendsen</a>
</dt>
<dt><a href="fix_temp_csvr.html#index-0">fix temp/csvr</a>
</dt>
<dt><a href="fix_temp_rescale.html#index-0">fix temp/rescale</a>
</dt>
<dt><a href="fix_temp_rescale_eff.html#index-0">fix temp/rescale/eff</a>
</dt>
<dt><a href="fix_tfmc.html#index-0">fix tfmc</a>
</dt>
<dt><a href="fix_thermal_conductivity.html#index-0">fix thermal/conductivity</a>
</dt>
<dt><a href="fix_ti_rs.html#index-0">fix ti/rs</a>
</dt>
<dt><a href="fix_ti_spring.html#index-0">fix ti/spring</a>
</dt>
<dt><a href="fix_tmd.html#index-0">fix tmd</a>
</dt>
<dt><a href="fix_ttm.html#index-0">fix ttm</a>
</dt>
<dt><a href="fix_tune_kspace.html#index-0">fix tune/kspace</a>
</dt>
<dt><a href="fix_vector.html#index-0">fix vector</a>
</dt>
<dt><a href="fix_viscosity.html#index-0">fix viscosity</a>
</dt>
<dt><a href="fix_viscous.html#index-0">fix viscous</a>
</dt>
<dt><a href="fix_wall_gran.html#index-0">fix wall/gran</a>
</dt>
<dt><a href="fix_wall.html#index-0">fix wall/lj93</a>
</dt>
<dt><a href="fix_wall_piston.html#index-0">fix wall/piston</a>
</dt>
<dt><a href="fix_wall_reflect.html#index-0">fix wall/reflect</a>
</dt>
<dt><a href="fix_wall_region.html#index-0">fix wall/region</a>
</dt>
<dt><a href="fix_wall_srd.html#index-0">fix wall/srd</a>
</dt>
<dt><a href="fix_modify.html#index-0">fix_modify</a>
</dt>
</dl></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="group.html#index-0">group</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="group2ndx.html#index-0">group2ndx</a>
</dt>
</dl></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="if.html#index-0">if</a>
</dt>
<dt><a href="improper_coeff.html#index-0">improper_coeff</a>
</dt>
<dt><a href="improper_style.html#index-0">improper_style</a>
</dt>
<dt><a href="improper_class2.html#index-0">improper_style class2</a>
</dt>
<dt><a href="improper_cossq.html#index-0">improper_style cossq</a>
</dt>
<dt><a href="improper_cvff.html#index-0">improper_style cvff</a>
</dt>
<dt><a href="improper_fourier.html#index-0">improper_style fourier</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="improper_harmonic.html#index-0">improper_style harmonic</a>
</dt>
<dt><a href="improper_hybrid.html#index-0">improper_style hybrid</a>
</dt>
<dt><a href="improper_none.html#index-0">improper_style none</a>
</dt>
<dt><a href="improper_ring.html#index-0">improper_style ring</a>
</dt>
<dt><a href="improper_umbrella.html#index-0">improper_style umbrella</a>
</dt>
<dt><a href="include.html#index-0">include</a>
</dt>
<dt><a href="info.html#index-0">info</a>
</dt>
</dl></td>
</tr></table>
<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="jump.html#index-0">jump</a>
</dt>
</dl></td>
</tr></table>
<h2 id="K">K</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="kspace_modify.html#index-0">kspace_modify</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="kspace_style.html#index-0">kspace_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="label.html#index-0">label</a>
</dt>
<dt><a href="lattice.html#index-0">lattice</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="log.html#index-0">log</a>
</dt>
</dl></td>
</tr></table>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="mass.html#index-0">mass</a>
</dt>
<dt><a href="min_modify.html#index-0">min_modify</a>
</dt>
<dt><a href="min_style.html#index-0">min_style</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="minimize.html#index-0">minimize</a>
</dt>
<dt><a href="molecule.html#index-0">molecule</a>
</dt>
</dl></td>
</tr></table>
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="neb.html#index-0">neb</a>
</dt>
<dt><a href="neigh_modify.html#index-0">neigh_modify</a>
</dt>
<dt><a href="neighbor.html#index-0">neighbor</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="newton.html#index-0">newton</a>
</dt>
<dt><a href="next.html#index-0">next</a>
</dt>
</dl></td>
</tr></table>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="package.html#index-0">package</a>
</dt>
<dt><a href="pair_coeff.html#index-0">pair_coeff</a>
</dt>
<dt><a href="pair_modify.html#index-0">pair_modify</a>
</dt>
<dt><a href="pair_style.html#index-0">pair_style</a>
</dt>
<dt><a href="pair_adp.html#index-0">pair_style adp</a>
</dt>
<dt><a href="pair_airebo.html#index-0">pair_style airebo</a>
</dt>
<dt><a href="pair_awpmd.html#index-0">pair_style awpmd/cut</a>
</dt>
<dt><a href="pair_beck.html#index-0">pair_style beck</a>
</dt>
<dt><a href="pair_body.html#index-0">pair_style body</a>
</dt>
<dt><a href="pair_bop.html#index-0">pair_style bop</a>
</dt>
<dt><a href="pair_born.html#index-0">pair_style born</a>
</dt>
<dt><a href="pair_cs.html#index-0">pair_style born/coul/long/cs</a>
</dt>
<dt><a href="pair_brownian.html#index-0">pair_style brownian</a>
</dt>
<dt><a href="pair_buck.html#index-0">pair_style buck</a>
</dt>
<dt><a href="pair_buck_long.html#index-0">pair_style buck/long/coul/long</a>
</dt>
<dt><a href="pair_colloid.html#index-0">pair_style colloid</a>
</dt>
<dt><a href="pair_comb.html#index-0">pair_style comb</a>
</dt>
<dt><a href="pair_coul.html#index-0">pair_style coul/cut</a>
</dt>
<dt><a href="pair_coul_diel.html#index-0">pair_style coul/diel</a>
</dt>
<dt><a href="pair_dpd.html#index-0">pair_style dpd</a>
</dt>
<dt><a href="pair_dsmc.html#index-0">pair_style dsmc</a>
</dt>
<dt><a href="pair_eam.html#index-0">pair_style eam</a>
</dt>
<dt><a href="pair_edip.html#index-0">pair_style edip</a>
</dt>
<dt><a href="pair_eff.html#index-0">pair_style eff/cut</a>
</dt>
<dt><a href="pair_eim.html#index-0">pair_style eim</a>
</dt>
<dt><a href="pair_gauss.html#index-0">pair_style gauss</a>
</dt>
<dt><a href="pair_gayberne.html#index-0">pair_style gayberne</a>
</dt>
<dt><a href="pair_gran.html#index-0">pair_style gran/hooke</a>
</dt>
<dt><a href="pair_hbond_dreiding.html#index-0">pair_style hbond/dreiding/lj</a>
</dt>
<dt><a href="pair_hybrid.html#index-0">pair_style hybrid</a>
</dt>
<dt><a href="pair_kim.html#index-0">pair_style kim</a>
</dt>
<dt><a href="pair_lcbop.html#index-0">pair_style lcbop</a>
</dt>
<dt><a href="pair_line_lj.html#index-0">pair_style line/lj</a>
</dt>
<dt><a href="pair_list.html#index-0">pair_style list</a>
</dt>
<dt><a href="pair_charmm.html#index-0">pair_style lj/charmm/coul/charmm</a>
</dt>
<dt><a href="pair_class2.html#index-0">pair_style lj/class2</a>
</dt>
<dt><a href="pair_lj_cubic.html#index-0">pair_style lj/cubic</a>
</dt>
<dt><a href="pair_lj.html#index-0">pair_style lj/cut</a>
</dt>
<dt><a href="pair_dipole.html#index-0">pair_style lj/cut/dipole/cut</a>
</dt>
<dt><a href="pair_lj_soft.html#index-0">pair_style lj/cut/soft</a>
</dt>
<dt><a href="pair_lj_expand.html#index-0">pair_style lj/expand</a>
</dt>
<dt><a href="pair_gromacs.html#index-0">pair_style lj/gromacs</a>
</dt>
<dt><a href="pair_lj_long.html#index-0">pair_style lj/long/coul/long</a>
</dt>
<dt><a href="pair_sdk.html#index-0">pair_style lj/sdk</a>
</dt>
<dt><a href="pair_lj_sf.html#index-0">pair_style lj/sf</a>
</dt>
<dt><a href="pair_lj_smooth.html#index-0">pair_style lj/smooth</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="pair_lj_smooth_linear.html#index-0">pair_style lj/smooth/linear</a>
</dt>
<dt><a href="pair_lj96.html#index-0">pair_style lj96/cut</a>
</dt>
<dt><a href="pair_lubricate.html#index-0">pair_style lubricate</a>
</dt>
<dt><a href="pair_lubricateU.html#index-0">pair_style lubricateU</a>
</dt>
<dt><a href="pair_meam.html#index-0">pair_style meam</a>
</dt>
<dt><a href="pair_mie.html#index-0">pair_style mie/cut</a>
</dt>
<dt><a href="pair_morse.html#index-0">pair_style morse</a>
</dt>
<dt><a href="pair_nb3b_harmonic.html#index-0">pair_style nb3b/harmonic</a>
</dt>
<dt><a href="pair_nm.html#index-0">pair_style nm/cut</a>
</dt>
<dt><a href="pair_none.html#index-0">pair_style none</a>
</dt>
<dt><a href="pair_peri.html#index-0">pair_style peri/pmb</a>
</dt>
<dt><a href="pair_polymorphic.html#index-0">pair_style polymorphic</a>
</dt>
<dt><a href="pair_quip.html#index-0">pair_style quip</a>
</dt>
<dt><a href="pair_reax.html#index-0">pair_style reax</a>
</dt>
<dt><a href="pair_reax_c.html#index-0">pair_style reax/c</a>
</dt>
<dt><a href="pair_resquared.html#index-0">pair_style resquared</a>
</dt>
<dt><a href="pair_smd_hertz.html#index-0">pair_style smd/hertz</a>
</dt>
<dt><a href="pair_smd_tlsph.html#index-0">pair_style smd/tlsph</a>
</dt>
<dt><a href="pair_smd_triangulated_surface.html#index-0">pair_style smd/tri_surface</a>
</dt>
<dt><a href="pair_smd_ulsph.html#index-0">pair_style smd/ulsph</a>
</dt>
<dt><a href="pair_snap.html#index-0">pair_style snap</a>
</dt>
<dt><a href="pair_soft.html#index-0">pair_style soft</a>
</dt>
<dt><a href="pair_sph_heatconduction.html#index-0">pair_style sph/heatconduction</a>
</dt>
<dt><a href="pair_sph_idealgas.html#index-0">pair_style sph/idealgas</a>
</dt>
<dt><a href="pair_sph_lj.html#index-0">pair_style sph/lj</a>
</dt>
<dt><a href="pair_sph_rhosum.html#index-0">pair_style sph/rhosum</a>
</dt>
<dt><a href="pair_sph_taitwater.html#index-0">pair_style sph/taitwater</a>
</dt>
<dt><a href="pair_sph_taitwater_morris.html#index-0">pair_style sph/taitwater/morris</a>
</dt>
<dt><a href="pair_srp.html#index-0">pair_style srp</a>
</dt>
<dt><a href="pair_sw.html#index-0">pair_style sw</a>
</dt>
<dt><a href="pair_table.html#index-0">pair_style table</a>
</dt>
<dt><a href="pair_tersoff.html#index-0">pair_style tersoff</a>
</dt>
<dt><a href="pair_tersoff_mod.html#index-0">pair_style tersoff/mod</a>
</dt>
<dt><a href="pair_tersoff_zbl.html#index-0">pair_style tersoff/zbl</a>
</dt>
<dt><a href="pair_thole.html#index-0">pair_style thole</a>
</dt>
<dt><a href="pair_tri_lj.html#index-0">pair_style tri/lj</a>
</dt>
<dt><a href="pair_yukawa.html#index-0">pair_style yukawa</a>
</dt>
<dt><a href="pair_yukawa_colloid.html#index-0">pair_style yukawa/colloid</a>
</dt>
<dt><a href="pair_zbl.html#index-0">pair_style zbl</a>
</dt>
<dt><a href="pair_write.html#index-0">pair_write</a>
</dt>
<dt><a href="partition.html#index-0">partition</a>
</dt>
<dt><a href="prd.html#index-0">prd</a>
</dt>
<dt><a href="print.html#index-0">print</a>
</dt>
<dt><a href="processors.html#index-0">processors</a>
</dt>
<dt><a href="python.html#index-0">python</a>
</dt>
</dl></td>
</tr></table>
<h2 id="Q">Q</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="quit.html#index-0">quit</a>
</dt>
</dl></td>
</tr></table>
<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="read_data.html#index-0">read_data</a>
</dt>
<dt><a href="read_dump.html#index-0">read_dump</a>
</dt>
<dt><a href="read_restart.html#index-0">read_restart</a>
</dt>
<dt><a href="region.html#index-0">region</a>
</dt>
<dt><a href="replicate.html#index-0">replicate</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="rerun.html#index-0">rerun</a>
</dt>
<dt><a href="reset_timestep.html#index-0">reset_timestep</a>
</dt>
<dt><a href="restart.html#index-0">restart</a>
</dt>
<dt><a href="run.html#index-0">run</a>
</dt>
<dt><a href="run_style.html#index-0">run_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="set.html#index-0">set</a>
</dt>
<dt><a href="shell.html#index-0">shell</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="special_bonds.html#index-0">special_bonds</a>
</dt>
<dt><a href="suffix.html#index-0">suffix</a>
</dt>
</dl></td>
</tr></table>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="tad.html#index-0">tad</a>
</dt>
<dt><a href="temper.html#index-0">temper</a>
</dt>
<dt><a href="thermo.html#index-0">thermo</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="thermo_modify.html#index-0">thermo_modify</a>
</dt>
<dt><a href="thermo_style.html#index-0">thermo_style</a>
</dt>
<dt><a href="timestep.html#index-0">timestep</a>
</dt>
</dl></td>
</tr></table>
<h2 id="U">U</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="uncompute.html#index-0">uncompute</a>
</dt>
<dt><a href="undump.html#index-0">undump</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="unfix.html#index-0">unfix</a>
</dt>
<dt><a href="units.html#index-0">units</a>
</dt>
</dl></td>
</tr></table>
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="variable.html#index-0">variable</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="velocity.html#index-0">velocity</a>
</dt>
</dl></td>
</tr></table>
<h2 id="W">W</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="write_data.html#index-0">write_data</a>
</dt>
<dt><a href="write_dump.html#index-0">write_dump</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="write_restart.html#index-0">write_restart</a>
</dt>
</dl></td>
</tr></table>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/doc2/package.html b/doc/doc2/package.html
index 5c0dd866d..d4b2a4fa5 100644
--- a/doc/doc2/package.html
+++ b/doc/doc2/package.html
@@ -1,666 +1,668 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>package command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>package style args
</PRE>
<UL><LI>style = <I>cuda</I> or <I>gpu</I> or <I>intel</I> or <I>kokkos</I> or <I>omp</I>
<LI>args = arguments specific to the style
<PRE> <I>cuda</I> args = Ngpu keyword value ...
Ngpu = # of GPUs per node
zero or more keyword/value pairs may be appended
keywords = <I>newton</I> or <I>gpuID</I> or <I>timing</I> or <I>test</I> or <I>thread</I>
<I>newton</I> = <I>off</I> or <I>on</I>
off = set Newton pairwise and bonded flags off (default)
on = set Newton pairwise and bonded flags on
<I>gpuID</I> values = gpu1 .. gpuN
gpu1 .. gpuN = IDs of the Ngpu GPUs to use
<I>timing</I> values = none
<I>test</I> values = id
id = atom-ID of a test particle
<I>thread</I> = auto or tpa or bpa
auto = test whether tpa or bpa is faster
tpa = one thread per atom
bpa = one block per atom
<I>gpu</I> args = Ngpu keyword value ...
Ngpu = # of GPUs per node
zero or more keyword/value pairs may be appended
keywords = <I>neigh</I> or <I>newton</I> or <I>binsize</I> or <I>split</I> or <I>gpuID</I> or <I>tpa</I> or <I>device</I>
<I>neigh</I> value = <I>yes</I> or <I>no</I>
yes = neighbor list build on GPU (default)
no = neighbor list build on CPU
<I>newton</I> = <I>off</I> or <I>on</I>
off = set Newton pairwise flag off (default and required)
on = set Newton pairwise flag on (currently not allowed)
<I>binsize</I> value = size
size = bin size for neighbor list construction (distance units)
<I>split</I> = fraction
fraction = fraction of atoms assigned to GPU (default = 1.0)
<I>gpuID</I> values = first last
first = ID of first GPU to be used on each node
last = ID of last GPU to be used on each node
<I>tpa</I> value = Nthreads
Nthreads = # of GPU threads used per atom
<I>device</I> value = device_type
device_type = <I>kepler</I> or <I>fermi</I> or <I>cypress</I> or <I>generic</I>
+ <I>blocksize</I> value = size
+ size = thread block size for pair force computation
<I>intel</I> args = NPhi keyword value ...
Nphi = # of coprocessors per node
zero or more keyword/value pairs may be appended
keywords = <I>omp</I> or <I>mode</I> or <I>balance</I> or <I>ghost</I> or <I>tpc</I> or <I>tptask</I> or <I>no_affinity</I>
<I>omp</I> value = Nthreads
Nthreads = number of OpenMP threads to use on CPU (default = 0)
<I>mode</I> value = <I>single</I> or <I>mixed</I> or <I>double</I>
single = perform force calculations in single precision
mixed = perform force calculations in mixed precision
double = perform force calculations in double precision
<I>balance</I> value = split
split = fraction of work to offload to coprocessor, -1 for dynamic
<I>ghost</I> value = <I>yes</I> or <I>no</I>
yes = include ghost atoms for offload
no = do not include ghost atoms for offload
<I>tpc</I> value = Ntpc
Ntpc = max number of coprocessor threads per coprocessor core (default = 4)
<I>tptask</I> value = Ntptask
Ntptask = max number of coprocessor threads per MPI task (default = 240)
<I>no_affinity</I> values = none
<I>kokkos</I> args = keyword value ...
zero or more keyword/value pairs may be appended
keywords = <I>neigh</I> or <I>newton</I> or <I>binsize</I> or <I>comm</I> or <I>comm/exchange</I> or <I>comm/forward</I>
<I>neigh</I> value = <I>full</I> or <I>half/thread</I> or <I>half</I> or <I>n2</I> or <I>full/cluster</I>
full = full neighbor list
half/thread = half neighbor list built in thread-safe manner
half = half neighbor list, not thread-safe, only use when 1 thread/MPI task
n2 = non-binning neighbor list build, O(N^2) algorithm
full/cluster = full neighbor list with clustered groups of atoms
<I>newton</I> = <I>off</I> or <I>on</I>
off = set Newton pairwise and bonded flags off (default)
on = set Newton pairwise and bonded flags on
<I>binsize</I> value = size
size = bin size for neighbor list construction (distance units)
<I>comm</I> value = <I>no</I> or <I>host</I> or <I>device</I>
use value for both comm/exchange and comm/forward
<I>comm/exchange</I> value = <I>no</I> or <I>host</I> or <I>device</I>
<I>comm/forward</I> value = <I>no</I> or <I>host</I> or <I>device</I>
no = perform communication pack/unpack in non-KOKKOS mode
host = perform pack/unpack on host (e.g. with OpenMP threading)
device = perform pack/unpack on device (e.g. on GPU)
<I>omp</I> args = Nthreads keyword value ...
Nthread = # of OpenMP threads to associate with each MPI process
zero or more keyword/value pairs may be appended
keywords = <I>neigh</I>
<I>neigh</I> value = <I>yes</I> or <I>no</I>
yes = threaded neighbor list build (default)
no = non-threaded neighbor list build
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>package gpu 1
package gpu 1 split 0.75
package gpu 2 split -1.0
package cuda 2 gpuID 0 2
package cuda 1 test 3948
package kokkos neigh half/thread comm device
package omp 0 neigh no
package omp 4
package intel 1
package intel 2 omp 4 mode mixed balance 0.5
</PRE>
<P><B>Description:</B>
</P>
<P>This command invokes package-specific settings for the various
accelerator packages available in LAMMPS. Currently the following
packages use settings from this command: USER-CUDA, GPU, USER-INTEL,
KOKKOS, and USER-OMP.
</P>
<P>If this command is specified in an input script, it must be near the
top of the script, before the simulation box has been defined. This
is because it specifies settings that the accelerator packages use in
their intialization, before a simultion is defined.
</P>
<P>This command can also be specified from the command-line when
launching LAMMPS, using the "-pk" <A HREF = "Section_start.html#start_7">command-line
switch</A>. The syntax is exactly the same as
when used in an input script.
</P>
<P>Note that all of the accelerator packages require the package command
to be specified (except the OPT package), if the package is to be used
in a simulation (LAMMPS can be built with an accelerator package
without using it in a particular simulation). However, in all cases,
a default version of the command is typically invoked by other
accelerator settings.
</P>
<P>The USER-CUDA and KOKKOS packages require a "-c on" or "-k on"
<A HREF = "Section_start.html#start_7">command-line switch</A> respectively, which
invokes a "package cuda" or "package kokkos" command with default
settings.
</P>
<P>For the GPU, USER-INTEL, and USER-OMP packages, if a "-sf gpu" or "-sf
intel" or "-sf omp" <A HREF = "Section_start.html#start_7">command-line switch</A>
is used to auto-append accelerator suffixes to various styles in the
input script, then those switches also invoke a "package gpu",
"package intel", or "package omp" command with default settings.
</P>
<P>IMPORTANT NOTE: A package command for a particular style can be
invoked multiple times when a simulation is setup, e.g. by the "-c
on", "-k on", "-sf", and "-pk" <A HREF = "Section_start.html#start_7">command-line
switches</A>, and by using this command in an
input script. Each time it is used all of the style options are set,
either to default values or to specified settings. I.e. settings from
previous invocations do not persist across multiple invocations.
</P>
<P>See the <A HREF = "Section_accelerate.html">Section Accelerate</A> section of the
manual for more details about using the various accelerator packages
for speeding up LAMMPS simulations.
</P>
<HR>
<P>The <I>cuda</I> style invokes settings associated with the use of the
USER-CUDA package.
</P>
<P>The <I>Ngpus</I> argument sets the number of GPUs per node. There must be
exactly one MPI task per GPU, as set by the mpirun or mpiexec command.
</P>
<P>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.
</P>
<P>The <I>newton</I> keyword sets the Newton flags for pairwise and bonded
interactions to <I>off</I> or <I>on</I>, the same as the <A HREF = "newton.html">newton</A>
command allows. The default is <I>off</I> because this will almost always
give better performance for the USER-CUDA package. This means
more computation is done, but less communication.
</P>
<P>The <I>gpuID</I> keyword allows selection of which GPUs on each node will
be used for a simulation. GPU IDs range from 0 to N-1 where N is the
physical number of GPUs/node. An ID is specified for each of the
Ngpus being used. For example if you have three GPUs on a machine,
one of which is used for the X-Server (the GPU with the ID 1) while
the others (with IDs 0 and 2) are used for computations you would
specify:
</P>
<PRE>package cuda 2 gpuID 0 2
</PRE>
<P>The purpose of the <I>gpuID</I> keyword is to allow two (or more)
simulations to be run on one workstation. In that case one could set
the first simulation to use GPU 0 and the second to use GPU 1. This is
not necessary however, if the GPUs are in what is called <I>compute
exclusive</I> mode. Using that setting, every process will get its own
GPU automatically. This <I>compute exclusive</I> mode can be set as root
using the <I>nvidia-smi</I> tool which is part of the CUDA installation.
</P>
<P>Also note that if the <I>gpuID</I> keyword is not used, the USER-CUDA
package sorts existing GPUs on each node according to their number of
multiprocessors. This way, compute GPUs will be priorized over
X-Server GPUs.
</P>
<P>If the <I>timing</I> keyword is specified, detailed timing information for
various subroutines will be output.
</P>
<P>If the <I>test</I> keyword is specified, information for the specified atom
with atom-ID will be output at several points during each timestep.
This is mainly usefull for debugging purposes. Note that the
simulation slow down dramatically if this option is used.
</P>
<P>The <I>thread</I> keyword can be used to specify how GPU threads are
assigned work during pair style force evaluation. If the value =
<I>tpa</I>, one thread per atom is used. If the value = <I>bpa</I>, one block
per atom is used. If the value = <I>auto</I>, a short test is performed at
the beginning of each run to determing where <I>tpa</I> or <I>bpa</I> mode is
faster. The result of this test is output. Since <I>auto</I> is the
default value, it is usually not necessary to use this keyword.
</P>
<HR>
<P>The <I>gpu</I> style invokes settings associated with the use of the GPU
package.
</P>
<P>The <I>Ngpu</I> argument sets the number of GPUs per node. There must be
at least as many MPI tasks per node as GPUs, as set by the mpirun or
mpiexec command. If there are more MPI tasks (per node)
than GPUs, multiple MPI tasks will share each GPU.
</P>
<P>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.
</P>
<P>The <I>neigh</I> keyword specifies where neighbor lists for pair style
computation will be built. If <I>neigh</I> is <I>yes</I>, which is the default,
neighbor list building is performed on the GPU. If <I>neigh</I> is <I>no</I>,
neighbor list building is performed on the CPU. GPU neighbor list
building currently cannot be used with a triclinic box. GPU neighbor
list calculation currently cannot be used with
<A HREF = "pair_hybrid.html">hybrid</A> pair styles. GPU neighbor lists are not
compatible with comannds that are not GPU-enabled. When a non-GPU
enabled command requires a neighbor list, it will also be built on the
CPU. In these cases, it will typically be more efficient to only use
CPU neighbor list builds.
</P>
<P>The <I>newton</I> keyword sets the Newton flags for pairwise (not bonded)
interactions to <I>off</I> or <I>on</I>, the same as the <A HREF = "newton.html">newton</A>
command allows. Currently, only an <I>off</I> value is allowed, since all
the GPU package pair styles require this setting. This means more
computation is done, but less communication. In the future a value of
<I>on</I> may be allowed, so the <I>newton</I> keyword is included as an option
for compatibility with the package command for other accelerator
styles. Note that the newton setting for bonded interactions is not
affected by this keyword.
</P>
<P>The <I>binsize</I> keyword sets the size of bins used to bin atoms in
neighbor list builds performed on the GPU, if <I>neigh</I> = <I>yes</I> is set.
If <I>binsize</I> is set to 0.0 (the default), then bins = the size of the
pairwise cutoff + neighbor skin distance. This is 2x larger than the
LAMMPS default used for neighbor list building on the CPU. This will
be close to optimal for the GPU, so you do not normally need to use
this keyword. Note that if you use a longer-than-usual pairwise
cutoff, e.g. to allow for a smaller fraction of KSpace work with a
<A HREF = "kspace_style.html">long-range Coulombic solver</A> because the GPU is
faster at performing pairwise interactions, then it may be optimal to
make the <I>binsize</I> smaller than the default. For example, with a
cutoff of 20*sigma in LJ <A HREF = "units.html">units</A> and a neighbor skin
distance of sigma, a <I>binsize</I> = 5.25*sigma can be more efficient than
the default.
</P>
<P>The <I>split</I> keyword can be used for load balancing force calculations
between CPU and GPU cores in GPU-enabled pair styles. If 0 < <I>split</I> <
1.0, a fixed fraction of particles is offloaded to the GPU while force
calculation for the other particles occurs simulataneously on the CPU.
If <I>split</I> < 0.0, the optimal fraction (based on CPU and GPU timings)
is calculated every 25 timesteps, i.e. dynamic load-balancing across
the CPU and GPU is performed. If <I>split</I> = 1.0, all force
calculations for GPU accelerated pair styles are performed on the GPU.
In this case, other <A HREF = "pair_hybrid.html">hybrid</A> pair interactions,
<A HREF = "bond_style.html">bond</A>, <A HREF = "angle_style.html">angle</A>,
<A HREF = "dihedral_style.html">dihedral</A>, <A HREF = "improper_style.html">improper</A>, and
<A HREF = "kspace_style.html">long-range</A> calculations can be performed on the
CPU while the GPU is performing force calculations for the GPU-enabled
pair style. If all CPU force computations complete before the GPU
completes, LAMMPS will block until the GPU has finished before
continuing the timestep.
</P>
<P>As an example, if you have two GPUs per node and 8 CPU cores per node,
and would like to run on 4 nodes (32 cores) with dynamic balancing of
force calculation across CPU and GPU cores, you could specify
</P>
<PRE>mpirun -np 32 -sf gpu -in in.script # launch command
package gpu 2 split -1 # input script command
</PRE>
<P>In this case, all CPU cores and GPU devices on the nodes would be
utilized. Each GPU device would be shared by 4 CPU cores. The CPU
cores would perform force calculations for some fraction of the
particles at the same time the GPUs performed force calculation for
the other particles.
</P>
<P>The <I>gpuID</I> keyword allows selection of which GPUs on each node will
be used for a simulation. The <I>first</I> and <I>last</I> values specify the
GPU IDs to use (from 0 to Ngpu-1). By default, first = 0 and last =
Ngpu-1, so that all GPUs are used, assuming Ngpu is set to the number
of physical GPUs. If you only wish to use a subset, set Ngpu to a
smaller number and first/last to a sub-range of the available GPUs.
</P>
<P>The <I>tpa</I> keyword sets the number of GPU thread per atom used to
perform force calculations. With a default value of 1, the number of
threads will be chosen based on the pair style, however, the value can
be set explicitly with this keyword to fine-tune performance. For
large cutoffs or with a small number of particles per GPU, increasing
the value can improve performance. The number of threads per atom must
be a power of 2 and currently cannot be greater than 32.
</P>
<P>The <I>device</I> keyword can be used to tune parameters optimized for a
specific accelerator, when using OpenCL. For CUDA, the <I>device</I>
keyword is ignored. Currently, the device type is limited to NVIDIA
Kepler, NVIDIA Fermi, AMD Cypress, or a generic device. More devices
may be added later. The default device type can be specified when
building LAMMPS with the GPU library, via settings in the
lib/gpu/Makefile that is used.
</P>
<HR>
<P>The <I>intel</I> style invokes settings associated with the use of the
USER-INTEL package. All of its settings, except the <I>omp</I> and <I>mode</I>
keywords, are ignored if LAMMPS was not built with Xeon Phi
coprocessor support. All of its settings, including the <I>omp</I> and
<I>mode</I> keyword are applicable if LAMMPS was built with coprocessor
support.
</P>
<P>The <I>Nphi</I> argument sets the number of coprocessors per node.
This can be set to any value, including 0, if LAMMPS was not
built with coprocessor support.
</P>
<P>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.
</P>
<P>The <I>omp</I> keyword determines the number of OpenMP threads allocated
for each MPI task when any portion of the interactions computed by a
USER-INTEL pair style are run on the CPU. This can be the case even
if LAMMPS was built with coprocessor support; see the <I>balance</I>
keyword discussion below. If you are running with less MPI tasks/node
than there are CPUs, it can be advantageous to use OpenMP threading on
the CPUs.
</P>
<P>IMPORTANT NOTE: The <I>omp</I> keyword has nothing to do with coprocessor
threads on the Xeon Phi; see the <I>tpc</I> and <I>tptask</I> keywords below for
a discussion of coprocessor threads.
</P>
<P>The <I>Nthread</I> value for the <I>omp</I> keyword sets the number of OpenMP
threads allocated for each MPI task. Setting <I>Nthread</I> = 0 (the
default) instructs LAMMPS to use whatever value is the default for the
given OpenMP environment. This is usually determined via the
<I>OMP_NUM_THREADS</I> environment variable or the compiler runtime, which
is usually a value of 1.
</P>
<P>For more details, including examples of how to set the OMP_NUM_THREADS
environment variable, see the discussion of the <I>Nthreads</I> setting on
this doc page for the "package omp" command. Nthreads is a required
argument for the USER-OMP package. Its meaning is exactly the same
for the USER-INTEL pacakge.
</P>
<P>IMPORTANT NOTE: If you build LAMMPS with both the USER-INTEL and
USER-OMP packages, be aware that both packages allow setting of the
<I>Nthreads</I> value via their package commands, but there is only a
single global <I>Nthreads</I> value used by OpenMP. Thus if both package
commands are invoked, you should insure the two values are consistent.
If they are not, the last one invoked will take precedence, for both
packages. Also note that if the "-sf intel" <A HREF = <A HREF = "Section_start.html#start_7">command-line"></A>
switch</A> is used, it invokes a "package
intel" command, followed by a "package omp" command, both with a
setting of <I>Nthreads</I> = 0.
</P>
<P>The <I>mode</I> keyword determines the precision mode to use for
computing pair style forces, either on the CPU or on the coprocessor,
when using a USER-INTEL supported <A HREF = "pair_style.html">pair style</A>. It
can take a value of <I>single</I>, <I>mixed</I> which is the default, or
<I>double</I>. <I>Single</I> means single precision is used for the entire
force calculation. <I>Mixed</I> means forces between a pair of atoms are
computed in single precision, but accumulated and stored in double
precision, including storage of forces, torques, energies, and virial
quantities. <I>Double</I> means double precision is used for the entire
force calculation.
</P>
<P>The <I>balance</I> keyword sets the fraction of <A HREF = "pair_style.html">pair
style</A> work offloaded to the coprocessor for split
values between 0.0 and 1.0 inclusive. While this fraction of work is
running on the coprocessor, other calculations will run on the host,
including neighbor and pair calculations that are not offloaded, as
well as angle, bond, dihedral, kspace, and some MPI communications.
If <I>split</I> is set to -1, the fraction of work is dynamically adjusted
automatically throughout the run. This typically give performance
within 5 to 10 percent of the optimal fixed fraction.
</P>
<P>The <I>ghost</I> keyword determines whether or not ghost atoms, i.e. atoms
at the boundaries of proessor sub-domains, are offloaded for neighbor
and force calculations. When the value = "no", ghost atoms are not
offloaded. This option can reduce the amount of data transfer with
the coprocessor and can also overlap MPI communication of forces with
computation on the coprocessor when the <A HREF = "newton.html">newton pair</A>
setting is "on". When the value = "yes", ghost atoms are offloaded.
In some cases this can provide better performance, especially if the
<I>balance</I> fraction is high.
</P>
<P>The <I>tpc</I> keyword sets the max # of coprocessor threads <I>Ntpc</I> that
will run on each core of the coprocessor. The default value = 4,
which is the number of hardware threads per core supported by the
current generation Xeon Phi chips.
</P>
<P>The <I>tptask</I> keyword sets the max # of coprocessor threads (Ntptask</I>
assigned to each MPI task. The default value = 240, which is the
total # of threads an entire current generation Xeon Phi chip can run
(240 = 60 cores * 4 threads/core). This means each MPI task assigned
to the Phi will enough threads for the chip to run the max allowed,
even if only 1 MPI task is assigned. If 8 MPI tasks are assigned to
the Phi, each will run with 30 threads. If you wish to limit the
number of threads per MPI task, set <I>tptask</I> to a smaller value.
E.g. for <I>tptask</I> = 16, if 8 MPI tasks are assigned, each will run
with 16 threads, for a total of 128.
</P>
<P>Note that the default settings for <I>tpc</I> and <I>tptask</I> are fine for
most problems, regardless of how many MPI tasks you assign to a Phi.
</P>
<P>The <I>no_affinity</I> keyword will turn off automatic setting of core
affinity for MPI tasks and OpenMP threads on the host when using
offload to a coprocessor. Affinity settings are used when possible
to prevent MPI tasks and OpenMP threads from being on separate NUMA
domains and to prevent offload threads from interfering with other
processes/threads used for LAMMPS.
</P>
<HR>
<P>The <I>kokkos</I> style invokes settings associated with the use of the
KOKKOS package.
</P>
<P>All of the settings are optional keyword/value pairs. Each has a
default value as listed below.
</P>
<P>The <I>neigh</I> keyword determines how neighbor lists are built. A value
of <I>half</I> uses half-neighbor lists, the same as used by most pair
styles in LAMMPS. A value of <I>half/thread</I> uses a thread-safe variant
of the half-neighbor list. It should be used instead of <I>half</I> when
running with more than 1 threads per MPI task on a CPU. A value of
<I>n2</I> uses an O(N^2) algorithm to build the neighbor list without
binning, where N = # of atoms on a processor. It is typically slower
than the other methods, which use binning.
</P>
<P>A value of <I>full</I> uses a full neighbor lists and is the default. This
performs twice as much computation as the <I>half</I> option, however that
is often a win because it is thread-safe and doesn't require atomic
operations in the calculation of pair forces. For that reason, <I>full</I>
is the default setting. However, when running in MPI-only mode with 1
thread per MPI task, <I>half</I> neighbor lists will typically be faster,
just as it is for non-accelerated pair styles.
</P>
<P>A value of <I>full/cluster</I> is an experimental neighbor style, where
particles interact with all particles within a small cluster, if at
least one of the clusters particles is within the neighbor cutoff
range. This potentially allows for better vectorization on
architectures such as the Intel Phi. If also reduces the size of the
neighbor list by roughly a factor of the cluster size, thus reducing
the total memory footprint considerably.
</P>
<P>The <I>newton</I> keyword sets the Newton flags for pairwise and bonded
interactions to <I>off</I> or <I>on</I>, the same as the <A HREF = "newton.html">newton</A>
command allows. The default is <I>off</I> because this will almost always
give better performance for the KOKKOS package. This means more
computation is done, but less communication. However, when running in
MPI-only mode with 1 thread per MPI task, a value of <I>on</I> will
typically be faster, just as it is for non-accelerated pair styles.
</P>
<P>The <I>binsize</I> keyword sets the size of bins used to bin atoms in
neighbor list builds. The same value can be set by the <A HREF = "neigh_modify.html">neigh_modify
binsize</A> command. Making it an option in the
package kokkos command allows it to be set from the command line. The
default value is 0.0, which means the LAMMPS default will be used,
which is bins = 1/2 the size of the pairwise cutoff + neighbor skin
distance. This is fine when neighbor lists are built on the CPU. For
GPU builds, a 2x larger binsize equal to the pairwise cutoff +
neighbor skin, is often faster, which can be set by this keyword.
Note that if you use a longer-than-usual pairwise cutoff, e.g. to
allow for a smaller fraction of KSpace work with a <A HREF = "kspace_style.html">long-range
Coulombic solver</A> because the GPU is faster at
performing pairwise interactions, then this rule of thumb may give too
large a binsize.
</P>
<P>The <I>comm</I> and <I>comm/exchange</I> and <I>comm/forward</I> keywords determine
whether the host or device performs the packing and unpacking of data
when communicating per-atom data between processors. "Exchange"
communication happens only on timesteps that neighbor lists are
rebuilt. The data is only for atoms that migrate to new processors.
"Forward" communication happens every timestep. The data is for atom
coordinates and any other atom properties that needs to be updated for
ghost atoms owned by each processor.
</P>
<P>The <I>comm</I> keyword is simply a short-cut to set the same value
for both the <I>comm/exchange</I> and <I>comm/forward</I> keywords.
</P>
<P>The value options for all 3 keywords are <I>no</I> or <I>host</I> or <I>device</I>.
A value of <I>no</I> means to use the standard non-KOKKOS method of
packing/unpacking data for the communication. A value of <I>host</I> means
to use the host, typically a multi-core CPU, and perform the
packing/unpacking in parallel with threads. A value of <I>device</I> means
to use the device, typically a GPU, to perform the packing/unpacking
operation.
</P>
<P>The optimal choice for these keywords depends on the input script and
the hardware used. The <I>no</I> value is useful for verifying that the
Kokkos-based <I>host</I> and <I>device</I> values are working correctly. It may
also be the fastest choice when using Kokkos styles in MPI-only mode
(i.e. with a thread count of 1).
</P>
<P>When running on CPUs or Xeon Phi, the <I>host</I> and <I>device</I> values work
identically. When using GPUs, the <I>device</I> value will typically be
optimal if all of your styles used in your input script are supported
by the KOKKOS package. In this case data can stay on the GPU for many
timesteps without being moved between the host and GPU, if you use the
<I>device</I> value. This requires that your MPI is able to access GPU
memory directly. Currently that is true for OpenMPI 1.8 (or later
versions), Mvapich2 1.9 (or later), and CrayMPI. If your script uses
styles (e.g. fixes) which are not yet supported by the KOKKOS package,
then data has to be move between the host and device anyway, so it is
typically faster to let the host handle communication, by using the
<I>host</I> value. Using <I>host</I> instead of <I>no</I> will enable use of
multiple threads to pack/unpack communicated data.
</P>
<HR>
<P>The <I>omp</I> style invokes settings associated with the use of the
USER-OMP package.
</P>
<P>The <I>Nthread</I> argument sets the number of OpenMP threads allocated for
each MPI task. For example, if your system has nodes with dual
quad-core processors, it has a total of 8 cores per node. You could
use two MPI tasks per node (e.g. using the -ppn option of the mpirun
command in MPICH or -npernode in OpenMPI), and set <I>Nthreads</I> = 4.
This would use all 8 cores on each node. Note that the product of MPI
tasks * threads/task should not exceed the physical number of cores
(on a node), otherwise performance will suffer.
</P>
<P>Setting <I>Nthread</I> = 0 instructs LAMMPS to use whatever value is the
default for the given OpenMP environment. This is usually determined
via the <I>OMP_NUM_THREADS</I> environment variable or the compiler
runtime. Note that in most cases the default for OpenMP capable
compilers is to use one thread for each available CPU core when
<I>OMP_NUM_THREADS</I> is not explicitly set, which can lead to poor
performance.
</P>
<P>Here are examples of how to set the environment variable when
launching LAMMPS:
</P>
<PRE>env OMP_NUM_THREADS=4 lmp_machine -sf omp -in in.script
env OMP_NUM_THREADS=2 mpirun -np 2 lmp_machine -sf omp -in in.script
mpirun -x OMP_NUM_THREADS=2 -np 2 lmp_machine -sf omp -in in.script
</PRE>
<P>or you can set it permanently in your shell's start-up script.
All three of these examples use a total of 4 CPU cores.
</P>
<P>Note that different MPI implementations have different ways of passing
the OMP_NUM_THREADS environment variable to all MPI processes. The
2nd example line above is for MPICH; the 3rd example line with -x is
for OpenMPI. Check your MPI documentation for additional details.
</P>
<P>What combination of threads and MPI tasks gives the best performance
is difficult to predict and can depend on many components of your
input. Not all features of LAMMPS support OpenMP threading via the
USER-OMP packaage and the parallel efficiency can be very different,
too.
</P>
<P>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.
</P>
<P>The <I>neigh</I> keyword specifies whether neighbor list building will be
multi-threaded in addition to force calculations. If <I>neigh</I> is set
to <I>no</I> then neighbor list calculation is performed only by MPI tasks
with no OpenMP threading. If <I>mode</I> is <I>yes</I> (the default), a
multi-threaded neighbor list build is used. Using <I>neigh</I> = <I>yes</I> is
almost always faster and should produce idential neighbor lists at the
expense of using more memory. Specifically, neighbor list pages are
allocated for all threads at the same time and each thread works
within its own pages.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
<P>This command cannot be used after the simulation box is defined by a
<A HREF = "read_data.html">read_data</A> or <A HREF = "create_box.html">create_box</A> command.
</P>
<P>The cuda style of this command can only be invoked if LAMMPS was built
with the USER-CUDA package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>The gpu style of this command can only be invoked if LAMMPS was built
with the GPU package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>The intel style of this command can only be invoked if LAMMPS was
built with the USER-INTEL package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>The kk style of this command can only be invoked if LAMMPS was built
with the KOKKOS package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>The omp style of this command can only be invoked if LAMMPS was built
with the USER-OMP package. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "suffix.html">suffix</A>, "-pk" <A HREF = "Section_start.html#start_7">command-line
setting</A>
</P>
<P><B>Default:</B>
</P>
<P>For the USER-CUDA package, the default is Ngpu = 1 and the option
defaults are newton = off, gpuID = 0 to Ngpu-1, timing = not enabled,
test = not enabled, and thread = auto. These settings are made
automatically by the required "-c on" <A HREF = "Section_start.html#start_7">command-line
switch</A>. You can change them bu using the
package cuda command in your input script or via the "-pk cuda"
<A HREF = "Section_start.html#start_7">command-line switch</A>.
</P>
<P>For the GPU package, the default is Ngpu = 1 and the option defaults
are neigh = yes, newton = off, binsize = 0.0, split = 1.0, gpuID = 0
to Ngpu-1, tpa = 1, and device = not used. These settings are made
automatically if the "-sf gpu" <A HREF = "Section_start.html#start_7">command-line
switch</A> is used. If it is not used, you
must invoke the package gpu command in your input script or via the
"-pk gpu" <A HREF = "Section_start.html#start_7">command-line switch</A>.
</P>
<P>For the USER-INTEL package, the default is Nphi = 1 and the option
defaults are omp = 0, mode = mixed, balance = -1, tpc = 4, tptask =
240. The default ghost option is determined by the pair style being
used. This value is output to the screen in the offload report at the
end of each run. Note that all of these settings, except "omp" and
"mode", are ignored if LAMMPS was not built with Xeon Phi coprocessor
support. These settings are made automatically if the "-sf intel"
<A HREF = "Section_start.html#start_7">command-line switch</A> is used. If it is
not used, you must invoke the package intel command in your input
script or or via the "-pk intel" <A HREF = "Section_start.html#start_7">command-line
switch</A>.
</P>
<P>For the KOKKOS package, the option defaults neigh = full, newton =
off, binsize = 0.0, and comm = host. These settings are made
automatically by the required "-k on" <A HREF = "Section_start.html#start_7">command-line
switch</A>. You can change them bu using the
package kokkos command in your input script or via the "-pk kokkos"
<A HREF = "Section_start.html#start_7">command-line switch</A>.
</P>
<P>For the OMP package, the default is Nthreads = 0 and the option
defaults are neigh = yes. These settings are made automatically if
the "-sf omp" <A HREF = "Section_start.html#start_7">command-line switch</A> is
used. If it is not used, you must invoke the package omp command in
your input script or via the "-pk omp" <A HREF = "Section_start.html#start_7">command-line
switch</A>.
</P>
</HTML>
diff --git a/doc/doc2/pair_lj_cubic.html b/doc/doc2/pair_lj_cubic.html
index 386a41988..e173da74a 100644
--- a/doc/doc2/pair_lj_cubic.html
+++ b/doc/doc2/pair_lj_cubic.html
@@ -1,137 +1,139 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>pair_style lj/cubic command
</H3>
+<H3>pair_style lj/cubic/gpu command
+</H3>
<H3>pair_style lj/cubic/omp command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_style lj/cubic
</PRE>
<P><B>Examples:</B>
</P>
<PRE>pair_style lj/cubic
pair_coeff * * 1.0 0.8908987
</PRE>
<P><B>Description:</B>
</P>
<P>The <I>lj/cubic</I> style computes a truncated LJ interaction potential whose
energy and force are continuous everywhere.
Inside the inflection point the interaction is identical to the
standard 12/6 <A HREF = "pair_lj.html">Lennard-Jones</A> potential.
The LJ function outside the inflection point is replaced
with a cubic function of distance. The energy, force, and second
derivative are continuous at the inflection point.
The cubic coefficient A3 is chosen so
that both energy and force go to zero at the cutoff distance.
Outside the cutoff distance the energy and force are zero.
</P>
<CENTER><IMG SRC = "Eqs/pair_lj_cubic.jpg">
</CENTER>
<P>The location of the inflection point rs is defined
by the LJ diameter, rs/sigma = (26/7)^1/6. The cutoff distance
is defined by rc/rs = 67/48 or rc/sigma = 1.737....
The analytic expression for the
the cubic coefficient
A3*rmin^3/epsilon = 27.93... is given in the paper by
Holian and Ravelo <A HREF = "#Holian">(Holian)</A>.
</P>
<P>This potential is commonly used to study the shock mechanics
of FCC solids, as in Ravelo et al. <A HREF = "#Ravelo">(Ravelo)</A>.
</P>
<P>The following coefficients must be defined for each pair of atom
types via the <A HREF = "pair_coeff.html">pair_coeff</A> command as in the example
above, or in the data file or restart files read by the
<A HREF = "read_data.html">read_data</A> or <A HREF = "read_restart.html">read_restart</A>
commands, or by mixing as described below:
</P>
<UL><LI>epsilon (energy units)
<LI>sigma (distance units)
</UL>
<P>Note that sigma is defined in the LJ formula as the zero-crossing
distance for the potential, not as the energy minimum, which
is located at rmin = 2^(1/6)*sigma. In the above example, sigma = 0.8908987,
so rmin = 1.
</P>
<HR>
<P>Styles with a <I>cuda</I>, <I>gpu</I>, <I>intel</I>, <I>kk</I>, <I>omp</I>, or <I>opt</I> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <A HREF = "Section_accelerate.html">Section_accelerate</A>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.
</P>
<P>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
switch</A> when you invoke LAMMPS, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
more instructions on how to use the accelerated styles effectively.
</P>
<HR>
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
</P>
<P>For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/cut pair styles can be mixed.
The default mix value is <I>geometric</I>. See the "pair_modify" command
for details.
</P>
<P>The lj/cubic pair style does not support the
<A HREF = "pair_modify.html">pair_modify</A> shift option,
since pair interaction is already smoothed to 0.0 at the
cutoff.
</P>
<P>The <A HREF = "pair_modify.html">pair_modify</A> table option is not relevant
for this pair style.
</P>
<P>The lj/cubic pair style does not support the
<A HREF = "pair_modify.html">pair_modify</A> tail option for adding long-range tail
corrections to energy and pressure, since there are no corrections for
a potential that goes to 0.0 at the cutoff.
</P>
<P>The lj/cubic pair style writes its information to <A HREF = "restart.html">binary
restart files</A>, so pair_style and pair_coeff commands do
not need to be specified in an input script that reads a restart file.
</P>
<P>The lj/cubic pair style can only be used via the <I>pair</I>
keyword of the <A HREF = "run_style.html">run_style respa</A> command. It does not
support the <I>inner</I>, <I>middle</I>, <I>outer</I> keywords.
</P>
<HR>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_coeff.html">pair_coeff</A>
</P>
<P><B>Default:</B> none
</P>
<HR>
<A NAME = "Holian"></A>
<A NAME = "Ravelo"></A><B>(Holian)</B> Holian and Ravelo, Phys Rev B, 51, 11275 (1995).
<P><B>(Ravelo)</B> Ravelo, Holian, Germann and Lomdahl, Phys Rev B, 70, 014103 (2004).
</P>
</HTML>
diff --git a/doc/doc2/pair_tersoff.html b/doc/doc2/pair_tersoff.html
index 1d17fc697..4e4540c87 100644
--- a/doc/doc2/pair_tersoff.html
+++ b/doc/doc2/pair_tersoff.html
@@ -1,265 +1,267 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>pair_style tersoff command
</H3>
<H3>pair_style tersoff/table command
</H3>
<H3>pair_style tersoff/cuda
</H3>
+<H3>pair_style tersoff/gpu
+</H3>
<H3>pair_style tersoff/kk
</H3>
<H3>pair_style tersoff/omp
</H3>
<H3>pair_style tersoff/table/omp command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_style style
</PRE>
-<P>style = <I>tersoff</I> or <I>tersoff/table</I> or <I>tersoff/cuda</I> or <I>tersoff/omp</I> or <I>tersoff/table/omp</I>
+<P>style = <I>tersoff</I> or <I>tersoff/table</I> or <I>tersoff/cuda</I> or <I>tersoff/gpu</I> or <I>tersoff/omp</I> or <I>tersoff/table/omp</I>
</P>
<P><B>Examples:</B>
</P>
<PRE>pair_style tersoff
pair_coeff * * Si.tersoff Si
pair_coeff * * SiC.tersoff Si C Si
</PRE>
<PRE>pair_style tersoff/table
pair_coeff * * SiCGe.tersoff Si(D)
</PRE>
<P><B>Description:</B>
</P>
<P>The <I>tersoff</I> style computes a 3-body Tersoff potential
<A HREF = "#Tersoff_1">(Tersoff_1)</A> for the energy E of a system of atoms as
</P>
<CENTER><IMG SRC = "Eqs/pair_tersoff_1.jpg">
</CENTER>
<P>where f_R is a two-body term and f_A includes three-body interactions.
The summations in the formula are over all neighbors J and K of atom I
within a cutoff distance = R + D.
</P>
<P>The <I>tersoff/table</I> style uses tabulated forms for the two-body,
environment and angular functions. Linear interpolation is performed
between adjacent table entries. The table length is chosen to be
accurate within 10^-6 with respect to the <I>tersoff</I> style energy.
The <I>tersoff/table</I> should give better performance in terms of speed.
</P>
<P>Only a single pair_coeff command is used with the <I>tersoff</I> style
which specifies a Tersoff potential file with parameters for all
needed elements. These are mapped to LAMMPS atom types by specifying
N additional arguments after the filename in the pair_coeff command,
where N is the number of LAMMPS atom types:
</P>
<UL><LI>filename
<LI>N element names = mapping of Tersoff elements to atom types
</UL>
<P>See the <A HREF = "pair_coeff.html">pair_coeff</A> doc page for alternate ways
to specify the path for the potential file.
</P>
<P>As an example, imagine the SiC.tersoff file has Tersoff values for Si
and C. If your LAMMPS simulation has 4 atoms types and you want the
1st 3 to be Si, and the 4th to be C, you would use the following
pair_coeff command:
</P>
<PRE>pair_coeff * * SiC.tersoff Si Si Si C
</PRE>
<P>The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The first three Si arguments map LAMMPS atom types 1,2,3 to the Si
element in the Tersoff file. The final C argument maps LAMMPS atom
type 4 to the C element in the Tersoff file. If a mapping value is
specified as NULL, the mapping is not performed. This can be used
when a <I>tersoff</I> potential is used as part of the <I>hybrid</I> pair style.
The NULL values are placeholders for atom types that will be used with
other potentials.
</P>
<P>Tersoff files in the <I>potentials</I> directory of the LAMMPS distribution
have a ".tersoff" suffix. Lines that are not blank or comments
(starting with #) define parameters for a triplet of elements. The
parameters in a single entry correspond to coefficients in the formula
above:
</P>
<UL><LI>element 1 (the center atom in a 3-body interaction)
<LI>element 2 (the atom bonded to the center atom)
<LI>element 3 (the atom influencing the 1-2 bond in a bond-order sense)
<LI>m
<LI>gamma
<LI>lambda3 (1/distance units)
<LI>c
<LI>d
<LI>costheta0 (can be a value < -1 or > 1)
<LI>n
<LI>beta
<LI>lambda2 (1/distance units)
<LI>B (energy units)
<LI>R (distance units)
<LI>D (distance units)
<LI>lambda1 (1/distance units)
<LI>A (energy units)
</UL>
<P>The n, beta, lambda2, B, lambda1, and A parameters are only used for
two-body interactions. The m, gamma, lambda3, c, d, and costheta0
parameters are only used for three-body interactions. The R and D
parameters are used for both two-body and three-body interactions. The
non-annotated parameters are unitless. The value of m must be 3 or 1.
</P>
<P>The Tersoff potential file must contain entries for all the elements
listed in the pair_coeff command. It can also contain entries for
additional elements not being used in a particular simulation; LAMMPS
ignores those entries.
</P>
<P>For a single-element simulation, only a single entry is required
(e.g. SiSiSi). For a two-element simulation, the file must contain 8
entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that
specify Tersoff parameters for all permutations of the two elements
interacting in three-body configurations. Thus for 3 elements, 27
entries would be required, etc.
</P>
<P>As annotated above, the first element in the entry is the center atom
in a three-body interaction and it is bonded to the 2nd atom and the
bond is influenced by the 3rd atom. Thus an entry for SiCC means Si
bonded to a C with another C atom influencing the bond. Thus
three-body parameters for SiCSi and SiSiC entries will not, in
general, be the same. The parameters used for the two-body
interaction come from the entry where the 2nd element is repeated.
Thus the two-body parameters for Si interacting with C, comes from the
SiCC entry.
</P>
<P>The parameters used for a particular
three-body interaction come from the entry with the corresponding
three elements. The parameters used only for two-body interactions
(n, beta, lambda2, B, lambda1, and A) in entries whose 2nd and 3rd
element are different (e.g. SiCSi) are not used for anything and can
be set to 0.0 if desired.
</P>
<P>Note that the twobody parameters in entries such as SiCC and CSiSi
are often the same, due to the common use of symmetric mixing rules,
but this is not always the case. For example, the beta and n parameters in
Tersoff_2 <A HREF = "#Tersoff_2">(Tersoff_2)</A> are not symmetric.
</P>
<P>We chose the above form so as to enable users to define all commonly
used variants of the Tersoff potential. In particular, our form
reduces to the original Tersoff form when m = 3 and gamma = 1, while
it reduces to the form of <A HREF = "#Albe">Albe et al.</A> when beta = 1 and m = 1.
Note that in the current Tersoff implementation in LAMMPS, m must be
specified as either 3 or 1. Tersoff used a slightly different but
equivalent form for alloys, which we will refer to as Tersoff_2
potential <A HREF = "#Tersoff_2">(Tersoff_2)</A>. The <I>tersoff/table</I> style implements
Tersoff_2 parameterization only.
</P>
<P>LAMMPS parameter values for Tersoff_2 can be obtained as follows:
gamma_ijk = omega_ik, lambda3 = 0 and the value of
m has no effect. The parameters for species i and j can be calculated
using the Tersoff_2 mixing rules:
</P>
<CENTER><IMG SRC = "Eqs/pair_tersoff_2.jpg">
</CENTER>
<P>Tersoff_2 parameters R and S must be converted to the LAMMPS
parameters R and D (R is different in both forms), using the following
relations: R=(R'+S')/2 and D=(S'-R')/2, where the primes indicate the
Tersoff_2 parameters.
</P>
<P>In the potentials directory, the file SiCGe.tersoff provides the
LAMMPS parameters for Tersoff's various versions of Si, as well as his
alloy parameters for Si, C, and Ge. This file can be used for pure Si,
(three different versions), pure C, pure Ge, binary SiC, and binary
SiGe. LAMMPS will generate an error if this file is used with any
combination involving C and Ge, since there are no entries for the GeC
interactions (Tersoff did not publish parameters for this
cross-interaction.) Tersoff files are also provided for the SiC alloy
(SiC.tersoff) and the GaN (GaN.tersoff) alloys.
</P>
<P>Many thanks to Rutuparna Narulkar, David Farrell, and Xiaowang Zhou
for helping clarify how Tersoff parameters for alloys have been
defined in various papers.
</P>
<HR>
<P>Styles with a <I>cuda</I>, <I>gpu</I>, <I>intel</I>, <I>kk</I>, <I>omp</I>, or <I>opt</I> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <A HREF = "Section_accelerate.html">Section_accelerate</A>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.
</P>
<P>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
switch</A> when you invoke LAMMPS, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
more instructions on how to use the accelerated styles effectively.
</P>
<HR>
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
</P>
<P>For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS as
described above from values in the potential file.
</P>
<P>This pair style does not support the <A HREF = "pair_modify.html">pair_modify</A>
shift, table, and tail options.
</P>
<P>This pair style does not write its information to <A HREF = "restart.html">binary restart
files</A>, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.
</P>
<P>This pair style can only be used via the <I>pair</I> keyword of the
<A HREF = "run_style.html">run_style respa</A> command. It does not support the
<I>inner</I>, <I>middle</I>, <I>outer</I> keywords.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
<P>This pair style is part of the MANYBODY package. It is only enabled
if LAMMPS was built with that package (which it is by default). See
the <A HREF = "Section_start.html#start_3">Making LAMMPS</A> section for more info.
</P>
<P>This pair style requires the <A HREF = "newton.html">newton</A> setting to be "on"
for pair interactions.
</P>
<P>The Tersoff potential files provided with LAMMPS (see the potentials
directory) are parameterized for metal <A HREF = "units.html">units</A>. You can
use the Tersoff potential with any LAMMPS units, but you would need to
create your own Tersoff potential file with coefficients listed in the
appropriate units if your simulation doesn't use "metal" units.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_coeff.html">pair_coeff</A>
</P>
<P><B>Default:</B> none
</P>
<HR>
<A NAME = "Tersoff_1"></A>
<P><B>(Tersoff_1)</B> J. Tersoff, Phys Rev B, 37, 6991 (1988).
</P>
<A NAME = "Albe"></A>
<P><B>(Albe)</B> J. Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.:
Condens. Matter, 15, 5649(2003).
</P>
<A NAME = "Tersoff_2"></A>
<P><B>(Tersoff_2)</B> J. Tersoff, Phys Rev B, 39, 5566 (1989); errata (PRB 41, 3248)
</P>
</HTML>
diff --git a/doc/doc2/pair_zbl.html b/doc/doc2/pair_zbl.html
index ad0b94557..6bc9e2cf1 100644
--- a/doc/doc2/pair_zbl.html
+++ b/doc/doc2/pair_zbl.html
@@ -1,134 +1,136 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>pair_style zbl command
</H3>
+<H3>pair_style zbl/gpu command
+</H3>
<H3>pair_style zbl/omp command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>pair_style zbl inner outer
</PRE>
<UL><LI>inner = distance where switching function begins
<LI>outer = global cutoff for ZBL interaction
</UL>
<P><B>Examples:</B>
</P>
<PRE>pair_style zbl 3.0 4.0
pair_coeff * * 73.0
pair_coeff 1 1 14.0
</PRE>
<P><B>Description:</B>
</P>
<P>Style <I>zbl</I> computes the Ziegler-Biersack-Littmark (ZBL) screened nuclear
repulsion for describing high-energy collisions between atoms.
<A HREF = "#Ziegler">(Ziegler)</A>. It includes an additional switching function
that ramps the energy, force, and curvature smoothly to zero
between an inner and outer cutoff. The potential
energy due to a pair of atoms at a distance r_ij is given by:
</P>
<CENTER><IMG SRC = "Eqs/pair_zbl.jpg">
</CENTER>
<P>where e is the electron charge, epsilon_0 is the electrical
permittivity of vacuum, and Z_i and Z_j are the nuclear charges of the
two atoms. The switching function S(r) is identical to that used by
<A HREF = "pair_gromacs.html">pair_style lj/gromacs</A>. Here, the inner and outer
cutoff are the same for all pairs of atom types.
</P>
<P>The following coefficient must be defined for each pair of atom types
via the <A HREF = "pair_coeff.html">pair_coeff</A> command as in the examples above,
or in the LAMMPS data file. Z can not be specified for two different
atoms types. Therefore the lists of atom types I and atom types J
must match.
</P>
<UL><LI>Z (multiples of proton charge, e.g. 13.0 for aluminum)
</UL>
<P>Although Z must be defined for all atom type pairs I,J, it is only
stored for individual atom types, i.e. when I = J. Z is normally equal
to the atomic number of the atom type.
</P>
<P>IMPORTANT NOTE: The numerical values of the exponential decay
constants in the screening function depend on the unit of distance. In
the above equation they are given for units of angstroms. LAMMPS will
automatically convert these values to the distance unit of the
specified LAMMPS <A HREF = "units.html">units</A> setting. The values of Z should
always be given as multiples of a proton's charge, e.g. 29.0 for
copper.
</P>
<HR>
<P>Styles with a <I>cuda</I>, <I>gpu</I>, <I>intel</I>, <I>kk</I>, <I>omp</I>, or <I>opt</I> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <A HREF = "Section_accelerate.html">Section_accelerate</A>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.
</P>
<P>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <A HREF = "Section_start.html#start_3">Making
LAMMPS</A> section for more info.
</P>
<P>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <A HREF = "Section_start.html#start_7">-suffix command-line
switch</A> when you invoke LAMMPS, or you can
use the <A HREF = "suffix.html">suffix</A> command in your input script.
</P>
<P>See <A HREF = "Section_accelerate.html">Section_accelerate</A> of the manual for
more instructions on how to use the accelerated styles effectively.
</P>
<HR>
<P><B>Mixing, shift, table, tail correction, restart, rRESPA info</B>:
</P>
<P>Mixing is not relevant for this pair style, since as explained above,
Z values are stored on a per-type basis, and both Zi and Zj are used
explicitly in the ZBL formula.
</P>
<P>The ZBL pair style does not support the <A HREF = "pair_modify.html">pair_modify</A>
shift option, since the ZBL interaction is already smoothed to 0.0 at
the cutoff.
</P>
<P>The <A HREF = "pair_modify.html">pair_modify</A> table option is not relevant for
this pair style.
</P>
<P>This pair style does not support the <A HREF = "pair_modify.html">pair_modify</A>
tail option for adding long-range tail corrections to energy and
pressure, since there are no corrections for a potential that goes to
0.0 at the cutoff.
</P>
<P>This pair style does not write information to <A HREF = "restart.html">binary restart
files</A>, so pair_style and pair_coeff commands must be
specified in an input script that reads a restart file.
</P>
<P>This pair style can only be used via the <I>pair</I> keyword of the
<A HREF = "run_style.html">run_style respa</A> command. It does not support the
<I>inner</I>, <I>middle</I>, <I>outer</I> keywords.
</P>
<HR>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "pair_coeff.html">pair_coeff</A>
</P>
<P><B>Default:</B> none
</P>
<HR>
<A NAME = "Ziegler"></A>
<P><B>(Ziegler)</B> J.F. Ziegler, J. P. Biersack and U. Littmark, "The
Stopping and Range of Ions in Matter," Volume 1, Pergamon, 1985.
</P>
</HTML>
diff --git a/doc/dump.html b/doc/dump.html
index 1ab6b9b51..7c4c4fa98 100644
--- a/doc/dump.html
+++ b/doc/dump.html
@@ -1,743 +1,771 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dump command &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>dump command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="dump-command">
<span id="index-0"></span><h1>dump command<a class="headerlink" href="#dump-command" title="Permalink to this headline">¶</a></h1>
</div>
+<div class="section" id="dump-h5md-command">
+<h1><a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a> command<a class="headerlink" href="#dump-h5md-command" title="Permalink to this headline">¶</a></h1>
+</div>
<div class="section" id="dump-image-command">
<h1><a class="reference internal" href="dump_image.html"><em>dump image</em></a> command<a class="headerlink" href="#dump-image-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="dump-movie-command">
<h1><a class="reference internal" href="dump_image.html"><em>dump movie</em></a> command<a class="headerlink" href="#dump-movie-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="dump-molfile-command">
<h1><a class="reference internal" href="dump_molfile.html"><em>dump molfile</em></a> command<a class="headerlink" href="#dump-molfile-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>dump ID group-ID style N file args
</pre></div>
</div>
<ul class="simple">
<li>ID = user-assigned name for the dump</li>
<li>group-ID = ID of the group of atoms to be dumped</li>
-<li>style = <em>atom</em> or <em>atom/mpiio</em> or <em>cfg</em> or <em>cfg/mpiio</em> or <em>dcd</em> or <em>xtc</em> or <em>xyz</em> or <em>xyz/mpiio</em> or <em>image</em> or <em>movie</em> or <em>molfile</em> or <em>local</em> or <em>custom</em> or <em>custom/mpiio</em></li>
+<li>style = <em>atom</em> or <em>atom/gz</em> or <em>atom/mpiio</em> or <em>cfg</em> or <em>cfg/gz</em> or <em>cfg/mpiio</em> or <em>dcd</em> or <em>xtc</em> or <em>xyz</em> or <em>xyz/gz</em> or <em>xyz/mpiio</em> or <em>h5md</em> or <em>image</em> or <em>movie</em> or <em>molfile</em> or <em>local</em> or <em>custom</em> or <em>custom/gz</em> or <em>custom/mpiio</em></li>
<li>N = dump every this many timesteps</li>
<li>file = name of file to write dump info to</li>
<li>args = list of arguments for a particular style</li>
</ul>
<pre class="literal-block">
<em>atom</em> args = none
+<em>atom/gz</em> args = none
<em>atom/mpiio</em> args = none
<em>cfg</em> args = same as <em>custom</em> args, see below
+<em>cfg/gz</em> args = same as <em>custom</em> args, see below
<em>cfg/mpiio</em> args = same as <em>custom</em> args, see below
<em>dcd</em> args = none
<em>xtc</em> args = none
<em>xyz</em> args = none
</pre>
<pre class="literal-block">
+<em>xyz/gz</em> args = none
+</pre>
+<pre class="literal-block">
<em>xyz/mpiio</em> args = none
</pre>
<pre class="literal-block">
+<em>h5md</em> args = discussed on <a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a> doc page
+</pre>
+<pre class="literal-block">
<em>image</em> args = discussed on <a class="reference internal" href="dump_image.html"><em>dump image</em></a> doc page
</pre>
<pre class="literal-block">
<em>movie</em> args = discussed on <a class="reference internal" href="dump_image.html"><em>dump image</em></a> doc page
</pre>
<pre class="literal-block">
<em>molfile</em> args = discussed on <a class="reference internal" href="dump_molfile.html"><em>dump molfile</em></a> doc page
</pre>
<pre class="literal-block">
<em>local</em> args = list of local attributes
possible attributes = index, c_ID, c_ID[N], f_ID, f_ID[N]
index = enumeration of local values
c_ID = local vector calculated by a compute with ID
c_ID[N] = Nth column of local array calculated by a compute with ID
f_ID = local vector calculated by a fix with ID
f_ID[N] = Nth column of local array calculated by a fix with ID
</pre>
<pre class="literal-block">
-<em>custom</em> or <em>custom/mpiio</em> args = list of atom attributes
+<em>custom</em> or <em>custom/gz</em> or <em>custom/mpiio</em> args = list of atom attributes
possible attributes = id, mol, proc, procp1, type, element, mass,
x, y, z, xs, ys, zs, xu, yu, zu,
xsu, ysu, zsu, ix, iy, iz,
vx, vy, vz, fx, fy, fz,
q, mux, muy, muz, mu,
radius, diameter, omegax, omegay, omegaz,
angmomx, angmomy, angmomz, tqx, tqy, tqz,
c_ID, c_ID[N], f_ID, f_ID[N], v_name
</pre>
<pre class="literal-block">
id = atom ID
mol = molecule ID
proc = ID of processor that owns atom
procp1 = ID+1 of processor that owns atom
type = atom type
element = name of atom element, as defined by <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command
mass = atom mass
x,y,z = unscaled atom coordinates
xs,ys,zs = scaled atom coordinates
xu,yu,zu = unwrapped atom coordinates
xsu,ysu,zsu = scaled unwrapped atom coordinates
ix,iy,iz = box image that the atom is in
vx,vy,vz = atom velocities
fx,fy,fz = forces on atoms
q = atom charge
mux,muy,muz = orientation of dipole moment of atom
mu = magnitude of dipole moment of atom
radius,diameter = radius,diameter of spherical particle
omegax,omegay,omegaz = angular velocity of spherical particle
angmomx,angmomy,angmomz = angular momentum of aspherical particle
tqx,tqy,tqz = torque on finite-size particles
c_ID = per-atom vector calculated by a compute with ID
c_ID[N] = Nth column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[N] = Nth column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
d_name = per-atom floating point vector with name, managed by fix property/atom
i_name = per-atom integer vector with name, managed by fix property/atom
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>dump myDump all atom 100 dump.atom
dump myDump all atom/mpiio 100 dump.atom.mpiio
+dump myDump all atom/gz 100 dump.atom.gz
dump 2 subgroup atom 50 dump.run.bin
dump 2 subgroup atom 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
dump snap all cfg 100 dump.config.*.cfg mass type xs ys zs id type c_Stress[2]
dump 1 all xtc 1000 file.xtc
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Dump a snapshot of atom quantities to one or more files every N
timesteps in one of several styles. The <em>image</em> and <em>movie</em> styles are
the exception: the <em>image</em> style renders a JPG, PNG, or PPM image file
of the atom configuration every N timesteps while the <em>movie</em> style
combines and compresses them into a movie file; both are discussed in
detail on the <a class="reference internal" href="dump_image.html"><em>dump image</em></a> doc page. The timesteps on
which dump output is written can also be controlled by a variable.
See the <a class="reference internal" href="dump_modify.html"><em>dump_modify every</em></a> command.</p>
<p>Only information for atoms in the specified group is dumped. The
<a class="reference internal" href="dump_modify.html"><em>dump_modify thresh and region</em></a> commands can also
alter what atoms are included. Not all styles support all these
options; see details below.</p>
<p>As described below, the filename determines the kind of output (text
or binary or gzipped, one big file or one per timestep, one big file
or multiple smaller files).</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
box.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Unless the <a class="reference internal" href="dump_modify.html"><em>dump_modify sort</em></a> option
is invoked, the lines of atom information written to dump files
(typically one line per atom) will be in an indeterminate order for
each snapshot. This is even true when running on a single processor,
if the <a class="reference internal" href="atom_modify.html"><em>atom_modify sort</em></a> option is on, which it is
by default. In this case atoms are re-ordered periodically during a
simulation, due to spatial sorting. It is also true when running in
parallel, because data for a single snapshot is collected from
multiple processors, each of which owns a subset of the atoms.</p>
</div>
<p>For the <em>atom</em>, <em>custom</em>, <em>cfg</em>, and <em>local</em> styles, sorting is off by
default. For the <em>dcd</em>, <em>xtc</em>, <em>xyz</em>, and <em>molfile</em> styles, sorting by
atom ID is on by default. See the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> doc
page for details.</p>
+<p>The <em>atom/gz</em>, <em>cfg/gz</em>, <em>custom/gz</em>, and <em>xyz/gz</em> styles are identical
+in command syntax to the corresponding styles without &#8220;gz&#8221;, however,
+they generate compressed files using the zlib library. Thus the filename
+suffix &#8221;.gz&#8221; is mandatory. This is an alternative approach to writing
+compressed files via a pipe, as done by the regular dump styles, which
+may be required on clusters where the interface to the high-speed network
+disallows using the fork() library call (which is needed for a pipe).
+For the remainder of this doc page, you should thus consider the <em>atom</em>
+and <em>atom/gz</em> styles (etc) to be inter-changeable, with the exception
+of the required filename suffix.</p>
<p>As explained below, the <em>atom/mpiio</em>, <em>cfg/mpiio</em>, <em>custom/mpiio</em>, and
<em>xyz/mpiio</em> styles are identical in command syntax and in the format
of the dump files they create, to the corresponding styles without
&#8220;mpiio&#8221;, except the single dump file they produce is written in
parallel via the MPI-IO library. For the remainder of this doc page,
you should thus consider the <em>atom</em> and <em>atom/mpiio</em> styles (etc) to
be inter-changeable. The one exception is how the filename is
specified for the MPI-IO styles, as explained below.</p>
<hr class="docutils" />
<p>The <em>style</em> keyword determines what atom quantities are written to the
file and in what format. Settings made via the
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command can also alter the format of
individual values and the file itself.</p>
<p>The <em>atom</em>, <em>local</em>, and <em>custom</em> styles create files in a simple text
format that is self-explanatory when viewing a dump file. Many of the
LAMMPS <a class="reference internal" href="Section_tools.html"><em>post-processing tools</em></a>, including
<a class="reference external" href="http://www.sandia.gov/~sjplimp/pizza.html">Pizza.py</a>, work with this
format, as does the <a class="reference internal" href="rerun.html"><em>rerun</em></a> command.</p>
<p>For post-processing purposes the <em>atom</em>, <em>local</em>, and <em>custom</em> text
files are self-describing in the following sense.</p>
<p>The dimensions of the simulation box are included in each snapshot.
For an orthogonal simulation box this information is is formatted as:</p>
<div class="highlight-python"><div class="highlight"><pre>ITEM: BOX BOUNDS xx yy zz
xlo xhi
ylo yhi
zlo zhi
</pre></div>
</div>
<p>where xlo,xhi are the maximum extents of the simulation box in the
x-dimension, and similarly for y and z. The &#8220;xx yy zz&#8221; represent 6
characters that encode the style of boundary for each of the 6
simulation box boundaries (xlo,xhi and ylo,yhi and zlo,zhi). Each of
the 6 characters is either p = periodic, f = fixed, s = shrink wrap,
or m = shrink wrapped with a minimum value. See the
<a class="reference internal" href="boundary.html"><em>boundary</em></a> command for details.</p>
<p>For triclinic simulation boxes (non-orthogonal), an orthogonal
bounding box which encloses the triclinic simulation box is output,
along with the 3 tilt factors (xy, xz, yz) of the triclinic box,
formatted as follows:</p>
<div class="highlight-python"><div class="highlight"><pre>ITEM: BOX BOUNDS xy xz yz xx yy zz
xlo_bound xhi_bound xy
ylo_bound yhi_bound xz
zlo_bound zhi_bound yz
</pre></div>
</div>
<p>The presence of the text &#8220;xy xz yz&#8221; in the ITEM line indicates that
the 3 tilt factors will be included on each of the 3 following lines.
This bounding box is convenient for many visualization programs. The
meaning of the 6 character flags for &#8220;xx yy zz&#8221; is the same as above.</p>
<p>Note that the first two numbers on each line are now xlo_bound instead
of xlo, etc, since they repesent a bounding box. See <a class="reference internal" href="Section_howto.html#howto-12"><span>this section</span></a> of the doc pages for a geometric
description of triclinic boxes, as defined by LAMMPS, simple formulas
for how the 6 bounding box extents (xlo_bound,xhi_bound,etc) are
calculated from the triclinic parameters, and how to transform those
parameters to and from other commonly used triclinic representations.</p>
<p>The &#8220;ITEM: ATOMS&#8221; line in each snapshot lists column descriptors for
the per-atom lines that follow. For example, the descriptors would be
&#8220;id type xs ys zs&#8221; for the default <em>atom</em> style, and would be the atom
attributes you specify in the dump command for the <em>custom</em> style.</p>
<p>For style <em>atom</em>, atom coordinates are written to the file, along with
the atom ID and atom type. By default, atom coords are written in a
scaled format (from 0 to 1). I.e. an x value of 0.25 means the atom
is at a location 1/4 of the distance from xlo to xhi of the box
boundaries. The format can be changed to unscaled coords via the
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> settings. Image flags can also be
added for each atom via dump_modify.</p>
<p>Style <em>custom</em> allows you to specify a list of atom attributes to be
written to the dump file for each atom. Possible attributes are
listed above and will appear in the order specified. You cannot
specify a quantity that is not defined for a particular simulation -
such as <em>q</em> for atom style <em>bond</em>, since that atom style doesn&#8217;t
assign charges. Dumps occur at the very end of a timestep, so atom
attributes will include effects due to fixes that are applied during
the timestep. An explanation of the possible dump custom attributes
is given below.</p>
<p>For style <em>local</em>, local output generated by <a class="reference internal" href="compute.html"><em>computes</em></a>
and <a class="reference internal" href="fix.html"><em>fixes</em></a> is used to generate lines of output that is
written to the dump file. This local data is typically calculated by
each processor based on the atoms it owns, but there may be zero or
more entities per atom, e.g. a list of bond distances. An explanation
of the possible dump local attributes is given below. Note that by
using input from the <a class="reference internal" href="compute_property_local.html"><em>compute property/local</em></a> command with dump local,
it is possible to generate information on bonds, angles, etc that can
be cut and pasted directly into a data file read by the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> command.</p>
<p>Style <em>cfg</em> has the same command syntax as style <em>custom</em> and writes
extended CFG format files, as used by the
<a class="reference external" href="http://mt.seas.upenn.edu/Archive/Graphics/A">AtomEye</a> visualization
package. Since the extended CFG format uses a single snapshot of the
system per file, a wildcard &#8220;*&#8221; must be included in the filename, as
discussed below. The list of atom attributes for style <em>cfg</em> must
begin with either &#8220;mass type xs ys zs&#8221; or &#8220;mass type xsu ysu zsu&#8221;
since these quantities are needed to write the CFG files in the
appropriate format (though the &#8220;mass&#8221; and &#8220;type&#8221; fields do not appear
explicitly in the file). Any remaining attributes will be stored as
&#8220;auxiliary properties&#8221; in the CFG files. Note that you will typically
want to use the <a class="reference internal" href="dump_modify.html"><em>dump_modify element</em></a> command with
CFG-formatted files, to associate element names with atom types, so
that AtomEye can render atoms appropriately. When unwrapped
coordinates <em>xsu</em>, <em>ysu</em>, and <em>zsu</em> are requested, the nominal AtomEye
periodic cell dimensions are expanded by a large factor UNWRAPEXPAND =
10.0, which ensures atoms that are displayed correctly for up to
UNWRAPEXPAND/2 periodic boundary crossings in any direction. Beyond
this, AtomEye will rewrap the unwrapped coordinates. The expansion
causes the atoms to be drawn farther away from the viewer, but it is
easy to zoom the atoms closer, and the interatomic distances are
unaffected.</p>
<p>The <em>dcd</em> style writes DCD files, a standard atomic trajectory format
used by the CHARMM, NAMD, and XPlor molecular dynamics packages. DCD
files are binary and thus may not be portable to different machines.
The number of atoms per snapshot cannot change with the <em>dcd</em> style.
The <em>unwrap</em> option of the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command
allows DCD coordinates to be written &#8220;unwrapped&#8221; by the image flags
for each atom. Unwrapped means that if the atom has passed through
a periodic boundary one or more times, the value is printed for what
the coordinate would be if it had not been wrapped back into the
periodic box. Note that these coordinates may thus be far outside
the box size stored with the snapshot.</p>
<p>The <em>xtc</em> style writes XTC files, a compressed trajectory format used
by the GROMACS molecular dynamics package, and described
<a class="reference external" href="http://manual.gromacs.org/current/online/xtc.html">here</a>.
The precision used in XTC files can be adjusted via the
<a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command. The default value of 1000
means that coordinates are stored to 1/1000 nanometer accuracy. XTC
files are portable binary files written in the NFS XDR data format,
so that any machine which supports XDR should be able to read them.
The number of atoms per snapshot cannot change with the <em>xtc</em> style.
The <em>unwrap</em> option of the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command allows
XTC coordinates to be written &#8220;unwrapped&#8221; by the image flags for each
atom. Unwrapped means that if the atom has passed thru a periodic
boundary one or more times, the value is printed for what the
coordinate would be if it had not been wrapped back into the periodic
box. Note that these coordinates may thus be far outside the box size
stored with the snapshot.</p>
<p>The <em>xyz</em> style writes XYZ files, which is a simple text-based
coordinate format that many codes can read. Specifically it has
a line with the number of atoms, then a comment line that is
usually ignored followed by one line per atom with the atom type
and the x-, y-, and z-coordinate of that atom. You can use the
<a class="reference internal" href="dump_modify.html"><em>dump_modify element</em></a> option to change the output
from using the (numerical) atom type to an element name (or some
other label). This will help many visualization programs to guess
bonds and colors.</p>
<p>Note that <em>atom</em>, <em>custom</em>, <em>dcd</em>, <em>xtc</em>, and <em>xyz</em> style dump files
can be read directly by <a class="reference external" href="http://www.ks.uiuc.edu/Research/vmd">VMD</a>, a
popular molecular viewing program. See <a class="reference internal" href="Section_tools.html#vmd"><span>Section tools</span></a> of the manual and the
tools/lmp2vmd/README.txt file for more information about support in
VMD for reading and visualizing LAMMPS dump files.</p>
<hr class="docutils" />
<p>Dumps are performed on timesteps that are a multiple of N (including
timestep 0) and on the last timestep of a minimization if the
minimization converges. Note that this means a dump will not be
performed on the initial timestep after the dump command is invoked,
if the current timestep is not a multiple of N. This behavior can be
changed via the <a class="reference internal" href="dump_modify.html"><em>dump_modify first</em></a> command, which
can also be useful if the dump command is invoked after a minimization
ended on an arbitrary timestep. N can be changed between runs by
using the <a class="reference internal" href="dump_modify.html"><em>dump_modify every</em></a> command (not allowed
for <em>dcd</em> style). The <a class="reference internal" href="dump_modify.html"><em>dump_modify every</em></a> command
also allows a variable to be used to determine the sequence of
timesteps on which dump files are written. In this mode a dump on the
first timestep of a run will also not be written unless the
<a class="reference internal" href="dump_modify.html"><em>dump_modify first</em></a> command is used.</p>
<p>The specified filename determines how the dump file(s) is written.
The default is to write one large text file, which is opened when the
dump command is invoked and closed when an <a class="reference internal" href="undump.html"><em>undump</em></a>
command is used or when LAMMPS exits. For the <em>dcd</em> and <em>xtc</em> styles,
this is a single large binary file.</p>
<p>Dump filenames can contain two wildcard characters. If a &#8220;*&#8221;
character appears in the filename, then one file per snapshot is
written and the &#8220;*&#8221; character is replaced with the timestep value.
For example, tmp.dump.* becomes tmp.dump.0, tmp.dump.10000,
tmp.dump.20000, etc. This option is not available for the <em>dcd</em> and
<em>xtc</em> styles. Note that the <a class="reference internal" href="dump_modify.html"><em>dump_modify pad</em></a>
command can be used to insure all timestep numbers are the same length
(e.g. 00010), which can make it easier to read a series of dump files
in order with some post-processing tools.</p>
<p>If a &#8220;%&#8221; character appears in the filename, then each of P processors
writes a portion of the dump file, and the &#8220;%&#8221; character is replaced
with the processor ID from 0 to P-1. For example, tmp.dump.% becomes
tmp.dump.0, tmp.dump.1, ... tmp.dump.P-1, etc. This creates smaller
files and can be a fast mode of output on parallel machines that
support parallel I/O for output. This option is not available for the
<em>dcd</em>, <em>xtc</em>, and <em>xyz</em> styles.</p>
<p>By default, P = the number of processors meaning one file per
processor, but P can be set to a smaller value via the <em>nfile</em> or
<em>fileper</em> keywords of the <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a> command.
These options can be the most efficient way of writing out dump files
when running on large numbers of processors.</p>
<p>Note that using the &#8220;*&#8221; and &#8220;%&#8221; characters together can produce a
large number of small dump files!</p>
<p>For the <em>atom/mpiio</em>, <em>cfg/mpiio</em>, <em>custom/mpiio</em>, and <em>xyz/mpiio</em>
styles, a single dump file is written in parallel via the MPI-IO
library, which is part of the MPI standard for versions 2.0 and above.
Using MPI-IO requires two steps. First, build LAMMPS with its MPIIO
package installed, e.g.</p>
<div class="highlight-python"><div class="highlight"><pre>make yes-mpiio # installs the MPIIO package
make g++ # build LAMMPS for your platform
</pre></div>
</div>
<p>Second, use a dump filename which contains &#8221;.mpiio&#8221;. Note that it
does not have to end in &#8221;.mpiio&#8221;, just contain those characters.
Unlike MPI-IO restart files, which must be both written and read using
MPI-IO, the dump files produced by these MPI-IO styles are identical
in format to the files produced by their non-MPI-IO style
counterparts. This means you can write a dump file using MPI-IO and
use the <a class="reference internal" href="read_dump.html"><em>read_dump</em></a> command or perform other
post-processing, just as if the dump file was not written using
MPI-IO.</p>
<p>Note that MPI-IO dump files are one large file which all processors
write to. You thus cannot use the &#8220;%&#8221; wildcard character described
above in the filename since that specifies generation of multiple
files. You can use the &#8221;.bin&#8221; suffix described below in an MPI-IO
dump file; again this file will be written in parallel and have the
same binary format as if it were written without MPI-IO.</p>
<p>If the filename ends with &#8221;.bin&#8221;, the dump file (or files, if &#8220;*&#8221; or
&#8220;%&#8221; is also used) is written in binary format. A binary dump file
will be about the same size as a text version, but will typically
write out much faster. Of course, when post-processing, you will need
to convert it back to text format (see the <a class="reference internal" href="Section_tools.html#binary"><span>binary2txt tool</span></a>) or write your own code to read the
binary file. The format of the binary file can be understood by
looking at the tools/binary2txt.cpp file. This option is only
available for the <em>atom</em> and <em>custom</em> styles.</p>
<p>If the filename ends with &#8221;.gz&#8221;, the dump file (or files, if &#8220;*&#8221; or &#8220;%&#8221;
is also used) is written in gzipped format. A gzipped dump file will
be about 3x smaller than the text version, but will also take longer
to write. This option is not available for the <em>dcd</em> and <em>xtc</em>
styles.</p>
<hr class="docutils" />
<p>This section explains the local attributes that can be specified as
part of the <em>local</em> style.</p>
<p>The <em>index</em> attribute can be used to generate an index number from 1
to N for each line written into the dump file, where N is the total
number of local datums from all processors, or lines of output that
will appear in the snapshot. Note that because data from different
processors depend on what atoms they currently own, and atoms migrate
between processor, there is no guarantee that the same index will be
used for the same info (e.g. a particular bond) in successive
snapshots.</p>
<p>The <em>c_ID</em> and <em>c_ID[N]</em> attributes allow local vectors or arrays
calculated by a <a class="reference internal" href="compute.html"><em>compute</em></a> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
<a class="reference internal" href="compute.html"><em>compute</em></a> command for details. There are computes for
calculating local information such as indices, types, and energies for
bonds and angles.</p>
<p>Note that computes which calculate global or per-atom quantities, as
opposed to local quantities, cannot be output in a dump local command.
Instead, global quantities can be output by the <a class="reference internal" href="thermo_style.html"><em>thermo_style custom</em></a> command, and per-atom quantities can be
output by the dump custom command.</p>
<p>If <em>c_ID</em> is used as a attribute, then the local vector calculated by
the compute is printed. If <em>c_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the compute.</p>
<p>The <em>f_ID</em> and <em>f_ID[N]</em> attributes allow local vectors or arrays
calculated by a <a class="reference internal" href="fix.html"><em>fix</em></a> to be output. The ID in the attribute
should be replaced by the actual ID of the fix that has been defined
previously in the input script.</p>
<p>If <em>f_ID</em> is used as a attribute, then the local vector calculated by
the fix is printed. If <em>f_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length local
array calculated by the fix.</p>
<p>Here is an example of how to dump bond info for a system,
including the distance and energy of each bond:</p>
<div class="highlight-python"><div class="highlight"><pre>compute 1 all property/local batom1 batom2 btype
compute 2 all bond/local dist eng
dump 1 all local 1000 tmp.dump index c_1[1] c_1[2] c_1[3] c_2[1] c_2[2]
</pre></div>
</div>
<hr class="docutils" />
<p>This section explains the atom attributes that can be specified as
part of the <em>custom</em> and <em>cfg</em> styles.</p>
<p>The <em>id</em>, <em>mol</em>, <em>proc</em>, <em>procp1</em>, <em>type</em>, <em>element</em>, <em>mass</em>, <em>vx</em>,
<em>vy</em>, <em>vz</em>, <em>fx</em>, <em>fy</em>, <em>fz</em>, <em>q</em> attributes are self-explanatory.</p>
<p><em>Id</em> is the atom ID. <em>Mol</em> is the molecule ID, included in the data
file for molecular systems. <em>Proc</em> is the ID of the processor (0 to
Nprocs-1) that currently owns the atom. <em>Procp1</em> is the proc ID+1,
which can be convenient in place of a <em>type</em> attribute (1 to Ntypes)
for coloring atoms in a visualization program. <em>Type</em> is the atom
type (1 to Ntypes). <em>Element</em> is typically the chemical name of an
element, which you must assign to each type via the <a class="reference internal" href="dump_modify.html"><em>dump_modify element</em></a> command. More generally, it can be any
string you wish to associated with an atom type. <em>Mass</em> is the atom
mass. <em>Vx</em>, <em>vy</em>, <em>vz</em>, <em>fx</em>, <em>fy</em>, <em>fz</em>, and <em>q</em> are components of
atom velocity and force and atomic charge.</p>
<p>There are several options for outputting atom coordinates. The <em>x</em>,
<em>y</em>, <em>z</em> attributes write atom coordinates &#8220;unscaled&#8221;, in the
appropriate distance <a class="reference internal" href="units.html"><em>units</em></a> (Angstroms, sigma, etc). Use
<em>xs</em>, <em>ys</em>, <em>zs</em> if you want the coordinates &#8220;scaled&#8221; to the box size,
so that each value is 0.0 to 1.0. If the simulation box is triclinic
(tilted), then all atom coords will still be between 0.0 and 1.0. Use
<em>xu</em>, <em>yu</em>, <em>zu</em> if you want the coordinates &#8220;unwrapped&#8221; by the image
flags for each atom. Unwrapped means that if the atom has passed thru
a periodic boundary one or more times, the value is printed for what
the coordinate would be if it had not been wrapped back into the
periodic box. Note that using <em>xu</em>, <em>yu</em>, <em>zu</em> means that the
coordinate values may be far outside the box bounds printed with the
snapshot. Using <em>xsu</em>, <em>ysu</em>, <em>zsu</em> is similar to using <em>xu</em>, <em>yu</em>, <em>zu</em>,
except that the unwrapped coordinates are scaled by the box size. Atoms
that have passed through a periodic boundary will have the corresponding
cooordinate increased or decreased by 1.0.</p>
<p>The image flags can be printed directly using the <em>ix</em>, <em>iy</em>, <em>iz</em>
attributes. For periodic dimensions, they specify which image of the
simulation box the atom is considered to be in. An image of 0 means
it is inside the box as defined. A value of 2 means add 2 box lengths
to get the true value. A value of -1 means subtract 1 box length to
get the true value. LAMMPS updates these flags as atoms cross
periodic boundaries during the simulation.</p>
<p>The <em>mux</em>, <em>muy</em>, <em>muz</em> attributes are specific to dipolar systems
defined with an atom style of <em>dipole</em>. They give the orientation of
the atom&#8217;s point dipole moment. The <em>mu</em> attribute gives the
magnitude of the atom&#8217;s dipole moment.</p>
<p>The <em>radius</em> and <em>diameter</em> attributes are specific to spherical
particles that have a finite size, such as those defined with an atom
style of <em>sphere</em>.</p>
<p>The <em>omegax</em>, <em>omegay</em>, and <em>omegaz</em> attributes are specific to
finite-size spherical particles that have an angular velocity. Only
certain atom styles, such as <em>sphere</em> define this quantity.</p>
<p>The <em>angmomx</em>, <em>angmomy</em>, and <em>angmomz</em> attributes are specific to
finite-size aspherical particles that have an angular momentum. Only
the <em>ellipsoid</em> atom style defines this quantity.</p>
<p>The <em>tqx</em>, <em>tqy</em>, <em>tqz</em> attributes are for finite-size particles that
can sustain a rotational torque due to interactions with other
particles.</p>
<p>The <em>c_ID</em> and <em>c_ID[N]</em> attributes allow per-atom vectors or arrays
calculated by a <a class="reference internal" href="compute.html"><em>compute</em></a> to be output. The ID in the
attribute should be replaced by the actual ID of the compute that has
been defined previously in the input script. See the
<a class="reference internal" href="compute.html"><em>compute</em></a> command for details. There are computes for
calculating the per-atom energy, stress, centro-symmetry parameter,
and coordination number of individual atoms.</p>
<p>Note that computes which calculate global or local quantities, as
opposed to per-atom quantities, cannot be output in a dump custom
command. Instead, global quantities can be output by the
<a class="reference internal" href="thermo_style.html"><em>thermo_style custom</em></a> command, and local quantities
can be output by the dump local command.</p>
<p>If <em>c_ID</em> is used as a attribute, then the per-atom vector calculated
by the compute is printed. If <em>c_ID[N]</em> is used, then N must be in
the range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the compute.</p>
<p>The <em>f_ID</em> and <em>f_ID[N]</em> attributes allow vector or array per-atom
quantities calculated by a <a class="reference internal" href="fix.html"><em>fix</em></a> to be output. The ID in the
attribute should be replaced by the actual ID of the fix that has been
defined previously in the input script. The <a class="reference internal" href="fix_ave_atom.html"><em>fix ave/atom</em></a> command is one that calculates per-atom
quantities. Since it can time-average per-atom quantities produced by
any <a class="reference internal" href="compute.html"><em>compute</em></a>, <a class="reference internal" href="fix.html"><em>fix</em></a>, or atom-style
<a class="reference internal" href="variable.html"><em>variable</em></a>, this allows those time-averaged results to
be written to a dump file.</p>
<p>If <em>f_ID</em> is used as a attribute, then the per-atom vector calculated
by the fix is printed. If <em>f_ID[N]</em> is used, then N must be in the
range from 1-M, which will print the Nth column of the M-length
per-atom array calculated by the fix.</p>
<p>The <em>v_name</em> attribute allows per-atom vectors calculated by a
<a class="reference internal" href="variable.html"><em>variable</em></a> to be output. The name in the attribute
should be replaced by the actual name of the variable that has been
defined previously in the input script. Only an atom-style variable
can be referenced, since it is the only style that generates per-atom
values. Variables of style <em>atom</em> can reference individual atom
attributes, per-atom atom attributes, thermodynamic keywords, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of creating quantities to output to a
dump file.</p>
<p>The <em>d_name</em> and <em>i_name</em> attributes allow to output custom per atom
floating point or integer properties that are managed by
<a class="reference internal" href="fix_property_atom.html"><em>fix property/atom</em></a>.</p>
<p>See <a class="reference internal" href="Section_modify.html"><em>Section_modify</em></a> of the manual for information
on how to add new compute and fix styles to LAMMPS to calculate
per-atom quantities which could then be output into dump files.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
-<p>To write gzipped dump files, you must compile LAMMPS with the
--DLAMMPS_GZIP option - see the <a class="reference internal" href="Section_start.html#start-2"><span>Making LAMMPS</span></a> section of the documentation.</p>
+<p>To write gzipped dump files, you must either compile LAMMPS with the
+-DLAMMPS_GZIP option or use the styles from the COMPRESS package
+- see the <a class="reference internal" href="Section_start.html#start-2"><span>Making LAMMPS</span></a> section of
+the documentation.</p>
+<p>The <em>atom/gz</em>, <em>cfg/gz</em>, <em>custom/gz</em>, and <em>xyz/gz</em> styles are part
+of the COMPRESS package. They are only enabled if LAMMPS was built
+with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The <em>atom/mpiio</em>, <em>cfg/mpiio</em>, <em>custom/mpiio</em>, and <em>xyz/mpiio</em> styles
are part of the MPIIO package. They are only enabled if LAMMPS was
built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The <em>xtc</em> style is part of the XTC package. It is only enabled if
LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info. This is
because some machines may not support the low-level XDR data format
that XTC files are written with, which will result in a compile-time
error when a low-level include file is not found. Putting this style
in a package makes it easy to exclude from a LAMMPS build for those
machines. However, the XTC package also includes two compatibility
header files and associated functions, which should be a suitable
substitute on machines that do not have the appropriate native header
files. This option can be invoked at build time by adding
-DLAMMPS_XDR to the CCFLAGS variable in the appropriate low-level
Makefile, e.g. src/MAKE/Makefile.foo. This compatibility mode has
been tested successfully on Cray XT3/XT4/XT5 and IBM BlueGene/L
machines and should also work on IBM BG/P, and Windows XP/Vista/7
machines.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
-<p><a class="reference internal" href="dump_image.html"><em>dump image</em></a>, <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a>,
+<p><a class="reference internal" href="dump_h5md.html"><em>dump h5md</em></a>, <a class="reference internal" href="dump_image.html"><em>dump image</em></a>,
+<a class="reference internal" href="dump_molfile.html"><em>dump molfile</em></a>, <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a>,
<a class="reference internal" href="undump.html"><em>undump</em></a></p>
</div>
<div class="section" id="default">
<h2>Default<a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h2>
<p>The defaults for the <em>image</em> and <em>movie</em> styles are listed on the
<a class="reference internal" href="dump_image.html"><em>dump image</em></a> doc page.</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/dump_h5md.html b/doc/dump_h5md.html
index f21c93f5a..2de0eef1b 100644
--- a/doc/dump_h5md.html
+++ b/doc/dump_h5md.html
@@ -1,138 +1,299 @@
-<HTML>
-<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
-</CENTER>
+<!DOCTYPE html>
+<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
+<head>
+ <meta charset="utf-8">
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <title>dump h5md command &mdash; LAMMPS 15 May 2015 version documentation</title>
+
+
+
+
+
+
+
-<HR>
+
-<H3>dump h5md command
-</H3>
-<P><B>Syntax:</B>
-</P>
-<PRE>dump ID group-ID h5md N file.h5 args
-</PRE>
-<UL><LI>ID = user-assigned name for the dump
+
+
+ <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
+
-<LI>group-ID = ID of the group of atoms to be imaged
+
+ <link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
+
-<LI>h5md = style of dump command (other styles <I>atom</I> or <I>cfg</I> or <I>dcd</I> or <I>xtc</I> or <I>xyz</I> or <I>local</I> or <I>custom</I> are discussed on the <A HREF = "dump.html">dump</A> doc page)
+
+ <link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
-<LI>N = dump every this many timesteps
+
+ <script src="_static/js/modernizr.min.js"></script>
-<LI>file.h5 = name of file to write to
+</head>
-<LI>args = list of data elements to dump, with their dump "subintervals".
+<body class="wy-body-for-nav" role="document">
+
+ <div class="wy-grid-for-nav">
+
+
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
+ <div class="wy-side-nav-search">
+
+
+
+ <a href="Manual.html" class="icon icon-home"> LAMMPS
+
+
+
+ </a>
+
+
+<div role="search">
+ <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+
+
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+
+ <ul>
+<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
+</ul>
+
+
+
+ </div>
+ &nbsp;
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="Manual.html">LAMMPS</a>
+ </nav>
+
+
+
+ <div class="wy-nav-content">
+ <div class="rst-content">
+ <div role="navigation" aria-label="breadcrumbs navigation">
+ <ul class="wy-breadcrumbs">
+ <li><a href="Manual.html">Docs</a> &raquo;</li>
+
+ <li>dump h5md command</li>
+ <li class="wy-breadcrumbs-aside">
+
+
+ <a href="http://lammps.sandia.gov">Website</a>
+ <a href="Section_commands.html#comm">Commands</a>
+
+ </li>
+ </ul>
+ <hr/>
+
+</div>
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+ <div itemprop="articleBody">
+
+ <div class="section" id="dump-h5md-command">
+<span id="index-0"></span><h1>dump h5md command<a class="headerlink" href="#dump-h5md-command" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="syntax">
+<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
+<div class="highlight-python"><div class="highlight"><pre>dump ID group-ID h5md N file.h5 args
+</pre></div>
+</div>
+<ul class="simple">
+<li>ID = user-assigned name for the dump</li>
+<li>group-ID = ID of the group of atoms to be imaged</li>
+<li>h5md = style of dump command (other styles <em>atom</em> or <em>cfg</em> or <em>dcd</em> or <em>xtc</em> or <em>xyz</em> or <em>local</em> or <em>custom</em> are discussed on the <a class="reference internal" href="dump.html"><em>dump</em></a> doc page)</li>
+<li>N = dump every this many timesteps</li>
+<li>file.h5 = name of file to write to</li>
+<li>args = list of data elements to dump, with their dump &#8220;subintervals&#8221;.
At least one element must be given and image may only be present if
-position is specified first.
-
-<PRE> position options
- image
- velocity options
- force options
- species options
- file_from ID: do not open a new file, re-use the already opened file from dump ID
- box value = <I>yes</I> or <I>no</I>
- create_group value = <I>yes</I> or <I>no</I>
- author value = quoted string
-</PRE>
-<P>For the elements <I>position</I>, <I>velocity</I>, <I>force</I> and <I>species</I>, one may specify
-a sub-interval to write the data only every N_element iterations of the dump
-(i.e. every N*N_element time steps). This is specified by the option
-</P>
-<PRE> every N_element
-</PRE>
-<P>that follows directly the element declaration.
-</P>
-
-</UL>
-<P><B>Examples:</B>
-</P>
-<PRE>dump h5md1 all h5md 100 dump_h5md.h5 position image
-dump h5md1 all h5md 100 dump_h5md.h5 position velocity every 10
-</PRE>
-<PRE>dump h5md1 all h5md 100 dump_h5md.h5 velocity author "L. Ammps"
-</PRE>
-<P><B>Description:</B>
-</P>
-<P>Dump a snapshot of atom coordinates every N timesteps in the <A HREF = "http://www.hdfgroup.org/HDF5/">HDF5</A>
-based <A HREF = "http://nongnu.org/h5md/">H5MD</A> file format <A HREF = "#h5md_cpc">(de Buyl et al.)</A>.
-HDF5 files are binary, portable and self-describing.
-This dump style will write only one file, on the root node.
-</P>
-<P>Several dumps may write to the same file, by using file_from and referring to a
-previously defined dump.
-Several groups may also be stored within the same file by defining several dumps.
-A dump that refers (via <I>file_from</I>) to an already open dump ID and that
-concerns another particle group must specify <I>create_group yes</I>.
-</P>
-
-
-<P>Each data element is written every N*N_element steps. For <I>image</I>, no
-subinterval is needed as it must be present at the same interval as <I>position</I>.
-<I>image</I> must be given after <I>position</I> in any case.
-The box information (edges in each dimension) is stored at the same interval
-than the <I>position</I> element, if present. Else it is stored every N steps.
-</P>
-<P>IMPORTANT NOTE: Because periodic boundary conditions are enforced only
+position is specified first.</li>
+</ul>
+<pre class="literal-block">
+position options
+image
+velocity options
+force options
+species options
+file_from ID: do not open a new file, re-use the already opened file from dump ID
+box value = <em>yes</em> or <em>no</em>
+create_group value = <em>yes</em> or <em>no</em>
+author value = quoted string
+</pre>
+<p>For the elements <em>position</em>, <em>velocity</em>, <em>force</em> and <em>species</em>, one
+may specify a sub-interval to write the data only every N_element
+iterations of the dump (i.e. every N*N_element time steps). This is
+specified by the option</p>
+<div class="highlight-python"><div class="highlight"><pre>every N_element
+</pre></div>
+</div>
+<p>that follows directly the element declaration.</p>
+</div>
+<div class="section" id="examples">
+<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
+<div class="highlight-python"><div class="highlight"><pre>dump h5md1 all h5md 100 dump_h5md.h5 position image
+dump h5md1 all h5md 100 dump_h5md.h5 position velocity every 10
+dump h5md1 all h5md 100 dump_h5md.h5 velocity author &quot;John Doe&quot;
+</pre></div>
+</div>
+</div>
+<div class="section" id="description">
+<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
+<p>Dump a snapshot of atom coordinates every N timesteps in the
+<a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> based <a class="reference external" href="http://nongnu.org/h5md/">H5MD</a> file format <a class="reference internal" href="#h5md-cpc"><span>(de Buyl)</span></a>.
+HDF5 files are binary, portable and self-describing. This dump style
+will write only one file, on the root node.</p>
+<p>Several dumps may write to the same file, by using file_from and
+referring to a previously defined dump. Several groups may also be
+stored within the same file by defining several dumps. A dump that
+refers (via <em>file_from</em>) to an already open dump ID and that concerns
+another particle group must specify <em>create_group yes</em>.</p>
+<p>Each data element is written every N*N_element steps. For <em>image</em>, no
+subinterval is needed as it must be present at the same interval as
+<em>position</em>. <em>image</em> must be given after <em>position</em> in any case. The
+box information (edges in each dimension) is stored at the same
+interval than the <em>position</em> element, if present. Else it is stored
+every N steps.</p>
+<div class="admonition warning">
+<p class="first admonition-title">Warning</p>
+<p class="last">Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
-box.
-</P>
-<P><B>Use from write_dump:</B>
-</P>
-<P>It is possible to use this dump style with the <A HREF = "write_dump.html">write_dump</A> command.
-In this case, the subintervals must not be set at all.
-<I>write_dump</I> can be used either alone or in conjunction with <I>file_from</I> so that
-fixed-in-time data can be stored in the same file as time-dependent data.
-</P>
-<P>Typically, the <I>species</I> data is fixed. The following two commands store the
-position data every 100 timesteps, with the image data, and store once the
-species data in the same file.
-</P>
-<PRE>dump h5md1 all h5md 100 dump.h5 position image
-write_dump all h5md dump.h5 file_from h5md1 species
-</PRE>
-<HR>
-
-<P><B>Restrictions:</B>
-</P>
-<UL>
-
-<LI>The number of atoms per snapshot cannot change with the h5md style.
-
-<LI>The position data is stored wrapped (box boundaries not enforced, see note above).
-
-<LI>Only orthogonal domains are currently supported. This is a limitation of the
-present package and not of H5MD itself.
-
-
-</UL>
-<P>The <I>h5md</I> dump style is part of the USER-H5MD package. It is only enabled if
-LAMMPS was built with that package. See the <A HREF = "Section_start.html#start_3">Making
-LAMMPS</A> section for more info. It also requires
-(i) building the ch5md library provided with LAMMPS (See the <A HREF = "Section_start.html#start_3">Making
-LAMMPS</A> section for more info.) and
-(ii) having the <A HREF = "http://www.hdfgroup.org/HDF5/">HDF5</A> library installed (C bindings are sufficient).
-The library ch5md is compiled with the h5cc wrapper provided by the HDF5 library.
-</P>
-
-
-<HR>
-
-<P><B>Related commands:</B>
-</P>
-<P><A HREF = "dump.html">dump</A>, <A HREF = "dump_modify.html">dump_modify</A>, <A HREF = "undump.html">undump</A>
-</P>
-<HR>
-
-<A NAME = "h5md_cpc"></A>
-
-<P><B>(de Buyl et al.)</B> de Buyl, Colberg and Hofling, H5MD: A structured, efficient,
-and portable file format for molecular data, Comp. Phys. Comm. 185(6),
-1546-1553 (2014) - <A HREF = "http://arxiv.org/abs/1308.6382/">[arXiv:1308.6382]</A>.
-</P>
-</HTML>
+box.</p>
+</div>
+<p><strong>Use from write_dump:</strong></p>
+<p>It is possible to use this dump style with the
+<a class="reference internal" href="write_dump.html"><em>write_dump</em></a> command. In this case, the subintervals
+must not be set at all. The write_dump command can be used either to
+create a new file or to add current data to an existing dump file by
+using the <em>file_from</em> keyword.</p>
+<p>Typically, the <em>species</em> data is fixed. The following two commands
+store the position data every 100 timesteps, with the image data, and
+store once the species data in the same file.</p>
+<div class="highlight-python"><div class="highlight"><pre>dump h5md1 all h5md 100 dump.h5 position image
+write_dump all h5md dump.h5 file_from h5md1 species
+</pre></div>
+</div>
+</div>
+<hr class="docutils" />
+<div class="section" id="restrictions">
+<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
+<p>The number of atoms per snapshot cannot change with the h5md style.
+The position data is stored wrapped (box boundaries not enforced, see
+note above). Only orthogonal domains are currently supported. This is
+a limitation of the present dump h5md command and not of H5MD itself.</p>
+<p>The <em>h5md</em> dump style is part of the USER-H5MD package. It is only
+enabled if LAMMPS was built with that package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info. It also
+requires (i) building the ch5md library provided with LAMMPS (See the
+<a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.) and
+(ii) having the <a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> library installed (C bindings are
+sufficient) on your system. The library ch5md is compiled with the
+h5cc wrapper provided by the HDF5 library.</p>
+</div>
+<hr class="docutils" />
+<div class="section" id="related-commands">
+<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
+<p><a class="reference internal" href="dump.html"><em>dump</em></a>, <a class="reference internal" href="dump_modify.html"><em>dump_modify</em></a>, <a class="reference internal" href="undump.html"><em>undump</em></a></p>
+<hr class="docutils" />
+<p id="h5md-cpc"><strong>(de Buyl)</strong> de Buyl, Colberg and Hofling, H5MD: A structured,
+efficient, and portable file format for molecular data,
+Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
+<a class="reference external" href="http://arxiv.org/abs/1308.6382/">[arXiv:1308.6382]</a>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ <footer>
+
+
+ <hr/>
+
+ <div role="contentinfo">
+ <p>
+ &copy; Copyright .
+ </p>
+ </div>
+ Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+
+</footer>
+
+ </div>
+ </div>
+
+ </section>
+
+ </div>
+
+
+
+
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'./',
+ VERSION:'15 May 2015 version',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/underscore.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+ <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
+ <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
+ <script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
+
+
+
+
+
+ <script type="text/javascript" src="_static/js/theme.js"></script>
+
+
+
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.StickyNav.enable();
+ });
+ </script>
+
+
+</body>
+</html>
\ No newline at end of file
diff --git a/doc/dump_h5md.txt b/doc/dump_h5md.txt
index 58b504b97..d8d7b0e79 100644
--- a/doc/dump_h5md.txt
+++ b/doc/dump_h5md.txt
@@ -1,121 +1,124 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
dump h5md command :h3
[Syntax:]
dump ID group-ID h5md N file.h5 args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
h5md = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file.h5 = name of file to write to :l
args = list of data elements to dump, with their dump "subintervals".
At least one element must be given and image may only be present if
position is specified first. :l
position options
image
velocity options
force options
species options
file_from ID: do not open a new file, re-use the already opened file from dump ID
box value = {yes} or {no}
create_group value = {yes} or {no}
author value = quoted string :pre
-For the elements {position}, {velocity}, {force} and {species}, one may specify
-a sub-interval to write the data only every N_element iterations of the dump
-(i.e. every N*N_element time steps). This is specified by the option
+For the elements {position}, {velocity}, {force} and {species}, one
+may specify a sub-interval to write the data only every N_element
+iterations of the dump (i.e. every N*N_element time steps). This is
+specified by the option
every N_element :pre
that follows directly the element declaration.
:ule
[Examples:]
dump h5md1 all h5md 100 dump_h5md.h5 position image
-dump h5md1 all h5md 100 dump_h5md.h5 position velocity every 10 :pre
-dump h5md1 all h5md 100 dump_h5md.h5 velocity author "L. Ammps" :pre
+dump h5md1 all h5md 100 dump_h5md.h5 position velocity every 10
+dump h5md1 all h5md 100 dump_h5md.h5 velocity author "John Doe" :pre
[Description:]
-Dump a snapshot of atom coordinates every N timesteps in the "HDF5"_HDF5_ws
-based "H5MD"_h5md file format "(de Buyl et al.)"_#h5md_cpc.
-HDF5 files are binary, portable and self-describing.
-This dump style will write only one file, on the root node.
+Dump a snapshot of atom coordinates every N timesteps in the
+"HDF5"_HDF5_ws based "H5MD"_h5md file format "(de Buyl)"_#h5md_cpc.
+HDF5 files are binary, portable and self-describing. This dump style
+will write only one file, on the root node.
-Several dumps may write to the same file, by using file_from and referring to a
-previously defined dump.
-Several groups may also be stored within the same file by defining several dumps.
-A dump that refers (via {file_from}) to an already open dump ID and that
-concerns another particle group must specify {create_group yes}.
+Several dumps may write to the same file, by using file_from and
+referring to a previously defined dump. Several groups may also be
+stored within the same file by defining several dumps. A dump that
+refers (via {file_from}) to an already open dump ID and that concerns
+another particle group must specify {create_group yes}.
:link(h5md,http://nongnu.org/h5md/)
Each data element is written every N*N_element steps. For {image}, no
-subinterval is needed as it must be present at the same interval as {position}.
-{image} must be given after {position} in any case.
-The box information (edges in each dimension) is stored at the same interval
-than the {position} element, if present. Else it is stored every N steps.
+subinterval is needed as it must be present at the same interval as
+{position}. {image} must be given after {position} in any case. The
+box information (edges in each dimension) is stored at the same
+interval than the {position} element, if present. Else it is stored
+every N steps.
IMPORTANT NOTE: Because periodic boundary conditions are enforced only
on timesteps when neighbor lists are rebuilt, the coordinates of an
atom written to a dump file may be slightly outside the simulation
box.
[Use from write_dump:]
-It is possible to use this dump style with the "write_dump"_write_dump.html command.
-In this case, the subintervals must not be set at all.
-{write_dump} can be used either alone or in conjunction with {file_from} so that
-fixed-in-time data can be stored in the same file as time-dependent data.
+It is possible to use this dump style with the
+"write_dump"_write_dump.html command. In this case, the subintervals
+must not be set at all. The write_dump command can be used either to
+create a new file or to add current data to an existing dump file by
+using the {file_from} keyword.
-Typically, the {species} data is fixed. The following two commands store the
-position data every 100 timesteps, with the image data, and store once the
-species data in the same file.
+Typically, the {species} data is fixed. The following two commands
+store the position data every 100 timesteps, with the image data, and
+store once the species data in the same file.
dump h5md1 all h5md 100 dump.h5 position image
write_dump all h5md dump.h5 file_from h5md1 species :pre
:line
[Restrictions:]
-:ulb
-The number of atoms per snapshot cannot change with the h5md style. :l
-The position data is stored wrapped (box boundaries not enforced, see note above). :l
-Only orthogonal domains are currently supported. This is a limitation of the
-present package and not of H5MD itself. :l
-:ule
+The number of atoms per snapshot cannot change with the h5md style.
+The position data is stored wrapped (box boundaries not enforced, see
+note above). Only orthogonal domains are currently supported. This is
+a limitation of the present dump h5md command and not of H5MD itself.
-The {h5md} dump style is part of the USER-H5MD package. It is only enabled if
-LAMMPS was built with that package. See the "Making
-LAMMPS"_Section_start.html#start_3 section for more info. It also requires
-(i) building the ch5md library provided with LAMMPS (See the "Making
-LAMMPS"_Section_start.html#start_3 section for more info.) and
-(ii) having the "HDF5"_HDF5_ws library installed (C bindings are sufficient).
-The library ch5md is compiled with the h5cc wrapper provided by the HDF5 library.
+The {h5md} dump style is part of the USER-H5MD package. It is only
+enabled if LAMMPS was built with that package. See the "Making
+LAMMPS"_Section_start.html#start_3 section for more info. It also
+requires (i) building the ch5md library provided with LAMMPS (See the
+"Making LAMMPS"_Section_start.html#start_3 section for more info.) and
+(ii) having the "HDF5"_HDF5_ws library installed (C bindings are
+sufficient) on your system. The library ch5md is compiled with the
+h5cc wrapper provided by the HDF5 library.
:link(HDF5_ws,http://www.hdfgroup.org/HDF5/)
:line
[Related commands:]
"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html
:line
:link(h5md_cpc)
-[(de Buyl et al.)] de Buyl, Colberg and Hofling, H5MD: A structured, efficient,
-and portable file format for molecular data, Comp. Phys. Comm. 185(6),
-1546-1553 (2014) - "\[arXiv:1308.6382\]"_http://arxiv.org/abs/1308.6382/.
+[(de Buyl)] de Buyl, Colberg and Hofling, H5MD: A structured,
+efficient, and portable file format for molecular data,
+Comp. Phys. Comm. 185(6), 1546-1553 (2014) -
+"\[arXiv:1308.6382\]"_http://arxiv.org/abs/1308.6382/.
diff --git a/doc/genindex.html b/doc/genindex.html
index 2592e637a..4ba82769c 100644
--- a/doc/genindex.html
+++ b/doc/genindex.html
@@ -1,2208 +1,2212 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li></li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1 id="index">Index</h1>
<div class="genindex-jumpbox">
<a href="#A"><strong>A</strong></a>
| <a href="#B"><strong>B</strong></a>
| <a href="#C"><strong>C</strong></a>
| <a href="#D"><strong>D</strong></a>
| <a href="#E"><strong>E</strong></a>
| <a href="#F"><strong>F</strong></a>
| <a href="#G"><strong>G</strong></a>
| <a href="#I"><strong>I</strong></a>
| <a href="#J"><strong>J</strong></a>
| <a href="#K"><strong>K</strong></a>
| <a href="#L"><strong>L</strong></a>
| <a href="#M"><strong>M</strong></a>
| <a href="#N"><strong>N</strong></a>
| <a href="#P"><strong>P</strong></a>
| <a href="#Q"><strong>Q</strong></a>
| <a href="#R"><strong>R</strong></a>
| <a href="#S"><strong>S</strong></a>
| <a href="#T"><strong>T</strong></a>
| <a href="#U"><strong>U</strong></a>
| <a href="#V"><strong>V</strong></a>
| <a href="#W"><strong>W</strong></a>
</div>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="angle_coeff.html#index-0">angle_coeff</a>
</dt>
<dt><a href="angle_style.html#index-0">angle_style</a>
</dt>
<dt><a href="angle_charmm.html#index-0">angle_style charmm</a>
</dt>
<dt><a href="angle_class2.html#index-0">angle_style class2</a>
</dt>
<dt><a href="angle_cosine.html#index-0">angle_style cosine</a>
</dt>
<dt><a href="angle_cosine_delta.html#index-0">angle_style cosine/delta</a>
</dt>
<dt><a href="angle_cosine_periodic.html#index-0">angle_style cosine/periodic</a>
</dt>
<dt><a href="angle_cosine_shift.html#index-0">angle_style cosine/shift</a>
</dt>
<dt><a href="angle_cosine_shift_exp.html#index-0">angle_style cosine/shift/exp</a>
</dt>
<dt><a href="angle_cosine_squared.html#index-0">angle_style cosine/squared</a>
</dt>
<dt><a href="angle_dipole.html#index-0">angle_style dipole</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="angle_fourier.html#index-0">angle_style fourier</a>
</dt>
<dt><a href="angle_fourier_simple.html#index-0">angle_style fourier/simple</a>
</dt>
<dt><a href="angle_harmonic.html#index-0">angle_style harmonic</a>
</dt>
<dt><a href="angle_hybrid.html#index-0">angle_style hybrid</a>
</dt>
<dt><a href="angle_none.html#index-0">angle_style none</a>
</dt>
<dt><a href="angle_quartic.html#index-0">angle_style quartic</a>
</dt>
<dt><a href="angle_sdk.html#index-0">angle_style sdk</a>
</dt>
<dt><a href="angle_table.html#index-0">angle_style table</a>
</dt>
<dt><a href="atom_modify.html#index-0">atom_modify</a>
</dt>
<dt><a href="atom_style.html#index-0">atom_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="balance.html#index-0">balance</a>
</dt>
<dt><a href="bond_coeff.html#index-0">bond_coeff</a>
</dt>
<dt><a href="bond_style.html#index-0">bond_style</a>
</dt>
<dt><a href="bond_class2.html#index-0">bond_style class2</a>
</dt>
<dt><a href="bond_fene.html#index-0">bond_style fene</a>
</dt>
<dt><a href="bond_fene_expand.html#index-0">bond_style fene/expand</a>
</dt>
<dt><a href="bond_harmonic.html#index-0">bond_style harmonic</a>
</dt>
<dt><a href="bond_harmonic_shift.html#index-0">bond_style harmonic/shift</a>
</dt>
<dt><a href="bond_harmonic_shift_cut.html#index-0">bond_style harmonic/shift/cut</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="bond_hybrid.html#index-0">bond_style hybrid</a>
</dt>
<dt><a href="bond_morse.html#index-0">bond_style morse</a>
</dt>
<dt><a href="bond_none.html#index-0">bond_style none</a>
</dt>
<dt><a href="bond_nonlinear.html#index-0">bond_style nonlinear</a>
</dt>
<dt><a href="bond_quartic.html#index-0">bond_style quartic</a>
</dt>
<dt><a href="bond_table.html#index-0">bond_style table</a>
</dt>
<dt><a href="boundary.html#index-0">boundary</a>
</dt>
<dt><a href="box.html#index-0">box</a>
</dt>
</dl></td>
</tr></table>
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="change_box.html#index-0">change_box</a>
</dt>
<dt><a href="clear.html#index-0">clear</a>
</dt>
<dt><a href="comm_modify.html#index-0">comm_modify</a>
</dt>
<dt><a href="comm_style.html#index-0">comm_style</a>
</dt>
<dt><a href="compute.html#index-0">compute</a>
</dt>
<dt><a href="compute_ackland_atom.html#index-0">compute ackland/atom</a>
</dt>
<dt><a href="compute_angle_local.html#index-0">compute angle/local</a>
</dt>
<dt><a href="compute_angmom_chunk.html#index-0">compute angmom/chunk</a>
</dt>
<dt><a href="compute_basal_atom.html#index-0">compute basal/atom</a>
</dt>
<dt><a href="compute_body_local.html#index-0">compute body/local</a>
</dt>
<dt><a href="compute_bond_local.html#index-0">compute bond/local</a>
</dt>
<dt><a href="compute_centro_atom.html#index-0">compute centro/atom</a>
</dt>
<dt><a href="compute_chunk_atom.html#index-0">compute chunk/atom</a>
</dt>
<dt><a href="compute_cluster_atom.html#index-0">compute cluster/atom</a>
</dt>
<dt><a href="compute_cna_atom.html#index-0">compute cna/atom</a>
</dt>
<dt><a href="compute_com.html#index-0">compute com</a>
</dt>
<dt><a href="compute_com_chunk.html#index-0">compute com/chunk</a>
</dt>
<dt><a href="compute_contact_atom.html#index-0">compute contact/atom</a>
</dt>
<dt><a href="compute_coord_atom.html#index-0">compute coord/atom</a>
</dt>
<dt><a href="compute_damage_atom.html#index-0">compute damage/atom</a>
</dt>
<dt><a href="compute_dihedral_local.html#index-0">compute dihedral/local</a>
</dt>
<dt><a href="compute_dilatation_atom.html#index-0">compute dilatation/atom</a>
</dt>
<dt><a href="compute_displace_atom.html#index-0">compute displace/atom</a>
</dt>
<dt><a href="compute_erotate_asphere.html#index-0">compute erotate/asphere</a>
</dt>
<dt><a href="compute_erotate_rigid.html#index-0">compute erotate/rigid</a>
</dt>
<dt><a href="compute_erotate_sphere.html#index-0">compute erotate/sphere</a>
</dt>
<dt><a href="compute_erotate_sphere_atom.html#index-0">compute erotate/sphere/atom</a>
</dt>
<dt><a href="compute_event_displace.html#index-0">compute event/displace</a>
</dt>
<dt><a href="compute_fep.html#index-0">compute fep</a>
</dt>
<dt><a href="compute_group_group.html#index-0">compute group/group</a>
</dt>
<dt><a href="compute_gyration.html#index-0">compute gyration</a>
</dt>
<dt><a href="compute_gyration_chunk.html#index-0">compute gyration/chunk</a>
</dt>
<dt><a href="compute_heat_flux.html#index-0">compute heat/flux</a>
</dt>
<dt><a href="compute_improper_local.html#index-0">compute improper/local</a>
</dt>
<dt><a href="compute_inertia_chunk.html#index-0">compute inertia/chunk</a>
</dt>
<dt><a href="compute_ke.html#index-0">compute ke</a>
</dt>
<dt><a href="compute_ke_atom.html#index-0">compute ke/atom</a>
</dt>
<dt><a href="compute_ke_atom_eff.html#index-0">compute ke/atom/eff</a>
</dt>
<dt><a href="compute_ke_eff.html#index-0">compute ke/eff</a>
</dt>
<dt><a href="compute_ke_rigid.html#index-0">compute ke/rigid</a>
</dt>
<dt><a href="compute_meso_e_atom.html#index-0">compute meso_e/atom</a>
</dt>
<dt><a href="compute_meso_rho_atom.html#index-0">compute meso_rho/atom</a>
</dt>
<dt><a href="compute_meso_t_atom.html#index-0">compute meso_t/atom</a>
</dt>
<dt><a href="compute_msd.html#index-0">compute msd</a>
</dt>
<dt><a href="compute_msd_chunk.html#index-0">compute msd/chunk</a>
</dt>
<dt><a href="compute_msd_nongauss.html#index-0">compute msd/nongauss</a>
</dt>
<dt><a href="compute_omega_chunk.html#index-0">compute omega/chunk</a>
</dt>
<dt><a href="compute_pair.html#index-0">compute pair</a>
</dt>
<dt><a href="compute_pair_local.html#index-0">compute pair/local</a>
</dt>
<dt><a href="compute_pe.html#index-0">compute pe</a>
</dt>
<dt><a href="compute_pe_atom.html#index-0">compute pe/atom</a>
</dt>
<dt><a href="compute_plasticity_atom.html#index-0">compute plasticity/atom</a>
</dt>
<dt><a href="compute_pressure.html#index-0">compute pressure</a>
</dt>
<dt><a href="compute_property_atom.html#index-0">compute property/atom</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="compute_property_chunk.html#index-0">compute property/chunk</a>
</dt>
<dt><a href="compute_property_local.html#index-0">compute property/local</a>
</dt>
<dt><a href="compute_rdf.html#index-0">compute rdf</a>
</dt>
<dt><a href="compute_reduce.html#index-0">compute reduce</a>
</dt>
<dt><a href="compute_saed.html#index-0">compute saed</a>
</dt>
<dt><a href="compute_slice.html#index-0">compute slice</a>
</dt>
<dt><a href="compute_smd_contact_radius.html#index-0">compute smd/contact_radius</a>
</dt>
<dt><a href="compute_smd_damage.html#index-0">compute smd/damage</a>
</dt>
<dt><a href="compute_smd_hourglass_error.html#index-0">compute smd/hourglass_error</a>
</dt>
<dt><a href="compute_smd_internal_energy.html#index-0">compute smd/internal_energy</a>
</dt>
<dt><a href="compute_smd_plastic_strain.html#index-0">compute smd/plastic_strain</a>
</dt>
<dt><a href="compute_smd_plastic_strain_rate.html#index-0">compute smd/plastic_strain_rate</a>
</dt>
<dt><a href="compute_smd_rho.html#index-0">compute smd/rho</a>
</dt>
<dt><a href="compute_smd_tlsph_defgrad.html#index-0">compute smd/tlsph_defgrad</a>
</dt>
<dt><a href="compute_smd_tlsph_dt.html#index-0">compute smd/tlsph_dt</a>
</dt>
<dt><a href="compute_smd_tlsph_num_neighs.html#index-0">compute smd/tlsph_num_neighs</a>
</dt>
<dt><a href="compute_smd_tlsph_shape.html#index-0">compute smd/tlsph_shape</a>
</dt>
<dt><a href="compute_smd_tlsph_strain.html#index-0">compute smd/tlsph_strain</a>
</dt>
<dt><a href="compute_smd_tlsph_strain_rate.html#index-0">compute smd/tlsph_strain_rate</a>
</dt>
<dt><a href="compute_smd_tlsph_stress.html#index-0">compute smd/tlsph_stress</a>
</dt>
<dt><a href="compute_smd_ulsph_num_neighs.html#index-0">compute smd/ulsph_num_neighs</a>
</dt>
<dt><a href="compute_smd_ulsph_strain.html#index-0">compute smd/ulsph_strain</a>
</dt>
<dt><a href="compute_smd_ulsph_strain_rate.html#index-0">compute smd/ulsph_strain_rate</a>
</dt>
<dt><a href="compute_smd_ulsph_stress.html#index-0">compute smd/ulsph_stress</a>
</dt>
<dt><a href="compute_smd_vol.html#index-0">compute smd/vol</a>
</dt>
<dt><a href="compute_sna_atom.html#index-0">compute sna/atom</a>
</dt>
<dt><a href="compute_stress_atom.html#index-0">compute stress/atom</a>
</dt>
<dt><a href="compute_temp.html#index-0">compute temp</a>
</dt>
<dt><a href="compute_temp_asphere.html#index-0">compute temp/asphere</a>
</dt>
<dt><a href="compute_temp_chunk.html#index-0">compute temp/chunk</a>
</dt>
<dt><a href="compute_temp_com.html#index-0">compute temp/com</a>
</dt>
<dt><a href="compute_temp_cs.html#index-0">compute temp/cs</a>
</dt>
<dt><a href="compute_temp_deform.html#index-0">compute temp/deform</a>
</dt>
<dt><a href="compute_temp_deform_eff.html#index-0">compute temp/deform/eff</a>
</dt>
<dt><a href="compute_temp_drude.html#index-0">compute temp/drude</a>
</dt>
<dt><a href="compute_temp_eff.html#index-0">compute temp/eff</a>
</dt>
<dt><a href="compute_temp_partial.html#index-0">compute temp/partial</a>
</dt>
<dt><a href="compute_temp_profile.html#index-0">compute temp/profile</a>
</dt>
<dt><a href="compute_temp_ramp.html#index-0">compute temp/ramp</a>
</dt>
<dt><a href="compute_temp_region.html#index-0">compute temp/region</a>
</dt>
<dt><a href="compute_temp_region_eff.html#index-0">compute temp/region/eff</a>
</dt>
<dt><a href="compute_temp_rotate.html#index-0">compute temp/rotate</a>
</dt>
<dt><a href="compute_temp_sphere.html#index-0">compute temp/sphere</a>
</dt>
<dt><a href="compute_ti.html#index-0">compute ti</a>
</dt>
<dt><a href="compute_torque_chunk.html#index-0">compute torque/chunk</a>
</dt>
<dt><a href="compute_vacf.html#index-0">compute vacf</a>
</dt>
<dt><a href="compute_vcm_chunk.html#index-0">compute vcm/chunk</a>
</dt>
<dt><a href="compute_voronoi_atom.html#index-0">compute voronoi/atom</a>
</dt>
<dt><a href="compute_xrd.html#index-0">compute xrd</a>
</dt>
<dt><a href="compute_modify.html#index-0">compute_modify</a>
</dt>
<dt><a href="create_atoms.html#index-0">create_atoms</a>
</dt>
<dt><a href="create_bonds.html#index-0">create_bonds</a>
</dt>
<dt><a href="create_box.html#index-0">create_box</a>
</dt>
</dl></td>
</tr></table>
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="delete_atoms.html#index-0">delete_atoms</a>
</dt>
<dt><a href="delete_bonds.html#index-0">delete_bonds</a>
</dt>
<dt><a href="dielectric.html#index-0">dielectric</a>
</dt>
<dt><a href="dihedral_coeff.html#index-0">dihedral_coeff</a>
</dt>
<dt><a href="dihedral_style.html#index-0">dihedral_style</a>
</dt>
<dt><a href="dihedral_charmm.html#index-0">dihedral_style charmm</a>
</dt>
<dt><a href="dihedral_class2.html#index-0">dihedral_style class2</a>
</dt>
<dt><a href="dihedral_cosine_shift_exp.html#index-0">dihedral_style cosine/shift/exp</a>
</dt>
<dt><a href="dihedral_fourier.html#index-0">dihedral_style fourier</a>
</dt>
<dt><a href="dihedral_harmonic.html#index-0">dihedral_style harmonic</a>
</dt>
<dt><a href="dihedral_helix.html#index-0">dihedral_style helix</a>
</dt>
<dt><a href="dihedral_hybrid.html#index-0">dihedral_style hybrid</a>
</dt>
- </dl></td>
- <td style="width: 33%" valign="top"><dl>
<dt><a href="dihedral_multi_harmonic.html#index-0">dihedral_style multi/harmonic</a>
</dt>
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
<dt><a href="dihedral_nharmonic.html#index-0">dihedral_style nharmonic</a>
</dt>
<dt><a href="dihedral_none.html#index-0">dihedral_style none</a>
</dt>
<dt><a href="dihedral_opls.html#index-0">dihedral_style opls</a>
</dt>
<dt><a href="dihedral_quadratic.html#index-0">dihedral_style quadratic</a>
</dt>
<dt><a href="dihedral_table.html#index-0">dihedral_style table</a>
</dt>
<dt><a href="dimension.html#index-0">dimension</a>
</dt>
<dt><a href="displace_atoms.html#index-0">displace_atoms</a>
</dt>
<dt><a href="dump.html#index-0">dump</a>
</dt>
+ <dt><a href="dump_h5md.html#index-0">dump h5md</a>
+ </dt>
+
+
<dt><a href="dump_image.html#index-0">dump image</a>
</dt>
<dt><a href="dump_molfile.html#index-0">dump molfile</a>
</dt>
<dt><a href="dump_modify.html#index-0">dump_modify</a>
</dt>
</dl></td>
</tr></table>
<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="echo.html#index-0">echo</a>
</dt>
</dl></td>
</tr></table>
<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="fix.html#index-0">fix</a>
</dt>
<dt><a href="fix_adapt.html#index-0">fix adapt</a>
</dt>
<dt><a href="fix_adapt_fep.html#index-0">fix adapt/fep</a>
</dt>
<dt><a href="fix_addforce.html#index-0">fix addforce</a>
</dt>
<dt><a href="fix_addtorque.html#index-0">fix addtorque</a>
</dt>
<dt><a href="fix_append_atoms.html#index-0">fix append/atoms</a>
</dt>
<dt><a href="fix_atc.html#index-0">fix atc</a>
</dt>
<dt><a href="fix_atom_swap.html#index-0">fix atom/swap</a>
</dt>
<dt><a href="fix_ave_atom.html#index-0">fix ave/atom</a>
</dt>
<dt><a href="fix_ave_chunk.html#index-0">fix ave/chunk</a>
</dt>
<dt><a href="fix_ave_correlate.html#index-0">fix ave/correlate</a>
</dt>
<dt><a href="fix_ave_histo.html#index-0">fix ave/histo</a>
</dt>
<dt><a href="fix_ave_spatial.html#index-0">fix ave/spatial</a>
</dt>
<dt><a href="fix_ave_spatial_sphere.html#index-0">fix ave/spatial/sphere</a>
</dt>
<dt><a href="fix_ave_time.html#index-0">fix ave/time</a>
</dt>
<dt><a href="fix_aveforce.html#index-0">fix aveforce</a>
</dt>
<dt><a href="fix_balance.html#index-0">fix balance</a>
</dt>
<dt><a href="fix_bond_break.html#index-0">fix bond/break</a>
</dt>
<dt><a href="fix_bond_create.html#index-0">fix bond/create</a>
</dt>
<dt><a href="fix_bond_swap.html#index-0">fix bond/swap</a>
</dt>
<dt><a href="fix_box_relax.html#index-0">fix box/relax</a>
</dt>
<dt><a href="fix_colvars.html#index-0">fix colvars</a>
</dt>
<dt><a href="fix_deform.html#index-0">fix deform</a>
</dt>
<dt><a href="fix_deposit.html#index-0">fix deposit</a>
</dt>
<dt><a href="fix_drag.html#index-0">fix drag</a>
</dt>
<dt><a href="fix_drude.html#index-0">fix drude</a>
</dt>
<dt><a href="fix_drude_transform.html#index-0">fix drude/transform/direct</a>
</dt>
<dt><a href="fix_dt_reset.html#index-0">fix dt/reset</a>
</dt>
<dt><a href="fix_efield.html#index-0">fix efield</a>
</dt>
<dt><a href="fix_enforce2d.html#index-0">fix enforce2d</a>
</dt>
<dt><a href="fix_evaporate.html#index-0">fix evaporate</a>
</dt>
<dt><a href="fix_external.html#index-0">fix external</a>
</dt>
<dt><a href="fix_freeze.html#index-0">fix freeze</a>
</dt>
<dt><a href="fix_gcmc.html#index-0">fix gcmc</a>
</dt>
<dt><a href="fix_gld.html#index-0">fix gld</a>
</dt>
<dt><a href="fix_gle.html#index-0">fix gle</a>
</dt>
<dt><a href="fix_gravity.html#index-0">fix gravity</a>
</dt>
<dt><a href="fix_heat.html#index-0">fix heat</a>
</dt>
<dt><a href="fix_imd.html#index-0">fix imd</a>
</dt>
<dt><a href="fix_indent.html#index-0">fix indent</a>
</dt>
<dt><a href="fix_ipi.html#index-0">fix ipi</a>
</dt>
<dt><a href="fix_langevin.html#index-0">fix langevin</a>
</dt>
<dt><a href="fix_langevin_drude.html#index-0">fix langevin/drude</a>
</dt>
<dt><a href="fix_langevin_eff.html#index-0">fix langevin/eff</a>
</dt>
<dt><a href="fix_lb_fluid.html#index-0">fix lb/fluid</a>
</dt>
<dt><a href="fix_lb_momentum.html#index-0">fix lb/momentum</a>
</dt>
<dt><a href="fix_lb_pc.html#index-0">fix lb/pc</a>
</dt>
<dt><a href="fix_lb_rigid_pc_sphere.html#index-0">fix lb/rigid/pc/sphere</a>
</dt>
<dt><a href="fix_lb_viscous.html#index-0">fix lb/viscous</a>
</dt>
<dt><a href="fix_lineforce.html#index-0">fix lineforce</a>
</dt>
<dt><a href="fix_meso.html#index-0">fix meso</a>
</dt>
<dt><a href="fix_meso_stationary.html#index-0">fix meso/stationary</a>
</dt>
<dt><a href="fix_momentum.html#index-0">fix momentum</a>
</dt>
<dt><a href="fix_move.html#index-0">fix move</a>
</dt>
<dt><a href="fix_msst.html#index-0">fix msst</a>
</dt>
<dt><a href="fix_neb.html#index-0">fix neb</a>
</dt>
<dt><a href="fix_nph_asphere.html#index-0">fix nph/asphere</a>
</dt>
<dt><a href="fix_nph_sphere.html#index-0">fix nph/sphere</a>
</dt>
<dt><a href="fix_nphug.html#index-0">fix nphug</a>
</dt>
<dt><a href="fix_npt_asphere.html#index-0">fix npt/asphere</a>
</dt>
<dt><a href="fix_npt_sphere.html#index-0">fix npt/sphere</a>
</dt>
<dt><a href="fix_nve.html#index-0">fix nve</a>
</dt>
<dt><a href="fix_nve_asphere.html#index-0">fix nve/asphere</a>
</dt>
<dt><a href="fix_nve_asphere_noforce.html#index-0">fix nve/asphere/noforce</a>
</dt>
<dt><a href="fix_nve_body.html#index-0">fix nve/body</a>
</dt>
<dt><a href="fix_nve_eff.html#index-0">fix nve/eff</a>
</dt>
<dt><a href="fix_nve_limit.html#index-0">fix nve/limit</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="fix_nve_line.html#index-0">fix nve/line</a>
</dt>
<dt><a href="fix_nve_noforce.html#index-0">fix nve/noforce</a>
</dt>
<dt><a href="fix_nve_sphere.html#index-0">fix nve/sphere</a>
</dt>
<dt><a href="fix_nve_tri.html#index-0">fix nve/tri</a>
</dt>
<dt><a href="fix_nh.html#index-0">fix nvt</a>
</dt>
<dt><a href="fix_nvt_asphere.html#index-0">fix nvt/asphere</a>
</dt>
<dt><a href="fix_nh_eff.html#index-0">fix nvt/eff</a>
</dt>
<dt><a href="fix_nvt_sllod.html#index-0">fix nvt/sllod</a>
</dt>
<dt><a href="fix_nvt_sllod_eff.html#index-0">fix nvt/sllod/eff</a>
</dt>
<dt><a href="fix_nvt_sphere.html#index-0">fix nvt/sphere</a>
</dt>
<dt><a href="fix_oneway.html#index-0">fix oneway</a>
</dt>
<dt><a href="fix_orient_fcc.html#index-0">fix orient/fcc</a>
</dt>
<dt><a href="fix_phonon.html#index-0">fix phonon</a>
</dt>
<dt><a href="fix_pimd.html#index-0">fix pimd</a>
</dt>
<dt><a href="fix_planeforce.html#index-0">fix planeforce</a>
</dt>
<dt><a href="fix_pour.html#index-0">fix pour</a>
</dt>
<dt><a href="fix_press_berendsen.html#index-0">fix press/berendsen</a>
</dt>
<dt><a href="fix_print.html#index-0">fix print</a>
</dt>
<dt><a href="fix_property_atom.html#index-0">fix property/atom</a>
</dt>
<dt><a href="fix_qbmsst.html#index-0">fix qbmsst</a>
</dt>
<dt><a href="fix_qeq_comb.html#index-0">fix qeq/comb</a>
</dt>
<dt><a href="fix_qeq.html#index-0">fix qeq/point</a>
</dt>
<dt><a href="fix_qeq_reax.html#index-0">fix qeq/reax</a>
</dt>
<dt><a href="fix_qmmm.html#index-0">fix qmmm</a>
</dt>
<dt><a href="fix_qtb.html#index-0">fix qtb</a>
</dt>
<dt><a href="fix_reax_bonds.html#index-0">fix reax/bonds</a>
</dt>
<dt><a href="fix_reaxc_species.html#index-0">fix reax/c/species</a>
</dt>
<dt><a href="fix_recenter.html#index-0">fix recenter</a>
</dt>
<dt><a href="fix_restrain.html#index-0">fix restrain</a>
</dt>
<dt><a href="fix_rigid.html#index-0">fix rigid</a>
</dt>
<dt><a href="fix_saed_vtk.html#index-0">fix saed/vtk</a>
</dt>
<dt><a href="fix_setforce.html#index-0">fix setforce</a>
</dt>
<dt><a href="fix_shake.html#index-0">fix shake</a>
</dt>
<dt><a href="fix_smd.html#index-0">fix smd</a>
</dt>
<dt><a href="fix_smd_adjust_dt.html#index-0">fix smd/adjust_dt</a>
</dt>
<dt><a href="fix_smd_integrate_tlsph.html#index-0">fix smd/integrate_tlsph</a>
</dt>
<dt><a href="fix_smd_integrate_ulsph.html#index-0">fix smd/integrate_ulsph</a>
</dt>
<dt><a href="fix_smd_move_triangulated_surface.html#index-0">fix smd/move_tri_surf</a>
</dt>
<dt><a href="fix_smd_setvel.html#index-0">fix smd/setvel</a>
</dt>
<dt><a href="fix_smd_wall_surface.html#index-0">fix smd/wall_surface</a>
</dt>
<dt><a href="fix_spring.html#index-0">fix spring</a>
</dt>
<dt><a href="fix_spring_rg.html#index-0">fix spring/rg</a>
</dt>
<dt><a href="fix_spring_self.html#index-0">fix spring/self</a>
</dt>
<dt><a href="fix_srd.html#index-0">fix srd</a>
</dt>
<dt><a href="fix_store_force.html#index-0">fix store/force</a>
</dt>
<dt><a href="fix_store_state.html#index-0">fix store/state</a>
</dt>
<dt><a href="fix_temp_berendsen.html#index-0">fix temp/berendsen</a>
</dt>
<dt><a href="fix_temp_csvr.html#index-0">fix temp/csvr</a>
</dt>
<dt><a href="fix_temp_rescale.html#index-0">fix temp/rescale</a>
</dt>
<dt><a href="fix_temp_rescale_eff.html#index-0">fix temp/rescale/eff</a>
</dt>
<dt><a href="fix_tfmc.html#index-0">fix tfmc</a>
</dt>
<dt><a href="fix_thermal_conductivity.html#index-0">fix thermal/conductivity</a>
</dt>
<dt><a href="fix_ti_rs.html#index-0">fix ti/rs</a>
</dt>
<dt><a href="fix_ti_spring.html#index-0">fix ti/spring</a>
</dt>
<dt><a href="fix_tmd.html#index-0">fix tmd</a>
</dt>
<dt><a href="fix_ttm.html#index-0">fix ttm</a>
</dt>
<dt><a href="fix_tune_kspace.html#index-0">fix tune/kspace</a>
</dt>
<dt><a href="fix_vector.html#index-0">fix vector</a>
</dt>
<dt><a href="fix_viscosity.html#index-0">fix viscosity</a>
</dt>
<dt><a href="fix_viscous.html#index-0">fix viscous</a>
</dt>
<dt><a href="fix_wall_gran.html#index-0">fix wall/gran</a>
</dt>
<dt><a href="fix_wall.html#index-0">fix wall/lj93</a>
</dt>
<dt><a href="fix_wall_piston.html#index-0">fix wall/piston</a>
</dt>
<dt><a href="fix_wall_reflect.html#index-0">fix wall/reflect</a>
</dt>
<dt><a href="fix_wall_region.html#index-0">fix wall/region</a>
</dt>
<dt><a href="fix_wall_srd.html#index-0">fix wall/srd</a>
</dt>
<dt><a href="fix_modify.html#index-0">fix_modify</a>
</dt>
</dl></td>
</tr></table>
<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="group.html#index-0">group</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="group2ndx.html#index-0">group2ndx</a>
</dt>
</dl></td>
</tr></table>
<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="if.html#index-0">if</a>
</dt>
<dt><a href="improper_coeff.html#index-0">improper_coeff</a>
</dt>
<dt><a href="improper_style.html#index-0">improper_style</a>
</dt>
<dt><a href="improper_class2.html#index-0">improper_style class2</a>
</dt>
<dt><a href="improper_cossq.html#index-0">improper_style cossq</a>
</dt>
<dt><a href="improper_cvff.html#index-0">improper_style cvff</a>
</dt>
<dt><a href="improper_fourier.html#index-0">improper_style fourier</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="improper_harmonic.html#index-0">improper_style harmonic</a>
</dt>
<dt><a href="improper_hybrid.html#index-0">improper_style hybrid</a>
</dt>
<dt><a href="improper_none.html#index-0">improper_style none</a>
</dt>
<dt><a href="improper_ring.html#index-0">improper_style ring</a>
</dt>
<dt><a href="improper_umbrella.html#index-0">improper_style umbrella</a>
</dt>
<dt><a href="include.html#index-0">include</a>
</dt>
<dt><a href="info.html#index-0">info</a>
</dt>
</dl></td>
</tr></table>
<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="jump.html#index-0">jump</a>
</dt>
</dl></td>
</tr></table>
<h2 id="K">K</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="kspace_modify.html#index-0">kspace_modify</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="kspace_style.html#index-0">kspace_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="label.html#index-0">label</a>
</dt>
<dt><a href="lattice.html#index-0">lattice</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="log.html#index-0">log</a>
</dt>
</dl></td>
</tr></table>
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="mass.html#index-0">mass</a>
</dt>
<dt><a href="min_modify.html#index-0">min_modify</a>
</dt>
<dt><a href="min_style.html#index-0">min_style</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="minimize.html#index-0">minimize</a>
</dt>
<dt><a href="molecule.html#index-0">molecule</a>
</dt>
</dl></td>
</tr></table>
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="neb.html#index-0">neb</a>
</dt>
<dt><a href="neigh_modify.html#index-0">neigh_modify</a>
</dt>
<dt><a href="neighbor.html#index-0">neighbor</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="newton.html#index-0">newton</a>
</dt>
<dt><a href="next.html#index-0">next</a>
</dt>
</dl></td>
</tr></table>
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="package.html#index-0">package</a>
</dt>
<dt><a href="pair_coeff.html#index-0">pair_coeff</a>
</dt>
<dt><a href="pair_modify.html#index-0">pair_modify</a>
</dt>
<dt><a href="pair_style.html#index-0">pair_style</a>
</dt>
<dt><a href="pair_adp.html#index-0">pair_style adp</a>
</dt>
<dt><a href="pair_airebo.html#index-0">pair_style airebo</a>
</dt>
<dt><a href="pair_awpmd.html#index-0">pair_style awpmd/cut</a>
</dt>
<dt><a href="pair_beck.html#index-0">pair_style beck</a>
</dt>
<dt><a href="pair_body.html#index-0">pair_style body</a>
</dt>
<dt><a href="pair_bop.html#index-0">pair_style bop</a>
</dt>
<dt><a href="pair_born.html#index-0">pair_style born</a>
</dt>
<dt><a href="pair_cs.html#index-0">pair_style born/coul/long/cs</a>
</dt>
<dt><a href="pair_brownian.html#index-0">pair_style brownian</a>
</dt>
<dt><a href="pair_buck.html#index-0">pair_style buck</a>
</dt>
<dt><a href="pair_buck_long.html#index-0">pair_style buck/long/coul/long</a>
</dt>
<dt><a href="pair_colloid.html#index-0">pair_style colloid</a>
</dt>
<dt><a href="pair_comb.html#index-0">pair_style comb</a>
</dt>
<dt><a href="pair_coul.html#index-0">pair_style coul/cut</a>
</dt>
<dt><a href="pair_coul_diel.html#index-0">pair_style coul/diel</a>
</dt>
<dt><a href="pair_dpd.html#index-0">pair_style dpd</a>
</dt>
<dt><a href="pair_dsmc.html#index-0">pair_style dsmc</a>
</dt>
<dt><a href="pair_eam.html#index-0">pair_style eam</a>
</dt>
<dt><a href="pair_edip.html#index-0">pair_style edip</a>
</dt>
<dt><a href="pair_eff.html#index-0">pair_style eff/cut</a>
</dt>
<dt><a href="pair_eim.html#index-0">pair_style eim</a>
</dt>
<dt><a href="pair_gauss.html#index-0">pair_style gauss</a>
</dt>
<dt><a href="pair_gayberne.html#index-0">pair_style gayberne</a>
</dt>
<dt><a href="pair_gran.html#index-0">pair_style gran/hooke</a>
</dt>
<dt><a href="pair_hbond_dreiding.html#index-0">pair_style hbond/dreiding/lj</a>
</dt>
<dt><a href="pair_hybrid.html#index-0">pair_style hybrid</a>
</dt>
<dt><a href="pair_kim.html#index-0">pair_style kim</a>
</dt>
<dt><a href="pair_lcbop.html#index-0">pair_style lcbop</a>
</dt>
<dt><a href="pair_line_lj.html#index-0">pair_style line/lj</a>
</dt>
<dt><a href="pair_list.html#index-0">pair_style list</a>
</dt>
<dt><a href="pair_charmm.html#index-0">pair_style lj/charmm/coul/charmm</a>
</dt>
<dt><a href="pair_class2.html#index-0">pair_style lj/class2</a>
</dt>
<dt><a href="pair_lj_cubic.html#index-0">pair_style lj/cubic</a>
</dt>
<dt><a href="pair_lj.html#index-0">pair_style lj/cut</a>
</dt>
<dt><a href="pair_dipole.html#index-0">pair_style lj/cut/dipole/cut</a>
</dt>
<dt><a href="pair_lj_soft.html#index-0">pair_style lj/cut/soft</a>
</dt>
<dt><a href="pair_lj_expand.html#index-0">pair_style lj/expand</a>
</dt>
<dt><a href="pair_gromacs.html#index-0">pair_style lj/gromacs</a>
</dt>
<dt><a href="pair_lj_long.html#index-0">pair_style lj/long/coul/long</a>
</dt>
<dt><a href="pair_sdk.html#index-0">pair_style lj/sdk</a>
</dt>
<dt><a href="pair_lj_sf.html#index-0">pair_style lj/sf</a>
</dt>
<dt><a href="pair_lj_smooth.html#index-0">pair_style lj/smooth</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="pair_lj_smooth_linear.html#index-0">pair_style lj/smooth/linear</a>
</dt>
<dt><a href="pair_lj96.html#index-0">pair_style lj96/cut</a>
</dt>
<dt><a href="pair_lubricate.html#index-0">pair_style lubricate</a>
</dt>
<dt><a href="pair_lubricateU.html#index-0">pair_style lubricateU</a>
</dt>
<dt><a href="pair_meam.html#index-0">pair_style meam</a>
</dt>
<dt><a href="pair_mie.html#index-0">pair_style mie/cut</a>
</dt>
<dt><a href="pair_morse.html#index-0">pair_style morse</a>
</dt>
<dt><a href="pair_nb3b_harmonic.html#index-0">pair_style nb3b/harmonic</a>
</dt>
<dt><a href="pair_nm.html#index-0">pair_style nm/cut</a>
</dt>
<dt><a href="pair_none.html#index-0">pair_style none</a>
</dt>
<dt><a href="pair_peri.html#index-0">pair_style peri/pmb</a>
</dt>
<dt><a href="pair_polymorphic.html#index-0">pair_style polymorphic</a>
</dt>
<dt><a href="pair_quip.html#index-0">pair_style quip</a>
</dt>
<dt><a href="pair_reax.html#index-0">pair_style reax</a>
</dt>
<dt><a href="pair_reax_c.html#index-0">pair_style reax/c</a>
</dt>
<dt><a href="pair_resquared.html#index-0">pair_style resquared</a>
</dt>
<dt><a href="pair_smd_hertz.html#index-0">pair_style smd/hertz</a>
</dt>
<dt><a href="pair_smd_tlsph.html#index-0">pair_style smd/tlsph</a>
</dt>
<dt><a href="pair_smd_triangulated_surface.html#index-0">pair_style smd/tri_surface</a>
</dt>
<dt><a href="pair_smd_ulsph.html#index-0">pair_style smd/ulsph</a>
</dt>
<dt><a href="pair_snap.html#index-0">pair_style snap</a>
</dt>
<dt><a href="pair_soft.html#index-0">pair_style soft</a>
</dt>
<dt><a href="pair_sph_heatconduction.html#index-0">pair_style sph/heatconduction</a>
</dt>
<dt><a href="pair_sph_idealgas.html#index-0">pair_style sph/idealgas</a>
</dt>
<dt><a href="pair_sph_lj.html#index-0">pair_style sph/lj</a>
</dt>
<dt><a href="pair_sph_rhosum.html#index-0">pair_style sph/rhosum</a>
</dt>
<dt><a href="pair_sph_taitwater.html#index-0">pair_style sph/taitwater</a>
</dt>
<dt><a href="pair_sph_taitwater_morris.html#index-0">pair_style sph/taitwater/morris</a>
</dt>
<dt><a href="pair_srp.html#index-0">pair_style srp</a>
</dt>
<dt><a href="pair_sw.html#index-0">pair_style sw</a>
</dt>
<dt><a href="pair_table.html#index-0">pair_style table</a>
</dt>
<dt><a href="pair_tersoff.html#index-0">pair_style tersoff</a>
</dt>
<dt><a href="pair_tersoff_mod.html#index-0">pair_style tersoff/mod</a>
</dt>
<dt><a href="pair_tersoff_zbl.html#index-0">pair_style tersoff/zbl</a>
</dt>
<dt><a href="pair_thole.html#index-0">pair_style thole</a>
</dt>
<dt><a href="pair_tri_lj.html#index-0">pair_style tri/lj</a>
</dt>
<dt><a href="pair_yukawa.html#index-0">pair_style yukawa</a>
</dt>
<dt><a href="pair_yukawa_colloid.html#index-0">pair_style yukawa/colloid</a>
</dt>
<dt><a href="pair_zbl.html#index-0">pair_style zbl</a>
</dt>
<dt><a href="pair_write.html#index-0">pair_write</a>
</dt>
<dt><a href="partition.html#index-0">partition</a>
</dt>
<dt><a href="prd.html#index-0">prd</a>
</dt>
<dt><a href="print.html#index-0">print</a>
</dt>
<dt><a href="processors.html#index-0">processors</a>
</dt>
<dt><a href="python.html#index-0">python</a>
</dt>
</dl></td>
</tr></table>
<h2 id="Q">Q</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="quit.html#index-0">quit</a>
</dt>
</dl></td>
</tr></table>
<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="read_data.html#index-0">read_data</a>
</dt>
<dt><a href="read_dump.html#index-0">read_dump</a>
</dt>
<dt><a href="read_restart.html#index-0">read_restart</a>
</dt>
<dt><a href="region.html#index-0">region</a>
</dt>
<dt><a href="replicate.html#index-0">replicate</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="rerun.html#index-0">rerun</a>
</dt>
<dt><a href="reset_timestep.html#index-0">reset_timestep</a>
</dt>
<dt><a href="restart.html#index-0">restart</a>
</dt>
<dt><a href="run.html#index-0">run</a>
</dt>
<dt><a href="run_style.html#index-0">run_style</a>
</dt>
</dl></td>
</tr></table>
<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="set.html#index-0">set</a>
</dt>
<dt><a href="shell.html#index-0">shell</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="special_bonds.html#index-0">special_bonds</a>
</dt>
<dt><a href="suffix.html#index-0">suffix</a>
</dt>
</dl></td>
</tr></table>
<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="tad.html#index-0">tad</a>
</dt>
<dt><a href="temper.html#index-0">temper</a>
</dt>
<dt><a href="thermo.html#index-0">thermo</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="thermo_modify.html#index-0">thermo_modify</a>
</dt>
<dt><a href="thermo_style.html#index-0">thermo_style</a>
</dt>
<dt><a href="timestep.html#index-0">timestep</a>
</dt>
</dl></td>
</tr></table>
<h2 id="U">U</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="uncompute.html#index-0">uncompute</a>
</dt>
<dt><a href="undump.html#index-0">undump</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="unfix.html#index-0">unfix</a>
</dt>
<dt><a href="units.html#index-0">units</a>
</dt>
</dl></td>
</tr></table>
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="variable.html#index-0">variable</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="velocity.html#index-0">velocity</a>
</dt>
</dl></td>
</tr></table>
<h2 id="W">W</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
<dt><a href="write_data.html#index-0">write_data</a>
</dt>
<dt><a href="write_dump.html#index-0">write_dump</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
<dt><a href="write_restart.html#index-0">write_restart</a>
</dt>
</dl></td>
</tr></table>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/package.html b/doc/package.html
index 8e2b6375b..ef43abc4f 100644
--- a/doc/package.html
+++ b/doc/package.html
@@ -1,763 +1,765 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>package command &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>package command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="package-command">
<span id="index-0"></span><h1>package command<a class="headerlink" href="#package-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>package style args
</pre></div>
</div>
<ul class="simple">
<li>style = <em>cuda</em> or <em>gpu</em> or <em>intel</em> or <em>kokkos</em> or <em>omp</em></li>
<li>args = arguments specific to the style</li>
</ul>
<pre class="literal-block">
<em>cuda</em> args = Ngpu keyword value ...
Ngpu = # of GPUs per node
zero or more keyword/value pairs may be appended
keywords = <em>newton</em> or <em>gpuID</em> or <em>timing</em> or <em>test</em> or <em>thread</em>
<em>newton</em> = <em>off</em> or <em>on</em>
off = set Newton pairwise and bonded flags off (default)
on = set Newton pairwise and bonded flags on
<em>gpuID</em> values = gpu1 .. gpuN
gpu1 .. gpuN = IDs of the Ngpu GPUs to use
<em>timing</em> values = none
<em>test</em> values = id
id = atom-ID of a test particle
<em>thread</em> = auto or tpa or bpa
auto = test whether tpa or bpa is faster
tpa = one thread per atom
bpa = one block per atom
<em>gpu</em> args = Ngpu keyword value ...
Ngpu = # of GPUs per node
zero or more keyword/value pairs may be appended
keywords = <em>neigh</em> or <em>newton</em> or <em>binsize</em> or <em>split</em> or <em>gpuID</em> or <em>tpa</em> or <em>device</em>
<em>neigh</em> value = <em>yes</em> or <em>no</em>
yes = neighbor list build on GPU (default)
no = neighbor list build on CPU
<em>newton</em> = <em>off</em> or <em>on</em>
off = set Newton pairwise flag off (default and required)
on = set Newton pairwise flag on (currently not allowed)
<em>binsize</em> value = size
size = bin size for neighbor list construction (distance units)
<em>split</em> = fraction
fraction = fraction of atoms assigned to GPU (default = 1.0)
<em>gpuID</em> values = first last
first = ID of first GPU to be used on each node
last = ID of last GPU to be used on each node
<em>tpa</em> value = Nthreads
Nthreads = # of GPU threads used per atom
<em>device</em> value = device_type
device_type = <em>kepler</em> or <em>fermi</em> or <em>cypress</em> or <em>generic</em>
+ <em>blocksize</em> value = size
+ size = thread block size for pair force computation
<em>intel</em> args = NPhi keyword value ...
Nphi = # of coprocessors per node
zero or more keyword/value pairs may be appended
keywords = <em>omp</em> or <em>mode</em> or <em>balance</em> or <em>ghost</em> or <em>tpc</em> or <em>tptask</em> or <em>no_affinity</em>
<em>omp</em> value = Nthreads
Nthreads = number of OpenMP threads to use on CPU (default = 0)
<em>mode</em> value = <em>single</em> or <em>mixed</em> or <em>double</em>
single = perform force calculations in single precision
mixed = perform force calculations in mixed precision
double = perform force calculations in double precision
<em>balance</em> value = split
split = fraction of work to offload to coprocessor, -1 for dynamic
<em>ghost</em> value = <em>yes</em> or <em>no</em>
yes = include ghost atoms for offload
no = do not include ghost atoms for offload
<em>tpc</em> value = Ntpc
Ntpc = max number of coprocessor threads per coprocessor core (default = 4)
<em>tptask</em> value = Ntptask
Ntptask = max number of coprocessor threads per MPI task (default = 240)
<em>no_affinity</em> values = none
<em>kokkos</em> args = keyword value ...
zero or more keyword/value pairs may be appended
keywords = <em>neigh</em> or <em>newton</em> or <em>binsize</em> or <em>comm</em> or <em>comm/exchange</em> or <em>comm/forward</em>
<em>neigh</em> value = <em>full</em> or <em>half/thread</em> or <em>half</em> or <em>n2</em> or <em>full/cluster</em>
full = full neighbor list
half/thread = half neighbor list built in thread-safe manner
half = half neighbor list, not thread-safe, only use when 1 thread/MPI task
n2 = non-binning neighbor list build, O(N^2) algorithm
full/cluster = full neighbor list with clustered groups of atoms
<em>newton</em> = <em>off</em> or <em>on</em>
off = set Newton pairwise and bonded flags off (default)
on = set Newton pairwise and bonded flags on
<em>binsize</em> value = size
size = bin size for neighbor list construction (distance units)
<em>comm</em> value = <em>no</em> or <em>host</em> or <em>device</em>
use value for both comm/exchange and comm/forward
<em>comm/exchange</em> value = <em>no</em> or <em>host</em> or <em>device</em>
<em>comm/forward</em> value = <em>no</em> or <em>host</em> or <em>device</em>
no = perform communication pack/unpack in non-KOKKOS mode
host = perform pack/unpack on host (e.g. with OpenMP threading)
device = perform pack/unpack on device (e.g. on GPU)
<em>omp</em> args = Nthreads keyword value ...
Nthread = # of OpenMP threads to associate with each MPI process
zero or more keyword/value pairs may be appended
keywords = <em>neigh</em>
<em>neigh</em> value = <em>yes</em> or <em>no</em>
yes = threaded neighbor list build (default)
no = non-threaded neighbor list build
</pre>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>package gpu 1
package gpu 1 split 0.75
package gpu 2 split -1.0
package cuda 2 gpuID 0 2
package cuda 1 test 3948
package kokkos neigh half/thread comm device
package omp 0 neigh no
package omp 4
package intel 1
package intel 2 omp 4 mode mixed balance 0.5
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>This command invokes package-specific settings for the various
accelerator packages available in LAMMPS. Currently the following
packages use settings from this command: USER-CUDA, GPU, USER-INTEL,
KOKKOS, and USER-OMP.</p>
<p>If this command is specified in an input script, it must be near the
top of the script, before the simulation box has been defined. This
is because it specifies settings that the accelerator packages use in
their intialization, before a simultion is defined.</p>
<p>This command can also be specified from the command-line when
launching LAMMPS, using the &#8220;-pk&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>. The syntax is exactly the same as
when used in an input script.</p>
<p>Note that all of the accelerator packages require the package command
to be specified (except the OPT package), if the package is to be used
in a simulation (LAMMPS can be built with an accelerator package
without using it in a particular simulation). However, in all cases,
a default version of the command is typically invoked by other
accelerator settings.</p>
<p>The USER-CUDA and KOKKOS packages require a &#8220;-c on&#8221; or &#8220;-k on&#8221;
<a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a> respectively, which
invokes a &#8220;package cuda&#8221; or &#8220;package kokkos&#8221; command with default
settings.</p>
<p>For the GPU, USER-INTEL, and USER-OMP packages, if a &#8220;-sf gpu&#8221; or &#8220;-sf
intel&#8221; or &#8220;-sf omp&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>
is used to auto-append accelerator suffixes to various styles in the
input script, then those switches also invoke a &#8220;package gpu&#8221;,
&#8220;package intel&#8221;, or &#8220;package omp&#8221; command with default settings.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">A package command for a particular style can be
invoked multiple times when a simulation is setup, e.g. by the &#8220;-c
on&#8221;, &#8220;-k on&#8221;, &#8220;-sf&#8221;, and &#8220;-pk&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switches</span></a>, and by using this command in an
input script. Each time it is used all of the style options are set,
either to default values or to specified settings. I.e. settings from
previous invocations do not persist across multiple invocations.</p>
</div>
<p>See the <a class="reference internal" href="Section_accelerate.html"><em>Section Accelerate</em></a> section of the
manual for more details about using the various accelerator packages
for speeding up LAMMPS simulations.</p>
<hr class="docutils" />
<p>The <em>cuda</em> style invokes settings associated with the use of the
USER-CUDA package.</p>
<p>The <em>Ngpus</em> argument sets the number of GPUs per node. There must be
exactly one MPI task per GPU, as set by the mpirun or mpiexec command.</p>
<p>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.</p>
<p>The <em>newton</em> keyword sets the Newton flags for pairwise and bonded
interactions to <em>off</em> or <em>on</em>, the same as the <a class="reference internal" href="newton.html"><em>newton</em></a>
command allows. The default is <em>off</em> because this will almost always
give better performance for the USER-CUDA package. This means
more computation is done, but less communication.</p>
<p>The <em>gpuID</em> keyword allows selection of which GPUs on each node will
be used for a simulation. GPU IDs range from 0 to N-1 where N is the
physical number of GPUs/node. An ID is specified for each of the
Ngpus being used. For example if you have three GPUs on a machine,
one of which is used for the X-Server (the GPU with the ID 1) while
the others (with IDs 0 and 2) are used for computations you would
specify:</p>
<div class="highlight-python"><div class="highlight"><pre>package cuda 2 gpuID 0 2
</pre></div>
</div>
<p>The purpose of the <em>gpuID</em> keyword is to allow two (or more)
simulations to be run on one workstation. In that case one could set
the first simulation to use GPU 0 and the second to use GPU 1. This is
not necessary however, if the GPUs are in what is called <em>compute
exclusive</em> mode. Using that setting, every process will get its own
GPU automatically. This <em>compute exclusive</em> mode can be set as root
using the <em>nvidia-smi</em> tool which is part of the CUDA installation.</p>
<p>Also note that if the <em>gpuID</em> keyword is not used, the USER-CUDA
package sorts existing GPUs on each node according to their number of
multiprocessors. This way, compute GPUs will be priorized over
X-Server GPUs.</p>
<p>If the <em>timing</em> keyword is specified, detailed timing information for
various subroutines will be output.</p>
<p>If the <em>test</em> keyword is specified, information for the specified atom
with atom-ID will be output at several points during each timestep.
This is mainly usefull for debugging purposes. Note that the
simulation slow down dramatically if this option is used.</p>
<p>The <em>thread</em> keyword can be used to specify how GPU threads are
assigned work during pair style force evaluation. If the value =
<em>tpa</em>, one thread per atom is used. If the value = <em>bpa</em>, one block
per atom is used. If the value = <em>auto</em>, a short test is performed at
the beginning of each run to determing where <em>tpa</em> or <em>bpa</em> mode is
faster. The result of this test is output. Since <em>auto</em> is the
default value, it is usually not necessary to use this keyword.</p>
<hr class="docutils" />
<p>The <em>gpu</em> style invokes settings associated with the use of the GPU
package.</p>
<p>The <em>Ngpu</em> argument sets the number of GPUs per node. There must be
at least as many MPI tasks per node as GPUs, as set by the mpirun or
mpiexec command. If there are more MPI tasks (per node)
than GPUs, multiple MPI tasks will share each GPU.</p>
<p>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.</p>
<p>The <em>neigh</em> keyword specifies where neighbor lists for pair style
computation will be built. If <em>neigh</em> is <em>yes</em>, which is the default,
neighbor list building is performed on the GPU. If <em>neigh</em> is <em>no</em>,
neighbor list building is performed on the CPU. GPU neighbor list
building currently cannot be used with a triclinic box. GPU neighbor
list calculation currently cannot be used with
<a class="reference internal" href="pair_hybrid.html"><em>hybrid</em></a> pair styles. GPU neighbor lists are not
compatible with comannds that are not GPU-enabled. When a non-GPU
enabled command requires a neighbor list, it will also be built on the
CPU. In these cases, it will typically be more efficient to only use
CPU neighbor list builds.</p>
<p>The <em>newton</em> keyword sets the Newton flags for pairwise (not bonded)
interactions to <em>off</em> or <em>on</em>, the same as the <a class="reference internal" href="newton.html"><em>newton</em></a>
command allows. Currently, only an <em>off</em> value is allowed, since all
the GPU package pair styles require this setting. This means more
computation is done, but less communication. In the future a value of
<em>on</em> may be allowed, so the <em>newton</em> keyword is included as an option
for compatibility with the package command for other accelerator
styles. Note that the newton setting for bonded interactions is not
affected by this keyword.</p>
<p>The <em>binsize</em> keyword sets the size of bins used to bin atoms in
neighbor list builds performed on the GPU, if <em>neigh</em> = <em>yes</em> is set.
If <em>binsize</em> is set to 0.0 (the default), then bins = the size of the
pairwise cutoff + neighbor skin distance. This is 2x larger than the
LAMMPS default used for neighbor list building on the CPU. This will
be close to optimal for the GPU, so you do not normally need to use
this keyword. Note that if you use a longer-than-usual pairwise
cutoff, e.g. to allow for a smaller fraction of KSpace work with a
<a class="reference internal" href="kspace_style.html"><em>long-range Coulombic solver</em></a> because the GPU is
faster at performing pairwise interactions, then it may be optimal to
make the <em>binsize</em> smaller than the default. For example, with a
cutoff of 20*sigma in LJ <a class="reference internal" href="units.html"><em>units</em></a> and a neighbor skin
distance of sigma, a <em>binsize</em> = 5.25*sigma can be more efficient than
the default.</p>
<p>The <em>split</em> keyword can be used for load balancing force calculations
between CPU and GPU cores in GPU-enabled pair styles. If 0 &lt; <em>split</em> &lt;
1.0, a fixed fraction of particles is offloaded to the GPU while force
calculation for the other particles occurs simulataneously on the CPU.
If <em>split</em> &lt; 0.0, the optimal fraction (based on CPU and GPU timings)
is calculated every 25 timesteps, i.e. dynamic load-balancing across
the CPU and GPU is performed. If <em>split</em> = 1.0, all force
calculations for GPU accelerated pair styles are performed on the GPU.
In this case, other <a class="reference internal" href="pair_hybrid.html"><em>hybrid</em></a> pair interactions,
<a class="reference internal" href="bond_style.html"><em>bond</em></a>, <a class="reference internal" href="angle_style.html"><em>angle</em></a>,
<a class="reference internal" href="dihedral_style.html"><em>dihedral</em></a>, <a class="reference internal" href="improper_style.html"><em>improper</em></a>, and
<a class="reference internal" href="kspace_style.html"><em>long-range</em></a> calculations can be performed on the
CPU while the GPU is performing force calculations for the GPU-enabled
pair style. If all CPU force computations complete before the GPU
completes, LAMMPS will block until the GPU has finished before
continuing the timestep.</p>
<p>As an example, if you have two GPUs per node and 8 CPU cores per node,
and would like to run on 4 nodes (32 cores) with dynamic balancing of
force calculation across CPU and GPU cores, you could specify</p>
<div class="highlight-python"><div class="highlight"><pre>mpirun -np 32 -sf gpu -in in.script # launch command
package gpu 2 split -1 # input script command
</pre></div>
</div>
<p>In this case, all CPU cores and GPU devices on the nodes would be
utilized. Each GPU device would be shared by 4 CPU cores. The CPU
cores would perform force calculations for some fraction of the
particles at the same time the GPUs performed force calculation for
the other particles.</p>
<p>The <em>gpuID</em> keyword allows selection of which GPUs on each node will
be used for a simulation. The <em>first</em> and <em>last</em> values specify the
GPU IDs to use (from 0 to Ngpu-1). By default, first = 0 and last =
Ngpu-1, so that all GPUs are used, assuming Ngpu is set to the number
of physical GPUs. If you only wish to use a subset, set Ngpu to a
smaller number and first/last to a sub-range of the available GPUs.</p>
<p>The <em>tpa</em> keyword sets the number of GPU thread per atom used to
perform force calculations. With a default value of 1, the number of
threads will be chosen based on the pair style, however, the value can
be set explicitly with this keyword to fine-tune performance. For
large cutoffs or with a small number of particles per GPU, increasing
the value can improve performance. The number of threads per atom must
be a power of 2 and currently cannot be greater than 32.</p>
<p>The <em>device</em> keyword can be used to tune parameters optimized for a
specific accelerator, when using OpenCL. For CUDA, the <em>device</em>
keyword is ignored. Currently, the device type is limited to NVIDIA
Kepler, NVIDIA Fermi, AMD Cypress, or a generic device. More devices
may be added later. The default device type can be specified when
building LAMMPS with the GPU library, via settings in the
lib/gpu/Makefile that is used.</p>
<hr class="docutils" />
<p>The <em>intel</em> style invokes settings associated with the use of the
USER-INTEL package. All of its settings, except the <em>omp</em> and <em>mode</em>
keywords, are ignored if LAMMPS was not built with Xeon Phi
coprocessor support. All of its settings, including the <em>omp</em> and
<em>mode</em> keyword are applicable if LAMMPS was built with coprocessor
support.</p>
<p>The <em>Nphi</em> argument sets the number of coprocessors per node.
This can be set to any value, including 0, if LAMMPS was not
built with coprocessor support.</p>
<p>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.</p>
<p>The <em>omp</em> keyword determines the number of OpenMP threads allocated
for each MPI task when any portion of the interactions computed by a
USER-INTEL pair style are run on the CPU. This can be the case even
if LAMMPS was built with coprocessor support; see the <em>balance</em>
keyword discussion below. If you are running with less MPI tasks/node
than there are CPUs, it can be advantageous to use OpenMP threading on
the CPUs.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The <em>omp</em> keyword has nothing to do with coprocessor
threads on the Xeon Phi; see the <em>tpc</em> and <em>tptask</em> keywords below for
a discussion of coprocessor threads.</p>
</div>
<p>The <em>Nthread</em> value for the <em>omp</em> keyword sets the number of OpenMP
threads allocated for each MPI task. Setting <em>Nthread</em> = 0 (the
default) instructs LAMMPS to use whatever value is the default for the
given OpenMP environment. This is usually determined via the
<em>OMP_NUM_THREADS</em> environment variable or the compiler runtime, which
is usually a value of 1.</p>
<p>For more details, including examples of how to set the OMP_NUM_THREADS
environment variable, see the discussion of the <em>Nthreads</em> setting on
this doc page for the &#8220;package omp&#8221; command. Nthreads is a required
argument for the USER-OMP package. Its meaning is exactly the same
for the USER-INTEL pacakge.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If you build LAMMPS with both the USER-INTEL and
USER-OMP packages, be aware that both packages allow setting of the
<em>Nthreads</em> value via their package commands, but there is only a
single global <em>Nthreads</em> value used by OpenMP. Thus if both package
commands are invoked, you should insure the two values are consistent.
If they are not, the last one invoked will take precedence, for both
packages. Also note that if the &#8220;-sf intel&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a> is used, it invokes a &#8220;package
intel&#8221; command, followed by a &#8220;package omp&#8221; command, both with a
setting of <em>Nthreads</em> = 0.</p>
</div>
<p>The <em>mode</em> keyword determines the precision mode to use for
computing pair style forces, either on the CPU or on the coprocessor,
when using a USER-INTEL supported <a class="reference internal" href="pair_style.html"><em>pair style</em></a>. It
can take a value of <em>single</em>, <em>mixed</em> which is the default, or
<em>double</em>. <em>Single</em> means single precision is used for the entire
force calculation. <em>Mixed</em> means forces between a pair of atoms are
computed in single precision, but accumulated and stored in double
precision, including storage of forces, torques, energies, and virial
quantities. <em>Double</em> means double precision is used for the entire
force calculation.</p>
<p>The <em>balance</em> keyword sets the fraction of <a class="reference internal" href="pair_style.html"><em>pair style</em></a> work offloaded to the coprocessor for split
values between 0.0 and 1.0 inclusive. While this fraction of work is
running on the coprocessor, other calculations will run on the host,
including neighbor and pair calculations that are not offloaded, as
well as angle, bond, dihedral, kspace, and some MPI communications.
If <em>split</em> is set to -1, the fraction of work is dynamically adjusted
automatically throughout the run. This typically give performance
within 5 to 10 percent of the optimal fixed fraction.</p>
<p>The <em>ghost</em> keyword determines whether or not ghost atoms, i.e. atoms
at the boundaries of proessor sub-domains, are offloaded for neighbor
and force calculations. When the value = &#8220;no&#8221;, ghost atoms are not
offloaded. This option can reduce the amount of data transfer with
the coprocessor and can also overlap MPI communication of forces with
computation on the coprocessor when the <a class="reference internal" href="newton.html"><em>newton pair</em></a>
setting is &#8220;on&#8221;. When the value = &#8220;yes&#8221;, ghost atoms are offloaded.
In some cases this can provide better performance, especially if the
<em>balance</em> fraction is high.</p>
<p>The <em>tpc</em> keyword sets the max # of coprocessor threads <em>Ntpc</em> that
will run on each core of the coprocessor. The default value = 4,
which is the number of hardware threads per core supported by the
current generation Xeon Phi chips.</p>
<p>The <em>tptask</em> keyword sets the max # of coprocessor threads (Ntptask*
assigned to each MPI task. The default value = 240, which is the
total # of threads an entire current generation Xeon Phi chip can run
(240 = 60 cores * 4 threads/core). This means each MPI task assigned
to the Phi will enough threads for the chip to run the max allowed,
even if only 1 MPI task is assigned. If 8 MPI tasks are assigned to
the Phi, each will run with 30 threads. If you wish to limit the
number of threads per MPI task, set <em>tptask</em> to a smaller value.
E.g. for <em>tptask</em> = 16, if 8 MPI tasks are assigned, each will run
with 16 threads, for a total of 128.</p>
<p>Note that the default settings for <em>tpc</em> and <em>tptask</em> are fine for
most problems, regardless of how many MPI tasks you assign to a Phi.</p>
<p>The <em>no_affinity</em> keyword will turn off automatic setting of core
affinity for MPI tasks and OpenMP threads on the host when using
offload to a coprocessor. Affinity settings are used when possible
to prevent MPI tasks and OpenMP threads from being on separate NUMA
domains and to prevent offload threads from interfering with other
processes/threads used for LAMMPS.</p>
<hr class="docutils" />
<p>The <em>kokkos</em> style invokes settings associated with the use of the
KOKKOS package.</p>
<p>All of the settings are optional keyword/value pairs. Each has a
default value as listed below.</p>
<p>The <em>neigh</em> keyword determines how neighbor lists are built. A value
of <em>half</em> uses half-neighbor lists, the same as used by most pair
styles in LAMMPS. A value of <em>half/thread</em> uses a thread-safe variant
of the half-neighbor list. It should be used instead of <em>half</em> when
running with more than 1 threads per MPI task on a CPU. A value of
<em>n2</em> uses an O(N^2) algorithm to build the neighbor list without
binning, where N = # of atoms on a processor. It is typically slower
than the other methods, which use binning.</p>
<p>A value of <em>full</em> uses a full neighbor lists and is the default. This
performs twice as much computation as the <em>half</em> option, however that
is often a win because it is thread-safe and doesn&#8217;t require atomic
operations in the calculation of pair forces. For that reason, <em>full</em>
is the default setting. However, when running in MPI-only mode with 1
thread per MPI task, <em>half</em> neighbor lists will typically be faster,
just as it is for non-accelerated pair styles.</p>
<p>A value of <em>full/cluster</em> is an experimental neighbor style, where
particles interact with all particles within a small cluster, if at
least one of the clusters particles is within the neighbor cutoff
range. This potentially allows for better vectorization on
architectures such as the Intel Phi. If also reduces the size of the
neighbor list by roughly a factor of the cluster size, thus reducing
the total memory footprint considerably.</p>
<p>The <em>newton</em> keyword sets the Newton flags for pairwise and bonded
interactions to <em>off</em> or <em>on</em>, the same as the <a class="reference internal" href="newton.html"><em>newton</em></a>
command allows. The default is <em>off</em> because this will almost always
give better performance for the KOKKOS package. This means more
computation is done, but less communication. However, when running in
MPI-only mode with 1 thread per MPI task, a value of <em>on</em> will
typically be faster, just as it is for non-accelerated pair styles.</p>
<p>The <em>binsize</em> keyword sets the size of bins used to bin atoms in
neighbor list builds. The same value can be set by the <a class="reference internal" href="neigh_modify.html"><em>neigh_modify binsize</em></a> command. Making it an option in the
package kokkos command allows it to be set from the command line. The
default value is 0.0, which means the LAMMPS default will be used,
which is bins = 1/2 the size of the pairwise cutoff + neighbor skin
distance. This is fine when neighbor lists are built on the CPU. For
GPU builds, a 2x larger binsize equal to the pairwise cutoff +
neighbor skin, is often faster, which can be set by this keyword.
Note that if you use a longer-than-usual pairwise cutoff, e.g. to
allow for a smaller fraction of KSpace work with a <a class="reference internal" href="kspace_style.html"><em>long-range Coulombic solver</em></a> because the GPU is faster at
performing pairwise interactions, then this rule of thumb may give too
large a binsize.</p>
<p>The <em>comm</em> and <em>comm/exchange</em> and <em>comm/forward</em> keywords determine
whether the host or device performs the packing and unpacking of data
when communicating per-atom data between processors. &#8220;Exchange&#8221;
communication happens only on timesteps that neighbor lists are
rebuilt. The data is only for atoms that migrate to new processors.
&#8220;Forward&#8221; communication happens every timestep. The data is for atom
coordinates and any other atom properties that needs to be updated for
ghost atoms owned by each processor.</p>
<p>The <em>comm</em> keyword is simply a short-cut to set the same value
for both the <em>comm/exchange</em> and <em>comm/forward</em> keywords.</p>
<p>The value options for all 3 keywords are <em>no</em> or <em>host</em> or <em>device</em>.
A value of <em>no</em> means to use the standard non-KOKKOS method of
packing/unpacking data for the communication. A value of <em>host</em> means
to use the host, typically a multi-core CPU, and perform the
packing/unpacking in parallel with threads. A value of <em>device</em> means
to use the device, typically a GPU, to perform the packing/unpacking
operation.</p>
<p>The optimal choice for these keywords depends on the input script and
the hardware used. The <em>no</em> value is useful for verifying that the
Kokkos-based <em>host</em> and <em>device</em> values are working correctly. It may
also be the fastest choice when using Kokkos styles in MPI-only mode
(i.e. with a thread count of 1).</p>
<p>When running on CPUs or Xeon Phi, the <em>host</em> and <em>device</em> values work
identically. When using GPUs, the <em>device</em> value will typically be
optimal if all of your styles used in your input script are supported
by the KOKKOS package. In this case data can stay on the GPU for many
timesteps without being moved between the host and GPU, if you use the
<em>device</em> value. This requires that your MPI is able to access GPU
memory directly. Currently that is true for OpenMPI 1.8 (or later
versions), Mvapich2 1.9 (or later), and CrayMPI. If your script uses
styles (e.g. fixes) which are not yet supported by the KOKKOS package,
then data has to be move between the host and device anyway, so it is
typically faster to let the host handle communication, by using the
<em>host</em> value. Using <em>host</em> instead of <em>no</em> will enable use of
multiple threads to pack/unpack communicated data.</p>
<hr class="docutils" />
<p>The <em>omp</em> style invokes settings associated with the use of the
USER-OMP package.</p>
<p>The <em>Nthread</em> argument sets the number of OpenMP threads allocated for
each MPI task. For example, if your system has nodes with dual
quad-core processors, it has a total of 8 cores per node. You could
use two MPI tasks per node (e.g. using the -ppn option of the mpirun
command in MPICH or -npernode in OpenMPI), and set <em>Nthreads</em> = 4.
This would use all 8 cores on each node. Note that the product of MPI
tasks * threads/task should not exceed the physical number of cores
(on a node), otherwise performance will suffer.</p>
<p>Setting <em>Nthread</em> = 0 instructs LAMMPS to use whatever value is the
default for the given OpenMP environment. This is usually determined
via the <em>OMP_NUM_THREADS</em> environment variable or the compiler
runtime. Note that in most cases the default for OpenMP capable
compilers is to use one thread for each available CPU core when
<em>OMP_NUM_THREADS</em> is not explicitly set, which can lead to poor
performance.</p>
<p>Here are examples of how to set the environment variable when
launching LAMMPS:</p>
<div class="highlight-python"><div class="highlight"><pre>env OMP_NUM_THREADS=4 lmp_machine -sf omp -in in.script
env OMP_NUM_THREADS=2 mpirun -np 2 lmp_machine -sf omp -in in.script
mpirun -x OMP_NUM_THREADS=2 -np 2 lmp_machine -sf omp -in in.script
</pre></div>
</div>
<p>or you can set it permanently in your shell&#8217;s start-up script.
All three of these examples use a total of 4 CPU cores.</p>
<p>Note that different MPI implementations have different ways of passing
the OMP_NUM_THREADS environment variable to all MPI processes. The
2nd example line above is for MPICH; the 3rd example line with -x is
for OpenMPI. Check your MPI documentation for additional details.</p>
<p>What combination of threads and MPI tasks gives the best performance
is difficult to predict and can depend on many components of your
input. Not all features of LAMMPS support OpenMP threading via the
USER-OMP packaage and the parallel efficiency can be very different,
too.</p>
<p>Optional keyword/value pairs can also be specified. Each has a
default value as listed below.</p>
<p>The <em>neigh</em> keyword specifies whether neighbor list building will be
multi-threaded in addition to force calculations. If <em>neigh</em> is set
to <em>no</em> then neighbor list calculation is performed only by MPI tasks
with no OpenMP threading. If <em>mode</em> is <em>yes</em> (the default), a
multi-threaded neighbor list build is used. Using <em>neigh</em> = <em>yes</em> is
almost always faster and should produce idential neighbor lists at the
expense of using more memory. Specifically, neighbor list pages are
allocated for all threads at the same time and each thread works
within its own pages.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This command cannot be used after the simulation box is defined by a
<a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="create_box.html"><em>create_box</em></a> command.</p>
<p>The cuda style of this command can only be invoked if LAMMPS was built
with the USER-CUDA package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The gpu style of this command can only be invoked if LAMMPS was built
with the GPU package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The intel style of this command can only be invoked if LAMMPS was
built with the USER-INTEL package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The kk style of this command can only be invoked if LAMMPS was built
with the KOKKOS package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>The omp style of this command can only be invoked if LAMMPS was built
with the USER-OMP package. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="suffix.html"><em>suffix</em></a>, &#8220;-pk&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line setting</span></a></p>
</div>
<div class="section" id="default">
<h2>Default<a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h2>
<p>For the USER-CUDA package, the default is Ngpu = 1 and the option
defaults are newton = off, gpuID = 0 to Ngpu-1, timing = not enabled,
test = not enabled, and thread = auto. These settings are made
automatically by the required &#8220;-c on&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>. You can change them bu using the
package cuda command in your input script or via the &#8220;-pk cuda&#8221;
<a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>.</p>
<p>For the GPU package, the default is Ngpu = 1 and the option defaults
are neigh = yes, newton = off, binsize = 0.0, split = 1.0, gpuID = 0
to Ngpu-1, tpa = 1, and device = not used. These settings are made
automatically if the &#8220;-sf gpu&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a> is used. If it is not used, you
must invoke the package gpu command in your input script or via the
&#8220;-pk gpu&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>.</p>
<p>For the USER-INTEL package, the default is Nphi = 1 and the option
defaults are omp = 0, mode = mixed, balance = -1, tpc = 4, tptask =
240. The default ghost option is determined by the pair style being
used. This value is output to the screen in the offload report at the
end of each run. Note that all of these settings, except &#8220;omp&#8221; and
&#8220;mode&#8221;, are ignored if LAMMPS was not built with Xeon Phi coprocessor
support. These settings are made automatically if the &#8220;-sf intel&#8221;
<a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a> is used. If it is
not used, you must invoke the package intel command in your input
script or or via the &#8220;-pk intel&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>.</p>
<p>For the KOKKOS package, the option defaults neigh = full, newton =
off, binsize = 0.0, and comm = host. These settings are made
automatically by the required &#8220;-k on&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>. You can change them bu using the
package kokkos command in your input script or via the &#8220;-pk kokkos&#8221;
<a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>.</p>
<p>For the OMP package, the default is Nthreads = 0 and the option
defaults are neigh = yes. These settings are made automatically if
the &#8220;-sf omp&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a> is
used. If it is not used, you must invoke the package omp command in
your input script or via the &#8220;-pk omp&#8221; <a class="reference internal" href="Section_start.html#start-7"><span>command-line switch</span></a>.</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/pair_lj_cubic.html b/doc/pair_lj_cubic.html
index 783d1ea9a..a31d65cb9 100644
--- a/doc/pair_lj_cubic.html
+++ b/doc/pair_lj_cubic.html
@@ -1,296 +1,299 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pair_style lj/cubic command &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>pair_style lj/cubic command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pair-style-lj-cubic-command">
<span id="index-0"></span><h1>pair_style lj/cubic command<a class="headerlink" href="#pair-style-lj-cubic-command" title="Permalink to this headline">¶</a></h1>
</div>
+<div class="section" id="pair-style-lj-cubic-gpu-command">
+<h1>pair_style lj/cubic/gpu command<a class="headerlink" href="#pair-style-lj-cubic-gpu-command" title="Permalink to this headline">¶</a></h1>
+</div>
<div class="section" id="pair-style-lj-cubic-omp-command">
<h1>pair_style lj/cubic/omp command<a class="headerlink" href="#pair-style-lj-cubic-omp-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style lj/cubic
</pre></div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style lj/cubic
pair_coeff * * 1.0 0.8908987
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <em>lj/cubic</em> style computes a truncated LJ interaction potential whose
energy and force are continuous everywhere.
Inside the inflection point the interaction is identical to the
standard 12/6 <a class="reference internal" href="pair_lj.html"><em>Lennard-Jones</em></a> potential.
The LJ function outside the inflection point is replaced
with a cubic function of distance. The energy, force, and second
derivative are continuous at the inflection point.
The cubic coefficient A3 is chosen so
that both energy and force go to zero at the cutoff distance.
Outside the cutoff distance the energy and force are zero.</p>
<img alt="_images/pair_lj_cubic.jpg" class="align-center" src="_images/pair_lj_cubic.jpg" />
<p>The location of the inflection point rs is defined
by the LJ diameter, rs/sigma = (26/7)^1/6. The cutoff distance
is defined by rc/rs = 67/48 or rc/sigma = 1.737....
The analytic expression for the
the cubic coefficient
A3*rmin^3/epsilon = 27.93... is given in the paper by
Holian and Ravelo <a class="reference internal" href="#holian"><span>(Holian)</span></a>.</p>
<p>This potential is commonly used to study the shock mechanics
of FCC solids, as in Ravelo et al. <a class="reference internal" href="#ravelo"><span>(Ravelo)</span></a>.</p>
<p>The following coefficients must be defined for each pair of atom
types via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command as in the example
above, or in the data file or restart files read by the
<a class="reference internal" href="read_data.html"><em>read_data</em></a> or <a class="reference internal" href="read_restart.html"><em>read_restart</em></a>
commands, or by mixing as described below:</p>
<ul class="simple">
<li>epsilon (energy units)</li>
<li>sigma (distance units)</li>
</ul>
<p>Note that sigma is defined in the LJ formula as the zero-crossing
distance for the potential, not as the energy minimum, which
is located at rmin = 2^(1/6)*sigma. In the above example, sigma = 0.8908987,
so rmin = 1.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.</p>
<p>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <a class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<hr class="docutils" />
<p><strong>Mixing, shift, table, tail correction, restart, rRESPA info</strong>:</p>
<p>For atom type pairs I,J and I != J, the epsilon and sigma coefficients
and cutoff distance for all of the lj/cut pair styles can be mixed.
The default mix value is <em>geometric</em>. See the &#8220;pair_modify&#8221; command
for details.</p>
<p>The lj/cubic pair style does not support the
<a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> shift option,
since pair interaction is already smoothed to 0.0 at the
cutoff.</p>
<p>The <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> table option is not relevant
for this pair style.</p>
<p>The lj/cubic pair style does not support the
<a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> tail option for adding long-range tail
corrections to energy and pressure, since there are no corrections for
a potential that goes to 0.0 at the cutoff.</p>
<p>The lj/cubic pair style writes its information to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, so pair_style and pair_coeff commands do
not need to be specified in an input script that reads a restart file.</p>
<p>The lj/cubic pair style can only be used via the <em>pair</em>
keyword of the <a class="reference internal" href="run_style.html"><em>run_style respa</em></a> command. It does not
support the <em>inner</em>, <em>middle</em>, <em>outer</em> keywords.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a></p>
<p><strong>Default:</strong> none</p>
<hr class="docutils" />
<p id="ravelo"><span id="holian"></span><strong>(Holian)</strong> Holian and Ravelo, Phys Rev B, 51, 11275 (1995).</p>
<p><strong>(Ravelo)</strong> Ravelo, Holian, Germann and Lomdahl, Phys Rev B, 70, 014103 (2004).</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/pair_tersoff.html b/doc/pair_tersoff.html
index 1b38aaddf..e97657a78 100644
--- a/doc/pair_tersoff.html
+++ b/doc/pair_tersoff.html
@@ -1,408 +1,411 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pair_style tersoff command &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>pair_style tersoff command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pair-style-tersoff-command">
<span id="index-0"></span><h1>pair_style tersoff command<a class="headerlink" href="#pair-style-tersoff-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="pair-style-tersoff-table-command">
<h1>pair_style tersoff/table command<a class="headerlink" href="#pair-style-tersoff-table-command" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="pair-style-tersoff-cuda">
<h1>pair_style tersoff/cuda<a class="headerlink" href="#pair-style-tersoff-cuda" title="Permalink to this headline">¶</a></h1>
</div>
+<div class="section" id="pair-style-tersoff-gpu">
+<h1>pair_style tersoff/gpu<a class="headerlink" href="#pair-style-tersoff-gpu" title="Permalink to this headline">¶</a></h1>
+</div>
<div class="section" id="pair-style-tersoff-kk">
<h1>pair_style tersoff/kk<a class="headerlink" href="#pair-style-tersoff-kk" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="pair-style-tersoff-omp">
<h1>pair_style tersoff/omp<a class="headerlink" href="#pair-style-tersoff-omp" title="Permalink to this headline">¶</a></h1>
</div>
<div class="section" id="pair-style-tersoff-table-omp-command">
<h1>pair_style tersoff/table/omp command<a class="headerlink" href="#pair-style-tersoff-table-omp-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style style
</pre></div>
</div>
-<p>style = <em>tersoff</em> or <em>tersoff/table</em> or <em>tersoff/cuda</em> or <em>tersoff/omp</em> or <em>tersoff/table/omp</em></p>
+<p>style = <em>tersoff</em> or <em>tersoff/table</em> or <em>tersoff/cuda</em> or <em>tersoff/gpu</em> or <em>tersoff/omp</em> or <em>tersoff/table/omp</em></p>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style tersoff
pair_coeff * * Si.tersoff Si
pair_coeff * * SiC.tersoff Si C Si
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre>pair_style tersoff/table
pair_coeff * * SiCGe.tersoff Si(D)
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>The <em>tersoff</em> style computes a 3-body Tersoff potential
-<a class="reference internal" href="pair_tersoff_zbl.html#tersoff-1"><span>(Tersoff_1)</span></a> for the energy E of a system of atoms as</p>
+<a class="reference internal" href="#tersoff-1"><span>(Tersoff_1)</span></a> for the energy E of a system of atoms as</p>
<img alt="_images/pair_tersoff_1.jpg" class="align-center" src="_images/pair_tersoff_1.jpg" />
<p>where f_R is a two-body term and f_A includes three-body interactions.
The summations in the formula are over all neighbors J and K of atom I
within a cutoff distance = R + D.</p>
<p>The <em>tersoff/table</em> style uses tabulated forms for the two-body,
environment and angular functions. Linear interpolation is performed
between adjacent table entries. The table length is chosen to be
accurate within 10^-6 with respect to the <em>tersoff</em> style energy.
The <em>tersoff/table</em> should give better performance in terms of speed.</p>
<p>Only a single pair_coeff command is used with the <em>tersoff</em> style
which specifies a Tersoff potential file with parameters for all
needed elements. These are mapped to LAMMPS atom types by specifying
N additional arguments after the filename in the pair_coeff command,
where N is the number of LAMMPS atom types:</p>
<ul class="simple">
<li>filename</li>
<li>N element names = mapping of Tersoff elements to atom types</li>
</ul>
<p>See the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> doc page for alternate ways
to specify the path for the potential file.</p>
<p>As an example, imagine the SiC.tersoff file has Tersoff values for Si
and C. If your LAMMPS simulation has 4 atoms types and you want the
1st 3 to be Si, and the 4th to be C, you would use the following
pair_coeff command:</p>
<div class="highlight-python"><div class="highlight"><pre>pair_coeff * * SiC.tersoff Si Si Si C
</pre></div>
</div>
<p>The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
The first three Si arguments map LAMMPS atom types 1,2,3 to the Si
element in the Tersoff file. The final C argument maps LAMMPS atom
type 4 to the C element in the Tersoff file. If a mapping value is
specified as NULL, the mapping is not performed. This can be used
when a <em>tersoff</em> potential is used as part of the <em>hybrid</em> pair style.
The NULL values are placeholders for atom types that will be used with
other potentials.</p>
<p>Tersoff files in the <em>potentials</em> directory of the LAMMPS distribution
have a &#8221;.tersoff&#8221; suffix. Lines that are not blank or comments
(starting with #) define parameters for a triplet of elements. The
parameters in a single entry correspond to coefficients in the formula
above:</p>
<ul class="simple">
<li>element 1 (the center atom in a 3-body interaction)</li>
<li>element 2 (the atom bonded to the center atom)</li>
<li>element 3 (the atom influencing the 1-2 bond in a bond-order sense)</li>
<li>m</li>
<li>gamma</li>
<li>lambda3 (1/distance units)</li>
<li>c</li>
<li>d</li>
<li>costheta0 (can be a value &lt; -1 or &gt; 1)</li>
<li>n</li>
<li>beta</li>
<li>lambda2 (1/distance units)</li>
<li>B (energy units)</li>
<li>R (distance units)</li>
<li>D (distance units)</li>
<li>lambda1 (1/distance units)</li>
<li>A (energy units)</li>
</ul>
<p>The n, beta, lambda2, B, lambda1, and A parameters are only used for
two-body interactions. The m, gamma, lambda3, c, d, and costheta0
parameters are only used for three-body interactions. The R and D
parameters are used for both two-body and three-body interactions. The
non-annotated parameters are unitless. The value of m must be 3 or 1.</p>
<p>The Tersoff potential file must contain entries for all the elements
listed in the pair_coeff command. It can also contain entries for
additional elements not being used in a particular simulation; LAMMPS
ignores those entries.</p>
<p>For a single-element simulation, only a single entry is required
(e.g. SiSiSi). For a two-element simulation, the file must contain 8
entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that
specify Tersoff parameters for all permutations of the two elements
interacting in three-body configurations. Thus for 3 elements, 27
entries would be required, etc.</p>
<p>As annotated above, the first element in the entry is the center atom
in a three-body interaction and it is bonded to the 2nd atom and the
bond is influenced by the 3rd atom. Thus an entry for SiCC means Si
bonded to a C with another C atom influencing the bond. Thus
three-body parameters for SiCSi and SiSiC entries will not, in
general, be the same. The parameters used for the two-body
interaction come from the entry where the 2nd element is repeated.
Thus the two-body parameters for Si interacting with C, comes from the
SiCC entry.</p>
<p>The parameters used for a particular
three-body interaction come from the entry with the corresponding
three elements. The parameters used only for two-body interactions
(n, beta, lambda2, B, lambda1, and A) in entries whose 2nd and 3rd
element are different (e.g. SiCSi) are not used for anything and can
be set to 0.0 if desired.</p>
<p>Note that the twobody parameters in entries such as SiCC and CSiSi
are often the same, due to the common use of symmetric mixing rules,
but this is not always the case. For example, the beta and n parameters in
-Tersoff_2 <a class="reference internal" href="pair_tersoff_zbl.html#tersoff-2"><span>(Tersoff_2)</span></a> are not symmetric.</p>
+Tersoff_2 <a class="reference internal" href="#tersoff-2"><span>(Tersoff_2)</span></a> are not symmetric.</p>
<p>We chose the above form so as to enable users to define all commonly
used variants of the Tersoff potential. In particular, our form
reduces to the original Tersoff form when m = 3 and gamma = 1, while
-it reduces to the form of <a class="reference internal" href="pair_tersoff_zbl.html#albe"><span>Albe et al.</span></a> when beta = 1 and m = 1.
+it reduces to the form of <a class="reference internal" href="#albe"><span>Albe et al.</span></a> when beta = 1 and m = 1.
Note that in the current Tersoff implementation in LAMMPS, m must be
specified as either 3 or 1. Tersoff used a slightly different but
equivalent form for alloys, which we will refer to as Tersoff_2
-potential <a class="reference internal" href="pair_tersoff_zbl.html#tersoff-2"><span>(Tersoff_2)</span></a>. The <em>tersoff/table</em> style implements
+potential <a class="reference internal" href="#tersoff-2"><span>(Tersoff_2)</span></a>. The <em>tersoff/table</em> style implements
Tersoff_2 parameterization only.</p>
<p>LAMMPS parameter values for Tersoff_2 can be obtained as follows:
gamma_ijk = omega_ik, lambda3 = 0 and the value of
m has no effect. The parameters for species i and j can be calculated
using the Tersoff_2 mixing rules:</p>
<img alt="_images/pair_tersoff_2.jpg" class="align-center" src="_images/pair_tersoff_2.jpg" />
<p>Tersoff_2 parameters R and S must be converted to the LAMMPS
parameters R and D (R is different in both forms), using the following
relations: R=(R&#8217;+S&#8217;)/2 and D=(S&#8217;-R&#8217;)/2, where the primes indicate the
Tersoff_2 parameters.</p>
<p>In the potentials directory, the file SiCGe.tersoff provides the
LAMMPS parameters for Tersoff&#8217;s various versions of Si, as well as his
alloy parameters for Si, C, and Ge. This file can be used for pure Si,
(three different versions), pure C, pure Ge, binary SiC, and binary
SiGe. LAMMPS will generate an error if this file is used with any
combination involving C and Ge, since there are no entries for the GeC
interactions (Tersoff did not publish parameters for this
cross-interaction.) Tersoff files are also provided for the SiC alloy
(SiC.tersoff) and the GaN (GaN.tersoff) alloys.</p>
<p>Many thanks to Rutuparna Narulkar, David Farrell, and Xiaowang Zhou
for helping clarify how Tersoff parameters for alloys have been
defined in various papers.</p>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.</p>
<p>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <a class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<hr class="docutils" />
<p><strong>Mixing, shift, table, tail correction, restart, rRESPA info</strong>:</p>
<p>For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS as
described above from values in the potential file.</p>
<p>This pair style does not support the <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a>
shift, table, and tail options.</p>
<p>This pair style does not write its information to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, since it is stored in potential files. Thus, you
need to re-specify the pair_style and pair_coeff commands in an input
script that reads a restart file.</p>
<p>This pair style can only be used via the <em>pair</em> keyword of the
<a class="reference internal" href="run_style.html"><em>run_style respa</em></a> command. It does not support the
<em>inner</em>, <em>middle</em>, <em>outer</em> keywords.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<p>This pair style is part of the MANYBODY package. It is only enabled
if LAMMPS was built with that package (which it is by default). See
the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>This pair style requires the <a class="reference internal" href="newton.html"><em>newton</em></a> setting to be &#8220;on&#8221;
for pair interactions.</p>
<p>The Tersoff potential files provided with LAMMPS (see the potentials
directory) are parameterized for metal <a class="reference internal" href="units.html"><em>units</em></a>. You can
use the Tersoff potential with any LAMMPS units, but you would need to
create your own Tersoff potential file with coefficients listed in the
appropriate units if your simulation doesn&#8217;t use &#8220;metal&#8221; units.</p>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a></p>
<p><strong>Default:</strong> none</p>
<hr class="docutils" />
<p id="tersoff-1"><strong>(Tersoff_1)</strong> J. Tersoff, Phys Rev B, 37, 6991 (1988).</p>
<p id="albe"><strong>(Albe)</strong> J. Nord, K. Albe, P. Erhart, and K. Nordlund, J. Phys.:
Condens. Matter, 15, 5649(2003).</p>
<p id="tersoff-2"><strong>(Tersoff_2)</strong> J. Tersoff, Phys Rev B, 39, 5566 (1989); errata (PRB 41, 3248)</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/pair_zbl.html b/doc/pair_zbl.html
index f5f16ee25..e9a07e6f3 100644
--- a/doc/pair_zbl.html
+++ b/doc/pair_zbl.html
@@ -1,299 +1,302 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pair_style zbl command &mdash; LAMMPS 15 May 2015 version documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/sphinxcontrib-images/LightBox2/lightbox2/css/lightbox.css" type="text/css" />
<link rel="top" title="LAMMPS 15 May 2015 version documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="Manual.html" class="icon icon-home"> LAMMPS
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="Section_intro.html">1. Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_start.html">2. Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_commands.html">3. Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_packages.html">4. Packages</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_accelerate.html">5. Accelerating LAMMPS performance</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_howto.html">6. How-to discussions</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_example.html">7. Example problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_perf.html">8. Performance &amp; scalability</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_tools.html">9. Additional tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_modify.html">10. Modifying &amp; extending LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_python.html">11. Python interface to LAMMPS</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_errors.html">12. Errors</a></li>
<li class="toctree-l1"><a class="reference internal" href="Section_history.html">13. Future and history</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="Manual.html">LAMMPS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="Manual.html">Docs</a> &raquo;</li>
<li>pair_style zbl command</li>
<li class="wy-breadcrumbs-aside">
<a href="http://lammps.sandia.gov">Website</a>
<a href="Section_commands.html#comm">Commands</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pair-style-zbl-command">
<span id="index-0"></span><h1>pair_style zbl command<a class="headerlink" href="#pair-style-zbl-command" title="Permalink to this headline">¶</a></h1>
</div>
+<div class="section" id="pair-style-zbl-gpu-command">
+<h1>pair_style zbl/gpu command<a class="headerlink" href="#pair-style-zbl-gpu-command" title="Permalink to this headline">¶</a></h1>
+</div>
<div class="section" id="pair-style-zbl-omp-command">
<h1>pair_style zbl/omp command<a class="headerlink" href="#pair-style-zbl-omp-command" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax">
<h2>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style zbl inner outer
</pre></div>
</div>
<ul class="simple">
<li>inner = distance where switching function begins</li>
<li>outer = global cutoff for ZBL interaction</li>
</ul>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre>pair_style zbl 3.0 4.0
pair_coeff * * 73.0
pair_coeff 1 1 14.0
</pre></div>
</div>
</div>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2>
<p>Style <em>zbl</em> computes the Ziegler-Biersack-Littmark (ZBL) screened nuclear
repulsion for describing high-energy collisions between atoms.
<a class="reference internal" href="#ziegler"><span>(Ziegler)</span></a>. It includes an additional switching function
that ramps the energy, force, and curvature smoothly to zero
between an inner and outer cutoff. The potential
energy due to a pair of atoms at a distance r_ij is given by:</p>
<img alt="_images/pair_zbl.jpg" class="align-center" src="_images/pair_zbl.jpg" />
<p>where e is the electron charge, epsilon_0 is the electrical
permittivity of vacuum, and Z_i and Z_j are the nuclear charges of the
two atoms. The switching function S(r) is identical to that used by
<a class="reference internal" href="pair_gromacs.html"><em>pair_style lj/gromacs</em></a>. Here, the inner and outer
cutoff are the same for all pairs of atom types.</p>
<p>The following coefficient must be defined for each pair of atom types
via the <a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a> command as in the examples above,
or in the LAMMPS data file. Z can not be specified for two different
atoms types. Therefore the lists of atom types I and atom types J
must match.</p>
<ul class="simple">
<li>Z (multiples of proton charge, e.g. 13.0 for aluminum)</li>
</ul>
<p>Although Z must be defined for all atom type pairs I,J, it is only
stored for individual atom types, i.e. when I = J. Z is normally equal
to the atomic number of the atom type.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The numerical values of the exponential decay
constants in the screening function depend on the unit of distance. In
the above equation they are given for units of angstroms. LAMMPS will
automatically convert these values to the distance unit of the
specified LAMMPS <a class="reference internal" href="units.html"><em>units</em></a> setting. The values of Z should
always be given as multiples of a proton&#8217;s charge, e.g. 29.0 for
copper.</p>
</div>
<hr class="docutils" />
<p>Styles with a <em>cuda</em>, <em>gpu</em>, <em>intel</em>, <em>kk</em>, <em>omp</em>, or <em>opt</em> suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a>
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.</p>
<p>These accelerated styles are part of the USER-CUDA, GPU, USER-INTEL,
KOKKOS, USER-OMP and OPT packages, respectively. They are only
enabled if LAMMPS was built with those packages. See the <a class="reference internal" href="Section_start.html#start-3"><span>Making LAMMPS</span></a> section for more info.</p>
<p>You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the <a class="reference internal" href="Section_start.html#start-7"><span>-suffix command-line switch</span></a> when you invoke LAMMPS, or you can
use the <a class="reference internal" href="suffix.html"><em>suffix</em></a> command in your input script.</p>
<p>See <a class="reference internal" href="Section_accelerate.html"><em>Section_accelerate</em></a> of the manual for
more instructions on how to use the accelerated styles effectively.</p>
<hr class="docutils" />
<p><strong>Mixing, shift, table, tail correction, restart, rRESPA info</strong>:</p>
<p>Mixing is not relevant for this pair style, since as explained above,
Z values are stored on a per-type basis, and both Zi and Zj are used
explicitly in the ZBL formula.</p>
<p>The ZBL pair style does not support the <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a>
shift option, since the ZBL interaction is already smoothed to 0.0 at
the cutoff.</p>
<p>The <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a> table option is not relevant for
this pair style.</p>
<p>This pair style does not support the <a class="reference internal" href="pair_modify.html"><em>pair_modify</em></a>
tail option for adding long-range tail corrections to energy and
pressure, since there are no corrections for a potential that goes to
0.0 at the cutoff.</p>
<p>This pair style does not write information to <a class="reference internal" href="restart.html"><em>binary restart files</em></a>, so pair_style and pair_coeff commands must be
specified in an input script that reads a restart file.</p>
<p>This pair style can only be used via the <em>pair</em> keyword of the
<a class="reference internal" href="run_style.html"><em>run_style respa</em></a> command. It does not support the
<em>inner</em>, <em>middle</em>, <em>outer</em> keywords.</p>
</div>
<hr class="docutils" />
<div class="section" id="restrictions">
<h2>Restrictions<a class="headerlink" href="#restrictions" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div>none</div></blockquote>
</div>
<div class="section" id="related-commands">
<h2>Related commands<a class="headerlink" href="#related-commands" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="pair_coeff.html"><em>pair_coeff</em></a></p>
<p><strong>Default:</strong> none</p>
<hr class="docutils" />
<p id="ziegler"><strong>(Ziegler)</strong> J.F. Ziegler, J. P. Biersack and U. Littmark, &#8220;The
Stopping and Range of Ions in Matter,&#8221; Volume 1, Pergamon, 1985.</p>
</div>
</div>
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright .
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'15 May 2015 version',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2/js/lightbox.min.js"></script>
<script type="text/javascript" src="_static/sphinxcontrib-images/LightBox2/lightbox2-customize/jquery-noconflict.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
\ No newline at end of file
diff --git a/doc/searchindex.js b/doc/searchindex.js
index c6df5a253..07a91fbc9 100644
--- a/doc/searchindex.js
+++ b/doc/searchindex.js
@@ -1 +1 @@
-Search.setIndex({envversion:47,filenames:["Manual","Section_accelerate","Section_commands","Section_errors","Section_example","Section_history","Section_howto","Section_intro","Section_modify","Section_packages","Section_perf","Section_python","Section_start","Section_tools","accelerate_cuda","accelerate_gpu","accelerate_intel","accelerate_kokkos","accelerate_omp","accelerate_opt","angle_charmm","angle_class2","angle_coeff","angle_cosine","angle_cosine_delta","angle_cosine_periodic","angle_cosine_shift","angle_cosine_shift_exp","angle_cosine_squared","angle_dipole","angle_fourier","angle_fourier_simple","angle_harmonic","angle_hybrid","angle_none","angle_quartic","angle_sdk","angle_style","angle_table","atom_modify","atom_style","balance","body","bond_class2","bond_coeff","bond_fene","bond_fene_expand","bond_harmonic","bond_harmonic_shift","bond_harmonic_shift_cut","bond_hybrid","bond_morse","bond_none","bond_nonlinear","bond_quartic","bond_style","bond_table","boundary","box","change_box","clear","comm_modify","comm_style","compute","compute_ackland_atom","compute_angle_local","compute_angmom_chunk","compute_basal_atom","compute_body_local","compute_bond_local","compute_centro_atom","compute_chunk_atom","compute_cluster_atom","compute_cna_atom","compute_com","compute_com_chunk","compute_contact_atom","compute_coord_atom","compute_damage_atom","compute_dihedral_local","compute_dilatation_atom","compute_displace_atom","compute_erotate_asphere","compute_erotate_rigid","compute_erotate_sphere","compute_erotate_sphere_atom","compute_event_displace","compute_fep","compute_group_group","compute_gyration","compute_gyration_chunk","compute_heat_flux","compute_improper_local","compute_inertia_chunk","compute_ke","compute_ke_atom","compute_ke_atom_eff","compute_ke_eff","compute_ke_rigid","compute_meso_e_atom","compute_meso_rho_atom","compute_meso_t_atom","compute_modify","compute_msd","compute_msd_chunk","compute_msd_nongauss","compute_omega_chunk","compute_pair","compute_pair_local","compute_pe","compute_pe_atom","compute_plasticity_atom","compute_pressure","compute_property_atom","compute_property_chunk","compute_property_local","compute_rdf","compute_reduce","compute_saed","compute_slice","compute_smd_contact_radius","compute_smd_damage","compute_smd_hourglass_error","compute_smd_internal_energy","compute_smd_plastic_strain","compute_smd_plastic_strain_rate","compute_smd_rho","compute_smd_tlsph_defgrad","compute_smd_tlsph_dt","compute_smd_tlsph_num_neighs","compute_smd_tlsph_shape","compute_smd_tlsph_strain","compute_smd_tlsph_strain_rate","compute_smd_tlsph_stress","compute_smd_triangle_mesh_vertices","compute_smd_ulsph_num_neighs","compute_smd_ulsph_strain","compute_smd_ulsph_strain_rate","compute_smd_ulsph_stress","compute_smd_vol","compute_sna_atom","compute_stress_atom","compute_temp","compute_temp_asphere","compute_temp_chunk","compute_temp_com","compute_temp_cs","compute_temp_deform","compute_temp_deform_eff","compute_temp_drude","compute_temp_eff","compute_temp_partial","compute_temp_profile","compute_temp_ramp","compute_temp_region","compute_temp_region_eff","compute_temp_rotate","compute_temp_sphere","compute_ti","compute_torque_chunk","compute_vacf","compute_vcm_chunk","compute_voronoi_atom","compute_xrd","create_atoms","create_bonds","create_box","delete_atoms","delete_bonds","dielectric","dihedral_charmm","dihedral_class2","dihedral_coeff","dihedral_cosine_shift_exp","dihedral_fourier","dihedral_harmonic","dihedral_helix","dihedral_hybrid","dihedral_multi_harmonic","dihedral_nharmonic","dihedral_none","dihedral_opls","dihedral_quadratic","dihedral_style","dihedral_table","dimension","displace_atoms","dump","dump_image","dump_modify","dump_molfile","echo","fix","fix_adapt","fix_adapt_fep","fix_addforce","fix_addtorque","fix_append_atoms","fix_atc","fix_atom_swap","fix_ave_atom","fix_ave_chunk","fix_ave_correlate","fix_ave_histo","fix_ave_spatial","fix_ave_spatial_sphere","fix_ave_time","fix_aveforce","fix_balance","fix_bond_break","fix_bond_create","fix_bond_swap","fix_box_relax","fix_colvars","fix_deform","fix_deposit","fix_drag","fix_drude","fix_drude_transform","fix_dt_reset","fix_efield","fix_enforce2d","fix_evaporate","fix_external","fix_freeze","fix_gcmc","fix_gld","fix_gle","fix_gravity","fix_heat","fix_imd","fix_indent","fix_ipi","fix_langevin","fix_langevin_drude","fix_langevin_eff","fix_lb_fluid","fix_lb_momentum","fix_lb_pc","fix_lb_rigid_pc_sphere","fix_lb_viscous","fix_lineforce","fix_meso","fix_meso_stationary","fix_modify","fix_momentum","fix_move","fix_msst","fix_neb","fix_nh","fix_nh_eff","fix_nph_asphere","fix_nph_sphere","fix_nphug","fix_npt_asphere","fix_npt_sphere","fix_nve","fix_nve_asphere","fix_nve_asphere_noforce","fix_nve_body","fix_nve_eff","fix_nve_limit","fix_nve_line","fix_nve_noforce","fix_nve_sphere","fix_nve_tri","fix_nvt_asphere","fix_nvt_sllod","fix_nvt_sllod_eff","fix_nvt_sphere","fix_oneway","fix_orient_fcc","fix_phonon","fix_pimd","fix_planeforce","fix_poems","fix_pour","fix_press_berendsen","fix_print","fix_property_atom","fix_qbmsst","fix_qeq","fix_qeq_comb","fix_qeq_reax","fix_qmmm","fix_qtb","fix_reax_bonds","fix_reaxc_species","fix_recenter","fix_restrain","fix_rigid","fix_saed_vtk","fix_setforce","fix_shake","fix_smd","fix_smd_adjust_dt","fix_smd_integrate_tlsph","fix_smd_integrate_ulsph","fix_smd_move_triangulated_surface","fix_smd_setvel","fix_smd_tlsph_reference_configuration","fix_smd_wall_surface","fix_spring","fix_spring_rg","fix_spring_self","fix_srd","fix_store_force","fix_store_state","fix_temp_berendsen","fix_temp_csvr","fix_temp_rescale","fix_temp_rescale_eff","fix_tfmc","fix_thermal_conductivity","fix_ti_rs","fix_ti_spring","fix_tmd","fix_ttm","fix_tune_kspace","fix_vector","fix_viscosity","fix_viscous","fix_wall","fix_wall_gran","fix_wall_piston","fix_wall_reflect","fix_wall_region","fix_wall_srd","group","group2ndx","if","improper_class2","improper_coeff","improper_cossq","improper_cvff","improper_fourier","improper_harmonic","improper_hybrid","improper_none","improper_ring","improper_style","improper_umbrella","include","info","jump","kspace_modify","kspace_style","label","lattice","log","mass","min_modify","min_style","minimize","molecule","neb","neigh_modify","neighbor","newton","next","package","pair_adp","pair_airebo","pair_awpmd","pair_beck","pair_body","pair_bop","pair_born","pair_brownian","pair_buck","pair_buck_long","pair_charmm","pair_class2","pair_coeff","pair_colloid","pair_comb","pair_coul","pair_coul_diel","pair_cs","pair_dipole","pair_dpd","pair_dsmc","pair_eam","pair_edip","pair_eff","pair_eim","pair_gauss","pair_gayberne","pair_gran","pair_gromacs","pair_hbond_dreiding","pair_hybrid","pair_kim","pair_lcbop","pair_line_lj","pair_list","pair_lj","pair_lj96","pair_lj_cubic","pair_lj_expand","pair_lj_long","pair_lj_sf","pair_lj_smooth","pair_lj_smooth_linear","pair_lj_soft","pair_lubricate","pair_lubricateU","pair_meam","pair_meam_spline","pair_meam_sw_spline","pair_mie","pair_modify","pair_morse","pair_nb3b_harmonic","pair_nm","pair_none","pair_peri","pair_polymorphic","pair_quip","pair_reax","pair_reax_c","pair_resquared","pair_sdk","pair_smd_hertz","pair_smd_tlsph","pair_smd_triangulated_surface","pair_smd_ulsph","pair_snap","pair_soft","pair_sph_heatconduction","pair_sph_idealgas","pair_sph_lj","pair_sph_rhosum","pair_sph_taitwater","pair_sph_taitwater_morris","pair_srp","pair_style","pair_sw","pair_table","pair_tersoff","pair_tersoff_mod","pair_tersoff_zbl","pair_thole","pair_tri_lj","pair_write","pair_yukawa","pair_yukawa_colloid","pair_zbl","partition","prd","print","processors","python","quit","read_data","read_dump","read_restart","region","replicate","rerun","reset_timestep","restart","run","run_style","set","shell","special_bonds","suffix","tad","temper","thermo","thermo_modify","thermo_style","timestep","tutorial_drude","uncompute","undump","unfix","units","variable","velocity","write_data","write_dump","write_restart"],objects:{},objnames:{},objtypes:{},terms:{"00a":314,"00b":314,"02214e23":91,"03275e":478,"0b1":11,"0e20":[330,457,479],"0e4":[247,323,388],"0e5":247,"0x98b5e0":188,"100k":1,"1024x1024":188,"10e":378,"10f":3,"10g":479,"10th":[449,455,468],"10x":[3,352,353,355,356,366],"10x10x10":152,"10x20x20":348,"11e":10,"15g":[189,479],"16g":[201,206],"16x":1,"18986e":353,"18e":10,"1_prop":6,"1st":[2,6,8,12,20,22,38,44,56,57,58,60,87,158,170,172,184,193,194,201,202,203,204,205,206,210,214,249,278,288,316,328,332,350,356,361,362,366,373,375,382,384,385,392,393,402,403,407,408,409,413,417,427,437,438,439,440,441,448,454,462,463,466,479],"1x2x2":451,"2000k":188,"20x":366,"23899e":353,"2400k":188,"256k":10,"25x":10,"298k":377,"2k_ss":384,"2nd":[2,3,6,11,12,15,17,38,45,46,56,57,60,71,77,88,153,184,189,201,202,203,204,205,206,210,212,214,249,290,294,302,328,331,337,344,353,354,355,356,360,362,375,384,390,391,407,427,436,437,438,439,440,441,454,461,463,466,479],"2pi":184,"2theta":163,"2x1x2":451,"2x2x1":451,"2x2x2":451,"2x4x10":451,"2x5":384,"300k":[227,290,480],"32k":10,"3419e":247,"3806504e":[6,91],"38e":10,"3n_k":226,"3nk":280,"3nkb":285,"3rd":[15,17,20,38,56,71,105,114,184,201,202,203,204,205,206,210,290,291,328,354,358,360,375,384,390,391,427,437,438,439,440,441,454,461,466,479],"3x3":[91,348],"4857990943e":384,"4_94":11,"4th":[6,38,56,81,103,104,116,160,170,184,189,302,328,346,359,361,362,366,382,385,392,407,413,417,427,437,438,439,441,454,461,466,469,483],"4x10":344,"4x2x10":451,"4x6x10":451,"50k":1,"53xx":18,"54xx":18,"55e":10,"5_1":366,"5kx":[195,220],"5nlog_2":12,"5th":[116,353,471],"6021765e":478,"6863e22":416,"6x6":6,"72360e":247,"7797e":247,"8032044e":478,"8x1":6,"8x2":[6,12],"9e18":[12,39],"9e9":416,"9jan09":[323,388],"9th":355,"__main__":452,"__pthread_key_cr":12,"_j1m1m1":140,"_j2m2m2":140,"_serial":12,"abstract":17,"boolean":[3,328,330],"break":[],"byte":[3,12,471],"case":[1,2,3,6,8,11,12,13,15,16,17,18,39,40,41,45,46,59,61,63,71,73,104,108,114,116,117,142,143,144,145,147,150,151,152,153,154,156,157,158,162,164,166,167,168,170,187,188,189,195,196,200,201,202,203,204,205,206,207,208,210,212,214,218,220,222,225,228,229,231,232,233,234,236,247,249,250,251,252,253,254,255,266,267,269,271,272,277,279,280,281,282,289,290,292,294,296,297,299,302,305,308,309,310,312,313,317,319,320,322,323,325,326,327,328,330,344,345,346,348,350,352,353,354,355,357,359,360,362,371,374,376,378,382,384,387,388,390,391,392,394,404,405,406,407,411,413,417,420,423,425,428,438,439,441,449,452,454,456,457,461,462,464,466,468,470,471,472,474,478,479,480,482,483],"catch":[1,3,452],"char":[6,8],"class":[1,3,5,6,7,8,9,11,12,13,22,37,44,55,172,183,223,279,332,340,372,391,419,420,436,452,454],"default":[],"export":[188,373],"final":[3,5,6,7,8,11,12,17,41,59,87,141,189,200,201,202,203,204,205,206,208,212,214,225,248,249,253,280,284,290,291,294,314,316,317,324,330,353,355,361,362,366,382,385,392,404,407,413,417,418,437,438,439,441,449,462,468,474,479,481],"float":[3,6,8,12,40,42,71,113,187,189,201,206,230,279,291,307,384,424,426,452,454,464,471,479],"function":[],"import":[1,2,3,6,11,17,71,87,105,164,175,192,201,204,212,228,233,234,249,285,290,308,309,310,312,317,327,329,355,391,404,452,454,463,471,474],"int":[3,6,8,11,101,223,225,233,235,285,317,471],"long":[],"new":[],"null":[3,6,91,112,141,164,192,207,213,216,219,246,279,288,292,294,298,299,302,303,323,361,362,375,382,385,388,391,392,393,407,408,409,413,417,419,420,427,437,439,440,441,454,457,462,464,480],"public":[0,7,8,12,223,232,385,418],"return":[2,3,6,8,11,14,15,16,17,18,19,41,71,108,117,134,135,139,162,164,189,201,204,205,214,223,330,342,344,388,451,452,461,464,470,479],"short":[1,3,6,7,13,16,162,249,290,305,318,346,356,357,360,362,366,367,369,370,371,375,376,378,384,391,396,400,404,407,411,414,422,438,442,449,452,462,464,468,474],"static":[],"switch":[1,3,6,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,91,109,112,140,142,151,163,170,171,173,174,175,176,178,179,181,182,184,188,191,195,199,207,221,224,228,232,233,236,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,308,310,314,315,321,331,333,334,335,336,339,341,342,344,346,349,355,359,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,448,449,451,454,456,461,463,467,469,479,481,483],"throw":471,"true":[6,12,13,17,108,115,187,208,210,214,249,250,271,272,273,277,290,312,316,328,330,360,384,388,437,452,456,464,479],"try":[1,3,8,12,17,19,201,230,236,313,314,315,320,452,479],"var":[3,11,12,164,328,344,465,479],"void":[4,6,7,8,41,167,208,223,457],"while":[3,9,10,11,12,13,14,18,71,105,140,147,162,175,187,190,205,212,214,218,226,227,232,233,234,236,249,267,280,285,287,318,346,353,360,366,377,382,420,439,441,449,452,463,468,474],a10:330,a123:330,a12:421,a2m:[6,91],a_0:[236,317,366],a_0_real:236,a_1:317,a_2:317,a_3:317,a_4:317,a_c:374,a_cc:374,a_f:441,a_i:442,a_ij:366,a_j:442,a_pi:366,a_sigma:366,a_ss:374,aacut:272,aat:171,aatom1:115,aatom2:115,aatom3:115,ab_23_cd:330,abbrevi:12,abc:[3,12,330,452,479],abf:213,abf_integr:13,abi:190,abil:[3,9,212,249,277,290,384],abl:[3,8,11,12,39,86,187,190,211,220,224,313,320,360,452,479,482],ablat:317,about:[0,1,3,4,6,8,9,10,11,12,13,17,39,41,42,61,63,78,108,115,116,118,158,164,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,216,218,219,220,221,222,223,224,225,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,245,248,253,256,257,258,259,260,261,262,263,264,265,270,271,272,274,275,276,277,278,279,281,282,283,284,285,286,287,288,289,290,291,292,293,302,303,305,306,308,309,310,311,312,313,314,315,316,317,319,320,321,322,324,325,326,327,328,343,346,352,353,355,360,365,371,376,391,416,420,446,452,455,456,461,462,464,469,479,481,483],abov:[1,2,6,7,8,10,11,12,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,38,40,41,42,43,44,45,46,47,48,49,50,51,53,54,56,57,63,64,68,70,71,72,73,76,77,86,87,89,90,91,93,94,96,97,112,114,116,118,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,162,163,164,166,167,170,171,172,173,174,175,176,177,178,179,181,182,184,187,188,189,192,193,194,195,196,201,202,203,204,205,206,208,211,212,214,215,220,223,225,229,231,233,234,235,239,248,249,253,273,276,278,283,289,290,294,302,305,308,309,310,311,328,330,331,332,333,334,335,336,337,339,341,346,348,350,354,355,359,360,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,410,411,412,414,416,417,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,442,443,445,446,447,448,449,450,451,452,454,455,456,457,458,461,462,463,464,465,468,469,472,474,479,480,482,483],abscissa:438,absenc:196,absent:474,absolut:[3,189,213,214,218,294,307,345,346,353,388,396,455],absorb:317,absoult:346,ac3:163,academ:225,acc:312,acceler:[],accelri:[6,13],accept:[7,87,164,189,199,211,214,225,312,370,400,462,469],acceptor:390,access:[0,3,6,7,8,9,11,12,16,40,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,85,88,89,90,91,92,93,95,96,99,100,101,103,104,105,106,107,108,110,111,112,113,114,115,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,159,160,161,162,163,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,219,220,221,222,223,224,225,226,227,228,229,230,231,233,235,236,237,238,239,240,241,242,243,245,246,247,248,249,253,256,257,258,259,260,261,262,263,264,265,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,299,302,303,304,305,306,307,308,309,310,311,313,314,315,316,317,319,320,321,322,323,324,325,326,327,345,360,386,388,390,391,407,419,420,428,451,452,455,460,472,479],accidenti:339,accler:16,accommod:197,accomod:249,accompani:8,accomplish:[16,214,237,263],accord:[64,71,121,127,130,188,199,209,210,236,249,272,280,294,296,314,315,317,322,323,325,326,327,356,360,384,388,399,402,417,424,426,428,430,431,433,434,435,463,468,479],accordingli:[11,14,143,157,168,356,405,406],account:[3,6,9,87,118,162,163,172,183,202,203,219,230,231,233,249,254,255,266,267,269,271,275,281,290,291,293,302,303,304,305,308,309,310,313,317,320,335,354,376,388,396,400,405,406,407,451,468,480],accuml:[3,290,313,320],accumul:[1,6,8,15,71,192,202,233,290,294,319,343,360,460,478],accur:[1,3,6,15,17,38,41,56,147,208,247,285,290,293,305,313,320,326,328,346,366,384,387,388,411,421,436,438,439,441,468,479],accuraci:[1,3,6,12,41,187,189,208,227,249,282,293,318,328,345,346,352,384,411,419,420,438,444,463,468,474,479,482],ach:345,achiev:[1,3,6,16,17,18,41,208,227,249,250,272,273,280,345,391,463],achiv:18,acid:9,ackland1:382,ackland2:382,ackland:[],acknowledg:[],acml:12,aco:479,acolor:[188,189],acoust:272,acquir:[3,6,58,61,62,167,210,212,214,249,415,459,474],across:[1,2,3,6,9,12,13,15,41,57,61,65,68,69,71,79,92,107,108,115,117,152,166,168,201,203,204,205,208,219,229,290,291,295,313,317,320,326,330,355,360,449,454,457,458,462,471],act:[3,6,108,149,218,228,231,232,233,234,236,239,248,290,299,312,314,315,317,326,327,328,353,368,379,387,388,390,421,435],acta:[118,163,361],action:[2,6,11,12,71,226,231,315,474],activ:[5,8,11,12,13,14,55,59,87,162,199,213,226,230,233,239,248,270,290,297,316,343,404,436,448,476,479],actual:[1,3,6,8,12,56,62,122,147,187,189,193,194,207,209,210,218,233,234,267,271,277,285,294,305,307,308,309,310,312,318,327,328,345,356,387,389,399,405,406,451,452,463,464,472,479],adam:[345,346],adapt:[],add:[0,1,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,40,42,71,87,91,102,114,117,119,162,164,165,187,188,192,193,194,195,196,198,200,201,202,203,204,205,206,210,213,218,220,223,227,228,229,231,233,235,236,240,247,248,249,250,251,252,253,254,255,266,267,268,269,271,279,289,290,292,293,302,304,308,310,311,315,316,317,319,321,322,326,328,346,348,352,354,362,367,369,372,376,384,391,396,407,411,414,420,422,452,454,455,460,462,464,466,474],add_molecul:198,add_speci:198,add_to_nodeset:198,addforc:[],addit:[],addition:[6,8,16,139,305,327,387,421],address:[7,8,11,188,232],addtorqu:[],adequ:[305,318,345,355,463],adher:29,adhikari:236,adiabat:[],adiam:[188,189],adjac:[39,164,355,411,438,439,468,469],adjiman:410,adjust:[2,3,6,16,17,41,59,118,143,144,147,148,151,152,157,158,163,168,187,188,201,208,212,214,230,233,237,241,245,246,249,250,253,267,271,274,276,277,280,281,282,283,288,290,297,305,309,313,318,320,321,322,324,325,327,345,346,353,355,360,362,381,405,406,441,464,480],adjust_dt:128,adjust_radiu:297,adjust_radius_factor:297,admiss:253,adof:[144,201],adopt:[289,474],adp:[],adri:[9,286,419,420],adust:158,advanc:[3,230,366,449,460],advantag:[1,6,8,11,14,18,39,40,41,208,360,383,463,468],advect:[3,6,305],advertis:8,advis:[355,418],afer:3,affect:[1,6,10,14,15,16,17,40,60,61,71,88,117,141,148,162,168,189,194,201,202,203,204,205,206,209,210,211,212,214,215,223,229,231,233,239,246,250,251,252,254,255,261,266,267,269,290,291,303,317,327,339,345,351,352,353,355,356,357,360,384,405,406,411,451,452,454,457,459,462,464],affin:[16,17,18,214,360,375],afil:227,aforement:18,afresh:[278,462,479],afshar:380,after:[2,3,5,6,8,9,11,12,15,16,21,22,33,39,40,41,44,50,57,58,59,61,63,71,143,144,145,146,147,148,151,152,153,154,156,157,164,165,167,168,171,172,177,186,187,188,189,190,192,193,194,198,199,201,202,208,209,210,211,212,214,218,225,236,237,238,239,240,245,246,247,249,254,255,261,266,267,269,272,276,280,288,290,293,301,306,308,309,310,312,313,314,315,316,320,322,324,328,331,332,337,344,350,351,353,354,356,358,359,360,361,362,366,373,375,382,383,384,385,391,392,393,404,405,406,407,408,409,413,417,419,420,427,437,439,440,441,449,451,453,454,455,456,457,459,460,462,464,466,468,471,472,474,478,479,480,481,482,483],afterrun:462,afterward:3,afterword:41,ag1:163,ag2:163,again:[6,11,12,17,62,140,144,146,150,158,187,189,214,229,276,331,344,355,405,406,449,451,452,454,456,461,468,470,479,481],against:[11,12,13,64,215,355,419,420],aggreg:[6,12,65,68,69,79,92,108,115,229,245,288,290,303,449,480],aggress:[229,468],agilio:[9,13],agre:[3,8,184,353,362,393,420],agreement:[5,7],ahd:390,ahead:324,aidan:[0,5,7,9,13],aij:13,aim:6,airebo:[],ajaramil:[7,9,13],aka:188,akohlmei:[7,9,13,190,230],aktulga:[7,9,283,420],al2o3_001:[118,291],al3:163,ala:236,alain:9,alat:[271,407],alb:[417,439,441],albeit:289,albert:9,alchem:[87,158],alcohol:320,alcu:[361,366],alcu_eam:417,alderton:379,alejandr:[249,250],alessandro:13,algorithm:[0,1,6,7,8,9,41,61,189,198,208,211,214,236,238,239,261,273,290,293,312,313,317,320,325,351,352,353,357,360,384,406,424,426,449,451,468],alia:12,alias:[1,346],aliceblu:189,align:[6,12,29,41,71,166,184,204,208,231,348,454,457,474],alkali:384,all:[0,1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,22,33,37,39,40,41,42,44,50,54,55,57,59,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,152,157,158,159,160,161,162,163,164,165,166,167,168,170,172,177,183,184,187,188,189,190,192,193,194,195,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,217,218,219,220,221,222,223,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,242,244,245,247,249,250,251,252,253,254,255,256,257,258,259,260,261,262,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,292,293,294,295,296,297,301,302,304,305,306,307,308,309,312,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,335,340,343,344,345,346,347,348,350,353,354,355,356,357,359,360,361,362,363,365,366,367,369,370,371,372,373,375,376,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,449,451,452,453,454,455,456,457,458,459,461,462,463,464,465,466,467,468,469,471,472,474,478,479,480,481,482,483],allen:[29,87,379,387],allentildeslei:87,allign:3,allindex:329,alloc:[3,5,6,8,9,11,12,60,223,319,354,356,360,415,420,454,462],allocat:3,alloi:[],allow:[1,2,3,6,8,9,11,12,13,14,15,16,17,18,22,37,39,40,41,55,57,58,59,61,62,63,77,108,143,144,157,162,163,164,166,172,183,184,187,188,189,190,192,193,195,197,198,199,201,202,203,204,205,206,208,210,211,212,213,214,215,219,220,223,225,226,227,228,230,233,236,239,240,244,246,249,250,271,275,277,278,279,280,284,290,291,293,294,296,297,301,305,312,313,314,315,317,318,319,320,321,322,328,330,332,340,345,346,348,353,354,355,356,359,360,363,366,367,368,369,370,371,376,382,384,388,389,390,391,400,405,406,411,417,420,421,424,426,435,444,446,449,452,454,456,457,458,459,460,461,464,466,467,468,471,472,479,480],almost:[2,3,12,60,231,280,317,346,357,360,435],alo:376,alon:[6,7,211,286,419,420,452],alond:13,along:[6,8,9,12,29,40,87,118,163,164,186,187,188,211,231,236,237,241,246,248,280,290,293,294,298,302,303,312,316,317,323,326,328,348,351,352,353,355,376,379,388,391,394,396,400,407,419,420,438,454,457,464,465,479],alonso:[408,409],alpha:[6,51,193,236,272,280,285,353,361,364,367,376,380,382,383,385,390,395,396,407,412,416,440,442,472,474],alpha_:442,alpha_c:404,alpha_i:[427,442],alpha_ialpha_j:442,alpha_lj:404,alphabet:[2,3,22,37,44,55,63,172,183,192,332,340,354,373,436,454],alphanumer:[3,63,192,279,287,330,354,479],alreadi:[3,7,8,12,42,164,165,167,197,201,204,205,208,210,214,240,278,280,305,328,354,355,380,389,391,398,406,435,444,447,450,454,455,459,464,479],also:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,29,36,37,38,39,40,41,42,44,54,55,56,58,59,61,63,66,71,73,75,77,81,87,89,90,93,103,104,105,106,107,112,114,116,117,119,140,141,142,143,144,145,146,147,148,150,151,152,153,154,156,157,158,159,160,161,162,164,165,166,167,168,170,172,183,184,185,187,188,189,190,192,193,194,195,197,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,220,223,224,225,226,227,229,230,233,234,235,236,246,247,249,250,251,252,253,254,255,260,263,264,266,267,268,269,271,272,273,275,276,277,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,298,299,302,303,305,308,309,310,311,312,316,317,318,319,321,323,326,328,330,332,337,340,343,345,346,348,349,350,353,354,355,356,357,359,360,366,370,371,373,377,378,379,380,382,383,384,387,388,390,391,392,400,404,405,407,411,413,415,416,417,418,421,422,424,430,431,433,434,435,436,437,438,439,440,441,442,449,451,452,453,454,455,456,457,458,459,461,462,463,464,466,467,468,469,472,473,474,475,477,478,479,480,481,483],alter:[3,6,8,9,11,12,41,59,142,143,144,145,147,150,151,152,153,156,157,164,168,187,188,190,193,194,201,209,210,211,212,214,248,249,285,288,290,292,299,305,313,320,327,352,355,391,454,459,461,464,479,480,483],altern:[1,6,8,11,12,17,18,91,164,192,214,230,234,249,279,290,312,313,320,333,336,345,352,353,361,362,376,382,383,385,393,396,404,407,408,409,413,417,418,427,437,439,441,452,454,455,469,472],although:[29,42,184,239,249,277,281,290,312,344,447,461,474,483],aluminum:447,alwai:[0,6,11,12,17,18,54,57,63,71,162,189,202,204,205,206,210,213,225,227,231,282,285,290,305,322,326,327,331,345,346,351,353,354,356,357,360,369,372,382,399,419,420,428,438,439,441,447,449,454,455,457,459,466,468,471,474,479,480],amap:189,amatrix:227,amaz:11,amazingli:13,amber2lmp:[],amber:[],ambient:188,ambigu:[3,63,192,479],amd:[17,360],amend:11,amino:9,amit:9,among:[16,141,199,236],amorph:[164,440],amount:[1,3,6,12,59,88,115,162,166,186,188,212,213,225,229,233,249,271,277,290,297,305,310,313,318,320,328,345,360,380,415,454,457],amplitud:[214,246,298,323,339,457,479],amu:225,analag:[6,479],analalog:6,analog:[6,140,166,184,388],analys:[7,459],analysi:[7,9,13,63,64,73,190,286,287,295,329,427,454,464],analyt:[1,3,13,118,158,163,293,345,366,392,393,398,417],analyz:[6,8,13,355],andersen:293,anderson:[275,380],andr:[7,9,13],andrew:13,andzelm:435,ang:271,angl:[],angle1:289,angle2:289,angle_coeff:[],angle_cosineshift:27,angle_cosineshiftexp:[26,173],angle_cutof:390,angle_cutoff:390,angle_hybrid:29,angle_info:420,angle_styl:[],angle_typ:40,angleangl:[3,331,337,454],angleangletors:[3,171,454],anglecoeff:3,angletors:[3,171,177,454],angletyp:210,angmom:[],angmomi:[113,187,307],angmomx:[113,187,307],angmomz:[113,187,307],angstrom:[6,10,59,71,118,153,163,164,186,187,188,189,197,204,205,214,215,225,230,231,246,283,288,322,324,325,327,346,348,351,357,361,362,371,382,404,407,413,418,419,420,441,447,457,463,478,480],angular:[3,6,40,61,66,82,83,84,85,106,113,140,143,156,157,164,187,192,233,239,245,246,251,252,254,255,257,258,259,262,264,265,266,269,288,290,293,298,307,361,366,375,388,405,406,407,417,436,439,440,454,464,479,480],angularm:258,anharmon:[27,53,173,285,468],ani:[1,3,6,7,8,9,10,11,12,13,14,15,16,17,22,29,38,39,40,41,42,44,55,56,58,59,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,167,168,170,172,184,186,187,188,189,192,195,196,197,199,201,202,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,220,222,225,228,229,231,233,236,239,245,246,249,253,271,273,275,276,277,279,281,282,283,285,287,288,290,292,293,294,298,299,302,304,305,306,307,316,317,322,323,324,325,326,327,328,329,330,332,344,345,346,348,350,351,353,354,355,357,358,359,360,362,366,370,371,375,376,379,380,382,383,385,387,391,392,393,394,400,411,417,419,420,421,427,436,437,438,439,440,441,442,443,448,449,451,452,454,455,457,458,459,460,461,462,463,464,465,466,467,468,472,474,475,477,478,479,480,481,482,483],anihil:404,anim:[2,4,7,11,13,188,355],anion:385,aniso:[3,212,214,249,250,251,252,253,254,255,277,290],anisotrop:[233,387,421],ann:410,annot:[7,437,439,440,441,454],annual:[449,468],anoth:[1,3,4,6,7,8,11,12,17,29,40,63,71,87,119,188,192,193,199,201,203,204,205,206,211,214,215,226,229,233,234,239,249,250,253,276,279,290,291,308,309,310,317,327,330,351,353,355,356,359,376,380,384,385,387,390,391,395,396,404,419,421,428,435,439,440,441,448,449,452,455,461,463,474,479,483],ansi:12,answer:[3,4,8,12,290,357,358],anthoni:315,antiquewhit:189,antisymmetr:[9,40,363],antisymmetri:384,antonelli:[314,315],antonio:416,anymor:315,anyon:7,anyparticl:86,anyth:[8,11,164,214,232,437,439,441,465],anywai:[167,360,474,481],anywher:[12,164,373,407,427,479],aoff:[354,454],aparam:[87,193,194],apart:[3,165,239,302,356,365,428,454,463],aperiod:272,api:[11,12,190,392,452],appar:3,appear:[2,3,6,11,12,13,39,40,41,77,87,108,115,116,140,147,164,165,167,187,188,189,201,204,205,208,212,215,218,225,230,276,287,288,316,328,330,331,345,353,354,355,374,382,407,411,438,450,451,452,454,455,456,459,461,474,479,483],append:[],appendix:[29,379],appl:[212,249,250],appli:[2,3,4,5,6,8,12,17,18,33,41,50,57,59,61,63,71,87,88,105,140,141,144,150,152,154,158,163,164,166,170,172,177,183,187,189,192,193,194,195,196,198,201,207,208,212,213,214,216,219,220,223,224,225,226,227,228,230,231,233,234,235,236,240,249,250,253,254,255,261,266,269,270,271,273,277,280,288,289,290,292,293,294,295,298,302,303,304,306,308,309,310,311,313,315,316,317,320,328,345,348,353,354,355,365,367,369,371,376,379,384,388,389,390,391,393,396,402,406,411,414,419,422,423,424,425,426,435,442,446,454,455,457,458,459,463,464,466,471,474,479,480,481,482],applic:[1,6,9,12,17,190,198,211,215,216,223,227,230,271,276,289,294,302,313,320,345,360,441,464,474],applyt:3,appopri:17,approach:[6,7,9,14,198,226,272,273,285,290,312,313,315,317,320,345,366,376,378,381,387,391,421,423,425,435,444],appropri:[1,2,3,6,8,11,12,13,15,17,33,38,42,50,56,61,73,88,91,116,117,143,144,172,177,183,184,187,189,201,202,204,205,206,211,212,214,223,224,227,236,244,246,247,249,251,252,253,254,255,266,267,269,273,276,277,280,285,290,305,308,309,310,313,320,322,323,325,326,327,337,346,355,362,366,370,374,375,376,383,388,391,393,400,404,418,419,420,437,438,439,440,441,444,454,455,456,458,459,467,468,471,479,480],approri:228,approxim:[6,9,118,122,163,225,227,236,273,291,293,312,345,351,352,353,368,378,384,387,405,406,411,418,421,446,468,474],april:11,aprpopri:449,apu:[405,406],aqua:[188,189],aquamarin:189,ar_therm:198,ar_ttm:198,ara:13,arbitrari:[6,40,58,187,188,190,213,214,228,249,273,281,437,452,465,479],arbitrarili:[11,59,116,140,186,212,249,376,479],arcco:3,arch:[1,12,14,15,17],architect:343,architectur:[16,360],archiv:[6,7,11,12,307,373,461],arcsin:3,area:[6,41,91,112,116,162,208,214,236,313,320,381,388,416,443,451,464],aren:[279,330],arflag:12,arg:[3,11,12,22,40,41,44,55,59,63,71,87,117,152,158,162,164,167,168,172,186,187,189,192,193,194,195,197,199,201,202,203,204,205,206,207,208,209,210,213,214,215,220,223,225,228,229,230,231,239,246,251,252,276,289,290,291,292,295,298,299,301,312,315,322,323,324,325,327,328,332,343,355,360,367,368,369,371,372,373,378,379,384,389,391,396,400,404,405,406,414,422,424,426,436,451,452,454,457,459,461,463,465,472,479,480,482,483],argon:225,argonn:12,argument:[2,3,6,8,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,63,73,87,91,109,112,116,140,141,142,151,152,153,158,162,164,165,166,168,170,171,172,173,174,175,176,178,179,181,182,184,187,189,192,193,194,195,197,200,201,202,203,204,205,206,207,208,212,213,214,221,223,224,227,228,232,233,239,246,249,251,252,253,254,255,256,264,266,267,269,275,276,278,282,287,290,291,292,293,305,308,310,317,319,321,323,328,330,331,332,333,334,335,336,337,339,341,343,344,346,347,348,350,355,359,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,378,379,380,382,383,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,407,408,409,411,412,413,414,416,417,419,420,421,422,427,428,436,437,438,439,440,441,442,443,445,446,447,448,449,450,451,452,454,455,457,459,462,463,464,465,469,471,472,479,480,482],aris:[12,446],arithmet:[3,6,345,371,374,394,399,411,442,443],arkansa:9,arl:9,armv8:17,arnold:345,around:[1,3,4,6,12,42,57,58,59,66,70,73,77,116,140,143,159,162,164,166,186,188,189,196,197,212,214,215,231,246,249,279,281,285,290,298,302,305,322,323,326,344,354,454,457,464,465,474,479],aroung:3,arrai:[],arrang:140,arrheniu:468,art:[9,281,449,468],artefact:227,articl:6,articul:[7,275],artifact:[88,162,474],artifici:[247,280,430,431,433],arun:13,arxiv:[140,427],ascend:[41,189,230,239,290,459],asci:7,ascii:[13,291,316,355,382,385,407,454],ash:[405,406],asid:[8,164,407],asin:479,ask:[3,11],askari:416,askoos:13,asoci:188,aspect:[6,7,59,214,225,387,421,443,454,464,468],aspect_ratio:291,asper:4,aspher:[],asq:[405,406],assembl:4,assign:[1,2,3,6,7,11,12,14,15,17,18,33,39,40,41,50,57,59,61,63,66,71,72,75,90,93,104,106,110,113,114,118,140,141,144,159,161,163,164,167,177,187,188,189,190,192,193,194,197,201,203,208,210,211,212,215,217,225,230,233,234,235,236,246,249,251,252,253,254,255,264,266,267,268,269,273,276,277,279,281,287,290,291,308,309,310,311,328,337,346,348,350,354,355,359,360,366,382,385,387,390,391,420,421,451,452,454,455,456,457,458,463,464,469,472,479,480],assignemnt:[6,463],assing:279,assist:[7,247],associ:[3,5,6,8,9,12,22,37,39,40,44,55,59,66,74,75,81,87,89,90,93,99,101,103,104,106,130,159,172,183,187,188,189,193,194,195,199,212,214,220,223,225,226,232,236,246,249,275,285,289,290,291,303,305,329,330,332,340,348,353,355,359,360,373,376,380,381,382,384,390,391,393,396,400,423,425,435,436,438,452,455,462,474,476,479],associd:67,assum:[2,3,4,6,11,12,16,39,59,67,71,88,96,102,104,142,143,144,145,146,147,149,150,151,152,153,154,156,157,158,162,164,167,189,193,194,201,202,203,204,205,206,212,214,222,230,232,236,239,251,252,254,255,257,259,262,264,265,266,269,271,272,276,277,278,281,290,292,294,302,313,316,317,322,325,328,345,346,354,355,360,366,368,370,373,374,381,384,390,391,395,400,405,406,443,449,451,452,454,456,459,464,468,471,472,474,480],assumpt:[162,230,361,411],astar:407,astart:428,asterisk:[22,44,77,87,116,158,168,172,189,193,194,239,290,332,350,373,390,435,448,451,464,478],astop:[353,428],asu:382,asub:407,asubrama:13,asymmetr:[127,325,366,382],asynchron:[15,16],atan2:479,atan:479,atc:[],atc_fe_output:198,athomp:[0,7,9,13],atm2pa:6,atmospher:478,atol:12,atom1:[275,289,354,454],atom2:[275,289,354,454],atom3:[275,289,354,454],atom4:[289,354,454],atom:[],atom_element_map:198,atom_forc:420,atom_info:420,atom_modifi:[],atom_styl:[],atom_vec:8,atom_vec_atom:8,atom_vec_electron:8,atom_veloc:420,atom_weight:198,atomey:[6,7,11,13,187,188,189],atomfil:[3,71,279,328,359,464,479],atomic_charg:198,atomic_numb:417,atomid:454,atomist:[6,198,312],atomperbin:3,atomt:189,atomvec:8,attach:[6,205,273,294,302,454],attatch:315,attempt:[3,6,41,59,71,186,199,208,209,210,211,215,225,276,277,305,325,345,349,355,391,452,467,469,472,479],attend:198,attent:[15,18],attogram:478,attrac:407,attract:[],attribut:[3,6,7,8,11,39,40,42,58,63,71,87,113,114,115,117,143,158,187,188,189,192,193,194,200,201,203,204,205,211,212,249,251,252,253,254,255,257,258,266,267,269,277,290,291,307,308,309,310,348,354,366,384,391,454,455,456,464,472,479],atw:[405,406],atwat:440,atwt:407,atyp:[115,158,210,376,396,400,404],au1:163,au3:163,aug:11,augment:[12,113,212,279,407],augt1:407,auo:287,auoh:287,author:[3,8,9,13,382,383,474],auto:[6,8,11,12,91,160,192,202,294,319,345,354,360,451],autocorrel:[63,91,233],autom:[12,188],automag:7,automat:[3,6,12,14,15,16,17,18,19,36,128,184,197,225,227,236,290,294,318,345,360,375,382,391,407,423,424,425,426,447,454,467,474],auxiliari:[1,6,9,11,12,13,187,272,290,455,459,481],avail:[1,3,5,6,7,8,9,11,12,13,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,63,87,109,112,113,140,142,151,162,170,171,173,174,175,176,178,179,181,182,184,187,188,192,195,201,203,204,205,206,207,212,213,221,224,226,228,230,233,249,250,251,252,253,254,255,256,264,266,267,269,282,284,290,291,292,293,308,310,315,321,331,333,334,335,336,339,341,343,346,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,416,417,419,420,421,422,427,428,437,438,439,440,441,443,445,446,447,455,463,467,479],availab:9,ave_chunk:6,aveforc:[],avendano:410,averag:[3,6,7,15,41,63,64,71,87,91,103,105,116,118,144,152,160,163,187,189,192,194,198,200,201,202,203,204,205,206,207,208,212,225,227,229,233,234,239,249,250,253,272,277,280,286,287,290,291,294,331,362,384,407,442,455,459,472,474,479],averi:305,avesq:117,avi:188,avoid:[1,3,6,12,36,39,59,164,165,184,188,197,202,203,206,218,225,227,234,271,273,281,285,290,291,319,326,358,366,384,404,407,420,438,456,462,463,474],awai:[3,6,61,116,187,188,211,215,228,231,248,271,294,302,316,322,356,376,396,400,459],awar:[360,383,451],awpmd:[],axel:[7,9,13,18],axi:[3,6,41,118,130,143,163,164,166,186,188,208,225,228,231,246,276,298,302,317,323,335,341,348,454,457,464],axial:253,azimuth:[188,228],azur:189,b_k:427,ba2:163,babadi:421,back:[1,6,7,11,12,13,14,15,17,145,146,147,151,152,153,154,156,164,168,187,189,190,193,194,213,218,223,230,231,233,234,249,254,255,266,267,269,288,290,308,309,310,314,315,324,325,327,344,345,346,355,388,452,454,455,456,457,458,461,467,468,480],backbon:[211,293,339],backcolor:[189,482],backend:17,background:[9,87,88,112,141,189,208,214,233,305,313,317,320,355,374,405,406,407],backtrack:[351,353],backward:[9,12,190,355,468],baczewski:226,bad:[3,12,59,61,231,355,454,459,471],badli:[3,212,249],bal:312,balanc:[],balasubramanian:268,ball:[140,405,406],ballenegg:345,bammann:198,band:[4,6,7,140,192,248,352,355,366],bandwidth:[1,10,18,40],bandwith:188,bar:[87,188,478],barashev:382,bare:[218,232,234],barost:[218,474],barostat:[],barostt:6,barr:375,barrat:285,barrett:67,barrier:[3,4,6,248,341,355,375,386,468],bartel:272,bartok2010:427,bartok2013:427,bartok:[9,140,418,427],bartok_2010:418,bartok_phd:418,bary:478,barycent:301,basal:[],base:[3,4,6,8,9,11,12,13,14,15,20,63,64,71,78,87,91,111,118,144,146,163,164,166,187,188,189,192,198,204,205,208,209,210,214,215,219,230,233,237,239,261,272,273,279,281,283,290,291,294,295,305,312,346,360,362,364,366,380,384,387,390,391,392,396,405,408,409,414,416,417,437,440,441,449,451,454,455,456,458,461,464,465,468,469,472,478,479,480,483],bash:373,bashford:[6,20,170,371,466],basi:[3,6,12,40,140,144,164,197,233,235,272,305,322,348,447,464,479],basic:[6,7,8,12,17,41,113,141,188,189,198,208,249,250,271,326,361,363,448,456,474],basin:[86,355,449,468],bask:[382,407,417],bath:[9,280,285],batom1:[69,115,117,187,189],batom2:[69,115,117,187,189],bayli:[6,170,466],bb13:171,bcc:[3,4,7,64,70,73,348,407,409],bcolor:[3,188,189],bdiam:[3,188,189],be2:163,bead:[5,7,10,13,40,45,46,156,196,211,273,435],beam:215,bear:[6,226],becau:13,becaus:[0,1,3,6,8,12,16,17,18,29,40,41,59,64,71,77,116,128,140,144,149,154,164,165,166,170,187,188,189,190,195,199,201,208,209,210,211,212,214,220,224,226,227,232,233,234,235,246,249,250,261,267,276,280,281,285,290,302,307,312,313,316,317,320,324,325,326,327,328,334,345,351,353,355,356,359,360,371,373,376,378,380,384,385,387,388,389,390,391,394,395,404,405,406,407,411,421,435,436,442,443,451,452,454,456,457,458,461,463,464,466,468,474,479,480,481,483],beck:[],becker:[361,382],beckman:230,becom:[1,2,3,6,7,8,18,39,41,54,57,59,71,166,187,188,189,208,209,210,211,214,225,227,236,248,249,287,288,308,309,322,323,325,326,327,345,346,351,355,362,374,376,382,384,387,396,411,417,421,437,446,454,455,457,464,479],been:[1,2,3,6,7,9,12,13,16,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,45,46,47,48,49,51,53,54,56,57,59,60,63,65,69,71,87,109,112,113,114,115,117,119,142,143,144,145,146,147,151,152,153,154,156,157,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,188,189,190,195,197,199,200,201,202,203,204,205,206,207,208,211,212,213,214,215,221,224,225,228,230,231,233,234,236,237,238,239,240,244,246,247,249,251,252,253,254,255,256,264,266,267,269,275,276,277,280,282,284,287,288,290,292,293,301,306,308,309,310,317,318,319,321,322,323,324,325,327,328,331,333,334,335,336,339,341,344,345,346,353,356,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,381,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,408,409,412,413,414,416,419,420,421,422,428,435,437,438,439,440,441,443,445,446,447,449,451,452,454,455,456,457,458,460,464,468,471,472,479,480,481,482],befor:[1,2,3,6,8,9,12,14,17,22,29,39,40,41,44,59,66,71,74,75,81,89,90,93,103,104,105,106,114,144,147,152,153,159,164,165,167,168,172,185,186,189,193,194,195,196,197,199,201,203,204,205,206,207,208,212,217,218,224,225,230,232,233,234,236,239,246,249,254,255,266,269,272,279,280,281,284,285,290,291,292,306,308,309,310,316,322,323,324,328,332,350,351,353,355,360,385,388,404,407,436,444,449,451,452,455,456,457,458,459,461,462,464,468,471,472,474,479,480,481,482,483],began:[5,12],begin:[3,8,12,38,39,56,71,117,119,165,184,186,187,189,193,194,198,200,201,202,203,204,205,206,208,214,218,234,261,275,288,291,305,307,310,319,324,327,328,342,344,345,346,347,349,352,354,355,356,359,360,382,411,417,424,426,428,435,438,442,447,449,454,461,468,470,472,474,478,479,481],behalf:3,behav:[3,27,173,352,353],behavior:[3,168,184,187,188,190,211,212,215,225,226,227,230,233,234,235,249,276,280,285,305,308,309,317,352,366,384,407,448,456,460,479,481],behaviour:[6,233],behind:[8,232,247,280,305,345],beig:189,belak:7,believ:11,bellott:[6,20,170,371,466],bellow:335,belong:[2,3,40,71,120,167,199,201,204,225,239,290,328,354,423,454],below:[1,2,3,5,6,8,9,11,12,15,16,17,22,38,39,41,42,44,54,56,59,60,63,65,68,69,71,77,79,91,92,112,113,116,117,118,140,141,144,150,152,158,162,163,164,167,168,170,172,183,184,187,188,189,192,193,195,196,198,201,202,203,204,205,207,208,210,211,212,214,215,220,223,228,229,231,233,234,239,246,247,249,253,254,255,266,269,271,276,279,280,281,288,289,290,292,293,299,302,305,306,307,308,309,310,313,314,315,317,320,322,323,328,330,332,343,345,348,350,351,353,354,355,357,360,361,362,363,366,367,368,371,372,373,374,376,379,382,384,385,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,410,411,416,419,420,421,422,427,428,436,438,443,445,446,448,449,452,454,455,456,457,459,461,462,464,466,468,470,471,472,473,474,479,480,483],bench:[1,6,11,12],benchmark:[1,7,10,11,12,13,14,15,16,17,18,41,208,345,467],beneath:215,benefici:[61,357],benefit:[1,226,463],bennet:87,beowulf:7,berardi:[387,421],beraun:317,berendsen:[],berensen:290,berkelei:162,berkowitz:345,berlin:[7,9,294],bern:[3,273,281,282,375,387,436,463],bernendsen:6,beryllium:384,besid:[8,292,457],best:[1,6,8,14,15,16,17,18,19,249,267,268,289,290,360,366,376,396,400,411,438,455,463,468],beta:[6,9,272,280,361,364,382,383,385,407,439,440,441,472,479],beta_:366,beta_k:427,beta_pi:366,beta_sigma:366,beta_t:440,better:[3,6,7,8,12,14,16,27,140,173,194,208,225,236,249,261,281,288,290,305,346,355,360,439],betwe:365,between:[],beutler:404,bewteen:[108,202,305,313,320,391,451],beyon:463,beyond:[3,5,6,12,17,61,71,87,162,187,189,203,204,225,249,345,357,386,402,411,468,472,479],bgq:17,bi3:163,bi5:163,bia:[3,6,8,112,141,143,144,145,146,147,151,152,153,154,156,157,201,213,214,225,233,234,249,254,255,266,267,269,285,308,309,310,312,480],bias:[6,9,213,480],biaxial:143,biersack:[407,436,441,447],big:[3,4,12,187,280,285,305,356,374],bigbig:[3,12],bigint:[3,223],bilay:[4,10,302],bilayer1:302,bilayer2:302,bill:7,billion:[3,7,10,12,39,225,462],bin:[3,6,11,12,39,63,66,71,75,90,93,104,106,114,116,144,152,159,161,187,189,201,203,204,205,272,280,285,305,356,357,360,381,415,455,482],binari:[3,6,7,12,13,16,33,37,50,55,177,183,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,222,223,224,225,226,227,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,337,340,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,414,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,445,446,447,455,456,461,481,483],binary2txt:[],binchunk:201,bind:[17,18,204,366],binsiz:[39,189,356,360],binstyl:152,bio:[40,356],biolog:[6,7],biologi:176,biomolecul:[275,290,345,346,371],biomolecular:463,biophys:230,biosym:13,bird:381,bisect:[41,208,443],bisector:[6,376,396,400],bispectrum:[63,140,427],bisqu:189,bit:[3,12,17,39,223,234,411,438,462,474],bitmap:[3,438,444],bitrat:[188,189],bitzek:352,bkgd_dyn:407,bla:12,black:189,blais:[9,13],blanchedalmond:189,blank:[2,3,12,38,56,107,184,188,275,290,354,355,366,383,407,413,427,437,438,439,440,441,451,452,454,479],blast:317,blend:407,block:[2,3,6,91,140,164,166,167,276,326,348,360,366,384,417,427,457,468,474],blow:[3,261,322,326,428],blown:3,blue:[2,188,189,211],bluegen:[187,345],blueviolet:189,board:[346,379],bodi:[],body_nparticl:8,bodyflag:454,bodyforc:236,bodyforcei:236,bodyforcex:236,bodyforcez:236,bodystyl:[239,290],boff:[354,454],bogaert:312,bogu:[3,147,212],bogusz:88,bohr:[382,384,441,478],boltzmann:[6,7,9,87,91,112,142,144,145,146,147,150,151,152,153,154,156,201,211,233,236,237,238,239,240,253,321,380,469,478],bond:[],bond_coeff:[],bond_graph_cutoff:420,bond_harmon:[8,48,49],bond_harmonicshift:49,bond_info:420,bond_interact:198,bond_styl:[],bond_typ:[168,435],bondangl:[3,21,33,454],bondbond13:[3,171,454],bondbond:[3,21,33,454],bondchk:420,bondcoeff:3,bondtyp:[209,210,354,435],bonu:[3,481],book:446,bookkeep:411,bookmark:0,boost:[1,3,12,64,356],bop:[],border:[3,7,16,61,317,480],boresch:87,boreschkarplu:87,born:[],boron:384,borrow:294,bose:285,botero:[7,9,13,384],both:[1,3,6,7,8,9,11,12,14,15,16,17,18,27,37,39,40,54,55,57,59,61,62,63,68,69,71,83,87,88,108,113,115,116,128,143,144,149,152,154,157,164,166,167,168,173,183,184,187,188,191,192,193,194,199,201,202,204,205,206,209,210,211,212,213,214,219,225,227,229,231,233,234,236,237,245,246,249,250,254,255,261,266,269,275,279,280,281,287,290,293,294,302,305,309,313,314,315,317,320,322,323,325,326,327,330,331,340,346,350,353,354,355,356,358,360,362,366,367,368,369,370,371,372,374,379,380,382,383,384,387,388,390,391,392,396,398,400,401,402,404,405,406,410,411,414,421,422,437,439,440,441,447,449,451,452,454,455,456,457,461,466,471,472,474,479,481,482,483],bottleneck:[1,3,452],bottom:[8,9,147,189,214,224,236,267,313,320,348,466],bottomwal:207,bounc:[3,305],bound:[3,6,17,26,27,41,42,57,59,71,153,166,173,186,187,189,203,204,208,214,215,219,225,234,249,276,305,322,323,324,325,326,327,345,353,384,454,457,468,474,479,480],boundar:3,boundari:[],boundary_dynam:198,boundary_faceset:198,boundary_integr:198,bount:11,box:[],boxcolor:[188,189],boxxlo:11,bpa:360,bpclermont:[9,13],bptype:435,br1:163,bracket:[2,3,6,41,63,71,117,119,192,200,201,202,203,204,205,206,208,319,472,479],bragg:[118,163],branc:11,branch:11,branicio:73,breakabl:[7,44,55],breakag:[78,209],breakdown:[1,12,15,88,107,419,420,449,468],brennan:435,brenner:[362,436],brick:[3,41,62,152,166,208,454,456,458],brief:[1,5,6,7,8,12,232,362,366,420,468],briefli:[6,10,273,375],brilliantov:388,bristol:[5,7],brittl:416,broader:452,broadli:8,broken:[2,54,65,69,70,78,107,115,168,209,249,366,456,466,481],brook:6,brought:186,brown:[7,9,13,15,16,118,141,189],brownain:368,brownian:[],brownw:7,brows:0,browser:[4,188],bryantsev:390,bsd:12,bstyle:[40,42],btype:[69,115,165,187,376,396,400,404,435],buc:369,buck:[],buckingham:[7,193,194,281,346,367,369,370,378,436],buffer:[3,8,188,189,471],bufi:188,bug:[],bui:188,build:[],builder:[7,13],built:[1,2,3,4,6,8,9,11,12,13,14,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,43,45,46,47,48,49,50,51,53,54,55,56,64,67,78,80,83,86,87,96,97,98,99,100,101,105,109,111,112,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,148,150,151,155,156,158,162,170,171,173,174,175,176,177,178,179,181,182,183,184,187,190,192,195,196,197,199,207,209,210,211,213,215,220,221,222,224,225,226,227,228,230,232,233,235,236,237,238,239,240,242,243,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,271,272,273,275,276,279,280,281,282,283,284,285,286,287,290,292,293,294,295,296,297,298,299,301,305,308,310,311,312,313,314,315,317,318,320,321,323,324,329,330,331,333,334,335,336,337,339,340,341,346,355,356,357,360,361,362,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,415,416,417,418,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,449,452,455,457,463,467,468,469],bulatov:[408,409],bulk:[4,6,10,70,236,271,277,377,407,411,416,423,425,458],bullet:7,bump:233,bunch:8,bundl:[9,188,190],burlywood:189,bussi1:309,bussi2:309,bussi:[227,309],bybe:9,c1060:14,c11:[202,407],c12:202,c13:202,c1n:202,c2050:14,c21:202,c22:202,c23:202,c2n:202,c31:202,c32:202,c33:202,c34:202,c3n:202,c41:202,c42:202,c43:202,c44:202,c_0:[317,433,434],c_1:[68,69,117,118,163,187,189,226,279,291,328],c_2:[69,117,118,160,162,163,187,291,319,328],c_3:[117,291],c_cluster:6,c_cstherm:6,c_dist:117,c_doubl:11,c_e:317,c_flux:91,c_forc:117,c_gauss:386,c_hb:390,c_id:[6,63,71,87,117,119,187,200,201,202,203,204,205,206,291,307,319,472,479],c_ij:6,c_ijkl:6,c_index:117,c_k:226,c_ke:313,c_msdmol:119,c_my_stress:200,c_mycentro:[201,204],c_mychunk1:114,c_mychunk2:114,c_mychunk:[6,66,75,90,93,104,106,144,159,161],c_mycom:203,c_mycomput:201,c_myf:[187,482],c_myrdf:[116,206],c_mytemp:[8,202,203,206,319,472,479],c_n_k:226,c_p:141,c_pe:110,c_peratom:[110,141],c_pi:366,c_press:117,c_prop:6,c_radiu:162,c_reax:[419,420],c_sa:291,c_sigma:366,c_size:6,c_stress:187,c_tatom:234,c_tdrude:[218,234,474],c_thermo_press:[8,202,203,206],c_thermo_temp:206,c_xrd:203,ca2:163,cach:[17,39,411,467],cacul:293,cadetblu:189,cai:474,calcforc:236,calclat:91,calcluat:[103,105,110,112,141,376],calcualt:[91,201],calcul:[],caldwel:[6,170,466],calhoun:273,call:[],callabl:[3,11],callback:[3,11,192,223,452],caller:3,calori:478,caltech:[6,7,9,13,384],calucl:6,calul:[11,12,144,346],cambridg:[9,418],campa:272,can:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,342,343,344,345,346,348,349,350,351,353,354,355,356,357,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,461,462,463,464,465,466,467,468,469,470,471,472,474,478,479,480,481,482,483],cancel:[192,290,480],candid:[168,199,225],cannot:[1,2,3,6,11,12,13,15,16,17,39,40,41,54,57,58,59,68,71,82,84,88,104,117,119,143,144,165,167,168,186,187,188,189,200,201,202,203,204,205,206,208,211,212,214,215,225,226,227,233,234,235,239,246,249,251,252,254,255,257,258,259,264,266,269,276,277,280,285,287,290,291,292,295,305,313,317,319,320,322,323,326,327,328,330,345,348,353,355,358,359,360,369,370,372,382,387,389,396,400,402,404,411,414,419,421,422,423,425,435,436,438,449,451,452,454,455,457,458,460,463,464,466,468,471,478,479],canon:[192,199,225,227,249,250,266,267,268,269,273,309,312,315,416],cao1:273,cao2:273,cao:273,capabl:[5,7,9,11,14,16,17,18,324,330,346,360,362,372],capac:[9,40,101,150,285,317,430,454,464],capit:[217,454],capolungo:[118,163,291],captur:[6,318,362,370,384,388,400,407,474],carbid:376,carbon:[7,188,339,362,375,393,407],card:[12,14,16,22,44,77,87,116,172,193,194,290,332,350,373,390,448,456,461,481,483],care:[3,6,59,71,164,167,186,201,204,205,209,210,215,227,232,236,249,276,290,312,365,452,454,457,458,463,464],carefulli:[11,12,54,287,328,391,393,459],carlo:[6,7,9,192,199,211,225,290,312,381,436],caro:[199,382],carpent:[7,13],carri:[16,242,279,317,388,420],cart:[3,451],carter:[9,17],cartesian:[3,62,361,451],carv:167,cascad:[219,317],cash:7,cast:[227,479],cat:[15,188],catastroph:281,cate:236,categori:[],cation:385,cauchi:[133,138],caus:[1,2,3,6,8,12,16,17,164,166,167,168,187,189,197,212,219,225,261,271,288,290,293,322,324,325,326,327,330,344,346,353,355,359,390,396,402,405,406,411,448,452,453,454,455,458,459,461,462,479,483],caution:[1,346],cautiou:[209,210],cautious:362,caveat:[362,463],cbecker:[361,382],cc1:[6,14,66,75,90,93,104,106,114,144,159,161,201,204],cc2:14,ccc:[383,437,439,441],ccflag:[12,16,17,18,19,187],ccm6:382,ccsi:[383,437,439,441],ccu:366,cd2:163,cdeam:382,cdennist:9,cdll:11,cdof:[6,144,201],cdte:366,cdte_bop:366,cdtese:366,cdzn:366,cdznte:366,ce3:163,ce4:163,ceas:352,ceil:479,cell:[3,6,59,88,116,118,162,163,164,187,197,212,213,225,230,247,249,250,253,272,280,283,317,345,346,348,381,384,472],cella:[6,472],cellalpha:[6,472],cellb:[6,472],cellbeta:[6,472],cellc:[6,472],cellgamma:[6,472],center:[3,6,25,42,63,66,71,74,75,86,89,90,98,103,104,105,114,116,118,144,145,146,149,152,156,159,161,164,188,189,192,193,194,196,201,203,204,205,212,214,215,216,218,225,226,231,233,234,239,245,249,254,255,266,267,269,272,276,281,287,288,290,291,294,302,303,305,307,308,309,310,312,313,315,322,326,331,348,354,365,383,384,387,388,394,405,406,407,408,409,437,439,440,441,443,457,464,474,479],centimet:478,central:[3,61,70,76,77,116,122,140,239,271,293,303,354,413,419,420,454],centro:[],centroid:[3,273,443,464],cerda:345,ceriotti2:227,ceriotti:[13,227,232],certain:[1,2,3,6,8,12,17,39,71,113,117,119,168,187,188,200,201,202,203,204,205,206,211,223,224,290,292,306,319,330,337,344,356,391,411,420,442,456,460,474,479],certainli:231,cerutti:346,cfg:[3,6,7,13,187,188,189,190],cfile:420,cfl:[128,295],cfor:294,cg_type:422,cgiko:2,cgikot:2,cgkio:2,cgko:2,cgkot:2,cgo:2,cgot:2,ch2:293,ch2lmp:[],ch3:293,chain3:356,chain:[],challeng:[6,294],chalopin:285,champaign:[230,345,346,405],chandler:[361,382],chandrasekhar:[6,396],chang:[1,2,3,6,8,9,11,12,14,15,16,17,39,40,41,46,55,57,59,62,71,80,87,116,126,128,146,147,148,164,165,166,168,184,186,187,188,189,190,192,193,194,195,196,198,199,204,205,207,208,209,210,211,212,213,214,215,219,220,222,224,227,229,230,231,233,235,236,237,239,245,246,247,249,250,251,252,253,254,255,261,266,267,268,269,271,272,276,277,279,280,284,287,288,289,290,292,293,294,305,308,309,310,311,313,314,315,316,317,318,320,323,326,328,346,351,353,355,358,360,380,384,388,391,405,406,407,411,419,420,436,449,450,451,452,454,455,456,457,458,459,460,462,463,464,465,466,469,472,475,477,478,479,480,481],change_box:[],changeabl:187,channel:[4,195],chapter:[273,346],charact:[2,3,6,12,38,41,56,63,184,187,188,189,190,192,208,279,287,330,354,359,384,395,417,419,420,438,451,452,456,461,462,479,481,482,483],character:[6,67,70,116,140,427,449,468],characterist:[234,305,314],charg:[1,3,4,5,6,7,9,11,15,40,87,88,113,118,163,164,187,190,192,193,194,199,215,220,225,279,281,282,283,287,307,320,345,346,354,367,369,375,376,378,379,382,384,385,391,396,400,404,414,419,420,436,441,442,444,446,447,454,455,459,464,466,474,478,479],charmm2lammp:13,charmm:[],chartreus:189,cheap:305,cheaper:[219,387,421],check:[3,6,8,11,12,15,17,39,41,71,91,184,199,204,208,209,210,215,222,225,231,232,289,293,305,313,315,320,328,330,344,353,354,355,356,357,360,381,392,395,411,420,435,449,451,452,454,462,468,471,472],checkf:184,checkqeq:420,checku:184,chem:[6,13,20,21,25,39,40,43,45,46,87,88,112,141,170,171,181,213,218,226,227,234,236,248,249,250,267,268,273,277,280,282,290,294,305,308,309,312,313,314,315,322,331,339,341,345,346,352,355,362,367,371,372,375,376,377,379,380,384,386,387,389,390,396,400,401,404,407,410,411,414,435,442,463,466,468,474],chemic:[9,118,158,163,187,198,199,225,281,286,287,312,346,419,420,431],chemistri:[9,280,281,283,366,384,419,420],chen:317,cheng:375,chenoweth:[419,420],chenoweth_2008:[419,420],chi:[92,153,186,271,281,283,385,387,480],chiefli:418,child:8,chip:[7,12,17,360,467],chipot:213,chiral:339,chmod:[11,12],cho:407,chocol:[7,189],choic:[3,6,12,15,16,18,40,41,54,87,141,143,157,168,184,201,204,205,208,211,214,215,227,233,236,247,249,273,281,290,312,340,346,351,352,355,357,360,391,404,411,415,454,463,464,467,468,473,474,478],choos:[1,3,6,7,8,12,16,17,18,29,39,54,87,117,154,155,188,209,210,211,212,215,222,233,236,247,249,251,252,253,254,255,277,305,309,323,345,346,352,444,449,451,463,469],chose:[439,441],chosen:[2,3,6,12,17,140,164,167,176,184,188,194,199,212,215,222,225,226,234,236,247,249,253,273,276,287,305,309,312,313,318,320,321,327,346,347,352,360,384,388,394,395,398,422,439,449,463,468,474],chri:162,christian:[7,9,14,17],christoph:7,chunk:[],chunkid:[66,75,90,93,104,106,114,144,159,161,201],chute:[4,10,228],ciccotti:293,cieplak:[6,170,466],cii:202,cij:202,circl:301,circular:[3,6,143,185],circumst:18,circumv:285,citat:[],cite:[3,7,8,12,233],cko:2,cl1:163,clarendon:[29,379],clarifi:[7,439,441],clariti:330,clark:414,class2:[],classic:[0,3,5,6,7,8,9,223,273,280,285,317,341,384],classifi:[9,436],claus:452,clean:[6,12,14,15,17,462],cleanli:[453,482],clear:[],clearli:7,clebsch:140,clermont:[9,13],clever:458,click:[2,11,22,37,44,55,164,172,183,188,230,332,340,355,373,436],client:[230,232],climb:[248,355,468],clinic:[7,13],clo:[153,186,480],clock:[12,449,468],clockwis:323,close:[3,6,11,12,13,39,41,67,141,167,187,210,211,212,227,234,236,249,267,290,293,323,326,344,346,349,351,352,355,360,362,366,376,377,407,411,423,425,441,458,464,474,476],closer:[3,41,116,162,186,187,208,212,216,314,355],closest:[210,271,290,320,387,421,435,444],cloud:474,clovertown:18,clsuter:72,clump1:[275,290],clump2:[275,290],clump3:[275,290],clump:290,cluster:[],clutter:[3,9],cmap:454,cmatrix:227,cmax:407,cmd:[11,12,273,465],cmin:407,cmm:[],cn1:202,cn2:202,cna:[],cnn:202,cnr:[9,13],cnt:[391,458],co2:[40,163,293,354],coars:[7,9,29,36,40,54,176,275,290,305,389,422,466],coarser:[346,479],coarsest:140,code:[],coeff:[3,7,8,12,21,22,33,44,50,170,171,172,177,331,332,337,373,391,395,411,424,426,428,454,456],coeffcient:454,coeffici:[],coefficienct:380,coefficient0:382,coefficient1:382,coeffieci:[6,364],coeffincientn:382,coexist:[9,225,384],cohes:[6,385,407],coincid:[122,326,371,405,406,449],cold:[6,149,229,356,474],coldest:313,coleman8:9,coleman:[9,118,163,291],colin:9,collabor:[7,8,9,15],collect:[3,6,7,8,9,13,40,42,66,75,83,90,93,98,104,106,114,144,152,159,161,164,187,189,201,213,239,245,275,285,288,290,328,345,354,356,374,394,454,461,467,483],collid:[219,305,327],colliex:163,collinear:[3,275],collis:[3,236,305,323,327,381,388,447],colllis:305,colloid:[],colombo:39,colon:[190,328,455],color1:189,color2:189,color:[3,9,41,187,188,189,208,226,280,285],column:[3,6,9,13,42,63,65,66,67,68,69,71,75,77,79,81,90,92,93,104,106,108,110,113,114,115,116,117,119,140,141,144,152,159,161,162,163,184,187,189,192,200,201,202,203,204,205,206,239,246,247,280,290,306,307,317,327,386,390,419,420,455,469,471,479],colvar:[],colvarmodul:12,com:[],comamnd:214,comand:[211,456],comannd:360,comb3:[],comb:[],comb_1:282,comb_2:282,combiant:377,combin:[3,6,7,9,11,13,36,40,63,65,69,79,87,92,108,115,143,157,187,188,198,203,230,239,249,273,279,309,318,326,329,331,345,346,348,352,360,374,376,377,384,385,391,403,404,427,437,439,441,446,457,462,474,479],come:[],comfort:[12,13],comm:[0,3,12,61,73,230,232,233,346,355,360,380,411,416,438],comm_modifi:[],comm_styl:[],command:[],comment:[2,7,11,12,38,56,170,184,187,234,290,317,354,355,361,382,383,385,395,407,413,420,427,437,438,439,440,441,451,452,454,474,479],commerci:7,commmand:[3,6,12,59,107,268,448,449,451,468,482],common:[],commonli:[3,6,12,17,25,57,59,105,166,187,188,190,341,389,398,427,439,441,454,457,466],commun:[1,3,6,7,8,10,11,12,14,15,16,18,40,41,58,61,62,71,167,168,188,189,208,209,210,212,213,214,230,232,236,238,239,240,249,272,279,281,282,283,290,305,317,328,345,356,357,358,360,381,415,451,452,456,463,464,481,483],communc:345,comp:[7,232,233,293,346,355,384,411,416,421,434,438,440],compact:[63,192,373,436],compani:[5,7],compar:[1,3,4,6,8,12,17,39,86,110,118,147,162,163,172,183,189,218,281,328,330,345,346,353,355,407,449,468,469,474,478],comparison:[],comparison_of_nvidia_graphics_processing_unit:14,compass:[7,21,22,37,43,44,55,171,172,183,331,332,340,372,436],compat:[3,5,7,8,9,11,12,13,17,18,41,71,117,119,175,187,190,194,200,201,202,203,204,205,206,208,272,284,309,312,319,322,325,345,360,392,411,438,451,452,479],compens:[6,209,210,288,356,384],compet:316,competit:346,compil:[3,7,8,9,10,12,13,14,15,16,17,18,19,162,187,188,190,230,316,346,360,454,455,459],compl:17,complain:[12,17],complement:407,complementari:[7,376,396],complet:[3,6,9,12,15,41,59,71,189,204,208,213,239,273,276,279,305,316,318,330,344,355,360,385,424,426,443,449,454,459,462,466,468,471,474,479],complex:[6,8,11,12,13,25,40,42,62,140,152,164,165,236,301,326,343,355,384,438,452,454,457,479],compli:[312,316],complic:[6,7,9,12,13,199,225,452],complier:12,compon:[3,6,8,12,61,63,66,67,73,81,88,89,90,91,93,94,97,104,105,106,107,108,109,110,112,113,117,127,130,131,132,133,136,137,138,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,159,160,161,187,188,189,195,196,200,201,202,203,204,205,206,207,211,212,214,215,220,223,228,232,233,236,239,241,245,246,248,249,250,253,254,255,266,267,269,270,272,273,274,277,288,290,292,293,294,298,299,302,305,308,309,310,312,319,320,325,326,327,345,348,352,353,354,355,360,380,384,388,405,406,424,426,427,454,455,464,472,479,480],componenet:6,composit:[6,199,236,382],compound:[375,384,385],compres:[71,114,201],compress:[3,6,59,71,114,167,187,188,189,201,214,247,253,277,280],compris:[40,326,394,421,443],compton:[118,163],comptu:[3,6],compuat:346,comput:[],computation:[3,6,209,210,317,366],computational:474,compute_arrai:8,compute_fep:[194,404],compute_group_group:225,compute_inn:8,compute_ke_atom:8,compute_loc:8,compute_modifi:[],compute_peratom:8,compute_sa:[118,291],compute_scalar:8,compute_temp:8,compute_ti:194,compute_vector:8,compute_xrd:163,concaten:[2,3,482],concav:326,concentr:382,concept:[6,144,154,201,463],conceptu:[3,6,71,152,212,214,355,376,391,407,459],concern:[6,73,87,226],concis:[11,316],conclud:12,concret:8,concurr:[9,16,346],conden:[317,439,441],condens:[6,146,317,362,378,382,396],condit:[],conducit:6,conduct:[],cone:457,confid:[3,468],config:[12,187,451],configfil:213,configur:[1,2,6,12,15,17,38,59,122,166,184,186,187,188,192,212,213,214,215,219,225,232,233,261,273,281,316,343,353,355,362,366,383,407,437,439,441,449,454,456,457,468],confin:[454,468],conflict:[3,40,411,452],conform:[3,6,13,59,211,212,248,289,294,316,339,355,384,466],confus:3,conjuct:380,conjug:[7,8,233,352,384,419,420],conjunct:[6,7,71,86,87,114,147,152,158,164,168,189,193,194,233,236,240,261,276,277,281,282,283,285,290,305,313,320,325,345,346,355,367,369,373,376,380,384,390,396,411,414,422,442,454,457,461,474,483],connect:[3,6,87,149,167,211,230,275,290,293,302,355,377,388,435,441,451,452,458,474],conput:3,consecut:[3,11,12,39,71,164,189,193,194,215,230,231,376,396,400,449,455,457],consequ:[1,6,317,395,468],conserv:[3,192,199,211,218,219,226,229,233,235,236,240,245,247,249,261,290,293,308,309,313,320,321,325,355,379,380,388,402,463,468],consid:[6,9,70,71,78,87,115,149,150,167,187,189,193,194,200,202,204,208,210,211,215,237,250,272,290,312,313,316,317,320,346,373,384,391,420,421,435,449,450,452,455,456,457,459,462,464,472,474,479],consider:[6,8,233,234,308,309,310,360,463],consist:[3,6,8,9,11,12,40,42,65,69,79,92,104,108,111,112,115,144,147,149,164,176,186,190,195,196,201,214,215,218,220,223,226,233,234,235,246,249,251,252,253,254,255,256,257,259,260,261,262,264,265,266,267,268,269,277,280,285,287,289,290,308,309,310,311,321,345,346,348,354,355,360,362,366,368,374,376,384,387,391,405,406,407,411,421,424,426,438,444,452,454,455,457,458,459,466,474,479],consistent_fe_initi:198,consit:290,constant:[],constitu:[3,6,239,290,322,326,374,421],constitut:[424,426],constrain:[3,6,8,142,143,144,145,147,150,151,152,153,154,156,157,192,201,215,225,226,231,239,243,275,276,288,290,293,303,313,320,353,354,384,459,466,474],constraint:[],construct:[6,8,14,38,54,56,61,64,67,70,72,73,77,118,140,163,212,249,272,289,326,356,360,379,411,435,437,438,457,458,479],constructor:8,consult:420,consum:[1,285,415,479],consumpt:343,contact:[],contact_stiff:[423,425],contain:[0,1,2,3,4,6,8,9,11,12,13,17,18,19,38,40,41,56,63,87,91,116,118,140,144,152,162,163,164,166,170,172,183,184,187,188,189,190,192,193,194,198,200,201,202,203,204,205,206,208,213,215,220,227,231,232,233,234,236,247,261,271,272,275,276,278,280,283,287,290,291,295,305,312,316,317,326,327,330,344,346,354,355,358,359,361,362,363,366,375,376,379,382,383,384,391,392,407,413,417,418,419,420,427,437,438,439,440,441,442,449,450,451,452,454,455,456,457,459,461,463,466,468,471,472,474,479,481,483],content:[12,18,420,470,472],context:[3,6,8,12,17,117,189,209,210,215,275,287,321,352,446,454,461,470,478,479,480],contibut:70,contigu:451,contin:16,continu:[0,2,3,5,6,9,12,13,14,41,71,81,103,104,160,189,192,193,194,199,201,202,203,204,205,206,208,211,212,213,214,215,225,226,227,229,230,231,233,234,235,241,246,247,249,251,252,253,254,255,266,267,268,269,274,276,279,280,290,291,294,304,305,307,314,315,317,323,326,330,344,359,360,366,380,381,398,401,419,420,421,424,426,440,449,452,454,456,457,462,468,471,472,479,481],continuum:[6,7,9,198,317,424,426],contour_integr:198,contract:[59,212,214,249,277,290],contradictori:3,contrain:293,contraint:261,contrari:[227,234],contrast:[1,6,42,55,64,149,214,328,424,426,446,482],contrib:317,contribut:[3,5,6,7,8,9,12,13,17,63,66,68,70,71,74,75,77,80,84,87,88,89,90,91,93,102,104,106,107,108,109,110,112,114,117,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,194,199,200,201,202,203,204,205,206,212,225,233,236,239,240,244,250,267,268,275,276,284,287,290,291,293,319,345,353,355,363,380,381,382,384,391,405,406,411,419,420,466,472,474],contributor:12,control:[3,5,6,7,8,9,11,13,16,27,29,41,87,91,122,140,173,187,188,192,198,199,208,212,213,214,229,230,233,234,249,251,252,253,254,255,277,282,290,296,297,308,309,310,317,321,343,345,357,384,387,419,420,423,425,437,441,449,451,463,469,470],control_typ:198,controlfil:420,convect:91,conveni:[6,12,29,187,190,206,291,348,427,479],convent:[3,8,9,29,175,182,183,189,289,302,329,382,384,479],converg:[3,6,41,88,187,188,190,195,208,211,212,220,223,253,280,282,285,289,293,351,352,353,355,375,376,396,449,461,468],convers:[3,8,140,188,189,199,202,277,345,376,377,378,384,396,400,404,414,452,468,478],convert:[2,3,4,5,6,7,8,12,13,20,21,24,28,32,35,36,59,63,71,91,164,171,187,188,189,206,247,328,331,333,336,339,348,355,361,382,439,441,447,452,454,455,456,461,471,474,478,479,481,483],convex:326,convinc:[7,12],cook:9,cooki:7,cool:[7,154,229,288],cooordin:187,cooper:[5,7],coord123:114,coord1:[3,114,201,204,205],coord2:[3,114,201,204,205],coord3:[3,114,201,204,205],coord:[],coordiat:353,coordin:[1,3,4,6,7,8,11,13,14,15,17,40,41,42,59,61,62,63,66,68,71,74,75,77,81,87,89,90,93,103,104,106,113,114,116,134,140,147,153,159,161,162,164,168,186,187,188,189,190,192,195,200,201,203,204,205,208,209,210,211,212,213,214,215,218,220,221,223,225,228,229,230,231,232,233,234,246,248,249,251,252,254,255,267,270,271,272,275,276,277,287,288,290,292,293,294,299,302,303,304,305,307,315,316,317,324,325,327,328,348,353,354,355,360,361,362,365,383,449,454,455,457,459,462,464,468,474,479,480],coordn:[114,201],coorind:104,copi:[0,3,4,8,11,12,15,17,40,119,188,317,355,373,419,452],copper:447,coproccesor:16,coprocessor:[1,4,7,9,16,17,360,467],coproprocessor:17,copy_arrai:8,copyright:[7,8,275],coral:189,core:[],core_shel:146,coreshel:[6,9,369,376,378],cornel:[6,170,466],corner123i:113,corner123x:113,corner123z:113,corner1i:113,corner1x:113,corner1z:113,corner2i:113,corner2x:113,corner2z:113,corner3i:113,corner3x:113,corner3z:113,corner:[3,6,40,113,188,326,327,348,443,454],cornflowerblu:189,cornsilk:189,corpor:16,corr:375,correct:[3,6,9,11,12,16,17,59,87,88,102,110,116,146,151,158,188,214,227,233,249,250,267,275,277,280,316,322,326,345,355,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,443,445,446,447,454,469,472,474],correction_max_iter:198,correctli:[3,8,9,11,17,71,81,102,103,142,143,145,147,149,150,151,152,153,156,157,160,187,189,195,215,220,223,234,243,249,250,283,290,293,302,304,323,326,355,356,360,378,406,451,452,454,464,478,480],correl:[],correspond:[1,2,6,8,11,12,14,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,40,43,44,45,46,47,48,49,51,53,54,56,70,71,87,96,97,109,112,113,114,115,118,119,127,130,131,132,133,134,136,137,138,140,142,143,151,158,163,170,171,172,173,174,175,176,178,179,181,182,184,187,188,189,193,194,195,201,203,204,205,207,210,212,214,221,223,224,228,233,236,237,245,246,247,249,251,252,253,254,255,256,261,264,266,267,269,272,273,277,282,290,292,293,308,310,312,321,322,323,325,326,327,329,331,332,333,334,335,336,339,341,346,350,352,354,355,361,362,364,367,368,369,370,371,372,373,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,407,408,411,412,413,414,416,417,419,420,421,422,427,428,437,438,439,440,441,443,445,446,447,449,451,452,454,455,457,467,468,469,471,472,474,479],correspondingli:[405,406,463],cosin:[],cosineshift:27,cosmo:[227,232],cossq:[],cost:[1,6,10,11,12,17,39,41,71,109,118,141,163,188,189,201,204,205,208,209,210,222,249,282,317,345,346,358,376,396,400,411,437,451,463],costheta0:[437,439,441],costheta:417,costli:[11,88,227,356],couett:4,coul:[],could:[2,3,6,9,11,12,17,33,41,50,59,66,71,75,87,90,93,104,106,109,112,114,144,154,159,161,177,187,188,189,193,194,199,201,202,204,208,214,223,232,279,280,281,285,288,290,292,305,306,312,316,317,318,322,326,328,330,337,342,344,351,353,356,360,363,386,390,391,419,420,450,451,452,454,456,458,461,462,470,474,479,480],coulomb:[3,5,6,7,8,9,10,12,14,15,18,88,107,108,141,165,169,281,283,318,345,346,353,360,367,369,370,371,372,375,376,377,378,379,384,388,389,391,396,400,404,411,414,419,420,422,436,441,442,446,459,466,472,474,478],coulommb:6,cound:3,count:[1,3,6,8,10,11,12,41,63,68,77,91,114,116,117,152,162,168,195,196,199,201,203,204,205,207,208,215,220,222,225,231,249,261,276,293,308,309,326,346,353,354,355,357,360,386,390,411,472,479],counter:[323,449,460,462,468],counterbal:229,counterpart:[187,290,449],counterproduct:18,coupl:[],courant:295,cours:[3,8,126,128,158,187,193,194,226,289,302,316,322,324,325,327,328,346,405,428,451,454,467,474,479,481],coval:[6,29,384,407,474],covari:227,cover:[6,71,184,189,198,236,384,394,443],coverag:[71,204],cpc:232,cpp:[1,3,6,8,9,11,12,13,87,187,193,194,223,293],cpu:[1,3,4,9,10,12,14,15,16,17,18,63,71,189,192,218,234,318,343,346,360,373,436,449,467,468,471,472],cpuremain:472,cr2:163,cr3:163,crack:[4,356],crada:[5,7],crai:[5,7,13,18,187],crash:[3,356,474],craympi:360,creat:[],create_atom:[],create_bond:[],create_box:[],create_elementset:198,create_faceset:198,create_nodeset:198,createatom:[],creation:[],crimson:189,critchlei:275,criteria:[3,116,165,188,189,209,210,211,244,353,416,443,456,459,479],criterion:[41,121,162,164,167,199,208,211,225,261,282,295,323,328,353,355,375,384,388,459,468,469],criterioni:468,critic:[48,49,247,312,317,353],cross:[3,12,22,71,89,143,172,187,188,200,204,210,214,246,248,267,290,298,302,304,313,320,332,348,355,371,380,381,382,389,390,391,396,398,400,417,422,424,426,439,441,454,458,464,481],crossov:1,crossterm:454,crozier:[0,7,13],crucial:280,crystal:[4,6,13,73,271,272,315,356,458,472,474],crystallin:[6,272,348,440,474],crystallis:312,crystallogr:[118,163],crystallograph:[348,472],crystallographi:[118,163,348],cs1:163,cs_chunk:6,cs_im:[40,454],cs_re:[40,454],csanyi:[140,418,427],cscl:407,csequ:6,csh:[11,12,373],cshrc:[11,12],csic:[383,437,439,441],csinfo:6,csisi:[383,437,439,441],csld:[],cst:382,cstherm:6,cstyle:451,csvr:[],ctcm:[361,382],ctemp_cor:218,cterm:294,ctr:9,ctype:11,cu1:163,cu2:163,cu3au:407,cube:[6,41,162,167,208,218,326,348,474],cubic:[],cuda:[],cuda_arch:15,cuda_get:15,cuda_hom:15,cuda_prec:15,cufft:14,cuh:366,cummul:[3,6,206,209,210,211,213,222,227,233,235,305,308,309,310,311,313,320,390,472],cumul:[6,199,201,203,204,205,219,225,233,247,249,253,261,290,291,355],curli:2,current:[0,1,3,5,6,7,8,9,11,12,13,15,16,17,18,40,41,42,59,61,63,71,73,81,87,102,108,116,117,130,141,144,152,160,162,165,168,187,188,189,190,193,194,198,199,201,204,205,206,208,209,210,211,212,213,214,215,219,220,223,225,227,230,231,233,239,246,249,250,254,255,261,266,267,269,275,281,282,284,287,288,289,290,293,294,295,296,297,298,299,301,303,304,305,308,309,310,316,317,320,321,322,323,324,325,327,328,330,343,344,345,346,349,350,352,353,354,355,360,366,373,375,379,382,384,385,388,392,395,405,406,407,408,409,411,417,419,420,423,424,425,426,428,439,441,442,444,449,450,451,452,454,455,456,457,458,460,461,462,464,466,468,469,471,472,479,480,481,482,483],curv:[6,164,225,272],curvatur:[387,421,447],custom:[],cut0:452,cut1:463,cut2:463,cut:[],cuthi:[271,283],cutinn:[368,405,406],cutlo:[271,283],cutmax:417,cutoff1:[372,379,396,400,404,414,422],cutoff2:[367,369,370,372,378,379,396,400,404,414,422],cutoff:[3,6,10,16,18,39,45,46,54,55,61,70,72,73,77,87,108,115,116,140,162,165,167,210,211,216,271,280,281,283,285,287,290,305,318,322,326,328,345,346,353,356,357,358,360,361,362,363,364,365,366,367,368,369,370,371,372,374,376,377,378,379,380,381,382,383,384,385,386,387,389,390,391,392,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,419,420,421,422,427,428,429,430,431,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,452,456,459,463,474],cutoffa:383,cutoffc:383,cuu3:382,cval:163,cvd:312,cvel:294,cvff:[],cwiggl:[3,246,322,325,327,479],cyan:[2,188,189],cycl:[3,225,247,249,250,253],cyclic:[3,184],cygwin:12,cylind:[3,4,188,231,276,323,326,457],cylindr:[6,231,302,323],cypress:360,cyrot:366,cyrstal:272,d3q15:236,d3q19:236,d_double_doubl:15,d_e:317,d_flag2:279,d_flag:279,d_name:[113,187,279,307,464],d_single_doubl:15,d_single_singl:15,d_sx:279,d_sy:279,d_sz:279,daan:315,dai:12,daili:12,daivi:267,damag:[],dammak:285,damp:[3,6,192,197,233,234,235,240,249,250,253,277,280,285,290,308,309,321,323,324,352,353,355,367,369,371,376,379,384,388,396,404,414,422,436,442,468,474],damp_com:234,damp_drud:234,dampen:[290,474],dampflag:[323,388],dan:17,danger:[3,12,225,328,380,472],dangl:167,daniel:9,darden:[346,379],darkblu:189,darkcyan:189,darken:188,darkgoldenrod:189,darkgrai:189,darkgreen:189,darkkhaki:189,darkmagenta:189,darkolivegreen:189,darkorang:189,darkorchid:189,darkr:189,darksalmon:189,darkseagreen:189,darkslateblu:189,darkslategrai:189,darkturquois:189,darkviolet:189,dasgupta:281,dash:[388,471],dat:[6,91,184,198,450],data2xmovi:[],data:[],data_atom:8,data_atom_hybrid:8,data_bodi:8,data_vel:8,data_vel_hybrid:8,databas:[],datafil:[12,13,291],dataset:291,datatyp:3,date:[0,6,12,13,419,420,479],datom1:115,datom2:115,datom3:115,datom4:115,datum:[3,6,42,65,68,69,79,92,108,115,187,202],davi:322,david:[9,19,345,346,439,441],daw:[382,417],dbg:14,dcd:[3,6,7,187,188,189,190,273,455,459],ddim:186,deactiv:404,dealt:232,debug:[6,7,11,12,13,14,17,118,122,163,164,273,278,343,345,360,392,411,444,452,453,456,461,464,471,479],deby:[],decai:[376,447],decid:[3,6,12,16,71,246,279,290,318,469],decipher:348,declin:305,decod:188,decompos:[87,427],decomposit:[3,5,7,18,62,198,273],decoupl:[6,474],decreas:[3,187,195,196,211,214,220,223,233,316,345],decrement:294,deepli:342,deeppink:189,deepskyblu:189,def:[12,13,452],defaul:61,defect:[6,70,162],defgrad:2,defin:[2,3,5,6,7,8,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,170,171,172,173,174,175,176,178,179,181,182,183,184,185,186,187,188,189,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,218,219,220,223,224,225,228,231,232,233,234,235,236,244,246,248,249,250,251,252,253,254,255,257,258,259,262,264,265,266,267,268,269,271,272,273,275,276,277,279,281,283,288,290,291,292,293,295,299,303,305,307,308,309,310,311,313,314,315,317,319,320,322,323,324,325,326,327,328,330,331,332,333,334,335,336,339,340,341,343,345,346,348,350,352,353,354,355,356,357,358,359,360,362,363,364,365,367,368,369,370,371,372,373,374,376,377,379,380,381,383,384,386,387,388,389,390,391,392,394,396,397,398,399,400,401,402,403,404,405,406,410,411,412,413,414,416,417,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,451,452,454,455,457,458,459,460,463,464,465,466,468,469,471,472,474,475,476,477,478,479,480],definit:[2,3,6,8,12,13,78,80,116,140,189,201,202,203,204,205,206,214,231,253,291,307,319,322,325,327,329,340,343,354,363,366,374,384,394,417,424,426,427,443,452,454,456,463,465,478,479],defint:472,deform:[],deg2theta:163,deg:474,degener:[3,275],degrad:[8,18,272,346,463],degre:[3,6,8,20,21,24,28,29,32,35,36,38,65,79,92,94,96,97,99,101,102,112,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,163,164,170,171,174,175,182,184,186,188,201,211,218,225,227,228,233,234,239,249,250,253,254,255,266,267,269,273,275,289,290,293,308,309,310,315,331,333,336,339,341,353,379,382,390,464,472,474,480],degress:[144,201],del:468,delai:[3,6,12,356,381,472],deleg:391,delet:[2,3,7,8,12,54,57,60,63,162,167,168,192,201,202,203,204,205,206,209,211,222,225,249,291,308,309,328,330,344,354,356,359,411,454,455,457,465,466,471,475,477,479,480],delete_atom:[],delete_bond:[],delete_el:198,deli:186,delimit:[452,479],deloc:[250,384],delr:407,delt_lo:468,delta:[],delta_1:366,delta_3:366,delta_7:366,delta_conf:3,delta_ij:[407,417],delta_mu:[3,199],delta_pi:366,delta_r:417,delta_sigma:366,delx:186,delz:186,demand:285,demo:11,demon:270,demonstr:[280,407],den:276,dendrim:390,denniston:[9,236,238,239,240,272],denomin:[7,169],denot:[118,218,234,272,283,285,376,389,391,420,424,426],dens:[71,211,384],densiti:[3,6,7,9,18,40,41,59,100,116,126,140,150,162,164,193,194,198,201,204,205,208,214,223,236,239,242,243,272,276,277,281,317,322,348,350,354,361,366,382,407,408,409,417,421,430,432,433,434,454,463,464,472,478],density_continu:426,density_summ:426,depart:[0,7],departur:[247,280],depend:[1,2,3,6,8,9,11,12,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,44,45,46,47,48,49,51,53,54,56,61,63,65,68,69,70,71,79,92,108,109,112,113,114,115,119,140,142,147,151,152,158,164,165,170,171,172,173,174,175,176,178,179,181,182,183,184,186,187,188,189,192,193,194,195,196,199,201,203,204,206,207,208,210,212,220,221,224,227,228,229,231,233,234,236,238,239,246,249,251,252,253,254,255,256,264,266,267,269,271,282,285,287,290,292,293,299,305,308,309,310,312,314,316,317,319,321,322,325,326,327,328,330,331,332,333,334,335,336,339,341,346,348,353,354,356,357,358,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,407,408,410,412,413,414,416,417,419,420,421,422,427,428,436,437,438,439,440,441,442,443,445,446,447,449,451,454,456,457,460,464,466,468,471,472,473,479,480],dependend:6,depflag:12,dephas:[449,468],depos:215,deposit:[],deprec:281,depth:[51,143,188,317,387,421],dequidt:9,der:[87,107,374,375,404,419,420,446,474],deriv:[6,7,8,38,56,63,87,140,158,184,202,212,214,225,233,246,249,251,252,253,254,255,271,277,281,285,314,315,317,322,323,326,352,354,362,366,374,379,384,385,389,398,402,403,407,419,420,436,438,446,474],derjagin:446,derlet:271,descend:189,descent:[7,352],descib:[40,281],describ:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,38,39,40,41,42,56,62,63,68,70,71,73,88,110,113,116,118,130,140,141,143,144,148,149,152,155,157,158,162,163,164,166,167,176,181,184,187,192,193,194,201,202,203,204,205,206,208,211,212,213,214,215,217,218,226,227,230,231,232,233,234,235,236,238,239,240,244,248,249,250,253,260,268,271,273,278,279,280,281,282,283,290,294,302,305,306,307,308,309,310,311,312,313,314,315,320,322,323,325,330,345,346,348,351,352,353,354,355,359,362,363,365,367,368,369,371,372,373,374,375,376,379,382,384,385,387,388,389,391,396,397,398,399,400,401,402,403,404,405,406,407,410,416,417,418,419,420,421,422,427,428,435,436,437,438,439,440,441,442,445,446,447,449,451,452,454,455,457,458,464,467,468,471,479,480,481],descript:[],descriptor:[140,187,392],deserno:346,design:[0,3,6,7,8,11,13,14,15,17,118,146,149,163,198,211,217,218,249,250,271,272,291,312,317,363,364,365,368,371,376,378,384,404,405,406,408,409,417,420,438,463],desir:[2,3,6,7,11,12,14,15,16,18,33,40,50,59,71,88,91,112,117,141,146,164,177,186,199,201,206,212,214,223,225,226,233,234,235,239,249,267,275,276,277,278,281,285,290,293,305,308,309,310,311,316,323,337,342,345,346,348,351,353,354,355,380,382,390,405,406,437,439,441,450,451,452,454,458,463,468,469,471,472,479,480,481],desk:7,desktop:[4,6,7,10,12,17,188],despit:474,destabil:366,destre:339,destroi:[11,39,209,210],detail:[1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,22,37,40,41,42,55,63,66,67,68,71,75,78,90,91,93,102,104,106,107,109,111,112,114,117,119,140,141,142,143,144,147,157,158,159,161,164,165,168,169,172,183,187,188,189,192,193,194,198,201,202,203,204,206,208,210,211,212,213,214,215,223,225,226,227,228,230,231,233,235,236,240,246,247,248,249,250,251,252,253,254,255,259,261,266,267,268,269,272,275,276,277,279,280,282,283,284,290,293,305,308,309,310,311,312,313,315,316,317,318,319,320,321,328,330,332,340,345,346,349,353,354,356,357,360,361,362,363,365,366,368,370,371,372,373,374,375,376,379,380,384,385,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,410,411,416,419,420,421,427,428,436,443,445,446,452,454,455,456,457,459,460,463,464,466,469,472,479,480,483],detect:[2,3,12,61,63,86,224,276,316,355,375,390,395,449,451,454,465,468,479],determ:360,determin:[1,3,6,8,12,15,39,40,42,51,57,58,59,61,62,68,71,87,102,107,109,112,118,119,127,141,152,153,162,163,164,186,187,188,189,190,191,195,196,197,200,201,202,203,204,205,206,207,208,212,214,215,218,220,225,228,229,231,233,234,239,244,246,247,249,254,255,266,267,269,271,273,277,280,287,288,289,290,291,292,295,297,299,305,308,309,310,312,318,319,322,323,324,325,326,327,328,340,345,346,348,354,356,357,360,362,363,370,375,379,381,382,386,388,391,392,400,407,411,420,421,435,438,442,446,451,454,455,457,459,461,464,468,470,471,478,479,480],detil:108,devan:[9,422],devanathan:441,develop:[0,3,5,6,7,8,9,11,12,14,15,16,17,18,19,42,230,253,275,280,281,284,362,366,384,409,456],devemi:9,deviat:[247,253,271,386],deviator:9,devic:[1,3,12,15,17,230,360],device_typ:360,devin:[282,375],devis:409,dfactor:188,dff:474,dfft_fftw2:12,dfft_fftw3:12,dfft_fftw:12,dfft_none:12,dfft_singl:[3,12,346],dfft_xxx:12,dfftw:12,dfftw_size:12,dft:[9,284],dhi:[59,186,214,276],dhug:[247,280],dhugoniot:[247,280],dia:407,diagnost:[],diagon:[3,6,83,140,141,212,249,277,290,320,424,426],diagonalstyl:427,diagram:[41,118,163,183,208,273],diallo:390,diam:[188,189,276,354],diamet:[3,6,40,113,164,187,188,189,193,194,233,276,290,305,321,323,354,374,387,388,394,398,421,443,446,454,455,464],diamond:[348,384,407],diamter:[40,276],dick:6,dicsuss:246,dictat:[199,247],did:[3,12,353,380,381,382,388,411,439,441,462],didn:3,die:18,diel:[],dielectr:[],diff:[3,6,12,160,319,345],differ:[1,2,3,4,6,7,8,9,10,11,12,14,15,16,17,18,22,37,38,39,41,42,54,55,56,61,64,68,70,71,87,94,96,97,120,140,142,143,144,145,147,150,151,152,153,154,156,157,158,164,165,167,172,183,184,186,187,188,189,192,194,197,199,201,203,208,209,210,211,212,213,214,218,224,225,226,227,228,229,230,233,234,236,246,249,250,251,252,254,255,257,259,262,264,265,266,269,271,273,275,277,280,281,282,285,288,290,293,294,302,303,305,308,309,310,313,314,315,317,320,321,322,323,326,330,331,340,342,344,345,346,348,349,351,352,354,355,357,358,359,360,361,362,366,370,371,373,374,375,380,382,384,387,388,389,391,394,396,397,399,400,407,408,409,410,411,413,417,419,420,421,422,423,424,426,427,428,436,437,438,439,441,443,446,447,448,449,451,452,454,456,457,458,459,462,463,464,466,468,469,471,472,474,478,479,480,481],differenti:[1,3,6,29,184,345,376,417,440],difficult:[212,273,360,390,463],difficulti:[293,419],diffract:[],diffus:[],digit:[2,3,189,330],dih_table1:184,dih_table2:184,dihedr:[],dihedral_coeff:[],dihedral_cosineshift:27,dihedral_styl:[],dihedralcoeff:3,dihedraltyp:210,dihydrid:384,dij:293,dilat:[],dim1:3,dim2:3,dim:[3,59,71,142,145,146,147,150,151,152,153,154,156,164,186,204,214,231,323,348,407,457,478,479,480],dimdim:479,dimems:272,dimens:[],dimension:[3,39,112,118,140,142,144,145,146,147,150,151,152,153,154,156,163,185,201,204,248,272,317,348,351,355,417,454,464],dimensionless:[105,121,122,124,127,129,131,136,140,317,346,427,446],dimentionless:135,dimer:[6,290,407],dimgrai:189,dimstr:[41,208],dinola:[277,308],dintel_offload_noaffin:16,dipol:[],dipolar:[4,29,40,187,307,474],dir1:465,dir2:465,dir:[1,3,4,8,11,12,247,271,280,304,417,419,420,452,465,479],dirac:140,direc:417,direct:[],directli:[3,6,8,9,11,12,87,113,140,187,188,195,220,227,231,236,272,291,309,321,323,324,325,326,348,352,360,361,362,367,369,370,376,379,382,384,396,400,411,414,422,435,452,464,465,466,472,479],directoi:14,directori:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,60,190,213,232,275,281,284,301,305,314,315,355,359,361,362,366,373,375,376,382,383,385,392,393,404,407,408,409,413,417,418,419,420,427,437,439,440,441,452,454,455,456,465,479],disabl:[3,12,16,317,395,452,467],disadvantag:[6,208],disallow:[214,249],disappear:456,discard:[2,3,41,71,204,208,318,326,451,456,457],discontinu:[9,184,353,402],discourag:407,discov:[13,318],discret:[6,8,40,42,188,189,233,236],discuss:[],disk:[6,84,85,157,185,215,225,276,452],disloc:70,disord:[39,70],disp:[],dispar:421,disperion:[379,400],dispers:[3,6,7,9,162,272,345,346,370,379,400,405,411,420,438],displac:[],displace_atom:[],displace_box:59,displacemet:457,displai:[11,13,22,37,44,55,172,183,187,188,332,340,373,436],dispters:3,dissip:[6,226,233,272,314,315,368,380,388,405,406,436],dissolut:209,dist:[6,69,91,108,117,187,273,289,381,435,449,480],distanc:[3,6,7,9,12,20,21,29,39,43,45,46,47,48,49,51,53,54,55,56,58,59,61,63,64,66,69,71,72,73,74,75,76,77,81,86,89,90,93,103,104,105,106,108,114,115,116,117,118,120,134,140,153,159,162,164,165,166,167,171,186,187,188,189,197,201,204,205,209,210,211,212,214,215,216,219,225,231,236,246,247,248,249,253,261,271,272,276,280,281,288,289,290,293,294,298,302,303,304,305,312,313,315,316,317,320,322,323,324,325,326,327,331,345,346,348,351,353,355,356,357,360,363,364,365,366,367,368,369,370,371,372,374,376,377,378,379,380,381,382,383,384,386,387,388,389,390,394,395,396,397,398,399,400,401,402,403,404,405,406,407,410,411,412,413,414,415,416,417,419,420,421,422,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,449,452,454,457,463,464,468,472,474,478,480],distinct:[6,218,287,345,421],distinguish:[6,86,140,239,384],distort:361,distrbut:361,distribut:[],distro:[111,373,416,417],ditto:[8,11,12,14,15,16,17,18,115,210,452],div:8,divd:117,diverg:[3,12,39,290,315,456,474,481],divid:[3,6,16,41,91,112,117,126,128,141,161,162,172,183,189,201,202,203,208,214,271,313,320,325,345,353,355,385,420,463,471,479],divis:[6,236,366,394,404,451,454,472,479],dl_poli:7,dlambda:158,dlammps_async_imd:230,dlammps_bigbig:[12,39],dlammps_ffmpeg:[3,12,188],dlammps_gzip:[3,12,187,188,316,454,455,459],dlammps_jpeg:[3,12,188],dlammps_longlong_to_long:12,dlammps_memalign:[12,16],dlammps_png:[3,12,188],dlammps_smallbig:12,dlammps_smallsmal:12,dlammps_xdr:[12,187],dlen:464,dlmp_intel_offload:[12,16],dlo:[59,186,214,276],dlvo:[7,374,446],dm_lb:236,dmax:[305,351],dna:7,doc:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,22,37,40,42,55,57,59,63,66,68,75,87,90,93,102,104,105,106,107,109,111,112,114,117,119,141,143,144,157,159,161,164,165,166,172,183,187,188,189,190,192,193,194,199,200,201,202,203,204,205,206,215,225,233,234,244,249,250,254,255,259,266,267,268,269,276,279,290,302,305,308,309,310,319,323,326,328,330,332,340,344,353,354,355,360,361,362,365,373,375,376,382,383,385,390,391,393,394,407,408,409,411,413,416,417,418,427,436,437,439,441,443,452,454,455,456,457,459,462,463,464,471,472,479,480,481,482],docuement:421,dodgerblu:189,doe:[0,1,2,3,5,6,7,8,9,11,12,14,15,16,17,18,29,33,38,39,41,50,54,56,59,62,63,67,70,71,87,88,91,104,110,117,118,143,144,147,152,154,158,163,164,165,166,168,170,172,177,183,184,186,187,188,189,192,198,199,201,204,207,208,210,211,212,214,218,220,222,225,226,229,231,233,234,236,239,245,249,250,251,252,254,255,266,267,268,269,277,278,279,283,285,288,290,305,308,310,312,313,317,320,321,322,325,326,327,328,333,334,336,337,339,344,345,346,347,348,354,355,356,361,362,363,364,365,366,368,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,391,392,393,394,395,398,399,401,402,403,405,406,407,408,409,411,417,418,419,420,421,423,424,425,426,427,428,429,430,431,432,433,434,435,437,438,439,440,441,442,443,445,446,447,449,450,451,452,454,455,456,457,458,461,462,464,465,466,467,468,471,472,474,479,483],doegenomestolif:7,doesn:[3,7,8,12,164,187,199,204,205,302,354,356,360,362,375,383,393,419,420,437,439,440,441,454,456],dof:[3,8,112,143,144,157,201,290,480],dof_per_atom:[144,201],dof_per_chunk:[144,201],doff:[354,454],doi:[6,213],domain:[3,6,7,12,13,18,39,41,42,58,61,62,71,118,153,163,166,186,188,189,192,199,208,212,214,215,229,232,236,249,250,273,285,290,317,322,323,345,346,355,360,381,411,449,451,454,458,471],domin:[1,384,468],don:[0,8,11,12,13,116,167,195,220,234,279,326,407,452,454],donadio:309,done:[1,3,6,7,8,12,14,15,16,17,18,19,38,39,41,56,59,62,71,158,161,164,167,184,188,189,198,199,201,203,204,205,206,208,209,210,211,212,214,215,223,225,230,231,233,234,241,249,254,255,266,267,269,270,272,273,274,279,287,290,291,293,305,308,309,310,312,314,315,328,330,344,345,346,353,355,356,359,360,362,370,382,391,392,393,400,406,407,411,419,435,438,443,449,450,451,452,455,458,459,462,472,474,479,480],donor:390,dot:[141,160,195,220,228,248],doti:[366,417],doubl:[1,2,3,6,8,9,11,12,14,15,16,17,39,87,214,223,278,326,330,344,346,359,360,366,385,389,419,420,450,454,458,462,467,479,480],dover:198,down:[3,6,7,8,11,39,71,212,233,305,321,360,384,411,453],downhil:[351,352],download:[5,7,8,9,11,12,13,17,230,392,418],downsid:6,downward:287,dozen:[8,12,107,192,419,420],dpack_arrai:12,dpack_memcpi:12,dpack_point:12,dpd:[],dpde:242,dproduct:363,dr_ewald:[118,291],drag:[],dragforc:236,drai:[247,280],drain:[229,321,353],dramat:[59,186,209,210,211,212,214,249,305,308,309,346,360,411,451],drautz:366,draw:188,drawback:279,drawn:[187,188,189,226,449],drayleigh:[247,280],dreid:[],drfourth:105,drho:[113,361,382],drift:[6,103,105,226,227,233,234,245,288,305,463,471,474],drive:[11,12,196,212,214,228,249,271,277,290,324,355],driven:[6,176],driver:[6,12,14,15,192,223,230],drop:[3,189,380],droplet:391,drsquar:105,drude:[],dry:222,dsecriptor:392,dsf:[],dsmc:[],dstyle:276,dt_collis:236,dt_lb:236,dt_md:236,dt_srd:305,dtilt:[59,214],dtneb:468,dtqm:280,dtype:[115,210],dual:[17,305,360],dudarev:163,due:[1,3,6,9,10,12,16,17,19,40,54,57,58,61,66,70,71,74,75,81,86,88,89,90,93,102,103,104,105,106,110,116,118,126,140,141,142,143,145,147,150,151,152,153,154,156,157,159,163,164,167,168,187,188,192,195,196,203,207,209,210,211,212,213,214,215,220,221,222,223,226,227,230,231,233,234,235,236,239,240,241,245,246,247,248,249,253,261,271,274,276,288,289,290,292,302,304,305,306,308,309,310,311,312,314,315,317,321,322,324,325,326,328,346,351,353,355,356,357,377,380,382,386,387,391,405,406,411,417,419,421,422,435,438,439,441,444,446,447,449,451,454,455,456,463,468,471,472,474,479,480],duffi:317,duin:[9,281,286,419,420],duke:346,dummi:[12,29,440],dump1:459,dump2:459,dump2vtk_tri:134,dump:[],dump_atom:8,dump_custom:8,dump_modifi:[],dumpcustom:8,dumptimestep:459,dunbrack:[6,20,170,371,466],dunweg:[233,235],duplic:[2,3,14,15,16,17,18,19,41,42,165,208,227,271,454,478],dupont:[5,7,13],durat:[37,55,142,143,145,146,147,149,150,151,152,153,156,157,183,189,201,225,285,317,340,388,436],dure:[2,3,6,8,9,12,16,17,38,39,41,56,71,87,126,128,146,165,168,184,187,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,216,219,220,221,222,223,224,225,226,227,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,245,246,248,249,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,298,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,346,353,355,359,360,380,404,411,420,438,449,450,452,454,457,459,461,462,464,466,468,469,472,479,482,483],dvector:8,dvlo:446,dvx:6,dx_lb:236,dy3:163,dyamic:12,dyanam:6,dyanmic:468,dynam:[],dynamo:[5,361,382,407],dyne:478,dyre:401,dysam:457,e28637:29,e_1:366,e_2:366,e_b:385,e_e:384,e_hbond:390,e_i:[6,366,385],e_j:[6,366],e_k:[366,384],e_kl:6,e_lj:[362,379],e_n:[366,384],e_nn:384,e_pr:384,e_rebo:362,e_tors:362,eaa:331,eaat:171,each:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,57,59,61,62,63,64,66,67,68,70,71,72,73,74,75,76,77,78,80,81,83,85,87,89,90,93,94,95,96,97,98,99,100,101,102,103,104,105,106,109,110,111,112,113,114,115,116,117,118,119,120,134,140,141,143,144,145,146,147,148,151,152,153,154,156,157,158,159,160,161,162,163,164,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,192,193,194,195,196,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,225,226,227,228,229,230,231,232,233,234,235,236,237,239,240,241,242,243,245,246,247,248,249,251,252,253,254,255,256,257,258,259,261,262,263,264,265,266,267,268,269,271,272,273,274,275,276,277,278,279,281,282,283,285,287,290,291,292,293,294,298,299,301,302,303,304,305,306,307,308,309,310,312,315,316,317,318,319,320,321,322,323,325,326,327,328,330,331,333,334,335,336,337,339,340,341,344,345,346,348,352,353,354,355,356,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,384,385,386,387,388,389,390,391,394,395,396,397,398,399,400,401,402,403,404,405,406,407,410,411,412,413,414,416,417,419,420,421,422,423,427,428,429,430,431,432,433,434,435,436,437,438,441,442,443,444,445,446,447,448,449,451,452,454,455,456,457,458,459,461,462,463,464,466,468,469,471,472,474,478,479,480,481,483],eacn:[41,208],eam0d:272,eam3d:272,eam:[],eam_databas:13,eam_gener:13,eangl:472,earli:[41,201,203,204,205,206,208,284,291],earlier:[7,8,12,59,189,355,388,407,411,468],earliest:468,earth:384,easi:[6,7,8,9,11,13,87,141,187,193,194,195,196,204,207,220,228,229,231,233,234,292,299,308,309,310,322,325,327,354,454,457,462,464,480],easier:[8,9,13,16,187,188,272],easili:[8,11,188,189,321,355,451,461,470,479],eastwood:[345,346],eat:171,eatom:328,eaxmpl:6,eba:21,ebb13:171,ebb:21,ebond:[218,234,471,472],ebt:171,ec_ii:407,ec_ij:407,ec_jj:407,echo:[],eco:[419,420],ecoa:[419,420],ecoul:[107,218,234,419,420,472],ecp:[384,454],edg:[2,3,6,41,59,71,118,162,163,166,167,188,197,204,231,292,322,325,326,327,328,348,454,457,464],edge_histo:162,edge_threshold:162,edih:472,edim:313,edip:[],edit:[3,8,12,13,14,15,16,17,18,19,474],editor:13,edu:[7,9,11,13,382,405,416,419,420],edward:[9,17],eebt:171,eff:[],effect:[1,2,3,6,8,9,11,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,66,71,74,75,81,89,90,93,103,104,105,106,109,112,141,142,146,151,152,159,162,168,170,171,173,174,175,176,178,179,181,182,183,184,186,187,188,189,193,194,195,198,202,205,206,207,209,210,211,212,214,215,221,224,226,227,228,229,230,231,233,234,248,249,251,252,253,254,255,256,264,266,267,269,270,271,273,276,277,279,280,281,282,285,289,290,292,293,304,305,308,309,310,312,313,315,317,320,321,322,323,324,326,327,328,331,333,334,335,336,339,341,345,346,348,352,353,354,355,356,361,362,364,366,367,368,369,370,371,372,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,411,412,413,414,416,421,422,423,425,428,436,437,438,439,440,441,443,445,446,447,449,451,452,456,457,459,463,464,466,472,478,479,481],efffect:458,efficaci:39,effici:[0,1,3,6,7,8,10,12,15,17,18,39,58,61,67,112,187,188,189,212,214,218,227,249,273,275,285,290,293,305,345,346,351,356,360,366,374,376,391,396,400,421,461,483],effort:[5,7,455],efftemp:[96,97,150],efi:[419,420],efield:[],eflux:229,eggebrecht:376,ehb:[419,420],eigensolv:3,eigenvalu:[272,273,345],eigtol:3,eik:158,eim:[],eimp:472,einstein:[285,315],either:[1,2,3,4,6,8,9,11,12,14,15,16,17,22,33,41,44,50,59,63,71,107,113,116,118,140,141,144,146,147,163,164,167,172,177,184,187,188,189,192,200,202,203,205,206,208,211,212,213,214,215,225,231,232,236,240,246,247,249,250,253,267,271,287,290,292,293,294,302,305,312,319,323,326,330,332,343,345,346,348,352,353,357,360,366,368,374,382,391,392,394,405,406,407,411,415,417,439,441,443,449,452,454,456,457,458,461,463,466,469,471,479],ejtehadi:[374,387,421],elaplong:[193,194,231,457,472,479],elaps:[3,193,194,195,196,207,214,220,228,229,231,233,234,246,276,292,299,308,309,310,322,323,325,327,428,449,457,459,460,464,468,472,479],elast:[],elba:29,electr:[6,192,198,220,234,345,346,385,419,420,447,474,478],electrolyt:[9,446],electron:[3,6,7,9,13,40,96,97,113,118,148,150,155,192,198,217,218,234,235,250,260,268,283,311,317,352,354,361,363,375,379,382,384,385,407,417,418,441,447,454,474,478],electron_integr:198,electron_temperatur:198,electron_unit:384,electroneg:[6,281,282,283,375,385],electronic_dens:3,electronic_specific_heat:3,electronic_thermal_conduct:3,electrostat:[6,9,16,18,199,225,281,283,284,318,345,346,374,379,384,396,404,406,420,446],eleftheri:290,elem1:[385,407,427],elem2:[385,407,427],element1:[287,361,382],element2:[287,361,382],element:[3,6,7,8,13,63,81,89,103,105,112,117,119,134,140,141,142,143,144,145,146,147,151,152,153,154,156,157,160,187,188,189,190,192,198,202,203,206,272,287,312,319,361,362,366,375,382,383,384,385,391,392,393,407,408,409,413,417,418,419,420,427,437,439,440,441,474,479,482],elementn:[361,382],elementset:198,elev:468,elif:[140,330],elig:[3,199,209,210,222,225,390],elimin:[3,6,71,226,233,234,290,293,314,315,449],elj:379,ellad:9,elliot:9,elliott:9,ellips:[4,6,9,82,143,185],ellipsoid:[3,4,6,7,13,40,42,82,113,130,143,164,185,187,233,251,254,257,258,266,290,305,350,353,387,406,421,436,454,464,481],ellipsoidflag:454,elong:[218,234,472],elp:[419,420],els:[3,7,8,12,71,107,116,117,119,188,200,201,202,203,204,205,206,225,249,290,305,317,318,319,328,330,345,391,453,465,479,482],elsewher:[8,246,305,407,418,419,420,466,472,479],elt:407,emac:[],email:[0,3,5,7,8,11,385],emb:[3,9,326],emb_lin_neg:407,embed:[3,5,7,11,12,13,29,88,162,317,361,382,385,404,407,408,409,417,436,444,452],embt:171,emi:[7,9],emol:[419,420,472],emphas:388,empir:[198,309,362,384],emploi:[9,272,285,440],empti:[3,57,71,166,290,345,356,395,454,465,466,479],enabl:[3,6,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,43,45,46,47,48,49,50,51,53,54,55,56,60,61,62,64,67,78,80,83,87,96,97,98,99,100,101,105,109,111,112,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,146,148,150,151,155,156,158,162,170,171,173,174,175,176,177,178,179,181,182,183,184,187,189,190,192,193,194,195,196,197,199,205,207,209,210,211,213,215,220,221,222,223,224,225,226,227,228,230,231,232,233,234,235,236,237,238,239,240,242,243,245,247,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,271,272,273,275,276,280,281,282,283,284,285,286,287,289,290,292,293,294,295,296,297,298,299,301,302,304,305,308,310,311,312,313,314,315,317,318,320,321,322,323,324,326,329,331,333,334,335,336,337,339,340,341,346,353,355,359,360,361,362,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,452,455,456,461,463,479,483],enclos:[2,6,12,166,187,278,330,407,450,452,462,479],encod:[13,39,42,187,188,189,279,391],encompass:[3,6,40,57,59,116,165,301,319,436,457],encount:[3,8,12,59,203,359,459,479],encourag:[7,8,284,303],end12i:113,end12x:113,end12z:113,end1i:113,end1x:113,end1z:113,end2i:113,end2x:113,end2z:113,end:[1,2,3,5,6,8,11,12,15,16,17,18,19,38,40,41,57,59,71,113,167,168,171,186,187,188,189,190,193,194,202,203,205,206,211,214,218,226,231,233,234,235,248,249,250,261,277,289,290,294,305,308,309,310,311,313,316,317,320,324,327,328,344,345,354,355,359,360,380,382,387,421,424,426,427,428,442,444,449,452,454,455,456,457,459,461,462,466,470,472,474,479,483],end_of_step:8,endbondtors:[3,171,177,454],endif:8,energet:[211,362,420],energi:[0,1,2,3,4,5,6,7,8,9,12,13,20,21,23,24,25,26,27,28,29,30,31,32,35,36,38,40,43,45,46,47,48,49,51,53,54,56,63,65,69,82,83,84,85,86,87,88,91,94,95,96,97,98,99,101,102,107,108,109,110,112,123,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,164,168,170,171,172,173,174,175,176,178,179,181,182,183,184,187,189,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,331,333,334,335,336,339,341,345,346,351,352,353,355,356,360,361,362,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,416,417,419,420,421,422,427,428,429,430,435,436,437,438,439,440,441,443,444,445,446,447,449,452,454,459,463,464,466,468,470,471,472,474,478,479,482],energy_update_freq:420,enforc:[6,57,58,104,186,187,188,190,192,199,211,214,249,270,272,282,290,293,330,345,396,451,479,480],enforce2d:[],eng:[11,65,69,108,187,223,328,330,375,409],eng_previ:330,engin:[198,214,275,294,314,382,408],engr:[419,420],enhanc:[194,198,449],enlarg:[59,188],enough:[3,40,61,86,164,165,167,208,234,276,280,285,290,318,322,323,326,356,360,376,415,454,458,459],enpub:382,ensembl:[],ensight:6,ensur:[3,6,140,187,199,212,225,226,249,295,316,346,366,381,404,435,437],enter:[57,154,385,468],enthalpi:[123,251,252,382,471,472,479],entir:[0,2,3,6,11,14,15,41,42,63,88,109,110,112,116,118,141,144,163,164,189,192,193,194,201,204,205,208,211,213,222,225,226,229,233,234,245,249,251,252,253,254,255,271,273,275,288,290,303,317,319,330,360,379,400,411,438,454,462,463],entireti:[394,443],entiti:[6,8,40,42,187,290],entri:[3,8,38,42,56,65,69,79,92,108,115,118,127,130,131,132,133,134,136,137,138,162,184,189,203,204,205,213,280,328,354,366,383,407,413,420,427,437,438,439,440,441],entropi:468,entry1:[38,56,189,373,438],entry2:189,entryn:189,enumer:[165,187],enumuer:6,env:360,environ:[1,3,6,11,12,16,17,18,188,227,232,271,360,361,366,373,375,383,384,417,439,451,465,479],epair:[107,189,386,390,419,420,472],epen:[419,420],epfl:[227,232],epp:379,epq:379,eps0:446,eps14:404,epsilon0:441,epsilon:[3,6,36,45,46,50,53,54,87,170,193,194,225,290,305,322,326,351,353,365,371,372,374,376,377,378,379,387,389,390,391,394,395,396,397,398,399,400,401,402,403,404,410,414,421,422,431,437,443,445,446,463,474,478],epsilon_0:447,epsilon_14:371,epsilon_:421,epsilon_d:377,epsilon_i:[387,411,421],epsilon_i_:421,epsilon_i_a:[387,421],epsilon_i_b:[387,421],epsilon_i_c:[387,421],epsilon_ij:411,epsilon_j:[387,411,421],epsilon_j_:421,epsilon_j_a:[387,421],epsilon_j_b:[387,421],epsilon_j_c:[387,421],epsilon_lj:421,epton:416,eqch:159,eqeq:[419,420],eqp:379,eqq:379,equal:[2,3,6,8,11,12,17,39,41,54,63,65,68,69,76,79,86,87,91,92,108,110,115,117,119,141,143,158,160,164,188,189,192,193,194,195,196,199,202,203,206,207,208,212,214,215,220,225,226,228,229,231,233,234,236,239,240,246,247,253,263,271,273,276,278,280,281,282,285,287,289,290,292,294,299,301,308,309,310,313,314,315,317,319,320,322,325,327,328,330,344,353,355,356,357,359,360,375,380,386,387,390,405,410,417,419,420,421,423,424,425,427,428,438,443,447,450,451,452,454,456,457,461,462,465,468,470,472,479,480],equat:[3,6,7,8,9,91,112,118,163,172,183,192,212,218,219,227,233,234,236,239,247,248,249,250,253,267,271,273,280,281,285,293,305,313,317,320,322,323,325,327,339,345,346,374,379,380,384,385,388,393,405,406,407,411,421,424,426,430,431,433,434,442,447,474],equi:250,equidist:248,equil:[3,281,349,461,483],equilater:464,equilibr:[3,4,5,6,7,9,59,91,164,192,199,202,211,212,225,247,249,250,267,268,280,281,282,283,313,314,315,320,375,376,419,420,450,464],equilibria:320,equilibribum:[209,210],equilibrium:[1,3,4,6,7,21,24,26,27,28,29,32,35,36,38,43,47,48,49,51,53,56,59,147,148,171,173,212,214,225,226,227,234,236,249,253,267,280,285,289,293,294,302,305,312,313,315,320,331,333,336,339,375,407,413,474],equilibrium_angl:8,equilibrium_dist:8,equilibrium_start:198,equival:[6,12,13,59,124,125,133,138,162,166,189,203,206,212,214,225,233,249,267,277,289,290,325,380,384,439,441,454,457,462,463,472,474],equlibrium:6,equliibr:[281,283],er3:163,eradiu:[40,113,384,454],eras:[292,314],erat:[214,406],erc:376,erfc:[376,396,411],erforc:113,erg:478,erhart:[199,382,439,441],ermscal:363,ernst:9,eror:3,eros:407,erose_form:407,erot:[],errata:[439,441],erratum:322,erron:3,error:[],erta:388,ervel:[113,454],escap:[215,474],especi:[8,11,16,152,164,192,199,208,225,280,285,288,289,360,451],espresso:[9,284],essenti:[8,11,12,27,88,128,145,146,147,150,151,152,153,154,156,173,202,253,272,321,346,362,376,396,441,459,472],essex:29,establish:[87,229],estim:[1,3,6,10,12,38,41,56,91,141,198,208,219,247,305,312,345,346,351,411,420,438,468,472],esu:478,esub:407,eta:[6,236,249,280,281,283,321,383,385,387,417,440,478],eta_dot:249,eta_ij:417,eta_ji:385,etag:[40,454],etail:472,etap:249,etap_dot:249,etc:[1,2,3,6,7,8,9,10,11,12,13,15,16,17,39,40,42,54,61,68,89,90,91,94,109,110,113,115,141,142,144,145,146,147,148,150,151,152,153,154,156,158,164,166,167,168,177,187,188,189,192,198,199,200,201,203,204,205,206,209,210,214,215,223,225,226,233,249,276,287,291,317,318,326,330,344,345,353,354,355,356,358,382,383,391,404,406,415,419,420,437,439,441,449,452,454,455,456,461,463,464,468,470,471,472,474,478,479,481,483],ethernet:18,etol:[353,355,449,468],etot0:280,etot:[6,94,96,97,110,141,150,189,218,234,247,280,471,472],eu2:163,eu3:163,euler:[353,355],eulerian:198,euqat:429,europhi:236,evalu:[2,3,11,12,38,56,71,87,88,91,107,117,140,144,154,162,164,187,188,189,193,194,195,196,198,200,201,202,203,204,205,206,207,214,220,226,228,229,231,232,233,234,272,278,281,292,295,299,308,309,310,319,322,325,327,328,330,345,346,351,353,360,411,417,423,425,438,449,450,452,456,457,459,461,462,463,464,468,470,472,479,480],evalut:[330,452],evan:[152,267],evanseck:[6,20,170,371,466],evapor:[],evaul:[8,353],evdwl:[107,419,420,472],even:[3,6,8,12,15,16,17,18,34,39,41,52,57,59,61,63,70,71,119,165,166,180,184,187,189,192,193,194,199,200,201,203,204,205,206,208,209,210,212,214,215,218,231,234,247,249,250,272,285,287,290,291,301,305,313,317,320,322,326,328,338,345,351,353,355,360,365,384,385,388,391,411,421,444,454,455,457,459,460,461,463,464,466,469,471,472,474,483],evenli:[3,41,141,184,208,236,394,444,454],event:[],eventu:[3,6,12,15,166,281,468],ever:[54,56,232,305],evera:[374,387,421,436],everi:[0,1,2,3,6,8,11,12,15,16,39,41,71,72,91,113,119,128,152,167,187,188,189,190,192,193,194,195,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,219,222,223,225,227,229,230,231,236,237,245,249,250,253,270,271,272,276,277,278,279,280,281,282,283,285,287,288,290,291,293,294,305,307,308,309,310,311,312,313,316,317,318,319,320,328,330,344,346,355,356,357,360,380,381,391,404,419,420,432,448,449,450,454,456,458,459,461,462,463,468,469,470,472,479,483],everyth:[8,107],everywher:[116,398],eviri:384,evolut:[227,236,273,449],evolv:[236,273,318],ewald:[2,3,5,6,7,8,12,88,110,118,141,318,345,346,353,367,369,370,376,379,384,396,400,414,422,436,438,456],ewald_disp:379,ewalddisp:3,exact:[22,41,44,71,122,158,167,172,208,211,226,227,233,234,235,276,285,286,305,317,332,345,373,456,461,468,481,483],exactli:[3,6,12,14,17,38,41,56,59,71,91,143,148,155,164,184,193,194,203,208,214,219,226,233,234,235,250,260,261,268,272,280,305,310,311,324,360,373,380,382,388,391,394,405,411,438,456,457,464,468,479],exager:474,examin:[6,8,211,272],examp:[452,479],exampl:[],exce:[3,6,16,17,18,41,58,71,166,201,204,205,208,212,214,219,222,249,272,296,297,305,353,360,454,479],exceed:[3,41,59,208,214,249,305,462],excel:384,except:[1,2,5,6,8,11,14,16,20,21,22,23,24,25,26,27,28,29,30,31,32,35,37,38,40,41,43,44,45,46,47,48,49,51,53,54,55,56,59,60,71,89,90,108,109,112,117,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,164,168,170,171,172,173,174,175,176,178,179,181,182,183,184,186,187,189,192,195,201,202,203,207,208,212,214,221,224,225,228,231,233,235,249,250,251,252,253,254,255,256,260,261,264,266,267,268,269,273,282,283,290,292,293,302,305,308,310,311,317,321,328,330,331,332,333,334,335,336,339,340,341,345,346,348,350,354,355,356,358,359,360,361,362,364,367,368,369,370,371,372,373,374,375,376,378,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,408,412,413,414,416,419,420,421,422,428,436,437,438,439,440,441,443,445,446,447,449,451,452,454,456,457,459,462,463,464,465,466,468,472,474,478,479,480,482],excess:384,exchang:[2,3,6,8,9,61,62,192,198,199,225,233,282,290,313,317,320,345,360,384,469],exchange:345,excit:[9,384],exclud:[3,6,9,12,16,17,63,71,112,140,144,151,152,168,187,201,204,209,210,237,245,275,288,290,312,323,328,353,354,356,368,388,391,405,406,411,435,466],exclus:[1,3,9,12,16,87,360,375,411,463],excurs:449,exectubl:12,execut:[1,2,3,4,6,8,11,12,17,60,165,188,230,284,330,344,347,359,450,452,462,465,468,479],exemplari:226,exemplifi:384,exert:[6,231,234,285,324,325,326,346],exhaust:[198,359,479],exhibit:[249,352,384,463],exist:[3,6,7,8,11,12,13,37,55,59,68,70,122,164,165,183,188,189,192,197,207,210,212,215,225,275,276,278,328,331,333,334,336,340,349,354,360,391,419,444,450,452,454,455,456,465,466,467,479,480,481],exit:[2,3,11,12,41,57,187,208,344,359,452,453,462,471,479],exlanatori:3,exp:[],expand:[],expans:[12,140,187,465],expect:[1,3,8,12,13,14,15,16,17,18,19,41,42,71,102,145,156,162,184,208,220,225,227,246,271,277,279,280,285,290,328,346,356,373,407,411,449,452,454,456,459,463,468,479],expens:[6,10,71,189,271,275,290,317,328,345,346,356,360,452],experi:[6,13,15,17,207,215,230,239,248,277,289,290,351,355,380,411,463,468],experienc:[6,12,238,239],experiment:[345,360,468],expert:12,expertis:7,explain:[1,3,6,8,11,12,16,18,41,59,63,65,68,69,71,72,73,76,77,79,86,92,144,152,184,187,188,189,192,201,202,206,208,210,212,214,249,271,279,290,302,328,330,344,345,348,354,355,359,365,382,394,428,443,447,452,455,456,459,461,464,474,479,483],explan:[3,6,59,113,140,187,201,248,271,391,448,451,452,454,463],explanatori:[3,8,117,187,200,201,203,204,205,290,354,451,479],explantori:[3,286],explic:410,explicit:[6,9,11,22,44,77,87,113,116,158,172,193,194,214,296,297,332,350,362,363,366,371,373,382,384,395,405,442,448,451,455,458],explicitli:[3,6,8,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,71,109,112,142,151,154,162,164,170,171,173,174,175,176,178,179,181,182,184,187,189,195,204,207,214,221,224,226,228,233,249,251,252,253,254,255,256,264,266,267,269,279,280,282,290,292,293,308,310,311,317,321,331,333,334,335,336,339,341,354,360,361,362,364,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,385,386,387,388,389,390,391,394,395,396,397,398,399,400,401,402,403,404,405,408,411,412,413,414,416,421,422,428,429,430,431,432,433,434,436,437,438,439,440,441,442,443,445,446,447,454,456,463,464,466,467,474],explictli:[16,467],exploit:[9,15,17,273],explor:[118,163],expon:[3,281,283,382,387,390,404,410,422],exponenti:[87,417,437,447,468,479],expos:11,exposit:[198,380,381],express:[6,140,150,164,193,194,212,246,271,281,317,323,330,366,382,384,398,407,427,436,479],expressiont:366,extend:[],extens:[3,6,9,17,44,45,46,53,55,63,82,83,84,87,88,91,94,97,98,107,109,117,119,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,192,195,196,199,206,207,213,216,220,223,224,225,227,228,229,231,233,235,247,249,253,261,271,272,288,289,290,292,294,299,302,304,308,309,310,311,312,314,315,317,319,322,326,327,387,407,420,421,427,471,472],extent:[1,3,41,45,57,71,162,166,187,197,204,208,231,324,327,345,348,362,423,425,438,451,454,457],exterior:[3,6,326],extern:[],extra:[3,6,8,12,16,17,40,41,46,61,71,102,109,110,112,118,141,142,143,145,147,150,151,152,153,154,156,157,163,164,165,166,170,189,203,208,210,249,278,279,280,290,305,353,354,357,358,379,388,391,394,407,411,451,452,454,457,466,474,479],extract:[3,6,11,13,36,63,87,107,115,117,119,193,194,283,355,376,385,407,427,452,459,471],extract_atom:11,extract_comput:[11,452],extract_fix:11,extract_glob:11,extract_vari:11,extramak:[12,15],extrapol:1,extrem:[1,3,6,17,58,188,212,214,249,315,384,440,474],extrema:404,extrins:198,f77:[5,7,12],f90:[5,7,12],f_1:6,f_5:[160,319],f_a:[439,440,441],f_ave:117,f_c:440,f_f:441,f_fix_id:280,f_harm:315,f_i:417,f_id:[6,71,117,119,187,192,200,201,202,203,204,205,206,244,307,319,472,479],f_ij:417,f_indent:206,f_int:314,f_jj:91,f_k:417,f_langevin:317,f_max:[280,285],f_msst:247,f_r:[234,439,440,441],f_sigma:366,f_solid:315,f_ss:6,f_temp:234,face:[3,6,57,59,71,152,162,166,197,204,205,322,324,325,326,327,348,387,407,421,454,457],face_threshold:162,facet:162,facil:[0,12],facilit:[6,13],fact:[6,8,16,227,305,315,388,466],factor:[1,3,6,12,18,24,28,32,35,36,39,41,46,47,57,58,59,87,91,102,108,115,118,140,158,163,166,170,181,187,188,189,193,194,202,208,212,214,215,225,230,233,235,236,247,249,250,253,273,277,289,293,295,297,305,309,313,320,321,322,326,336,346,348,360,362,363,366,367,369,371,376,377,378,380,384,388,391,395,396,407,411,413,414,420,422,428,437,442,451,454,457,458,463,466,468,469,472,474,478,479],factori:[3,452],factoriz:345,fail:[3,11,12,59,168,212,215,345,353,355,378,420,452],failur:[121,424],fairli:[11,411,463,468],faken:73,falcon:230,fall:[3,6,189,203,276,452],fals:[86,328,330,479],fame:8,famili:451,familiar:[0,11],fan:417,far:[3,6,12,17,57,59,61,86,187,189,190,208,209,210,212,215,249,271,289,290,305,322,333,336,351,355,356,443,452,454,459,472],farago:233,farrel:[439,441],farther:187,fashion:[6,8,41,71,164,189,192,193,194,199,204,208,210,215,225,227,231,246,247,249,251,252,253,254,255,263,266,267,268,269,279,280,282,290,294,298,304,307,315,317,321,322,323,325,327,355,391,405,457,466,479,482],fasolino:393,fast:[6,7,9,12,13,17,39,187,258,280,318,345,346,368,405,406,436,438,456,461,463,472,480,483],faster:[1,6,9,10,11,12,14,15,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,43,45,46,47,48,49,51,53,54,56,61,63,105,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,187,189,192,195,207,208,221,224,228,232,233,249,251,252,253,254,255,256,264,266,267,269,277,281,282,290,292,293,305,308,310,312,314,317,321,331,333,334,335,336,339,341,345,346,357,358,360,361,362,364,366,367,368,369,370,371,372,373,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,436,437,438,439,440,441,443,445,446,447,449,463,467,474],fastest:[6,14,17,152,204,317,318,360,451],fatal:[3,471],fault:[70,420],faulti:12,fava:387,favor:211,favorit:7,fbmc:312,fcc:[],fcm:[263,479],fdirect:218,fdotr:392,fdti:87,fe2:163,fe3:163,fe_md_boundari:198,featu:8,featur:[],fecr:382,feedback:[7,230],feel:[7,230,231,239,271,326,328,355,411],felling:409,felt:326,femtosecond:478,fene:[],fennel:[376,396],fep:[],ferguson:[6,170,466],fermi:[1,12,15,150,360,441],fermion:[9,384],ferrand:[9,13],few:[1,3,4,5,6,7,10,11,12,13,14,17,18,39,190,200,201,202,203,204,205,206,234,249,276,279,281,293,319,345,353,354,355,362,451,454,459,463,465,479,481],fewer:[1,3,11,15,16,61,239,463],fewest:3,fextern:223,feynman:273,fff:452,ffield:[375,385,419,420],ffmpeg:[3,12,188],ffplai:188,fft:[1,3,7,12,14,15,88,109,110,141,272,345,346,463],fft_inc:[12,346],fft_lib:12,fft_path:12,fftbench:345,fftw2:12,fftw3:12,fftw:[11,12],fhg:[7,9],fictiti:[6,195,196,220,223,227,273,289,376,396,400,435],field1:[455,459],field2:455,field:[],fifth:[302,413],figur:[1,3,8,11,12,280,451,452],fij:379,file0:271,file1:[11,13,271,316,330,354,459,461,465],file2:[11,13,316,330,354,459,461,465],file:[],filenam:[3,12,13,38,41,56,184,187,188,189,190,198,201,202,203,204,205,206,208,213,271,275,278,281,282,283,286,287,290,291,316,317,342,343,344,355,361,362,366,376,382,383,385,393,407,408,409,413,417,418,419,420,427,437,438,439,440,441,450,451,452,455,456,461,465,472,479,481,482,483],filennam:461,filep:[3,187,189,456,461,483],filepo:287,fill:[7,164,188,276,317,348,356,366,420,457],filter:[189,198],final_integr:8,final_integrate_respa:8,finchham:[6,146,378],find:[0,3,4,6,7,8,11,12,13,14,16,38,39,56,61,71,73,87,117,167,184,190,199,211,212,222,225,248,271,277,285,289,351,353,355,356,376,391,396,400,407,436,438,474,479],find_custom:8,fine:[16,17,168,195,220,315,356,360,479],finer:[140,164,479],finest:345,finger:[164,186,246,457],finish:[6,11,41,208,330,342,344,345,357,359,360,443,459,479,480],finit:[],finni:[7,382,436],finvers:218,fiorin:[9,213],fire:[351,352,353,355,468],firebrick:189,first:[0,1,2,3,5,6,8,9,11,12,14,15,16,17,21,38,39,41,42,45,46,54,56,57,59,61,62,71,81,88,91,103,104,105,112,116,117,127,130,133,134,138,141,149,152,158,160,162,163,165,166,167,171,184,187,188,189,190,192,199,201,202,203,204,205,206,208,211,214,225,226,231,236,246,247,248,249,271,273,278,279,280,282,287,290,293,294,302,303,305,306,307,314,315,316,317,319,323,328,330,331,337,348,353,354,355,356,359,360,361,362,365,366,367,369,371,373,375,376,382,384,385,388,389,392,393,395,396,400,405,406,407,409,411,413,417,419,420,427,435,437,438,439,440,441,449,450,451,452,454,455,456,459,461,463,466,467,468,471,472,474,479,480,481,483],fischer:[6,9,19,20,170,371,466],fit:[3,6,9,12,38,56,184,289,305,362,366,393,407,411,431,438,440,462,479],five:[73,150,280,354,366,408,454,468],fix:[],fix_adapt:[158,194,404],fix_atom_swap:[],fix_bal:62,fix_deposit:[3,199,276],fix_evapor:199,fix_flux:198,fix_gcmc:[199,354],fix_gl:227,fix_gld:227,fix_grav:276,fix_id:[3,212,247,249,251,252,253,254,255,277,280],fix_modifi:[],fix_mov:[186,323],fix_nh:8,fix_npt:227,fix_nvt:[199,225],fix_poem:[3,6],fix_pour:[3,215],fix_qbmsst:9,fix_qeq:[3,375],fix_rattl:293,fix_reax_bond:419,fix_rigid:[239,365],fix_saed_vtk:291,fix_setforc:8,fix_shak:293,fix_srd:3,fix_styl:253,fix_temp_rescal:311,fixedpoint:[212,249],fixextern:223,fixid:198,fji:379,flag1:[217,358],flag2:[217,358],flag:[3,8,11,12,14,15,16,17,18,40,66,74,75,81,86,89,90,93,103,104,106,118,159,163,167,187,188,189,190,206,211,213,217,230,233,237,239,245,246,272,279,290,302,304,305,312,316,325,328,343,346,354,358,359,360,362,390,395,407,435,449,451,452,454,455,456,458,459,460,464,479],flag_buck:370,flag_coul:[370,379,400],flag_lj:[379,400],flagfld:[368,405,406],flaghi:[3,368,405,406],flaglog:[368,405,406],flagn:217,flagvf:[368,405,406],flat:[6,317,322,323,327],flavor:[2,7,12],fld:[9,322,368,405,406],flen:363,flex_press:363,flexibl:[3,6,8,165,188,201,204,213,227,250,313,320,384,440,472],flip:[3,6,214,249,324,325],floor:479,flop:12,floralwhit:189,flow:[],fluctuat:[6,64,87,212,225,226,233,236,249,253,271,272,315,317,339],fluid:[],fluid_veloc:240,flush:[3,189,471],flux:[],flv:188,fly:[7,9,12,41,188,192,198,215,218,290,293,318,366,472,474],fmackai:9,fmag:216,fmass:273,fmax:[353,472],fmomentum:218,fmsec:[2,189,233,234,246,249,277,290,308,309,463,473,478,480],fname:344,fno:12,fnorm:[353,472],fnpt:218,fnvt:218,foce:391,fock:363,focu:293,fogarti:[9,283,420],foil:[140,271,427],fold:[303,463],folk:7,follow:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,35,36,38,41,42,43,45,46,47,48,49,51,53,54,56,59,63,64,70,71,73,91,96,97,113,116,117,119,140,141,143,144,150,152,157,160,162,164,165,170,173,174,175,176,178,179,181,182,184,187,188,189,192,198,199,200,201,202,203,204,205,206,208,213,214,215,218,219,223,225,226,227,230,232,233,234,236,239,247,249,253,254,255,266,267,269,272,273,275,278,279,280,281,283,285,287,289,290,291,293,307,308,309,310,313,314,315,316,317,319,320,328,329,333,334,335,336,339,341,343,348,350,353,354,355,360,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,421,422,424,426,427,428,429,430,431,432,433,434,435,437,438,439,440,441,442,443,445,446,447,449,451,452,454,455,456,457,459,461,462,463,466,468,469,470,474,479,480,482],foo:[4,8,11,12,187,188,223,452,465,479],foot:6,footprint:[12,360],fopenmp:[12,16,18],forc:[],force_uvm:17,forceatom:239,forcefield:[289,390],forcegroup:236,forcezero:351,ford:379,forestgreen:189,forev:71,forget:[234,474],forgiv:249,form:[2,3,6,8,12,16,19,22,44,54,63,66,74,75,77,81,87,89,90,93,103,104,106,116,140,141,158,159,168,172,189,192,193,194,210,226,227,233,235,239,246,267,272,283,285,289,290,317,322,326,331,332,339,350,352,354,355,362,363,366,373,382,384,386,390,391,395,407,409,413,414,417,419,420,421,427,428,436,438,439,440,441,446,448,451,452,454,459,464,471,474,479],formal:[6,78,80,91,226,227,233,249,273,305,313],format:[2,3,6,7,8,9,12,13,22,38,41,44,56,68,77,172,184,187,188,189,190,201,203,204,205,206,208,210,272,275,279,281,283,286,290,291,301,316,317,328,329,332,350,354,355,361,362,366,373,382,385,395,407,409,418,419,420,422,427,438,444,451,452,454,455,456,459,470,471,472,479,481],former:[6,12,16,39,41,189,208,317,321,366,368,460,466,479],formerli:[7,13],formul:[1,40,64,141,195,220,233,249,267,281,283,289,293,316,345,362,366,382,384,387,407,416],formula:[2,3,6,7,13,21,22,37,44,54,55,70,73,87,89,90,91,94,96,97,106,112,118,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,163,164,169,171,172,183,187,193,194,195,196,201,202,203,206,207,214,220,228,229,231,233,234,246,271,272,278,287,292,299,303,305,308,309,310,319,322,325,327,328,330,331,332,334,340,348,354,362,363,365,366,371,372,373,374,379,380,382,383,387,388,389,390,392,395,396,398,399,400,402,403,405,406,407,410,411,412,421,422,428,436,437,439,440,441,445,446,447,450,454,457,464,471,472,478,479,480],forth:[1,6,11,12,13,14,15,359,452,457,461],fortran:[3,6,9,11,12,13,223,382,391,407,419,420],fortun:8,forward:[3,8,87,344,355,360],foster:[366,416,417],foul:167,found:[3,6,9,12,73,158,187,211,213,225,230,236,272,312,318,330,344,356,373,376,379,449,455,456,471],four:[6,11,54,81,103,104,140,160,247,317,339,354,355,449],fourier:[],fourth:[6,105,289,302,312,371,413],fox:[6,118,170,434,466],fphi:[38,56,438],fpic:12,fplo:[38,56,438],fprime:438,fqdn:232,fqq:379,frac:[218,234,442,474],fraction:[1,3,6,8,12,16,39,41,80,109,141,167,186,188,189,199,209,210,211,212,247,276,280,287,288,305,310,311,348,355,360,366,368,388,405,406,459,464],fragment:[42,230,287],frame:[83,140,189,198,247,280,324,387],framer:[188,189],framework:[5,227,361,427],franc:9,fraunhof:9,free:[5,6,7,9,13,29,60,63,70,87,158,194,271,305,314,315,316,317,352,355,363,384,404,417,446,451],freedom:[3,6,8,94,96,97,99,101,102,112,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,201,211,218,225,227,233,234,239,249,250,253,254,255,266,267,269,273,275,290,293,308,309,310,315,353,379,472,474,480],freeli:[0,6,7,12,143,157,162,188],freez:[],frenkel:[225,315],freq:197,frequenc:[3,6,16,39,189,261,272,273,280,285,343,380,384,420,449,463,468,479,482],frequent:[3,64,67,70,72,73,77,88,140,189,209,210,222,313,320,411,461],fri:[247,280],friction:[4,5,6,10,42,192,227,233,280,285,290,317,321,323,388,464],friedrich:295,from:[],front:[247,280,324],frontend:[188,284],frozen:[6,112,168,224,226,234,356,386],fs2:[6,91],fscale:230,fstr:479,fstring:452,ftol:[353,355,449,468],fuchsia:189,fuction:376,fudg:293,fugac:225,fugacity_coeff:225,fulfil:6,full:[1,2,6,9,12,17,38,39,40,91,188,202,213,236,271,345,346,360,366,382,384,385,387,442,454,456,461,462,466,468,474,482],full_energi:[3,225],fuller:353,fulli:[3,6,9,78,227,232,271,353,355,376,417,418,481],fulton:382,fumi:367,func:[452,479],funcfl:382,functino:6,functionaliri:213,fund:[0,7],fundament:[305,478],funnel_flow:301,further:[3,6,8,12,13,61,63,71,86,105,107,116,188,189,192,201,203,204,205,206,209,215,219,236,240,273,281,291,295,305,317,319,328,346,351,353,354,355,356,361,365,375,435,449,468,469,479],furthermor:[27,173,384],furthest:61,futher:3,futur:[],g_ewald:3,g_ewald_6:3,g_ewald_disp:3,g_jik:417,g_p:317,ga3:163,gaa:366,gahler:352,gai:[3,387,436],gain:312,gainsboro:189,galindo:410,game:230,gamma0:29,gamma:[3,6,29,233,236,240,272,280,281,283,285,321,380,383,387,407,410,430,433,434,437,439,441,472],gamma_:[3,317,323],gamma_ijk:439,gamma_n:[323,388],gamma_p:[3,317],gamma_t:[323,388],gammaa:410,gammafactor:236,gammar:410,gan:[417,437,439,441],gan_sw:417,gan_tersoff:417,ganzenmuel:[7,9],ganzenmul:9,gao:[6,20,170,371,466],gap:[184,405,406,418,427],gap_2014_5_8_60_17_10_38_466:418,gap_exampl:418,gaseou:7,gass:225,gather:[11,462],gather_atom:11,gather_scatter_loop_unrol:12,gathert_atom:11,gauch:176,gauss:[],gaussian:[6,40,63,91,103,105,226,227,233,273,289,305,309,327,345,380,381,384,386,418,436,449,479,480],gave:[3,411],gaybern:[],gcc:17,gcmc:[],gcore:218,gd3:163,gdot:406,gdrude:218,ge4:163,gec:[439,441],gen:[249,250],gener:[],genom:7,gentler:[322,325,327],gentli:383,geom:[6,345,381,449,480],geometr:[3,6,7,8,42,57,59,71,154,155,164,166,187,189,195,204,205,207,208,215,220,229,249,254,255,266,267,269,290,292,299,308,309,310,326,328,345,348,355,365,368,372,374,376,379,384,387,389,394,396,397,398,399,400,401,402,403,404,405,406,410,411,421,428,442,443,445,446,454,456,457,464,472,479],geometri:[3,6,7,9,13,25,41,71,152,164,204,208,209,210,212,215,231,348,411,454,457],georg:[7,9],georgia:13,gerber:404,germani:[9,14],germann:[253,398,449,468],germano:387,gerolf:13,get:[],get_natom:[11,452],getenv:479,gettimeofdai:12,gewald:[6,345],gezelt:[376,396],gf100:14,gf104:14,gf200:14,gflop:12,gflp:12,ghost:[3,6,7,12,16,58,61,62,73,162,167,212,214,234,249,279,290,291,345,356,360,380,381,384,388,395,459,464,474],ghostwhit:189,ghz:10,giacomo:9,gif:[4,188],gifsicl:188,gigabit:18,gillan:427,gingold:[430,431,433],gio:2,git:[7,12],github:[13,17,213,227,232,418],give:[0,1,2,3,5,6,7,8,9,10,11,12,14,15,16,17,29,54,71,113,144,147,151,164,187,189,195,197,201,202,203,206,212,214,227,249,267,271,272,277,285,287,290,319,345,346,353,356,357,360,362,366,381,384,390,391,407,411,421,439,440,441,449,451,452,454,464,468,474,480],given:[3,5,6,7,9,10,11,12,16,17,22,27,37,44,55,63,64,67,71,113,123,124,125,127,128,131,132,133,134,135,136,137,138,139,140,141,158,162,166,172,173,183,184,187,189,192,199,201,204,209,210,212,214,215,219,225,226,227,228,230,236,243,246,248,249,253,270,271,272,273,280,281,287,289,293,301,302,303,305,307,312,317,318,321,322,323,326,332,340,345,346,360,361,362,366,367,369,370,372,373,374,375,376,377,380,381,382,384,385,387,390,396,397,398,400,407,408,409,410,411,413,414,417,421,422,424,426,427,435,436,447,449,452,454,456,457,464,468,478,482,483],gjf:233,gjwagn:7,gko:2,gld:[],gle4md:[227,232],gle:[],glitch:3,glob:465,global:[],glosli:346,glotzer:[290,380],glue:11,gmail:[7,9,13],gmake:[12,17],gmask:[3,479],gnu:[0,7,12,17,18],gnuplot:[11,13],goal:[5,12,39],goddard:[6,9,25,281,282,283,341,384,390,419,420,466],goe:[12,54,140,164,186,246,298,353,356,379,383,389,398,401,428,447,457,461],gold:[70,189],goldenrod:189,goldman:280,gone:3,good:[1,3,6,12,17,41,73,118,162,163,208,233,247,249,281,287,293,312,345,355,356,361,374,381,382,411,438,449,463,468,472],googl:230,gordan:140,gordon:6,gould:[6,170,466],gov:[0,7,9,13,361,382,385,478],govern:236,gpl:[0,7,8,12],gpu1:360,gpu:[],gpuid:360,gpun:360,grab:[3,6],gracefulli:3,grad:[6,195,220,248],gradient:[6,7,8,12,13,122,127,212,220,228,229,248,267,282,313,317,351,352,355,406,420,438],gradient_correct:426,graduat:275,graft:211,grai:189,grain:[5,6,7,9,29,36,40,54,67,164,167,176,192,271,275,290,305,389,422,466],gram:[201,204,205,382,478],grama:[9,283,420],gran:[],grand:[3,192,199,225],granflow:5,granular:[],graph:11,graphen:458,graphic:11,grasp:5,gravit:228,graviti:[],grdient:198,great:[3,13,280],greater:[1,3,10,61,86,162,189,212,226,249,271,310,324,360,365,367,369,370,411,449,451,454,457,463,468,479,480],greathous:13,greatli:[118,468],green:[2,6,91,130,131,188,189,272,273,313,366],green_kubo:6,greenyellow:189,greffet:285,greg:[7,9],grest:[45,46,211,305,346,370,388,400,466],grew:71,grid:[3,12,41,62,118,152,163,166,208,236,285,305,317,318,345,346,448,451,454,456,458,463],grigera:6,grime:40,grmask:[3,479],gromac:[],gronbech:[233,345],groot:380,ground:[6,384],group1:[146,167,356],group2:[88,146,165,167,356],group2ndx:[],group:[],group_id:11,groupbig:305,groupid1:[239,290],groupid2:[239,290],groupid:454,groupnam:356,grouptyp:225,grow:[3,8,197,214,215,231,233,249,271,319,388,454,466],grow_arrai:8,grow_reset:8,growth:[6,312],grueneisen:9,gsmooth_factor:407,gstyle:[3,451],gtl:7,gtx285:14,gtx450:14,gtx460:14,gtx470:14,gtx560:14,gtx580:14,guarante:[65,69,79,92,108,115,164,167,187,219,281,344,348,464],guess:[3,187,277,455],gui:[7,11],guid:[1,17,40,78,80,99,100,101,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,192,242,243,295,296,297,298,301,318,416,424,426,429,430,431,432,433,434,464],guidelin:[1,8,14,15,16,17,18,19,345,438],guidlin:17,gullet:407,gumbsch:352,gunsteren:[277,308,404],gunzenmul:7,gunzip:12,guo:[6,20,170,176,371,466],gwald:3,gyrat:[],gzip:[3,12,187,188,189,316,355,454,455,459],h12:387,h2o:[40,354],haak:[277,308],had:[3,6,11,13,59,63,187,189,190,203,206,211,212,226,227,229,233,234,235,247,249,251,252,253,254,255,266,267,269,276,277,305,308,309,310,317,380,381,388,435,456,460,463,469,472],hafskjold:6,half:[1,3,6,8,16,17,39,41,58,59,166,188,200,208,214,233,249,317,322,326,356,360,363,366,374,384,423,425,454,456,457,464,474],halfwai:[41,188,189],halsei:388,halt:[41,189,208,229,330,471],halv:188,ham:[38,56],hamak:[322,326,374,421],hamilton:70,hamiltonian:[227,249,250,309,384,463],hammond:[345,346],han:382,hand:[3,6,19,54,164,182,186,188,236,246,348,376,384,454,457,464,467],handl:[3,9,16,188,213,283,360,363,384,405,420,452,468],hang:[3,451,452],happen:[3,6,8,12,15,18,61,116,168,189,199,202,356,360,452,455,462],happi:8,haptic:230,hara:440,hard:[1,239,283,289,290,381,457],harden:[9,428],harder:[322,326,474],hardi:[198,234,345,346,474],hardwar:[1,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,195,207,221,224,228,233,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,308,310,321,331,333,334,335,336,339,341,345,346,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,467],hardwir:[3,17,323],hardy2:346,harm:363,harmon:[],harmonic_fix_wal:406,harpertown:18,harrison:362,hart:305,hartre:[363,382,384,478],hasan:9,hash:[39,454],hassl:289,hat:[6,10,248],have:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,45,46,47,48,49,51,53,54,56,57,59,63,64,65,66,67,69,70,71,72,73,75,77,81,86,90,91,93,103,104,105,106,109,112,113,114,115,116,130,140,141,142,143,144,145,147,151,153,156,157,159,160,161,162,164,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,188,189,190,195,197,199,200,201,202,204,205,206,207,208,209,210,211,212,214,215,220,221,222,224,225,226,227,228,229,230,231,233,234,235,236,239,244,246,247,249,251,252,253,254,255,256,261,264,266,267,268,269,271,273,275,276,277,279,280,281,282,285,288,290,292,293,299,301,305,306,308,309,310,311,312,316,317,318,319,321,322,323,324,325,326,327,328,329,330,331,333,334,335,336,337,339,341,345,346,348,351,352,353,354,355,356,357,360,361,362,363,364,366,367,368,369,370,371,372,374,375,376,379,380,381,382,383,385,386,387,388,389,390,391,392,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,416,417,419,420,421,422,426,428,437,438,439,440,441,443,445,446,447,448,449,451,452,454,455,456,457,458,459,460,461,462,463,464,466,468,469,471,472,474,478,479,480,481,482,483],haven:452,hayoun:285,hayr:233,hbcut:419,hbnewflag:419,hbond:[],hbond_cutoff:420,hcp:[64,67,73,348,407],he1:163,head:[6,21,171,331,386,390,419,420,469],header:[3,6,7,8,12,165,187,188,189,190,201,202,203,204,205,206,247,280,287,291,317,354,361,366,382,451,454,464,471],heal:463,heat:[],heatconduct:[],heavi:305,heavili:[41,208],heavisid:317,hecht:305,heenen:9,height:[188,215,276,355,386],heisenberg:9,held:[6,71,305,355,388],helic:176,helium:364,helix:[],hello:452,help:[3,8,12,14,15,16,17,18,19,187,212,214,247,343,366,439,441,481],henc:[1,3,13,20,21,26,32,35,36,70,71,108,144,154,171,201,249,283,305,321,322,326,328,331,333,336,339,346,376,386,404,417,456],henderson:53,hendrik:9,henin:[9,213],henkelman1:[248,355],henkelman2:[248,355],henkelman:[248,352,355],here:[1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,22,37,41,44,55,63,68,69,70,71,118,144,162,163,172,175,183,187,188,189,192,201,208,211,214,225,226,234,236,271,280,283,285,291,317,322,325,327,328,330,332,340,344,353,355,359,360,362,363,366,373,385,387,390,391,395,417,421,424,426,436,438,447,452,459,474],herist:318,herrmann:305,hertizian:323,hertz:[],hertzian:[6,323,388,436],hertzsch:388,hess:345,hessian:[5,352],heterogen:105,heurist:[318,455],hex:[3,17,164,348],hexagon:[67,407],hey:[110,141],hf4:163,hfo:375,hftn:[352,353,355],hg1:163,hg2:163,hgrid:305,hibb:273,hidden:[17,452],hienergi:328,hierarch:[7,463],hierarchi:[346,370,371,396,397,400,410,463],higdon:[9,405,406],high:[1,3,6,7,9,19,41,184,188,208,212,219,234,247,313,317,320,346,352,353,360,366,384,387,421,438,447,451,463,468,474],higher:[1,14,140,167,189,201,206,209,210,215,231,276,285,312,325,327,353,384,392,479],highest:[215,330,354,355,479],highli:[3,6,7,9,164,188,214,233,249,261,280,290,351,353,384,449,468],highlight:[6,7,10,13],hight:386,hilger:[345,346],hill:273,hill_height:13,him:9,hint:12,histo:[],histogram:[1,6,12,63,116,162,192,202,203,206],histor:385,histori:[],hit:[3,305,324],hmaktulga:[7,9],ho3:163,hoc:339,hocknei:[345,346],hoh:[6,376,396,400],hold:[6,33,59,71,177,201,214,241,274,289,290,302,353,355,388,404,446,465],holdem:289,holder2:346,holder:[345,346],hole:302,holian:[253,398],holm:[271,346],holonom:316,home:[11,12,190],homebrew:12,homepag:[188,230],homogen:[267,411],hone:273,honeydew:189,honor:190,hook:[],hookean:388,hoomd:190,hoover:[6,7,8,154,192,218,233,234,249,250,251,252,253,254,255,266,267,268,269,273,277,285,290,308,309,310,315,380,474],hop:[211,355,366],hope:[5,13,17,41,42,208,462],hopefulli:[8,353],horizon:416,horn:6,host:[3,12,16,17,213,360],hot:[6,229,250],hotpink:189,hottest:313,hour:12,hourglass:[2,9,122],hove:407,how:[],howev:[1,2,3,6,7,11,12,15,16,17,36,39,41,71,88,91,104,118,140,163,184,187,188,189,202,206,208,211,212,215,218,225,226,227,232,233,234,235,236,239,249,271,273,276,279,280,285,290,291,305,306,308,309,312,313,317,318,319,320,321,346,348,350,351,355,360,372,374,382,383,388,391,407,415,417,426,437,438,441,449,451,452,455,462,468,471,472,474,479,480],howto:[6,63,71,142,143,145,147,150,151,152,153,154,156,157,192,233,234,249,277,308,309,310,376,390,396,400,480],hoyt:198,hpc:[1,15],hsw:17,htm:382,html:[0,4,8,11,12,15,232,386,406,463],htmldoc:0,htst:468,http:[0,6,7,11,13,14,15,213,227,230,232,361,382,405,418,419,420],htype:[376,396,400,404],hubbard:377,huge:[12,166,261,305,454,459,471],huggin:[7,367,369,436],hugh:198,hugoniostat:[4,192,253],hugoniot:[247,253,280],hull:162,hummer:345,hundr:[7,14],hura:6,hwloc:[12,17],hybrid:[],hydrat:386,hydrocarbon:[362,375,384],hydrodyanm:40,hydrodynam:[7,9,40,99,101,236,238,239,240,368,405,406,424,426,436,464],hydrogen:[3,6,7,222,285,362,366,376,384,390,396,400,404,419,420,436,454,463,474],hydrostat:[3,9,212,249,253,277,290],hynninen:[377,386],hyoungki:409,hyper:273,hyperbol:377,hyperspher:140,hyperthread:[16,17],i_0:317,i_1:417,i_csid:6,i_flag1:279,i_mpi_pin_domain:16,i_myflag1:279,i_myflag2:279,i_n:417,i_nam:[113,187,279,307,464],ialloi:407,iatom1:115,iatom2:115,iatom3:115,iatom4:115,ibar:407,ibead:273,ibm:[187,345],icc:[10,12,16],icm:[9,230],ico:64,icosohedr:73,ictp:13,id1:[290,355,395,454,457],id2:[290,294,302,355,395,454,457],id_press:[212,247,249,251,252,253,254,255,277],id_temp:[211,212,247,249,251,252,253,254,255,266,267,269,277,308,309,310],idea:[1,3,6,11,12,41,141,188,189,208,231,271,294,305,313,346,411,462,474],ideal:[6,9,40,73,116,122,218,225,271,348,405,430,474],idealga:[],ident:[1,3,9,12,39,40,71,140,187,189,203,212,213,226,227,233,234,246,249,271,273,277,285,287,290,346,354,355,360,367,369,376,378,382,398,404,413,419,420,427,447,449,452,455,468,478,479,480,482],identi:360,identif:67,identifi:[1,3,12,38,40,56,70,162,164,184,287,305,328,390,395,407,438,449,451,454,457,468,469,471],idl:[18,468],idn:[290,355],idr:479,ielement:407,ieni:13,ifdef:[8,12],iff:234,iffp:452,ignor:[3,6,11,16,41,71,83,87,98,107,119,168,187,188,189,193,194,202,203,204,206,208,212,213,214,215,225,228,232,233,246,249,253,258,263,277,278,279,289,290,291,305,308,309,310,316,317,319,322,326,327,328,337,347,350,354,355,360,361,372,373,374,382,383,385,387,394,395,407,413,417,421,437,438,439,440,441,443,449,451,454,455,459,464,466,468,471,479],ihl:305,iii:[6,9,25,281,283,341,390,466],ijk:[335,339,341,366,417,451],ijl:339,ikeshoji:6,ill:[144,154,201,281],illeg:3,illinoi:[230,345,346,405],illog:452,illustr:[1,6,8,11,12,17,271,273,355,391,452],ilmenau:[7,9,14],ilya:[7,9],imag:[],image2pip:188,imageint:3,imagemagick:[4,188],imagin:[302,316,366,383,391,392,408,409,413,417,437,439,440,441,466],imaginari:[6,225,273,454],imbal:[1,41,208],imbalanc:[41,208],imbu:305,imd:[],img:188,immedi:[0,2,3,8,12,164,209,210,215,293,301,306,307,324,451,452,454,456,468,479,482],immens:3,immers:[236,290],impact:[1,4,6,8,219,312],impart:[3,6,228,305,327],impei:[6,396],implement:[1,3,6,8,9,12,17,18,27,78,87,118,146,152,163,164,172,173,183,201,213,217,227,230,233,236,238,239,240,247,267,270,272,273,279,280,281,283,284,285,293,294,305,312,317,321,339,344,345,346,353,355,360,361,363,366,375,376,378,380,382,383,384,391,396,400,404,407,416,419,420,421,439,441,451,452,463,468,474,479,481],impli:[3,6,40,59,87,141,188,193,194,195,214,220,233,289,308,310,311,345,348,373,452],implicit:[],implicitli:8,implict:377,imporop:354,importannt:246,important:315,important_not:59,impos:[2,6,71,112,153,186,192,195,196,207,220,221,223,228,231,240,241,248,261,271,274,292,299,302,304,305,312,313,314,315,320,321,322,325,326,327,353,355,357,448,462],imposs:1,improp:[],improper_coeff:[],improper_styl:[],impropercoeff:3,impropertyp:210,imprort:97,improt:[193,194],improv:[0,1,9,39,41,189,208,249,272,360,390,396,411,420,437,440],in3:163,inaccur:[1,3,6,167,247,345],inaccuraci:326,inact:390,inappropri:164,incid:[118,163,215],includ:[],includig:[330,344],inclus:[],incom:230,incompat:[3,11,392],incomplet:[3,11,454],incompress:[250,384],inconsist:[3,168,211,455],inconveni:348,incorpor:[280,366,377],incorrect:[3,147,233,407],incorrectli:[3,348,388,479],increas:[1,3,6,10,18,38,56,57,59,109,118,141,184,187,188,189,209,210,211,214,233,277,288,289,290,313,316,320,345,346,355,360,384,387,420,438,440,452,463,468,479],increasingli:384,increment:[3,11,128,195,196,207,208,215,220,222,249,294,295,328,344,359,394,449,452,466,468,479],incur:[14,17,201,204,205,222,317,451],inde:147,indefatig:7,indefinit:314,indent:[],independ:[4,6,9,11,12,16,17,41,59,63,91,117,119,150,164,186,192,200,201,202,203,204,205,206,208,211,212,213,214,215,226,228,233,234,236,239,249,272,277,281,285,290,291,294,304,315,317,348,388,449,452,471,480],indetermin:[187,189],index:[0,3,6,8,11,12,38,39,40,56,68,69,117,119,184,187,189,200,202,230,232,273,291,317,328,329,330,350,359,411,419,420,438,444,454,469,479],indianr:189,indigo:189,indirectli:[6,479],indistinguish:233,indium:427,individu:[],induc:[],industri:7,ineffici:[3,6,40,64,67,70,72,73,77,140,152,188,214,249,272,345,357],inerti:406,inertia:[],inexpens:[227,463],inf:[2,3,12,320,457],infer:[3,94,96,97,158,195,196,208,209,210,220,230,275,305,313,320,348,373,385,454,466,472],infil:[3,13,290,451],infin:[3,353,459,472],infininti:188,infinit:[3,215,224,231,233,236,272,305,317,323,324,346,348,384,458,478],infinitesim:6,inflect:[377,398],influenc:[3,9,41,80,146,246,276,345,346,411,439,440,441],inform:[0,1,2,3,6,7,8,9,11,12,13,15,17,39,41,42,59,61,62,63,68,88,115,117,118,163,164,170,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,222,223,224,225,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,248,256,257,258,259,260,261,262,263,264,265,270,271,272,274,275,276,277,278,279,281,282,283,284,285,286,287,288,289,290,291,292,293,295,302,303,305,306,308,309,310,311,312,313,314,316,319,320,321,322,324,325,326,327,329,343,345,346,349,352,353,354,355,356,358,360,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,414,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,443,445,446,447,451,452,454,455,456,458,459,461,466,468,469,471,479,481,482,483],infrequ:[6,380,449,468],infti:[377,405,406],ingtegr:366,inher:[345,353,411],inherit:[6,442],inhomogen:[18,317,411],inidividu:353,init:[3,8,12,288],init_fil:317,init_list:8,init_on:8,init_styl:8,initi:[2,3,4,6,7,8,11,12,13,38,39,40,41,56,57,59,62,71,80,81,86,87,103,104,130,160,165,166,184,186,187,188,189,190,193,194,197,198,202,208,210,211,212,214,221,225,226,230,231,232,233,234,236,241,245,246,247,248,249,253,261,272,273,274,279,280,285,288,289,290,292,304,305,307,312,314,315,316,317,318,319,322,323,324,325,327,328,330,345,349,352,353,355,362,363,379,380,381,418,419,420,438,449,451,452,454,456,457,459,461,462,464,468,469,472,474,479,480,481,483],initial_integr:8,initial_integrate_respa:8,initialis:418,initialt:317,inlclud:11,inlcud:479,inlin:452,inner2:[371,389],inner:[3,8,16,187,231,330,344,351,352,353,355,359,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,444,445,446,447,463,468],inner_distance_cutoff:390,innergroup:239,innermost:[38,56,358,438,463],innernod:239,innner:402,inordin:318,inorgan:6,inp:[213,330,427],input1:[65,68,69,79,92,108,113,114,115,117,119,307],input2:[65,68,69,79,92,108,113,114,115,117,119,307],input:[],input_doubl:3,inquir:295,insensit:12,insert:[3,5,7,8,12,59,164,192,215,225,231,276,345,427,435,452,458,474],insid:[2,3,6,8,11,71,129,135,164,187,189,200,204,205,215,216,222,225,231,236,239,276,290,305,322,324,325,326,327,328,343,348,398,452,453,454,456,457,464,468,479],insight:[6,13],instabl:[236,379,426],instal:[],instanc:[6,11,213,227,324,386,391,411,417,452,474],instantan:[6,63,211,212,226,227,249,253,272,277,280,285,287,290,312,460,472],instanti:[6,11,12,198,391,451],instead:[1,3,6,8,9,11,12,13,17,18,40,41,59,63,70,71,90,117,143,146,168,184,187,194,201,203,204,205,206,208,212,213,233,236,239,240,272,278,288,290,307,325,343,345,346,349,356,360,369,370,382,395,397,404,407,449,457,461,468,470,474,479],institut:[9,230,275],instruct:[3,6,8,11,12,13,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,162,170,171,173,174,175,176,178,179,181,182,184,185,188,195,207,221,224,228,233,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,308,310,321,331,333,334,335,336,339,341,346,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,463,474],insuffici:[3,6,12],insult:249,insur:[3,6,11,12,17,39,40,61,73,102,104,164,165,184,187,188,189,195,209,210,215,220,221,222,223,225,228,233,245,278,279,288,290,305,317,322,326,327,328,330,344,354,356,360,374,387,391,415,421,438,451,452,454,455,459,462,463,471,472,479,480],int_max:3,integ:[3,6,8,11,12,39,40,42,64,68,70,71,113,115,117,119,140,162,164,167,168,170,174,175,179,184,186,187,188,189,199,201,204,205,209,210,211,215,217,223,225,226,227,230,233,234,235,236,272,275,276,279,280,285,290,305,307,309,312,316,317,335,345,348,368,380,381,394,407,419,420,424,426,427,449,451,452,454,462,463,464,468,471,479,480],integr:[],integrate_ulsph:296,intel:[],intel_cpu:[12,16],intel_phi:[12,16],intend:[3,8,12,13,36,226,418,454],intens:[1,3,6,9,63,66,74,75,86,89,90,91,93,103,104,105,106,112,114,116,117,118,119,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,163,192,201,202,203,204,205,206,208,209,210,211,219,222,229,239,247,249,253,287,290,291,305,313,317,319,320,471,472],intepol:479,inter:[14,18,42,61,62,144,167,168,187,211,233,235,248,282,290,345,355,366,464,474,479,481,483],interact:[1,3,6,7,8,9,10,11,12,14,15,16,17,22,29,33,37,39,42,44,50,54,55,57,61,63,65,69,77,79,87,88,92,107,108,110,112,115,116,122,123,124,125,127,128,129,130,131,132,133,135,136,137,138,140,141,143,157,158,162,165,166,167,168,169,170,172,176,177,183,187,192,193,194,209,210,211,224,225,230,231,233,235,239,261,271,273,275,281,283,289,290,296,297,305,306,312,317,321,322,323,326,327,332,333,334,336,340,345,346,353,354,355,356,357,358,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,417,420,421,422,424,426,427,428,435,436,437,439,440,441,442,443,444,445,446,447,449,452,454,456,458,459,463,464,466,471,472,474,481],interatom:[3,4,7,164,187,248,314,315,361,366,382,384,392,407,440,479],intercept:118,interchang:6,interconnect:18,interconvert:384,intereract:39,interesect:326,interest:[1,5,7,8,9,11,13,71,163,273,312,315,346,383,406,419,420,452,479],interf:360,interfac:[],interfer:[249,362],interg:[6,474],intergr:[463,467],interi:406,interior:[3,6,41,326,457],interlac:407,interleav:[6,164,462],intermedi:[6,12,59,188,248,271,339,355,452,453,462,466],intermix:449,intermolecular:362,intern:[0,2,3,5,6,9,11,16,20,21,24,28,32,35,36,39,40,42,63,87,99,101,118,141,144,146,163,171,184,188,189,192,193,194,198,210,214,218,230,242,243,247,249,253,272,290,294,331,333,336,339,343,353,354,429,430,438,452,454,456,459,468,471,472,478,479,480,481],internal_element_set:198,internal_quadratur:198,internet:232,interpenetr:407,interpentr:[430,431,433],interpol:[6,15,38,56,100,184,188,189,198,236,271,345,346,355,366,411,420,432,438,439],interpret:[2,6,11,188,203,388,428,449,452,468,479],interrupt:280,intersect:[3,6,118,189,326,328,457],intersert:326,interspers:353,interstiti:162,intertia:[3,93],interv:[3,6,91,202,233,280,285,286,297,432,449,468,479],intestieti:118,intial:[6,360,362],intiial:[41,459],intiti:[3,304],intra:290,intra_energi:225,intramolecular:[29,225],introduc:[6,9,188,249,280,285,290,339,345,361,376,384,396,400,404,437,468],introduct:[],intsal:16,intuit:348,inv:[118,163,291],invalid:[3,12,71,89,167,261,355,405,406,456],invari:[133,138,140],invent:293,invers:[],invert:[6,168,272],invis:326,invoc:[162,211,360,424,426,452],invok:[1,3,6,7,8,11,12,13,14,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,43,45,46,47,48,49,51,53,54,56,59,63,66,71,74,75,81,87,88,89,90,93,103,104,106,109,110,111,112,117,142,151,158,159,162,164,165,167,168,170,171,173,174,175,176,178,179,181,182,184,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,245,246,248,249,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,281,282,283,284,285,286,287,288,290,291,292,293,294,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,331,333,334,335,336,339,341,344,345,346,347,348,353,355,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,391,392,394,396,397,398,399,400,401,402,403,404,405,406,408,411,412,413,414,416,421,422,424,426,427,428,437,438,439,440,441,443,444,445,446,447,448,451,452,453,455,457,459,462,463,465,466,468,471,472,474,479,480],invokd:3,involv:[3,6,7,8,12,63,108,115,116,117,144,168,192,209,225,236,275,278,283,305,345,352,353,355,365,381,387,437,439,441,450,451,457,459,463,468],ioff:[354,454],ion:[6,7,270,302,317,346,366,377,385,386,407,436,441,447,454,474],ionic:[6,9,367,369,377,384,385,414,474],ioniz:[9,375,384],iparam:[3,210],ipi:[],ipp:[],ir3:163,ir4:163,irregular:[6,41,58,208,212,214,249,290],irrelev:413,irrespect:[405,406],irrevers:218,isbn:446,isel:[345,346],isenthalp:[249,250,251,252],ismail:[345,346,370,400],isn:[3,8,11,12,229],iso:[3,212,218,234,249,250,251,252,253,254,255,277,285,290,474],isobar:[249,250,254,255],isodem:384,isol:[3,167,328],isomorph:273,isotherm:[225,249,250,254,255,277],isotrop:[6,233,277,345,346,368,387,405,406],isovolum:291,isralewitz:294,issu:[1,3,6,9,11,12,13,14,15,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,59,71,73,81,103,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,188,195,198,207,211,212,215,220,221,224,225,228,233,247,249,251,252,253,254,255,256,264,266,267,269,273,277,279,282,290,292,293,304,308,309,310,315,321,327,330,331,333,334,335,336,339,341,346,354,355,358,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,435,437,438,439,440,441,443,445,446,447,454,456,463,466,471,472,479,480],ital:[419,420],itali:13,item:[6,7,8,41,187,189,208],iter:[3,6,12,39,41,63,195,196,207,208,212,218,220,223,231,272,281,282,290,293,312,328,330,344,351,352,353,355,359,449,459,463,468,472,479],ith:[71,117,119,200,201,202,203,204,205,206,307,319,472,479],itself:[2,3,4,6,7,8,9,11,12,13,18,42,59,91,107,155,187,188,189,190,202,213,218,234,244,248,284,290,317,328,330,354,355,376,385,387,391,392,438,452,458,461,462,466,479,483],ityp:[3,115,116,164,197,210,283,444],itype1:116,itype2:116,itypen:116,ivector:8,ivori:189,ixcm:290,ixi:[42,93,290,354,479],ixx:[42,93,290,354,479],ixz:[42,93,290,354,479],iycm:290,iyi:[42,93,290,354,479],iyz:[42,93,290,354,479],izcm:290,izrailev:294,izumi:440,izz:[42,93,290,354,479],j0jt:91,j20:202,j_m:140,jac:[6,170,466],jackson:410,jacobi:3,jacobsen:352,jagreat:13,jame:[9,19],janssen:271,januari:407,jaramillo:[7,9,13,384],jarzynski:294,jatempl:9,jcc:9,jcp:322,jec:13,jeff:13,jello:249,jensen:[233,345],jeremi:[9,409],jerom:9,jewett:13,jiang:[234,474],jiao:[9,13],jiht:[7,9],jik:366,jim:7,jku:7,jmake:12,jmm:140,joannopoulo:247,job:[12,60,293,462],jochim:[249,250],john:[7,13],johnson:[9,13],join:[6,457],joint:[3,275,390],jon:[9,70],jonathan:9,jone:[1,3,6,7,9,10,12,13,45,46,64,87,107,110,192,198,277,305,322,326,346,348,353,362,365,369,370,371,372,374,379,387,389,390,391,394,395,396,397,398,400,401,403,404,410,411,417,421,422,431,436,443,466,474],jonsson:[73,248,352,355],jorgensen:[6,181,376,396,400],joul:478,journal:[158,176,198,283,346,382,419,420,430,431,433],jparam:[3,210],jpeg:[3,12,188],jpeglib:12,jpg:[4,8,12,187,188,189,482],jpg_inc:12,jpg_lib:12,jpg_path:12,jpl:[7,9],jth:479,jtype1:116,jtype2:116,jtype:[3,116,210,444],jtypen:116,judg:468,judici:6,julien:9,jump:[],june:190,just:[3,6,8,9,11,12,13,17,19,22,29,42,44,59,61,91,107,110,116,141,143,157,172,187,201,204,205,214,218,222,239,246,277,279,290,312,317,328,330,332,354,355,360,362,365,373,391,417,443,452,456,458,459,461,462,474,479,482,483],justo:383,jusufi:[377,386],jut:326,jzimmer:9,k11:91,k22:91,k33:91,k_b:234,k_d:474,k_sigma:366,k_ub:20,kadiri:67,kamberaj:290,kappa:[6,91,313,376,396,445,446],kappa_:317,karplu:87,karttunen:236,kate:[],kayser:377,kbit:189,kboltz:305,kbp:189,kbt:285,kcal2j:91,kcal:[230,463,474,478],kde:13,ke_eta_dot:249,ke_etap_dot:249,ke_omega_dot:249,keblinski:376,kecom:144,keef:118,keep:[3,7,12,59,71,182,204,210,214,231,272,288,315,320,345,353,376,404,427,449,454,460,462,468,472,479],keflag:3,kei:[6,17,59,305,468],keir:13,kelchner:70,kelkar:320,kelvin:478,kemper:[282,375],kepler30:17,kepler32:17,kepler35:17,kepler37:17,kepler:[1,12,14,15,17,360],kept:[6,192,253,314,315,474],kernel:[7,13,17,40,100,129,135,198,226,227,297,429,430,431,432,433,434,464],kernel_radiu:454,keword:188,keyboard:12,keyword:[],keywrod:384,kforc:474,khaki:189,khersonskii:140,kick:[195,196,197,220,324],kilogram:478,kim:[],kimviri:[3,392],kind:[1,2,3,6,7,8,9,11,12,17,39,40,41,42,61,62,63,73,117,119,144,187,192,199,201,202,203,208,211,213,217,225,228,246,290,293,305,312,327,355,357,359,366,384,419,420,444,449,454,459,460,467,468,474,479],kinemat:[9,405,406],kinet:[3,6,8,9,63,82,83,84,85,87,91,94,95,96,97,98,112,141,142,143,144,145,146,147,149,150,151,152,153,154,156,157,192,199,201,212,218,229,233,245,247,249,250,251,252,253,254,255,277,280,305,313,320,321,353,384,449,468,472,474],kiss:12,kjl:339,klahn:316,klapp:345,klein:[6,9,198,213,249,250,268,290,396,422],kloss:7,kmax:[3,118,291,345],knc:17,knock:317,know:[3,11,12,41,63,107,116,192,218,232,234,261,305,353,383,392,442,452,455,458,463,474],knowledg:[4,8,188,392],known:[3,12,140,188,272,281,290,314,451,468,480],kohlmey:[7,9,13,18,345,346],kokko:[],kokkos_arch:17,kokkos_cuda:[12,17],kokkos_cuda_opt:17,kokkos_debug:17,kokkos_devic:17,kokkos_omp:[12,17],kokkos_pg:17,kokkos_phi:[12,17],kokkos_use_tpl:17,kolafa:346,kollman:[6,170,466],kondor:418,kone:[314,315],kong2011:272,kong:[9,13,272],konglt:9,koning00a:314,koning00b:314,koning96:[314,315],koning97:315,koning99:314,kooser:13,koskinen:352,kosztin:294,krau:13,kremer:[45,46,466],kress:[408,409],kspace:[],kspace_modifi:[],kspace_styl:[],kspce:12,kspring:248,kstart:289,kstop:289,kth:[226,273],kub:20,kubo:[6,91,313],kumagai:440,kumar:[9,405,406],kuronen:417,kurt:275,l12:407,l_box:384,l_skin:317,la3:163,lab:[5,7,12,111,416],label:[],laboratori:[0,247,280],lack:[3,247,384],lackmann:366,ladd:[267,315],lafitt:410,lag:317,lagrang:[130,131],lagrangian:[6,122,123,124,125,127,128,129,130,131,132,133,135,136,137,138,198,247,280,281,296,297,424,426,474],lagrangian_posit:[247,280],lagrangian_spe:[247,280],lai:448,lambda1:[439,440,441],lambda2:[439,440,441],lambda3:[439,441],lambda:[87,111,118,158,163,236,291,314,315,317,361,383,404,437],lambda_fin:314,lambda_initi:314,lamda:[3,53,305],laminar:434,lamm:6,lammps2pdb:[6,13],lammps_clos:6,lammps_command:6,lammps_extract_atom:6,lammps_extract_comput:6,lammps_extract_fix:6,lammps_extract_glob:6,lammps_extract_vari:6,lammps_fil:6,lammps_gather_atom:3,lammps_get_coord:6,lammps_get_natom:6,lammps_n:[6,12],lammps_open:6,lammps_potenti:[373,375,465],lammps_put_coord:6,lammps_quest:[6,223],lammps_scatter_atom:3,lammps_set_vari:6,lammps_sppark:6,lammpsplot:13,lammpspotenti:373,lammpstrj:[455,459,474],lammpsviri:[3,392],lamoureux:[6,218,442,474],lane:1,lang:474,langevin:[],langevin_drud:[149,217],languag:[6,11,12,17,452,479],lanl:9,lapack:12,laps:318,laptop:7,larg:[0,1,3,5,6,7,8,9,10,12,13,14,16,18,39,40,41,58,59,70,71,109,116,141,144,147,152,164,165,166,176,184,186,187,188,189,201,204,205,208,211,212,214,215,219,225,236,249,261,267,272,275,276,280,285,287,288,289,290,293,302,305,313,317,318,320,322,326,339,345,346,351,353,356,360,374,380,384,387,388,395,411,415,421,438,449,452,454,456,457,461,463,468,471,474,480,483],larger:[1,2,3,6,11,12,13,39,41,56,59,70,71,116,164,166,188,202,203,206,215,229,236,249,267,268,276,281,285,289,290,291,301,305,312,317,321,322,323,326,345,346,351,352,353,355,356,357,360,366,374,376,377,384,388,396,400,406,411,415,436,443,454,458,459,462,463,468],largest:[3,6,12,39,71,162,164,219,345,353,357,435,438,454,456,462,463,473,479],laroch:285,laser:317,last:[1,2,3,5,6,11,12,15,16,19,38,56,59,61,71,110,117,141,162,184,187,188,189,190,191,201,202,203,204,205,206,208,219,248,288,291,302,305,330,343,353,354,355,356,360,364,365,366,367,374,375,380,382,386,387,389,390,394,397,399,401,402,403,406,410,412,421,428,435,438,442,443,445,446,449,450,452,454,455,459,461,462,466,468,469,472,479],lat:407,late:5,latenc:[10,230],later:[6,11,12,16,17,40,59,71,104,166,168,202,215,253,267,275,294,312,328,330,345,353,354,359,360,362,366,452,454,456,458,468,471,479,481],latest:[7,201,202,203,204,205,206,291,456],latex:8,latgen:272,latitud:140,lattc:407,latter:[2,6,11,12,14,15,16,17,18,41,42,87,143,189,193,194,200,201,204,205,208,212,231,240,249,251,252,254,255,275,277,279,281,283,290,305,321,326,344,354,366,368,369,370,371,372,379,396,400,404,414,422,442,449,451,452,457,460,471,479,482],lattic:[],launch:[1,3,6,11,12,18,360,451,452],laupretr:339,lavend:189,lavenderblush:189,lavgevin:214,law:[6,247,358,424,426],lawngreen:189,layer:[6,9,71,192,204,313,317,320],layout:[1,3,17,166,451,454,463],lb_fluid:236,lbl:[7,9,162],lbnl:9,lbtype:236,lcbop:[],ld_library_path:[11,12],ldfftw:12,ldrd:7,lead:[2,3,6,12,22,25,39,41,44,59,61,77,87,116,158,162,168,172,189,193,194,203,208,215,227,236,253,280,290,293,305,312,313,320,332,339,345,350,355,360,373,376,396,400,402,426,448,454,464,474,479,480],least:[3,6,12,18,71,118,163,199,204,227,275,279,321,356,360,391,438,443,452,479],leav:[3,7,11,12,16,17,21,41,57,141,154,171,208,212,215,249,251,252,254,255,277,290,293,331,411,454,458,466],lechman:305,lectur:294,led:[3,5],lee2:407,lee:[198,407],left:[6,11,12,41,107,183,188,189,211,231,270,305,328,330,348,442,454,456,461,479,483],leftmost:[41,208],legaci:12,legal:7,lehoucq:416,leimkuhl:325,leiu:380,lemonchiffon:189,len:464,lenart:[377,386],length:[3,6,8,11,12,18,21,38,39,40,41,44,53,54,55,56,58,59,61,65,68,69,71,74,79,80,82,87,88,89,90,91,92,103,105,107,108,112,114,115,117,118,119,128,130,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,160,162,163,166,171,184,187,188,189,192,199,203,205,206,208,209,210,211,212,214,225,228,236,247,248,249,250,253,261,271,277,287,290,291,293,302,305,312,316,317,319,322,326,346,348,351,353,355,356,358,363,366,367,369,376,377,381,384,386,390,394,396,407,411,419,420,429,438,439,445,446,454,457,462,464,471,472,474,479],lengthi:225,lennard:[1,3,6,7,9,10,12,45,46,87,107,110,192,277,305,322,326,346,348,353,362,365,369,370,371,372,374,379,387,389,390,391,394,395,396,397,398,400,401,403,404,410,411,421,422,431,436,443,466,474],lenoski:[408,409],less:[1,3,6,13,14,15,16,17,18,38,41,56,57,58,59,76,108,115,116,143,157,184,189,201,203,204,205,206,208,210,211,212,214,215,222,231,247,249,271,283,285,291,305,324,325,327,346,348,353,357,360,366,371,387,388,405,406,411,421,437,438,441,446,454,479,480],let:[1,11,12,38,56,147,175,184,202,293,305,323,360,374,438,463,467,474,481],lett:[140,152,227,234,236,247,285,294,314,315,352,366,382,384,387,404,427,474],letter:[2,12,41,57,59,189,208,217,218,234,273,330,359,418],level:[2,3,8,11,12,14,17,187,188,193,194,230,246,248,249,330,346,359,366,370,371,396,397,400,410,419,420,451,463,468,479],lever:435,levin:388,lewi:295,lexicon:7,lgr_po:[247,280],lgr_vel:[247,280],lgvdw:420,li1:163,liang:375,lib:[1,3,9,11,12,14,15,17,284,360,375,392,452,455],libatom:[9,418],libcolvar:12,libdir:11,libfftw3:12,libgpu:15,libjpeg:12,liblammp:[11,12],liblammps_foo:[11,12],liblammps_g:[11,12],liblammpscuda:14,libmpi:11,libmpi_stub:12,libmpich:12,libpackag:12,libpng:12,librari:[],librt:17,licens:[0,7,8,12,188],lie:[6,291],lieu:345,life:7,lifo:8,ligand:302,liggght:7,lightblu:189,lightcor:189,lightcyan:189,lightest:312,lightgoldenrodyellow:189,lightgreen:189,lightgrei:189,lightli:302,lightpink:189,lightsalmon:189,lightseagreen:189,lightskyblu:189,lightslategrai:189,lightsteelblu:189,lightweight:305,lightyellow:189,like:[3,4,6,7,8,9,11,12,14,16,17,18,39,42,54,59,148,155,188,190,195,212,213,215,218,220,230,233,234,235,247,249,250,254,255,260,261,266,267,268,269,271,277,279,280,281,285,290,291,305,307,308,309,310,311,312,313,320,321,322,325,326,327,330,345,348,352,355,360,366,374,379,380,384,385,388,390,391,401,402,407,427,438,441,445,446,451,452,454,455,456,457,459,464,469,472,474,479,480],likelihood:[118,163,211],likewis:[1,6,10,12,15,18,39,41,71,88,115,198,208,209,210,225,233,234,249,250,253,268,285,305,308,309,310,346,355,361,365,366,376,382,385,436,452,454,466,479],lime:189,limegreen:189,limit:[],limit_eradiu:384,limit_veloc:[296,297],lindahl:345,line:[],linear:[],linearli:[10,117,189,214,272,322,324,325,327,354,355,357,454,479],lineflag:[6,454],lineforc:[],linen:189,linesearch:[8,351],ling:[9,13],lingo:[11,392],link:[5,6,7,8,9,11,12,13,14,15,17,18,22,37,44,55,63,172,183,188,192,210,230,234,275,284,286,294,302,332,340,363,373,407,418,419,420,436,442,452],linker:12,linkflag:[12,16],linux:[10,11,12,15,188,190,230],linuxamd64:455,liouvil:249,lip:13,lipid:[4,9,10,13,29,290],lipton:275,liquid:[6,7,9,29,39,40,41,59,87,141,150,162,208,212,214,225,249,277,280,285,312,379,411,414,440,463],lisal:435,lism:9,list:[],listen:[230,232],listfil:395,liter:[454,465],literatur:[8,407,437],lithium:384,littl:[1,3,12,64,249,356,449,457],littmark:[407,436,441,447],liu:[390,420],lj1043:[],lj126:[],lj12_4:422,lj12_6:422,lj1d:272,lj6:3,lj93:[],lj96:[],lj9_6:422,lj_flag:362,llnl:[5,7],lmp1:11,lmp2:11,lmp2arc:[],lmp2cfg:[],lmp2vmd:[],lmp:[11,452,474],lmp_auto:12,lmp_cuda:[14,17],lmp_foo:12,lmp_g:[6,11,12,13,17,344],lmp_gpu:15,lmp_ibm:[12,344],lmp_inc:12,lmp_intel_cpu:16,lmp_intel_phi:16,lmp_kokkos_cuda:17,lmp_kokkos_omp:17,lmp_kokkos_phi:17,lmp_linux:[4,6,12],lmp_mac:12,lmp_machin:[1,12,14,15,16,18,19,360],lmp_mpi:[12,273],lmp_mvapich:17,lmp_omp:18,lmp_openmpi:17,lmp_opt:19,lmp_win_mpi:12,lmp_win_no:12,lmpptr:[11,452],lmpqst:223,lmpsdata:13,lmptype:[3,12,223],load:[1,3,4,7,9,11,12,16,17,18,41,188,190,192,208,230,280,360,375,451,452],loadabl:11,loca:189,local:[],localhost:230,localized_lambda:198,localonli:12,localvector:63,locat:[3,6,8,9,11,12,27,61,116,118,162,163,173,184,187,215,216,236,304,315,326,351,373,376,385,386,396,398,400,442,451,454,455,457,464,466],lock:[3,359,479],lockstep:[212,249,277,290],log:[],logarithm:[136,137,479],logfil:[0,3,6,12,278,349,450],logfreq2:479,logfreq:[189,461,470,479],logic:[7,11,12,17,41,164,208,328,330,449,451,452,455,463,468,479],lomdahl:[253,398],london:[13,225,420],lone:[419,420],longer:[1,3,6,8,12,13,54,116,187,189,200,201,202,203,204,205,206,209,225,233,271,275,280,290,293,312,322,326,328,351,360,362,388,451,459,463,468,476],longest:[41,208,209,356,443],longitudin:302,look:[1,3,6,8,11,12,18,54,61,187,188,191,373,427,438,474,479],lookup:[3,39,184,411,438],lookup_t:291,loop:[3,4,6,7,11,12,18,39,42,65,68,69,79,88,92,108,115,116,141,188,201,204,205,209,210,219,312,328,330,344,347,353,355,356,358,359,381,449,450,452,458,459,462,463,468,473,479,480],loopa:[330,344,359],loopb:[330,344,359],loopvar:479,lopez:[249,250],lorant:281,lorentz:163,lose:[6,58,59,166,212,214,234,249,388,454],loss:[6,478],lossi:188,lossless:188,lost:[3,12,13,57,102,215,288,295,305,411,454,455,456,463,471],lot:[18,294,345],low:[1,3,6,7,12,41,147,162,187,188,208,218,234,267,285,290,313,320,346,420,438,446,468,474],lower:[2,3,6,9,11,12,41,57,59,71,88,153,186,188,189,202,203,204,205,208,212,218,230,233,234,236,249,280,285,313,320,322,323,328,329,345,348,359,377,407,468,475,477,480],lowercas:188,lowest:[140,330,354,464,468,469,479],ls_:134,lsfftw:12,lsurfac:317,lu3:163,lubric:[],lubricateu:[],lubricuteu:258,lucki:12,luigi:13,lumped_lambda_solv:198,lussetti:313,lustig:[7,13],lybrand:346,lyulin:339,m4v:188,m_c:474,m_d:474,m_eff:[323,388],m_fill:3,m_i:303,m_lambdai:416,m_taubi:416,m_u:236,m_v:236,m_yield_stress:416,mac:[12,14],mac_mpi:12,mach:[9,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,295,296,297,298,301,464],machin:[1,3,4,6,7,10,11,12,14,15,16,17,18,19,187,188,230,318,345,351,353,358,360,451,456,461,462,463,480,483],mackai:[9,236,238,239,240],mackerel:[6,20,170,234,371,466,474],maco:188,macro:17,macroparticl:381,macroscop:[7,228,247,416],made:[3,6,11,12,15,16,33,41,42,50,64,165,177,187,188,190,192,193,194,199,208,215,219,230,239,276,284,288,290,315,328,337,356,360,387,388,391,419,421,428,451,456,458,464,467,475,477,480,481],madura:[6,396],magazin:382,magda:322,magenta:189,magic:[3,11],maginn:[158,320],magnitud:[6,70,105,108,113,164,186,187,189,215,216,228,229,231,233,294,302,304,305,312,323,346,353,379,388,464],mai:[0,1,2,3,6,7,8,11,12,13,14,15,16,17,18,29,38,39,40,41,56,58,59,61,63,65,68,69,71,79,86,87,88,89,90,92,102,103,105,107,108,109,110,112,113,114,115,117,118,119,140,141,143,144,152,153,157,158,162,163,164,165,166,167,168,183,184,186,187,188,189,190,192,193,194,195,197,199,201,202,203,204,205,206,207,208,209,210,212,214,215,218,219,220,222,225,226,227,229,230,231,233,234,235,236,237,239,244,245,246,247,249,250,253,261,264,272,273,276,277,278,279,280,282,285,287,288,289,290,291,292,293,294,296,297,299,305,307,308,309,312,313,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,343,344,345,346,348,351,352,353,354,355,356,357,358,360,363,365,366,374,380,384,388,391,392,402,404,406,407,408,409,411,419,420,422,427,435,438,449,450,451,452,454,455,456,457,458,459,460,461,462,463,464,466,468,471,472,474,479,480,481,483],mail:[3,7,9,12,328],main:[3,6,8,12,230,236,290,314,315,382,442,452,469],mainboard:1,mainli:[360,414],maintain:[8,9,13,39,149,210,214,267,305,318,352,361,382,463,466],major:12,make:[],makefil:[3,7,9,11,12,13,14,15,16,17,18,19,187,346,360,452],makelist:12,maks:388,malloc:[3,12],manag:[5,8,12,187,230,273,307,463],manbi:427,mandadapu:198,mandatori:[8,213],manh:366,mani:[1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,38,39,41,42,56,61,63,68,71,88,91,102,116,144,164,165,184,186,187,188,189,190,192,193,194,195,199,200,201,202,203,204,205,206,208,209,210,211,212,214,215,222,225,226,229,230,236,237,245,247,249,250,253,261,270,271,272,276,279,281,282,283,285,287,290,291,293,305,316,317,319,328,330,345,353,354,355,356,358,360,373,375,381,384,386,390,391,427,436,438,439,441,452,454,456,458,459,461,462,463,464,466,467,468,469,479,480,483],manipul:[12,41,208,230,376,417,465],manner:[2,3,6,9,11,17,41,141,160,193,194,195,196,203,208,214,219,220,223,229,233,234,249,254,255,266,267,269,284,308,309,310,313,314,315,320,322,326,330,346,354,355,359,360,382,384,391,394,405,443,449,451,454,455,456,457,459,463,468],manolopoulo:232,mantissa:3,manual:[0,1,3,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,58,63,68,71,109,112,118,142,143,145,146,147,150,151,152,153,154,156,157,163,170,171,173,174,175,176,178,179,181,182,184,187,188,190,195,204,207,221,224,228,232,233,234,248,249,251,252,253,254,255,256,259,262,264,265,266,267,269,277,279,282,290,291,292,293,308,309,310,320,321,330,331,333,334,335,336,339,341,346,355,359,360,361,362,364,365,367,368,369,370,371,372,374,375,376,378,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,449,463,467,468,469,472,479],manybodi:[3,7,8,9,12,141,353,361,362,366,375,382,385,391,393,413,417,437,439,440,441,466],map:[2,3,11,12,17,18,39,59,64,71,118,122,140,152,163,164,186,188,189,198,204,272,289,345,346,348,355,361,362,366,375,382,383,385,391,392,393,407,408,409,411,413,417,418,419,420,427,435,437,438,439,440,441,451,454,456,468,479],map_fil:272,mapflag:12,march:407,margin:468,mari:13,mark:[389,404,424,426],marker:278,maroon:189,maroonmpi:11,marrink:389,marsaglia:[3,226,227,233,234,285],marseil:9,martin:[272,407],martinez:199,martyna:[249,250,290,463],mashayak:17,mask:[3,271,479],mask_direct:198,mass:[],mass_matrix:198,massdelta:293,massiv:[0,188,236,273,313,320],massless:[6,234,346,376,396,400,404,474],masstot:290,master:[3,355,449,468],mat:[67,198,375,440],match:[3,6,8,9,11,12,17,38,41,56,59,71,116,147,184,189,190,208,211,214,230,249,250,267,287,291,305,312,345,346,366,390,402,407,418,419,420,438,447,448,452,454,455,456,459,463,468,474,479],mater:[73,361,409,417],materi:[6,7,9,59,70,124,125,167,197,198,214,225,231,247,271,277,285,313,317,323,376,382,383,384,388,392,407,408,416,419,420,423,424,425,426,449,454,468,474,478],material_fil:198,math:[],mathemat:[118,140,163,164,193,194,195,196,207,212,220,226,228,229,231,233,234,278,292,299,308,309,310,322,325,327,427,450,457,464,480],mathrm:234,mathtt:234,matlab:[],matric:[9,140,227,272,387],matrix:[3,6,9,91,162,202,212,227,272,281,345,348],matter:[6,9,12,39,57,59,71,146,204,317,356,362,378,382,384,407,422,439,441,447],mattson:[112,141],max2theta:163,max:[3,6,8,12,15,18,71,117,189,203,208,210,212,215,276,293,305,330,348,351,353,355,356,360,449,454,468,472,479],max_alpha:8,max_cell_s:381,max_group:3,max_nn:297,max_travel:298,max_vel:[296,297],max_veloc:297,maxangl:225,maxbodi:3,maxbond:[3,210],maxedg:162,maxev:[353,449,468],maxfoo:8,maxim:[312,355],maximum:[3,6,8,15,17,25,41,42,45,53,54,57,59,61,116,117,118,121,162,163,165,166,186,187,197,202,203,208,210,214,215,219,225,261,271,276,281,293,295,296,297,305,318,345,346,351,355,356,363,366,381,386,405,406,454,457,462,472,479,480],maxit:[281,353,449,468,472],maxsize_restart:8,maxwel:[17,270],maxwell50:17,maxwell52:17,maxwell53:17,maxx:417,mayb:13,mayer:[7,367,369,436],mayo:[6,7,13,25,341,390,466],mbt:171,mbyte:[12,285],mcdlt:[154,229],mcgraw:273,mdash:474,mdregion:198,mdump:[41,208],meain:6,meam:[],meam_sw_splin:409,meamf:407,mean:[1,2,3,4,6,7,8,10,11,12,17,22,34,37,38,39,41,42,44,52,54,55,56,57,59,61,63,68,71,76,77,82,84,85,87,91,103,104,105,112,113,114,115,116,117,140,141,142,143,145,146,147,150,151,152,153,154,156,157,158,164,165,167,168,170,172,180,183,184,185,186,187,188,189,190,192,193,194,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,220,223,225,226,227,228,229,231,233,234,235,239,246,249,251,252,253,254,255,261,266,267,269,271,273,275,276,277,279,285,287,288,290,292,293,294,299,302,305,307,308,309,310,312,313,316,317,319,320,321,322,323,324,325,326,327,328,332,333,334,336,338,340,345,346,348,350,351,353,354,355,356,358,360,363,367,369,370,371,373,376,380,381,382,384,387,388,390,391,394,396,397,400,407,410,411,414,415,417,419,420,421,422,437,438,439,440,441,443,446,448,449,451,452,454,455,456,457,458,459,460,461,462,463,464,465,466,468,469,471,472,474,478,479,480,481,483],meaning:[116,124,125,127,130,134,391],meaningless:[67,312],meant:[6,290,442,458],measur:[],mech:416,mechan:[6,8,9,11,12,17,126,198,229,273,284,366,384,392,398,424,426,448,452,454],mechanic:284,mechanim:122,media:188,medium:446,mediumaquamarin:189,mediumblu:189,mediumorchid:189,mediumpurpl:189,mediumseagreen:189,mediumslateblu:189,mediumspringgreen:189,mediumturquois:189,mediumvioletr:189,mee:312,meet:[3,12,165,188,189,210,211,318,459],mehl:361,meloni:39,melros:[405,406],melt1:190,melt2:190,melt3:190,melt:[4,10,211,272,366,440],mem:15,member:[167,275,366],membran:[29,270,446],memori:[1,3,5,6,7,8,9,12,15,16,17,18,39,40,60,71,189,201,204,205,226,227,285,317,343,356,360,366,411,415,420,451,454],memory_usag:8,mendelev:382,mention:[1,6,7,11,42,214,229,236,253,322,348,355,362,419,420,456,479],menu:[188,230],mep:[248,355],mer:[4,10,211],meremianin:140,merg:[3,5,454],merz:[6,170,466],mescscop:416,mesh:[1,2,3,6,7,8,10,12,40,41,42,118,134,163,198,208,236,291,301,345,346,381],meshless:9,meso:[],meso_:[],meso_cv:464,meso_rho:[],meso_t:[],mesocop:40,mesoscal:7,mesoscop:[7,99,100,101,242],mess:[3,464],messag:[],met:[8,41,116,208,330,344,346,353,355,359,443,462],metadynam:[9,13,213],metal:[3,5,7,10,40,59,71,153,164,197,198,204,205,214,215,229,231,280,281,285,321,322,324,325,327,346,348,357,361,362,366,375,382,383,384,385,391,393,407,408,409,417,418,437,439,440,441,457,471,472,473,478],meter:[357,478],methan:[280,285],methanol:4,methin:339,method:[1,3,5,6,7,8,9,11,12,13,16,17,19,38,39,40,41,56,64,87,91,110,141,184,192,193,194,198,208,213,223,233,236,240,244,247,249,272,273,280,281,282,283,285,290,293,294,312,313,314,315,320,345,346,351,352,353,355,360,361,363,366,375,376,382,384,385,407,408,409,411,417,436,438,449,451,452,454,455,457,468,474],methodolog:[6,73,141,273,345],metin:[7,9],metric:[3,10,64,457,472],metropoli:[199,225,469],mezei:87,mf1:190,mf2:190,mf3:190,mg2:163,mglob_default_function_attr:12,mgoh:413,miai:285,mic:[12,17],micel:[4,13,303],micelle2d:[],michael:[9,13,409],michel:13,micro:[3,478],microcanon:[256,257,259,260,262,264,265],microelast:416,micromet:478,micropor:225,microscal:405,microsec:478,microsecond:478,mid:[5,59,214,435],middl:[3,6,8,16,22,41,44,77,87,116,153,158,162,168,171,172,189,193,194,200,208,276,288,289,290,313,320,331,332,350,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,405,406,407,408,409,410,412,414,416,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,445,446,447,448,452,462,463,464],middlebondtors:[3,171,454],midnightblu:189,midpoint:435,mie:[],might:[3,4,6,7,8,12,14,25,71,223,225,227,290,452,462,479],migrat:[3,8,17,41,42,59,61,65,69,79,92,108,115,187,192,208,271,279,285,305,345,357,360,462,481,483],mikami:[6,249,250],mike:[7,9,13,15,16],mil:[9,382],mill:352,miller:290,million:[3,7,10,39,41,71,208],mimic:[6,11,42,54,234,247,276,376,386,396],mimim:[212,355],min2theta:163,min:[3,4,6,8,12,117,140,189,203,345,348,435,449,468,479],min_cap:3,min_cg:8,min_clearstor:8,min_dof:8,min_modifi:[],min_nn:297,min_popstor:8,min_post_forc:8,min_pre_forc:8,min_pushstor:8,min_setup:8,min_setup_pre_forc:8,min_step:8,min_stor:8,min_styl:[],minarea:162,mincap:420,mind:[7,226,272],mine:[12,88,154,155,192,328,476],minim:[],minima:[176,341],minimi:[355,443],minimizaiton:355,minimizi:285,minimum:[3,25,26,27,42,45,57,59,86,105,117,162,163,165,167,173,186,187,188,197,203,212,213,219,232,248,287,289,291,295,297,301,305,322,326,330,341,345,348,351,352,353,355,356,371,384,387,389,390,396,398,400,405,406,420,422,435,449,462,468,479,480],minlength:162,minmiz:[8,212],minn:9,minord:[3,345],mintcream:189,mintmir:[7,281,376,436],minu:[12,59,144,214,330,355,479],minut:[4,8],mirror:[61,324],misc:[],miscellan:[2,198],mise:[133,138],mishin:[361,436],mismatch:[3,6],miss:[3,5,12,167,203,225,261,285,305,395,411,471,472],mistak:[3,479],mistakenli:3,mistyp:3,mistyros:189,mitchel:[6,111,146,345,346,378,416],mitchell2011:416,mitchell2011a:416,mitur:364,mivi2:285,mix:[1,3,6,9,14,15,16,71,115,203,204,318,345,346,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,452,454,467,474,481],mixtur:[6,40,249,290,305,327,374,407,454],mixture_ref_t:407,mjpeg:188,mkdir:465,mkl:12,mkmk:272,mkv:188,mldivide3:3,mlpark:7,mlutipl:206,mn2:163,mn3:163,mn4:163,mo3:163,mo5:163,mo6:163,mobil:[6,105,141,142,143,145,150,157,188,290,328,329],moccasin:189,mod:[],mode:[1,3,6,9,11,12,13,14,15,16,17,18,61,66,75,88,90,93,104,106,114,116,117,144,159,161,162,163,187,188,189,203,206,213,214,223,227,249,273,285,294,305,345,357,360,376,384,451,456,461,463,472,478,483],model:[],model_ar_p_mors:392,modern:[12,233,235],modest:[1,358],modif:[6,13,87,407,421,441,474],modifi:[],modify_param:8,modin:198,modul:[3,9,11,12,13,213,285,452],modular:8,modulo:[3,479],modulu:[277,388,407,416,423,425],mofil:455,mol1:479,mol:[3,9,71,113,164,166,167,187,189,213,215,225,230,233,276,279,290,293,301,307,379,387,422,463,464,474,479],molchunk:[66,75,90,93,104,106,144,159,161,201],mole:[199,382,478],moleclu:[209,210,215,222],molecul:[],molecular:[0,2,3,5,6,7,8,9,12,13,39,40,53,71,108,113,115,142,143,145,147,150,151,152,153,156,157,164,165,166,167,168,176,187,190,198,210,213,225,232,272,273,280,284,285,289,294,316,317,346,354,363,364,366,370,381,384,391,436,454,455,456,458,459,463,464,466,472,473,474,479],molfil:[],molfrac:[215,276],molnar:294,molp:109,moltempl:[],mom:[6,91,289,480],momementum:[143,251,254,257,258,259,266],momemtum:66,moment:[3,6,40,42,82,84,85,106,113,143,157,164,185,187,233,236,239,264,276,290,303,354,379,383,454,464,474,478],momenta:[227,258,320,384],momentum:[],momon:211,monaghan:[9,430,431,433],monitor:[3,6,96,97,147,212,214,215,222,230,233,247,249,276,278,280,290,293,305,353,355,379,472],mono:[73,405],monodispers:[3,323,368,388,405,406],monom:[13,54,211],monoton:[3,294,316,355,468],monoval:346,mont:[6,7,9,192,199,211,225,290,312,381,436],montalenti:[449,468],month:0,moor:[17,141],more:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,58,59,61,62,63,64,65,67,68,69,70,71,72,77,78,79,80,83,86,87,88,90,92,96,97,98,99,100,101,102,103,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,146,147,148,150,151,152,153,155,156,157,158,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,222,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,271,272,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,301,305,307,308,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,343,345,346,348,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,449,450,451,452,454,455,457,458,459,460,461,462,463,464,465,466,467,468,469,471,474,479,480,481,482,483],morefoo:8,moreov:[209,210],morri:[],morriss:[152,267],mors:[],morse_f:438,mosel:352,mosi2:407,moskalev:140,most:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,18,19,37,39,41,55,71,108,152,162,183,187,188,189,201,203,204,205,206,208,209,210,212,229,249,250,273,278,279,280,281,290,291,318,320,328,330,340,346,352,356,358,360,362,384,387,407,418,419,420,441,449,450,451,456,463,468,472,479,481],mostli:[8,9,11,13,71,166,188,356,454,463,466,479,482],motiion:6,motion:[3,6,7,9,42,86,97,142,143,145,147,149,150,151,152,153,154,156,157,214,218,227,236,239,240,246,249,250,253,267,271,273,275,285,289,290,313,317,323,326,355,379,384,405,406,457,463,474],motiv:271,mous:230,mov:188,move:[],move_tri_surf:134,movement:[3,6,12,246,312,353,472],movi:[],mp4:188,mpeg:188,mpg:188,mpi4pi:11,mpi:[],mpi_allreduc:[290,452],mpi_barri:1,mpi_cart:451,mpi_cart_cr:451,mpi_cart_get:451,mpi_cart_rank:451,mpi_cart_shift:451,mpi_comm:6,mpi_comm_world:11,mpi_get_processor_nam:451,mpi_inc:12,mpi_lib:12,mpi_lmp_bigint:3,mpi_lmp_tagint:3,mpi_path:12,mpi_wtim:12,mpicc:11,mpich2:12,mpich:[12,14,15,16,17,18,360],mpicxx:[12,16,17],mpiexec:[12,14,15,16,17,18,360],mpiio:[3,187,189,456,461,483],mpirun:[6,11,12,14,15,16,17,18,19,273,344,360],mplayer:188,msd:[],msi2lmp:[],msi:13,msm:[],msmse:[118,163,291],msst:[],mtchell2011:416,mtchell2011a:416,mtd:213,mth:[8,119,189,471],mtk:[249,250,253],mtotal:354,mu_j:29,muccioli:387,much:[1,3,6,11,39,187,188,212,280,312,356,357,360,387,421,449,452,468,474,479],mui:[113,187,220,307,454],mukherje:[7,9,275],mulder:316,muller:[6,91,192,313,320,410],mult:8,multi:[],multibodi:[3,61,275],multicent:384,multicor:[1,451,467],multidimension:13,multielectron:363,multilevel:[345,346],multiphys:11,multipl:[],multipli:[3,87,91,116,172,183,193,194,202,233,236,271,277,348,353,362,454,479],multiprocessor:360,multiscal:11,multisect:[41,208],multistag:87,multitud:7,mundi:268,munich:9,murdick:366,murti:440,murtola:345,must:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,56,57,59,61,62,71,82,84,86,87,104,107,109,112,115,116,117,118,119,143,146,153,157,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,184,185,186,187,188,189,190,193,194,195,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,218,220,223,225,226,227,229,230,231,232,233,234,236,237,238,239,240,244,245,246,247,248,249,250,251,252,253,254,255,257,258,259,261,264,266,269,271,275,276,277,278,279,280,281,283,285,287,288,289,290,291,292,293,299,301,302,304,305,308,309,310,312,313,315,316,317,319,320,322,323,324,325,326,327,328,330,331,332,333,334,335,336,337,339,341,345,346,348,350,353,354,355,356,357,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,424,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,449,450,451,452,454,455,456,457,459,461,462,463,464,465,468,469,471,472,474,478,479,480,481,483],mutli:6,mutlipl:454,mutual:[3,348],mutut:463,muvt:225,mux:[113,187,188,220,307,454],muz:[113,187,220,307,454],mv2_comm_world_local_rank:12,mvapich2:[17,360],mvapich:12,mxn:[12,273],my_ga:225,my_one_wat:225,my_post_process:465,my_qeq:281,my_setup:465,my_swap_region:199,myblock:[215,276],mybox:166,mychunk1:114,mychunk2:114,mychunk:[6,66,75,90,93,104,106,144,159,161],mycmap:454,mycom:203,mydump:[187,189],myer:[5,7],myfil:[451,479],myfix:[199,469],myflux:91,myforc:[187,482],myhug:253,myke:91,mymol:[40,293,354],mympi:11,mymultipli:[452,479],myn:452,mype:91,mypi:479,mypress:244,myramp:141,myrdf:[116,206],myregion:328,myrigid:[83,98,276],mysocket:232,myspher:[189,326],mystr:330,mystress:91,mytemp:[2,102,142,143,145,147,148,150,152,157,244,330,344,359,471,480],myz:454,n_dephas:449,n_f:[280,285],n_hbond:390,n_ij:388,n_ion:317,n_k:226,na1:163,nabla:317,nacl:[4,6,407],nacl_cs_x0:6,nakano:[281,283,355],namd:[7,9,187,230],name1:[158,214],name2:[158,214],name:[0,1,2,3,5,6,8,9,11,12,13,33,42,50,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,177,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,251,252,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,272,273,274,275,276,277,278,279,280,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,318,319,320,321,322,323,324,325,326,327,328,329,330,337,343,344,346,347,349,354,355,359,361,362,366,369,382,383,385,387,388,391,392,393,395,407,408,409,413,417,419,420,427,437,439,440,441,442,444,451,452,454,455,456,457,461,464,467,469,470,472,474,479,480,481,482,483],namespac:[6,8,12],nan:3,nangl:[3,454],nangletyp:[354,454,464],nano:[290,478],nanoindent:70,nanolett:290,nanomet:[187,189,478],nanoparticl:[208,290],nanosec:478,nanosecond:478,nappli:223,narea:3,narrow:[6,184],narulkar:[439,441],nasa:7,nasr:272,natdef:3,nation:[0,7,12,111,416],nativ:[1,6,7,12,16,17,187,190,455],natoli:[9,19],natom1:115,natom2:115,natom:[6,11,39,354,452,454,471,472,479],nattempt:276,natur:[6,9,140,214,249,271,285,323,382,384,385,407,417,451,479],navajowhit:189,navi:[189,382],navier:236,nb3:163,nb3b:[],nb3bharmon:413,nb5:163,nbin:[116,203,204,205,313,320],nbodi:[239,290],nbond:[3,113,454],nbondtyp:[189,354,454,464],nbot:366,nbounc:305,nbrhood_cutoff:420,nbtype:115,nbuild:472,ncall:223,nchar:189,nchunk:[3,6,66,71,75,90,93,104,106,114,144,159,161,201],ncoeff:427,ncount:[201,202],nd3:163,ndanger:472,nden:[6,91],ndihedr:[3,454],ndihedraltyp:[354,454],ndim:204,ndirango:290,ndof:[249,253],ndoubl:454,ndp:474,ndx:329,neal:290,nearbi:[7,62,165,215,246,282,305,326,356,362,405,406,436,446,474],nearest:[3,70,71,73,162,165,236,248,271,312,326,345,395,407,438,479],nearli:[6,18,54,59,208,233,305,384,411,449,452,458,466],neb:[],neb_combin:355,neb_fin:355,neb_log:468,neb_step:468,neb_styl:468,necessari:[6,9,11,12,13,15,17,33,61,87,172,177,183,190,208,212,213,225,226,284,305,318,328,345,360,404,411,454,455,459,462,463,464,468,474,482],necessarili:[12,285,312,333,334,336,348,411,480],necessit:279,need:[1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,33,37,38,39,40,41,42,50,54,55,56,58,61,63,64,67,70,72,73,77,82,91,102,104,109,112,128,140,141,142,143,144,145,147,150,151,152,153,154,156,157,164,166,170,172,177,183,184,186,187,188,189,193,194,195,196,198,199,201,202,203,204,205,206,208,209,210,212,213,214,218,220,223,224,225,229,230,232,233,234,236,242,243,249,261,272,276,277,279,285,289,290,294,301,305,313,316,317,319,320,321,322,328,337,340,345,346,354,355,356,357,360,361,362,363,364,366,367,368,369,370,371,372,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,445,446,449,452,454,455,456,457,459,461,462,464,466,467,468,474,479,481,482,483],needless:[6,356],neeed:9,neelov:346,neg:[3,6,12,27,46,65,69,89,102,108,115,140,141,166,168,173,175,184,188,212,214,215,226,253,271,294,302,316,320,322,327,345,352,385,399,407,436,454,457],neglect:[390,406],neglig:[11,87,249,437],neigh:[2,3,12,15,360],neigh_modifi:[],neighbor:[],neighborhood:[26,122,427],neighbour:234,neighobr:[6,376,396,400],neither:[2,3,12,41,63,198,211,214,215,362,368,384,405,406,459],nelem:427,nelement:[361,382],nemd:[],nest:[2,330,342,359,479],net:[3,6,11,39,86,88,145,156,229,271,281,290,406,420],netpbm:188,network:[209,210,230,451],neumann:345,neutral:[3,88,225,345,376,396],never:[7,12,63,71,192,202,212,225,249,271,293,307,318,322,325,327,345,356,382,407,427,451,454,468,471,479],neveri:[3,8,71,195,200,201,202,203,204,205,206,209,210,211,236,237,272,281,282,283,286,287,291,313,319,320,355,459,468],newatom:215,newer:[12,201,407],newfil:[342,344],newli:[215,474,480],newlin:189,newn:290,newt:151,newtemp:[63,102],newtion:[366,417],newton:[],newtonian:226,newtyp:[3,210],next:[],neyt:312,nfile:[3,38,56,184,187,189,438,456,461,483],nfirst:459,nfirt:459,nfreak:291,nfreq:[39,71,200,201,202,203,204,205,206,208,287,291,459],nghost:[3,12],ngp:105,ngpu:360,nguyen:[15,366],nharmon:[],nhc:273,nht:290,ni2:163,ni3:163,ni_000:[118,291],nialh_jea:382,nialhjea:[373,391],nice:[6,8],nickla:409,nimprop:[3,454],nimpropertyp:[354,454],nine:[127,134,385],ninteg:454,nissila:236,nist:[361,382,478],niter:[41,208],nitrid:376,niu3:[373,382,391],nkb:280,nlast:459,nline:354,nlocal:[3,8,11,12,223],nlog:346,nmax:42,nmin:42,nmol:454,nmpimd:273,nn2:407,nneighmaxdef:3,no_affin:[16,360],no_gradient_correct:426,no_histori:6,no_velocity_gradi:426,noced:353,nocheck:395,nocit:12,nocoeff:481,nodal:[6,38,56,184,198,317,438],node:[1,3,12,14,15,16,17,18,41,118,122,163,208,230,236,317,360,395,451,467],node_area:236,node_group:198,nodeless:384,nodeset:198,nodeset_to_elementset:198,nof:184,noforc:[],nois:[6,226,227,233,234,235,236,280,285,290,309,317],nomenclatur:[6,71,204,348],nomin:[187,249],non:[],nonbond:[4,12,413,436],none:[],noneq:227,nonequilibrium:[9,314,315,384],nonetheless:233,nongauss:[],nongaussian:105,nonlinear:[],nonloc:[416,464],nonperiod:3,nonzero:3,noordhoek:375,nopreliminari:184,nor:[2,3,41,59,198,295,296,297,298,299,301,375,423,424,425,426,454,457],nord:[417,439,441],norder:451,nordlund:[417,439,441],norm:[6,12,63,117,192,201,204,205,291,296,297,353,355,435,471,472,478],normal:[3,6,9,10,11,12,39,41,58,61,63,67,70,71,73,88,91,102,112,116,117,149,152,164,165,166,184,189,192,201,202,203,204,205,208,212,214,215,224,225,229,233,234,246,249,261,271,273,274,281,285,287,288,294,305,306,308,309,310,317,322,323,326,327,331,333,334,336,350,352,353,355,360,374,375,387,388,391,435,447,448,449,452,454,456,457,459,460,464,468,471,472,474,478,479,482],norman:317,nornal:3,nose:[6,7,8,154,192,218,233,234,249,250,251,252,253,254,255,266,267,268,269,273,277,285,290,308,309,310,315,380,474],noskov:[442,474],noslip:[305,327],notabl:[5,39],notat:[6,63,70,140,158,192,246,249,382,479],note:[1,2,3,6,7,8,11,12,13,14,15,16,17,18,22,24,25,28,29,32,33,35,36,37,38,39,40,41,42,44,47,54,55,56,58,59,60,61,62,63,65,66,68,69,71,73,75,79,87,89,90,91,92,93,97,104,105,106,108,110,112,113,114,115,117,118,119,140,141,144,146,147,148,152,154,158,159,161,162,163,164,165,166,167,168,170,172,175,177,181,183,184,187,188,189,190,192,193,194,195,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,218,219,220,222,223,225,227,228,229,231,232,233,234,235,236,244,245,246,247,249,251,252,253,254,255,261,266,267,269,273,275,276,277,279,280,281,283,288,289,290,291,294,302,303,305,308,309,310,313,316,317,319,320,321,322,323,326,327,328,330,331,332,333,334,336,340,344,345,346,348,350,353,354,355,356,360,361,362,366,367,369,370,371,373,374,376,377,379,380,381,382,385,387,388,389,390,391,394,395,396,398,400,404,405,406,407,408,409,410,411,413,417,419,420,421,422,424,426,427,428,431,435,437,438,439,441,443,446,449,451,452,454,455,456,457,458,459,461,462,464,466,468,469,471,472,474,478,479,480,482,483],noth:[199,232,347,360,452,465],notic:[0,6,7,8,12,315,317,474],noutcol:8,noutput:272,noutrow:8,novemb:407,novik:13,novint:230,now:[2,3,6,9,11,12,13,46,61,62,71,187,193,194,210,226,230,231,290,323,326,346,348,382,384,388,419,420,428,450,455,474,480],nowait:230,nozforc:345,np3:163,np4:163,np6:163,npair:[116,202],nparticl:[3,40,42,365],npartit:472,npernod:[14,15,16,17,18,360],nph:[],nphi:[16,360],nphug:[],npoli:276,nproc:[3,187],npt:[],npt_aspher:[251,255,266],npt_sphere:[252,269],nrecomput:381,nrepeat:[71,200,201,202,203,204,205,206,287,291,459],nreset:[212,249,250,253],nreset_ref:212,nrho:[361,382],nrl:382,nsampl:381,nsbmax_most:3,nsec:473,nskip:[119,459],nsq:[3,357,415],nstart:[119,202,203,206,291,454,459],nstat:271,nstep:[3,13,212,249,328,432,452,455],nsteplast:452,nstop:[119,459],nswap:[313,320],ntabl:[38,56,184,438],nterm:294,nth:[12,77,116,117,187,189,203,214,459,469],ntheta:366,nthread:[3,360],ntild:272,ntpc:360,ntptask:360,ntype1:115,ntype2:115,ntype:[3,140,164,187,189,199,281,283,384,390,417,454,464],nuclear:[9,96,97,150,227,250,280,285,354,384,447],nuclei:[9,96,97,148,150,155,235,250,260,268,311,363,384,454],nucleu:[96,97,281,441,474],nudg:[4,6,7,192,248,352,355],nulcear:9,num:2,num_of_collis:3,numa:[1,3,12,360,451],numactl:16,number:[1,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,22,27,38,39,40,41,42,44,56,63,64,65,66,68,69,70,71,73,75,76,77,78,79,80,87,90,91,92,93,102,104,106,108,111,112,113,114,115,116,117,118,119,129,135,140,142,143,144,145,146,147,149,150,151,152,153,154,156,157,158,159,161,162,163,164,165,166,167,168,172,173,183,184,186,187,188,189,190,192,193,194,197,199,201,202,203,204,205,206,208,209,210,211,213,214,215,222,223,225,226,227,229,230,231,232,233,234,235,236,239,246,249,250,253,261,271,272,273,275,276,279,280,281,285,287,290,293,297,305,306,307,309,312,313,314,315,317,318,319,320,322,324,325,327,328,330,332,343,345,346,348,350,351,353,354,355,356,357,360,361,362,366,368,373,375,380,381,382,383,384,385,390,391,392,393,394,407,408,409,411,413,417,418,419,420,421,424,426,427,435,437,438,439,440,441,443,444,447,448,449,451,452,454,455,456,457,458,460,461,462,463,464,466,468,469,471,472,474,478,479,480,483],number_of_a:3,number_of_b:3,number_of_typ:199,numbond:3,numer:[1,2,3,6,9,12,22,38,41,42,44,56,71,77,87,116,158,168,172,184,187,188,189,193,194,195,197,198,201,204,206,220,226,229,233,246,249,273,290,293,317,322,324,325,327,328,332,350,353,354,373,379,391,407,411,419,420,426,438,447,448,452,454,461,464,470,471,472,479],numpi:11,nvalu:[201,204,205,206,452],nvaluelast:452,nvc_get_devic:15,nvcc:[1,12,17],nve:[],nve_aspher:[251,254,266],nve_spher:[252,255,269],nvida:17,nvidia:[1,3,9,12,14,15,17,360,467],nvt1:474,nvt2:474,nvt:[],nvt_aspher:[251,254,269],nvt_sphere:[252,255],nvtfe:198,nwait:272,nwchem:7,nxnode:317,o_cor:146,o_shel:146,oascr:7,obei:[3,214,348,449],ober:7,obj_shared_foo:12,obj_target:12,object:[6,8,11,12,15,40,42,188,212,230,236,239,276,294,301,353,452,457],observ:[249,280,308,309,312,313,320],obsolet:13,obstacl:[4,231],obtain:[1,3,9,12,29,73,87,162,190,194,224,227,236,253,272,273,312,345,362,379,407,411,418,439,441,463],obviou:[12,479],obvious:[188,469,479],occ:386,occasion:[3,449],occlus:188,occup:[3,162,386],occur:[1,3,6,9,11,12,14,17,39,57,59,61,62,71,86,105,162,165,167,184,187,189,199,208,211,212,214,225,228,231,239,247,261,281,290,305,314,327,328,330,345,356,360,381,384,404,420,449,451,452,459,463,468,471,479],occurr:[339,454,468,479],octahedr:25,octant:451,odd:[41,189,208,249,290,308,309,317,469],off:[1,3,6,12,14,15,16,17,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,43,44,45,46,47,48,49,50,51,53,54,55,56,59,61,65,69,71,107,108,109,112,113,115,140,141,142,147,151,162,163,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,188,189,192,195,199,206,207,210,211,221,224,225,226,228,230,233,234,239,249,251,252,253,254,255,256,261,264,266,267,269,275,277,278,282,290,292,293,305,308,310,320,321,322,326,331,332,333,334,335,336,337,339,340,341,345,346,353,355,356,358,360,361,362,364,367,368,369,370,371,372,374,375,376,378,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,416,420,421,422,424,426,428,435,436,437,438,439,440,441,443,445,446,447,449,450,451,454,456,461,463,466,467,468,476,478,481,483],offend:[3,452],offer:[6,14,18,167,352,376,449,463],offic:7,offload:[1,12,16,17,230,360],offset:[3,6,57,164,188,214,215,225,276,354,376,396,400,436,454],offsit:8,often:[1,3,6,7,12,13,14,15,16,17,18,37,55,71,158,183,188,195,203,206,208,212,223,230,249,273,291,340,348,352,353,355,356,357,360,375,380,396,439,441,449,468,474,478],ohio:409,old:[3,6,9,192,212,215,249,407,419,428,455,458,462,465,478,481],older:[3,5,12,13,17,189,201,212,249,428],oldlac:189,oleinik:366,olfason:[6,25,341,390,466],oliv:189,olivedrab:189,ollila:[236,238,239,240],olmst:[198,271],omega0:341,omega:[],omega_dot:249,omega_ijk:441,omega_ik:439,omegai:[113,187,307],omegax:[113,187,307],omegaz:[113,187,307],omgea:6,omiss:[0,7],omit:[184,189,324,370,379,400],omp:[],omp_num_thread:[3,16,18,360],omp_proc_bind:17,ompi_comm_world_local_rank:12,on_the_fli:198,onc:[0,1,2,3,6,11,12,16,40,41,59,60,63,71,91,104,170,188,189,192,193,194,208,209,210,215,223,225,227,234,272,279,290,305,313,318,320,328,351,354,355,356,387,389,391,392,417,421,451,452,461,468,471,474,479],onelevel:451,onewai:[],ongo:230,oniom:[9,284],onli:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,59,60,61,63,64,65,66,67,68,69,70,71,72,73,75,78,79,80,83,86,87,88,90,92,93,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,147,148,150,151,152,155,156,157,158,159,161,162,163,164,167,168,170,171,173,174,175,176,177,178,179,181,182,183,184,187,188,189,190,192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,218,220,221,222,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,270,271,272,273,274,275,276,277,279,280,281,282,283,284,285,286,287,290,291,292,293,294,295,296,297,298,299,301,305,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,333,334,335,336,337,339,340,341,343,345,346,348,350,353,354,355,356,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,451,452,454,455,456,458,459,461,462,463,464,465,466,468,469,470,471,472,474,479,480,481],only_group:162,onn:463,onset:[280,339],ontario:9,onto:[140,166,211,215,236,435],onward:2,open:[],opencl:[1,3,7,15,360],opengl:6,openkim:9,openmp:[1,3,7,9,12,16,17,18,360,467],openmpi:[12,14,15,16,17,18,360],opensourc:7,oper:[],opl:[],oppos:[6,39,185,187,289,324,346,354,454],opposit:[6,70,197,233,240,271,290,320,355,376,404,442,452],opt:[],optic:143,optim:[],option:[],optionn:17,orang:[2,188,189],orbit:[281,283,366,376,384,436],orchid:189,order:[1,2,3,6,9,11,12,14,16,27,38,39,41,56,59,65,69,71,79,87,89,90,92,93,108,112,115,130,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,168,173,183,184,187,188,189,192,195,200,202,203,204,205,206,207,209,210,211,212,213,218,220,225,227,229,230,232,236,237,239,247,249,271,279,280,284,287,288,289,290,291,292,293,294,299,301,306,312,316,317,318,319,329,330,331,333,334,336,339,340,345,354,355,361,362,363,366,375,381,382,384,385,387,388,391,393,396,404,407,419,420,421,436,437,438,439,440,441,442,444,449,451,452,454,455,459,461,463,464,468,471,474,479,483],orderomg:3,ordinari:[111,390,416],org:[6,7,11,12,13,14,418],organ:[0,3,6,7,8,375],organis:[424,426],organometal:25,orient:[],orienti:42,origid:201,origin:[3,6,7,9,12,71,81,103,104,114,118,160,164,166,186,188,189,192,193,194,201,204,205,209,210,214,218,234,246,249,267,273,276,286,290,291,298,304,315,342,344,345,348,352,361,362,364,366,376,379,380,381,382,390,393,407,416,419,420,439,441,442,443,451,454,455,456,457,458,459,478,481],origin_i:205,origin_x:205,origin_z:205,ornl:[7,9,15],orsi:29,ortho:[3,59,166,454],orthogon:[],orthograph:188,orthong:59,orthongon:[59,290],orthonorm:215,orthorhomb:280,os4:163,oscil:[6,9,149,210,214,217,218,234,246,247,249,280,285,290,322,323,325,327,354,363,442,474,479],oscillatori:[246,298],oserror:11,other:[],otherwis:[1,3,12,14,16,17,18,37,39,55,71,102,111,118,143,144,157,165,183,189,190,199,201,209,210,214,223,225,227,234,249,290,340,341,353,360,368,391,395,405,406,417,444,449,452,454,455,474],otyp:[376,396,400,404],ouml:474,our:[5,6,7,8,13,236,293,411,439,441,474],out:[1,2,3,6,7,8,11,12,13,14,18,19,21,41,64,66,71,75,90,91,93,94,97,103,104,105,106,107,114,115,142,143,144,145,147,148,150,151,152,153,154,156,157,159,161,167,171,187,188,189,190,192,204,208,209,210,213,221,224,225,231,233,236,241,261,272,274,275,276,285,286,287,290,302,317,326,328,329,330,331,333,336,343,344,348,351,355,359,384,391,436,448,449,451,452,454,457,458,459,461,462,463,465,468,470,471,472,475,477,479,480,481,482,483],outcom:[290,480],outer2:[371,389],outer:[3,8,16,219,231,330,344,351,353,359,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,414,416,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,444,445,446,447,449,462,463,468,473],outer_distance_cutoff:390,outermost:[38,56,193,194,246,249,356,438,463],outfil:[13,451],outlin:[6,188],outmost:230,outpt:12,output:[],output_frequ:198,outputss:127,outsid:[3,57,59,71,154,164,186,187,188,189,190,203,204,215,225,231,290,291,305,310,311,324,325,327,328,343,355,367,369,376,384,396,398,414,422,452,454,455,457,464,471,480],outuput:201,outut:6,outward:[162,322,326,327,454,463],over:[1,3,5,6,7,9,12,16,18,27,39,41,42,55,60,65,68,69,71,79,80,87,88,89,90,92,101,103,105,108,115,116,125,126,132,137,140,141,144,147,150,158,160,173,184,188,190,192,193,194,200,201,202,203,204,205,206,207,208,209,210,214,215,223,226,227,231,233,234,235,239,247,248,249,250,251,252,254,255,266,267,268,269,271,276,277,280,287,288,289,290,291,294,302,305,308,309,310,311,313,316,319,320,322,324,325,326,327,328,331,344,347,355,356,357,360,374,380,382,383,384,385,390,405,407,417,427,428,436,437,439,440,441,450,451,452,457,459,460,462,463,468,471,472,479,480],overal:[6,18,25,59,158,212,218,249,250,273,293,305,330,351,384,390,391,427],overalap:290,overcom:[261,305],overflow:[3,354,356],overhead:[6,11,19,41,189,201,204,205,208,222,279,356,357,457],overkil:290,overlai:[],overlaid:7,overlap:[3,13,16,62,76,164,167,184,189,197,200,201,203,204,205,206,215,219,261,276,281,287,290,291,305,323,327,345,348,351,353,354,360,380,384,388,391,394,404,423,425,428,443,454,457,463],overload:1,overrid:[3,12,14,17,22,44,71,150,164,172,188,189,193,194,212,219,244,249,332,345,356,373,390,391,407,411,419,451,452,464,466,471,479],overridden:[6,164,188,253,290,405,411,428,436,462,479,481],overview:[],overwrit:[11,12,22,44,172,189,201,202,203,204,205,206,291,332,343,349,373,407,452,455],overwritten:[278,316,343,390,391,449,450,455],own:[3,4,6,7,8,11,12,13,15,17,39,41,59,61,63,65,66,69,71,73,75,79,90,92,93,104,106,113,114,115,117,119,144,147,159,161,162,187,189,192,198,200,201,202,203,204,205,206,208,211,212,214,223,226,227,233,234,236,244,247,249,251,252,253,254,255,266,267,269,273,277,285,290,291,308,309,310,319,345,355,360,362,366,375,383,393,417,419,420,437,439,440,441,451,464,471,480],oxford:[29,87,379],oxid:[375,376],oxygen:[6,40,222,376,396,400,454],oxygen_c:146,p_e:317,p_ik:417,p_pi:366,pacakg:[3,4,12,40,360],pack:[5,8,67,323,360,366,407],pack_bord:8,pack_border_bodi:8,pack_border_hybrid:8,pack_border_vel:8,pack_comm:8,pack_comm_bodi:8,pack_comm_hybrid:8,pack_comm_vel:8,pack_exchang:8,pack_restart:8,pack_revers:8,pack_reverse_comm:8,pack_reverse_hybrid:8,packaag:360,packag:[],packakg:15,packet:[7,9,40,188,363,384],pad:[3,187,188,189,273,479],padua:[9,13],page:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,37,40,42,44,55,57,59,63,66,68,75,87,90,93,102,104,105,106,107,109,112,114,117,119,141,143,144,157,159,161,164,165,166,172,183,187,188,189,190,192,193,194,199,200,201,202,203,204,205,206,215,225,232,233,234,244,249,250,254,255,259,266,267,268,269,276,279,290,302,305,308,309,310,319,323,326,328,330,332,340,344,353,354,355,356,360,361,362,365,373,375,376,382,383,385,390,391,393,394,407,408,409,411,413,417,418,427,436,437,439,441,443,452,454,455,456,457,459,462,463,464,466,471,472,479,480,481,482],pai:[15,18],pair:[],pair_:[87,193,194],pair_airebo:393,pair_charmm:404,pair_class:8,pair_coeff:[],pair_eam:361,pair_eff:150,pair_foo:8,pair_hybrid:[391,442],pair_interact:198,pair_list:395,pair_lj:404,pair_lj_cut:8,pair_lj_soft_coul_soft:87,pair_modifi:[],pair_sph:[429,430,431,432,433,434],pair_styl:[],pair_writ:[],paircoeff:3,pairfoo:8,pairij:[3,454],pairkim:3,pairstyl:8,pairwis:[],palegoldenrod:189,palegreen:189,paleturquois:189,palevioletr:189,pan:188,panagiotopoulo:[377,386],pandit:[9,283,420],papaconstantopoulo:361,papayawhip:189,paper:[3,6,7,8,9,13,39,40,64,140,152,158,176,233,236,240,248,275,281,283,290,305,313,317,320,345,352,355,362,370,376,388,390,393,398,400,416,419,420,439,441,449,468],paradyn:5,paraemt:421,paragraph:[71,152,322,348,455],parallel:[],parallelepip:[6,166,348,454,457],parallelipip:[166,272],paralleliz:275,param:[3,281,283,451,457],paramet:[],parameter:[118,163,362,366,375,376,382,383,384,385,393,407,408,409,417,419,420,437,439,440,441],parameter_fil:198,parameterizaion:376,parametr:[6,9,36,383,418,422],paramt:[105,281,324,421],paramter:375,paratem:404,paraview:291,parent:[3,8,328],parenthes:[38,56,184,388,438,479],parenthesi:[2,201,330,479],parinello:[6,7],pariticl:208,paritlc:3,park:[3,7,9,198,294,409,416],parrinello1981:212,parrinello:[212,227,247,249,250,280,309],pars:[],parser:[12,479],part:[0,1,2,3,6,7,8,9,11,12,17,20,21,23,24,25,26,27,28,29,30,31,32,35,36,37,38,40,41,43,45,46,47,48,49,51,53,54,55,56,64,67,70,71,72,78,80,83,96,97,98,99,100,101,105,107,108,109,111,112,115,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,146,148,150,151,155,156,158,162,167,170,171,173,174,175,176,178,179,181,182,183,184,187,189,190,192,195,196,197,199,205,207,208,209,210,211,212,213,215,217,220,221,222,223,224,225,226,227,228,230,231,232,233,234,235,236,237,238,239,240,242,243,244,247,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,271,272,273,275,276,280,281,282,283,284,285,286,287,289,290,292,293,294,295,296,297,298,299,301,302,304,305,308,310,311,312,313,314,315,316,317,318,320,321,322,323,324,326,328,329,330,331,333,334,335,336,339,340,341,345,346,353,354,355,356,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,451,452,454,455,456,457,461,462,463,466,472,479,483],partai:[9,418],parti:9,partial:[],partic:6,particip:[210,365,394,443],particl:[],particleenergi:3,particleviri:3,particular:[1,3,6,8,10,12,16,40,63,65,69,70,71,79,92,108,113,115,116,140,164,186,187,192,197,204,208,211,226,231,232,236,246,249,271,276,289,290,293,312,323,328,331,346,348,351,354,360,365,366,367,369,371,372,374,378,383,384,387,389,391,396,400,404,413,414,421,422,436,437,439,440,441,449,451,454,455,456,461,462,464,472,479,480,482,483],particularli:[7,9,12,15,16,25,39,188,212,290,346,384],partilc:305,partit:[],partitoin:62,partner:[3,7,61,209,210,211,234,305,320,442,464,469,474],pascal:[9,13,478],pass:[6,7,8,11,66,74,75,81,89,90,93,103,104,105,106,159,187,189,190,212,213,223,225,246,247,249,279,305,322,344,356,360,391,419,435,452,454,455,459,465,479,482],passphras:12,past:[],patch:[0,12],patchi:290,path:[3,6,7,11,12,13,15,190,232,248,273,294,305,312,317,355,361,362,366,373,382,383,385,393,407,408,409,413,417,418,419,427,437,439,441,455],patient:12,patom1:115,patom2:115,patrick:440,pattern:[3,7,12,62,73,456],pattnaik:290,paul:[0,7,13,233,235],pauli:[9,384],paus:462,paves:273,payn:[140,418,427],pb2:163,pb4:163,pbc:[322,363],pchain:[249,250,253,290],pcie:1,pd2:163,pd4:163,pdamp:[249,250,253,277,290],pdb:[6,13,190],pdf:[0,8,9,13,17,40,99,100,101,111,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,213,232,242,243,295,296,297,298,301,416,429,430,431,432,433,434,464],pdim:320,pdlammp:[78,80,416],pdlammps_ep:[111,416],pdlammps_v:416,pe_eta:249,pe_etap:249,pe_omega:249,pe_strain:249,peachei:13,peachpuff:189,peak:386,pearlman:87,peculiar:12,pedersen:346,peform:[39,282],penalti:[14,419,420],pencil:[6,71,152,204],pend:3,penetr:[42,120,423,425,464],penetret:40,peng:163,penn:13,pentium:10,peopl:[7,8,9,12],peptid:[4,9,213],per:[],peratom:[3,110,141],perceiv:188,percent:[3,16,212,360,437],percentag:[1,212,249,276,277,290],percol:210,perfect:[6,41,70,73,208,271,355],perfectli:[41,208,455],perfom:[6,355],perform:[],performac:1,pergamon:[407,441,447],perhap:348,peri:[],peridyma:78,peridynam:[3,4,6,7,9,40,63,78,80,111,416,436,464],perimitt:377,period:[],perioid:322,perl:[6,13],perm0:478,perman:[3,39,54,71,168,209,210,230,289,328,360,390,458,466],permeabl:270,permiss:[210,452],permit:[6,236],permitt:[377,441,446,447],permut:[12,383,437,439,441],perpendicular:[6,143,188,214,231,241,246,248,271,274,298,322,323,352,454],perram:[346,387],persepct:188,persist:[3,8,71,223,290,360,451,452,460,479],person:9,persp:[3,188],perspect:188,pertain:[373,436],perturb:[9,13,70,87,245,288,322,325,327,459],peru:189,peskin:236,pessimist:346,petersen:[305,346],pettifor:[366,436],pettifor_1:366,pettifor_2:366,pettifor_3:366,pfactor:188,pforc:452,phantom:230,pharmaceut:7,phase:[3,12,16,249,312,320,366,396,440,451],phd:418,phenol:474,phenomena:384,phi0:[182,289],phi1:171,phi2:[171,383,437],phi3:[171,383,437],phi:[1,3,4,7,9,12,16,17,79,140,183,184,188,228,272,289,334,360,361,366,382,385,407,408,409,467],phi_ij:[366,385,417],philadelphia:9,phillip:[234,380,474],phillpot:[282,375,376],philosoph:382,philosophi:[6,7,232],phonon:[],phophor:427,phosphid:427,phy:[6,7,13,20,21,25,39,43,45,46,64,70,73,87,88,110,112,140,141,146,152,170,171,181,199,212,213,218,226,227,232,233,234,235,236,247,248,249,250,253,267,268,272,273,277,280,282,285,290,293,294,305,308,309,312,313,314,315,317,320,322,331,339,341,345,346,352,355,362,366,367,371,372,374,375,376,377,378,379,380,382,383,384,386,387,388,389,390,393,396,398,400,401,404,405,406,407,409,410,411,414,416,417,421,427,435,437,438,439,440,441,442,449,463,466,468,474],physic:[3,6,9,12,14,16,17,18,40,53,59,120,158,198,214,227,233,235,236,238,239,240,247,272,281,283,316,317,346,348,355,360,362,364,370,374,382,390,391,418,419,420,423,430,431,433,434,449,451,463,464,469,478],physica:[405,406],physik:[7,9],pic:9,picki:8,picocoulomb:478,picogram:478,picosecond:[189,214,472,478],picosend:384,pictur:7,piec:[3,11,140,189,249,461,483],pieter:13,pimd:[],pin:16,pink:189,pipe:[6,188],pipelin:[3,6],pisarev:317,pishevar:380,piston:[],pitera:6,pixel:188,pizza:[4,6,7,11,13,41,187,188,208],pjintv:13,pka:317,place:[3,6,7,9,11,12,33,41,50,71,87,158,164,168,177,184,187,188,189,191,192,193,194,210,211,214,225,226,227,229,232,233,234,235,237,239,240,249,254,255,266,269,276,279,288,290,308,309,310,317,322,325,327,344,373,390,436,443,451,452,455,462,464,472,479],placehold:[33,177,361,362,375,382,385,392,393,407,408,409,413,417,419,420,427,435,437,439,440,441],placement:[348,396],plai:[188,312],plain:[9,404,452],plan:[3,5,6,16,17,166,454],planar:[6,40,42,231,271,323,339,341],planck:[225,273],plane:[3,6,9,41,42,57,59,67,71,188,192,198,204,208,228,231,241,271,274,284,302,304,317,323,331,333,334,335,336,341,348,406,443,457,464],planeforc:[],plasma:[9,88,250,317,384],plastic:[],plastic_strain:121,plastic_strain_r:124,platform:[1,3,7,9,12,13,15,17,187,188,190,456,461,483],plath:[6,91,192,313,320],player:188,pleas:[0,3,7,11,12,13,198,227,236,240,272,275,286,312,328,383,385,416,424,426],plen:363,plimpton:[0,5,7,70,112,141,211,271,305,388,416],plo:29,plog:[3,12,463],ploop:[249,250,253],plot:[7,11,13,280,402,404,438,444],plu:[3,11,12,39,59,68,96,167,189,207,212,214,215,253,290,357,384],plug:9,plugin:[9,13,190,455],plum:189,pm3:163,pmb:[],pme:346,pmf:[213,294,302],png:[3,12,187,188],pni:188,poariz:6,poem:[],point1:454,point2:454,point3:454,point:[],point_data:291,pointer:[3,7,8,11,223,452],pois:478,poiseuil:[4,195,228],poisson:[59,214,346,388],poisson_solv:198,polak:352,polar:[6,7,140,163,198,217,375,376,396,442,474],polar_off:375,polar_on:375,polariz:[],poli:[],pollock:[7,346],polya:328,polybond:13,polychain:290,polydispers:[3,368,374,388,405,406,436,446],polygon:[6,162],polym:[],polymer:7,polymorph:[],polynomi:[9,38,56,184,382,402,411,431,438],polytechn:275,poor:[16,17,41,208,267,268,293,360,402],poorli:[352,353],pop:[3,8],popen:12,popul:[12,285,348,381,454],popular:[12,187,383],pore:302,poros:167,porou:[236,239],port:[230,232],portabl:[7,9,12,187,213,419,456],portion:[1,3,9,11,12,15,16,41,54,71,88,91,107,108,110,113,141,154,187,189,200,201,203,204,205,206,208,212,222,236,249,251,252,254,255,282,287,288,290,291,330,344,356,360,367,369,370,371,372,376,377,379,380,384,386,387,389,390,396,400,404,414,421,422,441,444,453,454,459,463,464,479],poschel:388,posfreq:287,posit:[3,6,14,27,39,40,41,42,46,57,59,70,71,81,89,90,103,104,108,117,118,122,140,141,147,162,163,164,166,167,168,173,175,184,186,188,189,192,193,195,197,199,200,201,203,204,205,208,209,210,211,212,213,214,215,218,220,225,226,227,228,230,231,233,234,235,236,238,239,242,243,246,247,249,250,251,252,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,271,272,273,275,276,277,280,281,285,287,288,290,293,294,298,301,302,304,305,307,308,309,310,312,314,315,316,317,320,322,323,324,325,326,327,328,331,345,348,355,362,363,365,368,380,381,384,386,394,399,420,435,438,443,449,454,457,464,474,479,480],posix:230,posix_memalign:12,possibl:[1,3,6,8,9,11,12,15,38,40,41,55,59,63,70,71,87,113,115,140,141,143,157,186,187,189,192,194,198,199,204,208,209,210,211,215,217,227,234,271,284,285,287,290,301,305,307,317,318,335,344,346,353,356,357,360,381,390,407,420,424,426,438,452,458,467,468,469,472,474,479,480,482],post:[],post_forc:8,post_force_integr:8,post_force_respa:8,post_integrate_respa:8,postit:[204,205,261],postiv:86,postma:[277,308],postprocess:13,pot:[388,420],potentail:385,potenti:[],potentiel:404,potetni:391,potpourri:9,pour:[],pourtoi:312,pow:214,powderblu:189,power7:17,power8:17,power:[3,9,11,105,140,189,285,345,360,366,452],pparam:[87,193,194],ppm:[12,187,188],ppn:[14,15,16,17,18,360],pppm:[],pppm_disp:3,pppmdisp:3,pproni:[3,226],pr3:163,pr4:163,practic:[3,12,212,249,250,272,279,451],prb:[439,441],prd:[],pre:[],pre_exchang:8,pre_forc:8,pre_force_respa:8,pre_neighbor:8,prec_tim:14,prece:426,preced:[2,6,59,200,201,202,203,204,205,206,232,287,291,330,348,355,360,366,390,468,471,472,479],preceed:[11,12,71,152,202,322,452,479],precipit:162,precis:[1,3,9,12,13,14,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,164,170,171,173,174,175,176,178,179,181,182,184,187,189,195,201,206,207,212,221,224,228,233,249,251,252,253,254,255,256,264,266,267,269,281,282,283,290,292,293,308,310,321,331,333,334,335,336,339,341,345,346,353,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,419,421,422,428,437,438,439,440,441,443,445,446,447,456,463,464,467,472,474,478,479,480],precv:451,predefin:[182,189,328,384],predict:[1,6,10,261,290,360],preexponenti:468,prefactor:[24,25,28,32,35,36,158,172,183,193,194,202,322,333,336,339,353,374,386,413,421,422,428,446],prefer:[7,8,12,289,318,362],prefix:[11,12,188,213,272,448,451],preliminari:[38,56,184,438],prematur:353,prepar:[9,284,305,465,474],prepend:419,preprint:[140,427],preprocessor:230,prerecord:213,prescrib:[6,8,143,144,157,192,193,198,201,215,246,263,318],presenc:[187,209,210,236,239,405,406,446,481],present:[1,3,12,16,18,162,184,188,215,226,227,232,236,237,239,240,285,301,323,326,375,384,395,404,420,421,451,474],preserv:[3,59,212,214,249,293,305,327,455],press:[],pressdown:207,pressur:[],pressure_with_eviri:384,presum:[73,153,192,193,194,214,355,391,457],prevent:[2,3,6,40,120,215,224,305,316,339,345,351,353,355,360,380,391,415,430,431,433,435,452,456,462,464,474,479],previou:[],previouli:215,previous:[3,11,59,61,71,86,102,117,119,153,164,166,168,186,187,189,197,199,200,201,202,203,204,205,206,214,215,225,231,244,246,276,288,290,292,293,317,319,322,323,324,325,327,328,347,388,436,449,452,456,457,467,469,471,472,475,476,477,479,480],prevoiu:323,price:[6,379],primari:[0,9,317],primarili:[5,7,9,17],primaritli:17,prime:[218,234,389,394,439,441,451],primit:[3,6,325,326,348],princip:[3,230],principl:[6,9,11,230,250,281,384,392,437,451],prinicp:[42,290,354],print:[],printabl:2,printflag:392,printfluid:236,prior:[162,185,347,482],priori:463,prioriz:360,prism:[3,6,152,166,457],priveleg:3,privileg:[12,230],prob:[209,210],probab:428,probabl:[3,8,12,40,71,154,167,168,170,199,208,209,210,211,215,225,234,249,276,322,328,353,411,449,468,474],problem:[],problemat:225,proc:[1,3,8,11,12,15,113,187,344,451],proce:[41,54,168,208,219,355,461,469,472],procedur:[6,12,39,41,189,199,208,225,233,234,235,249,251,252,253,254,255,266,267,268,269,272,308,309,310,311,314,315,353,355,362,368,455,474],proceed:12,procesor:[41,451],process:[],processor:[],processsor:[41,208,451],procp1:187,procssor:463,produc:[1,3,4,6,7,12,13,14,15,16,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,42,43,45,46,47,48,49,51,53,54,56,63,65,68,69,71,79,92,108,109,110,112,113,114,115,117,119,141,142,151,170,171,173,174,175,176,178,179,181,182,184,187,189,192,195,200,201,202,203,204,205,206,207,208,211,221,223,224,226,227,228,233,234,235,244,246,249,251,252,253,254,255,256,264,266,267,269,276,280,281,282,285,290,291,292,293,306,307,308,310,317,318,319,321,322,325,330,331,333,334,335,336,339,341,346,353,355,358,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,417,420,421,422,428,437,438,439,440,441,443,445,446,447,449,451,456,459,460,463,468,479,480],product:[16,17,18,140,214,267,281,318,360,363,384,420,451,479],proessor:360,prof:275,profi:153,profil:[],program:[3,4,6,7,9,11,12,13,17,187,188,189,190,192,213,223,230,236,284,382,452,465,479],programm:[13,17],progress:[1,41,208,230,247,280,352,353,355,472,474],prohibit:464,project:[6,7,12,13,14,352,436],promis:7,promot:366,prompt:[8,11,12,230,465],proni:[3,226,227],proofread:8,prop:[6,279],propag:[4,9,197,249,280,295,384,391],propens:6,proper:[211,271,407,452],properati:279,properli:[195,220,290,301,354,355,452,480],properti:[],propoerti:305,proport:[6,39,41,87,103,104,160,208,233,234,235,280,313,320,321,388],proportion:233,propos:[6,140,199,212,225,249,267,285,396,409,440,442],prospect:7,protect:305,protein:[7,10,164,288,290,303,454,462],protocol:230,proton:[441,447,478],prototyp:[10,42,416],prouduc:[206,319],prove:236,proven:267,provid:[1,3,4,6,7,8,9,11,12,13,14,15,16,17,18,29,40,42,67,70,118,139,158,163,164,190,200,201,206,211,212,213,214,223,225,230,232,236,240,247,249,272,280,281,284,285,290,294,312,314,315,318,319,330,343,345,346,351,355,360,362,366,368,373,375,376,380,383,384,388,390,393,395,404,405,407,409,417,418,419,420,427,435,436,437,439,440,441,451,456,462,464,467,468,472,479],proxim:186,psa:325,pscreen:[3,12,463],pscrozi:[0,7,13],psec:[189,214,229,233,234,249,277,290,308,309,473,478],psend:451,pseudo:[384,449,454,459],pseudodynam:312,psf:6,psi:[385,446],psi_ij:385,pstart:[3,249,250,253,277,290],pstop:[3,249,250,253,277,290],pstyle:[87,107,193,194],psu:[419,420],psuedo:459,pt2:163,pt4:163,ptarget:212,pthread:[12,17],ptr:[6,11,223,452],ptype1:115,ptype2:115,pu3:163,pu4:163,pu6:163,publicli:5,publish:[7,236,240,281,376,407,439,441],pull:[294,302],puls:317,pump:[405,406],punctuat:[2,449,468],purchas:188,purdu:[9,13],pure:[11,305,391,408,409,439,441,463],purg:[3,455],purpl:[2,189],purport:11,purpos:[3,6,7,12,42,61,71,118,128,134,147,148,163,164,166,168,184,187,204,206,211,212,233,271,273,276,278,289,305,345,360,370,394,400,411,443,454,456,457,461,464,466,467,479,483],push:[3,8,195,207,214,231,248,271,288,294,353,388,428],pushd:231,put:[3,6,8,11,12,13,39,59,152,164,187,215,219,324,325,328,348,419,452,454,458],putenv:[465,479],px1:463,px2:463,pxx:[212,249,277,290,345,346,471,472],pxy:[3,6,472],pxz:[3,6,472],py1:463,py2:463,pydir:11,pyi:[212,249,277,290,345,346,472],pymol:[7,11,13],pymol_aspher:[],pympi:11,pypar:11,python:[],pythonpath:11,pyz:[3,6,472],pz1:463,pz2:463,pzz:[212,247,249,277,280,290,345,346,472],q_c:474,q_d:474,q_i:[385,404,442],q_j:404,qbmsst:[],qcore:281,qdist:[376,396,400,404],qeq1:281,qeq2:281,qeq:[],qfile:[281,376],qin:229,qmin:352,qmmm:[],qmol:284,qout:229,qtb:[],quad:[12,18,360,451],quadrat:[],quadratur:[87,198],quadrupl:361,quadruplet:[180,183,331,333,334,336,338,339,340],qualifi:[3,232],qualiti:[7,9,188,189],quantit:[74,81,103,104,105,160,388],quantiti:[],quantum:[6,9,140,223,227,273,280,284,285,366,384,436],quantum_temperatur:280,quartic:[],quartic_spher:198,quartz:[280,285],quasi:273,quat:464,quaternion:[3,6,40,82,113,130,143,164,251,254,257,258,259,266,387,454,464],quati:[113,454],quatj:[113,454],quatk:[113,454],quatw:[113,454],queen:13,quench:[328,449,468],queri:[3,11,54,263,452,479],quest:[6,223],question:[8,9,12,13,271,328,416,479],quick:[0,9,12,14,15,16,17,18,19],quickli:[3,4,8,12,13,39,208,214,230,305,352,353,355],quickmin:[351,352,353,355,468],quicktim:[4,188],quip:[],quit:[],quot:[2,3,12,239,278,330,407,449,450,452,462,479],r10:366,r12:387,r_1:140,r_2:140,r_c:[377,379,386,441],r_cut:366,r_d:474,r_e:385,r_ewald:291,r_fu:[405,406],r_i:[29,140],r_ii:140,r_ij:[29,366,384,417,447],r_ik:417,r_j:29,r_jik:417,r_max:205,r_me:377,r_mh:386,r_min:[205,378],r_ub:20,r_x86_64_32:12,ra2:163,rad2theta:163,rad:328,radhi:457,radial:[63,96,97,113,116,140,148,150,155,205,235,250,260,268,302,311,353,384,390,411,454,457],radian:[20,21,24,28,32,35,36,38,163,171,182,184,289,331,333,336,339,454,457],radiat:[118,163,317],radic:[166,454],radii:[76,140,211,215,374,382,387,388,405,406,423,425,446,457],radit:384,radiu:[2,3,6,40,63,76,84,85,89,90,113,118,120,129,130,135,140,157,162,187,188,192,205,231,236,250,252,255,260,264,268,269,283,297,301,302,303,305,307,322,323,326,328,352,366,368,374,384,385,388,396,404,405,406,407,423,425,427,441,446,454,457,464,479],radlo:457,rafferti:320,rahman:[6,7,212,247,249,250,280,416],rai:[9,17,163],ram:441,ramp:[],ran:[3,4,6,10,11],random:[3,6,39,164,167,186,188,197,199,209,210,211,213,215,222,225,226,227,233,234,235,236,245,273,276,280,285,288,290,305,309,312,317,321,324,368,380,381,449,464,469,474,479,480],random_se:449,randomli:[164,167,199,215,225,233,276,305,327,468,469],rang:[1,3,6,7,8,9,10,12,14,15,16,18,38,39,56,71,77,88,108,109,110,112,116,117,121,140,141,150,158,163,165,168,169,176,184,187,188,189,198,199,210,214,215,225,227,276,291,305,306,312,313,318,320,345,346,353,356,357,360,362,364,366,367,368,369,370,371,372,374,376,377,378,379,380,381,382,384,387,389,390,391,393,396,397,398,399,400,401,402,403,404,405,406,407,410,411,412,414,417,420,421,422,435,436,438,441,445,446,447,448,452,463,464,472,482],rank:[6,11,12,230,318,343,451],rankin:253,raphson:3,rapid:[4,6,11],rapidli:[3,8,12,71,211,233,247,249,290,308,309,321,376,380],rapp:[281,282,283],rappe_and_goddard:282,rare:6,rasmol:[6,7],rasmussen:387,raster3d:[6,7],rate:[2,6,12,125,132,136,137,147,189,198,214,215,229,230,231,276,280,313,314,315,316,320,351,352,381,405,406,449,468,472],rather:[1,2,6,9,12,40,41,62,112,147,188,208,214,226,227,290,309,317,321,323,324,325,328,384,419,438,455,459,464,466,471,479],ratio:[6,10,59,87,101,140,199,208,214,233,235,305,313,320,321,345,358,387,388,421,430,443,451,454,464,468],rational:[318,466],rattl:[],rattle_debug:293,ravelo:[253,398],rayleigh:[247,280],rb1:163,rbg:189,rcb:[3,41,208],rcm:[89,90],rcmx:[89,90],rcmy:[89,90],rcut:61,rcutfac:[140,427],rd1:355,rdc:17,rdf:[],rdn:355,rdt:355,rdx:4,reach:[6,12,41,119,208,210,212,234,253,298,305,312,330,344,359,377,474,479],react:6,reactant:384,reaction:[294,303,316,327,355,384],reactiv:[9,287,362],read:[2,3,6,7,8,9,11,12,13,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,115,162,164,165,167,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,187,188,189,190,191,192,198,199,211,212,214,215,225,227,230,246,247,249,251,252,253,254,255,266,267,268,269,272,273,275,276,278,279,283,290,293,294,298,301,304,307,315,316,317,323,331,332,333,334,335,336,338,339,340,341,342,344,350,354,355,359,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,414,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,443,444,445,446,447,449,451,454,455,456,458,459,460,461,462,464,465,466,468,479,480,481,483],read_data:[],read_dump:[],read_restart:[],read_restart_set:8,readabl:[188,354,461,483],reader:[3,13,455],readi:[11,12,165,167,168,230,464,474,481,482,483],readm:[1,4,6,8,9,11,12,13,162,187,190,284,392,419,420,452],real:[3,6,7,11,27,30,31,59,71,91,140,153,164,173,186,189,197,204,205,214,215,218,230,231,234,246,273,280,285,288,321,322,324,325,327,335,345,346,348,351,357,376,411,419,420,441,454,457,463,471,473,478,480],realist:[3,215,458],realiz:[71,192,452],realli:[1,3,8,12,112,122,141,189,231,356,391,466],realloc:3,realtim:230,reamin:[322,326],rearrang:355,reason:[3,6,7,11,12,19,39,145,156,164,201,204,205,233,277,290,314,315,318,328,354,355,360,373,377,384,385,386,406,411,443,444,458,463,480],reax:[],reax_def:3,reaxc:[],reaxff:[3,4,5,7,9,13,192,281,283,286,287,391,419,420,436,466],rebal:[41,208],rebalanc:[41,208],rebo:[],rebuild:[11,12,14,15,16,225,356,380,472],rebuilt:[3,12,187,188,190,356,360],recalcul:[71,87,305],receiv:[3,207,230,232,271,451],recent:[],reciproc:[6,118,163,272,345,367,369,370,376,379,384,396,400,414,422,468],recog:12,recoginz:3,recogn:[3,12,16,73,166,209,210,249,354,382,407,419,452,454,461,462,474],recommend:[7,9,11,12,14,16,188,189,280,315,345,384,391,405,406,420,421,424,426,463],recompil:[1,3,9,12,190,293],recomput:[102,128,168,219,294,381,466],reconstruct:[3,213],record:[190,213,294],recov:[212,249],rectangl:[41,208,348],rectangular:[7,41,62,166,208,225,348,454,456,458],rectilinear:[118,163],rector:53,recurs:[41,208,366,443],recust:41,recv:451,red:[2,10,188,189,211,273],redefin:[3,456,462,479],redirect:12,redo:12,reduc:[],reduct:[18,19,117,118,163,247,280,345],redund:385,ree:431,reed:[247,280],rees:[7,9,13],ref:[314,315,352],refactor:6,refer:[],referenc:[3,6,12,63,68,71,114,187,192,202,206,225,279,319,346,376,390,413,421,452,472,479],reflect:[],reformat:7,refresh:198,reg:457,regard:[6,59,246,293,298,416,420],regardless:[15,71,164,167,186,203,204,214,233,249,251,252,254,255,277,290,299,305,360,451,457,464],regim:[6,313,320,377,463],region:[],region_spher:8,region_styl:326,regist:[116,301,419,420],regoin:6,regress:479,regspher:164,regstrip:328,regul:6,regular:[1,3,9,41,62,88,162,166,199,208,225,317,346,377,435,451,454,456,458],reigon:479,reinhardt:[314,315],reject:[164,211,419,469],rel:[1,6,14,27,36,41,59,71,122,130,140,143,146,147,149,164,173,189,192,199,204,208,214,215,218,225,231,245,246,267,271,276,285,287,288,294,302,305,307,312,313,317,324,328,345,346,353,384,387,388,405,406,407,421,446,455,463,468,472,474,480],relat:[],relatic:[218,234],relationship:[6,281,330,345,446,474,479],relax:[],releas:[0,5,7,8,13,209],relect:[3,411],relev:[2,6,12,41,78,80,111,128,164,168,189,193,194,197,198,199,200,201,202,203,204,205,206,207,208,209,210,214,215,216,219,221,222,224,225,226,229,230,236,237,238,240,241,242,243,245,246,248,256,257,258,259,260,261,262,263,264,265,270,274,275,276,278,279,282,284,286,287,288,291,292,293,294,299,303,305,306,307,312,313,316,317,318,319,320,321,322,323,324,325,327,328,345,353,363,364,368,374,376,377,379,380,381,384,386,387,388,389,390,395,397,398,399,401,402,403,405,406,411,412,416,421,428,435,438,445,446,447,451,467,480],reli:[3,12,282,384,420,454,464],reloc:12,remain:[7,33,37,41,50,55,59,71,87,104,144,145,146,147,151,152,153,154,156,167,177,183,184,187,193,194,199,201,202,204,205,212,214,233,234,241,249,250,254,255,266,267,269,274,275,297,305,308,309,310,316,317,328,330,337,340,354,366,384,391,404,411,436,449,454,455,459,464,466,468,472,474,479,480],remaina:366,remaind:[164,187,215,276,305,318,441,454],remap:[3,6,12,59,61,71,147,164,186,204,214,231,246,267,345,454,455,456],remedi:[6,474],rememb:2,remov:[2,3,6,8,9,13,54,71,77,114,116,140,143,144,145,146,147,151,152,153,154,156,157,164,167,168,192,201,204,209,222,233,234,239,245,247,249,254,255,266,267,269,275,281,290,291,293,305,308,309,310,312,328,345,355,379,406,454,457,465,466,479,480],remove_bia:8,remove_bias_al:8,remove_molecul:198,remove_sourc:198,remove_speci:198,ren:163,renam:[12,329,465],render:[12,13,187,188,189],rendon:[249,250],reneighbor:[3,8,12,39,57,71,204,208,225,305,318,328,380,471,472],renssela:275,renumb:71,reorder:[3,12,39,451],repeat:[2,6,188,189,204,211,212,225,298,348,366,439,441,443,449,468],repeatedli:2,repel:231,repes:187,replac:[2,3,6,11,12,41,63,89,90,117,142,143,144,145,146,147,150,151,152,153,154,156,157,187,188,189,190,201,202,203,204,205,206,208,211,215,233,253,278,285,287,376,398,455,456,461,462,472,479,480,481,483],replic:[],replica:[],replica_fil:12,report:[],repositori:[7,12,392,418,419,420],reprens:317,repres:[1,3,6,8,9,12,15,40,41,42,59,67,71,90,113,116,176,184,187,188,201,202,203,204,205,206,212,218,226,228,233,236,249,273,275,277,285,290,291,294,302,317,319,326,346,355,361,366,387,394,404,405,406,407,408,409,414,417,419,420,442,443,449,451,454,464,466,469,474,479,481],represent:[3,6,8,57,59,134,166,187,226,227,273,317,366,384,387,421,454,457,474],reprocess:459,reproduc:[3,249,323,376,382,388],repul:407,repuls:[6,7,9,36,40,45,46,108,231,281,322,323,326,362,366,374,376,380,384,388,390,404,407,410,435,441,446,447,464],reqir:[281,283],request:[3,6,8,12,41,167,184,187,230,236,288,305,307,343,345,411,419,420,449,459,464,467,468,479,480,481],requir:[],rerun:[],rescal:[],research:[5,7,236,240,449,468],resembl:285,reserv:[12,230,474],reservoir:[91,225,229,233,317],reset:[],reset_atomic_reference_posit:198,reset_dt:8,reset_target:8,reset_tim:198,reset_timestep:[],resid:13,residu:230,residue1:356,resist:[6,230],resolut:438,resolv:[212,273,305,406],resort:3,resourc:[7,361,382],respa:[3,16,219,230,249,358,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,405,406,407,408,409,410,412,414,416,418,419,420,421,422,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,445,446,447,462,463,473],respect:[1,6,9,10,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,42,43,45,46,47,48,49,51,53,54,56,59,70,71,87,89,96,97,118,122,146,149,158,162,163,170,171,173,174,175,176,178,179,181,182,184,188,189,204,205,210,211,212,228,231,233,234,236,249,251,252,253,254,255,256,264,266,267,269,281,282,290,291,294,302,304,317,322,331,333,334,335,336,339,341,343,345,346,350,353,354,359,360,361,362,364,366,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,407,408,411,412,413,414,416,421,422,426,427,428,437,438,439,440,441,442,443,445,446,447,451,455,463,464,467,474,479,481,483],respon:9,respond:[6,7,147,214,384,416],respons:[6,7,247,313,320],resquar:[],rest:[6,8,12,279,283,289,366,406,407,471,472,474],restart1:273,restart2:273,restart2data:[],restart:[],restartfil:[12,13],restor:[3,8,60,61,164,193,194,279,294,302,307,471,472],restore_bia:8,restore_bias_al:8,restrain:[],restraint:[9,213,247,289,304,395],restratin:289,restrict:[],result:[1,2,3,6,7,9,11,12,13,15,16,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,45,46,47,48,49,51,53,54,56,63,64,66,67,71,75,87,90,91,93,104,106,109,110,112,114,115,116,117,118,119,141,142,144,147,151,158,159,161,163,164,167,170,171,173,174,175,176,178,179,181,182,184,187,188,189,192,195,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,218,221,224,225,226,228,233,234,236,240,247,249,251,252,253,254,255,256,264,266,267,268,269,272,273,281,282,287,288,290,292,293,305,308,310,313,314,315,317,318,319,321,322,323,325,327,330,331,333,334,335,336,339,341,345,346,355,358,360,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,416,420,421,422,428,437,438,439,440,441,442,443,445,446,447,449,451,454,456,457,458,459,463,464,465,466,468,478,479,480],resum:479,retain:[2,209,210,366,451],retart:[33,50,177,337],retreiv:8,retriev:[6,8,223,408,409,479],reus:[3,466],rev:[6,13,64,70,110,140,141,152,199,227,233,235,247,249,250,253,267,272,282,285,290,294,305,309,312,314,315,320,352,366,374,375,376,379,382,383,384,387,388,393,398,405,406,407,409,417,421,427,437,439,440,441,449],revers:[2,6,8,87,175,211,231,249,270,271,281,298,313,314,320,355,404,463,474],review:[140,281,294,312,418,427,449,468,474],rewind:344,rewrap:187,rewrit:[5,12],rewritten:19,rezwanur:416,rfac0:[140,427],rfactor:305,rfile:290,rg0:303,rgb:189,rh3:163,rh4:163,rhaphson:3,rheolog:6,rhi:438,rho0:[407,424,426,433,434],rho0_meam:407,rho:[2,40,113,236,316,348,361,367,369,370,382,407,408,409,421,430,432,478],rho_0:[433,434],rho_alpha_beta:382,rho_bkgd:407,rho_colloid:322,rho_e:317,rho_fin:316,rho_i:[408,409],rho_initi:316,rho_ref_meam:407,rho_wal:322,rhodo:10,rhodopsin:[1,10],rhosum:[],ribier:352,richardson:290,richi:[9,19],rick:[281,282,375],rick_and_stuart:282,ridg:[9,19],right:[3,6,11,12,41,164,182,183,186,208,211,231,236,246,270,330,348,376,442,454,457,464,479],rightmost:[41,208],rigid:[],rigidifi:290,rii:[89,90],rij:[209,210,271,380,435],rin:[390,401,402],ring:[],rino:73,rinv:345,rirj:[323,388],rise:29,risi:[140,427],risk:[8,289,463],rix:[89,90],rjk:[209,210],rjone:[7,9,13],rlo:438,rmask:[3,479],rmass:3,rmax:[165,209],rmdir:465,rmin0:[140,427],rmin:[165,210,398],rmsd:316,rnemd:6,robin:189,robust:[351,352,353],rock:407,rockett:417,rod:290,rodata:12,rodnei:285,roi:7,role:312,roll:12,room:[57,59],root:[11,87,89,90,312,316,360,382,461],rosati:39,rose:407,ross:407,rosski:273,rosybrown:189,rot:[6,91,273,289,312,480],rotat:[],rotaton:457,rough:[6,164,188,327],roughli:[7,10,12,41,147,162,188,225,233,234,248,249,261,277,290,305,308,309,312,346,355,360,423,425,456,463],round:[1,3,12,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,71,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,189,195,207,221,224,228,233,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,308,310,321,331,333,334,335,336,339,341,346,358,361,362,364,367,368,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,456,463,478,479],rous:226,rout:[87,390,404],routin:[5,6,8,11,15,16,38,39,56,88,168,170,236,418,438,467],roux:[6,218,234,442,474],row:[6,65,66,68,69,75,79,90,92,93,104,106,108,114,115,116,119,144,152,159,161,163,201,202,203,204,205,206,239,290,317,319,327,384],royalblu:189,rozero:407,rperp:[246,298],rpi:275,rpm:12,rrespa:[1,3,5,7,8,16,193,194,246,249,356,361,362,363,364,365,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,405,406,407,408,409,410,412,414,416,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,437,438,439,440,441,443,445,446,447,463],rspace:3,rsq:[438,444],rsurfac:317,ru3:163,ru4:163,rub:20,rubia:[408,409],rudd:[411,438],rudra:[7,9],rudranarayan:[7,275],ruiz:199,rule:[],run1:[6,359,479],run2:[6,342,344,359,479],run3:[6,359,479],run4:[6,359,479],run5:[6,359,479],run6:[6,359,479],run7:[6,359,454,455,459,479],run8:[6,359,479],run:[],run_styl:[],runloop:344,runtim:[12,17,188,360],russia:9,rutherford:317,rutuparna:[439,441],ryan:9,ryckaert:[293,339],rycroft:162,s00:416,s0st:6,s2050:1,s2629:382,s319:198,s_fact:295,s_i:[6,384],s_ij:6,sack:7,saddl:[248,355],saddlebrown:189,sadigh:[199,382,408,409],saed_vtk:118,safe:[12,188,218,234,360],safe_zon:3,safest:[3,305],safeti:295,safezon:420,safran:446,sagui:[346,379],sai:[1,3,12,13,189,419,420,452],said:353,sakai:440,salmon:189,salt:[377,386,407,454],same:[1,2,3,4,6,8,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,41,43,44,45,46,47,48,49,50,51,53,54,56,57,59,62,63,65,69,71,72,77,79,81,82,84,85,87,88,89,90,91,92,94,97,103,104,105,108,109,110,112,113,115,116,117,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,160,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,184,185,186,187,188,189,192,193,194,195,198,199,201,203,204,205,206,207,208,209,210,211,212,214,215,219,220,221,224,225,226,227,228,229,230,231,232,233,234,235,236,239,246,249,251,252,253,254,255,256,264,266,267,268,269,271,272,273,275,276,277,280,281,282,283,285,286,287,288,289,290,292,293,294,299,302,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,323,324,325,326,328,330,331,332,333,334,335,336,339,341,345,346,348,349,350,354,355,356,357,358,359,360,361,362,364,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,410,411,412,413,414,416,417,421,422,428,435,436,437,438,439,440,441,443,445,446,447,449,451,452,454,455,456,457,459,462,463,464,465,466,467,468,472,474,478,479,480,482],sampl:[1,2,4,6,9,10,11,12,14,91,143,157,162,186,188,201,202,204,205,213,215,223,225,227,229,249,250,273,276,285,287,291,302,303,305,309,312,315,327,356,366,381,454,468],sample_frequ:198,san:416,sandia:[0,5,7,9,13,14,17,70,111,385,407,416],sandybrown:189,saniti:[289,356],satellit:6,satifsi:479,satisfi:[3,12,73,118,140,162,163,212,236,253,293,325,353,356,388,468],satur:377,save:[6,8,12,19,40,59,184,188,211,226,227,233,234,235,276,285,317,346,356,358,366,456,459,466],sb3:163,sb5:163,sc3:163,scalabl:[],scalar:[],scale:[0,1,3,4,5,6,9,10,13,18,40,59,63,91,113,116,117,140,150,158,184,187,188,189,192,193,194,198,199,202,212,214,225,229,230,231,233,235,236,247,249,251,252,253,254,255,273,277,280,281,290,296,297,305,307,309,312,314,315,317,321,328,345,346,348,357,361,362,363,377,381,384,388,391,405,406,407,416,423,425,442,455,457,459,463,466,468,471,472,479,480],scale_factor:[423,425],scalegamma:236,scalexi:[3,212,249,253],scalexz:[212,249,253],scaleyz:[212,249,253],scan:[189,210,344,455],scatter:[11,118,163],scatter_atom:11,scatter_coord:11,scenario:[6,40,61,211,279,288,305,318,326,356,458,459,463,471],scf:474,schaik:404,schedul:449,schell:440,schemat:211,scheme:[6,9,18,226,227,249,273,285,293,317,345,442],schlitter1:316,schlitter2:316,schlitter:316,schmid:380,schneider:[233,235],schoen:345,schr:474,schroding:384,schroeder:474,schulten:[234,294,346,474],schunk:305,schwen:9,sci:[73,325,375,409,417],scienc:[8,198,211,230,294,314,382,408,440],scientif:[140,382],scm:11,scratch:[12,41,208],screen:[],screenshot:11,scripe:11,script:[],scripta:67,scsl:12,sdk:[],sea:11,seagreen:189,seamlessli:279,search:[0,2,3,8,12,165,167,189,190,305,351,352,353,355,357,449,455,456,468,479],seashel:189,sec:[12,473,478],second:[1,3,6,9,10,11,12,16,17,54,57,59,61,71,88,91,105,112,133,134,138,141,152,158,162,163,165,166,167,186,187,189,192,201,202,203,204,205,206,211,225,226,231,246,248,273,287,289,290,293,294,302,303,305,314,315,317,328,345,348,352,353,355,356,360,365,366,367,369,370,375,376,382,384,385,388,389,391,395,398,407,411,413,437,440,441,442,449,450,451,452,454,456,461,463,467,468,472,474,478,479,480,481,483],secondari:[3,176],sectinn:482,section:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,58,59,63,64,65,66,67,68,69,71,74,75,78,79,80,81,83,86,87,88,89,90,91,92,93,96,97,98,99,100,101,103,104,105,106,107,108,109,111,112,113,114,115,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,144,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,163,165,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,188,190,192,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,213,214,215,217,218,220,221,222,224,225,226,227,228,230,232,233,234,235,236,237,238,239,240,242,243,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,267,268,269,271,272,273,275,276,277,279,280,281,282,283,284,285,286,287,290,292,293,294,295,296,297,298,299,301,305,308,309,310,311,312,313,314,315,316,317,318,320,321,323,324,328,329,331,332,333,334,335,336,337,339,340,341,346,347,348,350,354,355,357,359,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,449,450,451,452,454,455,459,462,463,464,465,467,468,469,472,474,479,480],section_acceler:[9,12,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,195,207,221,224,228,233,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,308,310,321,331,333,334,335,336,339,341,346,361,362,364,367,369,370,371,372,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,408,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447,463],section_accerl:382,section_command:[0,1,9,330],section_error:[7,12],section_exampl:[2,6],section_histori:[7,12],section_howto:[6,8,9,11,12,40,42,57,59,64,66,67,68,70,71,72,73,75,76,77,78,80,81,82,83,84,85,86,87,89,90,93,94,95,96,97,98,99,100,101,104,106,109,110,111,114,116,117,120,135,136,137,138,140,141,144,146,158,159,161,162,166,185,201,248,259,262,265,320,365,378,449,454,457,468],section_modifi:[6,7,42,187,188,472],section_packag:12,section_perf:7,section_python:[6,12],section_start:[3,4,6,9,11,349,355,448,449,463,469,472],section_tool:[6,7],see:[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,264,265,266,267,268,269,271,272,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,292,293,294,295,296,297,298,299,301,302,304,305,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,326,328,329,330,331,332,333,334,335,336,337,339,340,341,342,345,346,348,349,350,352,353,354,355,356,357,359,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447,448,449,450,451,452,454,455,456,457,459,460,461,462,463,464,466,468,469,470,471,472,473,474,479,480,481,482,483],seed1:469,seed2:469,seed:[3,164,167,186,188,197,199,209,210,211,213,215,222,225,226,227,233,234,235,236,273,276,280,285,290,305,309,312,317,324,368,380,381,449,464,469,474,479,480],seed_com:234,seed_drud:234,seek:[41,208],seem:[6,212,318,352,407,463],seen:[12,236,326],segement:3,segment:[3,4,6,7,40,42,82,113,192,262,290,305,380,394,420,435,436,454,462,464],select:[6,12,15,17,59,71,117,118,153,158,163,164,184,188,190,197,199,204,205,214,215,222,225,230,231,246,294,304,312,313,318,320,322,324,325,327,343,345,351,355,357,360,390,395,407,451,455,457,463,464,468,479],self:[],sellerio:13,semi:[3,190,198,199,270,272,455],semiax:143,semimet:384,send:[0,3,5,7,8,11,12,189,230,451],sender:[3,451],sens:[1,3,6,7,18,39,41,42,59,183,187,201,203,204,205,206,208,211,214,226,227,232,233,234,235,276,280,285,291,305,312,313,317,320,328,355,376,396,400,439,440,441,449,454,459,463,466,471],sensabl:230,sensibl:104,sensit:[2,6,73,212,285,480],sent:[189,230,343],separ:[2,6,7,9,12,13,40,41,76,116,122,140,162,164,167,189,190,198,202,208,209,210,211,212,215,218,225,233,234,249,261,273,276,277,279,281,285,290,293,305,308,309,310,313,320,328,346,360,367,369,376,377,379,405,406,407,413,418,427,436,437,438,441,446,452,454,455,456,463,466,471,474,480,481,482],seper:377,sequec:479,sequenc:[2,3,12,41,59,187,188,189,190,208,227,248,328,348,355,391,417,469,479],sequenti:[59,60,189,417,455],sequestr:7,ser:272,seri:[3,4,6,13,18,140,187,188,189,202,206,226,227,276,359,362,387,407,411,421,428,438,452,461,462,471,472,479],serial:[],serial_icc:12,serious:8,serv:[6,128,166,305,435],server:[1,232,360],set:[],set_callback:223,set_energi:223,set_vari:[6,11,452],setarea:236,sete:[201,211],setenv:[11,12,373],setfl:[13,361,382],setforc:[],setgamma:236,setmask:8,settl:212,setup:[3,4,6,7,8,11,12,13,16,37,40,55,59,71,87,91,152,165,166,167,168,183,189,198,211,214,305,318,340,356,357,360,436,451,454,462,481,483],setup_pre_exchang:8,setup_pre_forc:8,setup_pre_force_respa:8,setvel:2,seven:409,seventh:[133,138],sever:[1,4,5,6,7,8,10,11,12,13,15,18,39,40,63,71,87,158,165,168,183,187,190,192,198,209,210,212,227,233,236,240,249,275,277,279,290,294,305,312,321,343,348,353,360,363,366,370,381,382,391,400,404,407,411,417,419,420,426,449,452,456,460,468,472,474,479,480],sfactor:[3,188,189],sfftw:12,sgi:12,sgmc:199,sgrid:305,sgroup:162,shade:188,shake:[],shan:[17,282,375],shanghai:[9,13],shape:[2,3,6,8,40,41,58,59,62,71,82,113,130,143,147,148,164,166,186,188,189,192,193,204,208,212,214,233,247,249,251,254,257,258,266,267,280,305,318,326,365,387,421,451,454,455,456,464],shapei:[113,454],shapex:[113,454],shapez:[113,454],shapshot:459,share:[],shared0:[],sharon:290,sharp:[326,407,441],shawn:9,shear:[3,4,5,6,7,9,59,61,147,186,212,214,236,249,267,305,320,323,388,405,406,416,424,426],sheet:458,shell:[],shen:9,shenderova:362,sheppard:352,shflag:12,shield:[],shift:[],shiftse:305,shiga:[6,249,250],shini:[188,482],shinoda:[6,9,249,250,422],shiny:188,ship:190,shlib:[11,12],shlibflag:12,shock:[4,9,192,197,247,253,280,324,398],shockvel:[247,280],shortcut:[212,249,277,290],shorter:[3,119,225,271,357,411,462],shortest:[188,357,363,463],shorthand:189,shoul:443,should:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,61,70,71,73,81,83,87,91,96,97,98,102,103,109,110,112,141,142,143,146,147,150,151,152,154,157,160,162,164,166,168,170,171,172,173,174,175,176,178,179,181,182,184,185,186,187,188,189,193,194,195,196,199,207,208,209,210,211,212,214,215,217,218,220,221,222,223,224,225,226,227,228,229,231,233,234,235,236,238,239,240,241,246,249,251,252,253,254,255,256,261,264,266,267,269,271,272,273,274,275,276,277,278,280,281,282,283,284,285,286,287,288,289,290,292,293,299,302,305,306,308,309,310,311,312,313,316,317,318,320,321,322,323,324,325,326,327,328,330,331,332,333,334,335,336,339,341,346,348,349,351,353,354,355,356,357,358,360,361,362,364,365,367,368,369,370,371,372,373,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,415,416,418,419,421,422,423,425,428,435,437,438,439,440,441,442,443,445,446,447,449,450,451,452,454,455,456,457,458,459,461,462,463,464,466,470,471,472,474,479,480,481],shouldn:[3,8],show:[6,11,12,116,271,355,390,407,438],shown:[1,12,17,41,96,97,118,140,150,163,183,208,211,233,249,267,273,276,285,312,345,384,385,387,388,404,421,454],shrank:71,shrink:[3,6,41,57,59,71,166,186,187,188,193,194,197,208,214,215,231,236,271,305,324,328,345,346,353,376,396,400,411,454,455],shrunk:71,shut:[6,11,356,453],si4:163,siam:325,sic:[4,376,391,407,413,437,439,441],sic_tersoff:417,sicc:[383,437,439,441],sicg:[439,441],sicsi:[383,437,439,441],side1:457,side2:457,side3:457,side4:457,side:[3,8,41,57,61,154,164,199,200,208,211,215,225,231,236,246,271,276,284,302,322,326,327,328,355,376,387,388,421,443,452,454,457,464],sidewai:4,sienna:189,siepmann:320,sigam:374,sigam_ii:394,sige:[439,441],sigma0:366,sigma14:404,sigma1:366,sigma2:366,sigma:[3,6,10,45,46,50,54,87,170,187,189,193,194,225,236,271,305,321,322,326,348,357,360,362,365,366,367,371,372,374,379,380,381,383,384,387,389,390,394,395,396,397,398,399,400,401,402,403,404,410,411,421,422,431,437,443,463,478,479,480],sigma_14:371,sigma_:377,sigma_c:374,sigma_cc:[362,374],sigma_h:386,sigma_i:[385,411],sigma_ii:[394,443],sigma_ij:[394,411,443],sigma_j:411,sigma_max:381,sigma_ss:374,sign:[3,6,12,175,183,270,302,325,330,462,471,479],signicantli:17,signifi:[3,66,75,90,93,104,106,114,144,159,161],signific:[7,12,18,86,226,247,250,285,305,318,384,387,407,411,481],significantli:[1,6,39,141,162,236,249,289,384,437],sij:202,sikandar:17,silbert:388,silent:[189,452,465],silicon:[383,407,437,454],sill:416,silver:189,sim:[9,422],similar:[5,6,7,8,9,12,17,18,40,41,46,59,68,87,112,115,141,164,165,187,189,192,193,194,201,208,223,224,226,233,239,240,250,279,280,285,289,290,309,312,322,323,325,327,346,351,352,354,362,365,366,380,382,384,388,404,405,411,416,417,426,451,456,461,463,468,470,472,474,479,480,481,483],similarli:[3,6,7,8,59,112,160,166,168,186,187,188,189,200,201,203,204,205,206,210,214,220,231,249,251,252,254,255,275,277,290,291,293,305,312,313,320,326,331,346,348,355,358,370,388,400,437,451,454,457,458,463,464,468,482],simluat:[6,39,189,305,405,455,456],simlul:[290,317],simmul:320,simpl:[],simpler:[8,42,189,290],simplest:[3,8,40,66,75,90,93,104,106,114,116,144,159,161,281,474],simpli:[1,3,6,8,11,12,14,17,66,71,75,88,90,93,95,104,106,113,114,119,144,159,161,167,168,189,192,193,194,201,203,204,205,206,210,212,214,218,223,232,234,239,249,273,277,288,290,291,313,319,320,345,346,348,354,355,360,370,379,391,400,407,411,451,452,459,462,469,472,478,479],simplif:384,simplifi:[199,289],simplist:11,simualt:346,simul:[],simulatan:360,simulation_nam:420,simulatoin:[12,455],simult:360,simultan:[6,7,15,16,214],sin:[214,246,322,325,327,417,454,457,464,479],sinc:[0,1,2,3,6,8,9,10,11,12,13,15,16,21,22,33,39,41,44,54,59,64,67,71,73,89,90,110,116,118,143,144,154,162,166,167,169,170,172,177,187,188,189,192,193,194,195,196,199,200,201,202,203,204,205,206,207,208,211,212,213,214,215,219,220,225,227,229,232,233,235,236,246,249,251,252,253,254,255,258,261,267,271,273,276,278,279,285,288,290,294,304,305,313,317,318,319,320,322,323,326,327,328,329,331,332,344,346,353,354,355,356,359,360,361,362,366,369,370,371,372,374,375,379,380,381,382,383,387,388,389,391,392,393,395,396,398,399,400,401,402,403,404,405,406,407,408,409,411,414,417,418,419,420,421,422,427,428,437,438,439,440,441,447,449,451,452,454,455,456,457,459,462,463,464,465,466,468,472,474,478,479,480,482],sinclair:[7,382,436],sine:417,singapor:140,singh:361,singl:[1,2,3,6,7,8,9,11,12,14,15,16,17,18,40,41,42,57,59,61,63,65,66,68,69,75,77,79,87,88,90,92,93,104,106,108,113,114,115,116,117,119,144,159,161,162,164,187,188,189,190,192,197,200,201,202,203,204,205,206,208,210,211,212,215,218,222,224,229,236,239,246,249,250,253,261,273,275,276,278,289,290,291,293,295,301,305,307,317,319,322,323,325,327,328,330,345,346,351,354,355,356,357,359,360,361,362,366,371,373,375,381,382,383,384,385,388,389,390,391,392,393,407,408,409,413,414,417,418,419,420,421,427,428,437,439,440,441,449,450,452,454,461,462,463,464,465,466,467,468,471,479,482,483],singleel:366,singular:[404,405,406],sinnott:[282,362,375],sinusoid:[164,214,322,323,325,327],sio:375,sirk:[141,435],sisic:[383,437,439,441],sisisi:[383,437,439,440,441],sister:373,sit:[272,454],site:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,67,70,87,230,236,237,293,346,361,366,376,382,386,396,400,404,414,419,420,442],situat:[9,212,225,236,249,273,291,352,366],sival:163,six:[6,133,138,140,202,203,413,417],sixth:413,sixthpow:[372,411],size:[],size_restart:8,sizex:255,sjplimp:[0,7,11,12],sjtu:9,skew:[3,6,58,59,166,188,214,249,454,457],skin:[3,12,39,61,73,115,165,167,225,261,290,317,356,357,360,415,472,478],skip:[12,16,33,177,275,344,354,359,395,454,459,462,471,479],skyblu:189,slab:[3,6,71,152,204,276,302,345,346,356,411],slateblu:189,slategrai:189,slater:[],sleight:54,slepoi:407,slice:[],slider:11,slight:[3,12,317],slightli:[1,6,39,40,187,188,190,285,290,346,362,376,394,396,400,439,441,449,462,481],sligthli:379,sliozberg:435,slip:[3,192,305,321,327],sllod:[],slope:[6,103,104,313,315,320,377,479],slot:1,slow:[3,6,7,12,39,226,230,233,234,247,305,312,345,355,360,411,463,474,480],slower:[1,10,17,39,234,346,360,366],slowest:[317,451],slowli:[12,71,208,321,353,428,456],slurm:12,slurm_localid:12,sm3:163,small:[],smallbig:3,smaller:[1,3,6,12,16,17,39,56,59,61,71,119,162,166,187,188,189,199,215,219,225,236,272,290,305,315,330,345,346,351,360,394,411,436,443,444,454,461,463,483],smallest:[3,70,72,162,247,287,479],smallint:3,smallq:346,smallsmal:[3,12],smart:227,smd:[],smd_contact_radiu:464,smd_lammps_userguid:9,smd_mass_dens:464,smd_user_guid:[],smi:[3,360],smirichinski:9,smit:225,smith:414,smmoth:464,smooth:[],smoother:164,smoothli:[54,140,313,320,371,389,402,404,441,447],smpd:12,sn2:163,sn4:163,sna:[],snad:[],snap:[],snapcoeff:427,snaphot:459,snapparam:427,snapshot:[],snav:[],snb:17,snow:189,soc:390,socket:[12,17,18,232,451],soft:[],softer:[322,326],softwar:[1,6,11,12,14,15,16,17,18,19,162,230,275,291],sole:[209,210,355,417,424,426],solid:[4,6,7,9,10,39,40,41,59,70,73,91,141,162,198,208,212,214,219,239,249,251,252,254,255,271,272,277,290,312,315,346,348,367,398,416,424,426,454],solut:[3,6,13,162,212,219,247,288,293,305,326,479],solv:[3,9,12,18,236,281,293,315,317,346,352,406],solvat:[4,10,164],solvent:[4,7,13,61,71,165,167,208,222,226,227,233,249,288,290,302,305,313,320,321,371,374,376,377,386,396,405,406,421,436,454,464],solver:[],some:[1,2,3,4,6,7,8,10,11,12,13,16,17,18,39,40,41,55,61,63,71,102,105,107,113,117,119,143,144,145,156,157,158,164,167,172,175,183,185,187,188,189,192,193,194,197,199,200,201,202,203,204,205,206,208,210,211,212,213,222,225,247,249,250,278,279,281,283,290,294,306,312,317,318,319,321,322,328,343,344,345,346,351,352,353,354,355,356,357,360,363,365,366,373,376,382,384,391,411,419,420,436,438,449,451,452,453,454,456,459,460,461,462,463,464,466,468,471,472,478,479,480,483],somehow:3,someindex:329,someon:[7,11,353],someth:[2,3,7,8,11,12,59,212,249,322,325,327,356,391,452,461],sometim:[2,3,6,8,12,18,204,212,249,313,320,345,357],somewhat:[7,9,12,70,144,154,201,249,345],somewher:[17,250,384],soon:[199,211,222,225,230],sophist:7,sorensen:468,sort:[3,13,16,39,71,187,189,190,230,355,356,360,381,455,456,482],sound:[128,236,247,295,433,434],soundspe:[433,434],sourc:[],source_integr:198,sourceforg:11,south:140,souza:313,space:[2,3,6,8,11,12,18,41,59,71,118,140,153,158,163,164,184,186,188,193,194,197,203,204,205,208,210,214,215,231,236,243,246,249,272,273,288,291,295,305,322,324,325,327,330,345,346,348,354,355,356,367,369,370,376,379,382,384,394,396,400,407,414,417,422,438,444,446,451,454,457,466,472,474,479,480],spahn:388,span:[2,12,38,71,193,194,204,231,290,345,361,362,366,375,382,385,392,393,407,408,409,413,417,427,437,439,440,441,448,449,457,458,479],spars:[71,184],spatial:[],spawn:230,spc:[],spcpu:472,speak:[17,305,312],spearot:[118,163,291],specfi:[12,107,231,457],speci:[],special:[],special_bond:[],specif:[1,2,3,6,7,8,9,10,12,13,15,17,18,22,29,33,40,41,42,50,63,71,108,113,115,116,144,146,149,164,172,177,187,188,189,190,192,193,194,197,198,201,202,203,204,205,206,208,211,213,222,223,225,226,230,236,244,276,278,279,282,290,312,317,318,322,328,332,346,353,355,360,362,365,366,378,382,387,388,391,392,393,394,407,411,419,420,421,436,437,442,443,451,454,455,459,460,461,463,464,470,471,472,478,479,480,481],specifi:[2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,59,61,63,65,66,68,69,70,71,73,75,76,77,78,79,80,81,83,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,103,104,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,141,142,144,146,151,152,153,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,224,225,226,227,228,229,231,232,233,234,236,237,238,239,241,244,245,246,247,248,249,250,251,252,253,254,255,256,261,264,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,292,293,294,298,299,302,303,304,305,306,307,308,309,310,312,315,316,317,319,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,344,345,346,348,349,350,353,354,355,356,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,474,478,479,480,481,482,483],specifii:[227,236],speciti:463,spectral:427,spectrum:[9,140,280,285],sped:[39,247],speed:[1,3,6,9,12,14,15,16,17,18,19,39,41,128,189,208,233,236,247,280,295,305,312,318,324,345,346,355,360,366,376,411,433,434,439,449,463,469],speedup:[1,18,346,463],spefici:[164,188,390],speicifi:354,spell:457,spellmey:[6,170,466],spend:200,spent:[1,12,13,15,449,468],sph:[],sph_lammps_userguid:9,sph_user_guid:[],sphere1:236,sphere:[],spheric:[],spheriod:[3,6],spherioid:305,spheroid:[6,290,305],spike:116,spin:[9,40,113,323,363,384,454],spirit:7,spit:3,spline:[],split:[1,3,6,12,18,41,201,204,208,234,249,325,345,360,443,448,451,463],splittol:[6,345],sppark:6,spread:[1,6,12,330,462],spring:[],springer:294,springgreen:189,sptial:71,sputter:215,sq2:[3,348],sqrt:[2,3,59,81,89,225,233,234,235,271,305,321,323,348,374,380,382,386,388,407,411,479],squar:[],squeez:[212,231,405,406],squibb:[5,7],sr2:163,src:[0,1,3,4,6,7,8,9,11,12,14,15,16,17,18,19,162,187,223,293],srd:[],srolovitz:382,srp:[],srun:12,ssao:[188,482],stabil:[6,9,233,249,366,419],stabl:[6,64,128,236,253,289,295,366,474],stabli:226,stack:[3,8,70],stage:[3,87,192,223,248,284,328,355,449,468,479],stagger:[1,3,189,346,461,470,479],stai:[3,14,17,193,194,247,263,280,360,454],stamp:[312,455],stamped:12,stan:17,stand:[0,6,7,13,286,419,420,452],standard:[],stanford:9,starikov:317,start:[],start_6:386,start_7:463,startstep:479,stat:[12,54,168,271,285,353,380],statcoul:478,statcoulomb:478,state:[],statement:[3,452,453],stationari:[],statist:[3,6,12,39,41,64,209,210,211,226,227,233,234,235,275,276,280,285,290,293,305,316,317,318,353,355,362,380,381,388,405,446,449,456,462,464,468,471,472],statu:[3,12,54,60,121,168,213,218,234,375,468],statvolt:478,std:12,stdin:[3,12,344],steadi:[6,247,253,280],steelblu:189,steep:438,steepest:[7,352],steer:[7,9,213,216,294],stegailov:317,steinhaus:474,stencil:[3,236,345],step:[1,2,3,6,8,10,11,12,13,14,15,16,17,18,19,39,71,91,96,97,110,116,117,128,141,150,160,162,187,188,189,190,192,193,194,198,199,201,202,203,204,205,206,208,209,210,211,212,214,215,218,219,222,223,225,227,230,231,234,247,261,271,272,278,279,280,281,282,283,291,293,294,295,305,307,310,311,312,313,314,315,316,317,318,319,320,327,328,330,344,345,351,353,355,356,380,386,390,407,419,420,449,451,452,456,458,459,461,462,463,468,469,471,472,474,479,483],stepani:294,stepwis:87,stesman:312,steve:[0,5,7,13],steven:211,stiff:[6,40,51,209,210,272,273,353,416,474],stile:377,still:[1,3,6,9,11,12,13,14,17,18,38,41,61,71,108,116,162,168,184,185,187,189,193,194,208,229,233,261,281,285,305,317,330,345,346,351,372,382,387,388,391,395,405,415,419,421,428,436,454,456,462],stilling:[3,5,7,15,88,383,409,417,436,437,466],stipul:230,stl:[9,71,298,301],stl_surf:301,stochast:[4,7,9,192,227,305,312,327,381],stoddard:379,stoke:[236,321],stoll:[233,235],stone:[9,19,346,379],stop:[],stopstep:479,stopthresh:[41,208],storag:[3,12,15,319,360,466],store:[],store_st:306,storm:12,stouch:7,str:479,straatsma:6,straddl:[3,59,61,154,231,290,302,328,454,458,464],straight:290,straightforward:[13,384,474],strain:[2,3,6,59,80,121,124,125,130,131,132,136,137,186,212,214,247,249,253,405,406],strang:[184,188,479],strategi:[],stratford:236,strcmp:330,stream:[3,6,112,141,144,147,148,188,198,214,226,227,233,234,267,276,285,305,480],streamlin:[12,462],streitz:[],streiz:376,strength:[3,9,140,158,169,188,289,322,326,391,420,421,466],stress:[],stretch:[3,54,59,117,209,294],strict:427,strictli:[6,41,184,208,247,280,312,454],stride2:479,stride:[189,227,461,470,479],strietz:376,strike:215,string:[2,3,6,11,12,41,164,187,189,201,202,203,204,205,206,208,225,278,291,330,347,359,407,417,418,419,427,450,452,454,464,465,471,472,479],strip:479,strong:[281,362],stronger:6,strongest:[405,406],strongli:[1,6,13,215,290,293,317,474],structrur:3,structur:[],structured_point:291,strucur:73,stuart:[281,282,362,375,436],stub:12,stuck:212,student:275,studi:[6,105,398],studio:12,stukowski:[199,382],style1:[33,50,177,337,391,454],style2:[33,50,177,337,391,454],style:[],style_nam:[249,250],stylist:8,sub1:465,sub:[1,3,4,6,7,8,9,11,12,13,18,33,37,39,40,41,42,50,55,58,61,63,68,87,91,107,140,158,166,177,183,188,189,193,194,208,212,214,249,250,253,272,280,285,290,293,317,318,326,328,337,340,348,350,360,365,375,381,387,388,390,391,411,419,420,421,442,443,451,454,457,463,471],subbox:[117,188,189],subdirectori:4,subdivis:236,subdomain:236,subequ:11,subgroup:[187,482],subject:[6,41,167,208,442],submit:[],subramaniyan:13,subroutin:360,subscript:[11,317,331,385,479],subsequ:[6,11,12,41,59,165,189,208,212,225,312,317,318,319,348,359,382,436,452,454,455,461,464,465,473,479,483],subset:[6,11,12,16,41,80,140,187,189,208,245,249,251,252,253,254,255,276,277,281,290,355,360,362,366,391,411,448,451,454,456,459,463,479],substanti:[6,16,437,463],substep:249,substitut:[1,2,3,12,187,232,355,359,384,411,452,465,479],substract:376,substrat:[166,212,249,251,252,254,255,277,290,454],substyl:[404,463],subsystem:317,subtl:[94,96,97,227],subtleti:150,subtract:[3,6,54,63,91,94,97,102,103,105,112,141,142,143,144,145,146,147,148,150,151,152,153,154,156,157,187,192,201,225,226,229,233,234,235,237,241,245,267,274,290,328,356,403,454,464,472,479,480],succe:12,succeed:202,succesfulli:3,success:[2,6,11,12,14,15,116,187,189,199,202,212,215,225,261,276,290,305,312,330,353,355,452,461,462],successfulli:[3,11,187,215,452,465],successulli:11,successv:459,sucessfulli:3,sudden:36,suddenli:326,sudo:[11,12],sufac:42,suffer:[16,17,18,320,326,360],suffici:[2,3,7,17,18,41,61,71,204,208,247,249,272,305,312,319,322,330,395,411,454,474],suffix2:12,suffix:[],suggest:[0,7,12,247,280,452,474],suit:[7,9,13,194,236,384],suitabl:[4,12,13,17,54,87,187,211,279,309,366,373,388,404,407,419,420,449,468],sum:[3,6,8,9,12,40,70,71,76,80,83,88,89,90,94,98,103,105,107,109,110,112,116,117,123,139,140,141,142,144,145,146,147,150,151,152,153,154,156,158,160,161,162,201,202,203,204,205,206,215,223,226,233,234,239,271,272,276,280,285,290,291,294,304,315,317,319,322,326,328,345,346,353,365,376,380,384,385,394,396,399,407,419,420,427,443,452,472,474,479,480],summar:[6,385],summari:[],summat:[6,9,42,70,88,345,346,370,376,382,383,396,400,437,439,440,441],summer:[3,13,204,419,420],sumsq:117,sun:[21,43,171,331,372,411,420],sunderland:17,sup:[272,280,285,375,474],supercomput:[12,17,18,452],superpos:[391,436],superposit:7,supplement:[227,419,420],supplementari:[213,387,421],suppli:[12,184,225,247,317],support:[1,3,6,7,8,9,11,12,13,14,15,16,17,18,19,40,41,42,87,88,102,107,187,188,189,190,193,194,195,196,201,208,211,212,213,220,223,227,228,231,233,234,235,236,244,247,249,251,252,253,254,255,266,267,268,269,271,272,277,280,282,284,289,290,295,296,297,298,299,301,302,304,308,309,310,311,315,320,322,326,343,344,345,346,352,353,354,360,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,437,438,439,440,441,442,443,445,446,447,451,455,456,461,463,464,465,467,468,474,478,482,483],suppos:[3,8,385,479],suppress:[6,12,162],sure:[6,8,11,13,14,184,193,194,212,290,293,327,382,438],surf:165,surfac:[2,3,4,6,8,9,40,42,57,70,118,140,162,164,167,188,192,215,222,231,236,239,271,282,289,298,301,302,305,312,317,322,326,327,355,366,391,405,406,425,443,446,451,457],surface_mov:317,surfact:[377,386],surpris:384,surrog:9,surround:[38,56,70,164,184,189,212,249,251,252,254,255,271,277,290,438,474],suspect:3,suspens:[405,406],sustain:[187,212,388],suzuki:[249,290],svg:6,svn:[7,11,12],sw_exampl:418,swamp:290,swap:[],swegat:316,swiggl:[3,246,322,325,327,457,479],swiler:[140,427],switch7_section_start:386,switchflag:[140,427],swm4:474,swol:53,swope:6,sxx:189,sy0302:9,symbol:[6,12,118,163,287,366,384,427],symmetr:[6,70,87,93,112,131,132,133,136,137,138,141,193,194,212,249,250,313,320,361,373,379,382,439,441,479],symmetri:[3,5,6,7,8,63,64,70,166,187,247,271,331,346,361,454,474],sync:[3,6],synchron:[1,227,355],synechococcu:7,syntax:[],sysdim:272,sysstem:366,system:[],system_:273,systemat:[6,233],systemx:3,t10:469,t11:469,t12:469,t13:469,t14:469,t15:469,t3e:12,t_chain:3,t_corr:3,t_correl:449,t_dephas:449,t_e:317,t_e_min:317,t_equil:[314,315],t_event:[3,449,468],t_hi:468,t_infil:317,t_init:[280,317],t_iter:3,t_lb:236,t_lo:468,t_order:3,t_oufil:317,t_out:317,t_outfil:317,t_qm:280,t_switch:[314,315],t_target:368,ta06a:427,ta5:163,tab:[2,454],tabbernor:118,tabinn:411,tabul:[3,7,13,22,37,38,44,55,56,65,71,79,92,184,305,345,361,366,367,369,370,371,372,373,376,382,384,396,400,414,417,420,422,436,438,439,444,456],tabular:417,tabulate_long_rang:420,tad:[],tadmor:9,tag:[198,217,474],tagint:3,tail:[3,87,110,158,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,443,445,446,447,456,472],tailor:[71,318],tait:[9,433,434],taitwat:[],take:[1,2,3,6,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,77,87,89,91,109,112,113,116,117,141,142,151,158,162,168,170,171,172,173,174,175,176,178,179,181,182,184,187,188,189,193,194,195,207,208,212,214,221,224,228,232,233,234,249,251,252,253,254,255,256,264,266,267,269,282,290,292,293,302,303,304,305,307,308,309,310,318,321,328,331,332,333,334,335,336,339,341,345,346,350,360,361,362,364,366,367,368,369,370,371,372,373,374,375,376,379,380,382,383,385,386,387,388,389,390,394,396,397,398,399,400,401,402,403,404,405,408,412,413,414,416,419,420,421,422,428,435,437,438,439,440,441,442,443,445,446,447,448,452,455,462,463,464,471,472,479],taken:[6,59,164,186,211,215,225,226,227,233,234,235,236,276,280,283,317,335,382,384,387,437,449,463,464],talk:[6,7],talli:[3,6,8,41,107,113,201,203,204,205,208,210,233,235,250,305,313,320,384,386,390,419,420,479],tan:[189,479],tandem:[4,16,290],tangent:248,tangenti:[6,108,305,323,327,388],tanh:317,tantalum:[4,427],taper:[3,283],tar:12,tarbal:[0,8,11,12],target:[3,6,7,8,11,12,17,39,41,189,197,208,212,213,215,225,226,227,233,234,235,249,250,251,252,253,254,255,266,267,268,269,273,277,280,285,290,294,303,308,309,310,311,316,317,320,321,324,343,346,368,380,449,460,462,480],target_fil:316,task:[1,6,7,12,13,14,15,16,17,18,54,189,230,273,318,360,452],taskset:16,tatb:[4,286],tatom:474,tau:[3,153,233,234,236,249,277,290,308,309,314,315,317,473,478],tau_1:226,tau_k:226,tau_n_k:226,tb3:163,tbead:156,tbp:366,tchain:[249,250,253,267,268,290],tcl:285,tcom:234,tcsh:[11,12,373],tdamp:[233,249,250,253,290,308,309],tdephas:449,tdrude:[149,218,234,474],teal:189,tech:[7,9,13],technic:[6,7,9,236,283,305,420],techniqu:[6,7,9,87,192,212,247,280,290,321,324,346,411,438,474],technolgi:9,technolog:[9,14,19,230],tell:[2,6,11,12,37,55,183,192,272,340,356,419,420,436,452,456,474],telsa:17,temeperatur:11,temp:[],temp_drud:474,temp_eff:97,tempcom:[143,157],temper:[],temperar:273,temperatur:[],temperature_definit:198,tempfix:469,templ:[7,9,18],templat:[3,8,13,17,19,40,164,165,167,215,225,276,290,293,354,454],templeton2010:198,templeton2011:198,templeton:[9,198],tempor:226,temporari:[2,461],temporarili:[184,289,467,468],ten:14,tend:[29,249,271],tensil:[7,214],tensor:[3,6,8,63,82,83,89,90,91,93,106,112,127,130,131,132,133,136,137,138,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,212,236,239,249,250,253,275,277,290,320,345,346,354,384,405,406,424,426,472,479],tenth:[127,344],term:[0,1,3,5,6,7,8,9,12,20,21,22,27,38,40,45,46,61,87,88,89,91,110,112,141,143,152,157,158,171,172,173,184,189,193,194,200,202,203,206,214,220,226,227,228,233,234,235,236,248,249,250,251,252,253,254,255,266,267,269,273,277,280,289,290,303,308,309,310,317,319,321,323,331,332,341,345,353,356,361,362,366,367,368,369,370,371,372,374,375,376,377,378,379,380,382,383,384,385,387,388,389,396,400,403,404,405,406,407,408,409,411,414,421,435,437,439,440,441,446,463,464,466,472,474],termin:[118,249,353,355,424,426,453,462],termostat:309,terrel:352,terri:7,tersoff:[],tersoff_1:[439,440,441],tersoff_2:[439,440,441],tersoff_mod:440,tertiari:176,tessel:[9,162],test:[],test_descriptor_str:3,testf:184,testu:184,tether:[6,288,294,302,304,315,386],tex:8,texa:416,texas_holdem:289,text:[2,3,4,6,7,8,12,13,38,41,56,184,187,188,189,192,198,201,202,203,204,205,206,208,213,230,278,316,317,329,346,348,355,382,385,395,407,427,438,450,454,455,471,479,481],textur:17,tfactor:[3,189],tfinal:479,tfix:289,tfmc:[],th4:163,than:[1,2,3,6,8,9,11,12,13,14,15,16,17,18,27,38,39,40,41,42,56,57,58,59,61,63,68,71,76,86,88,105,108,112,115,116,119,141,162,165,166,167,173,184,186,187,189,192,197,199,201,203,204,205,206,208,209,210,211,212,214,215,216,219,222,225,226,227,228,231,232,233,236,247,271,272,276,277,278,279,280,281,283,285,288,289,290,291,294,295,301,302,303,305,309,310,312,313,317,320,321,322,323,324,325,326,327,328,330,345,346,351,352,353,354,355,356,357,360,365,366,367,369,370,371,382,384,387,388,394,405,406,407,411,419,420,421,428,436,437,438,441,443,444,446,449,450,451,452,454,455,456,457,458,459,462,463,466,468,469,471,479,480,481],thank:[230,439,441],thb:420,thb_cutoff:420,thb_cutoff_sq:420,thei:[0,1,2,3,4,6,7,8,11,12,13,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,37,38,39,40,41,42,43,45,46,47,48,49,51,53,54,55,56,57,59,61,63,64,66,68,70,71,74,75,81,82,84,87,89,90,91,93,103,104,106,108,109,112,114,115,116,117,119,140,142,143,144,146,147,150,151,157,159,161,164,166,167,168,170,171,173,174,175,176,178,179,181,182,183,184,187,188,189,192,193,194,195,197,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,220,221,224,225,226,228,229,230,233,234,236,239,246,249,251,252,253,254,255,256,257,258,259,264,266,267,269,275,276,277,278,279,281,282,289,290,291,292,293,305,306,308,309,310,312,316,317,319,320,321,323,325,326,328,330,331,333,334,335,336,339,340,341,343,345,346,348,350,352,353,354,355,356,359,360,361,362,364,365,366,367,368,369,370,371,372,373,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,416,417,419,420,421,422,427,428,435,436,437,438,439,440,441,442,443,444,445,446,447,450,452,454,455,456,457,458,459,463,464,466,467,472,474,479,481,482],them:[1,2,3,4,6,7,8,9,11,12,13,14,39,40,41,54,59,71,91,107,114,117,119,166,171,187,188,189,190,200,201,202,203,204,205,206,208,211,212,214,222,230,233,234,245,249,251,252,253,254,255,266,269,271,277,279,287,288,289,290,293,305,308,309,310,312,316,317,319,323,324,325,327,328,331,346,348,354,355,356,360,361,366,373,382,385,387,391,411,421,428,443,449,452,454,461,466,469,474,479,480],themselv:[6,11,167,193,194,208,234,345,346,355,357,361,366,376,382,404,407,408,409,427,479],theor:312,theorem:[226,233,366],theoret:[105,230,280,437],theori:[3,9,12,40,140,198,213,227,249,272,345,346,366,446,468],thereaft:[71,241,274,290,313,320,452],therebi:[318,405,406],therefor:[3,6,12,64,87,149,199,218,225,234,236,293,312,346,378,418,420,437,442,447,463,474],therein:[6,407],thereof:87,thermal:[],thermo:[],thermo_modifi:[],thermo_p:[3,63,109,452,472],thermo_press:[63,112,212,218,249,251,252,253,254,255,277,471,472,474],thermo_styl:[],thermo_temp:[63,112,142,211,212,225,249,251,252,253,254,255,266,267,269,272,277,308,309,310,471,472,474],thermoberendsen:6,thermochem:478,thermochemistri:384,thermodyam:[472,478],thermodyanm:[63,211,305,328,463],thermodynam:[],thermophys:411,thermost:[6,146,197,213,218,234,324,474],thermostat:[],thermostatequ:6,thesi:[345,346,405,418],thess:367,theta0:[20,21,24,26,27,28,32,33,35,36,140,173,289,339],theta0max:140,theta10:366,theta1:[171,331,366],theta2:[171,331,366],theta3:[331,366],theta4:366,theta5:366,theta6:366,theta7:366,theta8:366,theta9:366,theta:[3,6,26,27,37,38,63,65,80,140,163,164,173,186,188,228,285,289,317,331,339,390,417,440,454,457,464],theta_0:413,theta_:[339,366],theta_c:390,theta_ijk:366,theta_ijl:331,theta_jik:[408,409],theta_pi:366,theta_sigma:366,thex:281,thi:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,474,475,476,477,478,479,480,481,482,483],thick:[71,118,188,204,457],thie:110,thijss:312,thin:[116,188],thing:[3,6,11,12,54,68,71,212,249,277,290,305,451,452,456,479],think:[3,6,7,8,11,13,189,290,328,333,336,348,353,391,419,420,438,452,456,459,479],third:[6,9,29,91,134,140,141,162,201,202,203,204,205,206,226,287,302,303,317,375,385,407,413,442,449,450,452,454,457],thirumalai:176,thistl:189,tho:383,thole:[],thompson:[0,5,7,9,13,112,140,141,427],thoroughli:9,those:[1,2,3,4,5,6,7,8,12,13,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,43,45,46,47,48,49,50,51,53,54,56,61,71,77,87,91,108,109,110,112,116,140,141,144,154,164,168,170,171,173,174,175,176,177,178,179,181,182,184,186,187,188,189,199,200,201,202,204,205,206,212,214,215,222,225,228,230,231,232,233,239,248,249,251,252,253,254,255,256,264,266,267,269,276,279,282,290,307,314,315,319,323,324,325,328,329,331,333,334,335,336,337,339,341,345,346,353,355,356,360,361,362,364,367,368,369,370,371,372,373,374,375,376,379,380,382,383,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,407,408,411,412,413,414,416,419,420,421,422,427,428,436,437,438,439,440,441,443,445,446,447,449,451,452,454,456,457,458,459,461,463,464,466,468,471,472,474,479,482,483],though:[6,8,12,16,39,40,63,71,91,104,164,187,189,199,204,209,210,212,214,219,250,288,290,292,301,313,320,330,345,348,355,380,381,382,384,385,387,388,404,405,411,449,454,456,457,462,466,479],thought:[147,233,267,290,321,322,352,388,395,474],thread:[1,3,9,12,16,17,18,230,318,360,467],threads_per_atom:3,three:[3,6,54,63,74,87,91,105,117,118,119,130,140,143,163,164,176,192,211,212,217,237,249,253,272,277,290,305,312,314,317,335,339,345,346,354,360,361,362,366,382,383,385,387,388,392,395,407,408,409,413,417,420,421,427,437,439,440,441,452,454,457,479],threebodi:437,thresh:[41,187,188,189,208,452],threshhold:[3,41,188,208,328,452],threshold:[3,41,86,189,208,271,356,420,449,468],thrid:452,through:[3,6,7,9,11,12,63,164,187,190,212,223,225,230,231,236,238,239,240,249,250,273,281,298,312,317,322,344,351,362,383,384,388,396,422,428,435,442,449,452,455,465,471,474],throughout:[6,16,116,118,318,360,454],thru:[3,6,7,11,12,66,74,75,81,89,90,93,103,104,105,106,159,186,187,189,203,246,305,325,330,344,353,359,457],thrust:1,thu:[1,2,3,6,8,9,11,12,18,33,38,39,41,42,50,59,61,63,64,66,67,70,71,72,73,75,77,81,88,90,91,93,103,104,106,108,109,113,114,115,116,117,140,141,144,147,152,154,159,160,161,164,166,167,168,172,177,183,184,186,187,188,189,190,192,193,194,195,196,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,218,220,222,226,227,228,229,230,231,233,234,239,244,249,253,263,271,277,279,281,285,288,290,291,292,293,294,298,299,302,303,304,305,306,308,309,310,312,313,316,317,319,320,321,322,325,326,327,328,330,331,337,345,346,348,351,353,354,355,359,360,361,362,365,366,367,368,369,370,371,372,373,374,375,376,380,381,382,383,384,385,386,387,388,391,392,393,394,396,400,404,405,406,407,408,409,411,412,414,416,417,418,419,420,421,427,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,449,451,452,454,455,456,457,458,459,461,462,463,464,466,468,469,470,471,472,474,478,479,480,481,482],thumb:[8,10,17,164,186,246,290,360,374,457,463],thz:285,ti2:163,ti3:163,ti4:163,tight:366,tightli:279,tij:379,tildeslei:[29,87,379],tile:[3,6,41,62,164,208,394,443,451],tilt:[3,6,57,58,59,71,152,166,187,189,204,212,214,215,228,247,249,250,271,280,346,348,454,457,472],time:[],time_integr:198,timedelta:202,timelin:5,timer:[1,12,14,17],timescal:[3,200,201,202,203,204,205,206,247,280,285,384,449,463],timespan:[233,234,249,277,290,308,309],timestamp:[3,459],timestep:[],timesteppnig:293,tin:[375,376],tine:202,tinfoil:346,tini:[164,353,366,480],tinker:7,tip3p:[],tip4:6,tip4p:[],tip:[],tirrel:322,titan:15,titer:290,titl:[201,202,203,204,205,206,278,420],title1:[201,202,203,204,205,206],title2:[201,202,203,204,205,206],title3:[201,202,203,204,205,206],tji:379,tl1:163,tl3:163,tlbr_msw:417,tlo:468,tloop:[249,250,253],tlsph:[2,122],tlsph_defgrad:122,tlsph_strain:[124,125],tlsph_strain_rat:[124,125,131],tlsph_stress:[121,131,132],tm3:163,tmax:[3,219,468],tmd:[],tmd_dump_fil:316,tmdatom:316,tmin:219,tmp1:[203,206,465],tmp2:[203,206,465],tmp3:465,tmp:[6,12,41,66,68,69,75,90,93,104,106,114,116,144,159,161,187,188,189,208,279,290,313,320,359,461,465,479],tobia:[249,250,290],todd:267,toe:158,toff:[354,454],togeth:[2,3,6,11,12,17,39,41,71,115,141,144,158,165,187,193,194,201,203,208,212,218,227,234,249,277,290,294,299,302,305,323,327,328,386,391,452,457,462,474,482],toggl:[59,168,461],togheth:3,togther:3,tol:[293,305,345,437],toler:[3,212,281,282,283,293,305,353,355,437,449,468],tomato:189,tong:[9,13],too:[1,3,6,7,39,41,64,67,70,72,73,77,88,140,152,165,167,188,208,209,210,212,215,222,225,229,249,272,277,281,285,287,293,305,312,313,317,320,346,355,356,360,380,449,457,468,471,474,479],took:[71,428],tool:[],toolkit:[6,7,13,14,15],top:[0,3,8,9,11,12,13,59,147,186,192,207,214,229,236,248,267,291,324,325,327,355,360,419,420,427,454,458,464],top_group:299,top_veloc:299,topic:[479,482],toplog:[3,451],topolgi:40,topolog:[2,3,6,7,8,12,13,39,40,87,108,115,167,168,189,209,210,230,275,354,391,411,451,454,455,456,458,459,466],topwal:207,torder:290,torqu:[],torsion:[6,171,172,183,362,419,420],torsion_flag:362,tosi:367,tot:285,total:[3,6,11,12,14,15,16,17,18,39,41,63,71,81,88,89,90,91,98,102,103,104,105,107,109,110,117,122,123,124,125,127,128,129,130,131,132,133,140,141,142,144,145,146,147,150,151,152,153,154,156,158,160,161,162,187,192,195,196,199,201,203,204,205,207,208,210,216,218,220,223,224,225,226,231,233,234,235,236,237,239,247,250,253,263,272,273,275,276,280,285,287,289,290,291,292,294,296,299,302,304,313,314,315,317,320,322,326,345,353,354,355,356,357,360,361,363,365,366,375,382,384,388,407,408,409,417,419,420,424,427,443,449,451,452,456,462,463,468,469,472,479],touch:[12,231,323],toukmaji:[346,379],toward:[9,29,162,188,192,215,216,231,236,248,253,271,288,302,316,318,339,355],toxvaerd:401,tpa:360,tparam:290,tpartial:144,tpc:360,tpcpu:472,tperiod:290,tptask:[16,360],tqx:[113,187,307],tqy:[113,187,307],tqz:[113,187,307],trace:384,track:[3,7,12,210,214,236,317,327,449,454,460,468,472,479],track_displac:198,tracker:230,trade:[6,12,282,345,346,376,396,400,463,468],tradeoff:411,tradit:[6,9,346],traffic:12,trail:[2,22,44,77,87,116,158,168,172,189,193,194,290,332,350,354,355,373,385,407,420,427,448,454,462,464],train:420,traingul:301,traj:213,traj_titl:420,trajectori:[3,6,12,39,87,187,230,249,251,252,254,255,256,257,259,260,262,264,265,266,267,268,269,273,290,293,294,298,318,327,380,411,420,456,464,474,478],tran:[175,176],transfer:[1,6,16,198,218,230,232,313,317,320,345,360,366,474],transform:[],transit:[6,86,248,294,316,355,377,404,409,441,449,468],translat:[3,6,61,63,94,95,96,97,98,143,144,148,157,201,225,229,233,234,239,249,254,255,266,269,273,290,308,309,310,312,348,384,454,472],transmiss:230,transmit:[6,230],transpar:[14,17],transport:[198,317,429],transpos:12,trap:[3,6,91,160,202,231,319,479],trapezoid:[202,479],trate:[3,214,230],travel:305,treat:[2,3,6,8,17,40,42,71,82,84,85,141,143,157,168,185,201,202,203,206,215,224,250,272,275,276,290,305,317,319,326,330,344,345,353,354,356,365,378,384,385,387,390,394,408,409,421,443,454,457,459,462,464,474,479],treatment:[9,285,378],tree:[3,275,404],tref:381,tri:[],tri_surfac:[120,301],trial:[215,225,363,463],triangl:[2,3,6,7,40,42,82,113,134,162,192,265,290,301,305,425,436,443,454,464],triangleflag:454,triangul:[2,6,13,301,425],triangular:[4,6,42,82,113,212,265,301,425,454],tricki:[451,474],triclin:[],triflag:6,trigger:[3,11,12,62,86,208,211,225,353,472],trigon:25,trilinear:236,trilino:17,trim:[3,455],tripflag:419,tripl:[2,140,214,366,419,450,452],triplet:[3,34,37,383,413,417,437,439,440,441],trivial:[8,11],trj:420,trott:[7,9,14,17,140,427],troubl:[11,12],truli:8,truncat:[3,5,6,12,71,279,285,322,326,352,364,376,384,388,396,398,401,411,416,464],trung:15,tscale:[3,247,280],tschopp:67,tsige:370,tsrd:[305,327],tstart:[226,227,233,235,249,250,290,308,309,310,311,380,460],tstat:[],tstop:[226,227,233,235,249,250,290,308,309,310,311,380,460,468],tsuzuki:73,tthi:127,ttm:[],ttm_mod:317,tucker:[140,427],tuckerman2006:249,tuckerman:[249,250,268,273,290,463],tune:[],tunnel:273,turn:[3,4,6,12,22,33,37,39,44,50,54,55,59,65,69,71,108,115,140,163,168,172,177,183,188,189,192,199,209,210,211,212,225,230,249,261,275,278,279,290,305,332,337,340,345,353,355,356,358,360,362,378,390,391,407,411,420,435,436,450,454,456,461,466,467,472,476,481],turquois:189,tutein:362,tutori:[6,9],tweak:[12,164,230],twice:[3,6,16,17,63,88,170,189,192,193,194,212,246,249,283,360,391,452,454,461],twin:67,twist:[405,406],two:[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,22,38,39,41,42,44,54,56,57,59,61,63,65,68,69,71,76,77,79,87,88,92,107,108,113,114,115,116,117,118,140,143,146,147,149,150,152,158,162,163,164,165,167,172,186,187,188,189,192,193,194,199,200,201,202,203,204,205,206,208,209,210,211,212,215,218,222,225,226,227,229,231,232,233,234,236,239,248,249,250,253,271,272,273,276,277,279,280,281,285,287,290,294,302,305,312,313,315,317,320,323,326,328,330,332,341,345,346,348,350,351,353,354,355,358,360,361,362,363,365,366,367,368,369,370,373,374,375,376,378,379,380,381,382,383,384,385,387,388,391,394,395,396,400,404,405,406,407,411,414,417,418,419,420,421,423,427,428,435,436,437,439,440,441,442,443,446,447,448,449,451,452,454,455,456,457,458,461,464,466,468,469,471,472,474,478,479,480,481,482,483],two_temperatur:198,twobodi:[439,441],twogrid:3,twojmax:[140,427],twolevel:[3,451],txt2html:8,txt:[8,12,13,187,190,278,279,317,343,354,395,444,459,479],typcial:[41,208],type1:[77,118,163],type2:[77,118,163],type:[],typen:[77,118,163],typic:[1,2,3,6,7,8,10,11,12,13,14,15,16,17,18,29,39,40,41,45,46,55,57,59,61,63,70,71,86,87,102,107,119,128,158,162,164,165,167,187,188,189,192,193,194,195,197,198,201,208,209,210,211,212,214,215,220,222,223,225,228,234,249,261,272,275,276,279,281,283,289,290,293,295,297,305,312,320,321,327,345,348,352,353,354,355,356,357,360,371,373,374,376,386,387,390,391,395,396,400,405,406,407,411,421,424,426,436,438,441,449,450,452,454,455,456,457,463,466,468,469,471,478,479,481,483],typicali:12,tzou:317,u_f:236,u_ij:417,u_prom:366,uberuaga:[248,355],ubiquit:[11,366],uhf:363,uiuc:[9,17],uloop:[3,273,355,359,479],ulpsh:2,ulsph:2,ulsph_num_neigh:129,ultim:468,ultra:162,umbrella:[],umin:[26,27,48,49,173],unabl:[3,11,41,208],unaffect:[187,212,249,290,455,466,471],unalt:[193,194,261],unambigu:[71,204],unari:[330,479],unbalanc:3,unbias:[152,384],unbond:[210,454],unbroken:80,uncertainti:40,unchang:[59,212,215,248,249,251,252,254,255,263,277,290,454,455,458,464],uncharg:[40,346],uncom:[1,4],uncompress:[12,71,188],uncomput:[],uncorrel:[226,312,449],uncoupl:273,undefin:[3,12],under:[0,5,6,7,8,9,10,12,18,21,22,44,140,171,172,188,230,247,276,280,281,331,332,350,384,404,420,427,452,468,474],underestim:162,underflow:188,undergo:[6,86,87,152,226,233,234,294,305],undergon:[211,305],underli:[12,17,70,188,249,317,348],undermin:39,underpredict:6,underscor:[2,3,63,192,211,212,247,249,251,252,253,254,255,266,267,269,277,279,308,309,310,330,354,479],understand:[1,6,8,225,250],understood:[187,366],undesir:[59,212,214,249,290],undetermin:305,undisturb:[405,406],undo:[168,230],undump:[],unexpect:[3,460],unfix:[],unfix_flux:198,unfold:303,unfortun:[318,462,463],uniaxi:[3,143,253],uniform:[7,16,41,88,116,198,208,209,210,233,236,239,250,312,381,387,421,449,451,479,480],uniformli:[59,116,186,236,276,317,417,438,480],uninstal:12,uninterrupt:[199,215,225,246,247,249,251,252,253,254,255,266,267,268,269,279,280,290,294,304,307,315,317,323],union:[3,6,40,189,326,328,454,457],uniqu:[3,6,7,8,9,12,39,71,122,226,227,233,234,253,279,285,287,355,382,384,454,479,480],unit:[],unit_styl:3,uniti:[383,411,431],unitless:[64,67,70,71,114,169,201,204,205,214,225,247,249,280,323,353,363,388,414,416,437,439,440,441,478],unitlesss:[78,80,111],univ:[9,13],univers:[3,6,9,12,13,18,87,230,345,346,355,359,405,409,416,418,441,448,451,479],universit:[9,13],unix:[12,17,232,465],unknown:[3,12,64,73,454],unless:[2,3,11,12,15,16,18,55,57,67,118,149,163,164,187,189,190,197,212,215,225,233,249,251,252,254,255,276,277,290,305,316,347,353,374,411,438,452,457,461,466,479],unlik:[12,33,50,59,89,104,154,164,177,187,233,249,253,277,283,285,308,309,310,337,344,345,361,366,382,385,390,391,395,407,408,409,420,427,436,451,456,461,466,479,483],unlimit:417,unlucki:3,unmark:7,unmodifi:306,unnecessari:16,unoccupi:317,unoptim:188,unpack:[0,8,11,360],unpack_bord:8,unpack_border_bodi:8,unpack_border_hybrid:8,unpack_border_vel:8,unpack_comm:8,unpack_comm_bodi:8,unpack_comm_hybrid:8,unpack_comm_vel:8,unpack_exchang:8,unpack_restart:8,unpack_revers:8,unpack_reverse_comm:8,unpack_reverse_hybrid:8,unpad:189,unperturb:87,unphys:[3,6,234,249,290,454],unpredict:[288,464],unrecogn:3,unrel:[8,9,13,170],unreli:411,unrestrain:289,unrestrict:363,unscal:[3,113,158,187,307,455],unset:[345,384],unshift:379,unsmooth:402,unsolv:[357,371],unsort:189,unspecifi:[214,454],unsplit:474,unstabl:[3,236],unstrain:214,unsuccess:[3,276],unsupport:3,untar:12,until:[2,3,6,12,14,38,39,41,56,71,119,184,188,208,212,215,225,230,276,298,305,307,314,330,344,345,356,359,360,366,388,438,449,455,459,460,462,468,478,479],untilt:457,unus:366,unusu:[3,8,356],unwant:[3,164,345],unwrap:[3,66,74,75,81,89,90,93,103,104,106,113,141,159,187,189,190,200,211,213,230,246,290,302,307,454,455,458,464],unwrapexpand:187,unzip:12,up_intern:188,updat:[0,3,6,8,12,13,123,124,125,135,136,137,138,187,192,209,210,218,223,226,233,234,236,238,239,242,243,246,247,249,250,251,252,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,275,277,279,280,285,290,297,298,307,308,309,310,312,317,328,360,366,379,411,419,420,426,449,454,456,464,465,468,474],upenn:[11,13],upgrad:12,upon:[6,199,230,366,442,468],upper:[2,3,41,57,59,71,88,103,105,153,160,186,189,202,204,205,208,212,218,234,236,249,280,285,322,323,328,329,353,388,457,480],upsid:6,upsilon:387,upto:[3,456,462],upward:215,urbana:[230,345,346,405],urey_bradlei:20,usa:9,usabl:[12,225,382],usag:[3,6,8,234,271,285,305,391,404,454],use_ldg:17,useful:360,user:[],user_misc:[30,31,35,174,179,182,335],userguid:9,usr:[11,12,14,455],usual:[2,3,6,9,12,14,17,18,24,28,32,35,36,47,71,87,117,143,144,146,149,157,162,181,187,193,194,199,201,211,212,213,214,225,228,233,235,247,253,272,280,281,287,289,290,305,313,317,320,322,326,330,336,343,355,356,360,371,374,377,379,387,391,392,395,404,405,406,411,413,423,424,425,426,427,437,442,449,455,459,463,465,468,471,472,479,483],util:[17,18,360,387],utilizi:12,utsa:416,utsph_strain_r:137,uttormark:13,uuml:272,uwo:9,v11:6,v22:6,v33:6,v_0:[3,317],v_a:[8,214],v_abc:[452,472,479],v_area:[2,479],v_atomfil:464,v_c:158,v_cluster:279,v_dc:158,v_delta:87,v_dhug:[247,280],v_diff:[160,319],v_displac:214,v_dk:158,v_dlj:158,v_drai:[247,280],v_dx:[246,457],v_dy:[246,457],v_dz:246,v_e_hbond:390,v_ea:[419,420],v_eb:[419,420],v_eqeq:[419,420],v_espac:195,v_f:452,v_fac:452,v_flux:229,v_foo:[452,479],v_ij:417,v_increas:228,v_integr:319,v_jx:91,v_jy:91,v_jz:91,v_k11:91,v_k22:91,v_k33:91,v_k:158,v_ke:[187,482],v_left:457,v_lgr_po:[247,280],v_lgr_vel:[247,280],v_linear:[322,325,327],v_lj:158,v_mol:189,v_mu:405,v_myi:246,v_myindex:479,v_myke:117,v_mystep:461,v_myvar:[8,189],v_myx:246,v_n:236,v_name1:[158,214],v_name2:[158,214],v_name:[3,6,71,87,117,187,188,189,193,194,195,196,200,201,202,203,204,205,206,207,220,228,229,231,233,234,246,292,299,307,308,309,310,319,322,325,327,452,457,461,464,470,472,479,480],v_nstep:328,v_occ:386,v_omega:246,v_oscil:[195,196,207,220,292],v_phi:228,v_prefactor:[193,194,428],v_press:141,v_pressdown:[325,327],v_push:195,v_pxy:6,v_pxz:6,v_pyz:6,v_r0:231,v_r1:162,v_r2:162,v_r:[162,231],v_rad:328,v_radiu:231,v_ramp:[322,325,327],v_rate:[214,231],v_scale1:[193,194],v_scale2:[193,194],v_size:[193,194],v_t_qm:280,v_temp:313,v_theta:[228,457],v_tp:214,v_up:457,v_v0:479,v_v11:6,v_v22:6,v_v33:6,v_v:[246,479],v_valu:[188,452],v_vx:246,v_vy:246,v_vz:[246,480],v_wiggl:[322,325,327],v_x:[2,164,231,246,322,325,327,452,457,479],v_xave:6,v_xmax:6,v_xx:164,v_y:[164,231,457],v_yi:164,v_z:457,vacanc:[4,162,314],vacf:[],vacuum:[317,346,377,441,447],valanc:366,vale:3,valenc:[283,366,384,419,420],valent:366,valeriu:9,valid:[2,3,6,9,11,12,71,118,150,163,188,189,212,225,233,271,290,305,328,330,343,348,382,384,387,417,454,455,462,464,479],vallon:407,valon:407,valu:[],value0:479,value1:[12,144,200,201,202,203,204,205,206,253,319,328,465],value2:[12,144,200,201,202,203,204,205,206,253,319,328,465],valuei:202,valuej:202,valuev:[7,9],valus:279,van:[9,53,87,107,277,281,286,308,374,375,404,407,419,420,446,480],vanderwa:[411,472],vanilla:[6,8,12],vanillia:42,vanish:[218,285,293],vapor:[41,208,225,471],vapour:312,var1:465,var2:465,varaibl:[3,457],vare:317,vari:[1,18,41,61,62,71,87,118,152,154,163,193,194,198,201,202,204,208,212,214,247,249,277,289,290,308,309,317,322,345,371,380,389,402,405,416,428,438,451],variabl:[],variable_hill_factor:13,variable_nam:420,varianc:[117,380,479],variant:[1,3,6,12,83,98,253,290,345,352,360,408,409,439,441,463,467,480],variat:[41,208,479],varieti:[1,2,6,7,13,15,71,188,230,348,391,407,419,420,436,479],variou:[],varreturn:452,varshalovich:140,varshnei:13,vartiabl:3,vbia:6,vcm:[],vdim:[153,313,320,480],vdisplac:[3,231,246,322,325,327,479],vdw:[3,375,420],vec1:[117,279],vec2:[117,279],vec:271,vector:[],vel:[3,6,61,201,204,205,214,234,276,294,324,380,384,388,449,456,457,459,474],veld:[13,305,346,370,400],veloc:[],velocit:[229,380,384,388],velocity_bottom:236,velocity_gradi:426,velocity_temp:480,velocity_top:236,vendor:12,verbatim:452,verbos:12,veri:[1,3,6,7,8,9,10,12,13,17,41,71,87,117,187,188,189,200,201,202,203,204,205,206,208,209,210,212,225,239,249,250,261,273,288,293,308,309,319,355,356,357,360,384,388,405,406,416,427,428,438,462,472,474,478,481],verifi:[8,360,411,463,469],verlag:294,verlet:[1,3,7,8,12,18,198,233,249,261,267,273,293,306,317,325,328,448,451,463],versa:[3,6,13,59,158,166,211,231,233,234,290,454,455,474],versu:[6,14,15,16,18,39,41,80,103,104,116,160,189,208,290,293,346,370,379,388,400,411,472,479],vertex:[134,301],vertic:[2,41,134,188,208,215,301,479],vfinal:479,vfrac:113,vhi:[153,480],via:[],vibrat:[6,9,215,227,271,280,285,339,384,449,463],vice:[3,6,13,59,158,166,211,231,233,234,290,454,455,474],video:188,view:[4,6,7,9,13,187,188,305,366,384,385],viewer:[187,188],viewpoint:188,vij:380,vika:13,vim:[],vincent:[9,19],violat:312,violet:189,virial:[3,63,91,112,140,141,158,193,194,212,218,249,250,251,252,253,254,255,275,277,290,293,345,360,363,380,381,384,392],virialmod:392,virtual:[6,7,8,12,437],virut:9,visa:7,viscoelast:[111,388,416],viscoelsat:416,viscos:[],viscou:[],viscous:290,visit:[291,419,420],vista:187,visual:[],viz:[11,13],viz_tool:11,vizplotgui_tool:11,vizualiziton:291,vlo:[153,480],vmax:[212,305],vmd:[6,7,9,11,13,187,190,230,455],vmdarch:190,vmdhome:190,vname:[164,479],voigt:[6,140],vol:[2,6,8,91,126,141,218,234,276,407,441,450,472,479],volfactor:345,volt:[418,478],volum:[2,3,6,40,41,58,59,63,80,87,91,100,112,116,118,126,130,139,141,162,163,164,167,199,201,204,205,208,212,214,215,225,236,247,249,250,253,256,257,259,260,262,264,265,266,267,268,269,276,277,280,290,294,317,322,326,328,345,348,354,368,405,406,416,433,434,447,450,451,454,457,464,472,474,478,479],volumetr:80,von:[133,138],voro:[3,9,162],vorobyov:474,voronoi:[],voter2:[449,468],voter:[408,409,449,468],voth:[40,273],vpz:324,vratio:479,vri:389,vrpn:230,vshear:323,vstream:6,vtarget:[3,320],vtk:[],vv0210:13,vx0:160,vxcm:290,vxhi:[215,276],vxlo:[215,276],vy0:160,vycm:290,vyhi:[215,276],vylo:[215,276],vz0:160,vzcm:290,vzhi:215,vzi:324,vzlo:215,w_1:140,w_2:140,w_i:140,w_ik:417,waal:[87,107,374,375,404,419,420,446],wadlei:[13,366],wag:[7,9,13],wagner:[7,9,198,236,407],wai:[1,2,3,6,7,8,11,12,15,18,22,44,59,63,65,66,69,71,75,77,79,87,90,91,92,93,104,106,108,114,115,116,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,159,161,164,167,172,184,186,187,188,189,192,193,194,201,203,204,206,207,210,211,212,214,223,226,231,233,234,236,247,249,253,261,273,277,279,288,290,291,294,302,305,307,308,309,310,313,316,317,319,322,325,327,328,332,333,334,336,339,346,348,350,353,355,356,360,361,362,373,376,377,380,381,382,383,385,387,390,391,393,396,407,408,409,411,413,417,418,421,427,428,435,437,439,441,448,449,452,454,455,457,458,459,462,463,464,479,480],wait:[1,12,230,272,449,451],walk:[3,226,233,234],wall:[],wall_surac:134,wall_surfac:[134,298],wallhi:322,wallstyl:323,wander:302,wang:[346,407,417],want:[0,1,2,3,5,6,7,8,9,11,12,17,38,40,56,63,66,68,71,75,81,90,93,103,104,106,107,109,110,112,114,116,141,144,159,160,161,164,167,170,184,187,188,189,192,193,194,195,200,201,208,211,214,215,218,220,223,225,231,234,244,263,271,276,279,289,290,292,302,304,306,313,315,320,322,326,328,330,346,348,355,361,362,366,374,375,380,382,385,391,392,393,407,413,417,419,420,428,437,438,439,441,443,450,452,454,455,456,457,459,461,462,472,474,479,481,483],ward:366,warm:[16,384],warn:[],warner:361,warp:[5,407],warranti:7,warren:380,wasn:3,wast:3,watanab:[314,315],watch:355,water:[],watkin:181,wave:[7,9,40,197,247,284,324,363,384],wavefunct:[9,363,384],wavelength:[118,163],wavepacket:[40,363,384,454],wavevector:272,wbodi:83,weak:281,web:[1,8,14,15,16,17,373],webb:198,weber:[3,5,7,15,88,383,409,417,436,437,466],websit:8,weckner:416,weight:[],welcom:452,well:[1,3,6,7,8,9,11,12,13,15,16,17,18,27,40,51,67,71,112,141,143,150,164,173,188,189,195,199,201,206,208,209,210,212,215,220,225,229,233,236,240,246,249,253,276,290,292,299,312,315,323,353,355,360,365,386,387,390,391,392,405,406,407,421,428,439,440,441,452,454,456,458,463,468,474,478,482],wennberg:345,went:[3,11],were:[3,4,5,6,7,11,12,13,15,16,18,19,34,41,42,52,56,60,70,71,109,112,116,142,144,164,167,168,180,187,189,192,195,201,203,204,205,206,208,214,220,222,229,230,261,267,291,323,324,328,338,345,357,359,384,388,391,395,416,420,449,451,452,454,455,456,457,459,461,469,472,479,480,482,483],weren:459,western:9,westview:446,what:[],whatev:[8,12,14,15,108,113,116,117,119,188,189,193,194,212,249,277,279,323,348,352,353,355,360,372,374,419,420,468,474,479],wheat:189,whelan:163,when:[0,1,2,3,4,6,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,59,61,62,63,71,81,86,88,103,104,105,107,109,112,113,117,119,142,143,147,151,152,160,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,188,189,190,192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,219,220,221,222,223,224,225,227,228,230,233,236,237,239,240,244,249,250,251,252,253,254,255,256,261,263,264,266,267,269,271,275,276,277,278,279,280,282,283,284,285,289,290,291,292,293,294,302,303,305,306,307,308,310,312,313,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,333,334,335,336,337,339,340,341,342,343,344,345,346,348,351,352,353,354,355,356,357,359,360,361,362,364,367,368,369,370,371,372,373,374,375,376,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,416,417,419,420,421,422,427,428,435,437,438,439,440,441,443,445,446,447,449,451,452,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,471,472,473,478,479,480,481,483],whenev:[0,8,12,14,71,189,200,205,290,348,390,452,463,467,479,483],whenth:3,where:[1,3,6,8,9,10,11,12,14,15,18,21,23,24,25,26,27,28,29,32,35,36,37,39,40,41,43,47,48,49,51,55,61,63,65,66,68,69,70,71,73,75,79,80,82,83,84,85,87,88,89,90,92,93,94,95,96,97,98,104,106,108,112,113,114,115,116,117,118,119,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,159,161,163,165,167,168,171,173,183,187,188,189,192,193,194,195,196,199,201,202,204,207,208,211,212,214,215,219,220,222,223,225,226,227,228,229,231,233,234,235,236,239,240,242,244,246,247,250,253,261,264,270,271,272,273,276,278,279,280,283,285,290,291,292,293,294,298,299,302,304,307,308,309,310,313,314,315,317,320,321,322,323,325,326,327,328,331,333,334,335,336,339,340,341,343,346,348,352,353,354,355,356,357,360,361,362,365,366,367,369,373,374,375,376,377,378,379,380,382,383,384,385,386,387,388,389,390,391,392,393,396,400,405,406,407,408,409,411,413,414,416,417,418,419,420,421,427,430,433,434,435,436,437,438,439,440,441,446,447,448,449,451,452,454,456,457,458,459,461,463,464,466,468,469,470,471,472,474,478,479,480,481,483],wherea:[6,11,199,226,249,281,312,317,474],wherebi:282,wherev:229,whether:[6,8,11,12,16,17,39,40,54,59,61,63,70,71,102,107,109,151,152,184,188,189,191,192,193,194,201,206,209,210,211,212,213,214,218,222,225,234,246,249,253,279,293,305,313,319,320,328,330,343,345,346,354,358,360,369,371,375,389,391,395,405,406,407,411,420,436,449,452,454,455,457,459,466,467,468,471,479,480],which:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,29,32,33,37,38,39,40,41,42,44,45,46,47,50,51,53,54,55,56,58,59,61,63,64,66,67,70,71,72,73,74,75,76,77,78,80,81,82,83,85,87,88,89,90,91,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,116,117,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,175,176,177,178,181,183,184,186,187,188,189,190,192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,239,240,243,244,246,247,248,249,250,251,252,253,254,255,257,259,261,262,264,265,266,267,268,269,271,272,273,275,276,277,278,279,280,281,282,283,285,286,287,288,289,290,291,292,293,294,295,296,297,299,301,302,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,322,323,324,325,326,327,328,330,331,332,334,336,337,340,341,343,344,345,346,348,350,351,352,353,354,355,356,357,359,360,361,362,363,365,366,367,369,370,371,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,398,399,400,402,404,405,406,407,408,409,411,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,431,436,437,438,439,440,441,442,443,446,448,449,450,451,452,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,474,479,480,481,482,483],whichev:[12,359,449,468],white:[189,226,233,234,235,290,309,317,454,479,482],whitesmok:189,whitespac:[2,3,189,354,454],who:[0,3,6,7,8,9,13,361,382],whole:[218,230,272,285,294,474],wholli:215,whose:[3,6,7,8,19,38,39,56,59,76,87,149,167,184,188,189,214,231,232,246,249,251,252,254,255,271,272,288,289,293,305,319,326,328,348,355,356,384,398,423,425,437,438,439,441,474,479,480],why:[3,6,234,313,320],wide:[1,6,7,9,61,63,192,313,320,348,357,371,374,384,419,420],wider:1,width:[188,189,363,386],wiggl:[3,214,246,298,322,323,325,327,457],wigner:140,wih:6,wiki:14,wikipedia:[6,14],wild:[3,12,22,44,77,87,116,172,193,194,290,332,350,373,390,448,456,461,481,483],wildcard:[3,12,158,168,187,188,189,287,373,461,464,482,483],wildli:249,win:360,window:[3,4,12,13,71,187,188,190,201,202,203,204,205,206,230,291,310,311,373,455],wipe:[192,391,436,475,477],wire:289,wirt:189,wisconsin:13,wise:[3,12,380,437,463],wish:[2,3,5,6,7,8,11,12,14,17,57,58,59,71,117,141,144,165,166,168,170,187,189,200,201,202,204,205,206,210,214,215,222,225,231,236,240,276,279,290,293,305,306,322,323,348,355,360,369,390,391,407,411,419,438,452,454,455,456,462,466,472,479,480,483],within:[1,2,3,6,8,9,11,12,13,15,16,17,29,39,40,41,42,55,59,61,63,65,69,70,71,72,73,77,79,92,108,112,115,116,117,119,122,140,155,164,167,188,189,193,194,199,200,201,203,204,205,206,208,209,210,211,215,217,222,225,231,233,271,275,276,277,279,281,290,291,293,295,297,301,302,306,317,320,322,326,328,330,344,348,353,354,355,356,357,360,365,367,369,376,381,382,383,384,386,391,392,395,396,407,414,415,416,421,422,436,437,439,440,441,442,449,451,452,454,462,463,466,468,474,478,479],without:[1,2,3,4,6,7,8,9,11,12,14,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,59,87,109,112,142,151,165,170,171,173,174,175,176,178,179,181,182,184,187,188,189,190,192,195,201,203,204,205,206,207,212,214,221,224,226,228,230,233,246,249,251,252,253,254,255,256,264,266,267,268,269,276,279,281,282,284,288,290,291,292,293,298,305,308,310,321,325,329,331,333,334,335,336,339,341,344,345,346,355,356,360,361,362,364,367,368,369,370,371,372,373,374,375,376,379,380,382,383,384,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,411,412,413,414,416,420,421,422,428,436,437,438,439,440,441,443,445,446,447,452,454,462,463,472,474,478,479],witht:9,witi:15,wolf:[],wolff:[411,438],won:[3,288,406],wong:[198,366],word:[2,3,6,8,12,29,63,189,192,199,200,201,202,204,205,206,213,231,258,263,278,283,289,319,330,344,374,411,450,452,454,479,480],work:[1,3,6,7,8,9,11,12,14,16,18,39,54,59,60,88,117,118,143,145,146,147,151,152,153,154,156,157,162,163,187,188,190,193,194,201,204,205,211,223,232,233,234,236,240,246,249,254,255,266,267,268,269,287,289,291,293,308,309,310,315,344,356,360,373,375,378,380,391,405,406,407,411,449,451,452,455,456,458,462,463,465,468],workaround:[290,411,480],worker:[12,419,420],workhors:8,workstat:[360,452],world:[3,12,140,344,355,359,448,451,452,469,479],worlei:380,worri:17,worsen:18,worst:326,worth:[201,202,203,204,205,206,280,291],would:[1,3,4,5,6,7,8,11,12,22,29,37,40,41,42,44,55,70,71,89,91,116,141,144,152,164,165,166,167,172,183,187,189,190,192,193,194,196,199,201,208,211,213,214,218,219,222,225,228,229,230,234,246,249,250,261,271,273,277,279,281,285,288,305,312,316,324,325,328,330,331,332,333,334,336,337,340,345,348,350,352,353,355,356,359,360,361,362,366,373,374,375,376,380,381,382,383,385,391,392,393,407,408,409,413,417,419,420,424,426,427,437,439,440,441,449,452,454,457,458,459,461,462,463,464,465,469,471,472,474,479,480,482,483],wrap:[1,3,6,11,12,57,59,164,166,186,187,189,190,200,205,213,214,215,230,236,246,290,302,305,322,324,326,345,346,355,452,454,455,457,462],wrapper:[],wrigger:294,wright:353,writabl:3,write:[],write_atom_weight:198,write_data:[],write_dump:[],write_freq:420,write_head:8,write_restart:[],writen:291,written:[3,5,6,7,8,9,12,13,14,17,65,69,115,140,162,187,188,189,190,192,193,194,195,196,197,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,216,218,219,220,221,222,223,224,226,227,228,229,230,231,233,234,235,236,237,238,239,240,241,242,243,245,248,256,257,258,259,260,261,262,263,264,265,270,271,272,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,302,303,305,306,308,309,310,311,312,313,314,316,317,319,320,321,322,324,325,326,327,329,343,348,356,382,391,444,446,449,450,452,455,456,460,461,468,469,470,471,479,481,482,483],wrong:[3,11,212,249,270,322,326,327,356,420,456,461],wrote:[3,456],wt1:411,wt2:411,wt3:411,www:[0,2,3,4,5,6,7,8,10,11,12,13,15,361,382,405,418,419,420,478],x86:12,x_ij:417,x_ijkl:331,x_kjli:331,x_ljik:331,xave:6,xavx:16,xcm:[8,290,479],xdr:[12,187],xeon:[1,4,7,9,12,16,17,18,360,467],xflag:[151,152,237,239,245,290,312],xhe:103,xhi:[2,6,57,59,166,187,214,316,322,325,327,454,457,472,479],xhi_bound:[6,187],xhi_new:454,xhost:[12,16],xi_ij:417,xiaowang:[13,385,439,441],xiij:271,xlat:[164,214,231,472],xlo:[2,6,11,57,59,166,187,214,231,316,322,325,327,454,457,472,479],xlo_bound:[6,187],xlo_new:454,xmax:[6,197,219,261,479],xmgrace:[],xmin:479,xml:[190,418],xml_label:418,xmovi:[],xmu:[323,388],xplane:323,xplor:187,xpo:164,xrd:[],xsph:9,xsu:[3,187,455],xt3:187,xt4:[18,187],xt5:[18,187],xtc:[3,6,7,9,12,187,188,189,190],xtcdump:189,xvf:12,xwall:[324,325,327],xxx:12,xyz:[3,6,7,13,42,66,71,106,108,152,159,164,187,188,189,190,204,212,239,249,250,253,277,287,288,290,302,304,323,325,327,347,354,451,455,480,482],xzhou:[13,385],xzy:451,yang:417,yb2:163,yb3:163,ybox:214,ycm:290,year:[5,7],yeh:345,yellow:[188,189],yellowgreen:189,yet:[3,7,9,17,39,188,193,281,287,322,346,352,353,360,372,374,375,384,446,452,454,455,479,481,482],yflag:[151,152,237,239,245,290,312],yhi:[6,59,166,187,214,316,322,325,327,454,457,472],yhi_bound:[6,187],yield:[6,91,110,117,141,147,152,189,202,212,218,249,267,281,313,319,320,323,328,345,365,380,388,411,416,472,479],yip:314,ylat:[164,214,231,472],ylo:[6,59,166,187,214,316,322,325,327,454,457,472],ylo_bound:[6,187],ymax:[197,479],ymin:479,york:[273,346],yoshida:[249,290],you:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,56,57,58,59,61,63,66,68,71,73,74,75,77,81,87,88,89,90,91,93,102,103,104,106,107,109,110,112,114,116,117,140,141,142,143,144,147,151,152,157,158,159,160,161,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,192,193,194,195,196,199,200,201,202,203,204,205,206,207,208,209,210,211,212,214,215,218,220,221,222,223,224,225,226,227,228,229,230,231,233,234,235,244,246,249,251,252,253,254,255,256,261,263,264,266,267,268,269,272,273,275,276,277,279,281,282,285,288,289,290,292,293,294,302,304,305,306,308,309,310,311,313,314,315,316,317,319,320,321,322,323,325,326,327,328,330,331,333,334,335,336,337,339,341,344,345,346,348,350,352,353,354,355,356,359,360,361,362,364,366,367,368,369,370,371,372,373,374,375,376,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,407,408,409,411,412,413,414,415,416,417,418,419,420,421,422,427,428,429,430,431,432,433,434,437,438,439,440,441,443,445,446,447,448,449,450,451,452,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,471,472,474,478,479,480,481,483],young:[388,423,425],your:[0,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,59,61,107,109,112,142,143,147,151,157,162,164,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,188,195,198,202,203,206,207,209,210,211,212,215,221,224,225,228,230,233,246,249,251,252,253,254,255,256,264,266,267,269,276,279,282,288,290,292,293,294,307,308,310,313,317,319,320,321,322,323,326,327,328,331,333,334,335,336,339,341,346,348,354,355,356,359,360,361,362,364,366,367,368,369,370,371,372,373,374,375,376,379,380,381,382,383,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,407,408,409,411,412,413,414,416,417,419,420,421,422,428,437,438,439,440,441,443,445,446,447,448,451,452,454,456,457,458,461,462,463,464,465,466,467,471,472,478,479,481,483],yourself:[6,8,12,13,212,354],yplane:323,ypo:164,ysu:[3,187,455],yuan:9,yukawa:[],yukawa_1_1:444,yxz:451,yzx:451,z_i:[384,441,447],z_j:[441,447],z_meam:407,zachari:13,zannoni:387,zbl:[],zblcut:441,zblcutinn:427,zblcutout:427,zblexpscal:441,zblz:427,zcm:290,zcylind:323,zepeda:199,zero:[3,4,6,9,11,12,26,27,39,41,48,49,59,61,63,66,71,75,87,88,90,93,102,103,104,105,106,108,109,110,112,113,114,115,116,117,118,121,140,141,143,144,145,152,153,156,157,159,161,162,163,164,166,167,168,170,173,182,184,186,187,188,189,192,193,194,195,197,199,200,201,202,203,204,205,206,207,208,209,210,212,214,219,220,221,222,224,225,226,227,229,233,234,235,236,237,239,245,246,247,249,253,261,264,273,278,279,280,281,282,285,287,288,290,291,292,293,296,297,299,305,307,312,313,315,317,320,321,322,323,324,325,327,328,329,330,335,348,351,353,354,355,356,360,363,366,367,369,370,371,374,376,379,380,384,387,389,390,391,392,396,398,400,401,404,406,407,411,416,420,421,422,435,438,442,447,449,450,451,454,455,457,459,461,462,463,464,468,469,472,474,479,480,481,483],zeta:[3,236,281,385],zfactor:188,zflag:[151,152,237,239,245,290,312],zhang:[290,313,388],zhi:[3,6,166,187,197,316,322,325,327,454,457,472],zhi_bound:[6,187],zhou:[13,366,385,417,439,441],zhu:434,ziegenhain:13,ziegler:[275,407,436,441,447],zimmerman2004:198,zimmerman2010:198,zimmerman:[9,70,198,366],zlat:[214,231,472],zlo:[3,6,166,187,197,316,322,324,325,327,454,457,472],zlo_bound:[6,187],zmax:[197,236,479],zmin:[236,479],zn2:163,zone:[118,291],zoom:[3,187,188,189],zplane:323,zr4:163,zrest:304,zsu:[3,187,455],zwall:322,zwall_veloc:236,zxy:451,zybin:420,zyx:451},titles:["LAMMPS Documentation","5. Accelerating LAMMPS performance","3. Commands","12. Errors","7. Example problems","13. Future and history","6. How-to discussions","1. Introduction","10. Modifying &amp; extending LAMMPS","4. Packages","8. Performance &amp; scalability","11. Python interface to LAMMPS","2. Getting Started","9. Additional tools","5.USER-CUDA package","5.GPU package","5.USER-INTEL package","5.KOKKOS package","5.USER-OMP package","5.OPT package","angle_style charmm command","angle_style class2 command","angle_coeff command","angle_style cosine command","angle_style cosine/delta command","angle_style cosine/periodic command","angle_style cosine/shift command","angle_style cosine/shift/exp command","angle_style cosine/squared command","angle_style dipole command","angle_style fourier command","angle_style fourier/simple command","angle_style harmonic command","angle_style hybrid command","angle_style none command","angle_style quartic command","angle_style sdk command","angle_style command","angle_style table command","atom_modify command","atom_style command","balance command","Body particles","bond_style class2 command","bond_coeff command","bond_style fene command","bond_style fene/expand command","bond_style harmonic command","bond_style harmonic/shift command","bond_style harmonic/shift/cut command","bond_style hybrid command","bond_style morse command","bond_style none command","bond_style nonlinear command","bond_style quartic command","bond_style command","bond_style table command","boundary command","box command","change_box command","clear command","comm_modify command","comm_style command","compute command","compute ackland/atom command","compute angle/local command","compute angmom/chunk command","compute basal/atom command","compute body/local command","compute bond/local command","compute centro/atom command","compute chunk/atom command","compute cluster/atom command","compute cna/atom command","compute com command","compute com/chunk command","compute contact/atom command","compute coord/atom command","compute damage/atom command","compute dihedral/local command","compute dilatation/atom command","compute displace/atom command","compute erotate/asphere command","compute erotate/rigid command","compute erotate/sphere command","compute erotate/sphere/atom command","compute event/displace command","compute fep command","compute group/group command","compute gyration command","compute gyration/chunk command","compute heat/flux command","compute improper/local command","compute inertia/chunk command","compute ke command","compute ke/atom command","compute ke/atom/eff command","compute ke/eff command","compute ke/rigid command","compute meso_e/atom command","compute meso_rho/atom command","compute meso_t/atom command","compute_modify command","compute msd command","compute msd/chunk command","compute msd/nongauss command","compute omega/chunk command","compute pair command","compute pair/local command","compute pe command","compute pe/atom command","compute plasticity/atom command","compute pressure command","compute property/atom command","compute property/chunk command","compute property/local command","compute rdf command","compute reduce command","compute saed command","compute slice command","compute smd/contact_radius command","compute smd/damage command","compute smd/hourglass_error command","compute smd/internal_energy command","compute smd/plastic_strain command","compute smd/plastic_strain_rate command","compute smd/rho command","compute smd/tlsph_defgrad command","compute smd/tlsph_dt command","compute smd/tlsph_num_neighs command","compute smd/tlsph_shape command","compute smd/tlsph_strain command","compute smd/tlsph_strain_rate command","compute smd/tlsph_stress command","compute smd/triangle_mesh_vertices","compute smd/ulsph_num_neighs command","compute smd/ulsph_strain command","compute smd/ulsph_strain_rate command","compute smd/ulsph_stress command","compute smd/vol command","compute sna/atom command","compute stress/atom command","compute temp command","compute temp/asphere command","compute temp/chunk command","compute temp/com command","compute temp/cs command","compute temp/deform command","compute temp/deform/eff command","compute temp/drude command","compute temp/eff command","compute temp/partial command","compute temp/profile command","compute temp/ramp command","compute temp/region command","compute temp/region/eff command","compute temp/rotate command","compute temp/sphere command","compute ti command","compute torque/chunk command","compute vacf command","compute vcm/chunk command","compute voronoi/atom command","compute xrd command","create_atoms command","create_bonds command","create_box command","delete_atoms command","delete_bonds command","dielectric command","dihedral_style charmm command","dihedral_style class2 command","dihedral_coeff command","dihedral_style cosine/shift/exp command","dihedral_style fourier command","dihedral_style harmonic command","dihedral_style helix command","dihedral_style hybrid command","dihedral_style multi/harmonic command","dihedral_style nharmonic command","dihedral_style none command","dihedral_style opls command","dihedral_style quadratic command","dihedral_style command","dihedral_style table command","dimension command","displace_atoms command","dump command","dump image command","dump_modify command","dump molfile command","echo command","fix command","fix adapt command","fix adapt/fep command","fix addforce command","fix addtorque command","fix append/atoms command","fix atc command","fix atom/swap command","fix ave/atom command","fix ave/chunk command","fix ave/correlate command","fix ave/histo command","fix ave/spatial command","fix ave/spatial/sphere command","fix ave/time command","fix aveforce command","fix balance command","fix bond/break command","fix bond/create command","fix bond/swap command","fix box/relax command","fix colvars command","fix deform command","fix deposit command","fix drag command","fix drude command","fix drude/transform/direct command","fix dt/reset command","fix efield command","fix enforce2d command","fix evaporate command","fix external command","fix freeze command","fix gcmc command","fix gld command","fix gle command","fix gravity command","fix heat command","fix imd command","fix indent command","fix ipi command","fix langevin command","fix langevin/drude command","fix langevin/eff command","fix lb/fluid command","fix lb/momentum command","fix lb/pc command","fix lb/rigid/pc/sphere command","fix lb/viscous command","fix lineforce command","fix meso command","fix meso/stationary command","fix_modify command","fix momentum command","fix move command","fix msst command","fix neb command","fix nvt command","fix nvt/eff command","fix nph/asphere command","fix nph/sphere command","fix nphug command","fix npt/asphere command","fix npt/sphere command","fix nve command","fix nve/asphere command","fix nve/asphere/noforce command","fix nve/body command","fix nve/eff command","fix nve/limit command","fix nve/line command","fix nve/noforce command","fix nve/sphere command","fix nve/tri command","fix nvt/asphere command","fix nvt/sllod command","fix nvt/sllod/eff command","fix nvt/sphere command","fix oneway command","fix orient/fcc command","fix phonon command","fix pimd command","fix planeforce command","fix poems","fix pour command","fix press/berendsen command","fix print command","fix property/atom command","fix qbmsst command","fix qeq/point command","fix qeq/comb command","fix qeq/reax command","fix qmmm command","fix qtb command","fix reax/bonds command","fix reax/c/species command","fix recenter command","fix restrain command","fix rigid command","fix saed/vtk command","fix setforce command","fix shake command","fix smd command","fix smd/adjust_dt command","fix smd/integrate_tlsph command","fix smd/integrate_ulsph command","fix smd/move_tri_surf command","fix smd/setvel command","&lt;no title&gt;","fix smd/wall_surface command","fix spring command","fix spring/rg command","fix spring/self command","fix srd command","fix store/force command","fix store/state command","fix temp/berendsen command","fix temp/csvr command","fix temp/rescale command","fix temp/rescale/eff command","fix tfmc command","fix thermal/conductivity command","fix ti/rs command","fix ti/spring command","fix tmd command","fix ttm command","fix tune/kspace command","fix vector command","fix viscosity command","fix viscous command","fix wall/lj93 command","fix wall/gran command","fix wall/piston command","fix wall/reflect command","fix wall/region command","fix wall/srd command","group command","group2ndx command","if command","improper_style class2 command","improper_coeff command","improper_style cossq command","improper_style cvff command","improper_style fourier command","improper_style harmonic command","improper_style hybrid command","improper_style none command","improper_style ring command","improper_style command","improper_style umbrella command","include command","info command","jump command","kspace_modify command","kspace_style command","label command","lattice command","log command","mass command","min_modify command","min_style command","minimize command","molecule command","neb command","neigh_modify command","neighbor command","newton command","next command","package command","pair_style adp command","pair_style airebo command","pair_style awpmd/cut command","pair_style beck command","pair_style body command","pair_style bop command","pair_style born command","pair_style brownian command","pair_style buck command","pair_style buck/long/coul/long command","pair_style lj/charmm/coul/charmm command","pair_style lj/class2 command","pair_coeff command","pair_style colloid command","pair_style comb command","pair_style coul/cut command","pair_style coul/diel command","pair_style born/coul/long/cs command","pair_style lj/cut/dipole/cut command","pair_style dpd command","pair_style dsmc command","pair_style eam command","pair_style edip command","pair_style eff/cut command","pair_style eim command","pair_style gauss command","pair_style gayberne command","pair_style gran/hooke command","pair_style lj/gromacs command","pair_style hbond/dreiding/lj command","pair_style hybrid command","pair_style kim command","pair_style lcbop command","pair_style line/lj command","pair_style list command","pair_style lj/cut command","pair_style lj96/cut command","pair_style lj/cubic command","pair_style lj/expand command","pair_style lj/long/coul/long command","pair_style lj/sf command","pair_style lj/smooth command","pair_style lj/smooth/linear command","pair_style lj/cut/soft command","pair_style lubricate command","pair_style lubricateU command","pair_style meam command","pair_style meam/spline","pair_style meam/sw/spline","pair_style mie/cut command","pair_modify command","pair_style morse command","pair_style nb3b/harmonic command","pair_style nm/cut command","pair_style none command","pair_style peri/pmb command","pair_style polymorphic command","pair_style quip command","pair_style reax command","pair_style reax/c command","pair_style resquared command","pair_style lj/sdk command","pair_style smd/hertz command","pair_style smd/tlsph command","pair_style smd/tri_surface command","pair_style smd/ulsph command","pair_style snap command","pair_style soft command","pair_style sph/heatconduction command","pair_style sph/idealgas command","pair_style sph/lj command","pair_style sph/rhosum command","pair_style sph/taitwater command","pair_style sph/taitwater/morris command","pair_style srp command","pair_style command","pair_style sw command","pair_style table command","pair_style tersoff command","pair_style tersoff/mod command","pair_style tersoff/zbl command","pair_style thole command","pair_style tri/lj command","pair_write command","pair_style yukawa command","pair_style yukawa/colloid command","pair_style zbl command","partition command","prd command","print command","processors command","python command","quit command","read_data command","read_dump command","read_restart command","region command","replicate command","rerun command","reset_timestep command","restart command","run command","run_style command","set command","shell command","special_bonds command","suffix command","tad command","temper command","thermo command","thermo_modify command","thermo_style command","timestep command","&lt;no title&gt;","uncompute command","undump command","unfix command","units command","variable command","velocity command","write_data command","write_dump command","write_restart command"],titleterms:{"break":209,"default":[37,39,40,55,57,58,59,61,62,71,87,88,102,103,105,107,118,122,123,140,144,152,153,157,163,164,167,169,183,185,186,187,188,189,190,191,193,194,195,197,198,199,201,204,205,206,209,210,212,213,214,215,219,222,225,226,231,233,234,235,236,237,239,244,247,249,250,253,267,268,272,273,276,277,278,279,280,282,285,287,288,290,291,305,307,312,313,314,315,318,320,322,324,328,340,343,345,346,348,349,351,352,354,356,357,358,360,363,366,368,384,405,406,411,419,420,435,436,449,450,451,454,455,457,459,461,462,463,466,468,470,471,472,473,478,480,481,482],"function":479,"long":[367,369,370,371,372,376,378,379,396,400,404,414,422],"new":8,"static":12,acceler:1,ackland:64,acknowledg:7,adapt:[193,194],addforc:195,addit:[12,13],addtorqu:196,adiabat:6,adjust_dt:295,adp:361,airebo:362,alloi:382,amber2lmp:13,amber:6,angl:[8,65],angle_coeff:22,angle_styl:[2,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],angmom:66,append:197,arrai:6,aspher:[6,82,143,251,254,257,258,266],atc:[9,198],atom:[6,7,8,64,67,70,71,72,73,76,77,78,80,81,85,95,96,99,100,101,110,111,113,140,141,162,197,199,200,279,479],atom_modifi:39,atom_styl:40,attract:5,aug:0,aveforc:207,awpmd:[9,363],balanc:[41,208],barostat:6,basal:67,beck:364,berendsen:[277,308],between:6,binary2txt:13,bodi:[6,8,42,68,259,365],bond:[8,13,69,209,210,211,286],bond_coeff:44,bond_styl:[2,43,45,46,47,48,49,50,51,52,53,54,55,56],bop:366,born:[367,378],boundari:[7,57],box:[6,58,212],brownian:368,buck:[369,370,378],bug:3,build:[11,12],calcul:6,call:12,categori:2,centro:70,ch2lmp:13,chain:13,change_box:59,charmm:[6,20,170,371,404],chunk:[6,66,71,75,90,93,104,106,114,144,159,161,201],citat:7,class2:[21,43,171,331,372],clear:60,cluster:72,cmm:9,cna:73,code:6,coeffici:6,colloid:[322,374,446],colvar:[9,13,213],com:[74,75,145],comb3:375,comb:[282,375],come:5,comm_modifi:61,comm_styl:62,command:[2,6,8,12,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483],common:3,comparison:1,compos:6,comput:[2,6,8,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,479],compute_modifi:102,condit:7,conduct:[6,313],constant:6,constraint:7,contact:76,contact_radiu:120,coord:77,core:6,correl:202,cosin:[23,24,25,26,27,28,173],cossq:333,coul:[367,369,370,371,372,376,377,378,389,396,400,404,414,422],coupl:6,creat:210,create_atom:164,create_bond:165,create_box:166,createatom:13,creation:7,csld:309,csvr:309,cubic:398,cuda:[9,14,109,112,142,151,195,207,221,224,228,249,256,292,293,308,310,321,367,369,371,372,382,388,389,396,397,399,402,412,437,439],custom:8,cut:[49,363,369,372,376,379,384,386,396,397,404,410,414],cvff:334,damag:[78,121],data2xmovi:13,data:6,databas:13,deby:[376,396],deform:[147,148,214],delete_atom:167,delete_bond:168,delta:24,deposit:215,descript:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483],diagnost:7,diel:377,dielectr:169,diffract:9,diffus:6,dihedr:[8,79],dihedral_coeff:172,dihedral_styl:[2,170,171,173,174,175,176,177,178,179,180,181,182,183,184],dilat:80,dimens:185,dipol:[6,29,379],direct:218,discuss:6,disp:6,displac:[81,86],displace_atom:186,distribut:[7,12],document:0,dpd:380,drag:216,dreid:[6,390],drude:[6,9,149,217,218,234],dsf:[376,396],dsmc:381,dump:[6,8,187,188,190],dump_modifi:189,dynam:281,eam:[13,382],echo:191,edip:383,eff:[9,13,96,97,148,150,155,235,250,260,268,311,384],efield:220,eim:385,elast:6,emac:13,enforce2d:221,ensembl:7,erot:[82,83,84,85],error:3,evapor:222,event:86,exampl:[1,4,6,11,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483],exp:[27,173],expand:[46,399],extend:[8,11],extern:223,fcc:271,featur:[7,8],fene:[45,46],fep:[9,13,87,194],field:[6,7],file:6,finit:6,fix:[2,6,8,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,479],fix_modifi:[193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327],flow:6,fluid:236,flux:91,forc:[6,7,306],fourier:[30,31,174,335],freez:224,from:[6,11],futur:5,gauss:386,gaybern:387,gcmc:225,gener:[1,6,7,13],get:12,gld:226,gle:227,global:6,gpu:[15,364,367,369,371,372,374,376,379,380,382,386,387,389,396,397,399,410,412,421,422,428,437,438,445,446],gran:[323,388],granular:6,graviti:228,gromac:389,group2ndx:329,group:[88,328,479],gyrat:[89,90],harmon:[32,47,48,49,175,178,322,336,413],hbond:390,heat:[91,229],heatconduct:429,helix:176,hertz:[388,423],histo:203,histori:[5,388],hook:388,hourglass_error:122,how:6,hybrid:[33,50,177,337,391],idealga:430,imag:[187,188],imd:230,implicit:371,improp:[8,92],improper_coeff:332,improper_styl:[2,331,333,334,335,336,337,338,339,340,341],includ:342,inclus:8,indent:231,indic:0,individu:2,induc:6,inertia:93,info:[0,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,343],input:[2,6,8],instal:11,integr:[6,7],integrate_tlsph:296,integrate_ulsph:297,intel:[9,16,371,387,396,437],interfac:[6,11],internal_energi:123,introduct:7,invers:218,ipi:232,ipp:13,jul:[],jump:344,kate:13,keyword:411,kim:392,kokko:17,kspace:[2,8,318],kspace_modifi:345,kspace_styl:[6,346],label:347,lammp:[0,1,2,6,7,8,11,12],langevin:[233,234,235],lattic:348,lcbop:393,librari:[6,11,12],limit:[261,310],line:[12,262,394],linear:403,lineforc:241,list:[2,395],lj1043:322,lj126:322,lj93:322,lj96:397,lmp2arc:13,lmp2cfg:13,lmp2vmd:13,local:[6,65,68,69,79,92,108,115],log:349,lubric:405,lubricateu:406,make:12,mass:350,math:479,matlab:13,meam:[407,408,409],measur:1,meso:[242,243],meso_:99,meso_rho:100,meso_t:101,messag:3,micelle2d:13,mie:410,min_modifi:351,min_styl:352,minim:[8,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,353],misc:9,mod:[317,440],model:[6,7],modifi:8,molecul:354,molfil:[9,187,190],moltempl:13,momentum:[237,245],morri:434,mors:[51,390,412],move:246,move_tri_surf:298,movi:[187,188],mpi:11,msd:[103,104,105],msi2lmp:13,msm:[367,369,371,376,396],msst:247,multi:[6,7,178],multipl:6,nb3b:413,neb:[248,355],neigh_modifi:356,neighbor:357,nemd:6,newton:358,next:359,nharmon:179,noforc:[258,263],non:[6,7],none:[34,52,180,338,415],nongauss:105,nonlinear:53,nph:[249,250,251,252,290],nphug:253,npt:[249,250,254,255,290],nve:[256,257,258,259,260,261,262,263,264,265,290],nvt:[249,250,266,267,268,269,290],omega:106,omp:[9,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,43,45,46,47,48,49,51,53,54,56,170,171,173,174,175,176,178,179,181,182,184,228,249,251,252,253,254,255,256,264,266,267,269,282,331,333,334,335,336,339,341,361,362,364,367,368,369,370,371,372,374,375,376,377,379,380,382,385,386,387,388,389,390,391,394,396,397,398,399,400,401,402,403,404,405,408,409,412,413,414,416,421,422,428,437,438,439,440,441,443,445,446,447],onewai:270,open:7,oper:479,opl:181,opt:[19,371,382,396,400,412],optim:1,option:[6,8,12],orient:271,orthogon:6,other:6,output:[6,7,8,12,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327],overlai:391,overview:11,packag:[1,9,12,14,15,16,17,18,19,360],pair:[6,107,108],pair_coeff:373,pair_modifi:411,pair_styl:[2,361,362,363,364,365,366,367,368,369,370,371,372,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,445,446,447],pair_writ:444,pairwis:8,parallel:11,paramet:6,pars:2,partial:151,particl:[6,7,42],partit:448,past:5,per:6,perform:[1,10],peri:416,period:25,phonon:[9,13,272],pimd:273,piston:324,planeforc:274,plastic:111,plastic_strain:124,plastic_strain_r:125,pmb:416,poem:275,point:281,polariz:6,poli:[368,405,406],polym:13,polymorph:417,post:7,potenti:[2,6,8],pour:276,pppm:6,prd:449,pre:7,press:277,pressur:112,previou:12,print:[278,450],problem:[3,4],process:[6,7],processor:451,profil:152,properti:[6,113,114,115,279],pymol_aspher:13,python:[11,13,452],qbmsst:280,qeq:[281,282,283],qmmm:[9,284],qtb:[9,285],quadrat:182,quantiti:6,quartic:[35,54],quip:418,quit:453,ramp:153,rattl:293,rdf:116,read_data:454,read_dump:455,read_restart:456,reax:[13,283,286,287,419,420],reaxc:9,rebo:362,recent:288,reduc:117,refer:479,reflect:325,region:[8,117,154,155,326,457,479],relat:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,41,43,44,45,46,47,48,49,50,51,53,54,55,56,57,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,83,84,85,86,87,89,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,224,225,226,227,228,229,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,285,286,287,288,290,291,292,294,295,296,297,298,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,339,340,341,342,343,344,345,346,348,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,459,460,461,462,463,464,466,467,468,469,470,471,472,473,475,476,477,479,480,481,482,483],relax:212,replic:458,replica:[6,7],report:3,requir:12,rerun:459,rescal:[310,311],reset:219,reset_timestep:460,resquar:421,restart2data:13,restart:[6,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,461],restrain:289,restrict:[14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483],rho:126,rhosum:432,rigid:[6,83,98,239,290],ring:339,rotat:156,rule:2,run:[6,11,12,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,462],run_styl:463,scalabl:10,scalar:6,screen:12,script:[2,6,8,11,12],sdk:[36,422],self:304,serial:11,set:[6,464],setforc:292,setvel:299,shake:293,share:[11,12],shell:[6,465],shield:281,shift:[26,27,48,49,173],simpl:31,simul:6,size:6,slater:281,slice:119,sllod:[267,268],small:290,smd:[9,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,294,295,296,297,298,299,301,423,424,425,426],smooth:[402,403],sna:140,snad:140,snap:427,snapshot:6,snav:140,soft:[404,428],solver:2,sourc:7,spatial:[204,205],spc:6,speci:287,special:[7,411,479],special_bond:466,sph:[9,429,430,431,432,433,434],sphere:[84,85,157,205,239,252,255,264,269],spheric:6,spline:[408,409],spring:[302,303,304,315],squar:28,srd:[305,327],srp:435,standard:9,start:[12,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327],state:307,stationari:243,stop:[193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,218,219,220,221,222,223,224,225,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327],store:[306,307],strategi:1,streitz:376,stress:141,structur:2,style:[1,2,6,8],submit:8,suffix:467,summari:6,swap:[199,211],syntax:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,272,273,274,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483],system:6,tabl:[0,6,38,56,184,438,439],tad:468,taitwat:[433,434],temp:[142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,308,309,310,311],temper:469,temperatur:6,tersoff:[439,440,441],test:11,tfmc:312,thermal:[6,313],thermo:[6,470],thermo_modifi:471,thermo_styl:472,thermodynam:[6,8],thermostat:6,thole:442,time:[6,206],timestep:473,tip3p:6,tip4p:[6,376,396,400,404],tip:12,tlsph:424,tlsph_defgrad:127,tlsph_dt:128,tlsph_num_neigh:129,tlsph_shape:130,tlsph_strain:131,tlsph_strain_rat:132,tlsph_stress:133,tmd:316,tool:13,torqu:159,transform:218,tri:[265,443],tri_surfac:425,triangle_mesh_vertic:134,triclin:6,tstat:380,ttm:317,tune:318,type:7,ulsph:426,ulsph_num_neigh:135,ulsph_strain:136,ulsph_strain_r:137,ulsph_stress:138,umbrella:341,uncomput:475,undump:476,unfix:477,unit:478,user:[9,12,14,16,18],vacf:160,valu:[6,479],variabl:[6,8,479],variou:1,vcm:161,vector:[6,319,479],veloc:480,version:[0,5,12],via:12,vim:13,viscos:[6,320],viscou:[240,321],visual:6,vol:139,voronoi:162,vtk:291,wall:[6,322,323,324,325,326,327],wall_surfac:301,warn:3,water:6,weight:203,what:[7,12],wolf:[367,376],wrapper:11,write:6,write_data:481,write_dump:482,write_restart:483,xmgrace:13,xmovi:13,xrd:163,yukawa:[445,446],zbl:[441,447]}})
\ No newline at end of file
+Search.setIndex({envversion:47,filenames:["Manual","Section_accelerate","Section_commands","Section_errors","Section_example","Section_history","Section_howto","Section_intro","Section_modify","Section_packages","Section_perf","Section_python","Section_start","Section_tools","accelerate_cuda","accelerate_gpu","accelerate_intel","accelerate_kokkos","accelerate_omp","accelerate_opt","angle_charmm","angle_class2","angle_coeff","angle_cosine","angle_cosine_delta","angle_cosine_periodic","angle_cosine_shift","angle_cosine_shift_exp","angle_cosine_squared","angle_dipole","angle_fourier","angle_fourier_simple","angle_harmonic","angle_hybrid","angle_none","angle_quartic","angle_sdk","angle_style","angle_table","atom_modify","atom_style","balance","body","bond_class2","bond_coeff","bond_fene","bond_fene_expand","bond_harmonic","bond_harmonic_shift","bond_harmonic_shift_cut","bond_hybrid","bond_morse","bond_none","bond_nonlinear","bond_quartic","bond_style","bond_table","boundary","box","change_box","clear","comm_modify","comm_style","compute","compute_ackland_atom","compute_angle_local","compute_angmom_chunk","compute_basal_atom","compute_body_local","compute_bond_local","compute_centro_atom","compute_chunk_atom","compute_cluster_atom","compute_cna_atom","compute_com","compute_com_chunk","compute_contact_atom","compute_coord_atom","compute_damage_atom","compute_dihedral_local","compute_dilatation_atom","compute_displace_atom","compute_erotate_asphere","compute_erotate_rigid","compute_erotate_sphere","compute_erotate_sphere_atom","compute_event_displace","compute_fep","compute_group_group","compute_gyration","compute_gyration_chunk","compute_heat_flux","compute_improper_local","compute_inertia_chunk","compute_ke","compute_ke_atom","compute_ke_atom_eff","compute_ke_eff","compute_ke_rigid","compute_meso_e_atom","compute_meso_rho_atom","compute_meso_t_atom","compute_modify","compute_msd","compute_msd_chunk","compute_msd_nongauss","compute_omega_chunk","compute_pair","compute_pair_local","compute_pe","compute_pe_atom","compute_plasticity_atom","compute_pressure","compute_property_atom","compute_property_chunk","compute_property_local","compute_rdf","compute_reduce","compute_saed","compute_slice","compute_smd_contact_radius","compute_smd_damage","compute_smd_hourglass_error","compute_smd_internal_energy","compute_smd_plastic_strain","compute_smd_plastic_strain_rate","compute_smd_rho","compute_smd_tlsph_defgrad","compute_smd_tlsph_dt","compute_smd_tlsph_num_neighs","compute_smd_tlsph_shape","compute_smd_tlsph_strain","compute_smd_tlsph_strain_rate","compute_smd_tlsph_stress","compute_smd_triangle_mesh_vertices","compute_smd_ulsph_num_neighs","compute_smd_ulsph_strain","compute_smd_ulsph_strain_rate","compute_smd_ulsph_stress","compute_smd_vol","compute_sna_atom","compute_stress_atom","compute_temp","compute_temp_asphere","compute_temp_chunk","compute_temp_com","compute_temp_cs","compute_temp_deform","compute_temp_deform_eff","compute_temp_drude","compute_temp_eff","compute_temp_partial","compute_temp_profile","compute_temp_ramp","compute_temp_region","compute_temp_region_eff","compute_temp_rotate","compute_temp_sphere","compute_ti","compute_torque_chunk","compute_vacf","compute_vcm_chunk","compute_voronoi_atom","compute_xrd","create_atoms","create_bonds","create_box","delete_atoms","delete_bonds","dielectric","dihedral_charmm","dihedral_class2","dihedral_coeff","dihedral_cosine_shift_exp","dihedral_fourier","dihedral_harmonic","dihedral_helix","dihedral_hybrid","dihedral_multi_harmonic","dihedral_nharmonic","dihedral_none","dihedral_opls","dihedral_quadratic","dihedral_style","dihedral_table","dimension","displace_atoms","dump","dump_h5md","dump_image","dump_modify","dump_molfile","echo","fix","fix_adapt","fix_adapt_fep","fix_addforce","fix_addtorque","fix_append_atoms","fix_atc","fix_atom_swap","fix_ave_atom","fix_ave_chunk","fix_ave_correlate","fix_ave_histo","fix_ave_spatial","fix_ave_spatial_sphere","fix_ave_time","fix_aveforce","fix_balance","fix_bond_break","fix_bond_create","fix_bond_swap","fix_box_relax","fix_colvars","fix_deform","fix_deposit","fix_drag","fix_drude","fix_drude_transform","fix_dt_reset","fix_efield","fix_enforce2d","fix_evaporate","fix_external","fix_freeze","fix_gcmc","fix_gld","fix_gle","fix_gravity","fix_heat","fix_imd","fix_indent","fix_ipi","fix_langevin","fix_langevin_drude","fix_langevin_eff","fix_lb_fluid","fix_lb_momentum","fix_lb_pc","fix_lb_rigid_pc_sphere","fix_lb_viscous","fix_lineforce","fix_meso","fix_meso_stationary","fix_modify","fix_momentum","fix_move","fix_msst","fix_neb","fix_nh","fix_nh_eff","fix_nph_asphere","fix_nph_sphere","fix_nphug","fix_npt_asphere","fix_npt_sphere","fix_nve","fix_nve_asphere","fix_nve_asphere_noforce","fix_nve_body","fix_nve_eff","fix_nve_limit","fix_nve_line","fix_nve_noforce","fix_nve_sphere","fix_nve_tri","fix_nvt_asphere","fix_nvt_sllod","fix_nvt_sllod_eff","fix_nvt_sphere","fix_oneway","fix_orient_fcc","fix_phonon","fix_pimd","fix_planeforce","fix_poems","fix_pour","fix_press_berendsen","fix_print","fix_property_atom","fix_qbmsst","fix_qeq","fix_qeq_comb","fix_qeq_reax","fix_qmmm","fix_qtb","fix_reax_bonds","fix_reaxc_species","fix_recenter","fix_restrain","fix_rigid","fix_saed_vtk","fix_setforce","fix_shake","fix_smd","fix_smd_adjust_dt","fix_smd_integrate_tlsph","fix_smd_integrate_ulsph","fix_smd_move_triangulated_surface","fix_smd_setvel","fix_smd_tlsph_reference_configuration","fix_smd_wall_surface","fix_spring","fix_spring_rg","fix_spring_self","fix_srd","fix_store_force","fix_store_state","fix_temp_berendsen","fix_temp_csvr","fix_temp_rescale","fix_temp_rescale_eff","fix_tfmc","fix_thermal_conductivity","fix_ti_rs","fix_ti_spring","fix_tmd","fix_ttm","fix_tune_kspace","fix_vector","fix_viscosity","fix_viscous","fix_wall","fix_wall_gran","fix_wall_piston","fix_wall_reflect","fix_wall_region","fix_wall_srd","group","group2ndx","if","improper_class2","improper_coeff","improper_cossq","improper_cvff","improper_fourier","improper_harmonic","improper_hybrid","improper_none","improper_ring","improper_style","improper_umbrella","include","info","jump","kspace_modify","kspace_style","label","lattice","log","mass","min_modify","min_style","minimize","molecule","neb","neigh_modify","neighbor","newton","next","package","pair_adp","pair_airebo","pair_awpmd","pair_beck","pair_body","pair_bop","pair_born","pair_brownian","pair_buck","pair_buck_long","pair_charmm","pair_class2","pair_coeff","pair_colloid","pair_comb","pair_coul","pair_coul_diel","pair_cs","pair_dipole","pair_dpd","pair_dsmc","pair_eam","pair_edip","pair_eff","pair_eim","pair_gauss","pair_gayberne","pair_gran","pair_gromacs","pair_hbond_dreiding","pair_hybrid","pair_kim","pair_lcbop","pair_line_lj","pair_list","pair_lj","pair_lj96","pair_lj_cubic","pair_lj_expand","pair_lj_long","pair_lj_sf","pair_lj_smooth","pair_lj_smooth_linear","pair_lj_soft","pair_lubricate","pair_lubricateU","pair_meam","pair_meam_spline","pair_meam_sw_spline","pair_mie","pair_modify","pair_morse","pair_nb3b_harmonic","pair_nm","pair_none","pair_peri","pair_polymorphic","pair_quip","pair_reax","pair_reax_c","pair_resquared","pair_sdk","pair_smd_hertz","pair_smd_tlsph","pair_smd_triangulated_surface","pair_smd_ulsph","pair_snap","pair_soft","pair_sph_heatconduction","pair_sph_idealgas","pair_sph_lj","pair_sph_rhosum","pair_sph_taitwater","pair_sph_taitwater_morris","pair_srp","pair_style","pair_sw","pair_table","pair_tersoff","pair_tersoff_mod","pair_tersoff_zbl","pair_thole","pair_tri_lj","pair_write","pair_yukawa","pair_yukawa_colloid","pair_zbl","partition","prd","print","processors","python","quit","read_data","read_dump","read_restart","region","replicate","rerun","reset_timestep","restart","run","run_style","set","shell","special_bonds","suffix","tad","temper","thermo","thermo_modify","thermo_style","timestep","tutorial_drude","uncompute","undump","unfix","units","variable","velocity","write_data","write_dump","write_restart"],objects:{},objnames:{},objtypes:{},terms:{"00a":315,"00b":315,"02214e23":91,"03275e":479,"0b1":11,"0e20":[331,458,480],"0e4":[248,324,389],"0e5":248,"0x98b5e0":189,"100k":1,"1024x1024":189,"10e":379,"10f":3,"10g":480,"10th":[450,456,469],"10x":[3,353,354,356,357,367],"10x10x10":152,"10x20x20":349,"11e":10,"15g":[190,480],"16g":[202,207],"16x":1,"18986e":354,"18e":10,"1_prop":6,"1st":[2,6,8,12,20,22,38,44,56,57,58,60,87,158,170,172,184,194,195,202,203,204,205,206,207,211,215,250,279,289,317,329,333,351,357,362,363,367,374,376,383,385,386,393,394,403,404,408,409,410,414,418,428,438,439,440,441,442,449,455,463,464,467,480],"1x2x2":452,"2000k":189,"20x":367,"23899e":354,"2400k":189,"256k":10,"25x":10,"298k":378,"2k_ss":385,"2nd":[2,3,6,11,12,15,17,38,45,46,56,57,60,71,77,88,153,184,190,202,203,204,205,206,207,211,213,215,250,291,295,303,329,332,338,345,354,355,356,357,361,363,376,385,391,392,408,428,437,438,439,440,441,442,455,462,464,467,480],"2pi":184,"2theta":163,"2x1x2":452,"2x2x1":452,"2x2x2":452,"2x4x10":452,"2x5":385,"300k":[228,291,481],"32k":10,"3419e":248,"3806504e":[6,91],"38e":10,"3n_k":227,"3nk":281,"3nkb":286,"3rd":[15,17,20,38,56,71,105,114,184,202,203,204,205,206,207,211,291,292,329,355,359,361,376,385,391,392,428,438,439,440,441,442,455,462,467,480],"3x3":[91,349],"4857990943e":385,"4_94":11,"4th":[6,38,56,81,103,104,116,160,170,184,190,303,329,347,360,362,363,367,383,386,393,408,414,418,428,438,439,440,442,455,462,467,470,484],"4x10":345,"4x2x10":452,"4x6x10":452,"50k":1,"53xx":18,"54xx":18,"55e":10,"5_1":367,"5kx":[196,221],"5nlog_2":12,"5th":[116,354,472],"6021765e":479,"6863e22":417,"6x6":6,"72360e":248,"7797e":248,"8032044e":479,"8x1":6,"8x2":[6,12],"9e18":[12,39],"9e9":417,"9jan09":[324,389],"9th":356,"__main__":453,"__pthread_key_cr":12,"_j1m1m1":140,"_j2m2m2":140,"_serial":12,"abstract":17,"boolean":[3,329,331],"break":[],"byte":[3,12,472],"case":[1,2,3,6,8,11,12,13,15,16,17,18,39,40,41,45,46,59,61,63,71,73,104,108,114,116,117,142,143,144,145,147,150,151,152,153,154,156,157,158,162,164,166,167,168,170,187,188,189,190,196,197,201,202,203,204,205,206,207,208,209,211,213,215,219,221,223,226,229,230,232,233,234,235,237,248,250,251,252,253,254,255,256,267,268,270,272,273,278,280,281,282,283,290,291,293,295,297,298,300,303,306,309,310,311,313,314,318,320,321,323,324,326,327,328,329,331,345,346,347,349,351,353,354,355,356,358,360,361,363,372,375,377,379,383,385,388,389,391,392,393,395,405,406,407,408,412,414,418,421,424,426,429,439,440,442,450,453,455,457,458,462,463,465,467,469,471,472,473,475,479,480,481,483,484],"catch":[1,3,453],"char":[6,8],"class":[1,3,5,6,7,8,9,11,12,13,22,37,44,55,172,183,224,280,333,341,373,392,420,421,437,453,455],"default":[],"export":[189,374],"final":[3,5,6,7,8,11,12,17,41,59,87,141,190,201,202,203,204,205,206,207,209,213,215,226,249,250,254,281,285,291,292,295,315,317,318,325,331,354,356,362,363,367,383,386,393,405,408,414,418,419,438,439,440,442,450,463,469,475,480,482],"float":[3,6,8,12,40,42,71,113,187,190,202,207,231,280,292,308,385,425,427,453,455,465,472,480],"function":[],"import":[1,2,3,6,11,17,71,87,105,164,175,193,202,205,213,229,234,235,250,286,291,309,310,311,313,318,328,330,356,392,405,453,455,464,472,475],"int":[3,6,8,11,101,224,226,234,236,286,318,472],"long":[],"new":[],"null":[3,6,91,112,141,164,193,208,214,217,220,247,280,289,293,295,299,300,303,304,324,362,363,376,383,386,389,392,393,394,408,409,410,414,418,420,421,428,438,440,441,442,455,458,463,465,481],"public":[0,7,8,12,224,233,386,419],"return":[2,3,6,8,11,14,15,16,17,18,19,41,71,108,117,134,135,139,162,164,190,202,205,206,215,224,331,343,345,389,452,453,462,465,471,480],"short":[1,3,6,7,13,16,162,250,291,306,319,347,357,358,361,363,367,368,370,371,372,376,377,379,385,392,397,401,405,408,412,415,423,439,443,450,453,463,465,469,475],"static":[],"switch":[1,3,6,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,91,109,112,140,142,151,163,170,171,173,174,175,176,178,179,181,182,184,189,192,196,200,208,222,225,229,233,234,237,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,309,311,315,316,322,332,334,335,336,337,340,342,343,345,347,350,356,360,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,449,450,452,455,457,462,464,468,470,480,482,484],"throw":472,"true":[6,12,13,17,108,115,187,209,211,215,250,251,272,273,274,278,291,313,317,329,331,361,385,389,438,453,457,465,480],"try":[1,3,8,12,17,19,202,231,237,314,315,316,321,453,480],"var":[3,11,12,164,329,345,466,480],"void":[4,6,7,8,41,167,209,224,458],"while":[3,9,10,11,12,13,14,18,71,105,140,147,162,175,187,191,206,213,215,219,227,228,233,234,235,237,250,268,281,286,288,319,347,354,361,367,378,383,421,440,442,450,453,464,469,475],a10:331,a123:331,a12:422,a2m:[6,91],a_0:[237,318,367],a_0_real:237,a_1:318,a_2:318,a_3:318,a_4:318,a_c:375,a_cc:375,a_f:442,a_i:443,a_ij:367,a_j:443,a_pi:367,a_sigma:367,a_ss:375,aacut:273,aat:171,aatom1:115,aatom2:115,aatom3:115,ab_23_cd:331,abbrevi:12,abc:[3,12,331,453,480],abf:214,abf_integr:13,abi:191,abil:[3,9,213,250,278,291,385],abl:[3,8,11,12,39,86,187,191,212,221,225,314,321,361,453,480,483],ablat:318,about:[0,1,3,4,6,8,9,10,11,12,13,17,39,41,42,61,63,78,108,115,116,118,158,164,187,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,217,219,220,221,222,223,224,225,226,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,246,249,254,257,258,259,260,261,262,263,264,265,266,271,272,273,275,276,277,278,279,280,282,283,284,285,286,287,288,289,290,291,292,293,294,303,304,306,307,309,310,311,312,313,314,315,316,317,318,320,321,322,323,325,326,327,328,329,344,347,353,354,356,361,366,372,377,392,417,421,447,453,456,457,462,463,465,470,480,482,484],abov:[1,2,6,7,8,10,11,12,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,38,40,41,42,43,44,45,46,47,48,49,50,51,53,54,56,57,63,64,68,70,71,72,73,76,77,86,87,89,90,91,93,94,96,97,112,114,116,118,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,162,163,164,166,167,170,171,172,173,174,175,176,177,178,179,181,182,184,187,188,189,190,193,194,195,196,197,202,203,204,205,206,207,209,212,213,215,216,221,224,226,230,232,234,235,236,240,249,250,254,274,277,279,284,290,291,295,303,306,309,310,311,312,329,331,332,333,334,335,336,337,338,340,342,347,349,351,355,356,360,361,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,415,417,418,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,443,444,446,447,448,449,450,451,452,453,455,456,457,458,459,462,463,464,465,466,469,470,473,475,480,481,483,484],abscissa:439,absenc:197,absent:475,absolut:[3,190,214,215,219,295,308,346,347,354,389,397,456],absorb:318,absoult:347,ac3:163,academ:226,acc:313,acceler:[],accelri:[6,13],accept:[7,87,164,190,200,212,215,226,313,371,401,463,470],acceptor:391,access:[0,3,6,7,8,9,11,12,16,40,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,85,88,89,90,91,92,93,95,96,99,100,101,103,104,105,106,107,108,110,111,112,113,114,115,117,118,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,159,160,161,162,163,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,220,221,222,223,224,225,226,227,228,229,230,231,232,234,236,237,238,239,240,241,242,243,244,246,247,248,249,250,254,257,258,259,260,261,262,263,264,265,266,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,300,303,304,305,306,307,308,309,310,311,312,314,315,316,317,318,320,321,322,323,324,325,326,327,328,346,361,387,389,391,392,408,420,421,429,452,453,456,461,473,480],accidenti:340,accler:16,accommod:198,accomod:250,accompani:8,accomplish:[16,215,238,264],accord:[64,71,121,127,130,189,200,210,211,237,250,273,281,295,297,315,316,318,323,324,326,327,328,357,361,385,389,400,403,418,425,427,429,431,432,434,435,436,464,469,480],accordingli:[11,14,143,157,168,357,406,407],account:[3,6,9,87,118,162,163,172,183,203,204,220,231,232,234,250,255,256,267,268,270,272,276,282,291,292,294,303,304,305,306,309,310,311,314,318,321,336,355,377,389,397,401,406,407,408,452,469,481],accuml:[3,291,314,321],accumul:[1,6,8,15,71,193,203,234,291,295,320,344,361,461,479],accur:[1,3,6,15,17,38,41,56,147,209,248,286,291,294,306,314,321,327,329,347,367,385,388,389,412,422,437,439,440,442,469,480],accuraci:[1,3,6,12,41,187,190,209,228,250,283,294,319,329,346,347,353,385,412,420,421,439,445,464,469,475,480,483],ach:346,achiev:[1,3,6,16,17,18,41,209,228,250,251,273,274,281,346,392,464],achiv:18,acid:9,ackland1:383,ackland2:383,ackland:[],acknowledg:[],acml:12,aco:480,acolor:[189,190],acoust:273,acquir:[3,6,58,61,62,167,211,213,215,250,416,460,475],across:[1,2,3,6,9,12,13,15,41,57,61,65,68,69,71,79,92,107,108,115,117,152,166,168,202,204,205,206,209,220,230,291,292,296,314,318,321,327,331,356,361,450,455,458,459,463,472],act:[3,6,108,149,219,229,232,233,234,235,237,240,249,291,300,313,315,316,318,327,328,329,354,369,380,388,389,391,422,436],acta:[118,163,362],action:[2,6,11,12,71,227,232,316,475],activ:[5,8,11,12,13,14,55,59,87,162,200,214,227,231,234,240,249,271,291,298,317,344,405,437,449,477,480],actual:[1,3,6,8,12,56,62,122,147,187,190,194,195,208,210,211,219,234,235,268,272,278,286,295,306,308,309,310,311,313,319,328,329,346,357,388,390,400,406,407,452,453,464,465,473,480],adam:[346,347],adapt:[],add:[0,1,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,40,42,71,87,91,102,114,117,119,162,164,165,187,188,189,193,194,195,196,197,199,201,202,203,204,205,206,207,211,214,219,221,224,228,229,230,232,234,236,237,241,248,249,250,251,252,253,254,255,256,267,268,269,270,272,280,290,291,293,294,303,305,309,311,312,316,317,318,320,322,323,327,329,347,349,353,355,363,368,370,373,377,385,392,397,408,412,415,421,423,453,455,456,461,463,465,467,475],add_molecul:199,add_speci:199,add_to_nodeset:199,addforc:[],addit:[],addition:[6,8,16,139,306,328,388,422],address:[7,8,11,189,233],addtorqu:[],adequ:[306,319,346,356,464],adher:29,adhikari:237,adiabat:[],adiam:[189,190],adjac:[39,164,356,412,439,440,469,470],adjiman:411,adjust:[2,3,6,16,17,41,59,118,143,144,147,148,151,152,157,158,163,168,187,189,202,209,213,215,231,234,238,242,246,247,250,251,254,268,272,275,277,278,281,282,283,284,289,291,298,306,310,314,319,321,322,323,325,326,328,346,347,354,356,361,363,382,406,407,442,465,481],adjust_dt:128,adjust_radiu:298,adjust_radius_factor:298,admiss:254,adof:[144,202],adopt:[290,475],adp:[],adri:[9,287,420,421],adust:158,advanc:[3,231,367,450,461],advantag:[1,6,8,11,14,18,39,40,41,209,361,384,464,469],advect:[3,6,306],advertis:8,advis:[356,419],afer:3,affect:[1,6,10,14,15,16,17,40,60,61,71,88,117,141,148,162,168,190,195,202,203,204,205,206,207,210,211,212,213,215,216,224,230,232,234,240,247,251,252,253,255,256,262,267,268,270,291,292,304,318,328,340,346,352,353,354,356,357,358,361,385,406,407,412,452,453,455,458,460,463,465],affin:[16,17,18,215,361,376],afil:228,aforement:18,afresh:[279,463,480],afshar:381,after:[2,3,5,6,8,9,11,12,15,16,21,22,33,39,40,41,44,50,57,58,59,61,63,71,143,144,145,146,147,148,151,152,153,154,156,157,164,165,167,168,171,172,177,186,187,188,189,190,191,193,194,195,199,200,202,203,209,210,211,212,213,215,219,226,237,238,239,240,241,246,247,248,250,255,256,262,267,268,270,273,277,281,289,291,294,302,307,309,310,311,313,314,315,316,317,321,323,325,329,332,333,338,345,351,352,354,355,357,359,360,361,362,363,367,374,376,383,384,385,386,392,393,394,405,406,407,408,409,410,414,418,420,421,428,438,440,441,442,450,452,454,455,456,457,458,460,461,463,465,467,469,472,473,475,479,480,481,482,483,484],afterrun:463,afterward:3,afterword:41,ag1:163,ag2:163,again:[6,11,12,17,62,140,144,146,150,158,187,190,215,230,277,332,345,356,406,407,450,452,453,455,457,462,469,471,480,482],against:[11,12,13,64,216,356,420,421],aggreg:[6,12,65,68,69,79,92,108,115,230,246,289,291,304,450,481],aggress:[230,469],agilio:[9,13],agre:[3,8,184,354,363,394,421],agreement:[5,7],ahd:391,ahead:325,aidan:[0,5,7,9,13],aij:13,aim:6,airebo:[],ajaramil:[7,9,13],aka:189,akohlmei:[7,9,13,191,231],aktulga:[7,9,284,421],al2o3_001:[118,292],al3:163,ala:237,alain:9,alat:[272,408],alb:[418,440,442],albeit:290,albert:9,alchem:[87,158],alcohol:321,alcu:[362,367],alcu_eam:418,alderton:380,alejandr:[250,251],alessandro:13,algorithm:[0,1,6,7,8,9,41,61,190,199,209,212,215,237,239,240,262,274,291,294,313,314,318,321,326,352,353,354,358,361,385,407,425,427,450,452,469],alia:12,alias:[1,347],aliceblu:190,align:[6,12,29,41,71,166,184,205,209,232,349,455,458,475],alkali:385,all:[0,1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,22,33,37,39,40,41,42,44,50,54,55,57,59,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,152,157,158,159,160,161,162,163,164,165,166,167,168,170,172,177,183,184,187,188,189,190,191,193,194,195,196,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,218,219,220,221,222,223,224,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,243,245,246,248,250,251,252,253,254,255,256,257,258,259,260,261,262,263,265,266,267,268,269,270,271,272,273,274,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,302,303,305,306,307,308,309,310,313,314,315,316,317,318,319,320,321,323,324,325,326,327,328,329,330,331,332,333,336,341,344,345,346,347,348,349,351,354,355,356,357,358,360,361,362,363,364,366,367,368,370,371,372,373,374,376,377,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,401,405,406,407,408,409,410,411,412,413,414,415,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,447,448,449,450,452,453,454,455,456,457,458,459,460,462,463,464,465,466,467,468,469,470,472,473,475,479,480,481,482,483,484],allen:[29,87,380,388],allentildeslei:87,allign:3,allindex:330,alloc:[3,5,6,8,9,11,12,60,224,320,355,357,361,416,421,455,463],allocat:3,alloi:[],allow:[1,2,3,6,8,9,11,12,13,14,15,16,17,18,22,37,39,40,41,55,57,58,59,61,62,63,77,108,143,144,157,162,163,164,166,172,183,184,187,189,190,191,193,194,196,198,199,200,202,203,204,205,206,207,209,211,212,213,214,215,216,220,221,224,226,227,228,229,231,234,237,240,241,245,247,250,251,272,276,278,279,280,281,285,291,292,294,295,297,298,302,306,313,314,315,316,318,319,320,321,322,323,329,331,333,341,346,347,349,354,355,356,357,360,361,364,367,368,369,370,371,372,377,383,385,389,390,391,392,401,406,407,412,418,421,422,425,427,436,445,447,450,453,455,457,458,459,460,461,462,465,467,468,469,472,473,480,481],almost:[2,3,12,60,232,281,318,347,358,361,436],alo:377,alon:[6,7,212,287,420,421,453],alond:13,along:[6,8,9,12,29,40,87,118,163,164,186,187,189,212,232,237,238,242,247,249,281,291,294,295,299,303,304,313,317,318,324,327,329,349,352,353,354,356,377,380,389,392,395,397,401,408,420,421,439,455,458,465,466,480],alonso:[409,410],alpha:[6,51,194,237,273,281,286,354,362,365,368,377,381,383,384,386,391,396,397,408,413,417,441,443,473,475],alpha_:443,alpha_c:405,alpha_i:[428,443],alpha_ialpha_j:443,alpha_lj:405,alphabet:[2,3,22,37,44,55,63,172,183,193,333,341,355,374,437,455],alphanumer:[3,63,193,280,288,331,355,480],alreadi:[3,7,8,12,42,164,165,167,188,198,202,205,206,209,211,215,241,279,281,306,329,355,356,381,390,392,399,407,436,445,448,451,455,456,460,465,480],also:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,29,36,37,38,39,40,41,42,44,54,55,56,58,59,61,63,66,71,73,75,77,81,87,89,90,93,103,104,105,106,107,112,114,116,117,119,140,141,142,143,144,145,146,147,148,150,151,152,153,154,156,157,158,159,160,161,162,164,165,166,167,168,170,172,183,184,185,187,188,189,190,191,193,194,195,196,198,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,221,224,225,226,227,228,230,231,234,235,236,237,247,248,250,251,252,253,254,255,256,261,264,265,267,268,269,270,272,273,274,276,277,278,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,299,300,303,304,306,309,310,311,312,313,317,318,319,320,322,324,327,329,331,333,338,341,344,346,347,349,350,351,354,355,356,357,358,360,361,367,371,372,374,378,379,380,381,383,384,385,388,389,391,392,393,401,405,406,408,412,414,416,417,418,419,422,423,425,431,432,434,435,436,437,438,439,440,441,442,443,450,452,453,454,455,456,457,458,459,460,462,463,464,465,467,468,469,470,473,474,475,476,478,479,480,481,482,484],alter:[3,6,8,9,11,12,41,59,142,143,144,145,147,150,151,152,153,156,157,164,168,187,189,191,194,195,202,210,211,212,213,215,249,250,286,289,291,293,300,306,314,321,328,353,356,392,455,460,462,465,480,481,484],altern:[1,6,8,11,12,17,18,91,164,187,193,215,231,235,250,280,291,313,314,321,334,337,346,353,354,362,363,377,383,384,386,394,397,405,408,409,410,414,418,419,428,438,440,442,453,455,456,470,473],although:[29,42,184,240,250,278,282,291,313,345,448,462,475,484],aluminum:448,alwai:[0,6,11,12,17,18,54,57,63,71,162,190,203,205,206,207,211,214,226,228,232,283,286,291,306,323,327,328,332,346,347,352,354,355,357,358,361,370,373,383,400,420,421,429,439,440,442,448,450,455,456,458,460,467,469,472,475,480,481],amap:190,amatrix:228,amaz:11,amazingli:13,amber2lmp:[],amber:[],ambient:189,ambigu:[3,63,193,480],amd:[17,361],amend:11,amino:9,amit:9,among:[16,141,200,237],amorph:[164,441],amount:[1,3,6,12,59,88,115,162,166,186,189,213,214,226,230,234,250,272,278,291,298,306,311,314,319,321,329,346,361,381,416,455,458],amplitud:[215,247,299,324,340,458,480],amu:226,analag:[6,480],analalog:6,analog:[6,140,166,184,389],analys:[7,460],analysi:[7,9,13,63,64,73,191,287,288,296,330,428,455,465],analyt:[1,3,13,118,158,163,294,346,367,393,394,399,418],analyz:[6,8,13,356],andersen:294,anderson:[276,381],andr:[7,9,13],andrew:13,andzelm:436,ang:272,angl:[],angle1:290,angle2:290,angle_coeff:[],angle_cosineshift:27,angle_cosineshiftexp:[26,173],angle_cutof:391,angle_cutoff:391,angle_hybrid:29,angle_info:421,angle_styl:[],angle_typ:40,angleangl:[3,332,338,455],angleangletors:[3,171,455],anglecoeff:3,angletors:[3,171,177,455],angletyp:211,angmom:[],angmomi:[113,187,308],angmomx:[113,187,308],angmomz:[113,187,308],angstrom:[6,10,59,71,118,153,163,164,186,187,189,190,198,205,206,215,216,226,231,232,247,284,289,323,325,326,328,347,349,352,358,362,363,372,383,405,408,414,419,420,421,442,448,458,464,479,481],angular:[3,6,40,61,66,82,83,84,85,106,113,140,143,156,157,164,187,193,234,240,246,247,252,253,255,256,258,259,260,263,265,266,267,270,289,291,294,299,308,362,367,376,389,406,407,408,418,437,440,441,455,465,480,481],angularm:259,anharmon:[27,53,173,286,469],ani:[1,3,6,7,8,9,10,11,12,13,14,15,16,17,22,29,38,39,40,41,42,44,55,56,58,59,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,167,168,170,172,184,186,187,188,189,190,193,196,197,198,200,202,203,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,221,223,226,229,230,232,234,237,240,246,247,250,254,272,274,276,277,278,280,282,283,284,286,288,289,291,293,294,295,299,300,303,305,306,307,308,317,318,323,324,325,326,327,328,329,330,331,333,345,346,347,349,351,352,354,355,356,358,359,360,361,363,367,371,372,376,377,380,381,383,384,386,388,392,393,394,395,401,412,418,420,421,422,428,437,438,439,440,441,442,443,444,449,450,452,453,455,456,458,459,460,461,462,463,464,465,466,467,468,469,473,475,476,478,479,480,481,482,483,484],anihil:405,anim:[2,4,7,11,13,189,356],anion:386,aniso:[3,213,215,250,251,252,253,254,255,256,278,291],anisotrop:[234,388,422],ann:411,annot:[7,438,440,441,442,455],annual:[450,469],anoth:[1,3,4,6,7,8,11,12,17,29,40,63,71,87,119,188,189,193,194,200,202,204,205,206,207,212,215,216,227,230,234,235,240,250,251,254,277,280,291,292,309,310,311,318,328,331,352,354,356,357,360,377,381,385,386,388,391,392,396,397,405,420,422,429,436,440,441,442,449,450,453,456,462,464,475,480,484],ansi:12,answer:[3,4,8,12,291,358,359],anthoni:316,antiquewhit:190,antisymmetr:[9,40,364],antisymmetri:385,antonelli:[315,316],antonio:417,anymor:316,anyon:7,anyparticl:86,anyth:[8,11,164,215,233,438,440,442,466],anywai:[167,361,475,482],anywher:[12,164,374,408,428,480],aoff:[355,455],aparam:[87,194,195],apart:[3,165,240,303,357,366,429,455,464],aperiod:273,api:[11,12,191,393,453],appar:3,appear:[2,3,6,11,12,13,39,40,41,77,87,108,115,116,140,147,164,165,167,187,189,190,202,205,206,209,213,216,219,226,231,277,288,289,317,329,331,332,346,354,355,356,375,383,408,412,439,451,452,453,455,456,457,460,462,475,480,484],append:[],appendix:[29,380],appl:[213,250,251],appli:[2,3,4,5,6,8,12,17,18,33,41,50,57,59,61,63,71,87,88,105,140,141,144,150,152,154,158,163,164,166,170,172,177,183,187,190,193,194,195,196,197,199,202,208,209,213,214,215,217,220,221,224,225,226,227,228,229,231,232,234,235,236,237,241,250,251,254,255,256,262,267,270,271,272,274,278,281,289,290,291,293,294,295,296,299,303,304,305,307,309,310,311,312,314,316,317,318,321,329,346,349,354,355,356,366,368,370,372,377,380,385,389,390,391,392,394,397,403,407,412,415,420,423,424,425,426,427,436,443,447,455,456,458,459,460,464,465,467,472,475,480,481,482,483],applic:[1,6,9,12,17,191,199,212,216,217,224,228,231,272,277,290,295,303,314,321,346,361,442,465,475],applyt:3,appopri:17,approach:[6,7,9,14,187,199,227,273,274,286,291,313,314,316,318,321,346,367,377,379,382,388,392,422,424,426,436,445],appropri:[1,2,3,6,8,11,12,13,15,17,33,38,42,50,56,61,73,88,91,116,117,143,144,172,177,183,184,187,190,202,203,205,206,207,212,213,215,224,225,228,237,245,247,248,250,252,253,254,255,256,267,268,270,274,277,278,281,286,291,306,309,310,311,314,321,323,324,326,327,328,338,347,356,363,367,371,375,376,377,384,389,392,394,401,405,419,420,421,438,439,440,441,442,445,455,456,457,459,460,468,469,472,480,481],approri:229,approxim:[6,9,118,122,163,226,228,237,274,292,294,313,346,352,353,354,369,379,385,388,406,407,412,419,422,447,469,475],april:11,aprpopri:450,apu:[406,407],aqua:[189,190],aquamarin:190,ar_therm:199,ar_ttm:199,ara:13,arbitrari:[6,40,58,187,189,191,214,215,229,250,274,282,438,453,466,480],arbitrarili:[11,59,116,140,186,213,250,377,480],arcco:3,arch:[1,12,14,15,17],architect:344,architectur:[16,361],archiv:[6,7,11,12,308,374,462],arcsin:3,area:[6,41,91,112,116,162,209,215,237,314,321,382,389,417,444,452,465],aren:[280,331],arflag:12,arg:[3,11,12,22,40,41,44,55,59,63,71,87,117,152,158,162,164,167,168,172,186,187,188,190,193,194,195,196,198,200,202,203,204,205,206,207,208,209,210,211,214,215,216,221,224,226,229,230,231,232,240,247,252,253,277,290,291,292,293,296,299,300,302,313,316,323,324,325,326,328,329,333,344,356,361,368,369,370,372,373,374,379,380,385,390,392,397,401,405,406,407,415,423,425,427,437,452,453,455,458,460,462,464,466,473,480,481,483,484],argon:226,argonn:12,argument:[2,3,6,8,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,63,73,87,91,109,112,116,140,141,142,151,152,153,158,162,164,165,166,168,170,171,172,173,174,175,176,178,179,181,182,184,187,190,193,194,195,196,198,201,202,203,204,205,206,207,208,209,213,214,215,222,224,225,228,229,233,234,240,247,250,252,253,254,255,256,257,265,267,268,270,276,277,279,283,288,291,292,293,294,306,309,311,318,320,322,324,329,331,332,333,334,335,336,337,338,340,342,344,345,347,348,349,351,356,360,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,383,384,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,408,409,410,412,413,414,415,417,418,420,421,422,423,428,429,437,438,439,440,441,442,443,444,446,447,448,449,450,451,452,453,455,456,458,460,463,464,465,466,470,472,473,480,481,483],aris:[12,447],arithmet:[3,6,346,372,375,395,400,412,443,444],arkansa:9,arl:9,armv8:17,arnold:346,around:[1,3,4,6,12,42,57,58,59,66,70,73,77,116,140,143,159,162,164,166,186,189,190,197,198,213,215,216,232,247,250,280,282,286,291,299,303,306,323,324,327,345,355,455,458,465,466,475,480],aroung:3,arrai:[],arrang:140,arrheniu:469,art:[9,282,450,469],artefact:228,articl:6,articul:[7,276],artifact:[88,162,475],artifici:[248,281,431,432,434],arun:13,arxiv:[140,188,428],ascend:[41,190,231,240,291,460],asci:7,ascii:[13,292,317,356,383,386,408,455],ash:[406,407],asid:[8,164,408],asin:480,ask:[3,11],askari:417,askoos:13,asoci:189,aspect:[6,7,59,215,226,388,422,444,455,465,469],aspect_ratio:292,asper:4,aspher:[],asq:[406,407],assembl:4,assign:[1,2,3,6,7,11,12,14,15,17,18,33,39,40,41,50,57,59,61,63,66,71,72,75,90,93,104,106,110,113,114,118,140,141,144,159,161,163,164,167,177,187,188,189,190,191,193,194,195,198,202,204,209,211,212,213,216,218,226,231,234,235,236,237,247,250,252,253,254,255,256,265,267,268,269,270,274,277,278,280,282,288,291,292,309,310,311,312,329,338,347,349,351,355,356,360,361,367,383,386,388,391,392,421,422,452,453,455,456,457,458,459,464,465,470,473,480,481],assignemnt:[6,464],assing:280,assist:[7,248],associ:[3,5,6,8,9,12,22,37,39,40,44,55,59,66,74,75,81,87,89,90,93,99,101,103,104,106,130,159,172,183,187,189,190,194,195,196,200,213,215,221,224,226,227,233,237,247,250,276,286,290,291,292,304,306,330,331,333,341,349,354,356,360,361,374,377,381,382,383,385,391,392,394,397,401,424,426,436,437,439,453,456,463,475,477,480],associd:67,assum:[2,3,4,6,11,12,16,39,59,67,71,88,96,102,104,142,143,144,145,146,147,149,150,151,152,153,154,156,157,158,162,164,167,190,194,195,202,203,204,205,206,207,213,215,223,231,233,237,240,252,253,255,256,258,260,263,265,266,267,270,272,273,277,278,279,282,291,293,295,303,314,317,318,323,326,329,346,347,355,356,361,367,369,371,374,375,382,385,391,392,396,401,406,407,444,450,452,453,455,457,460,465,469,472,473,475,481],assumpt:[162,231,362,412],astar:408,astart:429,asterisk:[22,44,77,87,116,158,168,172,190,194,195,240,291,333,351,374,391,436,449,452,465,479],astop:[354,429],asu:383,asub:408,asubrama:13,asymmetr:[127,326,367,383],asynchron:[15,16],atan2:480,atan:480,atc:[],atc_fe_output:199,athomp:[0,7,9,13],atm2pa:6,atmospher:479,atol:12,atom1:[276,290,355,455],atom2:[276,290,355,455],atom3:[276,290,355,455],atom4:[290,355,455],atom:[],atom_element_map:199,atom_forc:421,atom_info:421,atom_modifi:[],atom_styl:[],atom_vec:8,atom_vec_atom:8,atom_vec_electron:8,atom_veloc:421,atom_weight:199,atomey:[6,7,11,13,187,189,190],atomfil:[3,71,280,329,360,465,480],atomic_charg:199,atomic_numb:418,atomid:455,atomist:[6,199,313],atomperbin:3,atomt:190,atomvec:8,attach:[6,206,274,295,303,455],attatch:316,attempt:[3,6,41,59,71,186,200,209,210,211,212,216,226,277,278,306,326,346,350,356,392,453,468,470,473,480],attend:199,attent:[15,18],attogram:479,attrac:408,attract:[],attribut:[3,6,7,8,11,39,40,42,58,63,71,87,113,114,115,117,143,158,187,189,190,193,194,195,201,202,204,205,206,212,213,250,252,253,254,255,256,258,259,267,268,270,278,291,292,308,309,310,311,349,355,367,385,392,455,456,457,465,473,480],atw:[406,407],atwat:441,atwt:408,atyp:[115,158,211,377,397,401,405],au1:163,au3:163,aug:11,augment:[12,113,213,280,408],augt1:408,auo:288,auoh:288,author:[3,8,9,13,188,383,384,475],auto:[6,8,11,12,91,160,193,203,295,320,346,355,361,452],autocorrel:[63,91,234],autom:[12,189],automag:7,automat:[3,6,12,14,15,16,17,18,19,36,128,184,198,226,228,237,291,295,319,346,361,376,383,392,408,424,425,426,427,448,455,468,475],auxiliari:[1,6,9,11,12,13,187,273,291,456,460,482],avail:[1,3,5,6,7,8,9,11,12,13,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,63,87,109,112,113,140,142,151,162,170,171,173,174,175,176,178,179,181,182,184,187,189,193,196,202,204,205,206,207,208,213,214,222,225,227,229,231,234,250,251,252,253,254,255,256,257,265,267,268,270,283,285,291,292,293,294,309,311,316,322,332,334,335,336,337,340,342,344,347,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,415,417,418,420,421,422,423,428,429,438,439,440,441,442,444,446,447,448,456,464,468,480],availab:9,ave_chunk:6,aveforc:[],avendano:411,averag:[3,6,7,15,41,63,64,71,87,91,103,105,116,118,144,152,160,163,187,190,193,195,199,201,202,203,204,205,206,207,208,209,213,226,228,230,234,235,240,250,251,254,273,278,281,287,288,291,292,295,332,363,385,408,443,456,460,473,475,480],averi:306,avesq:117,avi:189,avoid:[1,3,6,12,36,39,59,164,165,184,189,198,203,204,207,219,226,228,235,272,274,282,286,291,292,320,327,359,367,385,405,408,421,439,457,463,464,475],awai:[3,6,61,116,187,189,212,216,229,232,249,272,295,303,317,323,357,377,397,401,460],awar:[361,384,452],awpmd:[],axel:[7,9,13,18],axi:[3,6,41,118,130,143,163,164,166,186,189,209,226,229,232,247,277,299,303,318,324,336,342,349,455,458,465],axial:254,azimuth:[189,229],azur:190,b_k:428,ba2:163,babadi:422,back:[1,6,7,11,12,13,14,15,17,145,146,147,151,152,153,154,156,164,168,187,190,191,194,195,214,219,224,231,232,234,235,250,255,256,267,268,270,289,291,309,310,311,315,316,325,326,328,345,346,347,356,389,453,455,456,457,458,459,462,468,469,481],backbon:[212,294,340],backcolor:[190,483],backend:17,background:[9,87,88,112,141,190,209,215,234,306,314,318,321,356,375,406,407,408],backtrack:[352,354],backward:[9,12,191,356,469],baczewski:227,bad:[3,12,59,61,232,356,455,460,472],badli:[3,213,250],bal:313,balanc:[],balasubramanian:269,ball:[140,406,407],ballenegg:346,bammann:199,band:[4,6,7,140,193,249,353,356,367],bandwidth:[1,10,18,40],bandwith:189,bar:[87,189,479],barashev:383,bare:[219,233,235],barost:[219,475],barostat:[],barostt:6,barr:376,barrat:286,barrett:67,barrier:[3,4,6,249,342,356,376,387,469],bartel:273,bartok2010:428,bartok2013:428,bartok:[9,140,419,428],bartok_2010:419,bartok_phd:419,bary:479,barycent:302,basal:[],base:[3,4,6,8,9,11,12,13,14,15,20,63,64,71,78,87,91,111,118,144,146,163,164,166,187,188,189,190,193,199,205,206,209,210,211,215,216,220,231,234,238,240,262,273,274,280,282,284,291,292,295,296,306,313,347,361,363,365,367,381,385,388,391,392,393,397,406,409,410,415,417,418,438,441,442,450,452,455,456,457,459,462,465,466,469,470,473,479,480,481,484],bash:374,bashford:[6,20,170,372,467],basi:[3,6,12,40,140,144,164,198,234,236,273,306,323,349,448,465,480],basic:[6,7,8,12,17,41,113,141,189,190,199,209,250,251,272,327,362,364,449,457,475],basin:[86,356,450,469],bask:[383,408,418],bath:[9,281,286],batom1:[69,115,117,187,190],batom2:[69,115,117,187,190],bayli:[6,170,467],bb13:171,bcc:[3,4,7,64,70,73,349,408,410],bcolor:[3,189,190],bdiam:[3,189,190],be2:163,bead:[5,7,10,13,40,45,46,156,197,212,274,436],beam:216,bear:[6,227],becau:13,becaus:[0,1,3,6,8,12,16,17,18,29,40,41,59,64,71,77,116,128,140,144,149,154,164,165,166,170,187,188,189,190,191,196,200,202,209,210,211,212,213,215,221,225,227,228,233,234,235,236,247,250,251,262,268,277,281,282,286,291,303,308,313,314,317,318,321,325,326,327,328,329,335,346,352,354,356,357,360,361,372,374,377,379,381,385,386,388,389,390,391,392,395,396,405,406,407,408,412,422,436,437,443,444,452,453,455,457,458,459,462,464,465,467,469,475,480,481,482,484],beck:[],becker:[362,383],beckman:231,becom:[1,2,3,6,7,8,18,39,41,54,57,59,71,166,187,189,190,209,210,211,212,215,226,228,237,249,250,288,289,309,310,323,324,326,327,328,346,347,352,356,363,375,377,383,385,388,397,412,418,422,438,447,455,456,458,465,480],been:[1,2,3,6,7,9,12,13,16,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,45,46,47,48,49,51,53,54,56,57,59,60,63,65,69,71,87,109,112,113,114,115,117,119,142,143,144,145,146,147,151,152,153,154,156,157,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,189,190,191,196,198,200,201,202,203,204,205,206,207,208,209,212,213,214,215,216,222,225,226,229,231,232,234,235,237,238,239,240,241,245,247,248,250,252,253,254,255,256,257,265,267,268,270,276,277,278,281,283,285,288,289,291,293,294,302,307,309,310,311,318,319,320,322,323,324,325,326,328,329,332,334,335,336,337,340,342,345,346,347,354,357,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,382,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,409,410,413,414,415,417,420,421,422,423,429,436,438,439,440,441,442,444,446,447,448,450,452,453,455,456,457,458,459,461,465,469,472,473,480,481,482,483],befor:[1,2,3,6,8,9,12,14,17,22,29,39,40,41,44,59,66,71,74,75,81,89,90,93,103,104,105,106,114,144,147,152,153,159,164,165,167,168,172,185,186,190,194,195,196,197,198,200,202,204,205,206,207,208,209,213,218,219,225,226,231,233,234,235,237,240,247,250,255,256,267,270,273,280,281,282,285,286,291,292,293,307,309,310,311,317,323,324,325,329,333,351,352,354,356,361,386,389,405,408,437,445,450,452,453,456,457,458,459,460,462,463,465,469,472,473,475,480,481,482,483,484],began:[5,12],begin:[3,8,12,38,39,56,71,117,119,165,184,186,187,190,194,195,199,201,202,203,204,205,206,207,209,215,219,235,262,276,289,292,306,308,311,320,325,328,329,343,345,346,347,348,350,353,355,356,357,360,361,383,412,418,425,427,429,436,439,443,448,450,455,462,469,471,473,475,479,480,482],behalf:3,behav:[3,27,173,353,354],behavior:[3,168,184,187,189,191,212,213,216,226,227,228,231,234,235,236,250,277,281,286,306,309,310,318,353,367,385,408,449,457,461,480,482],behaviour:[6,234],behind:[8,233,248,281,306,346],beig:190,belak:7,believ:11,bellott:[6,20,170,372,467],bellow:336,belong:[2,3,40,71,120,167,200,202,205,226,240,291,329,355,424,455],below:[1,2,3,5,6,8,9,11,12,15,16,17,22,38,39,41,42,44,54,56,59,60,63,65,68,69,71,77,79,91,92,112,113,116,117,118,140,141,144,150,152,158,162,163,164,167,168,170,172,183,184,187,189,190,193,194,196,197,199,202,203,204,205,206,208,209,211,212,213,215,216,221,224,229,230,232,234,235,240,247,248,250,254,255,256,267,270,272,277,280,281,282,289,290,291,293,294,300,303,306,307,308,309,310,311,314,315,316,318,321,323,324,329,331,333,344,346,349,351,352,354,355,356,358,361,362,363,364,367,368,369,372,373,374,375,377,380,383,385,386,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,411,412,417,420,421,422,423,428,429,437,439,444,446,447,449,450,453,455,456,457,458,460,462,463,465,467,469,471,472,473,474,475,480,481,484],bench:[1,6,11,12],benchmark:[1,7,10,11,12,13,14,15,16,17,18,41,209,346,468],beneath:216,benefici:[61,358],benefit:[1,227,464],bennet:87,beowulf:7,berardi:[388,422],beraun:318,berendsen:[],berensen:291,berkelei:162,berkowitz:346,berlin:[7,9,295],bern:[3,274,282,283,376,388,437,464],bernendsen:6,beryllium:385,besid:[8,293,458],best:[1,6,8,14,15,16,17,18,19,250,268,269,290,291,361,367,377,397,401,412,439,456,464,469],beta:[6,9,273,281,362,365,383,384,386,408,440,441,442,473,480],beta_:367,beta_k:428,beta_pi:367,beta_sigma:367,beta_t:441,better:[3,6,7,8,12,14,16,27,140,173,195,209,226,237,250,262,282,289,291,306,347,356,361,440],betwe:366,between:[],beutler:405,bewteen:[108,203,306,314,321,392,452],beyon:464,beyond:[3,5,6,12,17,61,71,87,162,187,190,204,205,226,250,346,358,387,403,412,469,473,480],bgq:17,bi3:163,bi5:163,bia:[3,6,8,112,141,143,144,145,146,147,151,152,153,154,156,157,202,214,215,226,234,235,250,255,256,267,268,270,286,309,310,311,313,481],bias:[6,9,214,481],biaxial:143,biersack:[408,437,442,448],big:[3,4,12,187,281,286,306,357,375],bigbig:[3,12],bigint:[3,224],bilay:[4,10,303],bilayer1:303,bilayer2:303,bill:7,billion:[3,7,10,12,39,226,463],bin:[3,6,11,12,39,63,66,71,75,90,93,104,106,114,116,144,152,159,161,187,190,202,204,205,206,273,281,286,306,357,358,361,382,416,456,483],binari:[3,6,7,9,12,13,16,33,37,50,55,177,183,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,224,225,226,227,228,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328,338,341,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,415,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,446,447,448,456,457,462,482,484],binary2txt:[],binchunk:202,bind:[17,18,188,205,367],binsiz:[39,190,357,361],binstyl:152,bio:[40,357],biolog:[6,7],biologi:176,biomolecul:[276,291,346,347,372],biomolecular:464,biophys:231,biosym:13,bird:382,bisect:[41,209,444],bisector:[6,377,397,401],bispectrum:[63,140,428],bisqu:190,bit:[3,12,17,39,224,235,412,439,463,475],bitmap:[3,439,445],bitrat:[189,190],bitzek:353,bkgd_dyn:408,bla:12,black:190,blais:[9,13],blanchedalmond:190,blank:[2,3,12,38,56,107,184,189,276,291,355,356,367,384,408,414,428,438,439,440,441,442,452,453,455,480],blast:318,blend:408,block:[2,3,6,91,140,164,166,167,277,327,349,361,367,385,418,428,458,469,475],blocksiz:361,blow:[3,262,323,327,429],blown:3,blue:[2,189,190,212],bluegen:[187,346],blueviolet:190,board:[347,380],bodi:[],body_nparticl:8,bodyflag:455,bodyforc:237,bodyforcei:237,bodyforcex:237,bodyforcez:237,bodystyl:[240,291],boff:[355,455],bogaert:313,bogu:[3,147,213],bogusz:88,bohr:[383,385,442,479],boltzmann:[6,7,9,87,91,112,142,144,145,146,147,150,151,152,153,154,156,202,212,234,237,238,239,240,241,254,322,381,470,479],bond:[],bond_coeff:[],bond_graph_cutoff:421,bond_harmon:[8,48,49],bond_harmonicshift:49,bond_info:421,bond_interact:199,bond_styl:[],bond_typ:[168,436],bondangl:[3,21,33,455],bondbond13:[3,171,455],bondbond:[3,21,33,455],bondchk:421,bondcoeff:3,bondtyp:[210,211,355,436],bonu:[3,482],book:447,bookkeep:412,bookmark:0,boost:[1,3,12,64,357],bop:[],border:[3,7,16,61,318,481],boresch:87,boreschkarplu:87,born:[],boron:385,borrow:295,bose:286,botero:[7,9,13,385],both:[1,3,6,7,8,9,11,12,14,15,16,17,18,27,37,39,40,54,55,57,59,61,62,63,68,69,71,83,87,88,108,113,115,116,128,143,144,149,152,154,157,164,166,167,168,173,183,184,187,189,192,193,194,195,200,202,203,205,206,207,210,211,212,213,214,215,220,226,228,230,232,234,235,237,238,246,247,250,251,255,256,262,267,270,276,280,281,282,288,291,294,295,303,306,310,314,315,316,318,321,323,324,326,327,328,331,332,341,347,351,354,355,356,357,359,361,363,367,368,369,370,371,372,373,375,380,381,383,384,385,388,389,391,392,393,397,399,401,402,403,405,406,407,411,412,415,422,423,438,440,441,442,448,450,452,453,455,456,457,458,462,467,472,473,475,480,482,483,484],bottleneck:[1,3,453],bottom:[8,9,147,190,215,225,237,268,314,321,349,467],bottomwal:208,bounc:[3,306],bound:[3,6,17,26,27,41,42,57,59,71,153,166,173,186,187,190,204,205,209,215,216,220,226,235,250,277,306,323,324,325,326,327,328,346,354,385,455,458,469,475,480,481],boundar:3,boundari:[],boundary_dynam:199,boundary_faceset:199,boundary_integr:199,bount:11,box:[],boxcolor:[189,190],boxxlo:11,bpa:361,bpclermont:[9,13],bptype:436,br1:163,bracket:[2,3,6,41,63,71,117,119,193,201,202,203,204,205,206,207,209,320,473,480],bragg:[118,163],branc:11,branch:11,branicio:73,breakabl:[7,44,55],breakag:[78,210],breakdown:[1,12,15,88,107,420,421,450,469],brennan:436,brenner:[363,437],brick:[3,41,62,152,166,209,455,457,459],brief:[1,5,6,7,8,12,233,363,367,421,469],briefli:[6,10,274,376],brilliantov:389,bristol:[5,7],brittl:417,broader:453,broadli:8,broken:[2,54,65,69,70,78,107,115,168,210,250,367,457,467,482],brook:6,brought:186,brown:[7,9,13,15,16,118,141,190],brownain:369,brownian:[],brownw:7,brows:0,browser:[4,189],bryantsev:391,bsd:12,bstyle:[40,42],btype:[69,115,165,187,377,397,401,405,436],buc:370,buck:[],buckingham:[7,194,195,282,347,368,370,371,379,437],buffer:[3,8,189,190,472],bufi:189,bug:[],bui:189,build:[],builder:[7,13],built:[1,2,3,4,6,8,9,11,12,13,14,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,43,45,46,47,48,49,50,51,53,54,55,56,64,67,78,80,83,86,87,96,97,98,99,100,101,105,109,111,112,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,148,150,151,155,156,158,162,170,171,173,174,175,176,177,178,179,181,182,183,184,187,188,191,193,196,197,198,200,208,210,211,212,214,216,221,222,223,225,226,227,228,229,231,233,234,236,237,238,239,240,241,243,244,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,272,273,274,276,277,280,281,282,283,284,285,286,287,288,291,293,294,295,296,297,298,299,300,302,306,309,311,312,313,314,315,316,318,319,321,322,324,325,330,331,332,334,335,336,337,338,340,341,342,347,356,357,358,361,362,363,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,407,408,409,410,413,414,415,416,417,418,419,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,450,453,456,458,464,468,469,470],bulatov:[409,410],bulk:[4,6,10,70,237,272,278,378,408,412,417,424,426,459],bullet:7,bump:234,bunch:8,bundl:[9,189,191],burlywood:190,bussi1:310,bussi2:310,bussi:[228,310],buyl:[9,188],bybe:9,c1060:14,c11:[203,408],c12:203,c13:203,c1n:203,c2050:14,c21:203,c22:203,c23:203,c2n:203,c31:203,c32:203,c33:203,c34:203,c3n:203,c41:203,c42:203,c43:203,c44:203,c_0:[318,434,435],c_1:[68,69,117,118,163,187,190,227,280,292,329],c_2:[69,117,118,160,162,163,187,292,320,329],c_3:[117,292],c_cluster:6,c_cstherm:6,c_dist:117,c_doubl:11,c_e:318,c_flux:91,c_forc:117,c_gauss:387,c_hb:391,c_id:[6,63,71,87,117,119,187,201,202,203,204,205,206,207,292,308,320,473,480],c_ij:6,c_ijkl:6,c_index:117,c_k:227,c_ke:314,c_msdmol:119,c_my_stress:201,c_mycentro:[202,205],c_mychunk1:114,c_mychunk2:114,c_mychunk:[6,66,75,90,93,104,106,144,159,161],c_mycom:204,c_mycomput:202,c_myf:[187,483],c_myrdf:[116,207],c_mytemp:[8,203,204,207,320,473,480],c_n_k:227,c_p:141,c_pe:110,c_peratom:[110,141],c_pi:367,c_press:117,c_prop:6,c_radiu:162,c_reax:[420,421],c_sa:292,c_sigma:367,c_size:6,c_stress:187,c_tatom:235,c_tdrude:[219,235,475],c_thermo_press:[8,203,204,207],c_thermo_temp:207,c_xrd:204,ca2:163,cach:[17,39,412,468],cacul:294,cadetblu:190,cai:475,calcforc:237,calclat:91,calcluat:[103,105,110,112,141,377],calcualt:[91,202],calcul:[],caldwel:[6,170,467],calhoun:274,call:[],callabl:[3,11],callback:[3,11,193,224,453],caller:3,calori:479,caltech:[6,7,9,13,385],calucl:6,calul:[11,12,144,347],cambridg:[9,419],campa:273,can:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,340,341,342,343,344,345,346,347,349,350,351,352,354,355,356,357,358,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,462,463,464,465,466,467,468,469,470,471,472,473,475,479,480,481,482,483,484],cancel:[193,291,481],candid:[168,200,226],cannot:[1,2,3,6,11,12,13,15,16,17,39,40,41,54,57,58,59,68,71,82,84,88,104,117,119,143,144,165,167,168,186,187,188,189,190,201,202,203,204,205,206,207,209,212,213,215,216,226,227,228,234,235,236,240,247,250,252,253,255,256,258,259,260,265,267,270,277,278,281,286,288,291,292,293,296,306,314,318,320,321,323,324,327,328,329,331,346,349,354,356,359,360,361,370,371,373,383,388,390,397,401,403,405,412,415,420,422,423,424,426,436,437,439,450,452,453,455,456,458,459,461,464,465,467,469,472,479,480],canon:[193,200,226,228,250,251,267,268,269,270,274,310,313,316,417],cao1:274,cao2:274,cao:274,capabl:[5,7,9,11,14,16,17,18,325,331,347,361,363,373],capac:[9,40,101,150,286,318,431,455,465],capit:[218,455],capolungo:[118,163,292],captur:[6,319,363,371,385,389,401,408,475],carbid:377,carbon:[7,189,340,363,376,394,408],card:[12,14,16,22,44,77,87,116,172,194,195,291,333,351,374,391,449,457,462,482,484],care:[3,6,59,71,164,167,186,202,205,206,210,211,216,228,233,237,250,277,291,313,366,453,455,458,459,464,465],carefulli:[11,12,54,288,329,392,394,460],carlo:[6,7,9,193,200,212,226,291,313,382,437],caro:[200,383],carpent:[7,13],carri:[16,243,280,318,389,421],cart:[3,452],carter:[9,17],cartesian:[3,62,362,452],carv:167,cascad:[220,318],cash:7,cast:[228,480],cat:[15,189],catastroph:282,cate:237,categori:[],cation:386,cauchi:[133,138],caus:[1,2,3,6,8,12,16,17,164,166,167,168,187,190,198,213,220,226,262,272,289,291,294,323,325,326,327,328,331,345,347,354,356,360,391,397,403,406,407,412,449,453,454,455,456,459,460,462,463,480,484],caution:[1,347],cautiou:[210,211],cautious:363,caveat:[363,464],cbecker:[362,383],cc1:[6,14,66,75,90,93,104,106,114,144,159,161,202,205],cc2:14,ccc:[384,438,440,442],ccflag:[12,16,17,18,19,187],ccm6:383,ccsi:[384,438,440,442],ccu:367,cd2:163,cdeam:383,cdennist:9,cdll:11,cdof:[6,144,202],cdte:367,cdte_bop:367,cdtese:367,cdzn:367,cdznte:367,ce3:163,ce4:163,ceas:353,ceil:480,cell:[3,6,59,88,116,118,162,163,164,187,198,213,214,226,231,248,250,251,254,273,281,284,318,346,347,349,382,385,473],cella:[6,473],cellalpha:[6,473],cellb:[6,473],cellbeta:[6,473],cellc:[6,473],cellgamma:[6,473],center:[3,6,25,42,63,66,71,74,75,86,89,90,98,103,104,105,114,116,118,144,145,146,149,152,156,159,161,164,189,190,193,194,195,197,202,204,205,206,213,215,216,217,219,226,227,232,234,235,240,246,250,255,256,267,268,270,273,277,282,288,289,291,292,295,303,304,306,308,309,310,311,313,314,316,323,327,332,349,355,366,384,385,388,389,395,406,407,408,409,410,438,440,441,442,444,458,465,475,480],centimet:479,central:[3,61,70,76,77,116,122,140,240,272,294,304,355,414,420,421,455],centro:[],centroid:[3,274,444,465],cerda:346,ceriotti2:228,ceriotti:[13,228,233],certain:[1,2,3,6,8,12,17,39,71,113,117,119,168,187,189,201,202,203,204,205,206,207,212,224,225,291,293,307,320,331,338,345,357,392,412,421,443,457,461,475,480],certainli:232,cerutti:347,cfg:[3,6,7,13,187,188,189,190,191],cfile:421,cfl:[128,296],cfor:295,cg_type:423,cgiko:2,cgikot:2,cgkio:2,cgko:2,cgkot:2,cgo:2,cgot:2,ch2:294,ch2lmp:[],ch3:294,ch5md:188,chain3:357,chain:[],challeng:[6,295],chalopin:286,champaign:[231,346,347,406],chandler:[362,383],chandrasekhar:[6,397],chang:[1,2,3,6,8,9,11,12,14,15,16,17,39,40,41,46,55,57,59,62,71,80,87,116,126,128,146,147,148,164,165,166,168,184,186,187,188,189,190,191,193,194,195,196,197,199,200,205,206,208,209,210,211,212,213,214,215,216,220,221,223,225,228,230,231,232,234,236,237,238,240,246,247,248,250,251,252,253,254,255,256,262,267,268,269,270,272,273,277,278,280,281,285,288,289,290,291,293,294,295,306,309,310,311,312,314,315,316,317,318,319,321,324,327,329,347,352,354,356,359,361,381,385,389,392,406,407,408,412,420,421,437,450,451,452,453,455,456,457,458,459,460,461,463,464,465,466,467,470,473,476,478,479,480,481,482],change_box:[],changeabl:187,channel:[4,196],chapter:[274,347],charact:[2,3,6,12,38,41,56,63,184,187,189,190,191,193,209,280,288,331,355,360,385,396,418,420,421,439,452,453,457,462,463,480,482,483,484],character:[6,67,70,116,140,428,450,469],characterist:[235,306,315],charg:[1,3,4,5,6,7,9,11,15,40,87,88,113,118,163,164,187,191,193,194,195,200,216,221,226,280,282,283,284,288,308,321,346,347,355,368,370,376,377,379,380,383,385,386,392,397,401,405,415,420,421,437,442,443,445,447,448,455,456,460,465,467,475,479,480],charmm2lammp:13,charmm:[],chartreus:190,cheap:306,cheaper:[220,388,422],check:[3,6,8,11,12,15,17,39,41,71,91,184,200,205,209,210,211,216,223,226,232,233,290,294,306,314,316,321,329,331,345,354,355,356,357,358,361,382,393,396,412,421,436,450,452,453,455,463,469,472,473],checkf:184,checkqeq:421,checku:184,chem:[6,13,20,21,25,39,40,43,45,46,87,88,112,141,170,171,181,214,219,227,228,235,237,249,250,251,268,269,274,278,281,283,291,295,306,309,310,313,314,315,316,323,332,340,342,346,347,353,356,363,368,372,373,376,377,378,380,381,385,387,388,390,391,397,401,402,405,408,411,412,415,436,443,464,467,469,475],chemic:[9,118,158,163,187,199,200,226,282,287,288,313,347,420,421,432],chemistri:[9,281,282,284,367,385,420,421],chen:318,cheng:376,chenoweth:[420,421],chenoweth_2008:[420,421],chi:[92,153,186,272,282,284,386,388,481],chiefli:419,child:8,chip:[7,12,17,361,468],chipot:214,chiral:340,chmod:[11,12],cho:408,chocol:[7,190],choic:[3,6,12,15,16,18,40,41,54,87,141,143,157,168,184,202,205,206,209,212,215,216,228,234,237,248,250,274,282,291,313,341,347,352,353,356,358,361,392,405,412,416,455,464,465,468,469,474,475,479],choos:[1,3,6,7,8,12,16,17,18,29,39,54,87,117,154,155,189,210,211,212,213,216,223,234,237,248,250,252,253,254,255,256,278,306,310,324,346,347,353,445,450,452,464,470],chose:[440,442],chosen:[2,3,6,12,17,140,164,167,176,184,189,195,200,213,216,223,226,227,235,237,248,250,254,274,277,288,306,310,313,314,319,321,322,328,347,348,353,361,385,389,395,396,399,423,440,450,464,469,475],chri:162,christian:[7,9,14,17],christoph:7,chunk:[],chunkid:[66,75,90,93,104,106,114,144,159,161,202],chute:[4,10,229],ciccotti:294,cieplak:[6,170,467],cii:203,cij:203,circl:302,circular:[3,6,143,185],circumst:18,circumv:286,citat:[],cite:[3,7,8,12,234],cko:2,cl1:163,clarendon:[29,380],clarifi:[7,440,442],clariti:331,clark:415,class2:[],classic:[0,3,5,6,7,8,9,224,274,281,286,318,342,385],classifi:[9,437],claus:453,clean:[6,12,14,15,17,463],cleanli:[454,483],clear:[],clearli:7,clebsch:140,clermont:[9,13],clever:459,click:[2,11,22,37,44,55,164,172,183,189,231,333,341,356,374,437],client:[231,233],climb:[249,356,469],clinic:[7,13],clo:[153,186,481],clock:[12,450,469],clockwis:324,close:[3,6,11,12,13,39,41,67,141,167,187,211,212,213,228,235,237,250,268,291,294,324,327,345,347,350,352,353,356,361,363,367,377,378,408,412,424,426,442,459,465,475,477],closer:[3,41,116,162,186,187,209,213,217,315,356],closest:[211,272,291,321,388,422,436,445],cloud:475,clovertown:18,clsuter:72,clump1:[276,291],clump2:[276,291],clump3:[276,291],clump:291,cluster:[],clutter:[3,9],cmap:455,cmatrix:228,cmax:408,cmd:[11,12,274,466],cmin:408,cmm:[],cn1:203,cn2:203,cna:[],cnn:203,cnr:[9,13],cnt:[392,459],co2:[40,163,294,355],coars:[7,9,29,36,40,54,176,276,291,306,390,423,467],coarser:[347,480],coarsest:140,code:[],coeff:[3,7,8,12,21,22,33,44,50,170,171,172,177,332,333,338,374,392,396,412,425,427,429,455,457],coeffcient:455,coeffici:[],coefficienct:381,coefficient0:383,coefficient1:383,coeffieci:[6,365],coeffincientn:383,coexist:[9,226,385],cohes:[6,386,408],coincid:[122,327,372,406,407,450],colberg:188,cold:[6,149,230,357,475],coldest:314,coleman8:9,coleman:[9,118,163,292],colin:9,collabor:[7,8,9,15],collect:[3,6,7,8,9,13,40,42,66,75,83,90,93,98,104,106,114,144,152,159,161,164,187,190,202,214,240,246,276,286,289,291,329,346,355,357,375,395,455,462,468,484],collid:[220,306,328],colliex:163,collinear:[3,276],collis:[3,237,306,324,328,382,389,448],colllis:306,colloid:[],colombo:39,colon:[191,329,456],color1:190,color2:190,color:[3,9,41,187,189,190,209,227,281,286],column:[3,6,9,13,42,63,65,66,67,68,69,71,75,77,79,81,90,92,93,104,106,108,110,113,114,115,116,117,119,140,141,144,152,159,161,162,163,184,187,190,193,201,202,203,204,205,206,207,240,247,248,281,291,307,308,318,328,387,391,420,421,456,470,472,480],colvar:[],colvarmodul:12,com:[],comamnd:215,comand:[212,457],comannd:361,comb3:[],comb:[],comb_1:283,comb_2:283,combiant:378,combin:[3,6,7,9,11,13,36,40,63,65,69,79,87,92,108,115,143,157,187,189,199,204,231,240,250,274,280,310,319,327,330,332,346,347,349,353,361,375,377,378,385,386,392,404,405,428,438,440,442,447,458,463,475,480],come:[],comfort:[12,13],comm:[0,3,12,61,73,188,231,233,234,347,356,361,381,412,417,439],comm_modifi:[],comm_styl:[],command:[],comment:[2,7,11,12,38,56,170,184,187,235,291,318,355,356,362,383,384,386,396,408,414,421,428,438,439,440,441,442,452,453,455,475,480],commerci:7,commmand:[3,6,12,59,107,269,449,450,452,469,483],common:[],commonli:[3,6,12,17,25,57,59,105,166,187,189,191,342,390,399,428,440,442,455,458,467],commun:[1,3,6,7,8,10,11,12,14,15,16,18,40,41,58,61,62,71,167,168,189,190,209,210,211,213,214,215,231,233,237,239,240,241,250,273,280,282,283,284,291,306,318,329,346,357,358,359,361,382,416,452,453,457,464,465,482,484],communc:346,comp:[7,188,233,234,294,347,356,385,412,417,422,435,439,441],compact:[63,193,374,437],compani:[5,7],compar:[1,3,4,6,8,12,17,39,86,110,118,147,162,163,172,183,190,219,282,329,331,346,347,354,356,408,450,469,470,475,479],comparison:[],comparison_of_nvidia_graphics_processing_unit:14,compass:[7,21,22,37,43,44,55,171,172,183,332,333,341,373,437],compat:[3,5,7,8,9,11,12,13,17,18,41,71,117,119,175,187,191,195,201,202,203,204,205,206,207,209,273,285,310,313,320,323,326,346,361,393,412,439,452,453,480],compens:[6,210,211,289,357,385],compet:317,competit:347,compil:[3,7,8,9,10,12,13,14,15,16,17,18,19,162,187,188,189,191,231,317,347,361,455,456,460],compl:17,complain:[12,17],complement:408,complementari:[7,377,397],complet:[3,6,9,12,15,41,59,71,190,205,209,214,240,274,277,280,306,317,319,331,345,356,361,386,425,427,444,450,455,460,463,467,469,472,475,480],complex:[6,8,11,12,13,25,40,42,62,140,152,164,165,237,302,327,344,356,385,439,453,455,458,480],compli:[313,317],complic:[6,7,9,12,13,200,226,453],complier:12,compon:[3,6,8,12,61,63,66,67,73,81,88,89,90,91,93,94,97,104,105,106,107,108,109,110,112,113,117,127,130,131,132,133,136,137,138,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,159,160,161,187,189,190,196,197,201,202,203,204,205,206,207,208,212,213,215,216,221,224,229,233,234,237,240,242,246,247,249,250,251,254,255,256,267,268,270,271,273,274,275,278,289,291,293,294,295,299,300,303,306,309,310,311,313,320,321,326,327,328,346,349,353,354,355,356,361,381,385,389,406,407,425,427,428,455,456,465,473,480,481],componenet:6,composit:[6,200,237,383],compound:[376,385,386],compres:[71,114,202],compress:[3,6,9,12,59,71,114,167,187,189,190,202,215,248,254,278,281],compris:[40,327,395,422,444],compton:[118,163],comptu:[3,6],compuat:347,comput:[],computation:[3,6,210,211,318,367],computational:475,compute_arrai:8,compute_fep:[195,405],compute_group_group:226,compute_inn:8,compute_ke_atom:8,compute_loc:8,compute_modifi:[],compute_peratom:8,compute_sa:[118,292],compute_scalar:8,compute_temp:8,compute_ti:195,compute_vector:8,compute_xrd:163,concaten:[2,3,483],concav:327,concentr:383,concept:[6,144,154,202,464],conceptu:[3,6,71,152,213,215,356,377,392,408,460],concern:[6,73,87,188,227],concis:[11,317],conclud:12,concret:8,concurr:[9,16,347],conden:[318,440,442],condens:[6,146,318,363,379,383,397],condit:[],conducit:6,conduct:[],cone:458,confid:[3,469],config:[12,187,452],configfil:214,configur:[1,2,6,12,15,17,38,59,122,166,184,186,187,189,193,213,214,215,216,220,226,233,234,262,274,282,317,344,354,356,363,367,384,408,438,440,442,450,455,457,458,469],confin:[455,469],conflict:[3,12,40,412,453],conform:[3,6,13,59,212,213,249,290,295,317,340,356,385,467],confus:3,conjuct:381,conjug:[7,8,234,353,385,420,421],conjunct:[6,7,71,86,87,114,147,152,158,164,168,190,194,195,234,237,241,262,277,278,282,283,284,286,291,306,314,321,326,346,347,356,368,370,374,377,381,385,391,397,412,415,423,443,455,458,462,475,484],connect:[3,6,87,149,167,212,231,276,291,294,303,356,378,389,436,442,452,453,459,475],conput:3,consecut:[3,11,12,39,71,164,190,194,195,216,231,232,377,397,401,450,456,458],consequ:[1,6,318,396,469],conserv:[3,193,200,212,219,220,227,230,234,236,237,241,246,248,250,262,291,294,309,310,314,321,322,326,356,380,381,389,403,464,469],consid:[6,9,70,71,78,87,115,149,150,167,187,190,194,195,201,203,205,209,211,212,216,238,251,273,291,313,314,317,318,321,347,374,385,392,421,422,436,450,451,453,456,457,458,460,463,465,473,475,480],consider:[6,8,234,235,309,310,311,361,464],consist:[3,6,8,9,11,12,40,42,65,69,79,92,104,108,111,112,115,144,147,149,164,176,186,191,196,197,202,215,216,219,221,224,227,234,235,236,247,250,252,253,254,255,256,257,258,260,261,262,263,265,266,267,268,269,270,278,281,286,288,290,291,309,310,311,312,322,346,347,349,355,356,361,363,367,369,375,377,385,388,392,406,407,408,412,422,425,427,439,445,453,455,456,458,459,460,467,475,480],consistent_fe_initi:199,consit:291,constant:[],constitu:[3,6,240,291,323,327,375,422],constitut:[425,427],constrain:[3,6,8,142,143,144,145,147,150,151,152,153,154,156,157,193,202,216,226,227,232,240,244,276,277,289,291,294,304,314,321,354,355,385,460,467,475],constraint:[],construct:[6,8,14,38,54,56,61,64,67,70,72,73,77,118,140,163,213,250,273,290,327,357,361,380,412,436,438,439,458,459,480],constructor:8,consult:421,consum:[1,286,416,480],consumpt:344,contact:[],contact_stiff:[424,426],contain:[0,1,2,3,4,6,8,9,11,12,13,17,18,19,38,40,41,56,63,87,91,116,118,140,144,152,162,163,164,166,170,172,183,184,187,189,190,191,193,194,195,199,201,202,203,204,205,206,207,209,214,216,221,228,232,233,234,235,237,248,262,272,273,276,277,279,281,284,288,291,292,296,306,313,317,318,327,328,331,345,347,355,356,359,360,362,363,364,367,376,377,380,383,384,385,392,393,408,414,418,419,420,421,428,438,439,440,441,442,443,450,451,452,453,455,456,457,458,460,462,464,467,469,472,473,475,480,482,484],content:[12,18,421,471,473],context:[3,6,8,12,17,117,190,210,211,216,276,288,322,353,447,455,462,471,479,480,481],contibut:70,contigu:452,contin:16,continu:[0,2,3,5,6,9,12,13,14,41,71,81,103,104,160,190,193,194,195,200,202,203,204,205,206,207,209,212,213,214,215,216,226,227,228,230,231,232,234,235,236,242,247,248,250,252,253,254,255,256,267,268,269,270,275,277,280,281,291,292,295,305,306,308,315,316,318,324,327,331,345,360,361,367,381,382,399,402,420,421,422,425,427,441,450,453,455,457,458,463,469,472,473,480,482],continuum:[6,7,9,199,318,425,427],contour_integr:199,contract:[59,213,215,250,278,291],contradictori:3,contrain:294,contraint:262,contrari:[228,235],contrast:[1,6,42,55,64,149,215,329,425,427,447,483],contrib:318,contribut:[3,5,6,7,8,9,12,13,17,63,66,68,70,71,74,75,77,80,84,87,88,89,90,91,93,102,104,106,107,108,109,110,112,114,117,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,195,200,201,202,203,204,205,206,207,213,226,234,237,240,241,245,251,268,269,276,277,285,288,291,292,294,320,346,354,356,364,381,382,383,385,392,406,407,412,420,421,467,473,475],contributor:12,control:[3,5,6,7,8,9,11,13,16,27,29,41,87,91,122,140,173,187,189,193,199,200,209,213,214,215,230,231,234,235,250,252,253,254,255,256,278,283,291,297,298,309,310,311,318,322,344,346,358,385,388,420,421,424,426,438,442,450,452,464,470,471],control_typ:199,controlfil:421,convect:91,conveni:[6,12,29,187,191,207,292,349,428,480],convent:[3,8,9,29,175,182,183,190,290,303,330,383,385,480],converg:[3,6,41,88,187,189,191,196,209,212,213,221,224,254,281,283,286,290,294,352,353,354,356,376,377,397,450,462,469],convers:[3,8,140,189,190,200,203,278,346,377,378,379,385,397,401,405,415,453,469,479],convert:[2,3,4,5,6,7,8,12,13,20,21,24,28,32,35,36,59,63,71,91,164,171,187,189,190,207,248,329,332,334,337,340,349,356,362,383,440,442,448,453,455,456,457,462,472,475,479,480,482,484],convex:327,convinc:[7,12],cook:9,cooki:7,cool:[7,154,230,289],cooordin:187,cooper:[5,7],coord123:114,coord1:[3,114,202,205,206],coord2:[3,114,202,205,206],coord3:[3,114,202,205,206],coord:[],coordiat:354,coordin:[1,3,4,6,7,8,11,13,14,15,17,40,41,42,59,61,62,63,66,68,71,74,75,77,81,87,89,90,93,103,104,106,113,114,116,134,140,147,153,159,161,162,164,168,186,187,188,189,190,191,193,196,201,202,204,205,206,209,210,211,212,213,214,215,216,219,221,222,224,226,229,230,231,232,233,234,235,247,249,250,252,253,255,256,268,271,272,273,276,277,278,288,289,291,293,294,295,300,303,304,305,306,308,316,317,318,325,326,328,329,349,354,355,356,361,362,363,366,384,450,455,456,458,460,463,465,469,475,480,481],coordn:[114,202],coorind:104,copi:[0,3,4,8,11,12,15,17,40,119,189,318,356,374,420,453],copper:448,coproccesor:16,coprocessor:[1,4,7,9,16,17,361,468],coproprocessor:17,copy_arrai:8,copyright:[7,8,276],coral:190,core:[],core_shel:146,coreshel:[6,9,370,377,379],cornel:[6,170,467],corner123i:113,corner123x:113,corner123z:113,corner1i:113,corner1x:113,corner1z:113,corner2i:113,corner2x:113,corner2z:113,corner3i:113,corner3x:113,corner3z:113,corner:[3,6,40,113,189,327,328,349,444,455],cornflowerblu:190,cornsilk:190,corpor:16,corr:376,correct:[3,6,9,11,12,16,17,59,87,88,102,110,116,146,151,158,189,215,228,234,250,251,268,276,278,281,317,323,327,346,356,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,444,446,447,448,455,470,473,475],correction_max_iter:199,correctli:[3,8,9,11,17,71,81,102,103,142,143,145,147,149,150,151,152,153,156,157,160,187,190,196,216,221,224,235,244,250,251,284,291,294,303,305,324,327,356,357,361,379,407,452,453,455,465,479,481],correl:[],correspond:[1,2,6,8,11,12,14,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,40,43,44,45,46,47,48,49,51,53,54,56,70,71,87,96,97,109,112,113,114,115,118,119,127,130,131,132,133,134,136,137,138,140,142,143,151,158,163,170,171,172,173,174,175,176,178,179,181,182,184,187,189,190,194,195,196,202,204,205,206,208,211,213,215,222,224,225,229,234,237,238,246,247,248,250,252,253,254,255,256,257,262,265,267,268,270,273,274,278,283,291,293,294,309,311,313,322,323,324,326,327,328,330,332,333,334,335,336,337,340,342,347,351,353,355,356,362,363,365,368,369,370,371,372,373,374,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,408,409,412,413,414,415,417,418,420,421,422,423,428,429,438,439,440,441,442,444,446,447,448,450,452,453,455,456,458,468,469,470,472,473,475,480],correspondingli:[406,407,464],cosin:[],cosineshift:27,cosmo:[228,233],cossq:[],cost:[1,6,10,11,12,17,39,41,71,109,118,141,163,189,190,202,205,206,209,210,211,223,250,283,318,346,347,359,377,397,401,412,438,452,464],costheta0:[438,440,442],costheta:418,costli:[11,88,228,357],couett:4,coul:[],could:[2,3,6,9,11,12,17,33,41,50,59,66,71,75,87,90,93,104,106,109,112,114,144,154,159,161,177,187,189,190,194,195,200,202,203,205,209,215,224,233,280,281,282,286,289,291,293,306,307,313,317,318,319,323,327,329,331,338,343,345,352,354,357,361,364,387,391,392,420,421,451,452,453,455,457,459,462,463,471,475,480,481],coulomb:[3,5,6,7,8,9,10,12,14,15,18,88,107,108,141,165,169,282,284,319,346,347,354,361,368,370,371,372,373,376,377,378,379,380,385,389,390,392,397,401,405,412,415,420,421,423,437,442,443,447,460,467,473,475,479],coulommb:6,cound:3,count:[1,3,6,8,10,11,12,41,63,68,77,91,114,116,117,152,162,168,196,197,200,202,204,205,206,208,209,216,221,223,226,232,250,262,277,294,309,310,327,347,354,355,356,358,361,387,391,412,473,480],counter:[324,450,461,463,469],counterbal:230,counterpart:[187,291,450],counterproduct:18,coupl:[],courant:296,cours:[3,8,126,128,158,187,194,195,227,290,303,317,323,325,326,328,329,347,406,429,452,455,468,475,480,482],coval:[6,29,385,408,475],covari:228,cover:[6,71,184,190,199,237,385,395,444],coverag:[71,205],cpc:233,cpp:[1,3,6,8,9,11,12,13,87,187,194,195,224,294],cpu:[1,3,4,9,10,12,14,15,16,17,18,63,71,190,193,219,235,319,344,347,361,374,437,450,468,469,472,473],cpuremain:473,cr2:163,cr3:163,crack:[4,357],crada:[5,7],crai:[5,7,13,18,187],crash:[3,12,357,475],craympi:361,creat:[],create_atom:[],create_bond:[],create_box:[],create_elementset:199,create_faceset:199,create_group:188,create_nodeset:199,createatom:[],creation:[],crimson:190,critchlei:276,criteria:[3,116,165,189,190,210,211,212,245,354,417,444,457,460,480],criterion:[41,121,162,164,167,200,209,212,226,262,283,296,324,329,354,356,376,385,389,460,469,470],criterioni:469,critic:[48,49,248,313,318,354],cross:[3,12,22,71,89,143,172,187,189,201,205,211,215,247,249,268,291,299,303,305,314,321,333,349,356,372,381,382,383,390,391,392,397,399,401,418,423,425,427,440,442,455,459,465,482],crossov:1,crossterm:455,crozier:[0,7,13],crucial:281,crystal:[4,6,13,73,272,273,316,357,459,473,475],crystallin:[6,273,349,441,475],crystallis:313,crystallogr:[118,163],crystallograph:[349,473],crystallographi:[118,163,349],cs1:163,cs_chunk:6,cs_im:[40,455],cs_re:[40,455],csanyi:[140,419,428],cscl:408,csequ:6,csh:[11,12,374],cshrc:[11,12],csic:[384,438,440,442],csinfo:6,csisi:[384,438,440,442],csld:[],cst:383,cstherm:6,cstyle:452,csvr:[],ctcm:[362,383],ctemp_cor:219,cterm:295,ctr:9,ctype:11,cu1:163,cu2:163,cu3au:408,cube:[6,41,162,167,209,219,327,349,475],cubic:[],cuda:[],cuda_arch:15,cuda_get:15,cuda_hom:15,cuda_prec:15,cufft:14,cuh:367,cummul:[3,6,207,210,211,212,214,223,228,234,236,306,309,310,311,312,314,321,391,473],cumul:[6,200,202,204,205,206,220,226,234,248,250,254,262,291,292,356],curli:2,current:[0,1,3,5,6,7,8,9,11,12,13,15,16,17,18,40,41,42,59,61,63,71,73,81,87,102,108,116,117,130,141,144,152,160,162,165,168,187,188,189,190,191,194,195,199,200,202,205,206,207,209,210,211,212,213,214,215,216,220,221,224,226,228,231,232,234,240,247,250,251,255,256,262,267,268,270,276,282,283,285,288,289,290,291,294,295,296,297,298,299,300,302,304,305,306,309,310,311,317,318,321,322,323,324,325,326,328,329,331,344,345,346,347,350,351,353,354,355,356,361,367,374,376,380,383,385,386,389,393,396,406,407,408,409,410,412,418,420,421,424,425,426,427,429,440,442,443,445,450,451,452,453,455,456,457,458,459,461,462,463,465,467,469,470,472,473,480,481,482,483,484],curv:[6,164,226,273],curvatur:[388,422,448],custom:[],cut0:453,cut1:464,cut2:464,cut:[],cuthi:[272,284],cutinn:[369,406,407],cutlo:[272,284],cutmax:418,cutoff1:[373,380,397,401,405,415,423],cutoff2:[368,370,371,373,379,380,397,401,405,415,423],cutoff:[3,6,10,16,18,39,45,46,54,55,61,70,72,73,77,87,108,115,116,140,162,165,167,211,212,217,272,281,282,284,286,288,291,306,319,323,327,329,346,347,354,357,358,359,361,362,363,364,365,366,367,368,369,370,371,372,373,375,377,378,379,380,381,382,383,384,385,386,387,388,390,391,392,393,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,420,421,422,423,428,429,430,431,432,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,453,457,460,464,475],cutoffa:384,cutoffc:384,cuu3:383,cval:163,cvd:313,cvel:295,cvff:[],cwiggl:[3,247,323,326,328,480],cyan:[2,189,190],cycl:[3,226,248,250,251,254],cyclic:[3,184],cygwin:12,cylind:[3,4,189,232,277,324,327,458],cylindr:[6,232,303,324],cypress:361,cyrot:367,cyrstal:273,d3q15:237,d3q19:237,d_double_doubl:15,d_e:318,d_flag2:280,d_flag:280,d_name:[113,187,280,308,465],d_single_doubl:15,d_single_singl:15,d_sx:280,d_sy:280,d_sz:280,daan:316,dai:12,daili:12,daivi:268,damag:[],dammak:286,damp:[3,6,193,198,234,235,236,241,250,251,254,278,281,286,291,309,310,322,324,325,353,354,356,368,370,372,377,380,385,389,397,405,415,423,437,443,469,475],damp_com:235,damp_drud:235,dampen:[291,475],dampflag:[324,389],dan:17,danger:[3,12,226,329,381,473],dangl:167,daniel:9,darden:[347,380],darkblu:190,darkcyan:190,darken:189,darkgoldenrod:190,darkgrai:190,darkgreen:190,darkkhaki:190,darkmagenta:190,darkolivegreen:190,darkorang:190,darkorchid:190,darkr:190,darksalmon:190,darkseagreen:190,darkslateblu:190,darkslategrai:190,darkturquois:190,darkviolet:190,dasgupta:282,dash:[389,472],dat:[6,91,184,199,451],data2xmovi:[],data:[],data_atom:8,data_atom_hybrid:8,data_bodi:8,data_vel:8,data_vel_hybrid:8,databas:[],datafil:[12,13,292],dataset:292,datatyp:3,date:[0,6,12,13,420,421,480],datom1:115,datom2:115,datom3:115,datom4:115,datum:[3,6,42,65,68,69,79,92,108,115,187,203],davi:323,david:[9,19,346,347,440,442],daw:[383,418],dbg:14,dcd:[3,6,7,187,188,189,190,191,274,456,460],ddim:186,deactiv:405,dealt:233,debug:[6,7,11,12,13,14,17,118,122,163,164,274,279,344,346,361,393,412,445,453,454,457,462,465,472,480],deby:[],decai:[377,448],decid:[3,6,12,16,71,247,280,291,319,470],decipher:349,declar:188,declin:306,decod:189,decompos:[87,428],decomposit:[3,5,7,18,62,199,274],decoupl:[6,475],decreas:[3,187,196,197,212,215,221,224,234,317,346],decrement:295,deepli:343,deeppink:190,deepskyblu:190,def:[12,13,453],defaul:61,defect:[6,70,162],defgrad:2,defin:[2,3,5,6,7,8,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,55,56,57,58,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,170,171,172,173,174,175,176,178,179,181,182,183,184,185,186,187,188,189,190,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,219,220,221,224,225,226,229,232,233,234,235,236,237,245,247,249,250,251,252,253,254,255,256,258,259,260,263,265,266,267,268,269,270,272,273,274,276,277,278,280,282,284,289,291,292,293,294,296,300,304,306,308,309,310,311,312,314,315,316,318,320,321,323,324,325,326,327,328,329,331,332,333,334,335,336,337,340,341,342,344,346,347,349,351,353,354,355,356,357,358,359,360,361,363,364,365,366,368,369,370,371,372,373,374,375,377,378,380,381,382,384,385,387,388,389,390,391,392,393,395,397,398,399,400,401,402,403,404,405,406,407,411,412,413,414,415,417,418,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,452,453,455,456,458,459,460,461,464,465,466,467,469,470,472,473,475,476,477,478,479,480,481],definit:[2,3,6,8,12,13,78,80,116,140,190,202,203,204,205,206,207,215,232,254,292,308,320,323,326,328,330,341,344,355,364,367,375,385,395,418,425,427,428,444,453,455,457,464,466,479,480],defint:473,deform:[],deg2theta:163,deg:475,degener:[3,276],degrad:[8,18,273,347,464],degre:[3,6,8,20,21,24,28,29,32,35,36,38,65,79,92,94,96,97,99,101,102,112,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,163,164,170,171,174,175,182,184,186,189,202,212,219,226,228,229,234,235,240,250,251,254,255,256,267,268,270,274,276,290,291,294,309,310,311,316,332,334,337,340,342,354,380,383,391,465,473,475,481],degress:[144,202],del:469,delai:[3,6,12,357,382,473],deleg:392,delet:[2,3,7,8,12,54,57,60,63,162,167,168,193,202,203,204,205,206,207,210,212,223,226,250,292,309,310,329,331,345,355,357,360,412,455,456,458,466,467,472,476,478,480,481],delete_atom:[],delete_bond:[],delete_el:199,deli:186,delimit:[453,480],deloc:[251,385],delr:408,delt_lo:469,delta:[],delta_1:367,delta_3:367,delta_7:367,delta_conf:3,delta_ij:[408,418],delta_mu:[3,200],delta_pi:367,delta_r:418,delta_sigma:367,delx:186,delz:186,demand:286,demo:11,demon:271,demonstr:[281,408],den:277,dendrim:391,denniston:[9,237,239,240,241,273],denomin:[7,169],denot:[118,219,235,273,284,286,377,390,392,421,425,427],dens:[71,212,385],densiti:[3,6,7,9,18,40,41,59,100,116,126,140,150,162,164,194,195,199,202,205,206,209,215,224,237,240,243,244,273,277,278,282,318,323,349,351,355,362,367,383,408,409,410,418,422,431,433,434,435,455,464,465,473,479],density_continu:427,density_summ:427,depart:[0,7],departur:[248,281],depend:[1,2,3,6,8,9,11,12,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,44,45,46,47,48,49,51,53,54,56,61,63,65,68,69,70,71,79,92,108,109,112,113,114,115,119,140,142,147,151,152,158,164,165,170,171,172,173,174,175,176,178,179,181,182,183,184,186,187,189,190,193,194,195,196,197,200,202,204,205,207,208,209,211,213,221,222,225,228,229,230,232,234,235,237,239,240,247,250,252,253,254,255,256,257,265,267,268,270,272,283,286,288,291,293,294,300,306,309,310,311,313,315,317,318,320,322,323,326,327,328,329,331,332,333,334,335,336,337,340,342,347,349,354,355,357,358,359,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,408,409,411,413,414,415,417,418,420,421,422,423,428,429,437,438,439,440,441,442,443,444,446,447,448,450,452,455,457,458,461,465,467,469,472,473,474,480,481],dependend:6,depflag:12,dephas:[450,469],depos:216,deposit:[],deprec:282,depth:[51,143,189,318,388,422],dequidt:9,der:[87,107,375,376,405,420,421,447,475],deriv:[6,7,8,38,56,63,87,140,158,184,203,213,215,226,234,247,250,252,253,254,255,256,272,278,282,286,315,316,318,323,324,327,353,355,363,367,375,380,385,386,390,399,403,404,408,420,421,437,439,447,475],derjagin:447,derlet:272,descend:190,descent:[7,353],descib:[40,282],describ:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,38,39,40,41,42,56,62,63,68,70,71,73,88,110,113,116,118,130,140,141,143,144,148,149,152,155,157,158,162,163,164,166,167,176,181,184,187,188,193,194,195,202,203,204,205,206,207,209,212,213,214,215,216,218,219,227,228,231,232,233,234,235,236,237,239,240,241,245,249,250,251,254,261,269,272,274,279,280,281,282,283,284,291,295,303,306,307,308,309,310,311,312,313,314,315,316,321,323,324,326,331,346,347,349,352,353,354,355,356,360,363,364,366,368,369,370,372,373,374,375,376,377,380,383,385,386,388,389,390,392,397,398,399,400,401,402,403,404,405,406,407,408,411,417,418,419,420,421,422,423,428,429,436,437,438,439,440,441,442,443,446,447,448,450,452,453,455,456,458,459,465,468,469,472,480,481,482],descript:[],descriptor:[140,187,393],deserno:347,design:[0,3,6,7,8,9,11,13,14,15,17,118,146,149,163,199,212,218,219,250,251,272,273,292,313,318,364,365,366,369,372,377,379,385,405,406,407,409,410,418,421,439,464],desir:[2,3,6,7,11,12,14,15,16,18,33,40,50,59,71,88,91,112,117,141,146,164,177,186,200,202,207,213,215,224,226,227,234,235,236,240,250,268,276,277,278,279,282,286,291,294,306,309,310,311,312,317,324,338,343,346,347,349,352,354,355,356,381,383,391,406,407,438,440,442,451,452,453,455,459,464,469,470,472,473,480,481,482],desk:7,desktop:[4,6,7,10,12,17,189],despit:475,destabil:367,destre:340,destroi:[11,39,210,211],detail:[1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,22,37,40,41,42,55,63,66,67,68,71,75,78,90,91,93,102,104,106,107,109,111,112,114,117,119,140,141,142,143,144,147,157,158,159,161,164,165,168,169,172,183,187,189,190,193,194,195,199,202,203,204,205,207,209,211,212,213,214,215,216,224,226,227,228,229,231,232,234,236,237,241,247,248,249,250,251,252,253,254,255,256,260,262,267,268,269,270,273,276,277,278,280,281,283,284,285,291,294,306,309,310,311,312,313,314,316,317,318,319,320,321,322,329,331,333,341,346,347,350,354,355,357,358,361,362,363,364,366,367,369,371,372,373,374,375,376,377,380,381,385,386,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,411,412,417,420,421,422,428,429,437,444,446,447,453,455,456,457,458,460,461,464,465,467,470,473,480,481,484],detect:[2,3,12,61,63,86,225,277,317,356,376,391,396,450,452,455,466,469,480],determ:361,determin:[1,3,6,8,12,15,39,40,42,51,57,58,59,61,62,68,71,87,102,107,109,112,118,119,127,141,152,153,162,163,164,186,187,189,190,191,192,196,197,198,201,202,203,204,205,206,207,208,209,213,215,216,219,221,226,229,230,232,234,235,240,245,247,248,250,255,256,267,268,270,272,274,278,281,288,289,290,291,292,293,296,298,300,306,309,310,311,313,319,320,323,324,325,326,327,328,329,341,346,347,349,355,357,358,361,363,364,371,376,380,382,383,387,389,392,393,401,408,412,421,422,436,439,443,447,452,455,456,458,460,462,465,469,471,472,479,480,481],detil:108,devan:[9,423],devanathan:442,develop:[0,3,5,6,7,8,9,11,12,14,15,16,17,18,19,42,231,254,276,281,282,285,363,367,385,410,457],devemi:9,deviat:[248,254,272,387],deviator:9,devic:[1,3,12,15,17,231,361],device_typ:361,devin:[283,376],devis:410,dfactor:189,dff:475,dfft_fftw2:12,dfft_fftw3:12,dfft_fftw:12,dfft_none:12,dfft_singl:[3,12,347],dfft_xxx:12,dfftw:12,dfftw_size:12,dft:[9,285],dhi:[59,186,215,277],dhug:[248,281],dhugoniot:[248,281],dia:408,diagnost:[],diagon:[3,6,83,140,141,213,250,278,291,321,425,427],diagonalstyl:428,diagram:[41,118,163,183,209,274],diallo:391,diam:[189,190,277,355],diamet:[3,6,40,113,164,187,189,190,194,195,234,277,291,306,322,324,355,375,388,389,395,399,422,444,447,455,456,465],diamond:[349,385,408],diamter:[40,277],dick:6,dicsuss:247,dictat:[200,248],did:[3,12,354,381,382,383,389,412,440,442,463],didn:3,die:18,diel:[],dielectr:[],diff:[3,6,12,160,320,346],differ:[1,2,3,4,6,7,8,9,10,11,12,14,15,16,17,18,22,37,38,39,41,42,54,55,56,61,64,68,70,71,87,94,96,97,120,140,142,143,144,145,147,150,151,152,153,154,156,157,158,164,165,167,172,183,184,186,187,189,190,193,195,198,200,202,204,209,210,211,212,213,214,215,219,225,226,227,228,229,230,231,234,235,237,247,250,251,252,253,255,256,258,260,263,265,266,267,270,272,274,276,278,281,282,283,286,289,291,294,295,303,304,306,309,310,311,314,315,316,318,321,322,323,324,327,331,332,341,343,345,346,347,349,350,352,353,355,356,358,359,360,361,362,363,367,371,372,374,375,376,381,383,385,388,389,390,392,395,397,398,400,401,408,409,410,411,412,414,418,420,421,422,423,424,425,427,428,429,437,438,439,440,442,444,447,448,449,450,452,453,455,457,458,459,460,463,464,465,467,469,470,472,473,475,479,480,481,482],differenti:[1,3,6,29,184,346,377,418,441],difficult:[213,274,361,391,464],difficulti:[294,420],diffract:[],diffus:[],digit:[2,3,190,331],dih_table1:184,dih_table2:184,dihedr:[],dihedral_coeff:[],dihedral_cosineshift:27,dihedral_styl:[],dihedralcoeff:3,dihedraltyp:211,dihydrid:385,dij:294,dilat:[],dim1:3,dim2:3,dim:[3,59,71,142,145,146,147,150,151,152,153,154,156,164,186,205,215,232,324,349,408,458,479,480,481],dimdim:480,dimems:273,dimens:[],dimension:[3,39,112,118,140,142,144,145,146,147,150,151,152,153,154,156,163,185,202,205,249,273,318,349,352,356,418,455,465],dimensionless:[105,121,122,124,127,129,131,136,140,318,347,428,447],dimentionless:135,dimer:[6,291,408],dimgrai:190,dimstr:[41,209],dinola:[278,309],dintel_offload_noaffin:16,dipol:[],dipolar:[4,29,40,187,308,475],dir1:466,dir2:466,dir:[1,3,4,8,11,12,248,272,281,305,418,420,421,453,466,480],dirac:140,direc:418,direct:[],directli:[3,6,8,9,11,12,87,113,140,187,188,189,196,221,228,232,237,273,292,310,322,324,325,326,327,349,353,361,362,363,368,370,371,377,380,383,385,397,401,412,415,423,436,453,465,466,467,473,480],directoi:14,directori:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,60,191,214,233,276,282,285,302,306,315,316,356,360,362,363,367,374,376,377,383,384,386,393,394,405,408,409,410,414,418,419,420,421,428,438,440,441,442,453,455,456,457,466,480],disabl:[3,12,16,318,396,453,468],disadvantag:[6,209],disallow:[187,215,250],disappear:457,discard:[2,3,41,71,205,209,319,327,452,457,458],discontinu:[9,184,354,403],discourag:408,discov:[13,319],discret:[6,8,40,42,189,190,234,237],discuss:[],disk:[6,84,85,157,185,216,226,277,453],disloc:70,disord:[39,70],disp:[],dispar:422,disperion:[380,401],dispers:[3,6,7,9,162,273,346,347,371,380,401,406,412,421,439],displac:[],displace_atom:[],displace_box:59,displacemet:458,displai:[11,13,22,37,44,55,172,183,187,189,333,341,374,437],dispters:3,dissip:[6,227,234,273,315,316,369,381,389,406,407,437],dissolut:210,dist:[6,69,91,108,117,187,274,290,382,436,450,481],distanc:[3,6,7,9,12,20,21,29,39,43,45,46,47,48,49,51,53,54,55,56,58,59,61,63,64,66,69,71,72,73,74,75,76,77,81,86,89,90,93,103,104,105,106,108,114,115,116,117,118,120,134,140,153,159,162,164,165,166,167,171,186,187,189,190,198,202,205,206,210,211,212,213,215,216,217,220,226,232,237,247,248,249,250,254,262,272,273,277,281,282,289,290,291,294,295,299,303,304,305,306,313,314,316,317,318,321,323,324,325,326,327,328,332,346,347,349,352,354,356,357,358,361,364,365,366,367,368,369,370,371,372,373,375,377,378,379,380,381,382,383,384,385,387,388,389,390,391,395,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,415,416,417,418,420,421,422,423,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,450,453,455,458,464,465,469,473,475,479,481],distinct:[6,219,288,346,422],distinguish:[6,86,140,240,385],distort:362,distrbut:362,distribut:[],distro:[111,374,417,418],ditto:[8,11,12,14,15,16,17,18,115,211,453],div:8,divd:117,diverg:[3,12,39,291,316,457,475,482],divid:[3,6,16,41,91,112,117,126,128,141,161,162,172,183,190,202,203,204,209,215,272,314,321,326,346,354,356,386,421,464,472,480],divis:[6,237,367,395,405,452,455,473,480],dl_poli:7,dlambda:158,dlammps_async_imd:231,dlammps_bigbig:[12,39],dlammps_ffmpeg:[3,12,189],dlammps_gzip:[3,12,187,189,317,455,456,460],dlammps_jpeg:[3,12,189],dlammps_longlong_to_long:12,dlammps_memalign:[12,16],dlammps_png:[3,12,189],dlammps_smallbig:12,dlammps_smallsmal:12,dlammps_xdr:[12,187],dlen:465,dlmp_intel_offload:[12,16],dlo:[59,186,215,277],dlvo:[7,375,447],dm_lb:237,dmax:[306,352],dna:7,doc:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,22,37,40,42,55,57,59,63,66,68,75,87,90,93,102,104,105,106,107,109,111,112,114,117,119,141,143,144,157,159,161,164,165,166,172,183,187,188,189,190,191,193,194,195,200,201,202,203,204,205,206,207,216,226,234,235,245,250,251,255,256,260,267,268,269,270,277,280,291,303,306,309,310,311,320,324,327,329,331,333,341,345,354,355,356,361,362,363,366,374,376,377,383,384,386,391,392,394,395,408,409,410,412,414,417,418,419,428,437,438,440,442,444,453,455,456,457,458,460,463,464,465,472,473,480,481,482,483],docuement:422,dodgerblu:190,doe:[0,1,2,3,5,6,7,8,9,11,12,14,15,16,17,18,29,33,38,39,41,50,54,56,59,62,63,67,70,71,87,88,91,104,110,117,118,143,144,147,152,154,158,163,164,165,166,168,170,172,177,183,184,186,187,188,189,190,193,199,200,202,205,208,209,211,212,213,215,219,221,223,226,227,230,232,234,235,237,240,246,250,251,252,253,255,256,267,268,269,270,278,279,280,284,286,289,291,306,309,311,313,314,318,321,322,323,326,327,328,329,334,335,337,338,340,345,346,347,348,349,355,356,357,362,363,364,365,366,367,369,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,392,393,394,395,396,399,400,402,403,404,406,407,408,409,410,412,418,419,420,421,422,424,425,426,427,428,429,430,431,432,433,434,435,436,438,439,440,441,442,443,444,446,447,448,450,451,452,453,455,456,457,458,459,462,463,465,466,467,468,469,472,473,475,480,484],doegenomestolif:7,doesn:[3,7,8,12,164,187,200,205,206,303,355,357,361,363,376,384,394,420,421,438,440,441,442,455,457],dof:[3,8,112,143,144,157,202,291,481],dof_per_atom:[144,202],dof_per_chunk:[144,202],doff:[355,455],doi:[6,214],domain:[3,6,7,12,13,18,39,41,42,58,61,62,71,118,153,163,166,186,188,189,190,193,200,209,213,215,216,230,233,237,250,251,274,286,291,318,323,324,346,347,356,361,382,412,450,452,455,459,472],domin:[1,385,469],don:[0,8,11,12,13,116,167,196,221,235,280,327,408,453,455],donadio:310,done:[1,3,6,7,8,12,14,15,16,17,18,19,38,39,41,56,59,62,71,158,161,164,167,184,187,189,190,199,200,202,204,205,206,207,209,210,211,212,213,215,216,224,226,231,232,234,235,242,250,255,256,267,268,270,271,273,274,275,280,288,291,292,294,306,309,310,311,313,315,316,329,331,345,346,347,354,356,357,360,361,363,371,383,392,393,394,401,407,408,412,420,436,439,444,450,451,452,453,456,459,460,463,473,475,480,481],donor:391,dot:[141,160,196,221,229,249],doti:[367,418],doubl:[1,2,3,6,8,9,11,12,14,15,16,17,39,87,215,224,279,327,331,345,347,360,361,367,386,390,420,421,451,455,459,463,468,480,481],dover:199,down:[3,6,7,8,11,39,71,213,234,306,322,361,385,412,454],downhil:[352,353],download:[5,7,8,9,11,12,13,17,231,393,419],downsid:6,downward:288,dozen:[8,12,107,193,420,421],dpack_arrai:12,dpack_memcpi:12,dpack_point:12,dpd:[],dpde:243,dproduct:364,dr_ewald:[118,292],drag:[],dragforc:237,drai:[248,281],drain:[230,322,354],dramat:[59,186,210,211,212,213,215,250,306,309,310,347,361,412,452],drautz:367,draw:189,drawback:280,drawn:[187,189,190,227,450],drayleigh:[248,281],dreid:[],drfourth:105,drho:[113,362,383],drift:[6,103,105,227,228,234,235,246,289,306,464,472,475],drive:[11,12,197,213,215,229,250,272,278,291,325,356],driven:[6,176],driver:[6,12,14,15,193,224,231],drop:[3,190,381],droplet:392,drsquar:105,drude:[],dry:223,dsecriptor:393,dsf:[],dsmc:[],dstyle:277,dt_collis:237,dt_lb:237,dt_md:237,dt_srd:306,dtilt:[59,215],dtneb:469,dtqm:281,dtype:[115,211],dual:[17,306,361],dudarev:163,due:[1,3,6,9,10,12,16,17,19,40,54,57,58,61,66,70,71,74,75,81,86,88,89,90,93,102,103,104,105,106,110,116,118,126,140,141,142,143,145,147,150,151,152,153,154,156,157,159,163,164,167,168,187,189,193,196,197,204,208,210,211,212,213,214,215,216,221,222,223,224,227,228,231,232,234,235,236,237,240,241,242,246,247,248,249,250,254,262,272,275,277,289,290,291,293,303,305,306,307,309,310,311,312,313,315,316,318,322,323,325,326,327,329,347,352,354,356,357,358,378,381,383,387,388,392,406,407,412,418,420,422,423,436,439,440,442,445,447,448,450,452,455,456,457,464,469,472,473,475,480,481],duffi:318,duin:[9,282,287,420,421],duke:347,dummi:[12,29,441],dump1:460,dump2:460,dump2vtk_tri:134,dump:[],dump_atom:8,dump_custom:8,dump_h5md:188,dump_modifi:[],dumpcustom:8,dumptimestep:460,dunbrack:[6,20,170,372,467],dunweg:[234,236],duplic:[2,3,14,15,16,17,18,19,41,42,165,209,228,272,455,479],dupont:[5,7,13],durat:[37,55,142,143,145,146,147,149,150,151,152,153,156,157,183,190,202,226,286,318,341,389,437],dure:[2,3,6,8,9,12,16,17,38,39,41,56,71,87,126,128,146,165,168,184,187,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,217,220,221,222,223,224,225,226,227,228,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,246,247,249,250,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,299,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,347,354,356,360,361,381,405,412,421,439,450,451,453,455,458,460,462,463,465,467,469,470,473,480,483,484],dvector:8,dvlo:447,dvx:6,dx_lb:237,dy3:163,dyamic:12,dyanam:6,dyanmic:469,dynam:[],dynamo:[5,362,383,408],dyne:479,dyre:402,dysam:458,e28637:29,e_1:367,e_2:367,e_b:386,e_e:385,e_hbond:391,e_i:[6,367,386],e_j:[6,367],e_k:[367,385],e_kl:6,e_lj:[363,380],e_n:[367,385],e_nn:385,e_pr:385,e_rebo:363,e_tors:363,eaa:332,eaat:171,each:[0,1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,57,59,61,62,63,64,66,67,68,70,71,72,73,74,75,76,77,78,80,81,83,85,87,89,90,93,94,95,96,97,98,99,100,101,102,103,104,105,106,109,110,111,112,113,114,115,116,117,118,119,120,134,140,141,143,144,145,146,147,148,151,152,153,154,156,157,158,159,160,161,162,163,164,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,192,193,194,195,196,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,226,227,228,229,230,231,232,233,234,235,236,237,238,240,241,242,243,244,246,247,248,249,250,252,253,254,255,256,257,258,259,260,262,263,264,265,266,267,268,269,270,272,273,274,275,276,277,278,279,280,282,283,284,286,288,291,292,293,294,295,299,300,302,303,304,305,306,307,308,309,310,311,313,316,317,318,319,320,321,322,323,324,326,327,328,329,331,332,334,335,336,337,338,340,341,342,345,346,347,349,353,354,355,356,357,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,385,386,387,388,389,390,391,392,395,396,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,414,415,417,418,420,421,422,423,424,428,429,430,431,432,433,434,435,436,437,438,439,442,443,444,445,446,447,448,449,450,452,453,455,456,457,458,459,460,462,463,464,465,467,469,470,472,473,475,479,480,481,482,484],eacn:[41,209],eam0d:273,eam3d:273,eam:[],eam_databas:13,eam_gener:13,eangl:473,earli:[41,202,204,205,206,207,209,285,292],earlier:[7,8,12,59,190,356,389,408,412,469],earliest:469,earth:385,easi:[6,7,8,9,11,13,87,141,187,194,195,196,197,205,208,221,229,230,232,234,235,293,300,309,310,311,323,326,328,355,455,458,463,465,481],easier:[8,9,13,16,187,189,273],easili:[8,11,189,190,322,356,452,462,471,480],eastwood:[346,347],eat:171,eatom:329,eaxmpl:6,eba:21,ebb13:171,ebb:21,ebond:[219,235,472,473],ebt:171,ec_ii:408,ec_ij:408,ec_jj:408,echo:[],eco:[420,421],ecoa:[420,421],ecoul:[107,219,235,420,421,473],ecp:[385,455],edg:[2,3,6,41,59,71,118,162,163,166,167,188,189,198,205,232,293,323,326,327,328,329,349,455,458,465],edge_histo:162,edge_threshold:162,edih:473,edim:314,edip:[],edit:[3,8,12,13,14,15,16,17,18,19,475],editor:13,edu:[7,9,11,13,383,406,417,420,421],edward:[9,17],eebt:171,eff:[],effect:[1,2,3,6,8,9,11,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,66,71,74,75,81,89,90,93,103,104,105,106,109,112,141,142,146,151,152,159,162,168,170,171,173,174,175,176,178,179,181,182,183,184,186,187,189,190,194,195,196,199,203,206,207,208,210,211,212,213,215,216,222,225,227,228,229,230,231,232,234,235,249,250,252,253,254,255,256,257,265,267,268,270,271,272,274,277,278,280,281,282,283,286,290,291,293,294,305,306,309,310,311,313,314,316,318,321,322,323,324,325,327,328,329,332,334,335,336,337,340,342,346,347,349,353,354,355,356,357,362,363,365,367,368,369,370,371,372,373,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,412,413,414,415,417,422,423,424,426,429,437,438,439,440,441,442,444,446,447,448,450,452,453,457,458,460,464,465,467,473,479,480,482],efffect:459,efficaci:39,effici:[0,1,3,6,7,8,10,12,15,17,18,39,58,61,67,112,187,188,189,190,213,215,219,228,250,274,276,286,291,294,306,346,347,352,357,361,367,375,377,392,397,401,422,462,484],effort:[5,7,456],efftemp:[96,97,150],efi:[420,421],efield:[],eflux:230,eggebrecht:377,ehb:[420,421],eigensolv:3,eigenvalu:[273,274,346],eigtol:3,eik:158,eim:[],eimp:473,einstein:[286,316],either:[1,2,3,4,6,8,9,11,12,14,15,16,17,22,33,41,44,50,59,63,71,107,113,116,118,140,141,144,146,147,163,164,167,172,177,184,187,188,189,190,193,201,203,204,206,207,209,212,213,214,215,216,226,232,233,237,241,247,248,250,251,254,268,272,288,291,293,294,295,303,306,313,320,324,327,331,333,344,346,347,349,353,354,358,361,367,369,375,383,392,393,395,406,407,408,412,416,418,440,442,444,450,453,455,457,458,459,462,464,467,470,472,480],ejtehadi:[375,388,422],elaplong:[194,195,232,458,473,480],elaps:[3,194,195,196,197,208,215,221,229,230,232,234,235,247,277,293,300,309,310,311,323,324,326,328,429,450,458,460,461,465,469,473,480],elast:[],elba:29,electr:[6,193,199,221,235,346,347,386,420,421,448,475,479],electrolyt:[9,447],electron:[3,6,7,9,13,40,96,97,113,118,148,150,155,193,199,218,219,235,236,251,261,269,284,312,318,353,355,362,364,376,380,383,385,386,408,418,419,442,448,455,475,479],electron_integr:199,electron_temperatur:199,electron_unit:385,electroneg:[6,282,283,284,376,386],electronic_dens:3,electronic_specific_heat:3,electronic_thermal_conduct:3,electrostat:[6,9,16,18,200,226,282,284,285,319,346,347,375,380,385,397,405,407,421,447],eleftheri:291,elem1:[386,408,428],elem2:[386,408,428],element1:[288,362,383],element2:[288,362,383],element:[3,6,7,8,13,63,81,89,103,105,112,117,119,134,140,141,142,143,144,145,146,147,151,152,153,154,156,157,160,187,188,189,190,191,193,199,203,204,207,273,288,313,320,362,363,367,376,383,384,385,386,392,393,394,408,409,410,414,418,419,420,421,428,438,440,441,442,475,480,483],elementn:[362,383],elementset:199,elev:469,elif:[140,331],elig:[3,200,210,211,223,226,391],elimin:[3,6,71,227,234,235,291,294,315,316,450],elj:380,ellad:9,elliot:9,elliott:9,ellips:[4,6,9,82,143,185],ellipsoid:[3,4,6,7,13,40,42,82,113,130,143,164,185,187,234,252,255,258,259,267,291,306,351,354,388,407,422,437,455,465,482],ellipsoidflag:455,elong:[219,235,473],elp:[420,421],els:[3,7,8,12,71,107,116,117,119,188,189,201,202,203,204,205,206,207,226,250,291,306,318,319,320,329,331,346,392,454,466,480,483],elsewher:[8,247,306,408,419,420,421,467,473,480],elt:408,emac:[],email:[0,3,5,7,8,11,386],emb:[3,9,327],emb_lin_neg:408,embed:[3,5,7,11,12,13,29,88,162,318,362,383,386,405,408,409,410,418,437,445,453],embt:171,emi:[7,9],emol:[420,421,473],emphas:389,empir:[199,310,363,385],emploi:[9,273,286,441],empti:[3,57,71,166,291,346,357,396,455,466,467,480],enabl:[3,6,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,43,45,46,47,48,49,50,51,53,54,55,56,60,61,62,64,67,78,80,83,87,96,97,98,99,100,101,105,109,111,112,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,146,148,150,151,155,156,158,162,170,171,173,174,175,176,177,178,179,181,182,183,184,187,188,190,191,193,194,195,196,197,198,200,206,208,210,211,212,214,216,221,222,223,224,225,226,227,228,229,231,232,233,234,235,236,237,238,239,240,241,243,244,246,248,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,272,273,274,276,277,281,282,283,284,285,286,287,288,290,291,293,294,295,296,297,298,299,300,302,303,305,306,309,311,312,313,314,315,316,318,319,321,322,323,324,325,327,330,332,334,335,336,337,338,340,341,342,347,354,356,360,361,362,363,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,453,456,457,462,464,480,484],enclos:[2,6,12,166,187,279,331,408,451,453,463,480],encod:[13,39,42,187,189,190,280,392],encompass:[3,6,40,57,59,116,165,302,320,437,458],encount:[3,8,12,59,204,360,460,480],encourag:[7,8,285,304],end12i:113,end12x:113,end12z:113,end1i:113,end1x:113,end1z:113,end2i:113,end2x:113,end2z:113,end:[1,2,3,5,6,8,11,12,15,16,17,18,19,38,40,41,57,59,71,113,167,168,171,186,187,189,190,191,194,195,203,204,206,207,212,215,219,227,232,234,235,236,249,250,251,262,278,290,291,295,306,309,310,311,312,314,317,318,321,325,328,329,345,346,355,356,360,361,381,383,388,422,425,427,428,429,443,445,450,453,455,456,457,458,460,462,463,467,471,473,475,480,484],end_of_step:8,endbondtors:[3,171,177,455],endif:8,energet:[212,363,421],energi:[0,1,2,3,4,5,6,7,8,9,12,13,20,21,23,24,25,26,27,28,29,30,31,32,35,36,38,40,43,45,46,47,48,49,51,53,54,56,63,65,69,82,83,84,85,86,87,88,91,94,95,96,97,98,99,101,102,107,108,109,110,112,123,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,164,168,170,171,172,173,174,175,176,178,179,181,182,183,184,187,190,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,332,334,335,336,337,340,342,346,347,352,353,354,356,357,361,362,363,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,417,418,420,421,422,423,428,429,430,431,436,437,438,439,440,441,442,444,445,446,447,448,450,453,455,460,464,465,467,469,471,472,473,475,479,480,483],energy_update_freq:421,enforc:[6,57,58,104,186,187,188,189,191,193,200,212,215,250,271,273,283,291,294,331,346,397,452,480,481],enforce2d:[],eng:[11,65,69,108,187,224,329,331,376,410],eng_previ:331,engin:[199,215,276,295,315,383,409],engr:[420,421],enhanc:[195,199,450],enlarg:[59,189],enough:[3,40,61,86,164,165,167,209,235,277,281,286,291,319,323,324,327,357,361,377,416,455,459,460],enpub:383,ensembl:[],ensight:6,ensur:[3,6,140,187,200,213,226,227,250,296,317,347,367,382,405,436,438],enter:[57,154,386,469],enthalpi:[123,252,253,383,472,473,480],entir:[0,2,3,6,11,14,15,41,42,63,88,109,110,112,116,118,141,144,163,164,190,193,194,195,202,205,206,209,212,214,223,226,227,230,234,235,246,250,252,253,254,255,256,272,274,276,289,291,304,318,320,331,361,380,401,412,439,455,463,464],entireti:[395,444],entiti:[6,8,40,42,187,291],entri:[3,8,38,42,56,65,69,79,92,108,115,118,127,130,131,132,133,134,136,137,138,162,184,190,204,205,206,214,281,329,355,367,384,408,414,421,428,438,439,440,441,442],entropi:469,entry1:[38,56,190,374,439],entry2:190,entryn:190,enumer:[165,187],enumuer:6,env:361,environ:[1,3,6,11,12,16,17,18,189,228,233,272,361,362,367,374,376,384,385,418,440,452,466,480],epair:[107,190,387,391,420,421,473],epen:[420,421],epfl:[228,233],epp:380,epq:380,eps0:447,eps14:405,epsilon0:442,epsilon:[3,6,36,45,46,50,53,54,87,170,194,195,226,291,306,323,327,352,354,366,372,373,375,377,378,379,380,388,390,391,392,395,396,397,398,399,400,401,402,403,404,405,411,415,422,423,432,438,444,446,447,464,475,479],epsilon_0:448,epsilon_14:372,epsilon_:422,epsilon_d:378,epsilon_i:[388,412,422],epsilon_i_:422,epsilon_i_a:[388,422],epsilon_i_b:[388,422],epsilon_i_c:[388,422],epsilon_ij:412,epsilon_j:[388,412,422],epsilon_j_:422,epsilon_j_a:[388,422],epsilon_j_b:[388,422],epsilon_j_c:[388,422],epsilon_lj:422,epton:417,eqch:159,eqeq:[420,421],eqp:380,eqq:380,equal:[2,3,6,8,11,12,17,39,41,54,63,65,68,69,76,79,86,87,91,92,108,110,115,117,119,141,143,158,160,164,189,190,193,194,195,196,197,200,203,204,207,208,209,213,215,216,221,226,227,229,230,232,234,235,237,240,241,247,248,254,264,272,274,277,279,281,282,283,286,288,290,291,293,295,300,302,309,310,311,314,315,316,318,320,321,323,326,328,329,331,345,354,356,357,358,360,361,376,381,387,388,391,406,411,418,420,421,422,424,425,426,428,429,439,444,448,451,452,453,455,457,458,462,463,466,469,471,473,480,481],equat:[3,6,7,8,9,91,112,118,163,172,183,193,213,219,220,228,234,235,237,240,248,249,250,251,254,268,272,274,281,282,286,294,306,314,318,321,323,324,326,328,340,346,347,375,380,381,385,386,389,394,406,407,408,412,422,425,427,431,432,434,435,443,448,475],equi:251,equidist:249,equil:[3,282,350,462,484],equilater:465,equilibr:[3,4,5,6,7,9,59,91,164,193,200,203,212,213,226,248,250,251,268,269,281,282,283,284,314,315,316,321,376,377,420,421,451,465],equilibria:321,equilibribum:[210,211],equilibrium:[1,3,4,6,7,21,24,26,27,28,29,32,35,36,38,43,47,48,49,51,53,56,59,147,148,171,173,213,215,226,227,228,235,237,250,254,268,281,286,290,294,295,303,306,313,314,316,321,332,334,337,340,376,408,414,475],equilibrium_angl:8,equilibrium_dist:8,equilibrium_start:199,equival:[6,12,13,59,124,125,133,138,162,166,190,204,207,213,215,226,234,250,268,278,290,291,326,381,385,440,442,455,458,463,464,473,475],equlibrium:6,equliibr:[282,284],er3:163,eradiu:[40,113,385,455],eras:[293,315],erat:[215,407],erc:377,erfc:[377,397,412],erforc:113,erg:479,erhart:[200,383,440,442],ermscal:364,ernst:9,eror:3,eros:408,erose_form:408,erot:[],errata:[440,442],erratum:323,erron:3,error:[],erta:389,ervel:[113,455],escap:[216,475],especi:[8,11,16,152,164,193,200,209,226,281,286,289,290,361,452],espresso:[9,285],essenti:[8,11,12,27,88,128,145,146,147,150,151,152,153,154,156,173,203,254,273,322,347,363,377,397,442,460,473],essex:29,establish:[87,230],estim:[1,3,6,10,12,38,41,56,91,141,199,209,220,248,306,313,346,347,352,412,421,439,469,473],esu:479,esub:408,eta:[6,237,250,281,282,284,322,384,386,388,418,441,479],eta_dot:250,eta_ij:418,eta_ji:386,etag:[40,455],etail:473,etap:250,etap_dot:250,etc:[1,2,3,6,7,8,9,10,11,12,13,15,16,17,39,40,42,54,61,68,89,90,91,94,109,110,113,115,141,142,144,145,146,147,148,150,151,152,153,154,156,158,164,166,167,168,177,187,189,190,193,199,200,201,202,204,205,206,207,210,211,215,216,224,226,227,234,250,277,288,292,318,319,327,331,345,346,354,355,356,357,359,383,384,392,405,407,416,420,421,438,440,442,450,453,455,456,457,462,464,465,469,471,472,473,475,479,480,482,484],ethernet:18,etol:[354,356,450,469],etot0:281,etot:[6,94,96,97,110,141,150,190,219,235,248,281,472,473],eu2:163,eu3:163,euler:[354,356],eulerian:199,euqat:430,europhi:237,evalu:[2,3,11,12,38,56,71,87,88,91,107,117,140,144,154,162,164,187,189,190,194,195,196,197,199,201,202,203,204,205,206,207,208,215,221,227,229,230,232,233,234,235,273,279,282,293,296,300,309,310,311,320,323,326,328,329,331,346,347,352,354,361,412,418,424,426,439,450,451,453,457,458,460,462,463,464,465,469,471,473,480,481],evalut:[331,453],evan:[152,268],evanseck:[6,20,170,372,467],evapor:[],evaul:[8,354],evdwl:[107,420,421,473],even:[3,6,8,12,15,16,17,18,34,39,41,52,57,59,61,63,70,71,119,165,166,180,184,187,190,193,194,195,200,201,202,204,205,206,207,209,210,211,213,215,216,219,232,235,248,250,251,273,286,288,291,292,302,306,314,318,321,323,327,329,339,346,352,354,356,361,366,385,386,389,392,412,422,445,455,456,458,460,461,462,464,465,467,470,472,473,475,484],evenli:[3,41,141,184,209,237,395,445,455],event:[],eventu:[3,6,12,15,166,282,469],ever:[54,56,233,306],evera:[375,388,422,437],everi:[0,1,2,3,6,8,11,12,15,16,39,41,71,72,91,113,119,128,152,167,187,188,189,190,191,193,194,195,196,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,220,223,224,226,228,230,231,232,237,238,246,250,251,254,271,272,273,277,278,279,280,281,282,283,284,286,288,289,291,292,294,295,306,308,309,310,311,312,313,314,317,318,319,320,321,329,331,345,347,356,357,358,361,381,382,392,405,420,421,433,449,450,451,455,457,459,460,462,463,464,469,470,471,473,480,484],everyth:[8,107],everywher:[116,399],eviri:385,evolut:[228,237,274,450],evolv:[237,274,319],ewald:[2,3,5,6,7,8,12,88,110,118,141,319,346,347,354,368,370,371,377,380,385,397,401,415,423,437,439,457],ewald_disp:380,ewalddisp:3,exact:[22,41,44,71,122,158,167,172,209,212,227,228,234,235,236,277,286,287,306,318,333,346,374,457,462,469,482,484],exactli:[3,6,12,14,17,38,41,56,59,71,91,143,148,155,164,184,194,195,204,209,215,220,227,234,235,236,251,261,262,269,273,281,306,311,312,325,361,374,381,383,389,392,395,406,412,439,457,458,465,469,480],exager:475,examin:[6,8,9,212,273],examp:[453,480],exampl:[],exce:[3,6,16,17,18,41,58,71,166,202,205,206,209,213,215,220,223,250,273,297,298,306,354,361,455,480],exceed:[3,41,59,209,215,250,306,463],excel:385,except:[1,2,5,6,8,11,14,16,20,21,22,23,24,25,26,27,28,29,30,31,32,35,37,38,40,41,43,44,45,46,47,48,49,51,53,54,55,56,59,60,71,89,90,108,109,112,117,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,164,168,170,171,172,173,174,175,176,178,179,181,182,183,184,186,187,190,193,196,202,203,204,208,209,213,215,222,225,226,229,232,234,236,250,251,252,253,254,255,256,257,261,262,265,267,268,269,270,274,283,284,291,293,294,303,306,309,311,312,318,322,329,331,332,333,334,335,336,337,340,341,342,346,347,349,351,355,356,357,359,360,361,362,363,365,368,369,370,371,372,373,374,375,376,377,379,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,409,413,414,415,417,420,421,422,423,429,437,438,439,440,441,442,444,446,447,448,450,452,453,455,457,458,460,463,464,465,466,467,469,473,475,479,480,481,483],excess:385,exchang:[2,3,6,8,9,61,62,193,199,200,226,234,283,291,314,318,321,346,361,385,470],exchange:346,excit:[9,385],exclud:[3,6,9,12,16,17,63,71,112,140,144,151,152,168,187,202,205,210,211,238,246,276,289,291,313,324,329,354,355,357,369,389,392,406,407,412,436,467],exclus:[1,3,9,12,16,87,361,376,412,464],excurs:450,exectubl:12,execut:[1,2,3,4,6,8,11,12,17,60,165,189,231,285,331,345,348,360,451,453,463,466,469,480],exemplari:227,exemplifi:385,exert:[6,232,235,286,325,326,327,347],exhaust:[199,360,480],exhibit:[250,353,385,464],exist:[3,6,7,8,11,12,13,37,55,59,68,70,122,164,165,183,188,189,190,193,198,208,211,213,216,226,276,277,279,329,332,334,335,337,341,350,355,361,392,420,445,451,453,455,456,457,466,467,468,480,481,482],exit:[2,3,11,12,41,57,187,209,345,360,453,454,463,472,480],exlanatori:3,exp:[],expand:[],expans:[12,140,187,466],expect:[1,3,8,12,13,14,15,16,17,18,19,41,42,71,102,145,156,162,184,209,221,226,228,247,272,278,280,281,286,291,329,347,357,374,408,412,450,453,455,457,460,464,469,480],expens:[6,10,71,190,272,276,291,318,329,346,347,357,361,453],experi:[6,13,15,17,208,216,231,240,249,278,290,291,352,356,381,412,464,469],experienc:[6,12,239,240],experiment:[346,361,469],expert:12,expertis:7,explain:[1,3,6,8,11,12,16,18,41,59,63,65,68,69,71,72,73,76,77,79,86,92,144,152,184,187,189,190,193,202,203,207,209,211,213,215,250,272,280,291,303,329,331,345,346,349,355,356,360,366,383,395,429,444,448,453,456,457,460,462,465,475,480,484],explan:[3,6,59,113,140,187,202,249,272,392,449,452,453,455,464],explanatori:[3,8,117,187,201,202,204,205,206,291,355,452,480],explantori:[3,287],explic:411,explicit:[6,9,11,22,44,77,87,113,116,158,172,194,195,215,297,298,333,351,363,364,367,372,374,383,385,396,406,443,449,452,456,459],explicitli:[3,6,8,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,71,109,112,142,151,154,162,164,170,171,173,174,175,176,178,179,181,182,184,187,190,196,205,208,215,222,225,227,229,234,250,252,253,254,255,256,257,265,267,268,270,280,281,283,291,293,294,309,311,312,318,322,332,334,335,336,337,340,342,355,361,362,363,365,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,386,387,388,389,390,391,392,395,396,397,398,399,400,401,402,403,404,405,406,409,412,413,414,415,417,422,423,429,430,431,432,433,434,435,437,438,439,440,441,442,443,444,446,447,448,455,457,464,465,467,468,475],explictli:[16,468],exploit:[9,15,17,274],explor:[118,163],expon:[3,282,284,383,388,391,405,411,423],exponenti:[87,418,438,448,469,480],expos:11,exposit:[199,381,382],express:[6,140,150,164,194,195,213,247,272,282,318,324,331,367,383,385,399,408,428,437,480],expressiont:367,extend:[],extens:[3,6,9,17,44,45,46,53,55,63,82,83,84,87,88,91,94,97,98,107,109,117,119,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,193,196,197,200,207,208,214,217,221,224,225,226,228,229,230,232,234,236,248,250,254,262,272,273,289,290,291,293,295,300,303,305,309,310,311,312,313,315,316,318,320,323,327,328,388,408,421,422,428,472,473],extent:[1,3,41,45,57,71,162,166,187,198,205,209,232,325,328,346,349,363,424,426,439,452,455,458],exterior:[3,6,327],extern:[],extra:[3,6,8,12,16,17,40,41,46,61,71,102,109,110,112,118,141,142,143,145,147,150,151,152,153,154,156,157,163,164,165,166,170,190,204,209,211,250,279,280,281,291,306,354,355,358,359,380,389,392,395,408,412,452,453,455,458,467,475,480],extract:[3,6,11,13,36,63,87,107,115,117,119,194,195,284,356,377,386,408,428,453,460,472],extract_atom:11,extract_comput:[11,453],extract_fix:11,extract_glob:11,extract_vari:11,extramak:[12,15],extrapol:1,extrem:[1,3,6,17,58,189,213,215,250,316,385,441,475],extrema:405,extrins:199,f77:[5,7,12],f90:[5,7,12],f_1:6,f_5:[160,320],f_a:[440,441,442],f_ave:117,f_c:441,f_f:442,f_fix_id:281,f_harm:316,f_i:418,f_id:[6,71,117,119,187,193,201,202,203,204,205,206,207,245,308,320,473,480],f_ij:418,f_indent:207,f_int:315,f_jj:91,f_k:418,f_langevin:318,f_max:[281,286],f_msst:248,f_r:[235,440,441,442],f_sigma:367,f_solid:316,f_ss:6,f_temp:235,face:[3,6,57,59,71,152,162,166,198,205,206,323,325,326,327,328,349,388,408,422,455,458],face_threshold:162,facet:162,facil:[0,12],facilit:[6,13],fact:[6,8,16,228,306,316,389,467],factor:[1,3,6,12,18,24,28,32,35,36,39,41,46,47,57,58,59,87,91,102,108,115,118,140,158,163,166,170,181,187,189,190,194,195,203,209,213,215,216,226,231,234,236,237,248,250,251,254,274,278,290,294,296,298,306,310,314,321,322,323,327,337,347,349,361,363,364,367,368,370,372,377,378,379,381,385,389,392,396,397,408,412,414,415,421,423,429,438,443,452,455,458,459,464,467,469,470,473,475,479,480],factori:[3,453],factoriz:346,fail:[3,11,12,59,168,213,216,346,354,356,379,421,453],failur:[121,425],fairli:[11,412,464,469],faken:73,falcon:231,fall:[3,6,190,204,277,453],fals:[86,329,331,480],fame:8,famili:452,familiar:[0,11],fan:418,far:[3,6,12,17,57,59,61,86,187,190,191,209,210,211,213,216,250,272,290,291,306,323,334,337,352,356,357,444,453,455,460,473],farago:234,farrel:[440,442],farther:187,fashion:[6,8,41,71,164,190,193,194,195,200,205,209,211,216,226,228,232,247,248,250,252,253,254,255,256,264,267,268,269,270,280,281,283,291,295,299,305,308,316,318,322,323,324,326,328,356,392,406,458,467,480,483],fasolino:394,fast:[6,7,9,12,13,17,39,187,259,281,319,346,347,369,406,407,437,439,457,462,464,473,481,484],faster:[1,6,9,10,11,12,14,15,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,43,45,46,47,48,49,51,53,54,56,61,63,105,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,187,190,193,196,208,209,222,225,229,233,234,250,252,253,254,255,256,257,265,267,268,270,278,282,283,291,293,294,306,309,311,313,315,318,322,332,334,335,336,337,340,342,346,347,358,359,361,362,363,365,367,368,369,370,371,372,373,374,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,437,438,439,440,441,442,444,446,447,448,450,464,468,475],fastest:[6,14,17,152,205,318,319,361,452],fatal:[3,472],fault:[70,421],faulti:12,fava:388,favor:212,favorit:7,fbmc:313,fcc:[],fcm:[264,480],fdirect:219,fdotr:393,fdti:87,fe2:163,fe3:163,fe_md_boundari:199,featu:8,featur:[],fecr:383,feedback:[7,231],feel:[7,231,232,240,272,327,329,356,412],felling:410,felt:327,femtosecond:479,fene:[],fennel:[377,397],fep:[],ferguson:[6,170,467],fermi:[1,12,15,150,361,442],fermion:[9,385],ferrand:[9,13],few:[1,3,4,5,6,7,10,11,12,13,14,17,18,39,191,201,202,203,204,205,206,207,235,250,277,280,282,294,320,346,354,355,356,363,452,455,460,464,466,480,482],fewer:[1,3,11,15,16,61,240,464],fewest:3,fextern:224,feynman:274,fff:453,ffield:[376,386,420,421],ffmpeg:[3,12,189],ffplai:189,fft:[1,3,7,12,14,15,88,109,110,141,273,346,347,464],fft_inc:[12,347],fft_lib:12,fft_path:12,fftbench:346,fftw2:12,fftw3:12,fftw:[11,12],fhg:[7,9],fictiti:[6,196,197,221,224,228,274,290,377,397,401,436],field1:[456,460],field2:456,field:[],fifth:[303,414],figur:[1,3,8,11,12,281,452,453],fij:380,file0:272,file1:[11,13,272,317,331,355,460,462,466],file2:[11,13,317,331,355,460,462,466],file:[],file_from:188,filenam:[3,12,13,38,41,56,184,187,189,190,191,199,202,203,204,205,206,207,209,214,272,276,279,282,283,284,287,288,291,292,317,318,343,344,345,356,362,363,367,377,383,384,386,394,408,409,410,414,418,419,420,421,428,438,439,440,441,442,451,452,453,456,457,462,466,473,480,482,483,484],filennam:462,filep:[3,187,190,457,462,484],filepo:288,fill:[7,164,189,277,318,349,357,367,421,458],filter:[190,199],final_integr:8,final_integrate_respa:8,finchham:[6,146,379],find:[0,3,4,6,7,8,11,12,13,14,16,38,39,56,61,71,73,87,117,167,184,191,200,212,213,223,226,249,272,278,286,290,352,354,356,357,377,392,397,401,408,437,439,475,480],find_custom:8,fine:[16,17,168,196,221,316,357,361,480],finer:[140,164,480],finest:346,finger:[164,186,247,458],finish:[6,11,41,209,331,343,345,346,358,360,361,444,460,480,481],finit:[],finni:[7,383,437],finvers:219,fiorin:[9,214],fire:[352,353,354,356,469],firebrick:190,first:[0,1,2,3,5,6,8,9,11,12,14,15,16,17,21,38,39,41,42,45,46,54,56,57,59,61,62,71,81,88,91,103,104,105,112,116,117,127,130,133,134,138,141,149,152,158,160,162,163,165,166,167,171,184,187,188,189,190,191,193,200,202,203,204,205,206,207,209,212,215,226,227,232,237,247,248,249,250,272,274,279,280,281,283,288,291,294,295,303,304,306,307,308,315,316,317,318,320,324,329,331,332,338,349,354,355,356,357,360,361,362,363,366,367,368,370,372,374,376,377,383,385,386,389,390,393,394,396,397,401,406,407,408,410,412,414,418,420,421,428,436,438,439,440,441,442,450,451,452,453,455,456,457,460,462,464,467,468,469,472,473,475,480,481,482,484],fischer:[6,9,19,20,170,372,467],fit:[3,6,9,12,38,56,184,290,306,363,367,394,408,412,432,439,441,463,480],five:[73,150,281,355,367,409,455,469],fix:[],fix_adapt:[158,195,405],fix_atom_swap:[],fix_bal:62,fix_deposit:[3,200,277],fix_evapor:200,fix_flux:199,fix_gcmc:[200,355],fix_gl:228,fix_gld:228,fix_grav:277,fix_id:[3,213,248,250,252,253,254,255,256,278,281],fix_modifi:[],fix_mov:[186,324],fix_nh:8,fix_npt:228,fix_nvt:[200,226],fix_poem:[3,6],fix_pour:[3,216],fix_qbmsst:9,fix_qeq:[3,376],fix_rattl:294,fix_reax_bond:420,fix_rigid:[240,366],fix_saed_vtk:292,fix_setforc:8,fix_shak:294,fix_srd:3,fix_styl:254,fix_temp_rescal:312,fixedpoint:[213,250],fixextern:224,fixid:199,fji:380,flag1:[218,359],flag2:[218,359],flag:[3,8,11,12,14,15,16,17,18,40,66,74,75,81,86,89,90,93,103,104,106,118,159,163,167,187,189,190,191,207,212,214,218,231,234,238,240,246,247,273,280,291,303,305,306,313,317,326,329,344,347,355,359,360,361,363,391,396,408,436,450,452,453,455,456,457,459,460,461,465,480],flag_buck:371,flag_coul:[371,380,401],flag_lj:[380,401],flagfld:[369,406,407],flaghi:[3,369,406,407],flaglog:[369,406,407],flagn:218,flagvf:[369,406,407],flat:[6,318,323,324,328],flavor:[2,7,12],fld:[9,323,369,406,407],flen:364,flex_press:364,flexibl:[3,6,8,165,189,202,205,214,228,251,314,321,385,441,473],flip:[3,6,215,250,325,326],floor:480,flop:12,floralwhit:190,flow:[],fluctuat:[6,64,87,213,226,227,234,237,250,254,272,273,316,318,340],fluid:[],fluid_veloc:241,flush:[3,190,472],flux:[],flv:189,fly:[7,9,12,41,189,193,199,216,219,291,294,319,367,473,475],fmackai:9,fmag:217,fmass:274,fmax:[354,473],fmomentum:219,fmsec:[2,190,234,235,247,250,278,291,309,310,464,474,479,481],fname:345,fno:12,fnorm:[354,473],fnpt:219,fnvt:219,foce:392,fock:364,focu:294,fogarti:[9,284,421],foil:[140,272,428],fold:[304,464],folk:7,follow:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,35,36,38,41,42,43,45,46,47,48,49,51,53,54,56,59,63,64,70,71,73,91,96,97,113,116,117,119,140,141,143,144,150,152,157,160,162,164,165,170,173,174,175,176,178,179,181,182,184,187,188,189,190,193,199,200,201,202,203,204,205,206,207,209,214,215,216,219,220,224,226,227,228,231,233,234,235,237,240,248,250,254,255,256,267,268,270,273,274,276,279,280,281,282,284,286,288,290,291,292,294,308,309,310,311,314,315,316,317,318,320,321,329,330,334,335,336,337,340,342,344,349,351,354,355,356,361,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,417,418,419,420,421,422,423,425,427,428,429,430,431,432,433,434,435,436,438,439,440,441,442,443,444,446,447,448,450,452,453,455,456,457,458,460,462,463,464,467,469,470,471,475,480,481,483],foo:[4,8,11,12,187,189,224,453,466,480],foot:6,footprint:[12,361],fopenmp:[12,16,18],forc:[],force_uvm:17,forceatom:240,forcefield:[290,391],forcegroup:237,forcezero:352,ford:380,forestgreen:190,forev:71,forget:[235,475],forgiv:250,fork:[12,187],form:[2,3,6,8,12,16,19,22,44,54,63,66,74,75,77,81,87,89,90,93,103,104,106,116,140,141,158,159,168,172,190,193,194,195,211,227,228,234,236,240,247,268,273,284,286,290,291,318,323,327,332,333,340,351,353,355,356,363,364,367,374,383,385,387,391,392,396,408,410,414,415,418,420,421,422,428,429,437,439,440,441,442,447,449,452,453,455,460,465,472,475,480],formal:[6,78,80,91,227,228,234,250,274,306,314],format:[2,3,6,7,8,9,12,13,22,38,41,44,56,68,77,172,184,187,188,189,190,191,202,204,205,206,207,209,211,273,276,280,282,284,287,291,292,302,317,318,329,330,333,351,355,356,362,363,367,374,383,386,396,408,410,419,420,421,423,428,439,445,452,453,455,456,457,460,471,472,473,480,482],former:[6,12,16,39,41,190,209,318,322,367,369,461,467,480],formerli:[7,13],formul:[1,40,64,141,196,221,234,250,268,282,284,290,294,317,346,363,367,383,385,388,408,417],formula:[2,3,6,7,13,21,22,37,44,54,55,70,73,87,89,90,91,94,96,97,106,112,118,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,163,164,169,171,172,183,187,194,195,196,197,202,203,204,207,208,215,221,229,230,232,234,235,247,272,273,279,288,293,300,304,306,309,310,311,320,323,326,328,329,331,332,333,335,341,349,355,363,364,366,367,372,373,374,375,380,381,383,384,388,389,390,391,393,396,397,399,400,401,403,404,406,407,408,411,412,413,422,423,429,437,438,440,441,442,446,447,448,451,455,458,465,472,473,479,480,481],forth:[1,6,11,12,13,14,15,360,453,458,462],fortran:[3,6,9,11,12,13,224,383,392,408,420,421],fortun:8,forward:[3,8,87,345,356,361],foster:[367,417,418],foul:167,found:[3,6,9,12,73,158,187,212,214,226,231,237,273,313,319,331,345,357,374,377,380,450,456,457,472],four:[6,11,54,81,103,104,140,160,248,318,340,355,356,450],fourier:[],fourth:[6,105,290,303,313,372,414],fox:[6,118,170,435,467],fphi:[38,56,439],fpic:12,fplo:[38,56,439],fprime:439,fqdn:233,fqq:380,frac:[219,235,443,475],fraction:[1,3,6,8,12,16,39,41,80,109,141,167,186,189,190,200,210,211,212,213,248,277,281,288,289,306,311,312,349,356,361,367,369,389,406,407,460,465],fragment:[42,231,288],frame:[83,140,190,199,248,281,325,388],framer:[189,190],framework:[5,228,362,428],franc:9,fraunhof:9,free:[5,6,7,9,13,29,60,63,70,87,158,195,272,306,315,316,317,318,353,356,364,385,405,418,447,452],freedom:[3,6,8,94,96,97,99,101,102,112,142,143,144,145,146,147,148,149,150,151,152,153,154,156,157,202,212,219,226,228,234,235,240,250,251,254,255,256,267,268,270,274,276,291,294,309,310,311,316,354,380,473,475,481],freeli:[0,6,7,12,143,157,162,189],freez:[],frenkel:[226,316],freq:198,frequenc:[3,6,16,39,190,262,273,274,281,286,344,381,385,421,450,464,469,480,483],frequent:[3,64,67,70,72,73,77,88,140,190,210,211,223,314,321,412,462],fri:[248,281],friction:[4,5,6,10,42,193,228,234,281,286,291,318,322,324,389,465],friedrich:296,from:[],front:[248,281,325],frontend:[189,285],frozen:[6,112,168,225,227,235,357,387],fs2:[6,91],fscale:231,fstr:480,fstring:453,ftol:[354,356,450,469],fuchsia:190,fuction:377,fudg:294,fugac:226,fugacity_coeff:226,fulfil:6,full:[1,2,6,9,12,17,38,39,40,91,189,203,214,237,272,346,347,361,367,383,385,386,388,443,455,457,462,463,467,469,475,483],full_energi:[3,226],fuller:354,fulli:[3,6,9,78,228,233,272,354,356,377,418,419,482],fulton:383,fumi:368,func:[453,480],funcfl:383,functino:6,functionaliri:214,fund:[0,7],fundament:[306,479],funnel_flow:302,further:[3,6,8,12,13,61,63,71,86,105,107,116,189,190,193,202,204,205,206,207,210,216,220,237,241,274,282,292,296,306,318,320,329,347,352,354,355,356,357,362,366,376,436,450,469,470,480],furthermor:[27,173,385],furthest:61,futher:3,futur:[],g_ewald:3,g_ewald_6:3,g_ewald_disp:3,g_jik:418,g_p:318,ga3:163,gaa:367,gahler:353,gai:[3,388,437],gain:313,gainsboro:190,galindo:411,game:231,gamma0:29,gamma:[3,6,29,234,237,241,273,281,282,284,286,322,381,384,388,408,411,431,434,435,438,440,442,473],gamma_:[3,318,324],gamma_ijk:440,gamma_n:[324,389],gamma_p:[3,318],gamma_t:[324,389],gammaa:411,gammafactor:237,gammar:411,gan:[418,438,440,442],gan_sw:418,gan_tersoff:418,ganzenmuel:[7,9],ganzenmul:9,gao:[6,20,170,372,467],gap:[184,406,407,419,428],gap_2014_5_8_60_17_10_38_466:419,gap_exampl:419,gaseou:7,gass:226,gather:[11,463],gather_atom:11,gather_scatter_loop_unrol:12,gathert_atom:11,gauch:176,gauss:[],gaussian:[6,40,63,91,103,105,227,228,234,274,290,306,310,328,346,381,382,385,387,419,437,450,480,481],gave:[3,412],gaybern:[],gcc:17,gcmc:[],gcore:219,gd3:163,gdot:407,gdrude:219,ge4:163,gec:[440,442],gen:[250,251],gener:[],genom:7,gentler:[323,326,328],gentli:384,geom:[6,346,382,450,481],geometr:[3,6,7,8,42,57,59,71,154,155,164,166,187,190,196,205,206,208,209,216,221,230,250,255,256,267,268,270,291,293,300,309,310,311,327,329,346,349,356,366,369,373,375,377,380,385,388,390,395,397,398,399,400,401,402,403,404,405,406,407,411,412,422,429,443,444,446,447,455,457,458,465,473,480],geometri:[3,6,7,9,13,25,41,71,152,164,205,209,210,211,213,216,232,349,412,455,458],georg:[7,9],georgia:13,gerber:405,germani:[9,14],germann:[254,399,450,469],germano:388,gerolf:13,get:[],get_natom:[11,453],getenv:480,gettimeofdai:12,gewald:[6,346],gezelt:[377,397],gf100:14,gf104:14,gf200:14,gflop:12,gflp:12,ghost:[3,6,7,12,16,58,61,62,73,162,167,213,215,235,250,280,291,292,346,357,361,381,382,385,389,396,460,465,475],ghostwhit:190,ghz:10,giacomo:9,gif:[4,189],gifsicl:189,gigabit:18,gillan:428,gingold:[431,432,434],gio:2,git:[7,12],github:[13,17,214,228,233,419],give:[0,1,2,3,5,6,7,8,9,10,11,12,14,15,16,17,29,54,71,113,144,147,151,164,187,190,196,198,202,203,204,207,213,215,228,250,268,272,273,278,286,288,291,320,346,347,354,357,358,361,363,367,382,385,391,392,408,412,422,440,441,442,450,452,453,455,465,469,475,481],given:[3,5,6,7,9,10,11,12,16,17,22,27,37,44,55,63,64,67,71,113,123,124,125,127,128,131,132,133,134,135,136,137,138,139,140,141,158,162,166,172,173,183,184,187,188,190,193,200,202,205,210,211,213,215,216,220,226,227,228,229,231,237,244,247,249,250,254,271,272,273,274,281,282,288,290,294,302,303,304,306,308,313,318,319,322,323,324,327,333,341,346,347,361,362,363,367,368,370,371,373,374,375,376,377,378,381,382,383,385,386,388,391,397,398,399,401,408,409,410,411,412,414,415,418,422,423,425,427,428,436,437,448,450,453,455,457,458,465,469,479,483,484],gjf:234,gjwagn:7,gko:2,gld:[],gle4md:[228,233],gle:[],glitch:3,glob:466,global:[],glosli:347,glotzer:[291,381],glue:11,gmail:[7,9,13],gmake:[12,17],gmask:[3,480],gnu:[0,7,12,17,18],gnuplot:[11,13],goal:[5,12,39],goddard:[6,9,25,282,283,284,342,385,391,420,421,467],goe:[12,54,140,164,186,247,299,354,357,380,384,390,399,402,429,448,458,462],gold:[70,190],goldenrod:190,goldman:281,gone:3,good:[1,3,6,12,17,41,73,118,162,163,209,234,248,250,282,288,294,313,346,356,357,362,375,382,383,412,439,450,464,469,473],googl:231,gordan:140,gordon:6,gould:[6,170,467],gov:[0,7,9,13,362,383,386,479],govern:237,gpl:[0,7,8,12],gpu1:361,gpu:[],gpuid:361,gpun:361,grab:[3,6],gracefulli:3,grad:[6,196,221,249],gradient:[6,7,8,12,13,122,127,213,221,229,230,249,268,283,314,318,352,353,356,407,421,439],gradient_correct:427,graduat:276,graft:212,grai:190,grain:[5,6,7,9,29,36,40,54,67,164,167,176,193,272,276,291,306,390,423,467],gram:[202,205,206,383,479],grama:[9,284,421],gran:[],grand:[3,193,200,226],granflow:5,granular:[],graph:11,graphen:459,graphic:11,grasp:5,gravit:229,graviti:[],grdient:199,great:[3,13,281],greater:[1,3,10,61,86,162,190,213,227,250,272,311,325,361,366,368,370,371,412,450,452,455,458,464,469,480,481],greathous:13,greatli:[118,469],green:[2,6,91,130,131,189,190,273,274,314,367],green_kubo:6,greenyellow:190,greffet:286,greg:[7,9],grest:[45,46,212,306,347,371,389,401,467],grew:71,grid:[3,12,41,62,118,152,163,166,209,237,286,306,318,319,346,347,449,452,455,457,459,464],grigera:6,grime:40,grmask:[3,480],gromac:[],gronbech:[234,346],groot:381,ground:[6,385],group1:[146,167,357],group2:[88,146,165,167,357],group2ndx:[],group:[],group_id:11,groupbig:306,groupid1:[240,291],groupid2:[240,291],groupid:455,groupnam:357,grouptyp:226,grow:[3,8,198,215,216,232,234,250,272,320,389,455,467],grow_arrai:8,grow_reset:8,growth:[6,313],grueneisen:9,gsmooth_factor:408,gstyle:[3,452],gtl:7,gtx285:14,gtx450:14,gtx460:14,gtx470:14,gtx560:14,gtx580:14,guarante:[65,69,79,92,108,115,164,167,187,220,282,345,349,465],guess:[3,187,278,456],gui:[7,11],guid:[1,17,40,78,80,99,100,101,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,193,243,244,296,297,298,299,302,319,417,425,427,430,431,432,433,434,435,465],guidelin:[1,8,14,15,16,17,18,19,346,439],guidlin:17,gullet:408,gumbsch:353,gunsteren:[278,309,405],gunzenmul:7,gunzip:12,guo:[6,20,170,176,372,467],gwald:3,gyrat:[],gzip:[3,12,187,189,190,317,356,455,456,460],h12:388,h2o:[40,355],h5cc:188,h5md1:188,haak:[278,309],had:[3,6,11,13,59,63,187,190,191,204,207,212,213,227,228,230,234,235,236,248,250,252,253,254,255,256,267,268,270,277,278,306,309,310,311,318,381,382,389,436,457,461,464,470,473],hafskjold:6,half:[1,3,6,8,16,17,39,41,58,59,166,189,201,209,215,234,250,318,323,327,357,361,364,367,375,385,424,426,455,457,458,465,475],halfwai:[41,189,190],halsei:389,halt:[41,190,209,230,331,472],halv:189,ham:[38,56],hamak:[323,327,375,422],hamilton:70,hamiltonian:[228,250,251,310,385,464],hammond:[346,347],han:383,hand:[3,6,19,54,164,182,186,189,237,247,349,377,385,455,458,465,468],handl:[3,9,16,189,214,284,361,364,385,406,421,453,469],hang:[3,12,452,453],happen:[3,6,8,12,15,18,61,116,168,190,200,203,357,361,453,456,463],happi:8,haptic:231,hara:441,hard:[1,240,284,290,291,382,458],harden:[9,429],harder:[323,327,475],hardi:[199,235,346,347,475],hardwar:[1,12,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,196,208,222,225,229,234,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,309,311,322,332,334,335,336,337,340,342,346,347,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,468],hardwir:[3,17,324],hardy2:347,harm:364,harmon:[],harmonic_fix_wal:407,harpertown:18,harrison:363,hart:306,hartre:[364,383,385,479],hasan:9,hash:[39,455],hassl:290,hat:[6,10,249],have:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,45,46,47,48,49,51,53,54,56,57,59,63,64,65,66,67,69,70,71,72,73,75,77,81,86,90,91,93,103,104,105,106,109,112,113,114,115,116,130,140,141,142,143,144,145,147,151,153,156,157,159,160,161,162,164,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,188,189,190,191,196,198,200,201,202,203,205,206,207,208,209,210,211,212,213,215,216,221,222,223,225,226,227,228,229,230,231,232,234,235,236,237,240,245,247,248,250,252,253,254,255,256,257,262,265,267,268,269,270,272,274,276,277,278,280,281,282,283,286,289,291,293,294,300,302,306,307,309,310,311,312,313,317,318,319,320,322,323,324,325,326,327,328,329,330,331,332,334,335,336,337,338,340,342,346,347,349,352,353,354,355,356,357,358,361,362,363,364,365,367,368,369,370,371,372,373,375,376,377,380,381,382,383,384,386,387,388,389,390,391,392,393,395,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,417,418,420,421,422,423,427,429,438,439,440,441,442,444,446,447,448,449,450,452,453,455,456,457,458,459,460,461,462,463,464,465,467,469,470,472,473,475,479,480,481,482,483,484],haven:453,hayoun:286,hayr:234,hbcut:420,hbnewflag:420,hbond:[],hbond_cutoff:421,hcp:[64,67,73,349,408],hdf5:[9,188],he1:163,head:[6,21,171,332,387,391,420,421,470],header:[3,6,7,8,12,165,187,189,190,191,202,203,204,205,206,207,248,281,288,292,318,355,362,367,383,452,455,465,472],heal:464,heat:[],heatconduct:[],heavi:306,heavili:[41,209],heavisid:318,hecht:306,heenen:9,height:[189,216,277,356,387],heisenberg:9,held:[6,71,306,356,389],helic:176,helium:365,helix:[],hello:453,help:[3,8,12,14,15,16,17,18,19,187,213,215,248,344,367,440,442,482],henc:[1,3,13,20,21,26,32,35,36,70,71,108,144,154,171,202,250,284,306,322,323,327,329,332,334,337,340,347,377,387,405,418,457],henderson:53,hendrik:9,henin:[9,214],henkelman1:[249,356],henkelman2:[249,356],henkelman:[249,353,356],here:[1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,22,37,41,44,55,63,68,69,70,71,118,144,162,163,172,175,183,187,189,190,193,202,209,212,215,226,227,235,237,272,281,284,286,292,318,323,326,328,329,331,333,341,345,354,356,360,361,363,364,367,374,386,388,391,392,396,418,422,425,427,437,439,448,453,460,475],herist:319,herrmann:306,hertizian:324,hertz:[],hertzian:[6,324,389,437],hertzsch:389,hess:346,hessian:[5,353],heterogen:105,heurist:[319,456],hex:[3,17,164,349],hexagon:[67,408],hey:[110,141],hf4:163,hfo:376,hftn:[353,354,356],hg1:163,hg2:163,hgrid:306,hibb:274,hidden:[17,453],hienergi:329,hierarch:[7,464],hierarchi:[347,371,372,397,398,401,411,464],higdon:[9,406,407],high:[1,3,6,7,9,12,19,41,184,187,189,209,213,220,235,248,314,318,321,347,353,354,361,367,385,388,422,439,448,452,464,469,475],higher:[1,14,140,167,190,202,207,210,211,216,232,277,286,313,326,328,354,385,393,480],highest:[216,331,355,356,480],highli:[3,6,7,9,164,189,215,234,250,262,281,291,352,354,385,450,469],highlight:[6,7,10,13],hight:387,hilger:[346,347],hill:274,hill_height:13,him:9,hint:12,histo:[],histogram:[1,6,12,63,116,162,193,203,204,207],histor:386,histori:[],hit:[3,306,325],hmaktulga:[7,9],ho3:163,hoc:340,hocknei:[346,347],hofl:188,hoh:[6,377,397,401],hold:[6,33,59,71,177,202,215,242,275,290,291,303,354,356,389,405,447,466],holdem:290,holder2:347,holder:[346,347],hole:303,holian:[254,399],holm:[272,347],holonom:317,home:[11,12,191],homebrew:12,homepag:[189,231],homogen:[268,412],hone:274,honeydew:190,honor:191,hook:[],hookean:389,hoomd:191,hoover:[6,7,8,154,193,219,234,235,250,251,252,253,254,255,256,267,268,269,270,274,278,286,291,309,310,311,316,381,475],hop:[212,356,367],hope:[5,13,17,41,42,209,463],hopefulli:[8,354],horizon:417,horn:6,host:[3,12,16,17,214,361],hot:[6,230,251],hotpink:190,hottest:314,hour:12,hourglass:[2,9,122],hove:408,how:[],howev:[1,2,3,6,7,11,12,15,16,17,36,39,41,71,88,91,104,118,140,163,184,187,189,190,203,207,209,212,213,216,219,226,227,228,233,234,235,236,237,240,250,272,274,277,280,281,286,291,292,306,307,309,310,313,314,318,319,320,321,322,347,349,351,352,356,361,373,375,383,384,389,392,408,416,418,427,438,439,442,450,452,453,456,463,469,472,473,475,480,481],howto:[6,63,71,142,143,145,147,150,151,152,153,154,156,157,193,234,235,250,278,309,310,311,377,391,397,401,481],hoyt:199,hpc:[1,15],hsw:17,htm:383,html:[0,4,8,11,12,15,233,387,407,464],htmldoc:0,htst:469,http:[0,6,7,9,11,13,14,15,214,228,231,233,362,383,406,419,420,421],htype:[377,397,401,405],hubbard:378,huge:[12,166,262,306,455,460,472],huggin:[7,368,370,437],hugh:199,hugoniostat:[4,193,254],hugoniot:[248,254,281],hull:162,hummer:346,hundr:[7,14],hura:6,hwloc:[12,17],hybrid:[],hydrat:387,hydrocarbon:[363,376,385],hydrodyanm:40,hydrodynam:[7,9,40,99,101,237,239,240,241,369,406,407,425,427,437,465],hydrogen:[3,6,7,223,286,363,367,377,385,391,397,401,405,420,421,437,455,464,475],hydrostat:[3,9,213,250,254,278,291],hynninen:[378,387],hyoungki:410,hyper:274,hyperbol:378,hyperspher:140,hyperthread:[16,17],i_0:318,i_1:418,i_csid:6,i_flag1:280,i_mpi_pin_domain:16,i_myflag1:280,i_myflag2:280,i_n:418,i_nam:[113,187,280,308,465],ialloi:408,iatom1:115,iatom2:115,iatom3:115,iatom4:115,ibar:408,ibead:274,ibm:[187,346],icc:[10,12,16],icm:[9,231],ico:64,icosohedr:73,ictp:13,id1:[291,356,396,455,458],id2:[291,295,303,356,396,455,458],id_press:[213,248,250,252,253,254,255,256,278],id_temp:[212,213,248,250,252,253,254,255,256,267,268,270,278,309,310,311],idea:[1,3,6,11,12,41,141,189,190,209,232,272,295,306,314,347,412,463,475],ideal:[6,9,40,73,116,122,219,226,272,349,406,431,475],idealga:[],ident:[1,3,9,12,39,40,71,140,187,190,204,213,214,227,228,234,235,247,250,272,274,278,286,288,291,347,355,356,361,368,370,377,379,383,399,405,414,420,421,428,448,450,453,456,469,479,480,481,483],identi:361,identif:67,identifi:[1,3,12,38,40,56,70,162,164,184,288,306,329,391,396,408,439,450,452,455,458,469,470,472],idl:[18,469],idn:[291,356],idr:480,ielement:408,ieni:13,ifdef:[8,12],iff:235,iffp:453,ignor:[3,6,11,16,41,71,83,87,98,107,119,168,187,189,190,194,195,203,204,205,207,209,213,214,215,216,226,229,233,234,247,250,254,259,264,278,279,280,290,291,292,306,309,310,311,317,318,320,323,327,328,329,338,348,351,355,356,361,362,373,374,375,383,384,386,388,395,396,408,414,418,422,438,439,440,441,442,444,450,452,455,456,460,465,467,469,472,480],ihl:306,iii:[6,9,25,282,284,342,391,467],ijk:[336,340,342,367,418,452],ijl:340,ikeshoji:6,ill:[144,154,202,282],illeg:3,illinoi:[231,346,347,406],illog:453,illustr:[1,6,8,11,12,17,272,274,356,392,453],ilmenau:[7,9,14],ilya:[7,9],imag:[],image2pip:189,imageint:3,imagemagick:[4,189],imagin:[303,317,367,384,392,393,409,410,414,418,438,440,441,442,467],imaginari:[6,226,274,455],imbal:[1,41,209],imbalanc:[41,209],imbu:306,imd:[],img:189,immedi:[0,2,3,8,12,164,210,211,216,294,302,307,308,325,452,453,455,457,469,480,483],immens:3,immers:[237,291],impact:[1,4,6,8,220,313],impart:[3,6,229,306,328],impei:[6,397],implement:[1,3,6,8,9,12,17,18,27,78,87,118,146,152,163,164,172,173,183,202,214,218,228,231,234,237,239,240,241,248,268,271,273,274,280,281,282,284,285,286,294,295,306,313,318,322,340,345,346,347,354,356,361,362,364,367,376,377,379,381,383,384,385,392,397,401,405,408,417,420,421,422,440,442,452,453,464,469,475,480,482],impli:[3,6,40,59,87,141,189,194,195,196,215,221,234,290,309,311,312,346,349,374,453],implicit:[],implicitli:8,implict:378,imporop:355,importannt:247,important:316,important_not:59,impos:[2,6,71,112,153,186,193,196,197,208,221,222,224,229,232,241,242,249,262,272,275,293,300,303,305,306,313,314,315,316,321,322,323,326,327,328,354,356,358,449,463],imposs:1,improp:[],improper_coeff:[],improper_styl:[],impropercoeff:3,impropertyp:211,imprort:97,improt:[194,195],improv:[0,1,9,39,41,190,209,250,273,361,391,397,412,421,438,441],in3:163,inaccur:[1,3,6,167,248,346],inaccuraci:327,inact:391,inappropri:164,incid:[118,163,216],includ:[],includig:[331,345],inclus:[],incom:231,incompat:[3,11,393],incomplet:[3,11,455],incompress:[251,385],inconsist:[3,168,212,456],inconveni:349,incorpor:[281,367,378],incorrect:[3,147,234,408],incorrectli:[3,349,389,480],increas:[1,3,6,10,18,38,56,57,59,109,118,141,184,187,189,190,210,211,212,215,234,278,289,290,291,314,317,321,346,347,356,361,385,388,421,439,441,453,464,469,480],increasingli:385,increment:[3,11,128,196,197,208,209,216,221,223,250,295,296,329,345,360,395,450,453,467,469,480],incur:[14,17,202,205,206,223,318,452],inde:147,indefatig:7,indefinit:315,indent:[],independ:[4,6,9,11,12,16,17,41,59,63,91,117,119,150,164,186,193,201,202,203,204,205,206,207,209,212,213,214,215,216,227,229,234,235,237,240,250,273,278,282,286,291,292,295,305,316,318,349,389,450,453,472,481],indetermin:[187,190],index:[0,3,6,8,11,12,38,39,40,56,68,69,117,119,184,187,190,201,203,231,233,274,292,318,329,330,331,351,360,412,420,421,439,445,455,470,480],indianr:190,indigo:190,indirectli:[6,480],indistinguish:234,indium:428,individu:[],induc:[],industri:7,ineffici:[3,6,40,64,67,70,72,73,77,140,152,189,215,250,273,346,358],inerti:407,inertia:[],inexpens:[228,464],inf:[2,3,12,321,458],infer:[3,94,96,97,158,196,197,209,210,211,221,231,276,306,314,321,349,374,386,455,467,473],infil:[3,13,291,452],infin:[3,354,460,473],infininti:189,infinit:[3,216,225,232,234,237,273,306,318,324,325,347,349,385,459,479],infinitesim:6,inflect:[378,399],influenc:[3,9,41,80,146,247,277,346,347,412,440,441,442],inform:[0,1,2,3,6,7,8,9,11,12,13,15,17,39,41,42,59,61,62,63,68,88,115,117,118,163,164,170,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,224,225,226,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,249,257,258,259,260,261,262,263,264,265,266,271,272,273,275,276,277,278,279,280,282,283,284,285,286,287,288,289,290,291,292,293,294,296,303,304,306,307,309,310,311,312,313,314,315,317,320,321,322,323,325,326,327,328,330,344,346,347,350,353,354,355,356,357,359,361,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,415,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,444,446,447,448,452,453,455,456,457,459,460,462,467,469,470,472,480,482,483,484],infrequ:[6,381,450,469],infti:[378,406,407],ingtegr:367,inher:[346,354,412],inherit:[6,443],inhomogen:[18,318,412],inidividu:354,init:[3,8,12,289],init_fil:318,init_list:8,init_on:8,init_styl:8,initi:[2,3,4,6,7,8,11,12,13,38,39,40,41,56,57,59,62,71,80,81,86,87,103,104,130,160,165,166,184,186,187,189,190,191,194,195,198,199,203,209,211,212,213,215,222,226,227,231,232,233,234,235,237,242,246,247,248,249,250,254,262,273,274,275,280,281,286,289,290,291,293,305,306,308,313,315,316,317,318,319,320,323,324,325,326,328,329,331,346,350,353,354,356,363,364,380,381,382,419,420,421,439,450,452,453,455,457,458,460,462,463,465,469,470,473,475,480,481,482,484],initial_integr:8,initial_integrate_respa:8,initialis:419,initialt:318,inlclud:11,inlcud:480,inlin:453,inner2:[372,390],inner:[3,8,16,187,232,331,345,352,353,354,356,360,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,445,446,447,448,464,469],inner_distance_cutoff:391,innergroup:240,innermost:[38,56,359,439,464],innernod:240,innner:403,inordin:319,inorgan:6,inp:[214,331,428],input1:[65,68,69,79,92,108,113,114,115,117,119,308],input2:[65,68,69,79,92,108,113,114,115,117,119,308],input:[],input_doubl:3,inquir:296,insensit:12,insert:[3,5,7,8,12,59,164,193,216,226,232,277,346,428,436,453,459,475],insid:[2,3,6,8,11,71,129,135,164,187,190,201,205,206,216,217,223,226,232,237,240,277,291,306,323,325,326,327,328,329,344,349,399,453,454,455,457,458,465,469,480],insight:[6,13],instabl:[237,380,427],instal:[],instanc:[6,11,214,228,325,387,392,412,418,453,475],instantan:[6,63,212,213,227,228,250,254,273,278,281,286,288,291,313,461,473],instanti:[6,11,12,199,392,452],instead:[1,3,6,8,9,11,12,13,17,18,40,41,59,63,70,71,90,117,143,146,168,184,187,195,202,204,205,206,207,209,213,214,234,237,240,241,273,279,289,291,308,326,344,346,347,350,357,361,370,371,383,396,398,405,408,450,458,462,469,471,475,480],institut:[9,231,276],instruct:[3,6,8,11,12,13,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,162,170,171,173,174,175,176,178,179,181,182,184,185,189,196,208,222,225,229,234,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,309,311,322,332,334,335,336,337,340,342,347,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,464,475],insuffici:[3,6,12],insult:250,insur:[3,6,11,12,17,39,40,61,73,102,104,164,165,184,187,189,190,196,210,211,216,221,222,223,224,226,229,234,246,279,280,289,291,306,318,323,327,328,329,331,345,355,357,361,375,388,392,416,422,439,452,453,455,456,460,463,464,472,473,480,481],int_max:3,integ:[3,6,8,11,12,39,40,42,64,68,70,71,113,115,117,119,140,162,164,167,168,170,174,175,179,184,186,187,189,190,200,202,205,206,210,211,212,216,218,224,226,227,228,231,234,235,236,237,273,276,277,280,281,286,291,306,308,310,313,317,318,336,346,349,369,381,382,395,408,420,421,425,427,428,450,452,453,455,463,464,465,469,472,480,481],integr:[],integrate_ulsph:297,intel:[],intel_cpu:[12,16],intel_phi:[12,16],intend:[3,8,12,13,36,227,419,455],intens:[1,3,6,9,63,66,74,75,86,89,90,91,93,103,104,105,106,112,114,116,117,118,119,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,163,193,202,203,204,205,206,207,209,210,211,212,220,223,230,240,248,250,254,288,291,292,306,314,318,320,321,472,473],intepol:480,inter:[14,18,42,61,62,144,167,168,187,212,234,236,249,283,291,346,356,367,465,475,480,482,484],interact:[1,3,6,7,8,9,10,11,12,14,15,16,17,22,29,33,37,39,42,44,50,54,55,57,61,63,65,69,77,79,87,88,92,107,108,110,112,115,116,122,123,124,125,127,128,129,130,131,132,133,135,136,137,138,140,141,143,157,158,162,165,166,167,168,169,170,172,176,177,183,187,193,194,195,210,211,212,225,226,231,232,234,236,240,262,272,274,276,282,284,290,291,297,298,306,307,313,318,322,323,324,327,328,333,334,335,337,341,346,347,354,355,356,357,358,359,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,418,421,422,423,425,427,428,429,436,437,438,440,441,442,443,444,445,446,447,448,450,453,455,457,459,460,464,465,467,472,473,475,482],interatom:[3,4,7,164,187,249,315,316,362,367,383,385,393,408,441,480],intercept:118,interchang:6,interconnect:18,interconvert:385,intereract:39,interesect:327,interest:[1,5,7,8,9,11,13,71,163,274,313,316,347,384,407,420,421,453,480],interf:361,interfac:[],interfer:[12,250,363],interg:[6,475],intergr:[464,468],interi:407,interior:[3,6,41,327,458],interlac:408,interleav:[6,164,463],intermedi:[6,12,59,189,249,272,340,356,453,454,463,467],intermix:450,intermolecular:363,intern:[0,2,3,5,6,9,11,16,20,21,24,28,32,35,36,39,40,42,63,87,99,101,118,141,144,146,163,171,184,189,190,193,194,195,199,211,215,219,231,243,244,248,250,254,273,291,295,332,334,337,340,344,354,355,430,431,439,453,455,457,460,469,472,473,479,480,481,482],internal_element_set:199,internal_quadratur:199,internet:233,interpenetr:408,interpentr:[431,432,434],interpol:[6,15,38,56,100,184,189,190,199,237,272,346,347,356,367,412,421,433,439,440],interpret:[2,6,11,189,204,389,429,450,453,469,480],interrupt:281,intersect:[3,6,118,190,327,329,458],intersert:327,interspers:354,interstiti:162,intertia:[3,93],interv:[3,6,91,188,203,234,281,286,287,298,433,450,469,480],intestieti:118,intial:[6,361,363],intiial:[41,460],intiti:[3,305],intra:291,intra_energi:226,intramolecular:[29,226],introduc:[6,9,189,250,281,286,291,340,346,362,377,385,397,401,405,438,469],introduct:[],intsal:16,intuit:349,inv:[118,163,292],invalid:[3,12,71,89,167,262,356,406,407,457],invari:[133,138,140],invent:294,invers:[],invert:[6,168,273],invis:327,invoc:[162,212,361,425,427,453],invok:[1,3,6,7,8,11,12,13,14,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,43,45,46,47,48,49,51,53,54,56,59,63,66,71,74,75,81,87,88,89,90,93,103,104,106,109,110,111,112,117,142,151,158,159,162,164,165,167,168,170,171,173,174,175,176,178,179,181,182,184,187,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,217,218,220,221,222,223,224,225,226,227,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,246,247,249,250,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,282,283,284,285,286,287,288,289,291,292,293,294,295,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,332,334,335,336,337,340,342,345,346,347,348,349,354,356,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,392,393,395,397,398,399,400,401,402,403,404,405,406,407,409,412,413,414,415,417,422,423,425,427,428,429,438,439,440,441,442,444,445,446,447,448,449,452,453,454,456,458,460,463,464,466,467,469,472,473,475,480,481],invokd:3,involv:[3,6,7,8,12,63,108,115,116,117,144,168,193,210,226,237,276,279,284,306,346,353,354,356,366,382,388,438,440,442,451,452,458,460,464,469],ioff:[355,455],ion:[6,7,271,303,318,347,367,378,386,387,408,437,442,448,455,475],ionic:[6,9,368,370,378,385,386,415,475],ioniz:[9,376,385],iparam:[3,211],ipi:[],ipp:[],ir3:163,ir4:163,irregular:[6,41,58,209,213,215,250,291],irrelev:414,irrespect:[406,407],irrevers:219,isbn:447,isel:[346,347],isenthalp:[250,251,252,253],ismail:[346,347,371,401],isn:[3,8,11,12,230],iso:[3,213,219,235,250,251,252,253,254,255,256,278,286,291,475],isobar:[250,251,255,256],isodem:385,isol:[3,167,329],isomorph:274,isotherm:[226,250,251,255,256,278],isotrop:[6,234,278,346,347,369,388,406,407],isovolum:292,isralewitz:295,issu:[1,3,6,9,11,12,13,14,15,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,59,71,73,81,103,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,189,196,199,208,212,213,216,221,222,225,226,229,234,248,250,252,253,254,255,256,257,265,267,268,270,274,278,280,283,291,293,294,305,309,310,311,316,322,328,331,332,334,335,336,337,340,342,347,355,356,359,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,436,438,439,440,441,442,444,446,447,448,455,457,464,467,472,473,480,481],ital:[420,421],itali:13,item:[6,7,8,41,187,190,209],iter:[3,6,12,39,41,63,188,196,197,208,209,213,219,221,224,232,273,282,283,291,294,313,329,331,345,352,353,354,356,360,450,460,464,469,473,480],ith:[71,117,119,201,202,203,204,205,206,207,308,320,473,480],itself:[2,3,4,6,7,8,9,11,12,13,18,42,59,91,107,155,187,188,189,190,191,203,214,219,235,245,249,285,291,318,329,331,355,356,377,386,388,392,393,439,453,459,462,463,467,480,484],ityp:[3,115,116,164,198,211,284,445],itype1:116,itype2:116,itypen:116,ivector:8,ivori:190,ixcm:291,ixi:[42,93,291,355,480],ixx:[42,93,291,355,480],ixz:[42,93,291,355,480],iycm:291,iyi:[42,93,291,355,480],iyz:[42,93,291,355,480],izcm:291,izrailev:295,izumi:441,izz:[42,93,291,355,480],j0jt:91,j20:203,j_m:140,jac:[6,170,467],jackson:411,jacobi:3,jacobsen:353,jagreat:13,jame:[9,19],janssen:272,januari:408,jaramillo:[7,9,13,385],jarzynski:295,jatempl:9,jcc:9,jcp:323,jec:13,jeff:13,jello:250,jensen:[234,346],jeremi:[9,410],jerom:9,jewett:13,jiang:[235,475],jiao:[9,13],jiht:[7,9],jik:367,jim:7,jku:7,jmake:12,jmm:140,joannopoulo:248,job:[12,60,294,463],jochim:[250,251],john:[7,13,188],johnson:[9,13],join:[6,458],joint:[3,276,391],jon:[9,70],jonathan:9,jone:[1,3,6,7,9,10,12,13,45,46,64,87,107,110,193,199,278,306,323,327,347,349,354,363,366,370,371,372,373,375,380,388,390,391,392,395,396,397,398,399,401,402,404,405,411,412,418,422,423,432,437,444,467,475],jonsson:[73,249,353,356],jorgensen:[6,181,377,397,401],joul:479,journal:[158,176,199,284,347,383,420,421,431,432,434],jparam:[3,211],jpeg:[3,12,189],jpeglib:12,jpg:[4,8,12,187,189,190,483],jpg_inc:12,jpg_lib:12,jpg_path:12,jpl:[7,9],jth:480,jtype1:116,jtype2:116,jtype:[3,116,211,445],jtypen:116,judg:469,judici:6,julien:9,jump:[],june:191,just:[3,6,8,9,11,12,13,17,19,22,29,42,44,59,61,91,107,110,116,141,143,157,172,187,202,205,206,215,219,223,240,247,278,280,291,313,318,329,331,333,355,356,361,363,366,374,392,418,444,453,457,459,460,462,463,475,480,483,484],justo:384,jusufi:[378,387],jut:327,jzimmer:9,k11:91,k22:91,k33:91,k_b:235,k_d:475,k_sigma:367,k_ub:20,kadiri:67,kamberaj:291,kappa:[6,91,314,377,397,446,447],kappa_:318,karplu:87,karttunen:237,kate:[],kayser:378,kbit:190,kboltz:306,kbp:190,kbt:286,kcal2j:91,kcal:[231,464,475,479],kde:13,ke_eta_dot:250,ke_etap_dot:250,ke_omega_dot:250,keblinski:377,kecom:144,keef:118,keep:[3,7,12,59,71,182,205,211,215,232,273,289,316,321,346,354,377,405,428,450,455,461,463,469,473,480],keflag:3,kei:[6,17,59,306,469],keir:13,kelchner:70,kelkar:321,kelvin:479,kemper:[283,376],kepler30:17,kepler32:17,kepler35:17,kepler37:17,kepler:[1,12,14,15,17,361],kept:[6,193,254,315,316,475],kernel:[7,13,17,40,100,129,135,199,227,228,298,430,431,432,433,434,435,465],kernel_radiu:455,keword:189,keyboard:12,keyword:[],keywrod:385,kforc:475,khaki:190,khersonskii:140,kick:[196,197,198,221,325],kilogram:479,kim:[],kimviri:[3,393],kind:[1,2,3,6,7,8,9,11,12,17,39,40,41,42,61,62,63,73,117,119,144,187,193,200,202,203,204,209,212,214,218,226,229,247,291,294,306,313,328,356,358,360,367,385,420,421,445,450,455,460,461,468,469,475,480],kinemat:[9,406,407],kinet:[3,6,8,9,63,82,83,84,85,87,91,94,95,96,97,98,112,141,142,143,144,145,146,147,149,150,151,152,153,154,156,157,193,200,202,213,219,230,234,246,248,250,251,252,253,254,255,256,278,281,306,314,321,322,354,385,450,469,473,475],kiss:12,kjl:340,klahn:317,klapp:346,klein:[6,9,199,214,250,251,269,291,397,423],kloss:7,kmax:[3,118,292,346],knc:17,knock:318,know:[3,11,12,41,63,107,116,193,219,233,235,262,306,354,384,393,443,453,456,459,464,475],knowledg:[4,8,189,393],known:[3,12,140,189,273,282,291,315,452,469,481],kohlmey:[7,9,13,18,346,347],kokko:[],kokkos_arch:17,kokkos_cuda:[12,17],kokkos_cuda_opt:17,kokkos_debug:17,kokkos_devic:17,kokkos_omp:[12,17],kokkos_pg:17,kokkos_phi:[12,17],kokkos_use_tpl:17,kolafa:347,kollman:[6,170,467],kondor:419,kone:[315,316],kong2011:273,kong:[9,13,273],konglt:9,koning00a:315,koning00b:315,koning96:[315,316],koning97:316,koning99:315,kooser:13,koskinen:353,kosztin:295,krau:13,kremer:[45,46,467],kress:[409,410],kspace:[],kspace_modifi:[],kspace_styl:[],kspce:12,kspring:249,kstart:290,kstop:290,kth:[227,274],kub:20,kubo:[6,91,314],kumagai:441,kumar:[9,406,407],kuronen:418,kurt:276,l12:408,l_box:385,l_skin:318,la3:163,lab:[5,7,12,111,417],label:[],laboratori:[0,248,281],lack:[3,248,385],lackmann:367,ladd:[268,316],lafitt:411,lag:318,lagrang:[130,131],lagrangian:[6,122,123,124,125,127,128,129,130,131,132,133,135,136,137,138,199,248,281,282,297,298,425,427,475],lagrangian_posit:[248,281],lagrangian_spe:[248,281],lai:449,lambda1:[440,441,442],lambda2:[440,441,442],lambda3:[440,442],lambda:[87,111,118,158,163,237,292,315,316,318,362,384,405,438],lambda_fin:315,lambda_initi:315,lamda:[3,53,306],laminar:435,lamm:6,lammps2pdb:[6,13],lammps_clos:6,lammps_command:6,lammps_extract_atom:6,lammps_extract_comput:6,lammps_extract_fix:6,lammps_extract_glob:6,lammps_extract_vari:6,lammps_fil:6,lammps_gather_atom:3,lammps_get_coord:6,lammps_get_natom:6,lammps_n:[6,12],lammps_open:6,lammps_potenti:[374,376,466],lammps_put_coord:6,lammps_quest:[6,224],lammps_scatter_atom:3,lammps_set_vari:6,lammps_sppark:6,lammpsplot:13,lammpspotenti:374,lammpstrj:[456,460,475],lammpsviri:[3,393],lamoureux:[6,219,443,475],lane:1,lang:475,langevin:[],langevin_drud:[149,218],languag:[6,11,12,17,453,480],lanl:9,lapack:12,laps:319,laptop:7,larg:[0,1,3,5,6,7,8,9,10,12,13,14,16,18,39,40,41,58,59,70,71,109,116,141,144,147,152,164,165,166,176,184,186,187,189,190,202,205,206,209,212,213,215,216,220,226,237,250,262,268,273,276,277,281,286,288,289,290,291,294,303,306,314,318,319,321,323,327,340,346,347,352,354,357,361,375,381,385,388,389,396,412,416,422,439,450,453,455,457,458,462,464,469,472,475,481,484],larger:[1,2,3,6,11,12,13,39,41,56,59,70,71,116,164,166,189,203,204,207,216,230,237,250,268,269,277,282,286,290,291,292,302,306,313,318,322,323,324,327,346,347,352,353,354,356,357,358,361,367,375,377,378,385,389,397,401,407,412,416,437,444,455,459,460,463,464,469],largest:[3,6,12,39,71,162,164,220,346,354,358,436,439,455,457,463,464,474,480],laroch:286,laser:318,last:[1,2,3,5,6,11,12,15,16,19,38,56,59,61,71,110,117,141,162,184,187,189,190,191,192,202,203,204,205,206,207,209,220,249,289,292,303,306,331,344,354,355,356,357,361,365,366,367,368,375,376,381,383,387,388,390,391,395,398,400,402,403,404,407,411,413,422,429,436,439,443,444,446,447,450,451,453,455,456,460,462,463,467,469,470,473,480],lat:408,late:5,latenc:[10,231],later:[6,11,12,16,17,40,59,71,104,166,168,203,216,254,268,276,295,313,329,331,346,354,355,360,361,363,367,453,455,457,459,469,472,480,482],latest:[7,202,203,204,205,206,207,292,457],latex:8,latgen:273,latitud:140,lattc:408,latter:[2,6,11,12,14,15,16,17,18,41,42,87,143,190,194,195,201,202,205,206,209,213,232,241,250,252,253,255,256,276,278,280,282,284,291,306,322,327,345,355,367,369,370,371,372,373,380,397,401,405,415,423,443,450,452,453,458,461,472,480,483],lattic:[],launch:[1,3,6,11,12,18,361,452,453],laupretr:340,lavend:190,lavenderblush:190,lavgevin:215,law:[6,248,359,425,427],lawngreen:190,layer:[6,9,71,193,205,314,318,321],layout:[1,3,17,166,452,455,464],lb_fluid:237,lbl:[7,9,162],lbnl:9,lbtype:237,lcbop:[],ld_library_path:[11,12],ldfftw:12,ldrd:7,lead:[2,3,6,12,22,25,39,41,44,59,61,77,87,116,158,162,168,172,190,194,195,204,209,216,228,237,254,281,291,294,306,313,314,321,333,340,346,351,356,361,374,377,397,401,403,427,449,455,465,475,480,481],least:[3,6,12,18,71,118,163,188,200,205,228,276,280,322,357,361,392,439,444,453,480],leav:[3,7,11,12,16,17,21,41,57,141,154,171,209,213,216,250,252,253,255,256,278,291,294,332,412,455,459,467],lechman:306,lectur:295,led:[3,5],lee2:408,lee:[199,408],left:[6,11,12,41,107,183,189,190,212,232,271,306,329,331,349,443,455,457,462,480,484],leftmost:[41,209],legaci:12,legal:7,lehoucq:417,leimkuhl:326,leiu:381,lemonchiffon:190,len:465,lenart:[378,387],length:[3,6,8,11,12,18,21,38,39,40,41,44,53,54,55,56,58,59,61,65,68,69,71,74,79,80,82,87,88,89,90,91,92,103,105,107,108,112,114,115,117,118,119,128,130,142,143,144,145,146,147,148,149,151,152,153,154,155,156,157,160,162,163,166,171,184,187,189,190,193,200,204,206,207,209,210,211,212,213,215,226,229,237,248,249,250,251,254,262,272,278,288,291,292,294,303,306,313,317,318,320,323,327,347,349,352,354,356,357,359,364,367,368,370,377,378,382,385,387,391,395,397,408,412,420,421,430,439,440,446,447,455,458,463,465,472,473,475,480],lengthi:226,lennard:[1,3,6,7,9,10,12,45,46,87,107,110,193,278,306,323,327,347,349,354,363,366,370,371,372,373,375,380,388,390,391,392,395,396,397,398,399,401,402,404,405,411,412,422,423,432,437,444,467,475],lenoski:[409,410],less:[1,3,6,13,14,15,16,17,18,38,41,56,57,58,59,76,108,115,116,143,157,184,190,202,204,205,206,207,209,211,212,213,215,216,223,232,248,250,272,284,286,292,306,325,326,328,347,349,354,358,361,367,372,388,389,406,407,412,422,438,439,442,447,455,480,481],let:[1,11,12,38,56,147,175,184,203,294,306,324,361,375,439,464,468,475,482],lett:[140,152,228,235,237,248,286,295,315,316,353,367,383,385,388,405,428,475],letter:[2,12,41,57,59,190,209,218,219,235,274,331,360,419],leuven:9,level:[2,3,8,11,12,14,17,187,189,194,195,231,247,249,250,331,347,360,367,371,372,397,398,401,411,420,421,452,464,469,480],lever:436,levin:389,lewi:296,lexicon:7,lgr_po:[248,281],lgr_vel:[248,281],lgvdw:421,li1:163,liang:376,lib:[1,3,9,11,12,14,15,17,285,361,376,393,453,456],libatom:[9,419],libcolvar:12,libdir:11,libfftw3:12,libgpu:15,libjpeg:12,liblammp:[11,12],liblammps_foo:[11,12],liblammps_g:[11,12],liblammpscuda:14,libmpi:11,libmpi_stub:12,libmpich:12,libpackag:12,libpng:12,librari:[],librt:17,licens:[0,7,8,12,189],lie:[6,292],lieu:346,life:7,lifo:8,ligand:303,liggght:7,lightblu:190,lightcor:190,lightcyan:190,lightest:313,lightgoldenrodyellow:190,lightgreen:190,lightgrei:190,lightli:303,lightpink:190,lightsalmon:190,lightseagreen:190,lightskyblu:190,lightslategrai:190,lightsteelblu:190,lightweight:306,lightyellow:190,like:[3,4,6,7,8,9,11,12,14,16,17,18,39,42,54,59,148,155,189,191,196,213,214,216,219,221,231,234,235,236,248,250,251,255,256,261,262,267,268,269,270,272,278,280,281,282,286,291,292,306,308,309,310,311,312,313,314,321,322,323,326,327,328,331,346,349,353,356,361,367,375,380,381,385,386,389,391,392,402,403,408,428,439,442,446,447,452,453,455,456,457,458,460,465,470,473,475,480,481],likelihood:[118,163,212],likewis:[1,6,10,12,15,18,39,41,71,88,115,199,209,210,211,226,234,235,250,251,254,269,286,306,309,310,311,347,356,362,366,367,377,383,386,437,453,455,467,480],lime:190,limegreen:190,limit:[],limit_eradiu:385,limit_veloc:[297,298],lindahl:346,line:[],linear:[],linearli:[10,117,190,215,273,323,325,326,328,355,356,358,455,480],lineflag:[6,455],lineforc:[],linen:190,linesearch:[8,352],ling:[9,13],lingo:[11,393],link:[5,6,7,8,9,11,12,13,14,15,17,18,22,37,44,55,63,172,183,189,193,211,231,235,276,285,287,295,303,333,341,364,374,408,419,420,421,437,443,453],linker:12,linkflag:[12,16],linux:[10,11,12,15,189,191,231],linuxamd64:456,liouvil:250,lip:13,lipid:[4,9,10,13,29,291],lipton:276,liquid:[6,7,9,29,39,40,41,59,87,141,150,162,209,213,215,226,250,278,281,286,313,380,412,415,441,464],lisal:436,lism:9,list:[],listen:[231,233],listfil:396,liter:[455,466],literatur:[8,408,438],lithium:385,littl:[1,3,12,64,250,357,450,458],littmark:[408,437,442,448],liu:[391,421],lj1043:[],lj126:[],lj12_4:423,lj12_6:423,lj1d:273,lj6:3,lj93:[],lj96:[],lj9_6:423,lj_flag:363,llnl:[5,7],lmp1:11,lmp2:11,lmp2arc:[],lmp2cfg:[],lmp2vmd:[],lmp:[11,453,475],lmp_auto:12,lmp_cuda:[14,17],lmp_foo:12,lmp_g:[6,11,12,13,17,345],lmp_gpu:15,lmp_ibm:[12,345],lmp_inc:12,lmp_intel_cpu:16,lmp_intel_phi:16,lmp_kokkos_cuda:17,lmp_kokkos_omp:17,lmp_kokkos_phi:17,lmp_linux:[4,6,12],lmp_mac:12,lmp_machin:[1,12,14,15,16,18,19,361],lmp_mpi:[12,274],lmp_mvapich:17,lmp_omp:18,lmp_openmpi:17,lmp_opt:19,lmp_win_mpi:12,lmp_win_no:12,lmpptr:[11,453],lmpqst:224,lmpsdata:13,lmptype:[3,12,224],load:[1,3,4,7,9,11,12,16,17,18,41,189,191,193,209,231,281,361,376,452,453],loadabl:11,loca:190,local:[],localhost:231,localized_lambda:199,localonli:12,localvector:63,locat:[3,6,8,9,11,12,27,61,116,118,162,163,173,184,187,216,217,237,305,316,327,352,374,377,386,387,397,399,401,443,452,455,456,458,465,467],lock:[3,360,480],lockstep:[213,250,278,291],log:[],logarithm:[136,137,480],logfil:[0,3,6,12,279,350,451],logfreq2:480,logfreq:[190,462,471,480],logic:[7,11,12,17,41,164,209,329,331,450,452,453,456,464,469,480],lomdahl:[254,399],london:[13,226,421],lone:[420,421],longer:[1,3,6,8,12,13,54,116,187,190,201,202,203,204,205,206,207,210,226,234,272,276,281,291,294,313,323,327,329,352,361,363,389,452,460,464,469,477],longest:[41,209,210,357,444],longitudin:303,look:[1,3,6,8,11,12,18,54,61,187,189,192,374,428,439,475,480],lookup:[3,39,184,412,439],lookup_t:292,loop:[3,4,6,7,11,12,18,39,42,65,68,69,79,88,92,108,115,116,141,189,202,205,206,210,211,220,313,329,331,345,348,354,356,357,359,360,382,450,451,453,459,460,463,464,469,474,480,481],loopa:[331,345,360],loopb:[331,345,360],loopvar:480,lopez:[250,251],lorant:282,lorentz:163,lose:[6,58,59,166,213,215,235,250,389,455],loss:[6,479],lossi:189,lossless:189,lost:[3,12,13,57,102,216,289,296,306,412,455,456,457,464,472],lot:[18,295,346],low:[1,3,6,7,12,41,147,162,187,189,209,219,235,268,286,291,314,321,347,421,439,447,469,475],lower:[2,3,6,9,11,12,41,57,59,71,88,153,186,189,190,203,204,205,206,209,213,219,231,234,235,237,250,281,286,314,321,323,324,329,330,346,349,360,378,408,469,476,478,481],lowercas:189,lowest:[140,331,355,465,469,470,480],ls_:134,lsfftw:12,lsurfac:318,lu3:163,lubric:[],lubricateu:[],lubricuteu:259,lucki:12,luigi:13,lumped_lambda_solv:199,lussetti:314,lustig:[7,13],lybrand:347,lyulin:340,m4v:189,m_c:475,m_d:475,m_eff:[324,389],m_fill:3,m_i:304,m_lambdai:417,m_taubi:417,m_u:237,m_v:237,m_yield_stress:417,mac:[12,14],mac_mpi:12,mach:[9,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,296,297,298,299,302,465],machin:[1,3,4,6,7,10,11,12,14,15,16,17,18,19,187,189,231,319,346,352,354,359,361,452,457,462,463,464,481,484],mackai:[9,237,239,240,241],mackerel:[6,20,170,235,372,467,475],maco:189,macro:17,macroparticl:382,macroscop:[7,229,248,417],made:[3,6,11,12,15,16,33,41,42,50,64,165,177,187,189,191,193,194,195,200,209,216,220,231,240,277,285,289,291,316,329,338,357,361,388,389,392,420,422,429,452,457,459,465,468,476,478,481,482],madura:[6,397],magazin:383,magda:323,magenta:190,magic:[3,11],maginn:[158,321],magnitud:[6,70,105,108,113,164,186,187,190,216,217,229,230,232,234,295,303,305,306,313,324,347,354,380,389,465],mai:[0,1,2,3,6,7,8,11,12,13,14,15,16,17,18,29,38,39,40,41,56,58,59,61,63,65,68,69,71,79,86,87,88,89,90,92,102,103,105,107,108,109,110,112,113,114,115,117,118,119,140,141,143,144,152,153,157,158,162,163,164,165,166,167,168,183,184,186,187,188,189,190,191,193,194,195,196,198,200,202,203,204,205,206,207,208,209,210,211,213,215,216,219,220,221,223,226,227,228,230,231,232,234,235,236,237,238,240,245,246,247,248,250,251,254,262,265,273,274,277,278,279,280,281,283,286,288,289,290,291,292,293,294,295,297,298,300,306,308,309,310,313,314,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,344,345,346,347,349,352,353,354,355,356,357,358,359,361,364,366,367,375,381,385,389,392,393,403,405,407,408,409,410,412,420,421,423,428,436,439,450,451,452,453,455,456,457,458,459,460,461,462,463,464,465,467,469,472,473,475,480,481,482,484],mail:[3,7,9,12,329],main:[3,6,8,12,231,237,291,315,316,383,443,453,470],mainboard:1,mainli:[361,415],maintain:[8,9,13,39,149,211,215,268,306,319,353,362,383,464,467],major:12,make:[],makefil:[3,7,9,11,12,13,14,15,16,17,18,19,187,347,361,453],makelist:12,maks:389,malloc:[3,12],manag:[5,8,12,187,231,274,308,464],manbi:428,mandadapu:199,mandatori:[8,187,214],manh:367,mani:[1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,38,39,41,42,56,61,63,68,71,88,91,102,116,144,164,165,184,186,187,188,189,190,191,193,194,195,196,200,201,202,203,204,205,206,207,209,210,211,212,213,215,216,223,226,227,230,231,237,238,246,248,250,251,254,262,271,272,273,277,280,282,283,284,286,288,291,292,294,306,317,318,320,329,331,346,354,355,356,357,359,361,374,376,382,385,387,391,392,428,437,439,440,442,453,455,457,459,460,462,463,464,465,467,468,469,470,480,481,484],manipul:[12,41,209,231,377,418,466],manner:[2,3,6,9,11,17,41,141,160,194,195,196,197,204,209,215,220,221,224,230,234,235,250,255,256,267,268,270,285,309,310,311,314,315,316,321,323,327,331,347,355,356,360,361,383,385,392,395,406,444,450,452,455,456,457,458,460,464,469],manolopoulo:233,mantissa:3,manual:[0,1,3,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,58,63,68,71,109,112,118,142,143,145,146,147,150,151,152,153,154,156,157,163,170,171,173,174,175,176,178,179,181,182,184,187,189,191,196,205,208,222,225,229,233,234,235,249,250,252,253,254,255,256,257,260,263,265,266,267,268,270,278,280,283,291,292,293,294,309,310,311,321,322,331,332,334,335,336,337,340,342,347,356,360,361,362,363,365,366,368,369,370,371,372,373,375,376,377,379,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,450,464,468,469,470,473,480],manybodi:[3,7,8,9,12,141,354,362,363,367,376,383,386,392,394,414,418,438,440,441,442,467],map:[2,3,11,12,17,18,39,59,64,71,118,122,140,152,163,164,186,189,190,199,205,273,290,346,347,349,356,362,363,367,376,383,384,386,392,393,394,408,409,410,412,414,418,419,420,421,428,436,438,439,440,441,442,452,455,457,469,480],map_fil:273,mapflag:12,march:408,margin:469,mari:13,mark:[390,405,425,427],marker:279,maroon:190,maroonmpi:11,marrink:390,marsaglia:[3,227,228,234,235,286],marseil:9,martin:[273,408],martinez:200,martyna:[250,251,291,464],mashayak:17,mask:[3,272,480],mask_direct:199,mass:[],mass_matrix:199,massdelta:294,massiv:[0,189,237,274,314,321],massless:[6,235,347,377,397,401,405,475],masstot:291,master:[3,356,450,469],mat:[67,199,376,441],match:[3,6,8,9,11,12,17,38,41,56,59,71,116,147,184,190,191,209,212,215,231,250,251,268,288,292,306,313,346,347,367,391,403,408,419,420,421,439,448,449,453,455,456,457,460,464,469,475,480],mater:[73,362,410,418],materi:[6,7,9,59,70,124,125,167,198,199,215,226,232,248,272,278,286,314,318,324,377,383,384,385,389,393,408,409,417,420,421,424,425,426,427,450,455,469,475,479],material_fil:199,math:[],mathemat:[118,140,163,164,194,195,196,197,208,213,221,227,229,230,232,234,235,279,293,300,309,310,311,323,326,328,428,451,458,465,481],mathrm:235,mathtt:235,matlab:[],matric:[9,140,228,273,388],matrix:[3,6,9,91,162,203,213,228,273,282,346,349],matter:[6,9,12,39,57,59,71,146,205,318,357,363,379,383,385,408,423,440,442,448],mattson:[112,141],max2theta:163,max:[3,6,8,12,15,18,71,117,190,204,209,211,213,216,277,294,306,331,349,352,354,356,357,361,450,455,469,473,480],max_alpha:8,max_cell_s:382,max_group:3,max_nn:298,max_travel:299,max_vel:[297,298],max_veloc:298,maxangl:226,maxbodi:3,maxbond:[3,211],maxedg:162,maxev:[354,450,469],maxfoo:8,maxim:[313,356],maximum:[3,6,8,15,17,25,41,42,45,53,54,57,59,61,116,117,118,121,162,163,165,166,186,187,198,203,204,209,211,215,216,220,226,262,272,277,282,294,296,297,298,306,319,346,347,352,356,357,364,367,382,387,406,407,455,458,463,473,480,481],maxit:[282,354,450,469,473],maxsize_restart:8,maxwel:[17,271],maxwell50:17,maxwell52:17,maxwell53:17,maxx:418,mayb:13,mayer:[7,368,370,437],mayo:[6,7,13,25,342,391,467],mbt:171,mbyte:[12,286],mcdlt:[154,230],mcgraw:274,mdash:475,mdregion:199,mdump:[41,209],meain:6,meam:[],meam_sw_splin:410,meamf:408,mean:[1,2,3,4,6,7,8,10,11,12,17,22,34,37,38,39,41,42,44,52,54,55,56,57,59,61,63,68,71,76,77,82,84,85,87,91,103,104,105,112,113,114,115,116,117,140,141,142,143,145,146,147,150,151,152,153,154,156,157,158,164,165,167,168,170,172,180,183,184,185,186,187,189,190,191,193,194,195,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,221,224,226,227,228,229,230,232,234,235,236,240,247,250,252,253,254,255,256,262,267,268,270,272,274,276,277,278,280,286,288,289,291,293,294,295,300,303,306,308,309,310,311,313,314,317,318,320,321,322,323,324,325,326,327,328,329,333,334,335,337,339,341,346,347,349,351,352,354,355,356,357,359,361,364,368,370,371,372,374,377,381,382,383,385,388,389,391,392,395,397,398,401,408,411,412,415,416,418,420,421,422,423,438,439,440,441,442,444,447,449,450,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,469,470,472,473,475,479,480,481,482,484],meaning:[116,124,125,127,130,134,392],meaningless:[67,313],meant:[6,291,443,459],measur:[],mech:417,mechan:[6,8,9,11,12,17,126,199,230,274,285,367,385,393,399,425,427,449,453,455],mechanic:285,mechanim:122,media:189,medium:447,mediumaquamarin:190,mediumblu:190,mediumorchid:190,mediumpurpl:190,mediumseagreen:190,mediumslateblu:190,mediumspringgreen:190,mediumturquois:190,mediumvioletr:190,mee:313,meet:[3,12,165,189,190,211,212,319,460],mehl:362,meloni:39,melros:[406,407],melt1:191,melt2:191,melt3:191,melt:[4,10,212,273,367,441],mem:15,member:[167,276,367],membran:[29,271,447],memori:[1,3,5,6,7,8,9,12,15,16,17,18,39,40,60,71,190,202,205,206,227,228,286,318,344,357,361,367,412,416,421,452,455],memory_usag:8,mendelev:383,mention:[1,6,7,11,42,215,230,237,254,323,349,356,363,420,421,457,480],menu:[189,231],mep:[249,356],mer:[4,10,212],meremianin:140,merg:[3,5,455],merz:[6,170,467],mescscop:417,mesh:[1,2,3,6,7,8,10,12,40,41,42,118,134,163,199,209,237,292,302,346,347,382],meshless:9,meso:[],meso_:[],meso_cv:465,meso_rho:[],meso_t:[],mesocop:40,mesoscal:7,mesoscop:[7,99,100,101,243],mess:[3,465],messag:[],met:[8,41,116,209,331,345,347,354,356,360,444,463],metadynam:[9,13,214],metal:[3,5,7,10,40,59,71,153,164,198,199,205,206,215,216,230,232,281,282,286,322,323,325,326,328,347,349,358,362,363,367,376,383,384,385,386,392,394,408,409,410,418,419,438,440,441,442,458,472,473,474,479],meter:[358,479],methan:[281,286],methanol:4,methin:340,method:[1,3,5,6,7,8,9,11,12,13,16,17,19,38,39,40,41,56,64,87,91,110,141,184,193,194,195,199,209,214,224,234,237,241,245,248,250,273,274,281,282,283,284,286,291,294,295,313,314,315,316,321,346,347,352,353,354,356,361,362,364,367,376,377,383,385,386,408,409,410,412,418,437,439,450,452,453,455,456,458,469,475],methodolog:[6,73,141,274,346],metin:[7,9],metric:[3,10,64,458,473],metropoli:[200,226,470],mezei:87,mf1:191,mf2:191,mf3:191,mg2:163,mglob_default_function_attr:12,mgoh:414,miai:286,mic:[12,17],micel:[4,13,304],micelle2d:[],michael:[9,13,410],michel:13,micro:[3,479],microcanon:[257,258,260,261,263,265,266],microelast:417,micromet:479,micropor:226,microscal:406,microsec:479,microsecond:479,mid:[5,59,215,436],middl:[3,6,8,16,22,41,44,77,87,116,153,158,162,168,171,172,190,194,195,201,209,277,289,290,291,314,321,332,333,351,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,406,407,408,409,410,411,413,415,417,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,446,447,448,449,453,463,464,465],middlebondtors:[3,171,455],midnightblu:190,midpoint:436,mie:[],might:[3,4,6,7,8,12,14,25,71,224,226,228,291,453,463,480],migrat:[3,8,17,41,42,59,61,65,69,79,92,108,115,187,193,209,272,280,286,306,346,358,361,463,482,484],mikami:[6,250,251],mike:[7,9,13,15,16],mil:[9,383],mill:353,miller:291,million:[3,7,10,39,41,71,209],mimic:[6,11,42,54,235,248,277,377,387,397],mimim:[213,356],min2theta:163,min:[3,4,6,8,12,117,140,190,204,346,349,436,450,469,480],min_cap:3,min_cg:8,min_clearstor:8,min_dof:8,min_modifi:[],min_nn:298,min_popstor:8,min_post_forc:8,min_pre_forc:8,min_pushstor:8,min_setup:8,min_setup_pre_forc:8,min_step:8,min_stor:8,min_styl:[],minarea:162,mincap:421,mind:[7,227,273],mine:[12,88,154,155,193,329,477],minim:[],minima:[176,342],minimi:[356,444],minimizaiton:356,minimizi:286,minimum:[3,25,26,27,42,45,57,59,86,105,117,162,163,165,167,173,186,187,189,198,204,213,214,220,233,249,288,290,292,296,298,302,306,323,327,331,342,346,349,352,353,354,356,357,372,385,388,390,391,397,399,401,406,407,421,423,436,450,463,469,480,481],minlength:162,minmiz:[8,213],minn:9,minord:[3,346],mintcream:190,mintmir:[7,282,377,437],minu:[12,59,144,215,331,356,480],minut:[4,8],mirror:[61,325],misc:[],miscellan:[2,199],mise:[133,138],mishin:[362,437],mismatch:[3,6],miss:[3,5,12,167,204,226,262,286,306,396,412,472,473],mistak:[3,480],mistakenli:3,mistyp:3,mistyros:190,mitchel:[6,111,146,346,347,379,417],mitchell2011:417,mitchell2011a:417,mitur:365,mivi2:286,mix:[1,3,6,9,14,15,16,71,115,204,205,319,346,347,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,453,455,468,475,482],mixtur:[6,40,250,291,306,328,375,408,455],mixture_ref_t:408,mjpeg:189,mkdir:466,mkl:12,mkmk:273,mkv:189,mldivide3:3,mlpark:7,mlutipl:207,mn2:163,mn3:163,mn4:163,mo3:163,mo5:163,mo6:163,mobil:[6,105,141,142,143,145,150,157,189,291,329,330],moccasin:190,mod:[],mode:[1,3,6,9,11,12,13,14,15,16,17,18,61,66,75,88,90,93,104,106,114,116,117,144,159,161,162,163,187,189,190,204,207,214,215,224,228,250,274,286,295,306,346,358,361,377,385,452,457,462,464,473,479,484],model:[],model_ar_p_mors:393,modern:[12,234,236],modest:[1,359],modif:[6,13,87,408,422,442,475],modifi:[],modify_param:8,modin:199,modul:[3,9,11,12,13,214,286,453],modular:8,modulo:[3,480],modulu:[278,389,408,417,424,426],mofil:456,mol1:480,mol:[3,9,71,113,164,166,167,187,190,214,216,226,231,234,277,280,291,294,302,308,380,388,423,464,465,475,480],molchunk:[66,75,90,93,104,106,144,159,161,202],mole:[200,383,479],moleclu:[210,211,216,223],molecul:[],molecular:[0,2,3,5,6,7,8,9,12,13,39,40,53,71,108,113,115,142,143,145,147,150,151,152,153,156,157,164,165,166,167,168,176,187,188,191,199,211,214,226,233,273,274,281,285,286,290,295,317,318,347,355,364,365,367,371,382,385,392,437,455,456,457,459,460,464,465,467,473,474,475,480],molfil:[],molfrac:[216,277],molnar:295,molp:109,moltempl:[],mom:[6,91,290,481],momementum:[143,252,255,258,259,260,267],momemtum:66,moment:[3,6,40,42,82,84,85,106,113,143,157,164,185,187,234,237,240,265,277,291,304,355,380,384,455,465,475,479],momenta:[228,259,321,385],momentum:[],momon:212,monaghan:[9,431,432,434],monitor:[3,6,96,97,147,213,215,216,223,231,234,248,250,277,279,281,291,294,306,354,356,380,473],mono:[73,406],monodispers:[3,324,369,389,406,407],monom:[13,54,212],monoton:[3,295,317,356,469],monoval:347,mont:[6,7,9,193,200,212,226,291,313,382,437],montalenti:[450,469],month:0,moor:[17,141],more:[0,1,2,3,4,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,58,59,61,62,63,64,65,67,68,69,70,71,72,77,78,79,80,83,86,87,88,90,92,96,97,98,99,100,101,102,103,105,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,146,147,148,150,151,152,153,155,156,157,158,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,193,194,195,196,197,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,223,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,272,273,274,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,302,306,308,309,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,340,341,342,344,346,347,349,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,450,451,452,453,455,456,458,459,460,461,462,463,464,465,466,467,468,469,470,472,475,480,481,482,483,484],morefoo:8,moreov:[210,211],morri:[],morriss:[152,268],mors:[],morse_f:439,mosel:353,mosi2:408,moskalev:140,most:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,18,19,37,39,41,55,71,108,152,162,183,187,189,190,202,204,205,206,207,209,210,211,213,230,250,251,274,279,280,281,282,291,292,319,321,329,331,341,347,353,357,359,361,363,385,388,408,419,420,421,442,450,451,452,457,464,469,473,480,482],mostli:[8,9,11,13,71,166,189,357,455,464,467,480,483],motiion:6,motion:[3,6,7,9,42,86,97,142,143,145,147,149,150,151,152,153,154,156,157,215,219,228,237,240,241,247,250,251,254,268,272,274,276,286,290,291,314,318,324,327,356,380,385,406,407,458,464,475],motiv:272,mous:231,mov:189,move:[],move_tri_surf:134,movement:[3,6,12,247,313,354,473],movi:[],mp4:189,mpeg:189,mpg:189,mpi4pi:11,mpi:[],mpi_allreduc:[291,453],mpi_barri:1,mpi_cart:452,mpi_cart_cr:452,mpi_cart_get:452,mpi_cart_rank:452,mpi_cart_shift:452,mpi_comm:6,mpi_comm_world:11,mpi_get_processor_nam:452,mpi_inc:12,mpi_lib:12,mpi_lmp_bigint:3,mpi_lmp_tagint:3,mpi_path:12,mpi_wtim:12,mpicc:11,mpich2:12,mpich:[12,14,15,16,17,18,361],mpicxx:[12,16,17],mpiexec:[12,14,15,16,17,18,361],mpiio:[3,187,190,457,462,484],mpirun:[6,11,12,14,15,16,17,18,19,274,345,361],mplayer:189,msd:[],msi2lmp:[],msi:13,msm:[],msmse:[118,163,292],msst:[],mtchell2011:417,mtchell2011a:417,mtd:214,mth:[8,119,190,472],mtk:[250,251,254],mtotal:355,mu_j:29,muccioli:388,much:[1,3,6,11,39,187,189,213,281,313,357,358,361,388,422,450,453,469,475,480],mui:[113,187,221,308,455],mukherje:[7,9,276],mulder:317,muller:[6,91,193,314,321,411],mult:8,multi:[],multibodi:[3,61,276],multicent:385,multicor:[1,452,468],multidimension:13,multielectron:364,multilevel:[346,347],multiphys:11,multipl:[],multipli:[3,87,91,116,172,183,194,195,203,234,237,272,278,349,354,363,455,480],multiprocessor:361,multiscal:11,multisect:[41,209],multistag:87,multitud:7,mundi:269,munich:9,murdick:367,murti:441,murtola:346,must:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,56,57,59,61,62,71,82,84,86,87,104,107,109,112,115,116,117,118,119,143,146,153,157,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,184,185,186,187,188,189,190,191,194,195,196,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,219,221,224,226,227,228,230,231,232,233,234,235,237,238,239,240,241,245,246,247,248,249,250,251,252,253,254,255,256,258,259,260,262,265,267,270,272,276,277,278,279,280,281,282,284,286,288,289,290,291,292,293,294,300,302,303,305,306,309,310,311,313,314,316,317,318,320,321,323,324,325,326,327,328,329,331,332,333,334,335,336,337,338,340,342,346,347,349,351,354,355,356,357,358,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,425,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,450,451,452,453,455,456,457,458,460,462,463,464,465,466,469,470,472,473,475,479,480,481,482,484],mutli:6,mutlipl:455,mutual:[3,349],mutut:464,muvt:226,mux:[113,187,189,221,308,455],muz:[113,187,221,308,455],mv2_comm_world_local_rank:12,mvapich2:[17,361],mvapich:12,mxn:[12,274],my_ga:226,my_one_wat:226,my_post_process:466,my_qeq:282,my_setup:466,my_swap_region:200,myblock:[216,277],mybox:166,mychunk1:114,mychunk2:114,mychunk:[6,66,75,90,93,104,106,144,159,161],mycmap:455,mycom:204,mydump:[187,190],myer:[5,7],myfil:[452,480],myfix:[200,470],myflux:91,myforc:[187,483],myhug:254,myke:91,mymol:[40,294,355],mympi:11,mymultipli:[453,480],myn:453,mype:91,mypi:480,mypress:245,myramp:141,myrdf:[116,207],myregion:329,myrigid:[83,98,277],mysocket:233,myspher:[190,327],mystr:331,mystress:91,mytemp:[2,102,142,143,145,147,148,150,152,157,245,331,345,360,472,481],myz:455,n_dephas:450,n_element:188,n_f:[281,286],n_hbond:391,n_ij:389,n_ion:318,n_k:227,na1:163,nabla:318,nacl:[4,6,408],nacl_cs_x0:6,nakano:[282,284,356],namd:[7,9,187,231],name1:[158,215],name2:[158,215],name:[0,1,2,3,5,6,8,9,11,12,13,33,42,50,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,177,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,252,253,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,273,274,275,276,277,278,279,280,281,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,319,320,321,322,323,324,325,326,327,328,329,330,331,338,344,345,347,348,350,355,356,360,362,363,367,370,383,384,386,388,389,392,393,394,396,408,409,410,414,418,420,421,428,438,440,441,442,443,445,452,453,455,456,457,458,462,465,468,470,471,473,475,480,481,482,483,484],namespac:[6,8,12],nan:3,nangl:[3,455],nangletyp:[355,455,465],nano:[291,479],nanoindent:70,nanolett:291,nanomet:[187,190,479],nanoparticl:[209,291],nanosec:479,nanosecond:479,nappli:224,narea:3,narrow:[6,184],narulkar:[440,442],nasa:7,nasr:273,natdef:3,nation:[0,7,12,111,417],nativ:[1,6,7,12,16,17,187,191,456],natoli:[9,19],natom1:115,natom2:115,natom:[6,11,39,355,453,455,472,473,480],nattempt:277,natur:[6,9,140,215,250,272,286,324,383,385,386,408,418,452,480],navajowhit:190,navi:[190,383],navier:237,nb3:163,nb3b:[],nb3bharmon:414,nb5:163,nbin:[116,204,205,206,314,321],nbodi:[240,291],nbond:[3,113,455],nbondtyp:[190,355,455,465],nbot:367,nbounc:306,nbrhood_cutoff:421,nbtype:115,nbuild:473,ncall:224,nchar:190,nchunk:[3,6,66,71,75,90,93,104,106,114,144,159,161,202],ncoeff:428,ncount:[202,203],nd3:163,ndanger:473,nden:[6,91],ndihedr:[3,455],ndihedraltyp:[355,455],ndim:205,ndirango:291,ndof:[250,254],ndoubl:455,ndp:475,ndx:330,neal:291,nearbi:[7,62,165,216,247,283,306,327,357,363,406,407,437,447,475],nearest:[3,70,71,73,162,165,237,249,272,313,327,346,396,408,439,480],nearli:[6,18,54,59,209,234,306,385,412,450,453,459,467],neb:[],neb_combin:356,neb_fin:356,neb_log:469,neb_step:469,neb_styl:469,necessari:[6,9,11,12,13,15,17,33,61,87,172,177,183,191,209,213,214,226,227,285,306,319,329,346,361,405,412,455,456,460,463,464,465,469,475,483],necessarili:[12,286,313,334,335,337,349,412,481],necessit:280,need:[1,2,3,5,6,7,8,9,11,12,13,14,15,16,17,18,19,33,37,38,39,40,41,42,50,54,55,56,58,61,63,64,67,70,72,73,77,82,91,102,104,109,112,128,140,141,142,143,144,145,147,150,151,152,153,154,156,157,164,166,170,172,177,183,184,186,187,188,189,190,194,195,196,197,199,200,202,203,204,205,206,207,209,210,211,213,214,215,219,221,224,225,226,230,231,233,234,235,237,243,244,250,262,273,277,278,280,286,290,291,295,302,306,314,317,318,320,321,322,323,329,338,341,346,347,355,356,357,358,361,362,363,364,365,367,368,369,370,371,372,373,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,446,447,450,453,455,456,457,458,460,462,463,465,467,468,469,475,480,482,483,484],needless:[6,357],neeed:9,neelov:347,neg:[3,6,12,27,46,65,69,89,102,108,115,140,141,166,168,173,175,184,189,213,215,216,227,254,272,295,303,317,321,323,328,346,353,386,400,408,437,455,458],neglect:[391,407],neglig:[11,87,250,438],neigh:[2,3,12,15,361],neigh_modifi:[],neighbor:[],neighborhood:[26,122,428],neighbour:235,neighobr:[6,377,397,401],neither:[2,3,12,41,63,199,212,215,216,363,369,385,406,407,460],nelem:428,nelement:[362,383],nemd:[],nest:[2,331,343,360,480],net:[3,6,11,39,86,88,145,156,230,272,282,291,407,421],netpbm:189,network:[12,187,210,211,231,452],neumann:346,neutral:[3,88,226,346,377,397],never:[7,12,63,71,193,203,213,226,250,272,294,308,319,323,326,328,346,357,383,408,428,452,455,469,472,480],neveri:[3,8,71,196,201,202,203,204,205,206,207,210,211,212,237,238,273,282,283,284,287,288,292,314,320,321,356,460,469],newatom:216,newer:[12,202,408],newfil:[343,345],newli:[216,475,481],newlin:190,newn:291,newt:151,newtemp:[63,102],newtion:[367,418],newton:[],newtonian:227,newtyp:[3,211],next:[],neyt:313,nfile:[3,38,56,184,187,190,439,457,462,484],nfirst:460,nfirt:460,nfreak:292,nfreq:[39,71,201,202,203,204,205,206,207,209,288,292,460],nghost:[3,12],ngp:105,ngpu:361,nguyen:[15,367],nharmon:[],nhc:274,nht:291,ni2:163,ni3:163,ni_000:[118,292],nialh_jea:383,nialhjea:[374,392],nice:[6,8],nickla:410,nimprop:[3,455],nimpropertyp:[355,455],nine:[127,134,386],ninteg:455,nissila:237,nist:[362,383,479],niter:[41,209],nitrid:377,niu3:[374,383,392],nkb:281,nlast:460,nline:355,nlocal:[3,8,11,12,224],nlog:347,nmax:42,nmin:42,nmol:455,nmpimd:274,nn2:408,nneighmaxdef:3,no_affin:[16,361],no_gradient_correct:427,no_histori:6,no_velocity_gradi:427,noced:354,nocheck:396,nocit:12,nocoeff:482,nodal:[6,38,56,184,199,318,439],node:[1,3,12,14,15,16,17,18,41,118,122,163,188,209,231,237,318,361,396,452,468],node_area:237,node_group:199,nodeless:385,nodeset:199,nodeset_to_elementset:199,nof:184,noforc:[],nois:[6,227,228,234,235,236,237,281,286,291,310,318],nomenclatur:[6,71,205,349],nomin:[187,250],non:[],nonbond:[4,12,414,437],none:[],noneq:228,nonequilibrium:[9,315,316,385],nonetheless:234,nongauss:[],nongaussian:105,nonlinear:[],nonloc:[417,465],nonperiod:3,nonzero:3,noordhoek:376,nopreliminari:184,nor:[2,3,41,59,199,296,297,298,299,300,302,376,424,425,426,427,455,458],nord:[418,440,442],norder:452,nordlund:[418,440,442],norm:[6,12,63,117,193,202,205,206,292,297,298,354,356,436,472,473,479],normal:[3,6,9,10,11,12,39,41,58,61,63,67,70,71,73,88,91,102,112,116,117,149,152,164,165,166,184,190,193,202,203,204,205,206,209,213,215,216,225,226,230,234,235,247,250,262,272,274,275,282,286,288,289,295,306,307,309,310,311,318,323,324,327,328,332,334,335,337,351,353,354,356,361,375,376,388,389,392,436,448,449,450,453,455,457,458,460,461,465,469,472,473,475,479,480,483],norman:318,nornal:3,nose:[6,7,8,154,193,219,234,235,250,251,252,253,254,255,256,267,268,269,270,274,278,286,291,309,310,311,316,381,475],noskov:[443,475],noslip:[306,328],notabl:[5,39],notat:[6,63,70,140,158,193,247,250,383,480],note:[1,2,3,6,7,8,11,12,13,14,15,16,17,18,22,24,25,28,29,32,33,35,36,37,38,39,40,41,42,44,47,54,55,56,58,59,60,61,62,63,65,66,68,69,71,73,75,79,87,89,90,91,92,93,97,104,105,106,108,110,112,113,114,115,117,118,119,140,141,144,146,147,148,152,154,158,159,161,162,163,164,165,166,167,168,170,172,175,177,181,183,184,187,188,189,190,191,193,194,195,196,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,219,220,221,223,224,226,228,229,230,232,233,234,235,236,237,245,246,247,248,250,252,253,254,255,256,262,267,268,270,274,276,277,278,280,281,282,284,289,290,291,292,295,303,304,306,309,310,311,314,317,318,320,321,322,323,324,327,328,329,331,332,333,334,335,337,341,345,346,347,349,351,354,355,356,357,361,362,363,367,368,370,371,372,374,375,377,378,380,381,382,383,386,388,389,390,391,392,395,396,397,399,401,405,406,407,408,409,410,411,412,414,418,420,421,422,423,425,427,428,429,432,436,438,439,440,442,444,447,450,452,453,455,456,457,458,459,460,462,463,465,467,469,470,472,473,475,479,480,481,483,484],noth:[200,233,348,361,453,466],notic:[0,6,7,8,12,316,318,475],noutcol:8,noutput:273,noutrow:8,novemb:408,novik:13,novint:231,now:[2,3,6,9,11,12,13,46,61,62,71,187,194,195,211,227,231,232,291,324,327,347,349,383,385,389,420,421,429,451,456,475,481],nowait:231,nozforc:346,np3:163,np4:163,np6:163,npair:[116,203],nparticl:[3,40,42,366],npartit:473,npernod:[14,15,16,17,18,361],nph:[],nphi:[16,361],nphug:[],npoli:277,nproc:[3,187],npt:[],npt_aspher:[252,256,267],npt_sphere:[253,270],nrecomput:382,nrepeat:[71,201,202,203,204,205,206,207,288,292,460],nreset:[213,250,251,254],nreset_ref:213,nrho:[362,383],nrl:383,nsampl:382,nsbmax_most:3,nsec:474,nskip:[119,460],nsq:[3,358,416],nstart:[119,203,204,207,292,455,460],nstat:272,nstep:[3,13,213,250,329,433,453,456],nsteplast:453,nstop:[119,460],nswap:[314,321],ntabl:[38,56,184,439],nterm:295,nth:[12,77,116,117,187,190,204,215,460,470],ntheta:367,nthread:[3,361],ntild:273,ntpc:361,ntptask:361,ntype1:115,ntype2:115,ntype:[3,140,164,187,190,200,282,284,385,391,418,455,465],nuclear:[9,96,97,150,228,251,281,286,355,385,448],nuclei:[9,96,97,148,150,155,236,251,261,269,312,364,385,455],nucleu:[96,97,282,442,475],nudg:[4,6,7,193,249,353,356],nulcear:9,num:2,num_of_collis:3,numa:[1,3,12,361,452],numactl:16,number:[1,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,22,27,38,39,40,41,42,44,56,63,64,65,66,68,69,70,71,73,75,76,77,78,79,80,87,90,91,92,93,102,104,106,108,111,112,113,114,115,116,117,118,119,129,135,140,142,143,144,145,146,147,149,150,151,152,153,154,156,157,158,159,161,162,163,164,165,166,167,168,172,173,183,184,186,187,188,189,190,191,193,194,195,198,200,202,203,204,205,206,207,209,210,211,212,214,215,216,223,224,226,227,228,230,231,232,233,234,235,236,237,240,247,250,251,254,262,272,273,274,276,277,280,281,282,286,288,291,294,298,306,307,308,310,313,314,315,316,318,319,320,321,323,325,326,328,329,331,333,344,346,347,349,351,352,354,355,356,357,358,361,362,363,367,369,374,376,381,382,383,384,385,386,391,392,393,394,395,408,409,410,412,414,418,419,420,421,422,425,427,428,436,438,439,440,441,442,444,445,448,449,450,452,453,455,456,457,458,459,461,462,463,464,465,467,469,470,472,473,475,479,480,481,484],number_of_a:3,number_of_b:3,number_of_typ:200,numbond:3,numer:[1,2,3,6,9,12,22,38,41,42,44,56,71,77,87,116,158,168,172,184,187,189,190,194,195,196,198,199,202,205,207,221,227,230,234,247,250,274,291,294,318,323,325,326,328,329,333,351,354,355,374,380,392,408,412,420,421,427,439,448,449,453,455,462,465,471,472,473,480],numpi:11,nvalu:[202,205,206,207,453],nvaluelast:453,nvc_get_devic:15,nvcc:[1,12,17],nve:[],nve_aspher:[252,255,267],nve_spher:[253,256,270],nvida:17,nvidia:[1,3,9,12,14,15,17,361,468],nvt1:475,nvt2:475,nvt:[],nvt_aspher:[252,255,270],nvt_sphere:[253,256],nvtfe:199,nwait:273,nwchem:7,nxnode:318,o_cor:146,o_shel:146,oascr:7,obei:[3,215,349,450],ober:7,obj_shared_foo:12,obj_target:12,object:[6,8,11,12,15,40,42,189,213,231,237,240,277,295,302,354,453,458],observ:[250,281,309,310,313,314,321],obsolet:13,obstacl:[4,232],obtain:[1,3,9,12,29,73,87,162,191,195,225,228,237,254,273,274,313,346,363,380,408,412,419,440,442,464],obviou:[12,480],obvious:[189,470,480],occ:387,occasion:[3,450],occlus:189,occup:[3,162,387],occur:[1,3,6,9,11,12,14,17,39,57,59,61,62,71,86,105,162,165,167,184,187,190,200,209,212,213,215,226,229,232,240,248,262,282,291,306,315,328,329,331,346,357,361,382,385,405,421,450,452,453,460,464,469,472,480],occurr:[340,455,469,480],octahedr:25,octant:452,odd:[41,190,209,250,291,309,310,318,470],off:[1,3,6,12,14,15,16,17,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,43,44,45,46,47,48,49,50,51,53,54,55,56,59,61,65,69,71,107,108,109,112,113,115,140,141,142,147,151,162,163,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,189,190,193,196,200,207,208,211,212,222,225,226,227,229,231,234,235,240,250,252,253,254,255,256,257,262,265,267,268,270,276,278,279,283,291,293,294,306,309,311,321,322,323,327,332,333,334,335,336,337,338,340,341,342,346,347,354,356,357,359,361,362,363,365,368,369,370,371,372,373,375,376,377,379,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,415,417,421,422,423,425,427,429,436,437,438,439,440,441,442,444,446,447,448,450,451,452,455,457,462,464,467,468,469,477,479,482,484],offend:[3,453],offer:[6,14,18,167,353,377,450,464],offic:7,offload:[1,12,16,17,231,361],offset:[3,6,57,164,189,215,216,226,277,355,377,397,401,437,455],offsit:8,often:[1,3,6,7,12,13,14,15,16,17,18,37,55,71,158,183,189,196,204,207,209,213,224,231,250,274,292,341,349,353,354,356,357,358,361,376,381,397,440,442,450,469,475,479],ohio:410,old:[3,6,9,193,213,216,250,408,420,429,456,459,463,466,479,482],older:[3,5,12,13,17,190,202,213,250,429],oldlac:190,oleinik:367,olfason:[6,25,342,391,467],oliv:190,olivedrab:190,ollila:[237,239,240,241],olmst:[199,272],omega0:342,omega:[],omega_dot:250,omega_ijk:442,omega_ik:440,omegai:[113,187,308],omegax:[113,187,308],omegaz:[113,187,308],omgea:6,omiss:[0,7],omit:[184,190,325,371,380,401],omp:[],omp_num_thread:[3,16,18,361],omp_proc_bind:17,ompi_comm_world_local_rank:12,on_the_fli:199,onc:[0,1,2,3,6,11,12,16,40,41,59,60,63,71,91,104,170,188,189,190,193,194,195,209,210,211,216,224,226,228,235,273,280,291,306,314,319,321,329,352,355,356,357,388,390,392,393,418,422,452,453,462,469,472,475,480],onelevel:452,onewai:[],ongo:231,oniom:[9,285],onli:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,59,60,61,63,64,65,66,67,68,69,70,71,72,73,75,78,79,80,83,86,87,88,90,92,93,96,97,98,99,100,101,102,104,105,106,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,147,148,150,151,152,155,156,157,158,159,161,162,163,164,167,168,170,171,173,174,175,176,177,178,179,181,182,183,184,187,188,189,190,191,193,194,195,196,197,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,219,221,222,223,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,271,272,273,274,275,276,277,278,280,281,282,283,284,285,286,287,288,291,292,293,294,295,296,297,298,299,300,302,306,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,334,335,336,337,338,340,341,342,344,346,347,349,351,354,355,356,357,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,452,453,455,456,457,459,460,462,463,464,465,466,467,469,470,471,472,473,475,480,481,482],only_group:162,onn:464,onset:[281,340],ontario:9,onto:[140,166,212,216,237,436],onward:2,open:[],opencl:[1,3,7,15,361],opengl:6,openkim:9,openmp:[1,3,7,9,12,16,17,18,361,468],openmpi:[12,14,15,16,17,18,361],opensourc:7,oper:[],opl:[],oppos:[6,39,185,187,290,325,347,355,455],opposit:[6,70,198,234,241,272,291,321,356,377,405,443,453],opt:[],optic:143,optim:[],option:[],optionn:17,orang:[2,189,190],orbit:[282,284,367,377,385,437],orchid:190,order:[1,2,3,6,9,11,12,14,16,27,38,39,41,56,59,65,69,71,79,87,89,90,92,93,108,112,115,130,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,168,173,183,184,187,189,190,193,196,201,203,204,205,206,207,208,210,211,212,213,214,219,221,226,228,230,231,233,237,238,240,248,250,272,280,281,285,288,289,290,291,292,293,294,295,300,302,307,313,317,318,319,320,330,331,332,334,335,337,340,341,346,355,356,362,363,364,367,376,382,383,385,386,388,389,392,394,397,405,408,420,421,422,437,438,439,440,441,442,443,445,450,452,453,455,456,460,462,464,465,469,472,475,480,484],orderomg:3,ordinari:[111,391,417],org:[6,7,11,12,13,14,419],organ:[0,3,6,7,8,376],organis:[425,427],organometal:25,orient:[],orienti:42,origid:202,origin:[3,6,7,9,12,71,81,103,104,114,118,160,164,166,186,189,190,193,194,195,202,205,206,210,211,215,219,235,247,250,268,274,277,287,291,292,299,305,316,343,345,346,349,353,362,363,365,367,377,380,381,382,383,391,394,408,417,420,421,440,442,443,444,452,455,456,457,458,459,460,479,482],origin_i:206,origin_x:206,origin_z:206,ornl:[7,9,15],orsi:29,ortho:[3,59,166,455],orthogon:[],orthograph:189,orthong:59,orthongon:[59,291],orthonorm:216,orthorhomb:281,os4:163,oscil:[6,9,149,211,215,218,219,235,247,248,250,281,286,291,323,324,326,328,355,364,443,475,480],oscillatori:[247,299],oserror:11,other:[],otherwis:[1,3,12,14,16,17,18,37,39,55,71,102,111,118,143,144,157,165,183,190,191,200,202,210,211,215,224,226,228,235,250,291,341,342,354,361,369,392,396,406,407,418,445,450,453,455,456,475],otyp:[377,397,401,405],ouml:475,our:[5,6,7,8,13,237,294,412,440,442,475],out:[1,2,3,6,7,8,11,12,13,14,18,19,21,41,64,66,71,75,90,91,93,94,97,103,104,105,106,107,114,115,142,143,144,145,147,148,150,151,152,153,154,156,157,159,161,167,171,187,189,190,191,193,205,209,210,211,214,222,225,226,232,234,237,242,262,273,275,276,277,286,287,288,291,303,318,327,329,330,331,332,334,337,344,345,349,352,356,360,385,392,437,449,450,452,453,455,458,459,460,462,463,464,466,469,471,472,473,476,478,480,481,482,483,484],outcom:[291,481],outer2:[372,390],outer:[3,8,16,220,232,331,345,352,354,360,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,415,417,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,445,446,447,448,450,463,464,469,474],outer_distance_cutoff:391,outermost:[38,56,194,195,247,250,357,439,464],outfil:[13,452],outlin:[6,189],outmost:231,outpt:12,output:[],output_frequ:199,outputss:127,outsid:[3,57,59,71,154,164,186,187,188,189,190,191,204,205,216,226,232,291,292,306,311,312,325,326,328,329,344,356,368,370,377,385,397,399,415,423,453,455,456,458,465,472,481],outuput:202,outut:6,outward:[162,323,327,328,455,464],over:[1,3,5,6,7,9,12,16,18,27,39,41,42,55,60,65,68,69,71,79,80,87,88,89,90,92,101,103,105,108,115,116,125,126,132,137,140,141,144,147,150,158,160,173,184,189,191,193,194,195,201,202,203,204,205,206,207,208,209,210,211,215,216,224,227,228,232,234,235,236,240,248,249,250,251,252,253,255,256,267,268,269,270,272,277,278,281,288,289,290,291,292,295,303,306,309,310,311,312,314,317,320,321,323,325,326,327,328,329,332,345,348,356,357,358,361,375,381,383,384,385,386,391,406,408,418,428,429,437,438,440,441,442,451,452,453,458,460,461,463,464,469,472,473,480,481],overal:[6,18,25,59,158,213,219,250,251,274,294,306,331,352,385,391,392,428],overalap:291,overcom:[262,306],overflow:[3,355,357],overhead:[6,11,19,41,190,202,205,206,209,223,280,357,358,458],overkil:291,overlai:[],overlaid:7,overlap:[3,13,16,62,76,164,167,184,190,198,201,202,204,205,206,207,216,220,262,277,282,288,291,292,306,324,328,346,349,352,354,355,361,381,385,389,392,395,405,424,426,429,444,455,458,464],overload:1,overrid:[3,12,14,17,22,44,71,150,164,172,189,190,194,195,213,220,245,250,333,346,357,374,391,392,408,412,420,452,453,465,467,472,480],overridden:[6,164,189,254,291,406,412,429,437,463,480,482],overview:[],overwrit:[11,12,22,44,172,190,202,203,204,205,206,207,292,333,344,350,374,408,453,456],overwritten:[279,317,344,391,392,450,451,456],own:[3,4,6,7,8,11,12,13,15,17,39,41,59,61,63,65,66,69,71,73,75,79,90,92,93,104,106,113,114,115,117,119,144,147,159,161,162,187,190,193,199,201,202,203,204,205,206,207,209,212,213,215,224,227,228,234,235,237,245,248,250,252,253,254,255,256,267,268,270,274,278,286,291,292,309,310,311,320,346,356,361,363,367,376,384,394,418,420,421,438,440,441,442,452,465,472,481],oxford:[29,87,380],oxid:[376,377],oxygen:[6,40,223,377,397,401,455],oxygen_c:146,p_e:318,p_ik:418,p_pi:367,pacakg:[3,4,12,40,361],pack:[5,8,67,324,361,367,408],pack_bord:8,pack_border_bodi:8,pack_border_hybrid:8,pack_border_vel:8,pack_comm:8,pack_comm_bodi:8,pack_comm_hybrid:8,pack_comm_vel:8,pack_exchang:8,pack_restart:8,pack_revers:8,pack_reverse_comm:8,pack_reverse_hybrid:8,packaag:361,packag:[],packakg:15,packet:[7,9,40,189,364,385],pad:[3,187,189,190,274,480],padua:[9,13],page:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,22,37,40,42,44,55,57,59,63,66,68,75,87,90,93,102,104,105,106,107,109,112,114,117,119,141,143,144,157,159,161,164,165,166,172,183,187,188,189,190,191,193,194,195,200,201,202,203,204,205,206,207,216,226,233,234,235,245,250,251,255,256,260,267,268,269,270,277,280,291,303,306,309,310,311,320,324,327,329,331,333,341,345,354,355,356,357,361,362,363,366,374,376,377,383,384,386,391,392,394,395,408,409,410,412,414,418,419,428,437,438,440,442,444,453,455,456,457,458,460,463,464,465,467,472,473,480,481,482,483],pai:[15,18],pair:[],pair_:[87,194,195],pair_airebo:394,pair_charmm:405,pair_class:8,pair_coeff:[],pair_eam:362,pair_eff:150,pair_foo:8,pair_hybrid:[392,443],pair_interact:199,pair_list:396,pair_lj:405,pair_lj_cut:8,pair_lj_soft_coul_soft:87,pair_modifi:[],pair_sph:[430,431,432,433,434,435],pair_styl:[],pair_writ:[],paircoeff:3,pairfoo:8,pairij:[3,455],pairkim:3,pairstyl:8,pairwis:[],palegoldenrod:190,palegreen:190,paleturquois:190,palevioletr:190,pan:189,panagiotopoulo:[378,387],pandit:[9,284,421],papaconstantopoulo:362,papayawhip:190,paper:[3,6,7,8,9,13,39,40,64,140,152,158,176,234,237,241,249,276,282,284,291,306,314,318,321,346,353,356,363,371,377,389,391,394,399,401,417,420,421,440,442,450,469],paradyn:5,paraemt:422,paragraph:[71,152,323,349,456],parallel:[],parallelepip:[6,166,349,455,458],parallelipip:[166,273],paralleliz:276,param:[3,282,284,452,458],paramet:[],parameter:[118,163,363,367,376,377,383,384,385,386,394,408,409,410,418,420,421,438,440,441,442],parameter_fil:199,parameterizaion:377,parametr:[6,9,36,384,419,423],paramt:[105,282,325,422],paramter:376,paratem:405,paraview:292,parent:[3,8,329],parenthes:[38,56,184,389,439,480],parenthesi:[2,202,331,480],parinello:[6,7],pariticl:209,paritlc:3,park:[3,7,9,199,295,410,417],parrinello1981:213,parrinello:[213,228,248,250,251,281,310],pars:[],parser:[12,480],part:[0,1,2,3,6,7,8,9,11,12,17,20,21,23,24,25,26,27,28,29,30,31,32,35,36,37,38,40,41,43,45,46,47,48,49,51,53,54,55,56,64,67,70,71,72,78,80,83,96,97,98,99,100,101,105,107,108,109,111,112,115,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,146,148,150,151,155,156,158,162,167,170,171,173,174,175,176,178,179,181,182,183,184,187,188,190,191,193,196,197,198,200,206,208,209,210,211,212,213,214,216,218,221,222,223,224,225,226,227,228,229,231,232,233,234,235,236,237,238,239,240,241,243,244,245,248,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,272,273,274,276,277,281,282,283,284,285,286,287,288,290,291,293,294,295,296,297,298,299,300,302,303,305,306,309,311,312,313,314,315,316,317,318,319,321,322,323,324,325,327,329,330,331,332,334,335,336,337,340,341,342,346,347,354,355,356,357,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,452,453,455,456,457,458,462,463,464,467,473,480,484],partai:[9,419],parti:9,partial:[],partic:6,particip:[211,366,395,444],particl:[],particleenergi:3,particleviri:3,particular:[1,3,6,8,10,12,16,40,63,65,69,70,71,79,92,108,113,115,116,140,164,186,187,193,198,205,209,212,227,232,233,237,247,250,272,277,290,291,294,313,324,329,332,347,349,352,355,361,366,367,368,370,372,373,375,379,384,385,388,390,392,397,401,405,414,415,422,423,437,438,440,441,442,450,452,455,456,457,462,463,465,473,480,481,483,484],particularli:[7,9,12,15,16,25,39,189,213,291,347,385],partilc:306,partit:[],partitoin:62,partner:[3,7,61,210,211,212,235,306,321,443,465,470,475],pascal:[9,13,479],pass:[6,7,8,11,66,74,75,81,89,90,93,103,104,105,106,159,187,190,191,213,214,224,226,247,248,250,280,306,323,345,357,361,392,420,436,453,455,456,460,466,480,483],passphras:12,past:[],patch:[0,12],patchi:291,path:[3,6,7,11,12,13,15,191,233,249,274,295,306,313,318,356,362,363,367,374,383,384,386,394,408,409,410,414,418,419,420,428,438,440,442,456],patient:12,patom1:115,patom2:115,patrick:441,pattern:[3,7,12,62,73,457],pattnaik:291,paul:[0,7,13,234,236],pauli:[9,385],paus:463,paves:274,payn:[140,419,428],pb2:163,pb4:163,pbc:[323,364],pchain:[250,251,254,291],pcie:1,pd2:163,pd4:163,pdamp:[250,251,254,278,291],pdb:[6,13,191],pdebuyl:9,pdf:[0,8,9,13,17,40,99,100,101,111,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,214,233,243,244,296,297,298,299,302,417,430,431,432,433,434,435,465],pdim:321,pdlammp:[78,80,417],pdlammps_ep:[111,417],pdlammps_v:417,pe_eta:250,pe_etap:250,pe_omega:250,pe_strain:250,peachei:13,peachpuff:190,peak:387,pearlman:87,peculiar:12,pedersen:347,peform:[39,283],penalti:[14,420,421],pencil:[6,71,152,205],pend:3,penetr:[42,120,424,426,465],penetret:40,peng:163,penn:13,pentium:10,peopl:[7,8,9,12],peptid:[4,9,214],per:[],peratom:[3,110,141],perceiv:189,percent:[3,16,213,361,438],percentag:[1,213,250,277,278,291],percol:211,perfect:[6,41,70,73,209,272,356],perfectli:[41,209,456],perfom:[6,356],perform:[],performac:1,pergamon:[408,442,448],perhap:349,peri:[],peridyma:78,peridynam:[3,4,6,7,9,40,63,78,80,111,417,437,465],perimitt:378,period:[],perioid:323,perl:[6,13],perm0:479,perman:[3,39,54,71,168,210,211,231,290,329,361,391,459,467],permeabl:271,permiss:[211,453],permit:[6,237],permitt:[378,442,447,448],permut:[12,384,438,440,442],perpendicular:[6,143,189,215,232,242,247,249,272,275,299,323,324,353,455],perram:[347,388],persepct:189,persist:[3,8,71,224,291,361,452,453,461,480],person:9,persp:[3,189],perspect:189,pertain:[374,437],perturb:[9,13,70,87,246,289,323,326,328,460],peru:190,peskin:237,pessimist:347,petersen:[306,347],pettifor:[367,437],pettifor_1:367,pettifor_2:367,pettifor_3:367,pfactor:189,pforc:453,phantom:231,pharmaceut:7,phase:[3,12,16,250,313,321,367,397,441,452],phd:419,phenol:475,phenomena:385,phi0:[182,290],phi1:171,phi2:[171,384,438],phi3:[171,384,438],phi:[1,3,4,7,9,12,16,17,79,140,183,184,189,229,273,290,335,361,362,367,383,386,408,409,410,468],phi_ij:[367,386,418],philadelphia:9,phillip:[235,381,475],phillpot:[283,376,377],philosoph:383,philosophi:[6,7,233],phonon:[],phophor:428,phosphid:428,phy:[6,7,13,20,21,25,39,43,45,46,64,70,73,87,88,110,112,140,141,146,152,170,171,181,188,200,213,214,219,227,228,233,234,235,236,237,248,249,250,251,254,268,269,273,274,278,281,283,286,291,294,295,306,309,310,313,314,315,316,318,321,323,332,340,342,346,347,353,356,363,367,368,372,373,375,376,377,378,379,380,381,383,384,385,387,388,389,390,391,394,397,399,401,402,405,406,407,408,410,411,412,415,417,418,422,428,436,438,439,440,441,442,443,450,464,467,469,475],physic:[3,6,9,12,14,16,17,18,40,53,59,120,158,199,215,228,234,236,237,239,240,241,248,273,282,284,317,318,347,349,356,361,363,365,371,375,383,391,392,419,420,421,424,431,432,434,435,450,452,464,465,470,479],physica:[406,407],physik:[7,9],pic:9,picki:8,picocoulomb:479,picogram:479,picosecond:[190,215,473,479],picosend:385,pictur:7,piec:[3,11,140,190,250,462,484],pierr:9,pieter:13,pimd:[],pin:16,pink:190,pipe:[6,187,189],pipelin:[3,6],pisarev:318,pishevar:381,piston:[],pitera:6,pixel:189,pizza:[4,6,7,11,13,41,187,189,209],pjintv:13,pka:318,place:[3,6,7,9,11,12,33,41,50,71,87,158,164,168,177,184,187,189,190,192,193,194,195,211,212,215,226,227,228,230,233,234,235,236,238,240,241,250,255,256,267,270,277,280,289,291,309,310,311,318,323,326,328,345,374,391,437,444,452,453,456,463,465,473,480],placehold:[33,177,362,363,376,383,386,393,394,408,409,410,414,418,420,421,428,436,438,440,441,442],placement:[349,397],plai:[189,313],plain:[9,405,453],plan:[3,5,6,16,17,166,455],planar:[6,40,42,232,272,324,340,342],planck:[226,274],plane:[3,6,9,41,42,57,59,67,71,189,193,199,205,209,229,232,242,272,275,285,303,305,318,324,332,334,335,336,337,342,349,407,444,458,465],planeforc:[],plasma:[9,88,251,318,385],plastic:[],plastic_strain:121,plastic_strain_r:124,platform:[1,3,7,9,12,13,15,17,187,189,191,457,462,484],plath:[6,91,193,314,321],player:189,pleas:[0,3,7,11,12,13,199,228,237,241,273,276,287,313,329,384,386,417,425,427],plen:364,plimpton:[0,5,7,70,112,141,212,272,306,389,417],plo:29,plog:[3,12,464],ploop:[250,251,254],plot:[7,11,13,281,403,405,439,445],plu:[3,11,12,39,59,68,96,167,190,208,213,215,216,254,291,358,385],plug:9,plugin:[9,13,191,456],plum:190,pm3:163,pmb:[],pme:347,pmf:[214,295,303],png:[3,12,187,189],pni:189,poariz:6,poem:[],point1:455,point2:455,point3:455,point:[],point_data:292,pointer:[3,7,8,11,224,453],pois:479,poiseuil:[4,196,229],poisson:[59,215,347,389],poisson_solv:199,polak:353,polar:[6,7,140,163,199,218,376,377,397,443,475],polar_off:376,polar_on:376,polariz:[],poli:[],pollock:[7,347],polya:329,polybond:13,polychain:291,polydispers:[3,369,375,389,406,407,437,447],polygon:[6,162],polym:[],polymer:7,polymorph:[],polynomi:[9,38,56,184,383,403,412,432,439],polytechn:276,poor:[16,17,41,209,268,269,294,361,403],poorli:[353,354],pop:[3,8],popen:12,popul:[12,286,349,382,455],popular:[12,187,384],pore:303,poros:167,porou:[237,240],port:[231,233],portabl:[7,9,12,187,188,214,420,457],portion:[1,3,9,11,12,15,16,41,54,71,88,91,107,108,110,113,141,154,187,190,201,202,204,205,206,207,209,213,223,237,250,252,253,255,256,283,288,289,291,292,331,345,357,361,368,370,371,372,373,377,378,380,381,385,387,388,390,391,397,401,405,415,422,423,442,445,454,455,460,464,465,480],poschel:389,posfreq:288,posit:[3,6,14,27,39,40,41,42,46,57,59,70,71,81,89,90,103,104,108,117,118,122,140,141,147,162,163,164,166,167,168,173,175,184,186,188,189,190,193,194,196,198,200,201,202,204,205,206,209,210,211,212,213,214,215,216,219,221,226,227,228,229,231,232,234,235,236,237,239,240,243,244,247,248,250,251,252,253,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,272,273,274,276,277,278,281,282,286,288,289,291,294,295,299,302,303,305,306,308,309,310,311,313,315,316,317,318,321,323,324,325,326,327,328,329,332,346,349,356,363,364,366,369,381,382,385,387,395,400,421,436,439,444,450,455,458,465,475,480,481],posix:231,posix_memalign:12,possibl:[1,3,6,8,9,11,12,15,38,40,41,55,59,63,70,71,87,113,115,140,141,143,157,186,187,188,190,193,195,199,200,205,209,210,211,212,216,218,228,235,272,285,286,288,291,302,306,308,318,319,336,345,347,354,357,358,361,382,391,408,421,425,427,439,453,459,468,469,470,473,475,480,481,483],post:[],post_forc:8,post_force_integr:8,post_force_respa:8,post_integrate_respa:8,postit:[205,206,262],postiv:86,postma:[278,309],postprocess:13,pot:[389,421],potentail:386,potenti:[],potentiel:405,potetni:392,potpourri:9,pour:[],pourtoi:313,pow:215,powderblu:190,power7:17,power8:17,power:[3,9,11,105,140,190,286,346,361,367,453],pparam:[87,194,195],ppm:[12,187,189],ppn:[14,15,16,17,18,361],pppm:[],pppm_disp:3,pppmdisp:3,pproni:[3,227],pr3:163,pr4:163,practic:[3,12,213,250,251,273,280,452],prb:[440,442],prd:[],pre:[],pre_exchang:8,pre_forc:8,pre_force_respa:8,pre_neighbor:8,prec_tim:14,prece:427,preced:[2,6,59,201,202,203,204,205,206,207,233,288,292,331,349,356,361,367,391,469,472,473,480],preceed:[11,12,71,152,203,323,453,480],precipit:162,precis:[1,3,9,12,13,14,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,164,170,171,173,174,175,176,178,179,181,182,184,187,190,196,202,207,208,213,222,225,229,234,250,252,253,254,255,256,257,265,267,268,270,282,283,284,291,293,294,309,311,322,332,334,335,336,337,340,342,346,347,354,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,420,422,423,429,438,439,440,441,442,444,446,447,448,457,464,465,468,473,475,479,480,481],precv:452,predefin:[182,190,329,385],predict:[1,6,10,262,291,361],preexponenti:469,prefactor:[24,25,28,32,35,36,158,172,183,194,195,203,323,334,337,340,354,375,387,414,422,423,429,447],prefer:[7,8,12,290,319,363],prefix:[11,12,189,214,273,449,452],preliminari:[38,56,184,439],prematur:354,prepar:[9,285,306,466,475],prepend:420,preprint:[140,428],preprocessor:231,prerecord:214,prescrib:[6,8,143,144,157,193,194,199,202,216,247,264,319],presenc:[187,210,211,237,240,406,407,447,482],present:[1,3,12,16,18,162,184,188,189,216,227,228,233,237,238,240,241,286,302,324,327,376,385,396,405,421,422,452,475],preserv:[3,59,213,215,250,294,306,328,456],press:[],pressdown:208,pressur:[],pressure_with_eviri:385,presum:[73,153,193,194,195,215,356,392,458],prevent:[2,3,6,40,120,216,225,306,317,340,346,352,354,356,361,381,392,416,431,432,434,436,453,457,463,465,475,480],previou:[],previouli:216,previous:[3,11,59,61,71,86,102,117,119,153,164,166,168,186,187,188,190,198,200,201,202,203,204,205,206,207,215,216,226,232,245,247,277,289,291,293,294,318,320,323,324,325,326,328,329,348,389,437,450,453,457,458,468,470,472,473,476,477,478,480,481],prevoiu:324,price:[6,380],primari:[0,9,318],primarili:[5,7,9,17],primaritli:17,prime:[219,235,390,395,440,442,452],primit:[3,6,326,327,349],princip:[3,231],principl:[6,9,11,231,251,282,385,393,438,452],prinicp:[42,291,355],print:[],printabl:2,printflag:393,printfluid:237,prior:[162,185,348,483],priori:464,prioriz:361,prism:[3,6,152,166,458],priveleg:3,privileg:[12,231],prob:[210,211],probab:429,probabl:[3,8,12,40,71,154,167,168,170,200,209,210,211,212,216,226,235,250,277,323,329,354,412,450,469,475],problem:[],problemat:226,proc:[1,3,8,11,12,15,113,187,345,452],proce:[41,54,168,209,220,356,462,470,473],procedur:[6,12,39,41,190,200,209,226,234,235,236,250,252,253,254,255,256,267,268,269,270,273,309,310,311,312,315,316,354,356,363,369,456,475],proceed:12,procesor:[41,452],process:[],processor:[],processsor:[41,209,452],procp1:187,procssor:464,produc:[1,3,4,6,7,9,12,13,14,15,16,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,41,42,43,45,46,47,48,49,51,53,54,56,63,65,68,69,71,79,92,108,109,110,112,113,114,115,117,119,141,142,151,170,171,173,174,175,176,178,179,181,182,184,187,190,193,196,201,202,203,204,205,206,207,208,209,212,222,224,225,227,228,229,234,235,236,245,247,250,252,253,254,255,256,257,265,267,268,270,277,281,282,283,286,291,292,293,294,307,308,309,311,318,319,320,322,323,326,331,332,334,335,336,337,340,342,347,354,356,359,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,418,421,422,423,429,438,439,440,441,442,444,446,447,448,450,452,457,460,461,464,469,480,481],product:[16,17,18,140,215,268,282,319,361,364,385,421,452,480],proessor:361,prof:276,profi:153,profil:[],program:[3,4,6,7,9,11,12,13,17,187,189,190,191,193,214,224,231,237,285,383,453,466,480],programm:[13,17],progress:[1,41,209,231,248,281,353,354,356,473,475],prohibit:465,project:[6,7,12,13,14,353,437],promis:7,promot:367,prompt:[8,11,12,231,466],proni:[3,227,228],proofread:8,prop:[6,280],propag:[4,9,198,250,281,296,385,392],propens:6,proper:[212,272,408,453],properati:280,properli:[196,221,291,302,355,356,453,481],properti:[],propoerti:306,proport:[6,39,41,87,103,104,160,209,234,235,236,281,314,321,322,389],proportion:234,propos:[6,140,200,213,226,250,268,286,397,410,441,443],prospect:7,protect:306,protein:[7,10,164,289,291,304,455,463],protocol:231,proton:[442,448,479],prototyp:[10,42,417],prouduc:[207,320],prove:237,proven:268,provid:[1,3,4,6,7,8,9,11,12,13,14,15,16,17,18,29,40,42,67,70,118,139,158,163,164,188,191,201,202,207,212,213,214,215,224,226,231,233,237,241,248,250,273,281,282,285,286,291,295,313,315,316,319,320,331,344,346,347,352,356,361,363,367,369,374,376,377,381,384,385,389,391,394,396,405,406,408,410,418,419,420,421,428,436,437,438,440,441,442,452,457,463,465,468,469,473,480],proxim:186,psa:326,pscreen:[3,12,464],pscrozi:[0,7,13],psec:[190,215,230,234,235,250,278,291,309,310,474,479],psend:452,pseudo:[385,450,455,460],pseudodynam:313,psf:6,psi:[386,447],psi_ij:386,pstart:[3,250,251,254,278,291],pstop:[3,250,251,254,278,291],pstyle:[87,107,194,195],psu:[420,421],psuedo:460,pt2:163,pt4:163,ptarget:213,pthread:[12,17],ptr:[6,11,224,453],ptype1:115,ptype2:115,pu3:163,pu4:163,pu6:163,publicli:5,publish:[7,237,241,282,377,408,440,442],pull:[295,303],puls:318,pump:[406,407],punctuat:[2,450,469],purchas:189,purdu:[9,13],pure:[11,306,392,409,410,440,442,464],purg:[3,456],purpl:[2,190],purport:11,purpos:[3,6,7,12,42,61,71,118,128,134,147,148,163,164,166,168,184,187,205,207,212,213,234,272,274,277,279,290,306,346,361,371,395,401,412,444,455,457,458,462,465,467,468,480,484],push:[3,8,196,208,215,232,249,272,289,295,354,389,429],pushd:232,put:[3,6,8,11,12,13,39,59,152,164,187,216,220,325,326,329,349,420,453,455,459],putenv:[466,480],px1:464,px2:464,pxx:[213,250,278,291,346,347,472,473],pxy:[3,6,473],pxz:[3,6,473],py1:464,py2:464,pydir:11,pyi:[213,250,278,291,346,347,473],pymol:[7,11,13],pymol_aspher:[],pympi:11,pypar:11,python:[],pythonpath:11,pyz:[3,6,473],pz1:464,pz2:464,pzz:[213,248,250,278,281,291,346,347,473],q_c:475,q_d:475,q_i:[386,405,443],q_j:405,qbmsst:[],qcore:282,qdist:[377,397,401,405],qeq1:282,qeq2:282,qeq:[],qfile:[282,377],qin:230,qmin:353,qmmm:[],qmol:285,qout:230,qtb:[],quad:[12,18,361,452],quadrat:[],quadratur:[87,199],quadrupl:362,quadruplet:[180,183,332,334,335,337,339,340,341],qualifi:[3,233],qualiti:[7,9,189,190],quantit:[74,81,103,104,105,160,389],quantiti:[],quantum:[6,9,140,224,228,274,281,285,286,367,385,437],quantum_temperatur:281,quartic:[],quartic_spher:199,quartz:[281,286],quasi:274,quat:465,quaternion:[3,6,40,82,113,130,143,164,252,255,258,259,260,267,388,455,465],quati:[113,455],quatj:[113,455],quatk:[113,455],quatw:[113,455],queen:13,quench:[329,450,469],queri:[3,11,54,264,453,480],quest:[6,224],question:[8,9,12,13,272,329,417,480],quick:[0,9,12,14,15,16,17,18,19],quickli:[3,4,8,12,13,39,209,215,231,306,353,354,356],quickmin:[352,353,354,356,469],quicktim:[4,189],quip:[],quit:[],quot:[2,3,12,188,240,279,331,408,450,451,453,463,480],r10:367,r12:388,r_1:140,r_2:140,r_c:[378,380,387,442],r_cut:367,r_d:475,r_e:386,r_ewald:292,r_fu:[406,407],r_i:[29,140],r_ii:140,r_ij:[29,367,385,418,448],r_ik:418,r_j:29,r_jik:418,r_max:206,r_me:378,r_mh:387,r_min:[206,379],r_ub:20,r_x86_64_32:12,ra2:163,rad2theta:163,rad:329,radhi:458,radial:[63,96,97,113,116,140,148,150,155,206,236,251,261,269,303,312,354,385,391,412,455,458],radian:[20,21,24,28,32,35,36,38,163,171,182,184,290,332,334,337,340,455,458],radiat:[118,163,318],radic:[166,455],radii:[76,140,212,216,375,383,388,389,406,407,424,426,447,458],radit:385,radiu:[2,3,6,40,63,76,84,85,89,90,113,118,120,129,130,135,140,157,162,187,189,193,206,232,237,251,253,256,261,265,269,270,284,298,302,303,304,306,308,323,324,327,329,353,367,369,375,385,386,389,397,405,406,407,408,424,426,428,442,447,455,458,465,480],radlo:458,rafferti:321,rahman:[6,7,213,248,250,251,281,417],rai:[9,17,163],ram:442,ramp:[],ran:[3,4,6,10,11],random:[3,6,39,164,167,186,189,198,200,210,211,212,214,216,223,226,227,228,234,235,236,237,246,274,277,281,286,289,291,306,310,313,318,322,325,369,381,382,450,465,470,475,480,481],random_se:450,randomli:[164,167,200,216,226,234,277,306,328,469,470],rang:[1,3,6,7,8,9,10,12,14,15,16,18,38,39,56,71,77,88,108,109,110,112,116,117,121,140,141,150,158,163,165,168,169,176,184,187,189,190,199,200,211,215,216,226,228,277,292,306,307,313,314,319,321,346,347,354,357,358,361,363,365,367,368,369,370,371,372,373,375,377,378,379,380,381,382,383,385,388,390,391,392,394,397,398,399,400,401,402,403,404,405,406,407,408,411,412,413,415,418,421,422,423,436,437,439,442,446,447,448,449,453,464,465,473,483],rank:[6,11,12,231,319,344,452],rankin:254,raphson:3,rapid:[4,6,11],rapidli:[3,8,12,71,212,234,248,250,291,309,310,322,377,381],rapp:[282,283,284],rappe_and_goddard:283,rare:6,rasmol:[6,7],rasmussen:388,raster3d:[6,7],rate:[2,6,12,125,132,136,137,147,190,199,215,216,230,231,232,277,281,314,315,316,317,321,352,353,382,406,407,450,469,473],rather:[1,2,6,9,12,40,41,62,112,147,189,209,215,227,228,291,310,318,322,324,325,326,329,385,420,439,456,460,465,467,472,480],ratio:[6,10,59,87,101,140,200,209,215,234,236,306,314,321,322,346,359,388,389,422,431,444,452,455,465,469],rational:[319,467],rattl:[],rattle_debug:294,ravelo:[254,399],rayleigh:[248,281],rb1:163,rbg:190,rcb:[3,41,209],rcm:[89,90],rcmx:[89,90],rcmy:[89,90],rcut:61,rcutfac:[140,428],rd1:356,rdc:17,rdf:[],rdn:356,rdt:356,rdx:4,reach:[6,12,41,119,209,211,213,235,254,299,306,313,331,345,360,378,475,480],react:6,reactant:385,reaction:[295,304,317,328,356,385],reactiv:[9,288,363],read:[2,3,6,7,8,9,11,12,13,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,115,162,164,165,167,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,187,189,190,191,192,193,199,200,212,213,215,216,226,228,231,247,248,250,252,253,254,255,256,267,268,269,270,273,274,276,277,279,280,284,291,294,295,299,302,305,308,316,317,318,324,332,333,334,335,336,337,339,340,341,342,343,345,351,355,356,360,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,415,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,444,445,446,447,448,450,452,455,456,457,459,460,461,462,463,465,466,467,469,480,481,482,484],read_data:[],read_dump:[],read_restart:[],read_restart_set:8,readabl:[189,355,462,484],reader:[3,13,456],readi:[11,12,165,167,168,231,465,475,482,483,484],readm:[1,4,6,8,9,11,12,13,162,187,191,285,393,420,421,453],real:[3,6,7,11,27,30,31,59,71,91,140,153,164,173,186,190,198,205,206,215,216,219,231,232,235,247,274,281,286,289,322,323,325,326,328,336,346,347,349,352,358,377,412,420,421,442,455,458,464,472,474,479,481],realist:[3,216,459],realiz:[71,193,453],realli:[1,3,8,12,112,122,141,190,232,357,392,467],realloc:3,realtim:231,reamin:[323,327],rearrang:356,reason:[3,6,7,11,12,19,39,145,156,164,202,205,206,234,278,291,315,316,319,329,355,356,361,374,378,385,386,387,407,412,444,445,459,464,481],reax:[],reax_def:3,reaxc:[],reaxff:[3,4,5,7,9,13,193,282,284,287,288,392,420,421,437,467],rebal:[41,209],rebalanc:[41,209],rebo:[],rebuild:[11,12,14,15,16,226,357,381,473],rebuilt:[3,12,187,188,189,191,357,361],recalcul:[71,87,306],receiv:[3,208,231,233,272,452],recent:[],reciproc:[6,118,163,273,346,368,370,371,377,380,385,397,401,415,423,469],recog:12,recoginz:3,recogn:[3,12,16,73,166,210,211,250,355,383,408,420,453,455,462,463,475],recommend:[7,9,11,12,14,16,189,190,281,316,346,385,392,406,407,421,422,425,427,464],recompil:[1,3,9,12,191,294],recomput:[102,128,168,220,295,382,467],reconstruct:[3,214],record:[191,214,295],recov:[213,250],rectangl:[41,209,349],rectangular:[7,41,62,166,209,226,349,455,457,459],rectilinear:[118,163],rector:53,recurs:[41,209,367,444],recust:41,recv:452,red:[2,10,189,190,212,274],redefin:[3,457,463,480],redirect:12,redo:12,reduc:[],reduct:[18,19,117,118,163,248,281,346],redund:386,ree:432,reed:[248,281],rees:[7,9,13],ref:[315,316,353],refactor:6,refer:[],referenc:[3,6,12,63,68,71,114,187,193,203,207,226,280,320,347,377,391,414,422,453,473,480],reflect:[],reformat:7,refresh:199,reg:458,regard:[6,59,247,294,299,417,421],regardless:[15,71,164,167,186,204,205,215,234,250,252,253,255,256,278,291,300,306,361,452,458,465],regim:[6,314,321,378,464],region:[],region_spher:8,region_styl:327,regist:[116,302,420,421],regoin:6,regress:480,regspher:164,regstrip:329,regul:6,regular:[1,3,9,41,62,88,162,166,187,200,209,226,318,347,378,436,452,455,457,459],reigon:480,reinhardt:[315,316],reject:[164,212,420,470],rel:[1,6,14,27,36,41,59,71,122,130,140,143,146,147,149,164,173,190,193,200,205,209,215,216,219,226,232,246,247,268,272,277,286,288,289,295,303,306,308,313,314,318,325,329,346,347,354,385,388,389,406,407,408,422,447,456,464,469,473,475,481],relat:[],relatic:[219,235],relationship:[6,282,331,346,447,475,480],relax:[],releas:[0,5,7,8,13,210],relect:[3,412],relev:[2,6,12,41,78,80,111,128,164,168,190,194,195,198,199,200,201,202,203,204,205,206,207,208,209,210,211,215,216,217,220,222,223,225,226,227,230,231,237,238,239,241,242,243,244,246,247,249,257,258,259,260,261,262,263,264,265,266,271,275,276,277,279,280,283,285,287,288,289,292,293,294,295,300,304,306,307,308,313,314,317,318,319,320,321,322,323,324,325,326,328,329,346,354,364,365,369,375,377,378,380,381,382,385,387,388,389,390,391,396,398,399,400,402,403,404,406,407,412,413,417,422,429,436,439,446,447,448,452,468,481],reli:[3,12,283,385,421,455,465],reloc:12,remain:[7,33,37,41,50,55,59,71,87,104,144,145,146,147,151,152,153,154,156,167,177,183,184,187,194,195,200,202,203,205,206,213,215,234,235,242,250,251,255,256,267,268,270,275,276,298,306,309,310,311,317,318,329,331,338,341,355,367,385,392,405,412,437,450,455,456,460,465,467,469,473,475,480,481],remaina:367,remaind:[164,187,216,277,306,319,442,455],remap:[3,6,12,59,61,71,147,164,186,205,215,232,247,268,346,455,456,457],remedi:[6,475],rememb:2,remov:[2,3,6,8,9,13,54,71,77,114,116,140,143,144,145,146,147,151,152,153,154,156,157,164,167,168,193,202,205,210,223,234,235,240,246,248,250,255,256,267,268,270,276,282,291,292,294,306,309,310,311,313,329,346,356,380,407,455,458,466,467,480,481],remove_bia:8,remove_bias_al:8,remove_molecul:199,remove_sourc:199,remove_speci:199,ren:163,renam:[12,330,466],render:[12,13,187,189,190],rendon:[250,251],reneighbor:[3,8,12,39,57,71,205,209,226,306,319,329,381,472,473],renssela:276,renumb:71,reorder:[3,12,39,452],repeat:[2,6,189,190,205,212,213,226,299,349,367,440,442,444,450,469],repeatedli:2,repel:232,repes:187,replac:[2,3,6,11,12,41,63,89,90,117,142,143,144,145,146,147,150,151,152,153,154,156,157,187,189,190,191,202,203,204,205,206,207,209,212,216,234,254,279,286,288,377,399,456,457,462,463,473,480,481,482,484],replic:[],replica:[],replica_fil:12,report:[],repositori:[7,12,393,419,420,421],reprens:318,repres:[1,3,6,8,9,12,15,40,41,42,59,67,71,90,113,116,176,184,187,189,202,203,204,205,206,207,213,219,227,229,234,237,250,274,276,278,286,291,292,295,303,318,320,327,347,356,362,367,388,395,405,406,407,408,409,410,415,418,420,421,443,444,450,452,455,465,467,470,475,480,482],represent:[3,6,8,57,59,134,166,187,227,228,274,318,367,385,388,422,455,458,475],reprocess:460,reproduc:[3,250,324,377,383,389],repul:408,repuls:[6,7,9,36,40,45,46,108,232,282,323,324,327,363,367,375,377,381,385,389,391,405,408,411,436,442,447,448,465],reqir:[282,284],request:[3,6,8,12,41,167,184,187,231,237,289,306,308,344,346,412,420,421,450,460,465,468,469,480,481,482],requir:[],rerun:[],rescal:[],research:[5,7,237,241,450,469],resembl:286,reserv:[12,231,475],reservoir:[91,226,230,234,318],reset:[],reset_atomic_reference_posit:199,reset_dt:8,reset_target:8,reset_tim:199,reset_timestep:[],resid:13,residu:231,residue1:357,resist:[6,231],resolut:439,resolv:[213,274,306,407],resort:3,resourc:[7,362,383],respa:[3,16,220,231,250,359,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,406,407,408,409,410,411,413,415,417,419,420,421,422,423,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,446,447,448,463,464,474],respect:[1,6,9,10,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,42,43,45,46,47,48,49,51,53,54,56,59,70,71,87,89,96,97,118,122,146,149,158,162,163,170,171,173,174,175,176,178,179,181,182,184,189,190,205,206,211,212,213,229,232,234,235,237,250,252,253,254,255,256,257,265,267,268,270,282,283,291,292,295,303,305,318,323,332,334,335,336,337,340,342,344,346,347,351,354,355,360,361,362,363,365,367,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,408,409,412,413,414,415,417,422,423,427,428,429,438,439,440,441,442,443,444,446,447,448,452,456,464,465,468,475,480,482,484],respon:9,respond:[6,7,147,215,385,417],respons:[6,7,248,314,321],resquar:[],rest:[6,8,12,280,284,290,367,407,408,472,473,475],restart1:274,restart2:274,restart2data:[],restart:[],restartfil:[12,13],restor:[3,8,60,61,164,194,195,280,295,303,308,472,473],restore_bia:8,restore_bias_al:8,restrain:[],restraint:[9,214,248,290,305,396],restratin:290,restrict:[],result:[1,2,3,6,7,9,11,12,13,15,16,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,43,45,46,47,48,49,51,53,54,56,63,64,66,67,71,75,87,90,91,93,104,106,109,110,112,114,115,116,117,118,119,141,142,144,147,151,158,159,161,163,164,167,170,171,173,174,175,176,178,179,181,182,184,187,189,190,193,196,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,219,222,225,226,227,229,234,235,237,241,248,250,252,253,254,255,256,257,265,267,268,269,270,273,274,282,283,288,289,291,293,294,306,309,311,314,315,316,318,319,320,322,323,324,326,328,331,332,334,335,336,337,340,342,346,347,356,359,361,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,415,417,421,422,423,429,438,439,440,441,442,443,444,446,447,448,450,452,455,457,458,459,460,464,465,466,467,469,479,480,481],resum:480,retain:[2,210,211,367,452],retart:[33,50,177,338],retreiv:8,retriev:[6,8,224,409,410,480],reus:[3,467],rev:[6,13,64,70,110,140,141,152,200,228,234,236,248,250,251,254,268,273,283,286,291,295,306,310,313,315,316,321,353,367,375,376,377,380,383,384,385,388,389,394,399,406,407,408,410,418,422,428,438,440,441,442,450],revers:[2,6,8,87,175,212,232,250,271,272,282,299,314,315,321,356,405,464,475],review:[140,282,295,313,419,428,450,469,475],rewind:345,rewrap:187,rewrit:[5,12],rewritten:19,rezwanur:417,rfac0:[140,428],rfactor:306,rfile:291,rg0:304,rgb:190,rh3:163,rh4:163,rhaphson:3,rheolog:6,rhi:439,rho0:[408,425,427,434,435],rho0_meam:408,rho:[40,113,237,317,349,362,368,370,371,383,408,409,410,422,431,433,479],rho_0:[434,435],rho_alpha_beta:383,rho_bkgd:408,rho_colloid:323,rho_e:318,rho_fin:317,rho_i:[409,410],rho_initi:317,rho_ref_meam:408,rho_wal:323,rhodo:10,rhodopsin:[1,10],rhosum:[],ribier:353,richardson:291,richi:[9,19],rick:[282,283,376],rick_and_stuart:283,ridg:[9,19],right:[3,6,11,12,41,164,182,183,186,209,212,232,237,247,271,331,349,377,443,455,458,465,480],rightmost:[41,209],rigid:[],rigidifi:291,rii:[89,90],rij:[210,211,272,381,436],rin:[391,402,403],ring:[],rino:73,rinv:346,rirj:[324,389],rise:29,risi:[140,428],risk:[8,290,464],rix:[89,90],rjk:[210,211],rjone:[7,9,13],rlo:439,rmask:[3,480],rmass:3,rmax:[165,210],rmdir:466,rmin0:[140,428],rmin:[165,211,399],rmsd:317,rnemd:6,robin:190,robust:[352,353,354],rock:408,rockett:418,rod:291,rodata:12,rodnei:286,roi:7,role:313,roll:12,room:[57,59],root:[11,87,89,90,188,313,317,361,383,462],rosati:39,rose:408,ross:408,rosski:274,rosybrown:190,rot:[6,91,274,290,313,481],rotat:[],rotaton:458,rough:[6,164,189,328],roughli:[7,10,12,41,147,162,189,226,234,235,249,250,262,278,291,306,309,310,313,347,356,361,424,426,457,464],round:[1,3,12,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,71,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,190,196,208,222,225,229,234,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,309,311,322,332,334,335,336,337,340,342,347,359,362,363,365,368,369,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,457,464,479,480],rous:227,rout:[87,391,405],routin:[5,6,8,11,15,16,38,39,56,88,168,170,237,419,439,468],roux:[6,219,235,443,475],row:[6,65,66,68,69,75,79,90,92,93,104,106,108,114,115,116,119,144,152,159,161,163,202,203,204,205,206,207,240,291,318,320,328,385],royalblu:190,rozero:408,rperp:[247,299],rpi:276,rpm:12,rrespa:[1,3,5,7,8,16,194,195,247,250,357,362,363,364,365,366,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,406,407,408,409,410,411,413,415,417,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,438,439,440,441,442,444,446,447,448,464],rspace:3,rsq:[439,445],rsurfac:318,ru3:163,ru4:163,rub:20,rubia:[409,410],rudd:[412,439],rudra:[7,9],rudranarayan:[7,276],ruiz:200,rule:[],run1:[6,360,480],run2:[6,343,345,360,480],run3:[6,360,480],run4:[6,360,480],run5:[6,360,480],run6:[6,360,480],run7:[6,360,455,456,460,480],run8:[6,360,480],run:[],run_styl:[],runloop:345,runtim:[12,17,189,361],russia:9,rutherford:318,rutuparna:[440,442],ryan:9,ryckaert:[294,340],rycroft:162,s00:417,s0st:6,s2050:1,s2629:383,s319:199,s_fact:296,s_i:[6,385],s_ij:6,sack:7,saddl:[249,356],saddlebrown:190,sadigh:[200,383,409,410],saed_vtk:118,safe:[12,189,219,235,361],safe_zon:3,safest:[3,306],safeti:296,safezon:421,safran:447,sagui:[347,380],sai:[1,3,12,13,190,420,421,453],said:354,sakai:441,salmon:190,salt:[378,387,408,455],same:[1,2,3,4,6,8,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,41,43,44,45,46,47,48,49,50,51,53,54,56,57,59,62,63,65,69,71,72,77,79,81,82,84,85,87,88,89,90,91,92,94,97,103,104,105,108,109,110,112,113,115,116,117,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,160,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,184,185,186,187,188,189,190,193,194,195,196,199,200,202,204,205,206,207,208,209,210,211,212,213,215,216,220,221,222,225,226,227,228,229,230,231,232,233,234,235,236,237,240,247,250,252,253,254,255,256,257,265,267,268,269,270,272,273,274,276,277,278,281,282,283,284,286,287,288,289,290,291,293,294,295,300,303,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,324,325,326,327,329,331,332,333,334,335,336,337,340,342,346,347,349,350,351,355,356,357,358,359,360,361,362,363,365,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,411,412,413,414,415,417,418,422,423,429,436,437,438,439,440,441,442,444,446,447,448,450,452,453,455,456,457,458,460,463,464,465,466,467,468,469,473,475,479,480,481,483],sampl:[1,2,4,6,9,10,11,12,14,91,143,157,162,186,189,202,203,205,206,214,216,224,226,228,230,250,251,274,277,286,288,292,303,304,306,310,313,316,328,357,367,382,455,469],sample_frequ:199,san:417,sandia:[0,5,7,9,13,14,17,70,111,386,408,417],sandybrown:190,saniti:[290,357],satellit:6,satifsi:480,satisfi:[3,12,73,118,140,162,163,213,237,254,294,326,354,357,389,469],satur:378,save:[6,8,12,19,40,59,184,189,212,227,228,234,235,236,277,286,318,347,357,359,367,457,460,467],sb3:163,sb5:163,sc3:163,scalabl:[],scalar:[],scale:[0,1,3,4,5,6,9,10,13,18,40,59,63,91,113,116,117,140,150,158,184,187,189,190,193,194,195,199,200,203,213,215,226,230,231,232,234,236,237,248,250,252,253,254,255,256,274,278,281,282,291,297,298,306,308,310,313,315,316,318,322,329,346,347,349,358,362,363,364,378,382,385,389,392,406,407,408,417,424,426,443,456,458,460,464,467,469,472,473,480,481],scale_factor:[424,426],scalegamma:237,scalexi:[3,213,250,254],scalexz:[213,250,254],scaleyz:[213,250,254],scan:[190,211,345,456],scatter:[11,118,163],scatter_atom:11,scatter_coord:11,scenario:[6,40,61,212,280,289,306,319,327,357,459,460,464,472],scf:475,schaik:405,schedul:450,schell:441,schemat:212,scheme:[6,9,18,227,228,250,274,286,294,318,346,443],schlitter1:317,schlitter2:317,schlitter:317,schmid:381,schneider:[234,236],schoen:346,schr:475,schroding:385,schroeder:475,schulten:[235,295,347,475],schunk:306,schwen:9,sci:[73,326,376,410,418],scienc:[8,199,212,231,295,315,383,409,441],scientif:[140,383],scm:11,scratch:[12,41,209],screen:[],screenshot:11,scripe:11,script:[],scripta:67,scsl:12,sdk:[],sea:11,seagreen:190,seamlessli:280,search:[0,2,3,8,12,165,167,190,191,306,352,353,354,356,358,450,456,457,469,480],seashel:190,sec:[12,474,479],second:[1,3,6,9,10,11,12,16,17,54,57,59,61,71,88,91,105,112,133,134,138,141,152,158,162,163,165,166,167,186,187,190,193,202,203,204,205,206,207,212,226,227,232,247,249,274,288,290,291,294,295,303,304,306,315,316,318,329,346,349,353,354,356,357,361,366,367,368,370,371,376,377,383,385,386,389,390,392,396,399,408,412,414,438,441,442,443,450,451,452,453,455,457,462,464,468,469,473,475,479,480,481,482,484],secondari:[3,176],sectinn:483,section:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,58,59,63,64,65,66,67,68,69,71,74,75,78,79,80,81,83,86,87,88,89,90,91,92,93,96,97,98,99,100,101,103,104,105,106,107,108,109,111,112,113,114,115,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,142,143,144,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,163,165,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,188,189,191,193,196,197,198,199,200,202,203,204,205,206,207,208,209,210,211,212,214,215,216,218,219,221,222,223,225,226,227,228,229,231,233,234,235,236,237,238,239,240,241,243,244,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,267,268,269,270,272,273,274,276,277,278,280,281,282,283,284,285,286,287,288,291,293,294,295,296,297,298,299,300,302,306,309,310,311,312,313,314,315,316,317,318,319,321,322,324,325,329,330,332,333,334,335,336,337,338,340,341,342,347,348,349,351,355,356,358,360,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,450,451,452,453,455,456,460,463,464,465,466,468,469,470,473,475,480,481],section_acceler:[9,12,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,109,112,142,151,170,171,173,174,175,176,178,179,181,182,184,196,208,222,225,229,234,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,309,311,322,332,334,335,336,337,340,342,347,362,363,365,368,370,371,372,373,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,409,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448,464],section_accerl:383,section_command:[0,1,9,331],section_error:[7,12],section_exampl:[2,6],section_histori:[7,12],section_howto:[6,8,9,11,12,40,42,57,59,64,66,67,68,70,71,72,73,75,76,77,78,80,81,82,83,84,85,86,87,89,90,93,94,95,96,97,98,99,100,101,104,106,109,110,111,114,116,117,120,135,136,137,138,140,141,144,146,158,159,161,162,166,185,202,249,260,263,266,321,366,379,450,455,458,469],section_modifi:[6,7,42,187,189,473],section_packag:12,section_perf:7,section_python:[6,12],section_start:[3,4,6,9,11,350,356,449,450,464,470,473],section_tool:[6,7],see:[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,243,244,245,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,265,266,267,268,269,270,272,273,274,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,293,294,295,296,297,298,299,300,302,303,305,306,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,327,329,330,331,332,333,334,335,336,337,338,340,341,342,343,346,347,349,350,351,353,354,355,356,357,358,360,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448,449,450,451,452,453,455,456,457,458,460,461,462,463,464,465,467,469,470,471,472,473,474,475,480,481,482,483,484],seed1:470,seed2:470,seed:[3,164,167,186,189,198,200,210,211,212,214,216,223,226,227,228,234,235,236,237,274,277,281,286,291,306,310,313,318,325,369,381,382,450,465,470,475,480,481],seed_com:235,seed_drud:235,seek:[41,209],seem:[6,213,319,353,408,464],seen:[12,237,327],segement:3,segment:[3,4,6,7,40,42,82,113,193,263,291,306,381,395,421,436,437,455,463,465],select:[6,12,15,17,59,71,117,118,153,158,163,164,184,189,191,198,200,205,206,215,216,223,226,231,232,247,295,305,313,314,319,321,323,325,326,328,344,346,352,356,358,361,391,396,408,452,456,458,464,465,469,480],self:[],sellerio:13,semi:[3,191,199,200,271,273,456],semiax:143,semimet:385,send:[0,3,5,7,8,11,12,190,231,452],sender:[3,452],sens:[1,3,6,7,18,39,41,42,59,183,187,202,204,205,206,207,209,212,215,227,228,233,234,235,236,277,281,286,292,306,313,314,318,321,329,356,377,397,401,440,441,442,450,455,460,464,467,472],sensabl:231,sensibl:104,sensit:[2,6,73,213,286,481],sent:[190,231,344],separ:[2,6,7,9,12,13,40,41,76,116,122,140,162,164,167,190,191,199,203,209,210,211,212,213,216,219,226,234,235,250,262,274,277,278,280,282,286,291,294,306,309,310,311,314,321,329,347,361,368,370,377,378,380,406,407,408,414,419,428,437,438,439,442,447,453,455,456,457,464,467,472,475,481,482,483],seper:378,sequec:480,sequenc:[2,3,12,41,59,187,189,190,191,209,228,249,329,349,356,392,418,470,480],sequenti:[59,60,190,418,456],sequestr:7,ser:273,seri:[3,4,6,13,18,140,187,189,190,203,207,227,228,277,360,363,388,408,412,422,429,439,453,462,463,472,473,480],serial:[],serial_icc:12,serious:8,serv:[6,128,166,306,436],server:[1,233,361],set:[],set_callback:224,set_energi:224,set_vari:[6,11,453],setarea:237,sete:[202,212],setenv:[11,12,374],setfl:[13,362,383],setforc:[],setgamma:237,setmask:8,settl:213,setup:[3,4,6,7,8,11,12,13,16,37,40,55,59,71,87,91,152,165,166,167,168,183,190,199,212,215,306,319,341,357,358,361,437,452,455,463,482,484],setup_pre_exchang:8,setup_pre_forc:8,setup_pre_force_respa:8,setvel:[],seven:410,seventh:[133,138],sever:[1,4,5,6,7,8,10,11,12,13,15,18,39,40,63,71,87,158,165,168,183,187,188,191,193,199,210,211,213,228,234,237,241,250,276,278,280,291,295,306,313,322,344,349,354,361,364,367,371,382,383,392,401,405,408,412,418,420,421,427,450,453,457,461,469,473,475,480,481],sfactor:[3,189,190],sfftw:12,sgi:12,sgmc:200,sgrid:306,sgroup:162,shade:189,shake:[],shan:[17,283,376],shanghai:[9,13],shape:[2,3,6,8,40,41,58,59,62,71,82,113,130,143,147,148,164,166,186,189,190,193,194,205,209,213,215,234,248,250,252,255,258,259,267,268,281,306,319,327,366,388,422,452,455,456,457,465],shapei:[113,455],shapex:[113,455],shapez:[113,455],shapshot:460,share:[],shared0:[],sharon:291,sharp:[327,408,442],shawn:9,shear:[3,4,5,6,7,9,59,61,147,186,213,215,237,250,268,306,321,324,389,406,407,417,425,427],sheet:459,shell:[],shen:9,shenderova:363,sheppard:353,shflag:12,shield:[],shift:[],shiftse:306,shiga:[6,250,251],shini:[189,483],shinoda:[6,9,250,251,423],shiny:189,ship:191,shlib:[11,12],shlibflag:12,shock:[4,9,193,198,248,254,281,325,399],shockvel:[248,281],shortcut:[213,250,278,291],shorter:[3,119,226,272,358,412,463],shortest:[189,358,364,464],shorthand:190,shoul:444,should:[1,2,3,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,61,70,71,73,81,83,87,91,96,97,98,102,103,109,110,112,141,142,143,146,147,150,151,152,154,157,160,162,164,166,168,170,171,172,173,174,175,176,178,179,181,182,184,185,186,187,189,190,194,195,196,197,200,208,209,210,211,212,213,215,216,218,219,221,222,223,224,225,226,227,228,229,230,232,234,235,236,237,239,240,241,242,247,250,252,253,254,255,256,257,262,265,267,268,270,272,273,274,275,276,277,278,279,281,282,283,284,285,286,287,288,289,290,291,293,294,300,303,306,307,309,310,311,312,313,314,317,318,319,321,322,323,324,325,326,327,328,329,331,332,333,334,335,336,337,340,342,347,349,350,352,354,355,356,357,358,359,361,362,363,365,366,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,407,408,409,412,413,414,415,416,417,419,420,422,423,424,426,429,436,438,439,440,441,442,443,444,446,447,448,450,451,452,453,455,456,457,458,459,460,462,463,464,465,467,471,472,473,475,480,481,482],shouldn:[3,8],show:[6,11,12,116,272,356,391,408,439],shown:[1,12,17,41,96,97,118,140,150,163,183,209,212,234,250,268,274,277,286,313,346,385,386,388,389,405,422,455],shrank:71,shrink:[3,6,41,57,59,71,166,186,187,189,194,195,198,209,215,216,232,237,272,306,325,329,346,347,354,377,397,401,412,455,456],shrunk:71,shut:[6,11,357,454],si4:163,siam:326,sic:[4,377,392,408,414,438,440,442],sic_tersoff:418,sicc:[384,438,440,442],sicg:[440,442],sicsi:[384,438,440,442],side1:458,side2:458,side3:458,side4:458,side:[3,8,41,57,61,154,164,200,201,209,212,216,226,232,237,247,272,277,285,303,323,327,328,329,356,377,388,389,422,444,453,455,458,465],sidewai:4,sienna:190,siepmann:321,sigam:375,sigam_ii:395,sige:[440,442],sigma0:367,sigma14:405,sigma1:367,sigma2:367,sigma:[3,6,10,45,46,50,54,87,170,187,190,194,195,226,237,272,306,322,323,327,349,358,361,363,366,367,368,372,373,375,380,381,382,384,385,388,390,391,395,396,397,398,399,400,401,402,403,404,405,411,412,422,423,432,438,444,464,479,480,481],sigma_14:372,sigma_:378,sigma_c:375,sigma_cc:[363,375],sigma_h:387,sigma_i:[386,412],sigma_ii:[395,444],sigma_ij:[395,412,444],sigma_j:412,sigma_max:382,sigma_ss:375,sign:[3,6,12,175,183,271,303,326,331,463,472,480],signicantli:17,signifi:[3,66,75,90,93,104,106,114,144,159,161],signific:[7,12,18,86,227,248,251,286,306,319,385,388,408,412,482],significantli:[1,6,39,141,162,237,250,290,385,438],sij:203,sikandar:17,silbert:389,silent:[190,453,466],silicon:[384,408,438,455],sill:417,silver:190,sim:[9,423],similar:[5,6,7,8,9,12,17,18,40,41,46,59,68,87,112,115,141,164,165,187,190,193,194,195,202,209,224,225,227,234,240,241,251,280,281,286,290,291,310,313,323,324,326,328,347,352,353,355,363,366,367,381,383,385,389,405,406,412,417,418,427,452,457,462,464,469,471,473,475,480,481,482,484],similarli:[3,6,7,8,59,112,160,166,168,186,187,189,190,201,202,204,205,206,207,211,215,221,232,250,252,253,255,256,276,278,291,292,294,306,313,314,321,327,332,347,349,356,359,371,389,401,438,452,455,458,459,464,465,469,483],simluat:[6,39,190,306,406,456,457],simlul:[291,318],simmul:321,simpl:[],simpler:[8,42,190,291],simplest:[3,8,40,66,75,90,93,104,106,114,116,144,159,161,282,475],simpli:[1,3,6,8,11,12,14,17,66,71,75,88,90,93,95,104,106,113,114,119,144,159,161,167,168,190,193,194,195,202,204,205,206,207,211,213,215,219,224,233,235,240,250,274,278,289,291,292,314,320,321,346,347,349,355,356,361,371,380,392,401,408,412,452,453,460,463,470,473,479,480],simplif:385,simplifi:[200,290],simplist:11,simualt:347,simul:[],simulatan:361,simulation_nam:421,simulatoin:[12,456],simult:361,simultan:[6,7,15,16,215],sin:[215,247,323,326,328,418,455,458,465,480],sinc:[0,1,2,3,6,8,9,10,11,12,13,15,16,21,22,33,39,41,44,54,59,64,67,71,73,89,90,110,116,118,143,144,154,162,166,167,169,170,172,177,187,189,190,193,194,195,196,197,200,201,202,203,204,205,206,207,208,209,212,213,214,215,216,220,221,226,228,230,233,234,236,237,247,250,252,253,254,255,256,259,262,268,272,274,277,279,280,286,289,291,295,305,306,314,318,319,320,321,323,324,327,328,329,330,332,333,345,347,354,355,356,357,360,361,362,363,367,370,371,372,373,375,376,380,381,382,383,384,388,389,390,392,393,394,396,397,399,400,401,402,403,404,405,406,407,408,409,410,412,415,418,419,420,421,422,423,428,429,438,439,440,441,442,448,450,452,453,455,456,457,458,460,463,464,465,466,467,469,473,475,479,480,481,483],sinclair:[7,383,437],sine:418,singapor:140,singh:362,singl:[1,2,3,6,7,8,9,11,12,14,15,16,17,18,40,41,42,57,59,61,63,65,66,68,69,75,77,79,87,88,90,92,93,104,106,108,113,114,115,116,117,119,144,159,161,162,164,187,189,190,191,193,198,201,202,203,204,205,206,207,209,211,212,213,216,219,223,225,230,237,240,247,250,251,254,262,274,276,277,279,290,291,292,294,296,302,306,308,318,320,323,324,326,328,329,331,346,347,352,355,356,357,358,360,361,362,363,367,372,374,376,382,383,384,385,386,389,390,391,392,393,394,408,409,410,414,415,418,419,420,421,422,428,429,438,440,441,442,450,451,453,455,462,463,464,465,466,467,468,469,472,480,483,484],singleel:367,singular:[405,406,407],sinnott:[283,363,376],sinusoid:[164,215,323,324,326,328],sio:376,sirk:[141,436],sisic:[384,438,440,442],sisisi:[384,438,440,441,442],sister:374,sit:[273,455],site:[0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,67,70,87,231,237,238,294,347,362,367,377,383,387,397,401,405,415,420,421,443],situat:[9,213,226,237,250,274,292,353,367],sival:163,six:[6,133,138,140,203,204,414,418],sixth:414,sixthpow:[373,412],size:[],size_restart:8,sizex:256,sjplimp:[0,7,11,12],sjtu:9,skew:[3,6,58,59,166,189,215,250,455,458],skin:[3,12,39,61,73,115,165,167,226,262,291,318,357,358,361,416,473,479],skip:[12,16,33,177,276,345,355,360,396,455,460,463,472,480],skyblu:190,slab:[3,6,71,152,205,277,303,346,347,357,412],slateblu:190,slategrai:190,slater:[],sleight:54,slepoi:408,slice:[],slider:11,slight:[3,12,318],slightli:[1,6,39,40,187,188,189,191,286,291,347,363,377,395,397,401,440,442,450,463,482],sligthli:380,sliozberg:436,slip:[3,193,306,322,328],sllod:[],slope:[6,103,104,314,316,321,378,480],slot:1,slow:[3,6,7,12,39,227,231,234,235,248,306,313,346,356,361,412,464,475,481],slower:[1,10,17,39,235,347,361,367],slowest:[318,452],slowli:[12,71,209,322,354,429,457],slurm:12,slurm_localid:12,sm3:163,small:[],smallbig:3,smaller:[1,3,6,12,16,17,39,56,59,61,71,119,162,166,187,189,190,200,216,220,226,237,273,291,306,316,331,346,347,352,361,395,412,437,444,445,455,462,464,484],smallest:[3,70,72,162,248,288,480],smallint:3,smallq:347,smallsmal:[3,12],smart:228,smd:[],smd_contact_radiu:465,smd_lammps_userguid:9,smd_mass_dens:465,smd_user_guid:[],smi:[3,361],smirichinski:9,smit:226,smith:415,smmoth:465,smooth:[],smoother:164,smoothli:[54,140,314,321,372,390,403,405,442,448],smpd:12,sn2:163,sn4:163,sna:[],snad:[],snap:[],snapcoeff:428,snaphot:460,snapparam:428,snapshot:[],snav:[],snb:17,snow:190,soc:391,socket:[12,17,18,233,452],soft:[],softer:[323,327],softwar:[1,6,11,12,14,15,16,17,18,19,162,231,276,292],sole:[210,211,356,418,425,427],solid:[4,6,7,9,10,39,40,41,59,70,73,91,141,162,199,209,213,215,220,240,250,252,253,255,256,272,273,278,291,313,316,347,349,368,399,417,425,427,455],solut:[3,6,13,162,213,220,248,289,294,306,327,480],solv:[3,9,12,18,237,282,294,316,318,347,353,407],solvat:[4,10,164],solvent:[4,7,13,61,71,165,167,209,223,227,228,234,250,289,291,303,306,314,321,322,372,375,377,378,387,397,406,407,422,437,455,465],solver:[],some:[1,2,3,4,6,7,8,10,11,12,13,16,17,18,39,40,41,55,61,63,71,102,105,107,113,117,119,143,144,145,156,157,158,164,167,172,175,183,185,187,189,190,193,194,195,198,200,201,202,203,204,205,206,207,209,211,212,213,214,223,226,248,250,251,279,280,282,284,291,295,307,313,318,319,320,322,323,329,344,345,346,347,352,353,354,355,356,357,358,361,364,366,367,374,377,383,385,392,412,420,421,437,439,450,452,453,454,455,457,460,461,462,463,464,465,467,469,472,473,479,480,481,484],somehow:3,someindex:330,someon:[7,11,354],someth:[2,3,7,8,11,12,59,213,250,323,326,328,357,392,453,462],sometim:[2,3,6,8,12,18,205,213,250,314,321,346,358],somewhat:[7,9,12,70,144,154,202,250,346],somewher:[17,251,385],soon:[200,212,223,226,231],sophist:7,sorensen:469,sort:[3,13,16,39,71,187,190,191,231,356,357,361,382,456,457,483],sound:[128,237,248,296,434,435],soundspe:[434,435],sourc:[],source_integr:199,sourceforg:11,south:140,souza:314,space:[2,3,6,8,11,12,18,41,59,71,118,140,153,158,163,164,184,186,189,194,195,198,204,205,206,209,211,215,216,232,237,244,247,250,273,274,289,292,296,306,323,325,326,328,331,346,347,349,355,356,357,368,370,371,377,380,383,385,395,397,401,408,415,418,423,439,445,447,452,455,458,467,473,475,480,481],spahn:389,span:[2,12,38,71,194,195,205,232,291,346,362,363,367,376,383,386,393,394,408,409,410,414,418,428,438,440,441,442,449,450,458,459,480],spars:[71,184],spatial:[],spawn:231,spc:[],spcpu:473,speak:[17,306,313],spearot:[118,163,292],specfi:[12,107,232,458],speci:[],special:[],special_bond:[],specif:[1,2,3,6,7,8,9,10,12,13,15,17,18,22,29,33,40,41,42,50,63,71,108,113,115,116,144,146,149,164,172,177,187,189,190,191,193,194,195,198,199,202,203,204,205,206,207,209,212,214,223,224,226,227,231,237,245,277,279,280,283,291,313,318,319,323,329,333,347,354,356,361,363,366,367,379,383,388,389,392,393,394,395,408,412,420,421,422,437,438,443,444,452,455,456,460,461,462,464,465,471,472,473,479,480,481,482],specifi:[2,3,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,59,61,63,65,66,68,69,70,71,73,75,76,77,78,79,80,81,83,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,103,104,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,141,142,144,146,151,152,153,158,159,160,161,162,163,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,222,225,226,227,228,229,230,232,233,234,235,237,238,239,240,242,245,246,247,248,249,250,251,252,253,254,255,256,257,262,265,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,299,300,303,304,305,306,307,308,309,310,311,313,316,317,318,320,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,340,341,342,345,346,347,349,350,351,354,355,356,357,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,479,480,481,482,483,484],specifii:[228,237],speciti:464,spectral:428,spectrum:[9,140,281,286],sped:[39,248],speed:[1,3,6,9,12,14,15,16,17,18,19,39,41,128,187,190,209,234,237,248,281,296,306,313,319,325,346,347,356,361,367,377,412,434,435,440,450,464,470],speedup:[1,18,347,464],spefici:[164,189,391],speicifi:355,spell:458,spellmey:[6,170,467],spend:201,spent:[1,12,13,15,450,469],sph:[],sph_lammps_userguid:9,sph_user_guid:[],sphere1:237,sphere:[],spheric:[],spheriod:[3,6],spherioid:306,spheroid:[6,291,306],spike:116,spin:[9,40,113,324,364,385,455],spirit:7,spit:3,spline:[],split:[1,3,6,12,18,41,202,205,209,235,250,326,346,361,444,449,452,464],splittol:[6,346],sppark:6,spread:[1,6,12,331,463],spring:[],springer:295,springgreen:190,sptial:71,sputter:216,sq2:[3,349],sqrt:[2,3,59,81,89,226,234,235,236,272,306,322,324,349,375,381,383,387,389,408,412,480],squar:[],squeez:[213,232,406,407],squibb:[5,7],sr2:163,src:[0,1,3,4,6,7,8,9,11,12,14,15,16,17,18,19,162,187,224,294],srd:[],srolovitz:383,srp:[],srun:12,ssao:[189,483],stabil:[6,9,234,250,367,420],stabl:[6,64,128,237,254,290,296,367,475],stabli:227,stack:[3,8,70],stage:[3,87,193,224,249,285,329,356,450,469,480],stagger:[1,3,190,347,462,471,480],stai:[3,14,17,194,195,248,264,281,361,455],stamp:[313,456],stamped:12,stan:17,stand:[0,6,7,13,287,420,421,453],standard:[],stanford:9,starikov:318,start:[],start_6:387,start_7:464,startstep:480,stat:[12,54,168,272,286,354,381],statcoul:479,statcoulomb:479,state:[],statement:[3,453,454],stationari:[],statist:[3,6,12,39,41,64,210,211,212,227,228,234,235,236,276,277,281,286,291,294,306,317,318,319,354,356,363,381,382,389,406,447,450,457,463,465,469,472,473],statu:[3,12,54,60,121,168,214,219,235,376,469],statvolt:479,std:12,stdin:[3,12,345],steadi:[6,248,254,281],steelblu:190,steep:439,steepest:[7,353],steer:[7,9,214,217,295],stegailov:318,steinhaus:475,stencil:[3,237,346],step:[1,2,3,6,8,10,11,12,13,14,15,16,17,18,19,39,71,91,96,97,110,116,117,128,141,150,160,162,187,188,189,190,191,193,194,195,199,200,202,203,204,205,206,207,209,210,211,212,213,215,216,219,220,223,224,226,228,231,232,235,248,262,272,273,279,280,281,282,283,284,292,294,295,296,306,308,311,312,313,314,315,316,317,318,319,320,321,328,329,331,345,346,352,354,356,357,381,387,391,408,420,421,450,452,453,457,459,460,462,463,464,469,470,472,473,475,480,484],stepani:295,stepwis:87,stesman:313,steve:[0,5,7,13],steven:212,stiff:[6,40,51,210,211,273,274,354,417,475],stile:378,still:[1,3,6,9,11,12,13,14,17,18,38,41,61,71,108,116,162,168,184,185,187,190,194,195,209,230,234,262,282,286,306,318,331,346,347,352,373,383,388,389,392,396,406,416,420,422,429,437,455,457,463],stilling:[3,5,7,15,88,384,410,418,437,438,467],stipul:231,stl:[9,71,299,302],stl_surf:302,stochast:[4,7,9,193,228,306,313,328,382],stoddard:380,stoke:[237,322],stoll:[234,236],stone:[9,19,347,380],stop:[],stopstep:480,stopthresh:[41,209],storag:[3,12,15,320,361,467],store:[],store_st:307,storm:12,stouch:7,str:480,straatsma:6,straddl:[3,59,61,154,232,291,303,329,455,459,465],straight:291,straightforward:[13,385,475],strain:[2,3,6,59,80,121,124,125,130,131,132,136,137,186,213,215,248,250,254,406,407],strang:[184,189,480],strategi:[],stratford:237,strcmp:331,stream:[3,6,112,141,144,147,148,189,199,215,227,228,234,235,268,277,286,306,481],streamlin:[12,463],streitz:[],streiz:377,strength:[3,9,140,158,169,189,290,323,327,392,421,422,467],stress:[],stretch:[3,54,59,117,210,295],strict:428,strictli:[6,41,184,209,248,281,313,455],stride2:480,stride:[190,228,462,471,480],strietz:377,strike:216,string:[2,3,6,11,12,41,164,187,188,190,202,203,204,205,206,207,209,226,279,292,331,348,360,408,418,419,420,428,451,453,455,465,466,472,473,480],strip:480,strong:[282,363],stronger:6,strongest:[406,407],strongli:[1,6,13,216,291,294,318,475],structrur:3,structur:[],structured_point:292,strucur:73,stuart:[282,283,363,376,437],stub:12,stuck:213,student:276,studi:[6,105,399],studio:12,stukowski:[200,383],style1:[33,50,177,338,392,455],style2:[33,50,177,338,392,455],style:[],style_nam:[250,251],stylist:8,sub1:466,sub:[1,3,4,6,7,8,9,11,12,13,18,33,37,39,40,41,42,50,55,58,61,63,68,87,91,107,140,158,166,177,183,188,189,190,194,195,209,213,215,250,251,254,273,281,286,291,294,318,319,327,329,338,341,349,351,361,366,376,382,388,389,391,392,412,420,421,422,443,444,452,455,458,464,472],subbox:[117,189,190],subdirectori:4,subdivis:237,subdomain:237,subequ:11,subgroup:[187,483],subinterv:188,subject:[6,41,167,209,443],submit:[],subramaniyan:13,subroutin:361,subscript:[11,318,332,386,480],subsequ:[6,11,12,41,59,165,190,209,213,226,313,318,319,320,349,360,383,437,453,455,456,462,465,466,474,480,484],subset:[6,11,12,16,41,80,140,187,190,209,246,250,252,253,254,255,256,277,278,282,291,356,361,363,367,392,412,449,452,455,457,460,464,480],substanti:[6,16,438,464],substep:250,substitut:[1,2,3,12,187,233,356,360,385,412,453,466,480],substract:377,substrat:[166,213,250,252,253,255,256,278,291,455],substyl:[405,464],subsystem:318,subtl:[94,96,97,228],subtleti:150,subtract:[3,6,54,63,91,94,97,102,103,105,112,141,142,143,144,145,146,147,148,150,151,152,153,154,156,157,187,193,202,226,227,230,234,235,236,238,242,246,268,275,291,329,357,404,455,465,473,480,481],succe:12,succeed:203,succesfulli:3,success:[2,6,11,12,14,15,116,187,190,200,203,213,216,226,262,277,291,306,313,331,354,356,453,462,463],successfulli:[3,11,187,216,453,466],successulli:11,successv:460,sucessfulli:3,sudden:36,suddenli:327,sudo:[11,12],sufac:42,suffer:[16,17,18,321,327,361],suffici:[2,3,7,17,18,41,61,71,188,205,209,248,250,273,306,313,320,323,331,396,412,455,475],suffix2:12,suffix:[],suggest:[0,7,12,248,281,453,475],suit:[7,9,13,195,237,385],suitabl:[4,12,13,17,54,87,187,212,280,310,367,374,389,405,408,420,421,450,469],sum:[3,6,8,9,12,40,70,71,76,80,83,88,89,90,94,98,103,105,107,109,110,112,116,117,123,139,140,141,142,144,145,146,147,150,151,152,153,154,156,158,160,161,162,202,203,204,205,206,207,216,224,227,234,235,240,272,273,277,281,286,291,292,295,305,316,318,320,323,327,329,346,347,354,366,377,381,385,386,395,397,400,408,420,421,428,444,453,473,475,480,481],summar:[6,386],summari:[],summat:[6,9,42,70,88,346,347,371,377,383,384,397,401,438,440,441,442],summer:[3,13,205,420,421],sumsq:117,sun:[21,43,171,332,373,412,421],sunderland:17,sup:[273,281,286,376,475],supercomput:[12,17,18,453],superpos:[392,437],superposit:7,supplement:[228,420,421],supplementari:[214,388,422],suppli:[12,184,226,248,318],support:[1,3,6,7,8,9,11,12,13,14,15,16,17,18,19,40,41,42,87,88,102,107,187,188,189,190,191,194,195,196,197,202,209,212,213,214,221,224,228,229,232,234,235,236,237,245,248,250,252,253,254,255,256,267,268,269,270,272,273,278,281,283,285,290,291,296,297,298,299,300,302,303,305,309,310,311,312,316,321,323,327,344,345,346,347,353,354,355,361,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,438,439,440,441,442,443,444,446,447,448,452,456,457,462,464,465,466,468,469,475,479,483,484],suppos:[3,8,386,480],suppress:[6,12,162],sure:[6,8,11,13,14,184,194,195,213,291,294,328,383,439],surf:165,surfac:[2,3,4,6,8,9,40,42,57,70,118,140,162,164,167,189,193,216,223,232,237,240,272,283,290,299,302,303,306,313,318,323,327,328,356,367,392,406,407,426,444,447,452,458],surface_mov:318,surfact:[378,387],surpris:385,surrog:9,surround:[38,56,70,164,184,190,213,250,252,253,255,256,272,278,291,439,475],suspect:3,suspens:[406,407],sustain:[187,213,389],suzuki:[250,291],svg:6,svn:[7,11,12],sw_exampl:419,swamp:291,swap:[],swegat:317,swiggl:[3,247,323,326,328,458,480],swiler:[140,428],switch7_section_start:387,switchflag:[140,428],swm4:475,swol:53,swope:6,sxx:190,sy0302:9,symbol:[6,12,118,163,288,367,385,428],symmetr:[6,70,87,93,112,131,132,133,136,137,138,141,194,195,213,250,251,314,321,362,374,380,383,440,442,480],symmetri:[3,5,6,7,8,63,64,70,166,187,248,272,332,347,362,455,475],sync:[3,6],synchron:[1,228,356],synechococcu:7,syntax:[],sysdim:273,sysstem:367,system:[],system_:274,systemat:[6,234],systemx:3,t10:470,t11:470,t12:470,t13:470,t14:470,t15:470,t3e:12,t_chain:3,t_corr:3,t_correl:450,t_dephas:450,t_e:318,t_e_min:318,t_equil:[315,316],t_event:[3,450,469],t_hi:469,t_infil:318,t_init:[281,318],t_iter:3,t_lb:237,t_lo:469,t_order:3,t_oufil:318,t_out:318,t_outfil:318,t_qm:281,t_switch:[315,316],t_target:369,ta06a:428,ta5:163,tab:[2,455],tabbernor:118,tabinn:412,tabul:[3,7,13,22,37,38,44,55,56,65,71,79,92,184,306,346,362,367,368,370,371,372,373,374,377,383,385,397,401,415,418,421,423,437,439,440,445,457],tabular:418,tabulate_long_rang:421,tad:[],tadmor:9,tag:[199,218,475],tagint:3,tail:[3,87,110,158,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,444,446,447,448,457,473],tailor:[71,319],tait:[9,434,435],taitwat:[],take:[1,2,3,6,11,12,17,20,21,22,23,24,25,26,27,28,29,30,31,32,35,38,39,40,41,42,43,44,45,46,47,48,49,51,53,54,56,59,77,87,89,91,109,112,113,116,117,141,142,151,158,162,168,170,171,172,173,174,175,176,178,179,181,182,184,187,189,190,194,195,196,208,209,213,215,222,225,229,233,234,235,250,252,253,254,255,256,257,265,267,268,270,283,291,293,294,303,304,305,306,308,309,310,311,319,322,329,332,333,334,335,336,337,340,342,346,347,351,361,362,363,365,367,368,369,370,371,372,373,374,375,376,377,380,381,383,384,386,387,388,389,390,391,395,397,398,399,400,401,402,403,404,405,406,409,413,414,415,417,420,421,422,423,429,436,438,439,440,441,442,443,444,446,447,448,449,453,456,463,464,465,472,473,480],taken:[6,59,164,186,212,216,226,227,228,234,235,236,237,277,281,284,318,336,383,385,388,438,450,464,465],talk:[6,7],talli:[3,6,8,41,107,113,202,204,205,206,209,211,234,236,251,306,314,321,385,387,391,420,421,480],tan:[190,480],tandem:[4,16,291],tangent:249,tangenti:[6,108,306,324,328,389],tanh:318,tantalum:[4,428],taper:[3,284],tar:12,tarbal:[0,8,11,12],target:[3,6,7,8,11,12,17,39,41,190,198,209,213,214,216,226,227,228,234,235,236,250,251,252,253,254,255,256,267,268,269,270,274,278,281,286,291,295,304,309,310,311,312,317,318,321,322,325,344,347,369,381,450,461,463,481],target_fil:317,task:[1,6,7,12,13,14,15,16,17,18,54,190,231,274,319,361,453],taskset:16,tatb:[4,287],tatom:475,tau:[3,153,234,235,237,250,278,291,309,310,315,316,318,474,479],tau_1:227,tau_k:227,tau_n_k:227,tb3:163,tbead:156,tbp:367,tchain:[250,251,254,268,269,291],tcl:286,tcom:235,tcsh:[11,12,374],tdamp:[234,250,251,254,291,309,310],tdephas:450,tdrude:[149,219,235,475],teal:190,tech:[7,9,13],technic:[6,7,9,237,284,306,421],techniqu:[6,7,9,87,193,213,248,281,291,322,325,347,412,439,475],technolgi:9,technolog:[9,14,19,231],tell:[2,6,11,12,37,55,183,193,273,341,357,420,421,437,453,457,475],telsa:17,temeperatur:11,temp:[],temp_drud:475,temp_eff:97,tempcom:[143,157],temper:[],temperar:274,temperatur:[],temperature_definit:199,tempfix:470,templ:[7,9,18],templat:[3,8,13,17,19,40,164,165,167,216,226,277,291,294,355,455],templeton2010:199,templeton2011:199,templeton:[9,199],tempor:227,temporari:[2,462],temporarili:[184,290,468,469],ten:14,tend:[29,250,272],tensil:[7,215],tensor:[3,6,8,63,82,83,89,90,91,93,106,112,127,130,131,132,133,136,137,138,140,141,142,143,144,145,146,147,148,150,151,152,153,154,155,156,157,213,237,240,250,251,254,276,278,291,321,346,347,355,385,406,407,425,427,473,480],tenth:[127,345],term:[0,1,3,5,6,7,8,9,12,20,21,22,27,38,40,45,46,61,87,88,89,91,110,112,141,143,152,157,158,171,172,173,184,190,194,195,201,203,204,207,215,221,227,228,229,234,235,236,237,249,250,251,252,253,254,255,256,267,268,270,274,278,281,290,291,304,309,310,311,318,320,322,324,332,333,342,346,354,357,362,363,367,368,369,370,371,372,373,375,376,377,378,379,380,381,383,384,385,386,388,389,390,397,401,404,405,406,407,408,409,410,412,415,422,436,438,440,441,442,447,464,465,467,473,475],termin:[118,250,354,356,425,427,454,463],termostat:310,terrel:353,terri:7,tersoff:[],tersoff_1:[440,441,442],tersoff_2:[440,441,442],tersoff_mod:441,tertiari:176,tessel:[9,162],test:[],test_descriptor_str:3,testf:184,testu:184,tether:[6,289,295,303,305,316,387],tex:8,texa:417,texas_holdem:290,text:[2,3,4,6,7,8,12,13,38,41,56,184,187,189,190,193,199,202,203,204,205,206,207,209,214,231,279,317,318,330,347,349,356,383,386,396,408,428,439,451,455,456,472,480,482],textur:17,tfactor:[3,190],tfinal:480,tfix:290,tfmc:[],th4:163,than:[1,2,3,6,8,9,11,12,13,14,15,16,17,18,27,38,39,40,41,42,56,57,58,59,61,63,68,71,76,86,88,105,108,112,115,116,119,141,162,165,166,167,173,184,186,187,188,190,193,198,200,202,204,205,206,207,209,210,211,212,213,215,216,217,220,223,226,227,228,229,232,233,234,237,248,272,273,277,278,279,280,281,282,284,286,289,290,291,292,295,296,302,303,304,306,310,311,313,314,318,321,322,323,324,325,326,327,328,329,331,346,347,352,353,354,355,356,357,358,361,366,367,368,370,371,372,383,385,388,389,395,406,407,408,412,420,421,422,429,437,438,439,442,444,445,447,450,451,452,453,455,456,457,458,459,460,463,464,467,469,470,472,480,481,482],thank:[231,440,442],thb:421,thb_cutoff:421,thb_cutoff_sq:421,thei:[0,1,2,3,4,6,7,8,11,12,13,15,16,17,20,21,23,24,25,26,27,28,29,30,31,32,35,37,38,39,40,41,42,43,45,46,47,48,49,51,53,54,55,56,57,59,61,63,64,66,68,70,71,74,75,81,82,84,87,89,90,91,93,103,104,106,108,109,112,114,115,116,117,119,140,142,143,144,146,147,150,151,157,159,161,164,166,167,168,170,171,173,174,175,176,178,179,181,182,183,184,187,189,190,193,194,195,196,198,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,221,222,225,226,227,229,230,231,234,235,237,240,247,250,252,253,254,255,256,257,258,259,260,265,267,268,270,276,277,278,279,280,282,283,290,291,292,293,294,306,307,309,310,311,313,317,318,320,321,322,324,326,327,329,331,332,334,335,336,337,340,341,342,344,346,347,349,351,353,354,355,356,357,360,361,362,363,365,366,367,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,395,397,398,399,400,401,402,403,404,405,406,407,408,409,410,413,414,415,417,418,420,421,422,423,428,429,436,437,438,439,440,441,442,443,444,445,446,447,448,451,453,455,456,457,458,459,460,464,465,467,468,473,475,480,482,483],them:[1,2,3,4,6,7,8,9,11,12,13,14,39,40,41,54,59,71,91,107,114,117,119,166,171,187,189,190,191,201,202,203,204,205,206,207,209,212,213,215,223,231,234,235,246,250,252,253,254,255,256,267,270,272,278,280,288,289,290,291,294,306,309,310,311,313,317,318,320,324,325,326,328,329,332,347,349,355,356,357,361,362,367,374,383,386,388,392,412,422,429,444,450,453,455,462,467,470,475,480,481],themselv:[6,11,167,194,195,209,235,346,347,356,358,362,367,377,383,405,408,409,410,428,480],theor:313,theorem:[227,234,367],theoret:[105,231,281,438],theori:[3,9,12,40,140,199,214,228,250,273,346,347,367,447,469],thereaft:[71,242,275,291,314,321,453],therebi:[319,406,407],therefor:[3,6,12,64,87,149,200,219,226,235,237,294,313,347,379,419,421,438,443,448,464,475],therein:[6,408],thereof:87,thermal:[],thermo:[],thermo_modifi:[],thermo_p:[3,63,109,453,473],thermo_press:[63,112,213,219,250,252,253,254,255,256,278,472,473,475],thermo_styl:[],thermo_temp:[63,112,142,212,213,226,250,252,253,254,255,256,267,268,270,273,278,309,310,311,472,473,475],thermoberendsen:6,thermochem:479,thermochemistri:385,thermodyam:[473,479],thermodyanm:[63,212,306,329,464],thermodynam:[],thermophys:412,thermost:[6,146,198,214,219,235,325,475],thermostat:[],thermostatequ:6,thesi:[346,347,406,419],thess:368,theta0:[20,21,24,26,27,28,32,33,35,36,140,173,290,340],theta0max:140,theta10:367,theta1:[171,332,367],theta2:[171,332,367],theta3:[332,367],theta4:367,theta5:367,theta6:367,theta7:367,theta8:367,theta9:367,theta:[3,6,26,27,37,38,63,65,80,140,163,164,173,186,189,229,286,290,318,332,340,391,418,441,455,458,465],theta_0:414,theta_:[340,367],theta_c:391,theta_ijk:367,theta_ijl:332,theta_jik:[409,410],theta_pi:367,theta_sigma:367,thex:282,thi:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,476,477,478,479,480,481,482,483,484],thick:[71,118,189,205,458],thie:110,thijss:313,thin:[116,189],thing:[3,6,11,12,54,68,71,213,250,278,291,306,452,453,457,480],think:[3,6,7,8,11,13,190,291,329,334,337,349,354,392,420,421,439,453,457,460,480],third:[6,9,29,91,134,140,141,162,202,203,204,205,206,207,227,288,303,304,318,376,386,408,414,443,450,451,453,455,458],thirumalai:176,thistl:190,tho:384,thole:[],thompson:[0,5,7,9,13,112,140,141,428],thoroughli:9,those:[1,2,3,4,5,6,7,8,12,13,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,43,45,46,47,48,49,50,51,53,54,56,61,71,77,87,91,108,109,110,112,116,140,141,144,154,164,168,170,171,173,174,175,176,177,178,179,181,182,184,186,187,189,190,200,201,202,203,205,206,207,213,215,216,223,226,229,231,232,233,234,240,249,250,252,253,254,255,256,257,265,267,268,270,277,280,283,291,308,315,316,320,324,325,326,329,330,332,334,335,336,337,338,340,342,346,347,354,356,357,361,362,363,365,368,369,370,371,372,373,374,375,376,377,380,381,383,384,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,408,409,412,413,414,415,417,420,421,422,423,428,429,437,438,439,440,441,442,444,446,447,448,450,452,453,455,457,458,459,460,462,464,465,467,469,472,473,475,480,483,484],though:[6,8,12,16,39,40,63,71,91,104,164,187,190,200,205,210,211,213,215,220,251,289,291,293,302,314,321,331,346,349,356,381,382,383,385,386,388,389,405,406,412,450,455,457,458,463,467,480],thought:[147,234,268,291,322,323,353,389,396,475],thread:[1,3,9,12,16,17,18,231,319,361,468],threads_per_atom:3,three:[3,6,54,63,74,87,91,105,117,118,119,130,140,143,163,164,176,193,212,213,218,238,250,254,273,278,291,306,313,315,318,336,340,346,347,355,361,362,363,367,383,384,386,388,389,393,396,408,409,410,414,418,421,422,428,438,440,441,442,453,455,458,480],threebodi:438,thresh:[41,187,189,190,209,453],threshhold:[3,41,189,209,329,453],threshold:[3,41,86,190,209,272,357,421,450,469],thrid:453,through:[3,6,7,9,11,12,63,164,187,191,213,224,226,231,232,237,239,240,241,250,251,274,282,299,313,318,323,345,352,363,384,385,389,397,423,429,436,443,450,453,456,466,472,475],throughout:[6,16,116,118,319,361,455],thru:[3,6,7,11,12,66,74,75,81,89,90,93,103,104,105,106,159,186,187,190,204,247,306,326,331,345,354,360,458],thrust:1,thu:[1,2,3,6,8,9,11,12,18,33,38,39,41,42,50,59,61,63,64,66,67,70,71,72,73,75,77,81,88,90,91,93,103,104,106,108,109,113,114,115,116,117,140,141,144,147,152,154,159,160,161,164,166,167,168,172,177,183,184,186,187,189,190,191,193,194,195,196,197,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,219,221,223,227,228,229,230,231,232,234,235,240,245,250,254,264,272,278,280,282,286,289,291,292,293,294,295,299,300,303,304,305,306,307,309,310,311,313,314,317,318,320,321,322,323,326,327,328,329,331,332,338,346,347,349,352,354,355,356,360,361,362,363,366,367,368,369,370,371,372,373,374,375,376,377,381,382,383,384,385,386,387,388,389,392,393,394,395,397,401,405,406,407,408,409,410,412,413,415,417,418,419,420,421,422,428,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,450,452,453,455,456,457,458,459,460,462,463,464,465,467,469,470,471,472,473,475,479,480,481,482,483],thumb:[8,10,17,164,186,247,291,361,375,458,464],thz:286,ti2:163,ti3:163,ti4:163,tight:367,tightli:280,tij:380,tildeslei:[29,87,380],tile:[3,6,41,62,164,209,395,444,452],tilt:[3,6,57,58,59,71,152,166,187,190,205,213,215,216,229,248,250,251,272,281,347,349,455,458,473],time:[],time_integr:199,timedelta:203,timelin:5,timer:[1,12,14,17],timescal:[3,201,202,203,204,205,206,207,248,281,286,385,450,464],timespan:[234,235,250,278,291,309,310],timestamp:[3,460],timestep:[],timesteppnig:294,tin:[376,377],tine:203,tinfoil:347,tini:[164,354,367,481],tinker:7,tip3p:[],tip4:6,tip4p:[],tip:[],tirrel:323,titan:15,titer:291,titl:[202,203,204,205,206,207,279,421],title1:[202,203,204,205,206,207],title2:[202,203,204,205,206,207],title3:[202,203,204,205,206,207],tji:380,tl1:163,tl3:163,tlbr_msw:418,tlo:469,tloop:[250,251,254],tlsph:122,tlsph_defgrad:122,tlsph_strain:[124,125],tlsph_strain_rat:[124,125,131],tlsph_stress:[121,131,132],tm3:163,tmax:[3,220,469],tmd:[],tmd_dump_fil:317,tmdatom:317,tmin:220,tmp1:[204,207,466],tmp2:[204,207,466],tmp3:466,tmp:[6,12,41,66,68,69,75,90,93,104,106,114,116,144,159,161,187,189,190,209,280,291,314,321,360,462,466,480],tobia:[250,251,291],todd:268,toe:158,toff:[355,455],togeth:[2,3,6,11,12,17,39,41,71,115,141,144,158,165,187,194,195,202,204,209,213,219,228,235,250,278,291,295,300,303,306,324,328,329,387,392,453,458,463,475,483],toggl:[59,168,462],togheth:3,togther:3,tol:[294,306,346,438],toler:[3,213,282,283,284,294,306,354,356,438,450,469],tomato:190,tong:[9,13],too:[1,3,6,7,39,41,64,67,70,72,73,77,88,140,152,165,167,189,209,210,211,213,216,223,226,230,250,273,278,282,286,288,294,306,313,314,318,321,347,356,357,361,381,450,458,469,472,475,480],took:[71,429],tool:[],toolkit:[6,7,13,14,15],top:[0,3,8,9,11,12,13,59,147,186,193,208,215,230,237,249,268,292,325,326,328,356,361,420,421,428,455,459,465],top_group:300,top_veloc:300,topic:[480,483],toplog:[3,452],topolgi:40,topolog:[2,3,6,7,8,12,13,39,40,87,108,115,167,168,190,210,211,231,276,355,392,412,452,455,456,457,459,460,467],topwal:208,torder:291,torqu:[],torsion:[6,171,172,183,363,420,421],torsion_flag:363,tosi:368,tot:286,total:[3,6,11,12,14,15,16,17,18,39,41,63,71,81,88,89,90,91,98,102,103,104,105,107,109,110,117,122,123,124,125,127,128,129,130,131,132,133,140,141,142,144,145,146,147,150,151,152,153,154,156,158,160,161,162,187,193,196,197,200,202,204,205,206,208,209,211,217,219,221,224,225,226,227,232,234,235,236,237,238,240,248,251,254,264,273,274,276,277,281,286,288,290,291,292,293,295,297,300,303,305,314,315,316,318,321,323,327,346,354,355,356,357,358,361,362,364,366,367,376,383,385,389,408,409,410,418,420,421,425,428,444,450,452,453,457,463,464,469,470,473,480],touch:[12,232,324],toukmaji:[347,380],toward:[9,29,162,189,193,216,217,232,237,249,254,272,289,303,317,319,340,356],toxvaerd:402,tpa:361,tparam:291,tpartial:144,tpc:361,tpcpu:473,tperiod:291,tptask:[16,361],tqx:[113,187,308],tqy:[113,187,308],tqz:[113,187,308],trace:385,track:[3,7,12,211,215,237,318,328,450,455,461,469,473,480],track_displac:199,tracker:231,trade:[6,12,283,346,347,377,397,401,464,469],tradeoff:412,tradit:[6,9,347],traffic:12,trail:[2,22,44,77,87,116,158,168,172,190,194,195,291,333,351,355,356,374,386,408,421,428,449,455,463,465],train:421,traingul:302,traj:214,traj_titl:421,trajectori:[3,6,12,39,87,187,231,250,252,253,255,256,257,258,260,261,263,265,266,267,268,269,270,274,291,294,295,299,319,328,381,412,421,457,465,475,479],tran:[175,176],transfer:[1,6,16,199,219,231,233,314,318,321,346,361,367,475],transform:[],transit:[6,86,249,295,317,356,378,405,410,442,450,469],translat:[3,6,61,63,94,95,96,97,98,143,144,148,157,202,226,230,234,235,240,250,255,256,267,270,274,291,309,310,311,313,349,385,455,473],transmiss:231,transmit:[6,231],transpar:[14,17],transport:[199,318,430],transpos:12,trap:[3,6,91,160,203,232,320,480],trapezoid:[203,480],trate:[3,215,231],travel:306,treat:[2,3,6,8,17,40,42,71,82,84,85,141,143,157,168,185,202,203,204,207,216,225,251,273,276,277,291,306,318,320,327,331,345,346,354,355,357,366,379,385,386,388,391,395,409,410,422,444,455,458,460,463,465,475,480],treatment:[9,286,379],tree:[3,276,405],tref:382,tri:[],tri_surfac:[120,302],trial:[216,226,364,464],triangl:[2,3,6,7,40,42,82,113,134,162,193,266,291,302,306,426,437,444,455,465],triangleflag:455,triangul:[2,6,13,302,426],triangular:[4,6,42,82,113,213,266,302,426,455],tricki:[452,475],triclin:[],triflag:6,trigger:[3,11,12,62,86,209,212,226,354,473],trigon:25,trilinear:237,trilino:17,trim:[3,456],tripflag:420,tripl:[2,140,215,367,420,451,453],triplet:[3,34,37,384,414,418,438,440,441,442],trivial:[8,11],trj:421,trott:[7,9,14,17,140,428],troubl:[11,12],truli:8,truncat:[3,5,6,12,71,280,286,323,327,353,365,377,385,389,397,399,402,412,417,465],trung:15,tscale:[3,248,281],tschopp:67,tsige:371,tsrd:[306,328],tstart:[227,228,234,236,250,251,291,309,310,311,312,381,461],tstat:[],tstop:[227,228,234,236,250,251,291,309,310,311,312,381,461,469],tsuzuki:73,tthi:127,ttm:[],ttm_mod:318,tucker:[140,428],tuckerman2006:250,tuckerman:[250,251,269,274,291,464],tune:[],tunnel:274,turn:[3,4,6,12,22,33,37,39,44,50,54,55,59,65,69,71,108,115,140,163,168,172,177,183,189,190,193,200,210,211,212,213,226,231,250,262,276,279,280,291,306,333,338,341,346,354,356,357,359,361,363,379,391,392,408,412,421,436,437,451,455,457,462,467,468,473,477,482],turquois:190,tutein:363,tutori:[6,9],tweak:[12,164,231],twice:[3,6,16,17,63,88,170,190,193,194,195,213,247,250,284,361,392,453,455,462],twin:67,twist:[406,407],two:[1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,22,38,39,41,42,44,54,56,57,59,61,63,65,68,69,71,76,77,79,87,88,92,107,108,113,114,115,116,117,118,140,143,146,147,149,150,152,158,162,163,164,165,167,172,186,187,188,189,190,193,194,195,200,201,202,203,204,205,206,207,209,210,211,212,213,216,219,223,226,227,228,230,232,233,234,235,237,240,249,250,251,254,272,273,274,277,278,280,281,282,286,288,291,295,303,306,313,314,316,318,321,324,327,329,331,333,342,346,347,349,351,352,354,355,356,359,361,362,363,364,366,367,368,369,370,371,374,375,376,377,379,380,381,382,383,384,385,386,388,389,392,395,396,397,401,405,406,407,408,412,415,418,419,420,421,422,424,428,429,436,437,438,440,441,442,443,444,447,448,449,450,452,453,455,456,457,458,459,462,465,467,469,470,472,473,475,479,480,481,482,483,484],two_temperatur:199,twobodi:[440,442],twogrid:3,twojmax:[140,428],twolevel:[3,452],txt2html:8,txt:[8,12,13,187,191,279,280,318,344,355,396,445,460,480],typcial:[41,209],type1:[77,118,163],type2:[77,118,163],type:[],typen:[77,118,163],typic:[1,2,3,6,7,8,10,11,12,13,14,15,16,17,18,29,39,40,41,45,46,55,57,59,61,63,70,71,86,87,102,107,119,128,158,162,164,165,167,187,188,189,190,193,194,195,196,198,199,202,209,210,211,212,213,215,216,221,223,224,226,229,235,250,262,273,276,277,280,282,284,290,291,294,296,298,306,313,321,322,328,346,349,353,354,355,356,357,358,361,372,374,375,377,387,388,391,392,396,397,401,406,407,408,412,422,425,427,437,439,442,450,451,453,455,456,457,458,464,467,469,470,472,479,480,482,484],typicali:12,tzou:318,u_f:237,u_ij:418,u_prom:367,uberuaga:[249,356],ubiquit:[11,367],uhf:364,uiuc:[9,17],uloop:[3,274,356,360,480],ulpsh:2,ulsph:[],ulsph_num_neigh:129,ultim:469,ultra:162,umbrella:[],umin:[26,27,48,49,173],unabl:[3,11,41,209],unaffect:[187,213,250,291,456,467,472],unalt:[194,195,262],unambigu:[71,205],unari:[331,480],unbalanc:3,unbias:[152,385],unbond:[211,455],unbroken:80,uncertainti:40,unchang:[59,213,216,249,250,252,253,255,256,264,278,291,455,456,459,465],uncharg:[40,347],uncom:[1,4],uncompress:[12,71,189],uncomput:[],uncorrel:[227,313,450],uncoupl:274,undefin:[3,12],under:[0,5,6,7,8,9,10,12,18,21,22,44,140,171,172,189,231,248,277,281,282,332,333,351,385,405,421,428,453,469,475],underestim:162,underflow:189,undergo:[6,86,87,152,227,234,235,295,306],undergon:[212,306],underli:[9,12,17,70,189,250,318,349],undermin:39,underpredict:6,underscor:[2,3,63,193,212,213,248,250,252,253,254,255,256,267,268,270,278,280,309,310,311,331,355,480],understand:[1,6,8,226,251],understood:[187,367],undesir:[59,213,215,250,291],undetermin:306,undisturb:[406,407],undo:[168,231],undump:[],unexpect:[3,461],unfix:[],unfix_flux:199,unfold:304,unfortun:[319,463,464],uniaxi:[3,143,254],uniform:[7,16,41,88,116,199,209,210,211,234,237,240,251,313,382,388,422,450,452,480,481],uniformli:[59,116,186,237,277,318,418,439,481],uninstal:12,uninterrupt:[200,216,226,247,248,250,252,253,254,255,256,267,268,269,270,280,281,291,295,305,308,316,318,324],union:[3,6,40,190,327,329,455,458],uniqu:[3,6,7,8,9,12,39,71,122,227,228,234,235,254,280,286,288,356,383,385,455,480,481],unit:[],unit_styl:3,uniti:[384,412,432],unitless:[64,67,70,71,114,169,202,205,206,215,226,248,250,281,324,354,364,389,415,417,438,440,441,442,479],unitlesss:[78,80,111],univ:[9,13],univers:[3,6,9,12,13,18,87,231,346,347,356,360,406,410,417,419,442,449,452,480],universit:[9,13],unix:[12,17,233,466],unknown:[3,12,64,73,455],unless:[2,3,11,12,15,16,18,55,57,67,118,149,163,164,187,190,191,198,213,216,226,234,250,252,253,255,256,277,278,291,306,317,348,354,375,412,439,453,458,462,467,480],unlik:[12,33,50,59,89,104,154,164,177,187,234,250,254,278,284,286,309,310,311,338,345,346,362,367,383,386,391,392,396,408,409,410,421,428,437,452,457,462,467,480,484],unlimit:418,unlucki:3,unmark:7,unmodifi:307,unnecessari:16,unoccupi:318,unoptim:189,unpack:[0,8,11,361],unpack_bord:8,unpack_border_bodi:8,unpack_border_hybrid:8,unpack_border_vel:8,unpack_comm:8,unpack_comm_bodi:8,unpack_comm_hybrid:8,unpack_comm_vel:8,unpack_exchang:8,unpack_restart:8,unpack_revers:8,unpack_reverse_comm:8,unpack_reverse_hybrid:8,unpad:190,unperturb:87,unphys:[3,6,235,250,291,455],unpredict:[289,465],unrecogn:3,unrel:[8,9,13,170],unreli:412,unrestrain:290,unrestrict:364,unscal:[3,113,158,187,308,456],unset:[346,385],unshift:380,unsmooth:403,unsolv:[358,372],unsort:190,unspecifi:[215,455],unsplit:475,unstabl:[3,237],unstrain:215,unsuccess:[3,277],unsupport:3,untar:12,until:[2,3,6,12,14,38,39,41,56,71,119,184,189,209,213,216,226,231,277,299,306,308,315,331,345,346,357,360,361,367,389,439,450,456,460,461,463,469,479,480],untilt:458,unus:367,unusu:[3,8,357],unwant:[3,164,346],unwrap:[3,66,74,75,81,89,90,93,103,104,106,113,141,159,187,190,191,201,212,214,231,247,291,303,308,455,456,459,465],unwrapexpand:187,unzip:12,up_intern:189,updat:[0,3,6,8,12,13,123,124,125,135,136,137,138,187,193,210,211,219,224,227,234,235,237,239,240,243,244,247,248,250,251,252,253,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,276,278,280,281,286,291,298,299,308,309,310,311,313,318,329,361,367,380,412,420,421,427,450,455,457,465,466,469,475],upenn:[11,13],upgrad:12,upon:[6,200,231,367,443,469],upper:[2,3,41,57,59,71,88,103,105,153,160,186,190,203,205,206,209,213,219,235,237,250,281,286,323,324,329,330,354,389,458,481],upsid:6,upsilon:388,upto:[3,457,463],upward:216,urbana:[231,346,347,406],urey_bradlei:20,usa:9,usabl:[12,226,383],usag:[3,6,8,235,272,286,306,392,405,455],use_ldg:17,useful:361,user:[],user_misc:[30,31,35,174,179,182,336],userguid:9,usr:[11,12,14,456],usual:[2,3,6,9,12,14,17,18,24,28,32,35,36,47,71,87,117,143,144,146,149,157,162,181,187,194,195,200,202,212,213,214,215,226,229,234,236,248,254,273,281,282,288,290,291,306,314,318,321,323,327,331,337,344,356,357,361,372,375,378,380,388,392,393,396,405,406,407,412,414,424,425,426,427,428,438,443,450,456,460,464,466,469,472,473,480,484],util:[17,18,361,388],utilizi:12,utsa:417,utsph_strain_r:137,uttormark:13,uuml:273,uwo:9,v11:6,v22:6,v33:6,v_0:[3,318],v_a:[8,215],v_abc:[453,473,480],v_area:[2,480],v_atomfil:465,v_c:158,v_cluster:280,v_dc:158,v_delta:87,v_dhug:[248,281],v_diff:[160,320],v_displac:215,v_dk:158,v_dlj:158,v_drai:[248,281],v_dx:[247,458],v_dy:[247,458],v_dz:247,v_e_hbond:391,v_ea:[420,421],v_eb:[420,421],v_eqeq:[420,421],v_espac:196,v_f:453,v_fac:453,v_flux:230,v_foo:[453,480],v_ij:418,v_increas:229,v_integr:320,v_jx:91,v_jy:91,v_jz:91,v_k11:91,v_k22:91,v_k33:91,v_k:158,v_ke:[187,483],v_left:458,v_lgr_po:[248,281],v_lgr_vel:[248,281],v_linear:[323,326,328],v_lj:158,v_mol:190,v_mu:406,v_myi:247,v_myindex:480,v_myke:117,v_mystep:462,v_myvar:[8,190],v_myx:247,v_n:237,v_name1:[158,215],v_name2:[158,215],v_name:[3,6,71,87,117,187,189,190,194,195,196,197,201,202,203,204,205,206,207,208,221,229,230,232,234,235,247,293,300,308,309,310,311,320,323,326,328,453,458,462,465,471,473,480,481],v_nstep:329,v_occ:387,v_omega:247,v_oscil:[196,197,208,221,293],v_phi:229,v_prefactor:[194,195,429],v_press:141,v_pressdown:[326,328],v_push:196,v_pxy:6,v_pxz:6,v_pyz:6,v_r0:232,v_r1:162,v_r2:162,v_r:[162,232],v_rad:329,v_radiu:232,v_ramp:[323,326,328],v_rate:[215,232],v_scale1:[194,195],v_scale2:[194,195],v_size:[194,195],v_t_qm:281,v_temp:314,v_theta:[229,458],v_tp:215,v_up:458,v_v0:480,v_v11:6,v_v22:6,v_v33:6,v_v:[247,480],v_valu:[189,453],v_vx:247,v_vy:247,v_vz:[247,481],v_wiggl:[323,326,328],v_x:[2,164,232,247,323,326,328,453,458,480],v_xave:6,v_xmax:6,v_xx:164,v_y:[164,232,458],v_yi:164,v_z:458,vacanc:[4,162,315],vacf:[],vacuum:[318,347,378,442,448],valanc:367,vale:3,valenc:[284,367,385,420,421],valent:367,valeriu:9,valid:[2,3,6,9,11,12,71,118,150,163,189,190,213,226,234,272,291,306,329,331,344,349,383,385,388,418,455,456,463,465,480],vallon:408,valon:408,valu:[],value0:480,value1:[12,144,201,202,203,204,205,206,207,254,320,329,466],value2:[12,144,201,202,203,204,205,206,207,254,320,329,466],valuei:203,valuej:203,valuev:[7,9],valus:280,van:[9,53,87,107,278,282,287,309,375,376,405,408,420,421,447,481],vanderwa:[412,473],vanilla:[6,8,12],vanillia:42,vanish:[219,286,294],vapor:[41,209,226,472],vapour:313,var1:466,var2:466,varaibl:[3,458],vare:318,vari:[1,18,41,61,62,71,87,118,152,154,163,194,195,199,202,203,205,209,213,215,248,250,278,290,291,309,310,318,323,346,372,381,390,403,406,417,429,439,452],variabl:[],variable_hill_factor:13,variable_nam:421,varianc:[117,381,480],variant:[1,3,6,12,83,98,254,291,346,353,361,409,410,440,442,464,468,481],variat:[41,209,480],varieti:[1,2,6,7,9,13,15,71,189,231,349,392,408,420,421,437,480],variou:[],varreturn:453,varshalovich:140,varshnei:13,vartiabl:3,vbia:6,vcm:[],vdim:[153,314,321,481],vdisplac:[3,232,247,323,326,328,480],vdw:[3,376,421],vec1:[117,280],vec2:[117,280],vec:272,vector:[],vel:[3,6,61,202,205,206,215,235,277,295,325,381,385,389,450,457,458,460,475],veld:[13,306,347,371,401],veloc:[],velocit:[230,381,385,389],velocity_bottom:237,velocity_gradi:427,velocity_temp:481,velocity_top:237,vendor:12,verbatim:453,verbos:12,veri:[1,3,6,7,8,9,10,12,13,17,41,71,87,117,187,189,190,201,202,203,204,205,206,207,209,210,211,213,226,240,250,251,262,274,289,294,309,310,320,356,357,358,361,385,389,406,407,417,428,429,439,463,473,475,479,482],verifi:[8,361,412,464,470],verlag:295,verlet:[1,3,7,8,12,18,199,234,250,262,268,274,294,307,318,326,329,449,452,464],versa:[3,6,13,59,158,166,212,232,234,235,291,455,456,475],versu:[6,14,15,16,18,39,41,80,103,104,116,160,190,209,291,294,347,371,380,389,401,412,473,480],vertex:[134,302],vertic:[2,41,134,189,209,216,302,480],vfinal:480,vfrac:113,vhi:[153,481],via:[],vibrat:[6,9,216,228,272,281,286,340,385,450,464],vice:[3,6,13,59,158,166,212,232,234,235,291,455,456,475],video:189,view:[4,6,7,9,13,187,189,306,367,385,386],viewer:[187,189],viewpoint:189,vij:381,vika:13,vim:[],vincent:[9,19],violat:313,violet:190,virial:[3,63,91,112,140,141,158,194,195,213,219,250,251,252,253,254,255,256,276,278,291,294,346,361,364,381,382,385,393],virialmod:393,virtual:[6,7,8,12,438],virut:9,visa:7,viscoelast:[111,389,417],viscoelsat:417,viscos:[],viscou:[],viscous:291,visit:[292,420,421],vista:187,visual:[],viz:[11,13],viz_tool:11,vizplotgui_tool:11,vizualiziton:292,vlo:[153,481],vmax:[213,306],vmd:[6,7,9,11,13,187,191,231,456],vmdarch:191,vmdhome:191,vname:[164,480],voigt:[6,140],vol:[6,8,91,126,141,219,235,277,408,442,451,473,480],volfactor:346,volt:[419,479],volum:[2,3,6,40,41,58,59,63,80,87,91,100,112,116,118,126,130,139,141,162,163,164,167,200,202,205,206,209,213,215,216,226,237,248,250,251,254,257,258,260,261,263,265,266,267,268,269,270,277,278,281,291,295,318,323,327,329,346,349,355,369,406,407,417,434,435,448,451,452,455,458,465,473,475,479,480],volumetr:80,von:[133,138],voro:[3,9,162],vorobyov:475,voronoi:[],voter2:[450,469],voter:[409,410,450,469],voth:[40,274],vpz:325,vratio:480,vri:390,vrpn:231,vshear:324,vstream:6,vtarget:[3,321],vtk:[],vv0210:13,vx0:160,vxcm:291,vxhi:[216,277],vxlo:[216,277],vy0:160,vycm:291,vyhi:[216,277],vylo:[216,277],vz0:160,vzcm:291,vzhi:216,vzi:325,vzlo:216,w_1:140,w_2:140,w_i:140,w_ik:418,waal:[87,107,375,376,405,420,421,447],wadlei:[13,367],wag:[7,9,13],wagner:[7,9,199,237,408],wai:[1,2,3,6,7,8,11,12,15,18,22,44,59,63,65,66,69,71,75,77,79,87,90,91,92,93,104,106,108,114,115,116,140,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,159,161,164,167,172,184,186,187,189,190,193,194,195,202,204,205,207,208,211,212,213,215,224,227,232,234,235,237,248,250,254,262,274,278,280,289,291,292,295,303,306,308,309,310,311,314,317,318,320,323,326,328,329,333,334,335,337,340,347,349,351,354,356,357,361,362,363,374,377,378,381,382,383,384,386,388,391,392,394,397,408,409,410,412,414,418,419,422,428,429,436,438,440,442,449,450,453,455,456,458,459,460,463,464,465,480,481],wait:[1,12,231,273,450,452],walk:[3,227,234,235],wall:[],wall_surac:134,wall_surfac:[134,299],wallhi:323,wallstyl:324,wander:303,wang:[347,408,418],want:[0,1,2,3,5,6,7,8,9,11,12,17,38,40,56,63,66,68,71,75,81,90,93,103,104,106,107,109,110,112,114,116,141,144,159,160,161,164,167,170,184,187,189,190,193,194,195,196,201,202,209,212,215,216,219,221,224,226,232,235,245,264,272,277,280,290,291,293,303,305,307,314,316,321,323,327,329,331,347,349,356,362,363,367,375,376,381,383,386,392,393,394,408,414,418,420,421,429,438,439,440,442,444,451,453,455,456,457,458,460,462,463,473,475,480,482,484],ward:367,warm:[16,385],warn:[],warner:362,warp:[5,408],warranti:7,warren:381,wasn:3,wast:3,watanab:[315,316],watch:356,water:[],watkin:181,wave:[7,9,40,198,248,285,325,364,385],wavefunct:[9,364,385],wavelength:[118,163],wavepacket:[40,364,385,455],wavevector:273,wbodi:83,weak:282,web:[1,8,14,15,16,17,374],webb:199,weber:[3,5,7,15,88,384,410,418,437,438,467],websit:8,weckner:417,weight:[],welcom:453,well:[1,3,6,7,8,9,11,12,13,15,16,17,18,27,40,51,67,71,112,141,143,150,164,173,189,190,196,200,202,207,209,210,211,213,216,221,226,230,234,237,241,247,250,254,277,291,293,300,313,316,324,354,356,361,366,387,388,391,392,393,406,407,408,422,429,440,441,442,453,455,457,459,464,469,475,479,483],wennberg:346,went:[3,11],were:[3,4,5,6,7,11,12,13,15,16,18,19,34,41,42,52,56,60,70,71,109,112,116,142,144,164,167,168,180,187,190,193,196,202,204,205,206,207,209,215,221,223,230,231,262,268,292,324,325,329,339,346,358,360,385,389,392,396,417,421,450,452,453,455,456,457,458,460,462,470,473,480,481,483,484],weren:460,western:9,westview:447,what:[],whatev:[8,12,14,15,108,113,116,117,119,189,190,194,195,213,250,278,280,324,349,353,354,356,361,373,375,420,421,469,475,480],wheat:190,whelan:163,when:[0,1,2,3,4,6,8,9,11,12,13,14,15,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,33,35,37,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,55,56,59,61,62,63,71,81,86,88,103,104,105,107,109,112,113,117,119,142,143,147,151,152,160,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,187,188,189,190,191,193,194,195,196,197,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,220,221,222,223,224,225,226,228,229,231,234,237,238,240,241,245,250,251,252,253,254,255,256,257,262,264,265,267,268,270,272,276,277,278,279,280,281,283,284,285,286,290,291,292,293,294,295,303,304,306,307,308,309,311,313,314,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,334,335,336,337,338,340,341,342,343,344,345,346,347,349,352,353,354,355,356,357,358,360,361,362,363,365,368,369,370,371,372,373,374,375,376,377,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,407,408,409,410,412,413,414,415,417,418,420,421,422,423,428,429,436,438,439,440,441,442,444,446,447,448,450,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,472,473,474,479,480,481,482,484],whenev:[0,8,12,14,71,190,201,206,291,349,391,453,464,468,480,484],whenth:3,where:[1,3,6,8,9,10,11,12,14,15,18,21,23,24,25,26,27,28,29,32,35,36,37,39,40,41,43,47,48,49,51,55,61,63,65,66,68,69,70,71,73,75,79,80,82,83,84,85,87,88,89,90,92,93,94,95,96,97,98,104,106,108,112,113,114,115,116,117,118,119,141,142,143,144,145,146,147,150,151,152,153,154,156,157,158,159,161,163,165,167,168,171,173,183,187,189,190,193,194,195,196,197,200,202,203,205,208,209,212,213,215,216,220,221,223,224,226,227,228,229,230,232,234,235,236,237,240,241,243,245,247,248,251,254,262,265,271,272,273,274,277,279,280,281,284,286,291,292,293,294,295,299,300,303,305,308,309,310,311,314,315,316,318,321,322,323,324,326,327,328,329,332,334,335,336,337,340,341,342,344,347,349,353,354,355,356,357,358,361,362,363,366,367,368,370,374,375,376,377,378,379,380,381,383,384,385,386,387,388,389,390,391,392,393,394,397,401,406,407,408,409,410,412,414,415,417,418,419,420,421,422,428,431,434,435,436,437,438,439,440,441,442,447,448,449,450,452,453,455,457,458,459,460,462,464,465,467,469,470,471,472,473,475,479,480,481,482,484],wherea:[6,11,200,227,250,282,313,318,475],wherebi:283,wherev:230,whether:[6,8,11,12,16,17,39,40,54,59,61,63,70,71,102,107,109,151,152,184,189,190,192,193,194,195,202,207,210,211,212,213,214,215,219,223,226,235,247,250,254,280,294,306,314,320,321,329,331,344,346,347,355,359,361,370,372,376,390,392,396,406,407,408,412,421,437,450,453,455,456,458,460,467,468,469,472,480,481],which:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,29,32,33,37,38,39,40,41,42,44,45,46,47,50,51,53,54,55,56,58,59,61,63,64,66,67,70,71,72,73,74,75,76,77,78,80,81,82,83,85,87,88,89,90,91,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,116,117,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,170,171,172,175,176,177,178,181,183,184,186,187,189,190,191,193,194,195,196,197,198,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,219,220,221,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,240,241,244,245,247,248,249,250,251,252,253,254,255,256,258,260,262,263,265,266,267,268,269,270,272,273,274,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,295,296,297,298,300,302,303,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,323,324,325,326,327,328,329,331,332,333,335,337,338,341,342,344,345,346,347,349,351,352,353,354,355,356,357,358,360,361,362,363,364,366,367,368,370,371,372,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,399,400,401,403,405,406,407,408,409,410,412,414,415,416,418,419,420,421,422,423,424,425,426,427,428,429,432,437,438,439,440,441,442,443,444,447,449,450,451,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,475,480,481,482,483,484],whichev:[12,360,450,469],white:[190,227,234,235,236,291,310,318,455,480,483],whitesmok:190,whitespac:[2,3,190,355,455],who:[0,3,6,7,8,9,13,362,383],whole:[219,231,273,286,295,475],wholli:216,whose:[3,6,7,8,19,38,39,56,59,76,87,149,167,184,189,190,215,232,233,247,250,252,253,255,256,272,273,289,290,294,306,320,327,329,349,356,357,385,399,424,426,438,439,440,442,475,480,481],why:[3,6,235,314,321],wide:[1,6,7,9,61,63,193,314,321,349,358,372,375,385,420,421],wider:1,width:[189,190,364,387],wiggl:[3,215,247,299,323,324,326,328,458],wigner:140,wih:6,wiki:14,wikipedia:[6,14],wild:[3,12,22,44,77,87,116,172,194,195,291,333,351,374,391,449,457,462,482,484],wildcard:[3,12,158,168,187,189,190,288,374,462,465,483,484],wildli:250,win:361,window:[3,4,12,13,71,187,189,191,202,203,204,205,206,207,231,292,311,312,374,456],wipe:[193,392,437,476,478],wire:290,wirt:190,wisconsin:13,wise:[3,12,381,438,464],wish:[2,3,5,6,7,8,11,12,14,17,57,58,59,71,117,141,144,165,166,168,170,187,190,201,202,203,205,206,207,211,215,216,223,226,232,237,241,277,280,291,294,306,307,323,324,349,356,361,370,391,392,408,412,420,439,453,455,456,457,463,467,473,480,481,484],within:[1,2,3,6,8,9,11,12,13,15,16,17,29,39,40,41,42,55,59,61,63,65,69,70,71,72,73,77,79,92,108,112,115,116,117,119,122,140,155,164,167,188,189,190,194,195,200,201,202,204,205,206,207,209,210,211,212,216,218,223,226,232,234,272,276,277,278,280,282,291,292,294,296,298,302,303,307,318,321,323,327,329,331,345,349,354,355,356,357,358,361,366,368,370,377,382,383,384,385,387,392,393,396,397,408,415,416,417,422,423,437,438,440,441,442,443,450,452,453,455,463,464,467,469,475,479,480],without:[1,2,3,4,6,7,8,9,11,12,14,16,17,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,40,43,45,46,47,48,49,51,53,54,56,59,87,109,112,142,151,165,170,171,173,174,175,176,178,179,181,182,184,187,189,190,191,193,196,202,204,205,206,207,208,213,215,222,225,227,229,231,234,247,250,252,253,254,255,256,257,265,267,268,269,270,277,280,282,283,285,289,291,292,293,294,299,306,309,311,322,326,330,332,334,335,336,337,340,342,345,346,347,356,357,361,362,363,365,368,369,370,371,372,373,374,375,376,377,380,381,383,384,385,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,412,413,414,415,417,421,422,423,429,437,438,439,440,441,442,444,446,447,448,453,455,463,464,473,475,479,480],witht:9,witi:15,wolf:[],wolff:[412,439],won:[3,289,407],wong:[199,367],word:[2,3,6,8,12,29,63,190,193,200,201,202,203,205,206,207,214,232,259,264,279,284,290,320,331,345,375,412,451,453,455,480,481],work:[1,3,6,7,8,9,11,12,14,16,18,39,54,59,60,88,117,118,143,145,146,147,151,152,153,154,156,157,162,163,187,189,191,194,195,202,205,206,212,224,233,234,235,237,241,247,250,255,256,267,268,269,270,288,290,292,294,309,310,311,316,345,357,361,374,376,379,381,392,406,407,408,412,450,452,453,456,457,459,463,464,466,469],workaround:[291,412,481],worker:[12,420,421],workhors:8,workstat:[361,453],world:[3,12,140,345,356,360,449,452,453,470,480],worlei:381,worri:17,worsen:18,worst:327,worth:[202,203,204,205,206,207,281,292],would:[1,3,4,5,6,7,8,11,12,22,29,37,40,41,42,44,55,70,71,89,91,116,141,144,152,164,165,166,167,172,183,187,190,191,193,194,195,197,200,202,209,212,214,215,219,220,223,226,229,230,231,235,247,250,251,262,272,274,278,280,282,286,289,306,313,317,325,326,329,331,332,333,334,335,337,338,341,346,349,351,353,354,356,357,360,361,362,363,367,374,375,376,377,381,382,383,384,386,392,393,394,408,409,410,414,418,420,421,425,427,428,438,440,441,442,450,453,455,458,459,460,462,463,464,465,466,470,472,473,475,480,481,483,484],wrap:[1,3,6,11,12,57,59,164,166,186,187,188,190,191,201,206,214,215,216,231,237,247,291,303,306,323,325,327,346,347,356,453,455,456,458,463],wrapper:[],wrigger:295,wright:354,writabl:3,write:[],write_atom_weight:199,write_data:[],write_dump:[],write_freq:421,write_head:8,write_restart:[],writen:292,written:[3,5,6,7,8,9,12,13,14,17,65,69,115,140,162,187,188,189,190,191,193,194,195,196,197,198,199,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,217,219,220,221,222,223,224,225,227,228,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,246,249,257,258,259,260,261,262,263,264,265,266,271,272,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,303,304,306,307,309,310,311,312,313,314,315,317,318,320,321,322,323,325,326,327,328,330,344,349,357,383,392,445,447,450,451,453,456,457,461,462,469,470,471,472,480,482,483,484],wrong:[3,11,213,250,271,323,327,328,357,421,457,462],wrote:[3,457],wt1:412,wt2:412,wt3:412,www:[0,2,3,4,5,6,7,8,10,11,12,13,15,362,383,406,419,420,421,479],x86:12,x_ij:418,x_ijkl:332,x_kjli:332,x_ljik:332,xave:6,xavx:16,xcm:[8,291,480],xdr:[12,187],xeon:[1,4,7,9,12,16,17,18,361,468],xflag:[151,152,238,240,246,291,313],xhe:103,xhi:[2,6,57,59,166,187,215,317,323,326,328,455,458,473,480],xhi_bound:[6,187],xhi_new:455,xhost:[12,16],xi_ij:418,xiaowang:[13,386,440,442],xiij:272,xlat:[164,215,232,473],xlo:[2,6,11,57,59,166,187,215,232,317,323,326,328,455,458,473,480],xlo_bound:[6,187],xlo_new:455,xmax:[6,198,220,262,480],xmgrace:[],xmin:480,xml:[191,419],xml_label:419,xmovi:[],xmu:[324,389],xplane:324,xplor:187,xpo:164,xrd:[],xsph:9,xsu:[3,187,456],xt3:187,xt4:[18,187],xt5:[18,187],xtc:[3,6,7,9,12,187,188,189,190,191],xtcdump:190,xvf:12,xwall:[325,326,328],xxx:12,xyz:[3,6,7,13,42,66,71,106,108,152,159,164,187,188,189,190,191,205,213,240,250,251,254,278,288,289,291,303,305,324,326,328,348,355,452,456,481,483],xzhou:[13,386],xzy:452,yang:418,yb2:163,yb3:163,ybox:215,ycm:291,year:[5,7],yeh:346,yellow:[189,190],yellowgreen:190,yet:[3,7,9,17,39,189,194,282,288,323,347,353,354,361,373,375,376,385,447,453,455,456,480,482,483],yflag:[151,152,238,240,246,291,313],yhi:[6,59,166,187,215,317,323,326,328,455,458,473],yhi_bound:[6,187],yield:[6,91,110,117,141,147,152,190,203,213,219,250,268,282,314,320,321,324,329,346,366,381,389,412,417,473,480],yip:315,ylat:[164,215,232,473],ylo:[6,59,166,187,215,317,323,326,328,455,458,473],ylo_bound:[6,187],ymax:[198,480],ymin:480,york:[274,347],yoshida:[250,291],you:[0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,35,38,39,40,41,42,43,45,46,47,48,49,50,51,53,54,56,57,58,59,61,63,66,68,71,73,74,75,77,81,87,88,89,90,91,93,102,103,104,106,107,109,110,112,114,116,117,140,141,142,143,144,147,151,152,157,158,159,160,161,162,164,165,166,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,186,187,189,190,191,193,194,195,196,197,200,201,202,203,204,205,206,207,208,209,210,211,212,213,215,216,219,221,222,223,224,225,226,227,228,229,230,231,232,234,235,236,245,247,250,252,253,254,255,256,257,262,264,265,267,268,269,270,273,274,276,277,278,280,282,283,286,289,290,291,293,294,295,303,305,306,307,309,310,311,312,314,315,316,317,318,320,321,322,323,324,326,327,328,329,331,332,334,335,336,337,338,340,342,345,346,347,349,351,353,354,355,356,357,360,361,362,363,365,367,368,369,370,371,372,373,374,375,376,377,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,408,409,410,412,413,414,415,416,417,418,419,420,421,422,423,428,429,430,431,432,433,434,435,438,439,440,441,442,444,446,447,448,449,450,451,452,453,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,472,473,475,479,480,481,482,484],young:[389,424,426],your:[0,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,35,38,39,40,43,45,46,47,48,49,51,53,54,56,59,61,107,109,112,142,143,147,151,157,162,164,165,166,167,168,170,171,173,174,175,176,178,179,181,182,184,186,187,188,189,196,199,203,204,207,208,210,211,212,213,216,222,225,226,229,231,234,247,250,252,253,254,255,256,257,265,267,268,270,277,280,283,289,291,293,294,295,308,309,311,314,318,320,321,322,323,324,327,328,329,332,334,335,336,337,340,342,347,349,355,356,357,360,361,362,363,365,367,368,369,370,371,372,373,374,375,376,377,380,381,382,383,384,386,387,388,389,390,391,392,393,394,395,397,398,399,400,401,402,403,404,405,406,408,409,410,412,413,414,415,417,418,420,421,422,423,429,438,439,440,441,442,444,446,447,448,449,452,453,455,457,458,459,462,463,464,465,466,467,468,472,473,479,480,482,484],yourself:[6,8,12,13,213,355],yplane:324,ypo:164,ysu:[3,187,456],yuan:9,yukawa:[],yukawa_1_1:445,yxz:452,yzx:452,z_i:[385,442,448],z_j:[442,448],z_meam:408,zachari:13,zannoni:388,zbl:[],zblcut:442,zblcutinn:428,zblcutout:428,zblexpscal:442,zblz:428,zcm:291,zcylind:324,zepeda:200,zero:[3,4,6,9,11,12,26,27,39,41,48,49,59,61,63,66,71,75,87,88,90,93,102,103,104,105,106,108,109,110,112,113,114,115,116,117,118,121,140,141,143,144,145,152,153,156,157,159,161,162,163,164,166,167,168,170,173,182,184,186,187,189,190,193,194,195,196,198,200,201,202,203,204,205,206,207,208,209,210,211,213,215,220,221,222,223,225,226,227,228,230,234,235,236,237,238,240,246,247,248,250,254,262,265,274,279,280,281,282,283,286,288,289,291,292,293,294,297,298,300,306,308,313,314,316,318,321,322,323,324,325,326,328,329,330,331,336,349,352,354,355,356,357,361,364,367,368,370,371,372,375,377,380,381,385,388,390,391,392,393,397,399,401,402,405,407,408,412,417,421,422,423,436,439,443,448,450,451,452,455,456,458,460,462,463,464,465,469,470,473,475,480,481,482,484],zeta:[3,237,282,386],zfactor:189,zflag:[151,152,238,240,246,291,313],zhang:[291,314,389],zhi:[3,6,166,187,198,317,323,326,328,455,458,473],zhi_bound:[6,187],zhou:[13,367,386,418,440,442],zhu:435,ziegenhain:13,ziegler:[276,408,437,442,448],zimmerman2004:199,zimmerman2010:199,zimmerman:[9,70,199,367],zlat:[215,232,473],zlib:187,zlo:[3,6,166,187,198,317,323,325,326,328,455,458,473],zlo_bound:[6,187],zmax:[198,237,480],zmin:[237,480],zn2:163,zone:[118,292],zoom:[3,187,189,190],zplane:324,zr4:163,zrest:305,zsu:[3,187,456],zwall:323,zwall_veloc:237,zxy:452,zybin:421,zyx:452},titles:["LAMMPS Documentation","5. Accelerating LAMMPS performance","3. Commands","12. Errors","7. Example problems","13. Future and history","6. How-to discussions","1. Introduction","10. Modifying &amp; extending LAMMPS","4. Packages","8. Performance &amp; scalability","11. Python interface to LAMMPS","2. Getting Started","9. Additional tools","5.USER-CUDA package","5.GPU package","5.USER-INTEL package","5.KOKKOS package","5.USER-OMP package","5.OPT package","angle_style charmm command","angle_style class2 command","angle_coeff command","angle_style cosine command","angle_style cosine/delta command","angle_style cosine/periodic command","angle_style cosine/shift command","angle_style cosine/shift/exp command","angle_style cosine/squared command","angle_style dipole command","angle_style fourier command","angle_style fourier/simple command","angle_style harmonic command","angle_style hybrid command","angle_style none command","angle_style quartic command","angle_style sdk command","angle_style command","angle_style table command","atom_modify command","atom_style command","balance command","Body particles","bond_style class2 command","bond_coeff command","bond_style fene command","bond_style fene/expand command","bond_style harmonic command","bond_style harmonic/shift command","bond_style harmonic/shift/cut command","bond_style hybrid command","bond_style morse command","bond_style none command","bond_style nonlinear command","bond_style quartic command","bond_style command","bond_style table command","boundary command","box command","change_box command","clear command","comm_modify command","comm_style command","compute command","compute ackland/atom command","compute angle/local command","compute angmom/chunk command","compute basal/atom command","compute body/local command","compute bond/local command","compute centro/atom command","compute chunk/atom command","compute cluster/atom command","compute cna/atom command","compute com command","compute com/chunk command","compute contact/atom command","compute coord/atom command","compute damage/atom command","compute dihedral/local command","compute dilatation/atom command","compute displace/atom command","compute erotate/asphere command","compute erotate/rigid command","compute erotate/sphere command","compute erotate/sphere/atom command","compute event/displace command","compute fep command","compute group/group command","compute gyration command","compute gyration/chunk command","compute heat/flux command","compute improper/local command","compute inertia/chunk command","compute ke command","compute ke/atom command","compute ke/atom/eff command","compute ke/eff command","compute ke/rigid command","compute meso_e/atom command","compute meso_rho/atom command","compute meso_t/atom command","compute_modify command","compute msd command","compute msd/chunk command","compute msd/nongauss command","compute omega/chunk command","compute pair command","compute pair/local command","compute pe command","compute pe/atom command","compute plasticity/atom command","compute pressure command","compute property/atom command","compute property/chunk command","compute property/local command","compute rdf command","compute reduce command","compute saed command","compute slice command","compute smd/contact_radius command","compute smd/damage command","compute smd/hourglass_error command","compute smd/internal_energy command","compute smd/plastic_strain command","compute smd/plastic_strain_rate command","compute smd/rho command","compute smd/tlsph_defgrad command","compute smd/tlsph_dt command","compute smd/tlsph_num_neighs command","compute smd/tlsph_shape command","compute smd/tlsph_strain command","compute smd/tlsph_strain_rate command","compute smd/tlsph_stress command","compute smd/triangle_mesh_vertices","compute smd/ulsph_num_neighs command","compute smd/ulsph_strain command","compute smd/ulsph_strain_rate command","compute smd/ulsph_stress command","compute smd/vol command","compute sna/atom command","compute stress/atom command","compute temp command","compute temp/asphere command","compute temp/chunk command","compute temp/com command","compute temp/cs command","compute temp/deform command","compute temp/deform/eff command","compute temp/drude command","compute temp/eff command","compute temp/partial command","compute temp/profile command","compute temp/ramp command","compute temp/region command","compute temp/region/eff command","compute temp/rotate command","compute temp/sphere command","compute ti command","compute torque/chunk command","compute vacf command","compute vcm/chunk command","compute voronoi/atom command","compute xrd command","create_atoms command","create_bonds command","create_box command","delete_atoms command","delete_bonds command","dielectric command","dihedral_style charmm command","dihedral_style class2 command","dihedral_coeff command","dihedral_style cosine/shift/exp command","dihedral_style fourier command","dihedral_style harmonic command","dihedral_style helix command","dihedral_style hybrid command","dihedral_style multi/harmonic command","dihedral_style nharmonic command","dihedral_style none command","dihedral_style opls command","dihedral_style quadratic command","dihedral_style command","dihedral_style table command","dimension command","displace_atoms command","dump command","dump h5md command","dump image command","dump_modify command","dump molfile command","echo command","fix command","fix adapt command","fix adapt/fep command","fix addforce command","fix addtorque command","fix append/atoms command","fix atc command","fix atom/swap command","fix ave/atom command","fix ave/chunk command","fix ave/correlate command","fix ave/histo command","fix ave/spatial command","fix ave/spatial/sphere command","fix ave/time command","fix aveforce command","fix balance command","fix bond/break command","fix bond/create command","fix bond/swap command","fix box/relax command","fix colvars command","fix deform command","fix deposit command","fix drag command","fix drude command","fix drude/transform/direct command","fix dt/reset command","fix efield command","fix enforce2d command","fix evaporate command","fix external command","fix freeze command","fix gcmc command","fix gld command","fix gle command","fix gravity command","fix heat command","fix imd command","fix indent command","fix ipi command","fix langevin command","fix langevin/drude command","fix langevin/eff command","fix lb/fluid command","fix lb/momentum command","fix lb/pc command","fix lb/rigid/pc/sphere command","fix lb/viscous command","fix lineforce command","fix meso command","fix meso/stationary command","fix_modify command","fix momentum command","fix move command","fix msst command","fix neb command","fix nvt command","fix nvt/eff command","fix nph/asphere command","fix nph/sphere command","fix nphug command","fix npt/asphere command","fix npt/sphere command","fix nve command","fix nve/asphere command","fix nve/asphere/noforce command","fix nve/body command","fix nve/eff command","fix nve/limit command","fix nve/line command","fix nve/noforce command","fix nve/sphere command","fix nve/tri command","fix nvt/asphere command","fix nvt/sllod command","fix nvt/sllod/eff command","fix nvt/sphere command","fix oneway command","fix orient/fcc command","fix phonon command","fix pimd command","fix planeforce command","fix poems","fix pour command","fix press/berendsen command","fix print command","fix property/atom command","fix qbmsst command","fix qeq/point command","fix qeq/comb command","fix qeq/reax command","fix qmmm command","fix qtb command","fix reax/bonds command","fix reax/c/species command","fix recenter command","fix restrain command","fix rigid command","fix saed/vtk command","fix setforce command","fix shake command","fix smd command","fix smd/adjust_dt command","fix smd/integrate_tlsph command","fix smd/integrate_ulsph command","fix smd/move_tri_surf command","fix smd/setvel command","&lt;no title&gt;","fix smd/wall_surface command","fix spring command","fix spring/rg command","fix spring/self command","fix srd command","fix store/force command","fix store/state command","fix temp/berendsen command","fix temp/csvr command","fix temp/rescale command","fix temp/rescale/eff command","fix tfmc command","fix thermal/conductivity command","fix ti/rs command","fix ti/spring command","fix tmd command","fix ttm command","fix tune/kspace command","fix vector command","fix viscosity command","fix viscous command","fix wall/lj93 command","fix wall/gran command","fix wall/piston command","fix wall/reflect command","fix wall/region command","fix wall/srd command","group command","group2ndx command","if command","improper_style class2 command","improper_coeff command","improper_style cossq command","improper_style cvff command","improper_style fourier command","improper_style harmonic command","improper_style hybrid command","improper_style none command","improper_style ring command","improper_style command","improper_style umbrella command","include command","info command","jump command","kspace_modify command","kspace_style command","label command","lattice command","log command","mass command","min_modify command","min_style command","minimize command","molecule command","neb command","neigh_modify command","neighbor command","newton command","next command","package command","pair_style adp command","pair_style airebo command","pair_style awpmd/cut command","pair_style beck command","pair_style body command","pair_style bop command","pair_style born command","pair_style brownian command","pair_style buck command","pair_style buck/long/coul/long command","pair_style lj/charmm/coul/charmm command","pair_style lj/class2 command","pair_coeff command","pair_style colloid command","pair_style comb command","pair_style coul/cut command","pair_style coul/diel command","pair_style born/coul/long/cs command","pair_style lj/cut/dipole/cut command","pair_style dpd command","pair_style dsmc command","pair_style eam command","pair_style edip command","pair_style eff/cut command","pair_style eim command","pair_style gauss command","pair_style gayberne command","pair_style gran/hooke command","pair_style lj/gromacs command","pair_style hbond/dreiding/lj command","pair_style hybrid command","pair_style kim command","pair_style lcbop command","pair_style line/lj command","pair_style list command","pair_style lj/cut command","pair_style lj96/cut command","pair_style lj/cubic command","pair_style lj/expand command","pair_style lj/long/coul/long command","pair_style lj/sf command","pair_style lj/smooth command","pair_style lj/smooth/linear command","pair_style lj/cut/soft command","pair_style lubricate command","pair_style lubricateU command","pair_style meam command","pair_style meam/spline","pair_style meam/sw/spline","pair_style mie/cut command","pair_modify command","pair_style morse command","pair_style nb3b/harmonic command","pair_style nm/cut command","pair_style none command","pair_style peri/pmb command","pair_style polymorphic command","pair_style quip command","pair_style reax command","pair_style reax/c command","pair_style resquared command","pair_style lj/sdk command","pair_style smd/hertz command","pair_style smd/tlsph command","pair_style smd/tri_surface command","pair_style smd/ulsph command","pair_style snap command","pair_style soft command","pair_style sph/heatconduction command","pair_style sph/idealgas command","pair_style sph/lj command","pair_style sph/rhosum command","pair_style sph/taitwater command","pair_style sph/taitwater/morris command","pair_style srp command","pair_style command","pair_style sw command","pair_style table command","pair_style tersoff command","pair_style tersoff/mod command","pair_style tersoff/zbl command","pair_style thole command","pair_style tri/lj command","pair_write command","pair_style yukawa command","pair_style yukawa/colloid command","pair_style zbl command","partition command","prd command","print command","processors command","python command","quit command","read_data command","read_dump command","read_restart command","region command","replicate command","rerun command","reset_timestep command","restart command","run command","run_style command","set command","shell command","special_bonds command","suffix command","tad command","temper command","thermo command","thermo_modify command","thermo_style command","timestep command","&lt;no title&gt;","uncompute command","undump command","unfix command","units command","variable command","velocity command","write_data command","write_dump command","write_restart command"],titleterms:{"break":210,"default":[37,39,40,55,57,58,59,61,62,71,87,88,102,103,105,107,118,122,123,140,144,152,153,157,163,164,167,169,183,185,186,187,189,190,191,192,194,195,196,198,199,200,202,205,206,207,210,211,213,214,215,216,220,223,226,227,232,234,235,236,237,238,240,245,248,250,251,254,268,269,273,274,277,278,279,280,281,283,286,288,289,291,292,306,308,313,314,315,316,319,321,323,325,329,341,344,346,347,349,350,352,353,355,357,358,359,361,364,367,369,385,406,407,412,420,421,436,437,450,451,452,455,456,458,460,462,463,464,467,469,471,472,473,474,479,481,482,483],"function":480,"long":[368,370,371,372,373,377,379,380,397,401,405,415,423],"new":8,"static":12,acceler:1,ackland:64,acknowledg:7,adapt:[194,195],addforc:196,addit:[12,13],addtorqu:197,adiabat:6,adjust_dt:296,adp:362,airebo:363,alloi:383,amber2lmp:13,amber:6,angl:[8,65],angle_coeff:22,angle_styl:[2,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],angmom:66,append:198,arrai:6,aspher:[6,82,143,252,255,258,259,267],atc:[9,199],atom:[6,7,8,64,67,70,71,72,73,76,77,78,80,81,85,95,96,99,100,101,110,111,113,140,141,162,198,200,201,280,480],atom_modifi:39,atom_styl:40,attract:5,aug:0,aveforc:208,awpmd:[9,364],balanc:[41,209],barostat:6,basal:67,beck:365,berendsen:[278,309],between:6,binary2txt:13,bodi:[6,8,42,68,260,366],bond:[8,13,69,210,211,212,287],bond_coeff:44,bond_styl:[2,43,45,46,47,48,49,50,51,52,53,54,55,56],bop:367,born:[368,379],boundari:[7,57],box:[6,58,213],brownian:369,buck:[370,371,379],bug:3,build:[11,12],calcul:6,call:12,categori:2,centro:70,ch2lmp:13,chain:13,change_box:59,charmm:[6,20,170,372,405],chunk:[6,66,71,75,90,93,104,106,114,144,159,161,202],citat:7,class2:[21,43,171,332,373],clear:60,cluster:72,cmm:9,cna:73,code:6,coeffici:6,colloid:[323,375,447],colvar:[9,13,214],com:[74,75,145],comb3:376,comb:[283,376],come:5,comm_modifi:61,comm_styl:62,command:[2,6,8,12,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,476,477,478,479,480,481,482,483,484],common:3,comparison:1,compos:6,comput:[2,6,8,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,480],compute_modifi:102,condit:7,conduct:[6,314],constant:6,constraint:7,contact:76,contact_radiu:120,coord:77,core:6,correl:203,cosin:[23,24,25,26,27,28,173],cossq:334,coul:[368,370,371,372,373,377,378,379,390,397,401,405,415,423],coupl:6,creat:211,create_atom:164,create_bond:165,create_box:166,createatom:13,creation:7,csld:310,csvr:310,cubic:399,cuda:[9,14,109,112,142,151,196,208,222,225,229,250,257,293,294,309,311,322,368,370,372,373,383,389,390,397,398,400,403,413,438,440],custom:8,cut:[49,364,370,373,377,380,385,387,397,398,405,411,415],cvff:335,damag:[78,121],data2xmovi:13,data:6,databas:13,deby:[377,397],deform:[147,148,215],delete_atom:167,delete_bond:168,delta:24,deposit:216,descript:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,476,477,478,479,480,481,482,483,484],diagnost:7,diel:378,dielectr:169,diffract:9,diffus:6,dihedr:[8,79],dihedral_coeff:172,dihedral_styl:[2,170,171,173,174,175,176,177,178,179,180,181,182,183,184],dilat:80,dimens:185,dipol:[6,29,380],direct:219,discuss:6,disp:6,displac:[81,86],displace_atom:186,distribut:[7,12],document:0,dpd:381,drag:217,dreid:[6,391],drude:[6,9,149,218,219,235],dsf:[377,397],dsmc:382,dump:[6,8,187,188,189,191],dump_modifi:190,dynam:282,eam:[13,383],echo:192,edip:384,eff:[9,13,96,97,148,150,155,236,251,261,269,312,385],efield:221,eim:386,elast:6,emac:13,enforce2d:222,ensembl:7,erot:[82,83,84,85],error:3,evapor:223,event:86,exampl:[1,4,6,11,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,468,469,470,471,472,473,474,476,477,478,479,480,481,482,483,484],exp:[27,173],expand:[46,400],extend:[8,11],extern:224,fcc:272,featur:[7,8],fene:[45,46],fep:[9,13,87,195],field:[6,7],file:6,finit:6,fix:[2,6,8,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,480],fix_modifi:[194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328],flow:6,fluid:237,flux:91,forc:[6,7,307],fourier:[30,31,174,336],freez:225,from:[6,11],futur:5,gauss:387,gaybern:388,gcmc:226,gener:[1,6,7,13],get:12,gld:227,gle:228,global:6,gpu:[15,365,368,370,372,373,375,377,380,381,383,387,388,390,397,398,399,400,411,413,422,423,429,438,439,440,446,447,448],gran:[324,389],granular:6,graviti:229,gromac:390,group2ndx:330,group:[88,329,480],gyrat:[89,90],h5md:[9,187,188],harmon:[32,47,48,49,175,178,323,337,414],hbond:391,heat:[91,230],heatconduct:430,helix:176,hertz:[389,424],histo:204,histori:[5,389],hook:389,hourglass_error:122,how:6,hybrid:[33,50,177,338,392],idealga:431,imag:[187,189],imd:231,implicit:372,improp:[8,92],improper_coeff:333,improper_styl:[2,332,334,335,336,337,338,339,340,341,342],includ:343,inclus:8,indent:232,indic:0,individu:2,induc:6,inertia:93,info:[0,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328,344],input:[2,6,8],instal:11,integr:[6,7],integrate_tlsph:297,integrate_ulsph:298,intel:[9,16,372,388,397,438],interfac:[6,11],internal_energi:123,introduct:7,invers:219,ipi:233,ipp:13,jul:[],jump:345,kate:13,keyword:412,kim:393,kokko:17,kspace:[2,8,319],kspace_modifi:346,kspace_styl:[6,347],label:348,lammp:[0,1,2,6,7,8,11,12],langevin:[234,235,236],lattic:349,lcbop:394,librari:[6,11,12],limit:[262,311],line:[12,263,395],linear:404,lineforc:242,list:[2,396],lj1043:323,lj126:323,lj93:323,lj96:398,lmp2arc:13,lmp2cfg:13,lmp2vmd:13,local:[6,65,68,69,79,92,108,115],log:350,lubric:406,lubricateu:407,make:12,mass:351,math:480,matlab:13,meam:[408,409,410],measur:1,meso:[243,244],meso_:99,meso_rho:100,meso_t:101,messag:3,micelle2d:13,mie:411,min_modifi:352,min_styl:353,minim:[8,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328,354],misc:9,mod:[318,441],model:[6,7],modifi:8,molecul:355,molfil:[9,187,191],moltempl:13,momentum:[238,246],morri:435,mors:[51,391,413],move:247,move_tri_surf:299,movi:[187,189],mpi:11,msd:[103,104,105],msi2lmp:13,msm:[368,370,372,377,397],msst:248,multi:[6,7,178],multipl:6,nb3b:414,neb:[249,356],neigh_modifi:357,neighbor:358,nemd:6,newton:359,next:360,nharmon:179,noforc:[259,264],non:[6,7],none:[34,52,180,339,416],nongauss:105,nonlinear:53,nph:[250,251,252,253,291],nphug:254,npt:[250,251,255,256,291],nve:[257,258,259,260,261,262,263,264,265,266,291],nvt:[250,251,267,268,269,270,291],omega:106,omp:[9,18,20,21,23,24,25,26,27,28,29,30,31,32,35,38,43,45,46,47,48,49,51,53,54,56,170,171,173,174,175,176,178,179,181,182,184,229,250,252,253,254,255,256,257,265,267,268,270,283,332,334,335,336,337,340,342,362,363,365,368,369,370,371,372,373,375,376,377,378,380,381,383,386,387,388,389,390,391,392,395,397,398,399,400,401,402,403,404,405,406,409,410,413,414,415,417,422,423,429,438,439,440,441,442,444,446,447,448],onewai:271,open:7,oper:480,opl:181,opt:[19,372,383,397,401,413],optim:1,option:[6,8,12],orient:272,orthogon:6,other:6,output:[6,7,8,12,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328],overlai:392,overview:11,packag:[1,9,12,14,15,16,17,18,19,361],pair:[6,107,108],pair_coeff:374,pair_modifi:412,pair_styl:[2,362,363,364,365,366,367,368,369,370,371,372,373,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,446,447,448],pair_writ:445,pairwis:8,parallel:11,paramet:6,pars:2,partial:151,particl:[6,7,42],partit:449,past:5,per:6,perform:[1,10],peri:417,period:25,phonon:[9,13,273],pimd:274,piston:325,planeforc:275,plastic:111,plastic_strain:124,plastic_strain_r:125,pmb:417,poem:276,point:282,polariz:6,poli:[369,406,407],polym:13,polymorph:418,post:7,potenti:[2,6,8],pour:277,pppm:6,prd:450,pre:7,press:278,pressur:112,previou:12,print:[279,451],problem:[3,4],process:[6,7],processor:452,profil:152,properti:[6,113,114,115,280],pymol_aspher:13,python:[11,13,453],qbmsst:281,qeq:[282,283,284],qmmm:[9,285],qtb:[9,286],quadrat:182,quantiti:6,quartic:[35,54],quip:419,quit:454,ramp:153,rattl:294,rdf:116,read_data:455,read_dump:456,read_restart:457,reax:[13,284,287,288,420,421],reaxc:9,rebo:363,recent:289,reduc:117,refer:480,reflect:326,region:[8,117,154,155,327,458,480],relat:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,40,41,43,44,45,46,47,48,49,50,51,53,54,55,56,57,59,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,83,84,85,86,87,89,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,223,225,226,227,228,229,230,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,286,287,288,289,291,292,293,295,296,297,298,299,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,340,341,342,343,344,345,346,347,349,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,460,461,462,463,464,465,467,468,469,470,471,472,473,474,476,477,478,480,481,482,483,484],relax:213,replic:459,replica:[6,7],report:3,requir:12,rerun:460,rescal:[311,312],reset:220,reset_timestep:461,resquar:422,restart2data:13,restart:[6,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328,462],restrain:290,restrict:[14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,476,477,478,479,480,481,482,483,484],rho:126,rhosum:433,rigid:[6,83,98,240,291],ring:340,rotat:156,rule:2,run:[6,11,12,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328,463],run_styl:464,scalabl:10,scalar:6,screen:12,script:[2,6,8,11,12],sdk:[36,423],self:305,serial:11,set:[6,465],setforc:293,setvel:300,shake:294,share:[11,12],shell:[6,466],shield:282,shift:[26,27,48,49,173],simpl:31,simul:6,size:6,slater:282,slice:119,sllod:[268,269],small:291,smd:[9,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,295,296,297,298,299,300,302,424,425,426,427],smooth:[403,404],sna:140,snad:140,snap:428,snapshot:6,snav:140,soft:[405,429],solver:2,sourc:7,spatial:[205,206],spc:6,speci:288,special:[7,412,480],special_bond:467,sph:[9,430,431,432,433,434,435],sphere:[84,85,157,206,240,253,256,265,270],spheric:6,spline:[409,410],spring:[303,304,305,316],squar:28,srd:[306,328],srp:436,standard:9,start:[12,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328],state:308,stationari:244,stop:[194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,213,214,215,216,217,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,275,276,277,278,279,280,281,282,283,284,285,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,320,321,322,323,324,325,326,327,328],store:[307,308],strategi:1,streitz:377,stress:141,structur:2,style:[1,2,6,8],submit:8,suffix:468,summari:6,swap:[200,212],syntax:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,273,274,275,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,476,477,478,479,480,481,482,483,484],system:6,tabl:[0,6,38,56,184,439,440],tad:469,taitwat:[434,435],temp:[142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,309,310,311,312],temper:470,temperatur:6,tersoff:[440,441,442],test:11,tfmc:313,thermal:[6,314],thermo:[6,471],thermo_modifi:472,thermo_styl:473,thermodynam:[6,8],thermostat:6,thole:443,time:[6,207],timestep:474,tip3p:6,tip4p:[6,377,397,401,405],tip:12,tlsph:425,tlsph_defgrad:127,tlsph_dt:128,tlsph_num_neigh:129,tlsph_shape:130,tlsph_strain:131,tlsph_strain_rat:132,tlsph_stress:133,tmd:317,tool:13,torqu:159,transform:219,tri:[266,444],tri_surfac:426,triangle_mesh_vertic:134,triclin:6,tstat:381,ttm:318,tune:319,type:7,ulsph:427,ulsph_num_neigh:135,ulsph_strain:136,ulsph_strain_r:137,ulsph_stress:138,umbrella:342,uncomput:476,undump:477,unfix:478,unit:479,user:[9,12,14,16,18],vacf:160,valu:[6,480],variabl:[6,8,480],variou:1,vcm:161,vector:[6,320,480],veloc:481,version:[0,5,12],via:12,vim:13,viscos:[6,321],viscou:[241,322],visual:6,vol:139,voronoi:162,vtk:292,wall:[6,323,324,325,326,327,328],wall_surfac:302,warn:3,water:6,weight:204,what:[7,12],wolf:[368,377],wrapper:11,write:6,write_data:482,write_dump:483,write_restart:484,xmgrace:13,xmovi:13,xrd:163,yukawa:[446,447],zbl:[442,448]}})
\ No newline at end of file
diff --git a/lib/README b/lib/README
index a7a41f00f..7f65a6be6 100644
--- a/lib/README
+++ b/lib/README
@@ -1,51 +1,55 @@
This directory contains libraries that can be linked to when building
LAMMPS, if particular packages are included in the LAMMPS build.
Most of these directories contain code for the library; some contain
a Makefile.lammps file that points to where the library is installed
elsewhere on your system.
In either case, the library itself must be installed and/or built
first, so that the appropriate library files exist for LAMMPS to link
against.
Each library directory contains a README with additional info about
how to acquire and/or build the library. This may require you to edit
one of the provided Makefiles to make it suitable for your machine.
The libraries in this directory are the following:
atc atomistic-to-continuum methods, USER-ATC package
from Reese Jones, Jeremy Templeton, Jon Zimmerman (Sandia)
awpmd antisymmetrized wave packet molecular dynamics, AWPMD package
from Ilya Valuev (JIHT RAS)
colvars collective variable module (Metadynamics, ABF and more)
from Giacomo Fiorin and Jerome Henin (ICMS, Temple U)
+compress hook to system lib for performing I/O compression, COMPRESS pkg
+ from Axel Kohlmeyer (Temple U)
cuda NVIDIA GPU routines, USER-CUDA package
from Christian Trott (U Tech Ilmenau)
gpu general GPU routines, GPU package
from Mike Brown (ORNL)
+h5md ch5md library for output of MD data in HDF5 format
+ from Pierre de Buyl (KU Leuven)
kim hooks to the KIM library, used by KIM package
from Ryan Elliott and Ellad Tadmor (U Minn)
kokkos Kokkos package for GPU and many-core acceleration
from Kokkos development team (Sandia)
linalg set of BLAS and LAPACK routines needed by USER-ATC package
from Axel Kohlmeyer (Temple U)
poems POEMS rigid-body integration package, POEMS package
from Rudranarayan Mukherjee (RPI)
meam modified embedded atom method (MEAM) potential, MEAM package
from Greg Wagner (Sandia)
molfile hooks to VMD molfile plugins, used by the USER-MOLFILE package
from Axel Kohlmeyer (Temple U) and the VMD development team
python hooks to the system Python library, used by the PYTHON package
from the LAMMPS development team
qmmm quantum mechanics/molecular mechanics coupling interface
from Axel Kohlmeyer (Temple U)
quip interface to QUIP/libAtoms framework, USER-QUIP package
from Albert Bartok-Partay and Gabor Csanyi (U Cambridge)
reax ReaxFF potential, REAX package
from Adri van Duin (Penn State) and Aidan Thompson (Sandia)
smd hooks to Eigen library, used by USER-SMD package
from Georg Ganzenmueller (Ernst Mach Institute, Germany)
voronoi hooks to the Voro++ library, used by compute voronoi/atom command
from Daniel Schwen (LANL)
diff --git a/lib/compress/README b/lib/compress/README
new file mode 100644
index 000000000..8f09ab651
--- /dev/null
+++ b/lib/compress/README
@@ -0,0 +1,7 @@
+The Makefile.lammps file in this dir contains the settings to build
+and link LAMMPS with # support for data compression libraries.
+
+You should not normally need to edit Makefile.lammps unless the
+LAMMPS build cannot find the system library file it specifies.
+
+See the top of Makefile.lammps for more details.
diff --git a/lib/h5md/LICENSE b/lib/h5md/LICENSE
new file mode 100644
index 000000000..ad4d36e88
--- /dev/null
+++ b/lib/h5md/LICENSE
@@ -0,0 +1,25 @@
+Copyright (C) 2013-2014 Pierre de Buyl
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ a. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ b. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ c. Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/lib/h5md/Makefile b/lib/h5md/Makefile
new file mode 100644
index 000000000..9680387ab
--- /dev/null
+++ b/lib/h5md/Makefile
@@ -0,0 +1,30 @@
+EXTRAMAKE=Makefile.lammps.empty
+
+CC=h5cc
+CFLAGS=-D_DEFAULT_SOURCE -O2
+HDF5_PATH=/usr
+INC=-I include
+AR=ar
+ARFLAGS=rc
+LIB=libch5md.a
+
+all: lib Makefile.lammps
+
+build:
+ mkdir -p build
+build/ch5md.o: src/ch5md.c | build
+ $(CC) $(INC) $(CFLAGS) -c $< -o $@
+
+Makefile.lammps:
+ cp Makefile.lammps.empty $@
+
+.PHONY: all lib clean
+
+$(LIB): build/ch5md.o
+ $(AR) $(ARFLAGS) $(LIB) build/ch5md.o
+
+lib: $(LIB)
+
+clean:
+ rm -f build/*.o $(LIB)
+
diff --git a/lib/h5md/Makefile.lammps.empty b/lib/h5md/Makefile.lammps.empty
new file mode 100644
index 000000000..e4c1c0ed6
--- /dev/null
+++ b/lib/h5md/Makefile.lammps.empty
@@ -0,0 +1,7 @@
+# Settings that the LAMMPS build will import when this package library is used
+# The default settings assume that HDF5 support is integrated into the standard
+# distribution and search paths and thus only needs to link the HDF5 library.
+
+ch5md_SYSINC =
+ch5md_SYSLIB = -lhdf5
+ch5md_SYSPATH =
diff --git a/lib/h5md/README b/lib/h5md/README
new file mode 100644
index 000000000..62a4979cb
--- /dev/null
+++ b/lib/h5md/README
@@ -0,0 +1,27 @@
+This directory contains the ch5md library, which is bundled with
+LAMMPS under its own BSD license; see below. This library is used
+when the USER-H5MD package is included in a LAMMPS build and the dump
+h5md command is invoked in a LAMMPS input script.
+
+---------------------
+
+ch5md : Read and write H5MD files in C
+======================================
+
+Copyright (C) 2013-2014 Pierre de Buyl
+
+ch5md is a set of C routines to manipulate H5MD files. H5MD is a file format
+specification based on [HDF5](http://www.hdfgroup.org/HDF5/) for storing
+molecular data, whose development is found at <http://nongnu.org/h5md/>.
+
+ch5md is developped by Pierre de Buyl and is released under the 3-clause BSD
+license that can be found in the file LICENSE.
+
+To use the h5md dump style in lammps, execute make in this directory then 'make
+yes-user-h5md' in the src directory of lammps. Rebuild lammps.
+
+If HDF5 is not in a standard system location, edit Makefile.lammps accordingly.
+
+In the case of 2015 and more recent debian and ubuntu systems where concurrent
+serial and mpi are possible, use the full platform depedent path, i.e.
+`HDF5_PATH=/usr/lib/x86_64-linux-gnu/hdf5/serial`
diff --git a/lib/h5md/include/ch5md.h b/lib/h5md/include/ch5md.h
new file mode 100644
index 000000000..7710f0f06
--- /dev/null
+++ b/lib/h5md/include/ch5md.h
@@ -0,0 +1,73 @@
+/* This file is part of ch5md
+ * Copyright (C) 2013-2015 Pierre de Buyl
+ * All rights reserved.
+ *
+ * This software may be modified and distributed under the terms
+ * of the BSD license. See the LICENSE file for details.
+ */
+
+#ifndef CH5MD_H
+#define CH5MD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "hdf5.h"
+#include <stdbool.h>
+
+#define CH5MD_RANK_ERROR -10
+
+typedef struct h5md_element_struct {
+ hid_t group;
+ hid_t step;
+ hid_t time;
+ hid_t value;
+ hid_t datatype;
+ int is_time;
+ int current_step;
+ struct h5md_element_struct *link;
+ struct h5md_particles_group_struct *particles_group;
+} h5md_element;
+
+typedef struct h5md_particles_group_struct {
+ hid_t group;
+ h5md_element position;
+ hid_t box;
+ h5md_element box_edges;
+ h5md_element image;
+ h5md_element velocity;
+ h5md_element force;
+ h5md_element mass;
+ h5md_element species;
+ h5md_element id;
+ h5md_element charge;
+ int local_size_max;
+} h5md_particles_group;
+
+typedef struct {
+ hid_t id;
+ int version[2];
+ hid_t particles;
+ hid_t observables;
+ hid_t parameters;
+} h5md_file;
+
+h5md_file h5md_create_file (const char *filename, const char *author, const char *author_email, const char *creator, const char *creator_version);
+int h5md_close_file(h5md_file file);
+hid_t h5md_open_file (const char *filename);
+h5md_particles_group h5md_create_particles_group(h5md_file file, const char *name);
+h5md_element h5md_create_time_data(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, h5md_element *link);
+int h5md_close_element(h5md_element e);
+h5md_element h5md_create_fixed_data_simple(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, void *data);
+h5md_element h5md_create_fixed_data_scalar(hid_t loc, const char *name, hid_t datatype, void *data);
+int h5md_append(h5md_element e, void *data, int step, double time);
+int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[], h5md_element *link);
+int h5md_write_string_attribute(hid_t loc, const char *obj_name,
+ const char *att_name, const char *value);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/lib/h5md/src/ch5md.c b/lib/h5md/src/ch5md.c
new file mode 100644
index 000000000..19c7c02a8
--- /dev/null
+++ b/lib/h5md/src/ch5md.c
@@ -0,0 +1,436 @@
+/* This file is part of ch5md
+ * Copyright (C) 2013-2015 Pierre de Buyl
+ * All rights reserved.
+ *
+ * This software may be modified and distributed under the terms
+ * of the BSD license. See the LICENSE file for details.
+ */
+
+#include "hdf5.h"
+#include "ch5md.h"
+#include <string.h>
+#include <stdlib.h>
+
+#define MIN_CHUNK 10
+#define MAX_CHUNK 256
+#define MAX_RANK 5
+
+h5md_file h5md_create_file (const char *filename, const char *author, const char *author_email, const char *creator, const char *creator_version)
+{
+ h5md_file file;
+ hid_t g, g1;
+ hid_t a, s, t;
+ hsize_t dims[1];
+
+ file.version[0] = 1;
+ file.version[1] = 0;
+
+ file.id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ g = H5Gcreate(file.id, "h5md", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ dims[0] = 2;
+ s = H5Screate_simple(1, dims, NULL);
+ a = H5Acreate(g, "version", H5T_NATIVE_INT, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, H5T_NATIVE_INT, file.version);
+ H5Aclose(a);
+ H5Sclose(s);
+
+ s = H5Screate(H5S_SCALAR);
+
+ g1 = H5Gcreate(g, "author", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, strlen(author));
+ a = H5Acreate(g1, "name", t, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, t, author);
+ H5Aclose(a);
+ H5Tclose(t);
+ if (NULL!=author_email) {
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, strlen(author_email));
+ a = H5Acreate(g1, "author_email", t, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, t, author_email);
+ H5Aclose(a);
+ H5Tclose(t);
+ }
+ H5Gclose(g1);
+
+ g1 = H5Gcreate(g, "creator", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, strlen(creator));
+ a = H5Acreate(g1, "name", t, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, t, creator);
+ H5Aclose(a);
+ H5Tclose(t);
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, strlen(creator_version));
+ a = H5Acreate(g1, "version", t, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, t, creator_version);
+ H5Aclose(a);
+ H5Tclose(t);
+ H5Gclose(g1);
+
+ file.particles = H5Gcreate(file.id, "particles", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ file.observables = H5Gcreate(file.id, "observables", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ file.parameters = H5Gcreate(file.id, "parameters", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ return file;
+}
+
+int h5md_close_file(h5md_file file) {
+ H5Gclose(file.particles);
+ H5Gclose(file.observables);
+ H5Gclose(file.parameters);
+ H5Fclose(file.id);
+
+ return 0;
+}
+
+hid_t h5md_open_file (const char *filename)
+{
+ hid_t file;
+ hid_t g;
+ hid_t a, s;
+ hsize_t dims[1];
+ int version[2];
+ int version_ok;
+
+ file = H5Fopen(filename, H5F_ACC_RDWR, H5P_DEFAULT);
+
+ g = H5Gopen(file, "h5md", H5P_DEFAULT);
+
+ version_ok = false;
+ dims[0] = 2;
+ a = H5Aopen(g, "version", H5P_DEFAULT);
+ s = H5Aget_space(a);
+ if (!(H5Sis_simple(s)>0)) {
+ printf("H5MD version is not a simple dataspace");
+ H5Sclose(s);
+ H5Aclose(a);
+ H5Gclose(g);
+ H5Fclose(file);
+ } else {
+ if (H5Sget_simple_extent_ndims(s)==1) {
+ H5Sget_simple_extent_dims(s, dims, NULL);
+ if (dims[0]==2) {
+ H5Aread(a, H5T_NATIVE_INT, version);
+ if ( (version[0]==1) && (version[1]==0) ) {version_ok = true;}
+ }
+ }
+ }
+
+ H5Aclose(a);
+ H5Sclose(s);
+ H5Gclose(g);
+
+ if (!version_ok) H5Fclose(file);
+
+ return file;
+
+}
+
+h5md_particles_group h5md_create_particles_group(h5md_file file, const char *name)
+{
+ h5md_particles_group group;
+
+ group.group = H5Gcreate(file.particles, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ return group;
+}
+
+h5md_element h5md_create_time_data(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, h5md_element *link)
+{
+
+ h5md_element td;
+
+ hid_t spc, plist;
+ hsize_t dims[MAX_RANK], max_dims[MAX_RANK], chunks[MAX_RANK];
+
+ int i;
+
+ dims[0] = 0 ;
+ max_dims[0] = H5S_UNLIMITED ;
+ for (i=0; i<rank; i++) {
+ dims[i+1] = int_dims[i];
+ max_dims[i+1] = int_dims[i];
+ }
+ chunks[0] = 1 ;
+ if (MAX_CHUNK<int_dims[0]/4) {
+ chunks[1] = MAX_CHUNK;
+ } else {
+ chunks[1] = int_dims[0];
+ }
+ for (i=1; i<rank; i++) {
+ chunks[i+1]=int_dims[i];
+ }
+
+ td.group = H5Gcreate(loc, name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ if (NULL==link) {
+ spc = H5Screate_simple( 1 , dims, max_dims);
+ plist = H5Pcreate(H5P_DATASET_CREATE);
+ H5Pset_chunk(plist, 1, chunks);
+ td.time = H5Dcreate(td.group, "time", H5T_NATIVE_DOUBLE, spc, H5P_DEFAULT, plist, H5P_DEFAULT);
+ td.step = H5Dcreate(td.group, "step", H5T_NATIVE_INT, spc, H5P_DEFAULT, plist, H5P_DEFAULT);
+ H5Pclose(plist);
+ H5Sclose(spc);
+ td.link=NULL;
+ } else {
+ td.link = link;
+ H5Lcreate_hard(link->group, "step", td.group, "step", H5P_DEFAULT, H5P_DEFAULT);
+ H5Lcreate_hard(link->group, "time", td.group, "time", H5P_DEFAULT, H5P_DEFAULT);
+ }
+
+ spc = H5Screate_simple( rank+1 , dims, max_dims) ;
+ plist = H5Pcreate(H5P_DATASET_CREATE);
+ H5Pset_chunk(plist, rank+1, chunks);
+ td.value = H5Dcreate(td.group, "value", datatype, spc, H5P_DEFAULT, plist, H5P_DEFAULT);
+ H5Pclose(plist);
+ H5Sclose(spc);
+
+ td.datatype = datatype;
+ td.is_time = true;
+
+ return td;
+
+}
+
+int h5md_close_element(h5md_element e)
+{
+ if (!e.is_time) return 0;
+
+ if (e.link==NULL) {
+ H5Dclose(e.step);
+ H5Dclose(e.time);
+ }
+ H5Dclose(e.value);
+ H5Gclose(e.group);
+
+ return 0;
+
+}
+
+h5md_element h5md_create_fixed_data_simple(hid_t loc, const char *name, int rank, int int_dims[], hid_t datatype, void *data)
+{
+
+ h5md_element fd;
+
+ hid_t spc;
+ hsize_t dims[H5S_MAX_RANK];
+ int i;
+
+ for (i=0; i<rank; i++) {
+ dims[i] = int_dims[i];
+ }
+
+ spc = H5Screate_simple(rank, dims, NULL);
+ fd.value = H5Dcreate(loc, name, datatype, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(spc);
+ H5Dwrite(fd.value, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+ H5Dclose(fd.value);
+
+ fd.is_time = false;
+
+ return fd;
+
+}
+
+h5md_element h5md_create_fixed_data_scalar(hid_t loc, const char *name, hid_t datatype, void *data)
+{
+
+ h5md_element fd;
+
+ hid_t spc;
+
+ spc = H5Screate(H5S_SCALAR);
+ fd.value = H5Dcreate(loc, name, datatype, spc, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+ H5Sclose(spc);
+ H5Dwrite(fd.value, datatype, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
+ H5Dclose(fd.value);
+
+ fd.is_time = false;
+
+ return fd;
+
+}
+
+int h5md_extend_by_one(hid_t dset, hsize_t *dims) {
+
+ hid_t file_space;
+ int rank;
+ hsize_t maxdims[H5S_MAX_RANK];
+
+ // Get dataset information
+ file_space = H5Dget_space(dset);
+ rank = H5Sget_simple_extent_ndims(file_space);
+ if (rank > H5S_MAX_RANK) {
+ return CH5MD_RANK_ERROR;
+ }
+ H5Sget_simple_extent_dims(file_space, dims, maxdims);
+ H5Sclose(file_space);
+
+ // Extend dimensions by one
+ dims[0] = dims[0]+1;
+ H5Dset_extent(dset, dims);
+
+ return 0;
+
+}
+
+int h5md_append(h5md_element e, void *data, int step, double time) {
+
+ hid_t mem_space, file_space;
+ int i, rank;
+ hsize_t dims[H5S_MAX_RANK];
+ hsize_t start[H5S_MAX_RANK], count[H5S_MAX_RANK];
+
+ // If not a time-dependent H5MD element, do nothing
+ if (!e.is_time) return 0;
+
+ if (NULL==e.link) {
+ h5md_extend_by_one(e.step, dims);
+
+ // Define hyperslab selection
+ start[0] = dims[0]-1;
+ count[0] = 1;
+
+ // Select the hyperslab
+ file_space = H5Dget_space(e.step);
+ rank = H5Sget_simple_extent_ndims(file_space);
+ mem_space = H5Screate_simple(rank-1, dims+1, NULL);
+ // Define hyperslab selection
+ start[0] = dims[0]-1;
+ count[0] = 1;
+ for (i=1 ; i<rank ; i++) {
+ start[i] = 0;
+ count[i] = dims[i];
+ }
+ H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
+ H5Dwrite(e.step, H5T_NATIVE_INT, mem_space, file_space, H5P_DEFAULT, (void *)&step);
+ H5Sclose(file_space);
+ H5Sclose(mem_space);
+
+ h5md_extend_by_one(e.time, dims);
+
+ // Define hyperslab selection
+ start[0] = dims[0]-1;
+ count[0] = 1;
+
+ // Select the hyperslab
+ file_space = H5Dget_space(e.time);
+ rank = H5Sget_simple_extent_ndims(file_space);
+ mem_space = H5Screate_simple(rank-1, dims+1, NULL);
+ // Define hyperslab selection
+ start[0] = dims[0]-1;
+ count[0] = 1;
+ for (i=1 ; i<rank ; i++) {
+ start[i] = 0;
+ count[i] = dims[i];
+ }
+ H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
+ H5Dwrite(e.time, H5T_NATIVE_DOUBLE, mem_space, file_space, H5P_DEFAULT, (void *)&time);
+ H5Sclose(file_space);
+ H5Sclose(mem_space);
+ }
+
+ h5md_extend_by_one(e.value, dims);
+
+ // Select the hyperslab
+ file_space = H5Dget_space(e.value);
+ rank = H5Sget_simple_extent_ndims(file_space);
+ mem_space = H5Screate_simple(rank-1, dims+1, NULL);
+
+ // Define hyperslab selection
+ start[0] = dims[0]-1;
+ count[0] = 1;
+ for (i=1 ; i<rank ; i++) {
+ start[i] = 0;
+ count[i] = dims[i];
+ }
+ H5Sselect_hyperslab(file_space, H5S_SELECT_SET, start, NULL, count, NULL);
+ H5Dwrite(e.value, e.datatype, mem_space, file_space, H5P_DEFAULT, data);
+ H5Sclose(file_space);
+ H5Sclose(mem_space);
+
+ return 0;
+}
+
+int h5md_create_box(h5md_particles_group *group, int dim, char *boundary[], bool is_time, double value[], h5md_element *link)
+{
+ hid_t spc, att, t;
+ hsize_t dims[1];
+ int int_dims[1];
+ int i;
+ size_t boundary_length, tmp;
+ //char *tmp_boundary;
+
+ // Create box group
+ group->box = H5Gcreate(group->group, "box", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
+
+ // Create dimension attribute
+ spc = H5Screate(H5S_SCALAR);
+ att = H5Acreate(group->box, "dimension", H5T_NATIVE_INT, spc, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(att, H5T_NATIVE_INT, &dim);
+ H5Aclose(att);
+ H5Sclose(spc);
+
+ // Compute the size of the string type for boundary
+ dims[0] = dim;
+ boundary_length=0;
+ for (i=0; i<dim; i++) {
+ tmp = strlen(boundary[i])+1;
+ if (tmp>boundary_length) {
+ boundary_length=tmp;
+ }
+ }
+ char *tmp_boundary = malloc(dim*sizeof(char)*boundary_length);
+ for (i=0; i<dim; i++) {
+ strcpy((tmp_boundary+i*boundary_length), boundary[i]);
+ }
+ // Create boundary attribute
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, boundary_length);
+ spc = H5Screate_simple(1, dims, NULL);
+ att = H5Acreate(group->box, "boundary", t, spc, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(att, t, tmp_boundary);
+ free(tmp_boundary);
+ H5Aclose(att);
+ H5Sclose(spc);
+ H5Tclose(t);
+
+ // Create edges
+ // Check if the box is time-dependent or not
+ int_dims[0]=dim;
+ if (is_time) {
+ group->box_edges = h5md_create_time_data(group->box, "edges", 1, int_dims, H5T_NATIVE_DOUBLE, link);
+ } else {
+ if (NULL!=value) {
+ group->box_edges = h5md_create_fixed_data_simple(group->box, "edges", 1, int_dims, H5T_NATIVE_DOUBLE, value);
+ }
+ }
+
+ H5Gclose(group->box);
+
+ return 0;
+}
+
+int h5md_write_string_attribute(hid_t loc, const char *obj_name,
+ const char *att_name, const char *value)
+{
+ hid_t obj;
+ hid_t s, t, a;
+
+ obj = H5Oopen(loc, obj_name, H5P_DEFAULT);
+
+ t = H5Tcopy(H5T_C_S1);
+ H5Tset_size(t, strlen(value));
+ s = H5Screate(H5S_SCALAR);
+ a = H5Acreate(obj, att_name, t, s, H5P_DEFAULT, H5P_DEFAULT);
+ H5Awrite(a, t, value);
+ H5Aclose(a);
+ H5Sclose(s);
+ H5Tclose(t);
+
+ H5Oclose(obj);
+
+ return 0;
+}
diff --git a/lib/kokkos/Copyright.txt b/lib/kokkos/Copyright.txt
old mode 100755
new mode 100644
diff --git a/lib/kokkos/LICENSE b/lib/kokkos/LICENSE
old mode 100755
new mode 100644
diff --git a/lib/kokkos/Makefile.kokkos b/lib/kokkos/Makefile.kokkos
old mode 100755
new mode 100644
index 473039af5..30ecec336
--- a/lib/kokkos/Makefile.kokkos
+++ b/lib/kokkos/Makefile.kokkos
@@ -1,318 +1,377 @@
# Default settings common options
KOKKOS_PATH=../../lib/kokkos
#Options: OpenMP,Serial,Pthreads,Cuda
KOKKOS_DEVICES ?= "OpenMP"
#KOKKOS_DEVICES ?= "Pthreads"
#Options: KNC,SNB,HSW,Kepler,Kepler30,Kepler32,Kepler35,Kepler37,Maxwell,Maxwell50,Maxwell52,Maxwell53,ARMv8,BGQ,Power7,Power8
KOKKOS_ARCH ?= ""
#Options: yes,no
KOKKOS_DEBUG ?= "no"
#Options: hwloc,librt
KOKKOS_USE_TPLS ?= ""
+#Options: c++11
+KOKKOS_CXX_STANDARD ?= "c++11"
+#Options: kernel_times,aggregate_mpi
+KOKKOS_PROFILING ?= ""
#Default settings specific options
-#Options: force_uvm,use_ldg,rdc
+#Options: force_uvm,use_ldg,rdc,enable_lambda
KOKKOS_CUDA_OPTIONS ?= ""
# Check for general settings
-KOKKOS_CXX_STANDARD ?= "c++11"
-
KOKKOS_INTERNAL_ENABLE_DEBUG := $(strip $(shell echo $(KOKKOS_DEBUG) | grep "yes" | wc -l))
KOKKOS_INTERNAL_ENABLE_PROFILING_COLLECT_KERNEL_DATA := $(strip $(shell echo $(KOKKOS_PROFILING) | grep "kernel_times" | wc -l))
KOKKOS_INTERNAL_ENABLE_PROFILING_AGGREGATE_MPI := $(strip $(shell echo $(KOKKOS_PROFILING) | grep "aggregate_mpi" | wc -l))
KOKKOS_INTERNAL_ENABLE_CXX11 := $(strip $(shell echo $(KOKKOS_CXX_STANDARD) | grep "c++11" | wc -l))
# Check for external libraries
KOKKOS_INTERNAL_USE_HWLOC := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "hwloc" | wc -l))
KOKKOS_INTERNAL_USE_LIBRT := $(strip $(shell echo $(KOKKOS_USE_TPLS) | grep "librt" | wc -l))
# Check for advanced settings
KOKKOS_INTERNAL_CUDA_USE_LDG := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "use_ldg" | wc -l))
KOKKOS_INTERNAL_CUDA_USE_UVM := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "force_uvm" | wc -l))
KOKKOS_INTERNAL_CUDA_USE_RELOC := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "rdc" | wc -l))
+KOKKOS_INTERNAL_CUDA_USE_LAMBDA := $(strip $(shell echo $(KOKKOS_CUDA_OPTIONS) | grep "enable_lambda" | wc -l))
# Check for Kokkos Host Execution Spaces one of which must be on
KOKKOS_INTERNAL_USE_OPENMP := $(strip $(shell echo $(KOKKOS_DEVICES) | grep OpenMP | wc -l))
KOKKOS_INTERNAL_USE_PTHREADS := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Pthread | wc -l))
KOKKOS_INTERNAL_USE_SERIAL := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Serial | wc -l))
+KOKKOS_INTERNAL_USE_QTHREAD := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Qthread | wc -l))
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 0)
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 0)
KOKKOS_INTERNAL_USE_SERIAL := 1
endif
endif
-KOKKOS_INTERNAL_COMPILER_PGI := $(shell $(CXX) --version | grep PGI | wc -l)
+KOKKOS_INTERNAL_COMPILER_PGI := $(shell $(CXX) --version 2>&1 | grep PGI | wc -l)
+KOKKOS_INTERNAL_COMPILER_XL := $(shell $(CXX) -qversion 2>&1 | grep XL | wc -l)
+KOKKOS_INTERNAL_COMPILER_CRAY := $(shell $(CXX) -craype-verbose 2>&1 | grep "CC-" | wc -l)
+KOKKOS_INTERNAL_OS_CYGWIN := $(shell uname | grep CYGWIN | wc -l)
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
KOKKOS_INTERNAL_OPENMP_FLAG := -mp
else
- KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
+ ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
+ KOKKOS_INTERNAL_OPENMP_FLAG := -qsmp=omp
+ else
+ ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
+ # OpenMP is turned on by default in Cray compiler environment
+ KOKKOS_INTERNAL_OPENMP_FLAG :=
+ else
+ KOKKOS_INTERNAL_OPENMP_FLAG := -fopenmp
+ endif
+ endif
endif
ifeq ($(KOKKOS_INTERNAL_COMPILER_PGI), 1)
KOKKOS_INTERNAL_CXX11_FLAG := --c++11
else
- KOKKOS_INTERNAL_CXX11_FLAG := --std=c++11
+ ifeq ($(KOKKOS_INTERNAL_COMPILER_XL), 1)
+ KOKKOS_INTERNAL_CXX11_FLAG := -std=c++11
+ else
+ ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
+ KOKKOS_INTERNAL_CXX11_FLAG := -hstd=c++11
+ else
+ KOKKOS_INTERNAL_CXX11_FLAG := --std=c++11
+ endif
+ endif
endif
-# Check for other Execution Spaces
+# Check for other Execution Spaces
KOKKOS_INTERNAL_USE_CUDA := $(strip $(shell echo $(KOKKOS_DEVICES) | grep Cuda | wc -l))
# Check for Kokkos Architecture settings
#Intel based
KOKKOS_INTERNAL_USE_ARCH_KNC := $(strip $(shell echo $(KOKKOS_ARCH) | grep KNC | wc -l))
KOKKOS_INTERNAL_USE_ARCH_SNB := $(strip $(shell echo $(KOKKOS_ARCH) | grep SNB | wc -l))
KOKKOS_INTERNAL_USE_ARCH_HSW := $(strip $(shell echo $(KOKKOS_ARCH) | grep HSW | wc -l))
#NVIDIA based
KOKKOS_INTERNAL_USE_ARCH_KEPLER30 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler30 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_KEPLER32 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler32 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler35 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_KEPLER37 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler37 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_MAXWELL50 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell50 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_MAXWELL52 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell52 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_MAXWELL53 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell53 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KEPLER30) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER32) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER35) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc))
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_NVIDIA), 0)
KOKKOS_INTERNAL_USE_ARCH_MAXWELL50 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Maxwell | wc -l))
KOKKOS_INTERNAL_USE_ARCH_KEPLER35 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Kepler | wc -l))
KOKKOS_INTERNAL_USE_ARCH_NVIDIA := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_KEPLER30) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER32) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER35) \
+ $(KOKKOS_INTERNAL_USE_ARCH_KEPLER37) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52) \
+ $(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53) | bc))
endif
#ARM based
KOKKOS_INTERNAL_USE_ARCH_ARMV80 := $(strip $(shell echo $(KOKKOS_ARCH) | grep ARMv8 | wc -l))
#IBM based
KOKKOS_INTERNAL_USE_ARCH_BGQ := $(strip $(shell echo $(KOKKOS_ARCH) | grep BGQ | wc -l))
KOKKOS_INTERNAL_USE_ARCH_POWER7 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Power7 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_POWER8 := $(strip $(shell echo $(KOKKOS_ARCH) | grep Power8 | wc -l))
KOKKOS_INTERNAL_USE_ARCH_IBM := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_BGQ)+$(KOKKOS_INTERNAL_USE_ARCH_POWER7)+$(KOKKOS_INTERNAL_USE_ARCH_POWER8) | bc))
#AMD based
KOKKOS_INTERNAL_USE_ARCH_AMDAVX := $(strip $(shell echo $(KOKKOS_ARCH) | grep AMDAVX | wc -l))
#Any AVX?
KOKKOS_INTERNAL_USE_ARCH_AVX := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_SNB)+$(KOKKOS_INTERNAL_USE_ARCH_AMDAVX) | bc ))
KOKKOS_INTERNAL_USE_ARCH_AVX2 := $(strip $(shell echo $(KOKKOS_INTERNAL_USE_ARCH_HSW) | bc ))
#Incompatible flags?
KOKKOS_INTERNAL_USE_ARCH_MULTIHOST := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_AVX)+$(KOKKOS_INTERNAL_USE_ARCH_AVX2)+$(KOKKOS_INTERNAL_USE_ARCH_KNC)+$(KOKKOS_INTERNAL_USE_ARCH_IBM)+$(KOKKOS_INTERNAL_USE_ARCH_AMDAVX)+$(KOKKOS_INTERNAL_USE_ARCH_ARMV80)>1" | bc ))
KOKKOS_INTERNAL_USE_ARCH_MULTIGPU := $(strip $(shell echo "$(KOKKOS_INTERNAL_USE_ARCH_NVIDIA)>1" | bc))
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MULTIHOST), 1)
$(error Defined Multiple Host architectures: KOKKOS_ARCH=$(KOKKOS_ARCH) )
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MULTIGPU), 1)
$(error Defined Multiple GPU architectures: KOKKOS_ARCH=$(KOKKOS_ARCH) )
endif
#Generating the list of Flags
KOKKOS_CPPFLAGS = -I./ -I$(KOKKOS_PATH)/core/src -I$(KOKKOS_PATH)/containers/src -I$(KOKKOS_PATH)/algorithms/src
# No warnings:
KOKKOS_CXXFLAGS =
# INTEL and CLANG warnings:
#KOKKOS_CXXFLAGS = -Wall -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized
# GCC warnings:
#KOKKOS_CXXFLAGS = -Wall -Wshadow -pedantic -Wsign-compare -Wtype-limits -Wuninitialized -Wignored-qualifiers -Wempty-body -Wclobbered
KOKKOS_LIBS = -lkokkos
KOKKOS_LDFLAGS = -L$(shell pwd)
KOKKOS_SRC =
KOKKOS_HEADERS =
#Generating the KokkosCore_config.h file
tmp := $(shell echo "/* ---------------------------------------------" > KokkosCore_config.tmp)
tmp := $(shell echo "Makefile constructed configuration:" >> KokkosCore_config.tmp)
tmp := $(shell date >> KokkosCore_config.tmp)
tmp := $(shell echo "----------------------------------------------*/" >> KokkosCore_config.tmp)
tmp := $(shell echo "/* Execution Spaces */" >> KokkosCore_config.tmp)
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
tmp := $(shell echo '\#define KOKKOS_HAVE_OPENMP 1' >> KokkosCore_config.tmp)
endif
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
tmp := $(shell echo "\#define KOKKOS_HAVE_PTHREAD 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_USE_SERIAL), 1)
tmp := $(shell echo "\#define KOKKOS_HAVE_SERIAL 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
tmp := $(shell echo "\#define KOKKOS_HAVE_CUDA 1" >> KokkosCore_config.tmp )
endif
+ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1)
+ KOKKOS_CPPFLAGS += -I$(QTHREAD_PATH)/include
+ KOKKOS_LDFLAGS += -L$(QTHREAD_PATH)/lib
+ tmp := $(shell echo "\#define KOKKOS_HAVE_QTHREAD 1" >> KokkosCore_config.tmp )
+endif
+
tmp := $(shell echo "/* General Settings */" >> KokkosCore_config.tmp)
ifeq ($(KOKKOS_INTERNAL_ENABLE_CXX11), 1)
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_CXX11_FLAG)
tmp := $(shell echo "\#define KOKKOS_HAVE_CXX11 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_ENABLE_DEBUG), 1)
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
KOKKOS_CXXFLAGS += -G
endif
KOKKOS_CXXFLAGS += -g
KOKKOS_LDFLAGS += -g -ldl
tmp := $(shell echo "\#define KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK 1" >> KokkosCore_config.tmp )
tmp := $(shell echo "\#define KOKKOS_HAVE_DEBUG 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_USE_HWLOC), 1)
KOKKOS_CPPFLAGS += -I$(HWLOC_PATH)/include
KOKKOS_LDFLAGS += -L$(HWLOC_PATH)/lib
KOKKOS_LIBS += -lhwloc
tmp := $(shell echo "\#define KOKKOS_HAVE_HWLOC 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_USE_LIBRT), 1)
tmp := $(shell echo "\#define KOKKOS_USE_LIBRT 1" >> KokkosCore_config.tmp )
tmp := $(shell echo "\#define PREC_TIMER 1" >> KokkosCore_config.tmp )
tmp := $(shell echo "\#define KOKKOSP_ENABLE_RTLIB 1" >> KokkosCore_config.tmp )
KOKKOS_LIBS += -lrt
endif
tmp := $(shell echo "/* Cuda Settings */" >> KokkosCore_config.tmp)
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LDG), 1)
tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LDG_INTRINSIC 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_UVM), 1)
tmp := $(shell echo "\#define KOKKOS_CUDA_USE_UVM 1" >> KokkosCore_config.tmp )
tmp := $(shell echo "\#define KOKKOS_USE_CUDA_UVM 1" >> KokkosCore_config.tmp )
endif
ifeq ($(KOKKOS_INTERNAL_CUDA_USE_RELOC), 1)
tmp := $(shell echo "\#define KOKKOS_CUDA_USE_RELOCATABLE_DEVICE_CODE 1" >> KokkosCore_config.tmp )
KOKKOS_CXXFLAGS += --relocatable-device-code=true
KOKKOS_LDFLAGS += --relocatable-device-code=true
endif
+ifeq ($(KOKKOS_INTERNAL_CUDA_USE_LAMBDA), 1)
+ tmp := $(shell echo "\#define KOKKOS_CUDA_USE_LAMBDA 1" >> KokkosCore_config.tmp )
+ KOKKOS_CXXFLAGS += -expt-extended-lambda
+endif
+
#Add Architecture flags
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX), 1)
+ ifeq ($(KOKKOS_INTERNAL_COMPILER_CRAY), 1)
+ KOKKOS_CXXFLAGS +=
+ KOKKOS_LDFLAGS +=
+ else
KOKKOS_CXXFLAGS += -mavx
KOKKOS_LDFLAGS += -mavx
+ endif
+endif
+
+ifeq ($(KOKKOS_INTERNAL_USE_ARCH_POWER8), 1)
+ KOKKOS_CXXFLAGS += -mcpu=power8
+ KOKKOS_LDFLAGS += -mcpu=power8
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_AVX2), 1)
- KOKKOS_CXXFLAGS += -xcore-avx2
- KOKKOS_LDFLAGS += -xcore-avx2
+ KOKKOS_CXXFLAGS += -march=core-avx2
+ KOKKOS_LDFLAGS += -march=core-avx2
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KNC), 1)
KOKKOS_CXXFLAGS += -mmic
KOKKOS_LDFLAGS += -mmic
endif
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER30), 1)
KOKKOS_CXXFLAGS += -arch=sm_30
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER32), 1)
KOKKOS_CXXFLAGS += -arch=sm_32
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER35), 1)
KOKKOS_CXXFLAGS += -arch=sm_35
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_KEPLER37), 1)
KOKKOS_CXXFLAGS += -arch=sm_37
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL50), 1)
KOKKOS_CXXFLAGS += -arch=sm_50
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL52), 1)
KOKKOS_CXXFLAGS += -arch=sm_52
endif
ifeq ($(KOKKOS_INTERNAL_USE_ARCH_MAXWELL53), 1)
KOKKOS_CXXFLAGS += -arch=sm_53
endif
endif
KOKKOS_INTERNAL_LS_CONFIG := $(shell ls KokkosCore_config.h)
ifeq ($(KOKKOS_INTERNAL_LS_CONFIG), KokkosCore_config.h)
KOKKOS_INTERNAL_NEW_CONFIG := $(strip $(shell diff KokkosCore_config.h KokkosCore_config.tmp | grep define | wc -l))
else
KOKKOS_INTERNAL_NEW_CONFIG := 1
endif
ifneq ($(KOKKOS_INTERNAL_NEW_CONFIG), 0)
tmp := $(shell cp KokkosCore_config.tmp KokkosCore_config.h)
endif
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/*.hpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/impl/*.hpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/containers/src/*.hpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.hpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/algorithms/src/*.hpp)
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/impl/*.cpp)
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.cpp)
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.cpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp)
KOKKOS_LDFLAGS += -L$(CUDA_PATH)/lib64
KOKKOS_LIBS += -lcudart -lcuda
endif
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
KOKKOS_LIBS += -lpthread
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.cpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp)
endif
+ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1)
+ KOKKOS_LIBS += -lqthread
+ KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.cpp)
+ KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.hpp)
+endif
+
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
KOKKOS_SRC += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.cpp)
KOKKOS_HEADERS += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
KOKKOS_CXXFLAGS += -Xcompiler $(KOKKOS_INTERNAL_OPENMP_FLAG)
else
KOKKOS_CXXFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG)
endif
KOKKOS_LDFLAGS += $(KOKKOS_INTERNAL_OPENMP_FLAG)
endif
+#With Cygwin functions such as fdopen and fileno are not defined
+#when strict ansi is enabled. strict ansi gets enabled with --std=c++11
+#though. So we hard undefine it here. Not sure if that has any bad side effects
+#This is needed for gtest actually, not for Kokkos itself!
+ifeq ($(KOKKOS_INTERNAL_OS_CYGWIN), 1)
+ KOKKOS_CXXFLAGS += -U__STRICT_ANSI__
+endif
# Setting up dependencies
KokkosCore_config.h:
KOKKOS_CPP_DEPENDS := KokkosCore_config.h $(KOKKOS_HEADERS)
KOKKOS_OBJ = $(KOKKOS_SRC:.cpp=.o)
KOKKOS_OBJ_LINK = $(notdir $(KOKKOS_OBJ))
include $(KOKKOS_PATH)/Makefile.targets
kokkos-clean:
rm -f $(KOKKOS_OBJ_LINK) KokkosCore_config.h KokkosCore_config.tmp libkokkos.a
libkokkos.a: $(KOKKOS_OBJ_LINK) $(KOKKOS_SRC) $(KOKKOS_HEADERS)
ar cr libkokkos.a $(KOKKOS_OBJ_LINK)
+ ranlib libkokkos.a
KOKKOS_LINK_DEPENDS=libkokkos.a
diff --git a/lib/kokkos/Makefile.targets b/lib/kokkos/Makefile.targets
old mode 100755
new mode 100644
index 86708ac80..009adb42c
--- a/lib/kokkos/Makefile.targets
+++ b/lib/kokkos/Makefile.targets
@@ -1,50 +1,57 @@
Kokkos_UnorderedMap_impl.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/containers/src/impl/Kokkos_UnorderedMap_impl.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/containers/src/impl/Kokkos_UnorderedMap_impl.cpp
Kokkos_AllocationTracker.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_AllocationTracker.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_AllocationTracker.cpp
Kokkos_BasicAllocators.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_BasicAllocators.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_BasicAllocators.cpp
Kokkos_Core.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Core.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Core.cpp
Kokkos_Error.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Error.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Error.cpp
Kokkos_HostSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_HostSpace.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_HostSpace.cpp
Kokkos_hwloc.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_hwloc.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_hwloc.cpp
Kokkos_Serial.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial.cpp
Kokkos_Serial_TaskPolicy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial_TaskPolicy.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Serial_TaskPolicy.cpp
Kokkos_Shape.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Shape.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Shape.cpp
Kokkos_spinwait.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_spinwait.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_spinwait.cpp
Kokkos_Profiling_Interface.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/Kokkos_Profiling_Interface.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/Kokkos_Profiling_Interface.cpp
KokkosExp_SharedAlloc.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/impl/KokkosExp_SharedAlloc.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/impl/KokkosExp_SharedAlloc.cpp
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
Kokkos_Cuda_BasicAllocators.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_BasicAllocators.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_BasicAllocators.cpp
Kokkos_Cuda_Impl.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_Cuda_Impl.cpp
Kokkos_CudaSpace.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Cuda/Kokkos_CudaSpace.cpp
endif
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
Kokkos_ThreadsExec_base.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec_base.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec_base.cpp
Kokkos_ThreadsExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_ThreadsExec.cpp
Kokkos_Threads_TaskPolicy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Threads/Kokkos_Threads_TaskPolicy.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Threads/Kokkos_Threads_TaskPolicy.cpp
endif
+ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1)
+Kokkos_QthreadExec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthread/Kokkos_QthreadExec.cpp
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthread/Kokkos_QthreadExec.cpp
+Kokkos_Qthread_TaskPolicy.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp
+endif
+
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
Kokkos_OpenMPexec.o: $(KOKKOS_CPP_DEPENDS) $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMPexec.cpp
$(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) -c $(KOKKOS_PATH)/core/src/OpenMP/Kokkos_OpenMPexec.cpp
endif
diff --git a/lib/kokkos/README b/lib/kokkos/README
old mode 100755
new mode 100644
index f979495bf..85bd0142b
--- a/lib/kokkos/README
+++ b/lib/kokkos/README
@@ -1,97 +1,126 @@
Kokkos implements a programming model in C++ for writing performance portable
applications targeting all major HPC platforms. For that purpose it provides
abstractions for both parallel execution of code and data management.
Kokkos is designed to target complex node architectures with N-level memory
hierarchies and multiple types of execution resources. It currently can use
OpenMP, Pthreads and CUDA as backend programming models.
The core developers of Kokkos are Carter Edwards and Christian Trott
at the Computer Science Research Institute of the Sandia National
Laboratories.
The KokkosP interface and associated tools are developed by the Application
Performance Team and Kokkos core developers at Sandia National Laboratories.
To learn more about Kokkos consider watching one of our presentations:
GTC 2015:
http://on-demand.gputechconf.com/gtc/2015/video/S5166.html
http://on-demand.gputechconf.com/gtc/2015/presentation/S5166-H-Carter-Edwards.pdf
A programming guide can be found under doc/Kokkos_PG.pdf. This is an initial version
and feedback is greatly appreciated.
For questions please send an email to
kokkos-users@software.sandia.gov
For non-public questions send an email to
hcedwar(at)sandia.gov and crtrott(at)sandia.gov
============================================================================
====Requirements============================================================
============================================================================
Primary tested compilers are:
GCC 4.7.2
+ GCC 4.8.4
+ GCC 4.9.2
GCC 5.1.0
- Intel 14.0.1
- Intel 15.0.1
- Clang 3.7.0
+ Intel 14.0.4
+ Intel 15.0.2
+ Clang 3.5.2
+ Clang 3.6.1
Secondary tested compilers are:
- CUDA 6.5
- CUDA 7.0
+ CUDA 6.5 (with gcc 4.7.2)
+ CUDA 7.0 (with gcc 4.7.2)
+
+Other compilers working:
+ PGI 15.4
+ IBM XL 13.1.2
+ Cygwin 2.1.0 64bit with gcc 4.9.3
Primary tested compiler are passing in release mode
with warnings as errors. We are using the following set
of flags:
GCC: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits
-Wignored-qualifiers -Wempty-body -Wclobbered -Wuninitialized
Intel: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized
Clang: -Wall -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized
+Secondary compilers are passing without -Werror.
+Other compilers are tested occasionally.
============================================================================
====Getting started=========================================================
============================================================================
In the 'example/tutorial' directory you will find step by step tutorial
examples which explain many of the features of Kokkos. They work with
simple Makefiles. To build with g++ and OpenMP simply type 'make openmp'
in the 'example/tutorial' directory. This will build all examples in the
subfolders.
============================================================================
====Running Unit Tests======================================================
============================================================================
To run the unit tests create a build directory and run the following commands
KOKKOS_PATH/generate_makefile.bash
make build-test
make test
Run KOKKOS_PATH/generate_makefile.bash --help for more detailed options such as
changing the device type for which to build.
============================================================================
====Install the library=====================================================
============================================================================
To install Kokkos as a library create a build directory and run the following
KOKKOS_PATH/generate_makefile.bash --prefix=INSTALL_PATH
make lib
make install
KOKKOS_PATH/generate_makefile.bash --help for more detailed options such as
changing the device type for which to build.
============================================================================
====CMakeFiles==============================================================
============================================================================
The CMake files contained in this repository require Tribits and are used
for integration with Trilinos. They do not currently support a standalone
CMake build.
-
+===========================================================================
+====Kokkos and CUDA UVM====================================================
+===========================================================================
+
+Kokkos does support UVM as a specific memory space called CudaUVMSpace.
+Allocations made with that space are accessible from host and device.
+You can tell Kokkos to use that as the default space for Cuda allocations.
+In either case UVM comes with a number of restrictions:
+(i) You can't access allocations on the host while a kernel is potentially
+running. This will lead to segfaults. To avoid that you either need to
+call Kokkos::Cuda::fence() (or just Kokkos::fence()), after kernels, or
+you can set the environment variable CUDA_LAUNCH_BLOCKING=1.
+Furthermore in multi socket multi GPU machines, UVM defaults to using
+zero copy allocations for technical reasons related to using multiple
+GPUs from the same process. If an executable doesn't do that (e.g. each
+MPI rank of an application uses a single GPU [can be the same GPU for
+multiple MPI ranks]) you can set CUDA_MANAGED_FORCE_DEVICE_ALLOC=1.
+This will enforce proper UVM allocations, but can lead to errors if
+more than a single GPU is used by a single process.
+
diff --git a/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp b/lib/kokkos/algorithms/src/KokkosAlgorithms_dummy.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/src/Kokkos_Random.hpp b/lib/kokkos/algorithms/src/Kokkos_Random.hpp
old mode 100755
new mode 100644
index 11763c2f1..5fc17e19b
--- a/lib/kokkos/algorithms/src/Kokkos_Random.hpp
+++ b/lib/kokkos/algorithms/src/Kokkos_Random.hpp
@@ -1,1691 +1,1692 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_RANDOM_HPP
#define KOKKOS_RANDOM_HPP
#include <Kokkos_Core.hpp>
+//#include <Kokkos_Complex.hpp>
#include <cstdio>
#include <cstdlib>
#include <cmath>
/// \file Kokkos_Random.hpp
/// \brief Pseudorandom number generators
///
/// These generators are based on Vigna, Sebastiano (2014). "An
/// experimental exploration of Marsaglia's xorshift generators,
/// scrambled." See: http://arxiv.org/abs/1402.6246
namespace Kokkos {
/*Template functions to get equidistributed random numbers from a generator for a specific Scalar type
template<class Generator,Scalar>
struct rand{
//Max value returned by draw(Generator& gen)
KOKKOS_INLINE_FUNCTION
static Scalar max();
//Returns a value between zero and max()
KOKKOS_INLINE_FUNCTION
static Scalar draw(Generator& gen);
//Returns a value between zero and range()
//Note: for floating point values range can be larger than max()
KOKKOS_INLINE_FUNCTION
static Scalar draw(Generator& gen, const Scalar& range){}
//Return value between start and end
KOKKOS_INLINE_FUNCTION
static Scalar draw(Generator& gen, const Scalar& start, const Scalar& end);
};
The Random number generators themselves have two components a state-pool and the actual generator
A state-pool manages a number of generators, so that each active thread is able to grep its own.
This allows the generation of random numbers which are independent between threads. Note that
in contrast to CuRand none of the functions of the pool (or the generator) are collectives,
i.e. all functions can be called inside conditionals.
template<class Device>
class Pool {
public:
//The Kokkos device type
typedef Device device_type;
//The actual generator type
typedef Generator<Device> generator_type;
//Default constructor: does not initialize a pool
Pool();
//Initializing constructor: calls init(seed,Device_Specific_Number);
Pool(unsigned int seed);
//Intialize Pool with seed as a starting seed with a pool_size of num_states
//The Random_XorShift64 generator is used in serial to initialize all states,
//thus the intialization process is platform independent and deterministic.
void init(unsigned int seed, int num_states);
//Get a generator. This will lock one of the states, guaranteeing that each thread
//will have its private generator. Note: on Cuda getting a state involves atomics,
//and is thus not deterministic!
generator_type get_state();
//Give a state back to the pool. This unlocks the state, and writes the modified
//state of the generator back to the pool.
void free_state(generator_type gen);
}
template<class Device>
class Generator {
public:
//The Kokkos device type
typedef DeviceType device_type;
//Max return values of respective [X]rand[S]() functions
enum {MAX_URAND = 0xffffffffU};
enum {MAX_URAND64 = 0xffffffffffffffffULL-1};
enum {MAX_RAND = static_cast<int>(0xffffffffU/2)};
enum {MAX_RAND64 = static_cast<int64_t>(0xffffffffffffffffULL/2-1)};
//Init with a state and the idx with respect to pool. Note: in serial the
//Generator can be used by just giving it the necessary state arguments
KOKKOS_INLINE_FUNCTION
Generator (STATE_ARGUMENTS, int state_idx = 0);
//Draw a equidistributed uint32_t in the range (0,MAX_URAND]
KOKKOS_INLINE_FUNCTION
uint32_t urand();
//Draw a equidistributed uint64_t in the range (0,MAX_URAND64]
KOKKOS_INLINE_FUNCTION
uint64_t urand64();
//Draw a equidistributed uint32_t in the range (0,range]
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& range);
//Draw a equidistributed uint32_t in the range (start,end]
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& start, const uint32_t& end );
//Draw a equidistributed uint64_t in the range (0,range]
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& range);
//Draw a equidistributed uint64_t in the range (start,end]
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& start, const uint64_t& end );
//Draw a equidistributed int in the range (0,MAX_RAND]
KOKKOS_INLINE_FUNCTION
int rand();
//Draw a equidistributed int in the range (0,range]
KOKKOS_INLINE_FUNCTION
int rand(const int& range);
//Draw a equidistributed int in the range (start,end]
KOKKOS_INLINE_FUNCTION
int rand(const int& start, const int& end );
//Draw a equidistributed int64_t in the range (0,MAX_RAND64]
KOKKOS_INLINE_FUNCTION
int64_t rand64();
//Draw a equidistributed int64_t in the range (0,range]
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& range);
//Draw a equidistributed int64_t in the range (start,end]
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& start, const int64_t& end );
//Draw a equidistributed float in the range (0,1.0]
KOKKOS_INLINE_FUNCTION
float frand();
//Draw a equidistributed float in the range (0,range]
KOKKOS_INLINE_FUNCTION
float frand(const float& range);
//Draw a equidistributed float in the range (start,end]
KOKKOS_INLINE_FUNCTION
float frand(const float& start, const float& end );
//Draw a equidistributed double in the range (0,1.0]
KOKKOS_INLINE_FUNCTION
double drand();
//Draw a equidistributed double in the range (0,range]
KOKKOS_INLINE_FUNCTION
double drand(const double& range);
//Draw a equidistributed double in the range (start,end]
KOKKOS_INLINE_FUNCTION
double drand(const double& start, const double& end );
//Draw a standard normal distributed double
KOKKOS_INLINE_FUNCTION
double normal() ;
//Draw a normal distributed double with given mean and standard deviation
KOKKOS_INLINE_FUNCTION
double normal(const double& mean, const double& std_dev=1.0);
}
//Additional Functions:
//Fills view with random numbers in the range (0,range]
template<class ViewType, class PoolType>
void fill_random(ViewType view, PoolType pool, ViewType::value_type range);
//Fills view with random numbers in the range (start,end]
template<class ViewType, class PoolType>
void fill_random(ViewType view, PoolType pool,
ViewType::value_type start, ViewType::value_type end);
*/
template<class Generator, class Scalar>
struct rand;
template<class Generator>
struct rand<Generator,char> {
KOKKOS_INLINE_FUNCTION
static short max(){return 127;}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen)
{return short((gen.rand()&0xff+256)%256);}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen, const char& range)
{return char(gen.rand(range));}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen, const char& start, const char& end)
{return char(gen.rand(start,end));}
};
template<class Generator>
struct rand<Generator,short> {
KOKKOS_INLINE_FUNCTION
static short max(){return 32767;}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen)
{return short((gen.rand()&0xffff+65536)%32768);}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen, const short& range)
{return short(gen.rand(range));}
KOKKOS_INLINE_FUNCTION
static short draw(Generator& gen, const short& start, const short& end)
{return short(gen.rand(start,end));}
};
template<class Generator>
struct rand<Generator,int> {
KOKKOS_INLINE_FUNCTION
static int max(){return Generator::MAX_RAND;}
KOKKOS_INLINE_FUNCTION
static int draw(Generator& gen)
{return gen.rand();}
KOKKOS_INLINE_FUNCTION
static int draw(Generator& gen, const int& range)
{return gen.rand(range);}
KOKKOS_INLINE_FUNCTION
static int draw(Generator& gen, const int& start, const int& end)
{return gen.rand(start,end);}
};
template<class Generator>
struct rand<Generator,unsigned int> {
KOKKOS_INLINE_FUNCTION
static unsigned int max () {
return Generator::MAX_URAND;
}
KOKKOS_INLINE_FUNCTION
static unsigned int draw (Generator& gen) {
return gen.urand ();
}
KOKKOS_INLINE_FUNCTION
static unsigned int draw(Generator& gen, const unsigned int& range) {
return gen.urand (range);
}
KOKKOS_INLINE_FUNCTION
static unsigned int
draw (Generator& gen, const unsigned int& start, const unsigned int& end) {
return gen.urand (start, end);
}
};
template<class Generator>
struct rand<Generator,long> {
KOKKOS_INLINE_FUNCTION
static long max () {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (long) == 4 ?
static_cast<long> (Generator::MAX_RAND) :
static_cast<long> (Generator::MAX_RAND64);
}
KOKKOS_INLINE_FUNCTION
static long draw (Generator& gen) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (long) == 4 ?
static_cast<long> (gen.rand ()) :
static_cast<long> (gen.rand64 ());
}
KOKKOS_INLINE_FUNCTION
static long draw (Generator& gen, const long& range) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (long) == 4 ?
static_cast<long> (gen.rand (static_cast<int> (range))) :
static_cast<long> (gen.rand64 (range));
}
KOKKOS_INLINE_FUNCTION
static long draw (Generator& gen, const long& start, const long& end) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (long) == 4 ?
static_cast<long> (gen.rand (static_cast<int> (start),
static_cast<int> (end))) :
static_cast<long> (gen.rand64 (start, end));
}
};
template<class Generator>
struct rand<Generator,unsigned long> {
KOKKOS_INLINE_FUNCTION
static unsigned long max () {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (unsigned long) == 4 ?
static_cast<unsigned long> (Generator::MAX_URAND) :
static_cast<unsigned long> (Generator::MAX_URAND64);
}
KOKKOS_INLINE_FUNCTION
static unsigned long draw (Generator& gen) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (unsigned long) == 4 ?
static_cast<unsigned long> (gen.urand ()) :
static_cast<unsigned long> (gen.urand64 ());
}
KOKKOS_INLINE_FUNCTION
static unsigned long draw(Generator& gen, const unsigned long& range) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (unsigned long) == 4 ?
static_cast<unsigned long> (gen.urand (static_cast<unsigned int> (range))) :
static_cast<unsigned long> (gen.urand64 (range));
}
KOKKOS_INLINE_FUNCTION
static unsigned long
draw (Generator& gen, const unsigned long& start, const unsigned long& end) {
// FIXME (mfh 26 Oct 2014) It would be better to select the
// return value at compile time, using something like enable_if.
return sizeof (unsigned long) == 4 ?
static_cast<unsigned long> (gen.urand (static_cast<unsigned int> (start),
static_cast<unsigned int> (end))) :
static_cast<unsigned long> (gen.urand64 (start, end));
}
};
// NOTE (mfh 26 oct 2014) This is a partial specialization for long
// long, a C99 / C++11 signed type which is guaranteed to be at
// least 64 bits. Do NOT write a partial specialization for
// int64_t!!! This is just a typedef! It could be either long or
// long long. We don't know which a priori, and I've seen both.
// The types long and long long are guaranteed to differ, so it's
// always safe to specialize for both.
template<class Generator>
struct rand<Generator, long long> {
KOKKOS_INLINE_FUNCTION
static long long max () {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return Generator::MAX_RAND64;
}
KOKKOS_INLINE_FUNCTION
static long long draw (Generator& gen) {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return gen.rand64 ();
}
KOKKOS_INLINE_FUNCTION
static long long draw (Generator& gen, const long long& range) {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return gen.rand64 (range);
}
KOKKOS_INLINE_FUNCTION
static long long draw (Generator& gen, const long long& start, const long long& end) {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return gen.rand64 (start, end);
}
};
// NOTE (mfh 26 oct 2014) This is a partial specialization for
// unsigned long long, a C99 / C++11 unsigned type which is
// guaranteed to be at least 64 bits. Do NOT write a partial
// specialization for uint64_t!!! This is just a typedef! It could
// be either unsigned long or unsigned long long. We don't know
// which a priori, and I've seen both. The types unsigned long and
// unsigned long long are guaranteed to differ, so it's always safe
// to specialize for both.
template<class Generator>
struct rand<Generator,unsigned long long> {
KOKKOS_INLINE_FUNCTION
static unsigned long long max () {
// FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 bits.
return Generator::MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
static unsigned long long draw (Generator& gen) {
// FIXME (mfh 26 Oct 2014) It's legal for unsigned long long to be > 64 bits.
return gen.urand64 ();
}
KOKKOS_INLINE_FUNCTION
static unsigned long long draw (Generator& gen, const unsigned long long& range) {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return gen.urand64 (range);
}
KOKKOS_INLINE_FUNCTION
static unsigned long long
draw (Generator& gen, const unsigned long long& start, const unsigned long long& end) {
// FIXME (mfh 26 Oct 2014) It's legal for long long to be > 64 bits.
return gen.urand64 (start, end);
}
};
template<class Generator>
struct rand<Generator,float> {
KOKKOS_INLINE_FUNCTION
static float max(){return 1.0f;}
KOKKOS_INLINE_FUNCTION
static float draw(Generator& gen)
{return gen.frand();}
KOKKOS_INLINE_FUNCTION
static float draw(Generator& gen, const float& range)
{return gen.frand(range);}
KOKKOS_INLINE_FUNCTION
static float draw(Generator& gen, const float& start, const float& end)
{return gen.frand(start,end);}
};
template<class Generator>
struct rand<Generator,double> {
KOKKOS_INLINE_FUNCTION
static double max(){return 1.0;}
KOKKOS_INLINE_FUNCTION
static double draw(Generator& gen)
{return gen.drand();}
KOKKOS_INLINE_FUNCTION
static double draw(Generator& gen, const double& range)
{return gen.drand(range);}
KOKKOS_INLINE_FUNCTION
static double draw(Generator& gen, const double& start, const double& end)
{return gen.drand(start,end);}
};
template<class DeviceType>
class Random_XorShift64_Pool;
template<class DeviceType>
class Random_XorShift64 {
private:
uint64_t state_;
const int state_idx_;
friend class Random_XorShift64_Pool<DeviceType>;
public:
typedef DeviceType device_type;
enum {MAX_URAND = 0xffffffffU};
enum {MAX_URAND64 = 0xffffffffffffffffULL-1};
enum {MAX_RAND = static_cast<int>(0xffffffff/2)};
enum {MAX_RAND64 = static_cast<int64_t>(0xffffffffffffffffLL/2-1)};
KOKKOS_INLINE_FUNCTION
Random_XorShift64 (uint64_t state, int state_idx = 0)
: state_(state),state_idx_(state_idx){}
KOKKOS_INLINE_FUNCTION
uint32_t urand() {
state_ ^= state_ >> 12;
state_ ^= state_ << 25;
state_ ^= state_ >> 27;
uint64_t tmp = state_ * 2685821657736338717ULL;
tmp = tmp>>16;
return static_cast<uint32_t>(tmp&MAX_URAND);
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64() {
state_ ^= state_ >> 12;
state_ ^= state_ << 25;
state_ ^= state_ >> 27;
return (state_ * 2685821657736338717ULL) - 1;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& range) {
const uint32_t max_val = (MAX_URAND/range)*range;
uint32_t tmp = urand();
while(tmp>=max_val)
tmp = urand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& start, const uint32_t& end ) {
return urand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& range) {
const uint64_t max_val = (MAX_URAND64/range)*range;
uint64_t tmp = urand64();
while(tmp>=max_val)
tmp = urand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& start, const uint64_t& end ) {
return urand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int rand() {
return static_cast<int>(urand()/2);
}
KOKKOS_INLINE_FUNCTION
int rand(const int& range) {
const int max_val = (MAX_RAND/range)*range;
int tmp = rand();
while(tmp>=max_val)
tmp = rand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int rand(const int& start, const int& end ) {
return rand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64() {
return static_cast<int64_t>(urand64()/2);
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& range) {
const int64_t max_val = (MAX_RAND64/range)*range;
int64_t tmp = rand64();
while(tmp>=max_val)
tmp = rand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& start, const int64_t& end ) {
return rand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
float frand() {
return 1.0f * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& start, const float& end ) {
return frand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
double drand() {
return 1.0 * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& start, const double& end ) {
return drand(end-start)+start;
}
//Marsaglia polar method for drawing a standard normal distributed random number
KOKKOS_INLINE_FUNCTION
double normal() {
double S = 2.0;
double U;
while(S>=1.0) {
U = drand();
const double V = drand();
S = U*U+V*V;
}
return U*sqrt(-2.0*log(S)/S);
}
KOKKOS_INLINE_FUNCTION
double normal(const double& mean, const double& std_dev=1.0) {
return mean + normal()*std_dev;
}
};
template<class DeviceType = Kokkos::DefaultExecutionSpace>
class Random_XorShift64_Pool {
private:
typedef View<int*,DeviceType> lock_type;
typedef View<uint64_t*,DeviceType> state_data_type;
lock_type locks_;
state_data_type state_;
int num_states_;
public:
typedef Random_XorShift64<DeviceType> generator_type;
typedef DeviceType device_type;
Random_XorShift64_Pool() {
num_states_ = 0;
}
Random_XorShift64_Pool(uint64_t seed) {
num_states_ = 0;
init(seed,DeviceType::max_hardware_threads());
}
Random_XorShift64_Pool(const Random_XorShift64_Pool& src):
locks_(src.locks_),
state_(src.state_),
num_states_(src.num_states_)
{}
Random_XorShift64_Pool operator = (const Random_XorShift64_Pool& src) {
locks_ = src.locks_;
state_ = src.state_;
num_states_ = src.num_states_;
return *this;
}
void init(uint64_t seed, int num_states) {
num_states_ = num_states;
locks_ = lock_type("Kokkos::Random_XorShift64::locks",num_states_);
state_ = state_data_type("Kokkos::Random_XorShift64::state",num_states_);
typename state_data_type::HostMirror h_state = create_mirror_view(state_);
typename lock_type::HostMirror h_lock = create_mirror_view(locks_);
// Execute on the HostMirror's default execution space.
Random_XorShift64<typename state_data_type::HostMirror::execution_space> gen(seed,0);
for(int i = 0; i < 17; i++)
gen.rand();
for(int i = 0; i < num_states_; i++) {
int n1 = gen.rand();
int n2 = gen.rand();
int n3 = gen.rand();
int n4 = gen.rand();
h_state(i) = (((static_cast<uint64_t>(n1)) & 0xffff)<<00) |
(((static_cast<uint64_t>(n2)) & 0xffff)<<16) |
(((static_cast<uint64_t>(n3)) & 0xffff)<<32) |
(((static_cast<uint64_t>(n4)) & 0xffff)<<48);
h_lock(i) = 0;
}
deep_copy(state_,h_state);
deep_copy(locks_,h_lock);
}
KOKKOS_INLINE_FUNCTION
Random_XorShift64<DeviceType> get_state() const {
const int i = DeviceType::hardware_thread_id();;
return Random_XorShift64<DeviceType>(state_(i),i);
}
KOKKOS_INLINE_FUNCTION
void free_state(const Random_XorShift64<DeviceType>& state) const {
state_(state.state_idx_) = state.state_;
}
};
template<class DeviceType>
class Random_XorShift1024_Pool;
template<class DeviceType>
class Random_XorShift1024 {
private:
int p_;
const int state_idx_;
uint64_t state_[16];
friend class Random_XorShift1024_Pool<DeviceType>;
public:
typedef DeviceType device_type;
enum {MAX_URAND = 0xffffffffU};
enum {MAX_URAND64 = 0xffffffffffffffffULL-1};
enum {MAX_RAND = static_cast<int>(0xffffffffU/2)};
enum {MAX_RAND64 = static_cast<int64_t>(0xffffffffffffffffULL/2-1)};
KOKKOS_INLINE_FUNCTION
Random_XorShift1024 (uint64_t* state, int p, int state_idx = 0):
p_(p),state_idx_(state_idx){
for(int i=0 ; i<16; i++)
state_[i] = state[i];
}
KOKKOS_INLINE_FUNCTION
uint32_t urand() {
uint64_t state_0 = state_[ p_ ];
uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ];
state_1 ^= state_1 << 31;
state_1 ^= state_1 >> 11;
state_0 ^= state_0 >> 30;
uint64_t tmp = ( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981ULL;
tmp = tmp>>16;
return static_cast<uint32_t>(tmp&MAX_URAND);
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64() {
uint64_t state_0 = state_[ p_ ];
uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ];
state_1 ^= state_1 << 31;
state_1 ^= state_1 >> 11;
state_0 ^= state_0 >> 30;
return (( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981LL) - 1;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& range) {
const uint32_t max_val = (MAX_URAND/range)*range;
uint32_t tmp = urand();
while(tmp>=max_val)
tmp = urand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& start, const uint32_t& end ) {
return urand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& range) {
const uint64_t max_val = (MAX_URAND64/range)*range;
uint64_t tmp = urand64();
while(tmp>=max_val)
tmp = urand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& start, const uint64_t& end ) {
return urand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int rand() {
return static_cast<int>(urand()/2);
}
KOKKOS_INLINE_FUNCTION
int rand(const int& range) {
const int max_val = (MAX_RAND/range)*range;
int tmp = rand();
while(tmp>=max_val)
tmp = rand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int rand(const int& start, const int& end ) {
return rand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64() {
return static_cast<int64_t>(urand64()/2);
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& range) {
const int64_t max_val = (MAX_RAND64/range)*range;
int64_t tmp = rand64();
while(tmp>=max_val)
tmp = rand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& start, const int64_t& end ) {
return rand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
float frand() {
return 1.0f * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& start, const float& end ) {
return frand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
double drand() {
return 1.0 * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& start, const double& end ) {
return frand(end-start)+start;
}
//Marsaglia polar method for drawing a standard normal distributed random number
KOKKOS_INLINE_FUNCTION
double normal() {
double S = 2.0;
double U;
while(S>=1.0) {
U = drand();
const double V = drand();
S = U*U+V*V;
}
return U*sqrt(-2.0*log(S)/S);
}
KOKKOS_INLINE_FUNCTION
double normal(const double& mean, const double& std_dev=1.0) {
return mean + normal()*std_dev;
}
};
template<class DeviceType = Kokkos::DefaultExecutionSpace>
class Random_XorShift1024_Pool {
private:
typedef View<int*,DeviceType> int_view_type;
typedef View<uint64_t*[16],DeviceType> state_data_type;
int_view_type locks_;
state_data_type state_;
int_view_type p_;
int num_states_;
public:
typedef Random_XorShift1024<DeviceType> generator_type;
typedef DeviceType device_type;
Random_XorShift1024_Pool() {
num_states_ = 0;
}
inline
Random_XorShift1024_Pool(uint64_t seed){
num_states_ = 0;
init(seed,DeviceType::max_hardware_threads());
}
Random_XorShift1024_Pool(const Random_XorShift1024_Pool& src):
locks_(src.locks_),
state_(src.state_),
p_(src.p_),
num_states_(src.num_states_)
{}
Random_XorShift1024_Pool operator = (const Random_XorShift1024_Pool& src) {
locks_ = src.locks_;
state_ = src.state_;
p_ = src.p_;
num_states_ = src.num_states_;
return *this;
}
inline
void init(uint64_t seed, int num_states) {
num_states_ = num_states;
locks_ = int_view_type("Kokkos::Random_XorShift1024::locks",num_states_);
state_ = state_data_type("Kokkos::Random_XorShift1024::state",num_states_);
p_ = int_view_type("Kokkos::Random_XorShift1024::p",num_states_);
typename state_data_type::HostMirror h_state = create_mirror_view(state_);
typename int_view_type::HostMirror h_lock = create_mirror_view(locks_);
typename int_view_type::HostMirror h_p = create_mirror_view(p_);
// Execute on the HostMirror's default execution space.
Random_XorShift64<typename state_data_type::HostMirror::execution_space> gen(seed,0);
for(int i = 0; i < 17; i++)
gen.rand();
for(int i = 0; i < num_states_; i++) {
for(int j = 0; j < 16 ; j++) {
int n1 = gen.rand();
int n2 = gen.rand();
int n3 = gen.rand();
int n4 = gen.rand();
h_state(i,j) = (((static_cast<uint64_t>(n1)) & 0xffff)<<00) |
(((static_cast<uint64_t>(n2)) & 0xffff)<<16) |
(((static_cast<uint64_t>(n3)) & 0xffff)<<32) |
(((static_cast<uint64_t>(n4)) & 0xffff)<<48);
}
h_p(i) = 0;
h_lock(i) = 0;
}
deep_copy(state_,h_state);
deep_copy(locks_,h_lock);
}
KOKKOS_INLINE_FUNCTION
Random_XorShift1024<DeviceType> get_state() const {
const int i = DeviceType::hardware_thread_id();
return Random_XorShift1024<DeviceType>(&state_(i,0),p_(i),i);
};
KOKKOS_INLINE_FUNCTION
void free_state(const Random_XorShift1024<DeviceType>& state) const {
for(int i = 0; i<16; i++)
state_(state.state_idx_,i) = state.state_[i];
p_(state.state_idx_) = state.p_;
}
};
#if defined(KOKKOS_HAVE_CUDA) && defined(__CUDACC__)
template<>
class Random_XorShift1024<Kokkos::Cuda> {
private:
int p_;
const int state_idx_;
uint64_t* state_;
friend class Random_XorShift1024_Pool<Kokkos::Cuda>;
public:
typedef Kokkos::Cuda device_type;
enum {MAX_URAND = 0xffffffffU};
enum {MAX_URAND64 = 0xffffffffffffffffULL-1};
enum {MAX_RAND = static_cast<int>(0xffffffffU/2)};
enum {MAX_RAND64 = static_cast<int64_t>(0xffffffffffffffffULL/2-1)};
KOKKOS_INLINE_FUNCTION
Random_XorShift1024 (uint64_t* state, int p, int state_idx = 0):
p_(p),state_idx_(state_idx),state_(state){
}
KOKKOS_INLINE_FUNCTION
uint32_t urand() {
uint64_t state_0 = state_[ p_ ];
uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ];
state_1 ^= state_1 << 31;
state_1 ^= state_1 >> 11;
state_0 ^= state_0 >> 30;
uint64_t tmp = ( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981ULL;
tmp = tmp>>16;
return static_cast<uint32_t>(tmp&MAX_URAND);
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64() {
uint64_t state_0 = state_[ p_ ];
uint64_t state_1 = state_[ p_ = ( p_ + 1 ) & 15 ];
state_1 ^= state_1 << 31;
state_1 ^= state_1 >> 11;
state_0 ^= state_0 >> 30;
return (( state_[ p_ ] = state_0 ^ state_1 ) * 1181783497276652981LL) - 1;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& range) {
const uint32_t max_val = (MAX_URAND/range)*range;
uint32_t tmp = urand();
while(tmp>=max_val)
urand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint32_t urand(const uint32_t& start, const uint32_t& end ) {
return urand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& range) {
const uint64_t max_val = (MAX_URAND64/range)*range;
uint64_t tmp = urand64();
while(tmp>=max_val)
urand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
uint64_t urand64(const uint64_t& start, const uint64_t& end ) {
return urand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int rand() {
return static_cast<int>(urand()/2);
}
KOKKOS_INLINE_FUNCTION
int rand(const int& range) {
const int max_val = (MAX_RAND/range)*range;
int tmp = rand();
while(tmp>=max_val)
rand();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int rand(const int& start, const int& end ) {
return rand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64() {
return static_cast<int64_t>(urand64()/2);
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& range) {
const int64_t max_val = (MAX_RAND64/range)*range;
int64_t tmp = rand64();
while(tmp>=max_val)
rand64();
return tmp%range;
}
KOKKOS_INLINE_FUNCTION
int64_t rand64(const int64_t& start, const int64_t& end ) {
return rand64(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
float frand() {
return 1.0f * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
float frand(const float& start, const float& end ) {
return frand(end-start)+start;
}
KOKKOS_INLINE_FUNCTION
double drand() {
return 1.0 * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& range) {
return range * urand64()/MAX_URAND64;
}
KOKKOS_INLINE_FUNCTION
double drand(const double& start, const double& end ) {
return frand(end-start)+start;
}
//Marsaglia polar method for drawing a standard normal distributed random number
KOKKOS_INLINE_FUNCTION
double normal() {
double S = 2.0;
double U;
while(S>=1.0) {
U = drand();
const double V = drand();
S = U*U+V*V;
}
return U*sqrt(-2.0*log(S)/S);
}
KOKKOS_INLINE_FUNCTION
double normal(const double& mean, const double& std_dev=1.0) {
return mean + normal()*std_dev;
}
};
template<>
inline
Random_XorShift64_Pool<Kokkos::Cuda>::Random_XorShift64_Pool(uint64_t seed) {
num_states_ = 0;
init(seed,4*32768);
}
template<>
KOKKOS_INLINE_FUNCTION
Random_XorShift64<Kokkos::Cuda> Random_XorShift64_Pool<Kokkos::Cuda>::get_state() const {
#ifdef __CUDA_ARCH__
const int i_offset = (threadIdx.x*blockDim.y + threadIdx.y)*blockDim.z+threadIdx.z;
int i = ((blockIdx.x*gridDim.y+blockIdx.y)*gridDim.z + blockIdx.z) *
blockDim.x*blockDim.y*blockDim.z + i_offset;
while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) {
i+=blockDim.x*blockDim.y*blockDim.z;
if(i>=num_states_) {i = i_offset;}
}
return Random_XorShift64<Kokkos::Cuda>(state_(i),i);
#else
return Random_XorShift64<Kokkos::Cuda>(state_(0),0);
#endif
}
template<>
KOKKOS_INLINE_FUNCTION
void Random_XorShift64_Pool<Kokkos::Cuda>::free_state(const Random_XorShift64<Kokkos::Cuda> &state) const {
#ifdef __CUDA_ARCH__
state_(state.state_idx_) = state.state_;
locks_(state.state_idx_) = 0;
return;
#endif
}
template<>
inline
Random_XorShift1024_Pool<Kokkos::Cuda>::Random_XorShift1024_Pool(uint64_t seed) {
num_states_ = 0;
init(seed,4*32768);
}
template<>
KOKKOS_INLINE_FUNCTION
Random_XorShift1024<Kokkos::Cuda> Random_XorShift1024_Pool<Kokkos::Cuda>::get_state() const {
#ifdef __CUDA_ARCH__
const int i_offset = (threadIdx.x*blockDim.y + threadIdx.y)*blockDim.z+threadIdx.z;
int i = ((blockIdx.x*gridDim.y+blockIdx.y)*gridDim.z + blockIdx.z) *
blockDim.x*blockDim.y*blockDim.z + i_offset;
while(Kokkos::atomic_compare_exchange(&locks_(i),0,1)) {
i+=blockDim.x*blockDim.y*blockDim.z;
if(i>=num_states_) {i = i_offset;}
}
return Random_XorShift1024<Kokkos::Cuda>(&state_(i,0), p_(i), i);
#else
return Random_XorShift1024<Kokkos::Cuda>(&state_(0,0), p_(0), 0);
#endif
}
template<>
KOKKOS_INLINE_FUNCTION
void Random_XorShift1024_Pool<Kokkos::Cuda>::free_state(const Random_XorShift1024<Kokkos::Cuda> &state) const {
#ifdef __CUDA_ARCH__
for(int i=0; i<16; i++)
state_(state.state_idx_,i) = state.state_[i];
locks_(state.state_idx_) = 0;
return;
#endif
}
#endif
template<class ViewType, class RandomPool, int loops, int rank>
struct fill_random_functor_range;
template<class ViewType, class RandomPool, int loops, int rank>
struct fill_random_functor_begin_end;
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,1>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0())
a(idx) = Rand::draw(gen,range);
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,2>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
a(idx,k) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,3>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
a(idx,k,l) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,4>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
a(idx,k,l,m) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,5>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
a(idx,k,l,m,n) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,6>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
a(idx,k,l,m,n,o) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,7>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
for(unsigned int p=0;p<a.dimension_6();p++)
a(idx,k,l,m,n,o,p) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_range<ViewType,RandomPool,loops,8>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type range;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_range(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type range_):
a(a_),rand_pool(rand_pool_),range(range_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
for(unsigned int p=0;p<a.dimension_6();p++)
for(unsigned int q=0;q<a.dimension_7();q++)
a(idx,k,l,m,n,o,p,q) = Rand::draw(gen,range);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,1>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0())
a(idx) = Rand::draw(gen,begin,end);
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,2>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
a(idx,k) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,3>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
a(idx,k,l) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,4>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
a(idx,k,l,m) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,5>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()){
for(unsigned int l=0;l<a.dimension_1();l++)
for(unsigned int m=0;m<a.dimension_2();m++)
for(unsigned int n=0;n<a.dimension_3();n++)
for(unsigned int o=0;o<a.dimension_4();o++)
a(idx,l,m,n,o) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,6>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
a(idx,k,l,m,n,o) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,7>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
for(unsigned int p=0;p<a.dimension_6();p++)
a(idx,k,l,m,n,o,p) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool, int loops>
struct fill_random_functor_begin_end<ViewType,RandomPool,loops,8>{
typedef typename ViewType::execution_space execution_space;
ViewType a;
RandomPool rand_pool;
typename ViewType::const_value_type begin,end;
typedef rand<typename RandomPool::generator_type, typename ViewType::non_const_value_type> Rand;
fill_random_functor_begin_end(ViewType a_, RandomPool rand_pool_,
typename ViewType::const_value_type begin_, typename ViewType::const_value_type end_):
a(a_),rand_pool(rand_pool_),begin(begin_),end(end_) {}
KOKKOS_INLINE_FUNCTION
void operator() (unsigned int i) const {
typename RandomPool::generator_type gen = rand_pool.get_state();
for(unsigned int j=0;j<loops;j++) {
const uint64_t idx = i*loops+j;
if(idx<a.dimension_0()) {
for(unsigned int k=0;k<a.dimension_1();k++)
for(unsigned int l=0;l<a.dimension_2();l++)
for(unsigned int m=0;m<a.dimension_3();m++)
for(unsigned int n=0;n<a.dimension_4();n++)
for(unsigned int o=0;o<a.dimension_5();o++)
for(unsigned int p=0;p<a.dimension_6();p++)
for(unsigned int q=0;q<a.dimension_7();q++)
a(idx,k,l,m,n,o,p,q) = Rand::draw(gen,begin,end);
}
}
rand_pool.free_state(gen);
}
};
template<class ViewType, class RandomPool>
void fill_random(ViewType a, RandomPool g, typename ViewType::const_value_type range) {
int64_t LDA = a.dimension_0();
if(LDA>0)
parallel_for((LDA+127)/128,fill_random_functor_range<ViewType,RandomPool,128,ViewType::Rank>(a,g,range));
}
template<class ViewType, class RandomPool>
void fill_random(ViewType a, RandomPool g, typename ViewType::const_value_type begin,typename ViewType::const_value_type end ) {
int64_t LDA = a.dimension_0();
if(LDA>0)
parallel_for((LDA+127)/128,fill_random_functor_begin_end<ViewType,RandomPool,128,ViewType::Rank>(a,g,begin,end));
}
}
#endif
diff --git a/lib/kokkos/algorithms/src/Kokkos_Sort.hpp b/lib/kokkos/algorithms/src/Kokkos_Sort.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/Makefile b/lib/kokkos/algorithms/unit_tests/Makefile
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestCuda.cpp b/lib/kokkos/algorithms/unit_tests/TestCuda.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp b/lib/kokkos/algorithms/unit_tests/TestOpenMP.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestRandom.hpp b/lib/kokkos/algorithms/unit_tests/TestRandom.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestSerial.cpp b/lib/kokkos/algorithms/unit_tests/TestSerial.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestSort.hpp b/lib/kokkos/algorithms/unit_tests/TestSort.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/TestThreads.cpp b/lib/kokkos/algorithms/unit_tests/TestThreads.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp b/lib/kokkos/algorithms/unit_tests/UnitTestMain.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/config/configure_compton_cpu.sh b/lib/kokkos/config/configure_compton_cpu.sh
new file mode 100644
index 000000000..17287fb84
--- /dev/null
+++ b/lib/kokkos/config/configure_compton_cpu.sh
@@ -0,0 +1,190 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="${HOME}/Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=/home/projects/kokkos/host/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+#-----------------------------------------------------------------------------
+# Build for CUDA architecture:
+
+CUDA_ARCH=""
+# CUDA_ARCH="20"
+# CUDA_ARCH="30"
+# CUDA_ARCH="35"
+
+# Build with Intel compiler
+
+INTEL=ON
+
+# Build for MIC architecture:
+
+# INTEL_XEON_PHI=ON
+
+# Build with HWLOC at location:
+
+HWLOC_BASE_DIR="/home/projects/libraries/host/hwloc/1.6.2"
+
+# Location for MPI to use in examples:
+
+MPI_BASE_DIR=""
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Pthread configuation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP configuation:
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Hardware locality cmake configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-gencode;arch=compute_${CUDA_ARCH},code=sm_${CUDA_ARCH}"
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${INTEL}" = "ON" -o "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+#-----------------------------------------------------------------------------
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_compton_mic.sh b/lib/kokkos/config/configure_compton_mic.sh
new file mode 100644
index 000000000..7f9aee13f
--- /dev/null
+++ b/lib/kokkos/config/configure_compton_mic.sh
@@ -0,0 +1,186 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="${HOME}/Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=/home/projects/kokkos/mic/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+#-----------------------------------------------------------------------------
+# Build for CUDA architecture:
+
+CUDA_ARCH=""
+# CUDA_ARCH="20"
+# CUDA_ARCH="30"
+# CUDA_ARCH="35"
+
+# Build for MIC architecture:
+
+INTEL_XEON_PHI=ON
+
+# Build with HWLOC at location:
+
+HWLOC_BASE_DIR="/home/projects/libraries/mic/hwloc/1.6.2"
+
+# Location for MPI to use in examples:
+
+MPI_BASE_DIR=""
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Pthread configuation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP configuation:
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Hardware locality cmake configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-gencode;arch=compute_${CUDA_ARCH},code=sm_${CUDA_ARCH}"
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${INTEL}" = "ON" -o "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+#-----------------------------------------------------------------------------
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_kokkos.sh b/lib/kokkos/config/configure_kokkos.sh
new file mode 100644
index 000000000..592e7f593
--- /dev/null
+++ b/lib/kokkos/config/configure_kokkos.sh
@@ -0,0 +1,293 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+#-----------------------------------------------------------------------------
+
+USE_CUDA_ARCH=
+USE_THREAD=
+USE_OPENMP=
+USE_INTEL=
+USE_XEON_PHI=
+HWLOC_BASE_DIR=
+MPI_BASE_DIR=
+BLAS_LIB_DIR=
+LAPACK_LIB_DIR=
+
+if [ 1 ] ; then
+ # Platform 'kokkos-dev' with Cuda, OpenMP, hwloc, mpi, gnu
+ USE_CUDA_ARCH="35"
+ USE_OPENMP=ON
+ HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.4.7"
+ MPI_BASE_DIR="/home/projects/mvapich/2.0.0b/gnu/4.4.7"
+ BLAS_LIB_DIR="/home/projects/blas/host/gnu/lib"
+ LAPACK_LIB_DIR="/home/projects/lapack/host/gnu/lib"
+
+elif [ ] ; then
+ # Platform 'kokkos-dev' with Cuda, Threads, hwloc, mpi, gnu
+ USE_CUDA_ARCH="35"
+ USE_THREAD=ON
+ HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.4.7"
+ MPI_BASE_DIR="/home/projects/mvapich/2.0.0b/gnu/4.4.7"
+ BLAS_LIB_DIR="/home/projects/blas/host/gnu/lib"
+ LAPACK_LIB_DIR="/home/projects/lapack/host/gnu/lib"
+
+elif [ ] ; then
+ # Platform 'kokkos-dev' with Xeon Phi and hwloc
+ USE_OPENMP=ON
+ USE_INTEL=ON
+ USE_XEON_PHI=ON
+ HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/mic/intel/13.SP1.1.106"
+
+elif [ ] ; then
+ # Platform 'kokkos-nvidia' with Cuda, OpenMP, hwloc, mpi, gnu
+ USE_CUDA_ARCH="20"
+ USE_OPENMP=ON
+ HWLOC_BASE_DIR="/home/sems/common/hwloc/current"
+ MPI_BASE_DIR="/home/sems/common/openmpi/current"
+
+elif [ ] ; then
+ # Platform 'kokkos-nvidia' with Cuda, Threads, hwloc, mpi, gnu
+ USE_CUDA_ARCH="20"
+ USE_THREAD=ON
+ HWLOC_BASE_DIR="/home/sems/common/hwloc/current"
+ MPI_BASE_DIR="/home/sems/common/openmpi/current"
+
+fi
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure command line options:
+
+CMAKE_CONFIGURE=""
+CMAKE_CXX_FLAGS=""
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+
+if [ 1 ] ; then
+
+ # Configure for Tpetra/Kokkos:
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${BLAS_LIB_DIR}"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_DIRS:FILEPATH=${LAPACK_LIB_DIR}"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Tpetra:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Kokkos:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraClassic:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TeuchosKokkosCompat:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TeuchosKokkosComm:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Tpetra_ENABLE_Kokkos_Refactor:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D KokkosClassic_DefaultNode:STRING=Kokkos::Compat::KokkosOpenMPWrapperNode"
+
+ CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}-DKOKKOS_FAST_COMPILE"
+
+ if [ -n "${USE_CUDA_ARCH}" ] ; then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Cuda:BOOL=ON"
+
+ fi
+
+fi
+
+if [ 1 ] ; then
+
+ # Configure for Stokhos:
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Sacado:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Stokhos:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Stokhos_ENABLE_Belos:BOOL=ON"
+
+fi
+
+if [ 1 ] ; then
+
+ # Configure for TrilinosCouplings:
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TrilinosCouplings:BOOL=ON"
+
+fi
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON"
+
+if [ "${CMAKE_BUILD_TYPE}" == "DEBUG" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+fi
+
+#-----------------------------------------------------------------------------
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Kokkos use pthread configuation:
+
+if [ "${USE_THREAD}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=ON"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Kokkos use OpenMP configuation:
+
+if [ "${USE_OPENMP}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Hardware locality configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${USE_CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-DKOKKOS_HAVE_CUDA_ARCH=${USE_CUDA_ARCH}0;-gencode;arch=compute_${USE_CUDA_ARCH},code=sm_${USE_CUDA_ARCH}"
+
+ if [ "${USE_OPENMP}" = "ON" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi,-fopenmp"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+ fi
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${USE_INTEL}" = "ON" -o "${USE_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${USE_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -mmic"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+
+if [ -n "${CMAKE_CXX_FLAGS}" ] ; then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING='${CMAKE_CXX_FLAGS}'"
+
+fi
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo "cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_kokkos_bgq.sh b/lib/kokkos/config/configure_kokkos_bgq.sh
new file mode 100755
index 000000000..73236937e
--- /dev/null
+++ b/lib/kokkos/config/configure_kokkos_bgq.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+# to build:
+# build on bgq-b[1-12]
+# module load sierra-devel
+# run this configure file
+# make
+
+# to run:
+# ssh bgq-login
+# cd /scratch/username/...
+# export OMP_PROC_BIND and XLSMPOPTS environment variables
+# run with srun
+
+# Note: hwloc does not work to get or set cpubindings on bgq.
+# Use the openmp backend and the openmp environment variables.
+#
+# Only the mpi wrappers seem to be setup for cross-compile,
+# so it is important that this configure enables MPI and uses mpigcc wrappers.
+
+
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="../Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=../TrilinosInstall/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=mpigcc-4.7.2"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=mpig++-4.7.2"
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_kokkos_dev.sh b/lib/kokkos/config/configure_kokkos_dev.sh
new file mode 100755
index 000000000..ac61dec60
--- /dev/null
+++ b/lib/kokkos/config/configure_kokkos_dev.sh
@@ -0,0 +1,216 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="${HOME}/Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${HOME}/TrilinosInstall/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+#CMAKE_BUILD_TYPE=DEBUG
+#CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Build for CUDA architecture:
+
+#CUDA_ARCH=""
+#CUDA_ARCH="20"
+#CUDA_ARCH="30"
+CUDA_ARCH="35"
+
+# Build with OpenMP
+
+OPENMP=ON
+PTHREADS=ON
+
+# Build host code with Intel compiler:
+
+INTEL=OFF
+
+# Build for MIC architecture:
+
+INTEL_XEON_PHI=OFF
+
+# Build with HWLOC at location:
+
+#HWLOC_BASE_DIR=""
+#HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.4.7"
+HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.7.3"
+
+# Location for MPI to use in examples:
+
+#MPI_BASE_DIR=""
+#MPI_BASE_DIR="/home/projects/mvapich/2.0.0b/gnu/4.4.7"
+MPI_BASE_DIR="/home/projects/mvapich/2.0.0b/gnu/4.7.3"
+#MPI_BASE_DIR="/home/projects/openmpi/1.7.3/llvm/2013-12-02/"
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Pthread configuation:
+
+if [ "${PTHREADS}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# OpenMP configuation:
+
+if [ "${OPENMP}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Hardware locality cmake configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-gencode;arch=compute_${CUDA_ARCH},code=sm_${CUDA_ARCH}"
+
+ if [ "${OPENMP}" = "ON" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi,-fopenmp"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+ fi
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${INTEL}" = "ON" -o "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+#-----------------------------------------------------------------------------
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_kokkos_nvidia.sh b/lib/kokkos/config/configure_kokkos_nvidia.sh
new file mode 100644
index 000000000..f78b7dce7
--- /dev/null
+++ b/lib/kokkos/config/configure_kokkos_nvidia.sh
@@ -0,0 +1,204 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="${HOME}/Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=/home/sems/common/kokkos/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+#-----------------------------------------------------------------------------
+# Build for CUDA architecture:
+
+# CUDA_ARCH=""
+CUDA_ARCH="20"
+# CUDA_ARCH="30"
+# CUDA_ARCH="35"
+
+# Build with OpenMP
+
+OPENMP=ON
+
+# Build host code with Intel compiler:
+
+# INTEL=ON
+
+# Build for MIC architecture:
+
+# INTEL_XEON_PHI=ON
+
+# Build with HWLOC at location:
+
+HWLOC_BASE_DIR="/home/sems/common/hwloc/current"
+
+# Location for MPI to use in examples:
+
+MPI_BASE_DIR="/home/sems/common/openmpi/current"
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Pthread configuation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP configuation:
+
+if [ "${OPENMP}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Hardware locality cmake configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-gencode;arch=compute_${CUDA_ARCH},code=sm_${CUDA_ARCH}"
+
+ if [ "${OPENMP}" = "ON" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi,-fopenmp"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+ fi
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${INTEL}" = "ON" -o "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+#-----------------------------------------------------------------------------
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_shannon.sh b/lib/kokkos/config/configure_shannon.sh
new file mode 100644
index 000000000..8bd175b03
--- /dev/null
+++ b/lib/kokkos/config/configure_shannon.sh
@@ -0,0 +1,190 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+# Additional command-line arguments given to this script will be
+# passed directly to CMake.
+#
+
+#
+# Force CMake to re-evaluate build options.
+#
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#-----------------------------------------------------------------------------
+# Incrementally construct cmake configure options:
+
+CMAKE_CONFIGURE=""
+
+#-----------------------------------------------------------------------------
+# Location of Trilinos source tree:
+
+CMAKE_PROJECT_DIR="${HOME}/Trilinos"
+
+# Location for installation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=/home/projects/kokkos/`date +%F`"
+
+#-----------------------------------------------------------------------------
+# General build options.
+# Use a variable so options can be propagated to CUDA compiler.
+
+CMAKE_VERBOSE_MAKEFILE=OFF
+CMAKE_BUILD_TYPE=RELEASE
+# CMAKE_BUILD_TYPE=DEBUG
+
+#-----------------------------------------------------------------------------
+# Build for CUDA architecture:
+
+# CUDA_ARCH=""
+# CUDA_ARCH="20"
+# CUDA_ARCH="30"
+CUDA_ARCH="35"
+
+# Build host code with Intel compiler:
+
+INTEL=ON
+
+# Build for MIC architecture:
+
+# INTEL_XEON_PHI=ON
+
+# Build with HWLOC at location:
+
+HWLOC_BASE_DIR="/home/projects/hwloc/1.6.2"
+
+# Location for MPI to use in examples:
+
+MPI_BASE_DIR=""
+
+#-----------------------------------------------------------------------------
+# MPI configuation only used for examples:
+#
+# Must have the MPI_BASE_DIR so that the
+# include path can be passed to the Cuda compiler
+
+if [ -n "${MPI_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D MPI_BASE_DIR:PATH=${MPI_BASE_DIR}"
+else
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_MPI:BOOL=OFF"
+fi
+
+#-----------------------------------------------------------------------------
+# Pthread configuation:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP configuation:
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Configure packages for kokkos-only:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#-----------------------------------------------------------------------------
+# Hardware locality cmake configuration:
+
+if [ -n "${HWLOC_BASE_DIR}" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+fi
+
+#-----------------------------------------------------------------------------
+# Cuda cmake configuration:
+
+if [ -n "${CUDA_ARCH}" ] ;
+then
+
+ # Options to CUDA_NVCC_FLAGS must be semi-colon delimited,
+ # this is different than the standard CMAKE_CXX_FLAGS syntax.
+
+ CUDA_NVCC_FLAGS="-gencode;arch=compute_${CUDA_ARCH},code=sm_${CUDA_ARCH}"
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi"
+
+ if [ "${CMAKE_BUILD_TYPE}" = "DEBUG" ] ;
+ then
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-g"
+ else
+ CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3"
+ fi
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_VERBOSE_BUILD:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS}"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+if [ "${INTEL}" = "ON" -o "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+fi
+
+#-----------------------------------------------------------------------------
+
+# Cross-compile for Intel Xeon Phi:
+
+if [ "${INTEL_XEON_PHI}" = "ON" ] ;
+then
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_SYSTEM_NAME=Linux"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_FLAGS:STRING=-mmic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_Fortran_COMPILER:FILEPATH=ifort"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_DIRS:FILEPATH=${MKLROOT}/lib/mic"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BLAS_LIBRARY_NAMES='mkl_intel_lp64;mkl_sequential;mkl_core;pthread;m'"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D BUILD_SHARED_LIBS:BOOL=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D DART_TESTING_TIMEOUT:STRING=600"
+
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_LIBRARY_NAMES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_LAPACK_LIBRARIES=''"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_BinUtils=OFF"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_Pthread_LIBRARIES=pthread"
+
+ # Cannot cross-compile fortran compatibility checks on the MIC:
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+
+ # Tell cmake the answers to compile-and-execute tests
+ # to prevent cmake from executing a cross-compiled program.
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_GCC_ABI_DEMANGLE_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HAVE_TEUCHOS_BLASFLOAT_EXITCODE=0"
+ CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D LAPACK_SLAPY2_WORKS_EXITCODE=0"
+
+fi
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
+
+#-----------------------------------------------------------------------------
+
+echo "cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}"
+
+cmake ${CMAKE_CONFIGURE} ${CMAKE_PROJECT_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/configure_tpetra_kokkos_cuda_nvcc_wrapper.sh b/lib/kokkos/config/configure_tpetra_kokkos_cuda_nvcc_wrapper.sh
new file mode 100755
index 000000000..0baa83aef
--- /dev/null
+++ b/lib/kokkos/config/configure_tpetra_kokkos_cuda_nvcc_wrapper.sh
@@ -0,0 +1,140 @@
+#!/bin/bash
+#
+# This script uses CUDA, OpenMP, and MPI.
+#
+# Before invoking this script, set the OMPI_CXX environment variable
+# to point to nvcc_wrapper, wherever it happens to live. (If you use
+# an MPI implementation other than OpenMPI, set the corresponding
+# environment variable instead.)
+#
+
+rm -f CMakeCache.txt;
+rm -rf CMakeFiles
+EXTRA_ARGS=$@
+MPI_PATH="/opt/mpi/openmpi/1.8.2/nvcc-gcc/4.8.3-6.5"
+CUDA_PATH="/opt/nvidia/cuda/6.5.14"
+
+#
+# As long as there are any .cu files in Trilinos, we'll need to set
+# CUDA_NVCC_FLAGS. If Trilinos gets rid of all of its .cu files and
+# lets nvcc_wrapper handle them as .cpp files, then we won't need to
+# set CUDA_NVCC_FLAGS. As it is, given that we need to set
+# CUDA_NVCC_FLAGS, we must make sure that they are the same flags as
+# nvcc_wrapper passes to nvcc.
+#
+CUDA_NVCC_FLAGS="-gencode;arch=compute_35,code=sm_35;-I${MPI_PATH}/include"
+CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-Xcompiler;-Wall,-ansi,-fopenmp"
+CUDA_NVCC_FLAGS="${CUDA_NVCC_FLAGS};-O3;-DKOKKOS_USE_CUDA_UVM"
+
+cmake \
+ -D CMAKE_INSTALL_PREFIX:PATH="$PWD/../install/" \
+ -D CMAKE_BUILD_TYPE:STRING=DEBUG \
+ -D CMAKE_CXX_FLAGS:STRING="-g -Wall" \
+ -D CMAKE_C_FLAGS:STRING="-g -Wall" \
+ -D CMAKE_FORTRAN_FLAGS:STRING="" \
+ -D CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="" \
+ -D Trilinos_ENABLE_Triutils=OFF \
+ -D Trilinos_ENABLE_INSTALL_CMAKE_CONFIG_FILES:BOOL=OFF \
+ -D Trilinos_ENABLE_DEBUG:BOOL=OFF \
+ -D Trilinos_ENABLE_CHECKED_STL:BOOL=OFF \
+ -D Trilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=OFF \
+ -D Trilinos_WARNINGS_AS_ERRORS_FLAGS:STRING="" \
+ -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
+ -D Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF \
+ -D BUILD_SHARED_LIBS:BOOL=OFF \
+ -D DART_TESTING_TIMEOUT:STRING=600 \
+ -D CMAKE_VERBOSE_MAKEFILE:BOOL=OFF \
+ \
+ \
+ -D CMAKE_CXX_COMPILER:FILEPATH="${MPI_PATH}/bin/mpicxx" \
+ -D CMAKE_C_COMPILER:FILEPATH="${MPI_PATH}/bin/mpicc" \
+ -D MPI_CXX_COMPILER:FILEPATH="${MPI_PATH}/bin/mpicxx" \
+ -D MPI_C_COMPILER:FILEPATH="${MPI_PATH}/bin/mpicc" \
+ -D CMAKE_Fortran_COMPILER:FILEPATH="${MPI_PATH}/bin/mpif77" \
+ -D MPI_EXEC:FILEPATH="${MPI_PATH}/bin/mpirun" \
+ -D MPI_EXEC_POST_NUMPROCS_FLAGS:STRING="-bind-to;socket;--map-by;socket;env;CUDA_MANAGED_FORCE_DEVICE_ALLOC=1;CUDA_LAUNCH_BLOCKING=1;OMP_NUM_THREADS=2" \
+ \
+ \
+ -D Trilinos_ENABLE_CXX11:BOOL=OFF \
+ -D TPL_ENABLE_MPI:BOOL=ON \
+ -D Trilinos_ENABLE_OpenMP:BOOL=ON \
+ -D Trilinos_ENABLE_ThreadPool:BOOL=ON \
+ \
+ \
+ -D TPL_ENABLE_CUDA:BOOL=ON \
+ -D CUDA_TOOLKIT_ROOT_DIR:FILEPATH="${CUDA_PATH}" \
+ -D CUDA_PROPAGATE_HOST_FLAGS:BOOL=OFF \
+ -D TPL_ENABLE_Thrust:BOOL=OFF \
+ -D Thrust_INCLUDE_DIRS:FILEPATH="${CUDA_PATH}/include" \
+ -D TPL_ENABLE_CUSPARSE:BOOL=OFF \
+ -D TPL_ENABLE_Cusp:BOOL=OFF \
+ -D Cusp_INCLUDE_DIRS="/home/crtrott/Software/cusp" \
+ -D CUDA_VERBOSE_BUILD:BOOL=OFF \
+ -D CUDA_NVCC_FLAGS:STRING=${CUDA_NVCC_FLAGS} \
+ \
+ \
+ -D TPL_ENABLE_HWLOC=OFF \
+ -D HWLOC_INCLUDE_DIRS="/usr/local/software/hwloc/current/include" \
+ -D HWLOC_LIBRARY_DIRS="/usr/local/software/hwloc/current/lib" \
+ -D TPL_ENABLE_BinUtils=OFF \
+ -D TPL_ENABLE_BLAS:STRING=ON \
+ -D TPL_ENABLE_LAPACK:STRING=ON \
+ -D TPL_ENABLE_MKL:STRING=OFF \
+ -D TPL_ENABLE_HWLOC:STRING=OFF \
+ -D TPL_ENABLE_GTEST:STRING=ON \
+ -D TPL_ENABLE_SuperLU=ON \
+ -D TPL_ENABLE_BLAS=ON \
+ -D TPL_ENABLE_LAPACK=ON \
+ -D TPL_SuperLU_LIBRARIES="/home/crtrott/Software/SuperLU_4.3/lib/libsuperlu_4.3.a" \
+ -D TPL_SuperLU_INCLUDE_DIRS="/home/crtrott/Software/SuperLU_4.3/SRC" \
+ \
+ \
+ -D Trilinos_Enable_Kokkos:BOOL=ON \
+ -D Trilinos_ENABLE_KokkosCore:BOOL=ON \
+ -D Trilinos_ENABLE_TeuchosKokkosCompat:BOOL=ON \
+ -D Trilinos_ENABLE_KokkosContainers:BOOL=ON \
+ -D Trilinos_ENABLE_TpetraKernels:BOOL=ON \
+ -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON \
+ -D Trilinos_ENABLE_TeuchosKokkosComm:BOOL=ON \
+ -D Trilinos_ENABLE_KokkosExample:BOOL=ON \
+ -D Kokkos_ENABLE_EXAMPLES:BOOL=ON \
+ -D Kokkos_ENABLE_TESTS:BOOL=OFF \
+ -D KokkosClassic_DefaultNode:STRING="Kokkos::Compat::KokkosCudaWrapperNode" \
+ -D TpetraClassic_ENABLE_OpenMPNode=OFF \
+ -D TpetraClassic_ENABLE_TPINode=OFF \
+ -D TpetraClassic_ENABLE_MKL=OFF \
+ -D Kokkos_ENABLE_Cuda_UVM=ON \
+ \
+ \
+ -D Trilinos_ENABLE_Teuchos:BOOL=ON \
+ -D Teuchos_ENABLE_COMPLEX:BOOL=OFF \
+ \
+ \
+ -D Trilinos_ENABLE_Tpetra:BOOL=ON \
+ -D Tpetra_ENABLE_KokkosCore=ON \
+ -D Tpetra_ENABLE_Kokkos_DistObject=OFF \
+ -D Tpetra_ENABLE_Kokkos_Refactor=ON \
+ -D Tpetra_ENABLE_TESTS=ON \
+ -D Tpetra_ENABLE_EXAMPLES=ON \
+ -D Tpetra_ENABLE_MPI_CUDA_RDMA:BOOL=ON \
+ \
+ \
+ -D Trilinos_ENABLE_Belos=OFF \
+ -D Trilinos_ENABLE_Amesos=OFF \
+ -D Trilinos_ENABLE_Amesos2=OFF \
+ -D Trilinos_ENABLE_Ifpack=OFF \
+ -D Trilinos_ENABLE_Ifpack2=OFF \
+ -D Trilinos_ENABLE_Epetra=OFF \
+ -D Trilinos_ENABLE_EpetraExt=OFF \
+ -D Trilinos_ENABLE_Zoltan=OFF \
+ -D Trilinos_ENABLE_Zoltan2=OFF \
+ -D Trilinos_ENABLE_MueLu=OFF \
+ -D Belos_ENABLE_TESTS=ON \
+ -D Belos_ENABLE_EXAMPLES=ON \
+ -D MueLu_ENABLE_TESTS=ON \
+ -D MueLu_ENABLE_EXAMPLES=ON \
+ -D Ifpack2_ENABLE_TESTS=ON \
+ -D Ifpack2_ENABLE_EXAMPLES=ON \
+ $EXTRA_ARGS \
+${HOME}/Trilinos
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-all.sh b/lib/kokkos/config/kokkos_dev/config-core-all.sh
new file mode 100755
index 000000000..fa588c778
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-all.sh
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Cuda, OpenMP, Threads, Qthread, hwloc
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu
+#
+# The 'nvcc-wrapper' module should load a script that matches
+# kokkos/config/nvcc_wrapper
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+
+#-----------------------------------------------------------------------------
+# Cuda using GNU, use the nvcc_wrapper to build CUDA source
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=nvcc_wrapper"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Hardware locality configuration:
+
+HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.7.3"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+
+#-----------------------------------------------------------------------------
+# Pthread
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Qthread
+
+QTHREAD_BASE_DIR="/home/projects/qthreads/2014-07-08/host/gnu/4.7.3"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_QTHREAD:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREAD_INCLUDE_DIRS:FILEPATH=${QTHREAD_BASE_DIR}/include"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D QTHREAD_LIBRARY_DIRS:FILEPATH=${QTHREAD_BASE_DIR}/lib"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh b/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh
new file mode 100755
index 000000000..c2e17bb94
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-cuda-omp-hwloc.sh
@@ -0,0 +1,104 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Cuda, OpenMP, hwloc
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu
+#
+# The 'nvcc-wrapper' module should load a script that matches
+# kokkos/config/nvcc_wrapper
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+
+#-----------------------------------------------------------------------------
+# Cuda using GNU, use the nvcc_wrapper to build CUDA source
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=nvcc_wrapper"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Hardware locality configuration:
+
+HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.7.3"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+
+#-----------------------------------------------------------------------------
+# Pthread explicitly OFF so tribits doesn't automatically turn it on
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-cuda.sh b/lib/kokkos/config/kokkos_dev/config-core-cuda.sh
new file mode 100755
index 000000000..39b72d5ce
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-cuda.sh
@@ -0,0 +1,88 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Cuda
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3 cuda/6.5.14 nvcc-wrapper/gnu
+#
+# The 'nvcc-wrapper' module should load a script that matches
+# kokkos/config/nvcc_wrapper
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+
+#-----------------------------------------------------------------------------
+# Cuda using GNU, use the nvcc_wrapper to build CUDA source
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=nvcc_wrapper"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+
+# Pthread explicitly OFF, otherwise tribits will automatically turn it on
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-cxx11-omp.sh b/lib/kokkos/config/kokkos_dev/config-core-cxx11-omp.sh
new file mode 100755
index 000000000..b83a53541
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-cxx11-omp.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# C++11, OpenMP
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Pthread explicitly OFF so tribits doesn't automatically activate
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-dbg-none.sh b/lib/kokkos/config/kokkos_dev/config-core-dbg-none.sh
new file mode 100755
index 000000000..d2e06a4eb
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-dbg-none.sh
@@ -0,0 +1,78 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# <none>
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Kokkos Pthread explicitly OFF, TPL Pthread ON for gtest
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-intel-cuda-omp.sh b/lib/kokkos/config/kokkos_dev/config-core-intel-cuda-omp.sh
new file mode 100755
index 000000000..e2ab1f1c0
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-intel-cuda-omp.sh
@@ -0,0 +1,89 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Intel, OpenMP, Cuda
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 cuda/7.0.4 intel/2015.0.090 nvcc-wrapper/intel
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=nvcc_wrapper"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUDA:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_CUSPARSE:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Pthread explicitly OFF
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-intel-omp.sh b/lib/kokkos/config/kokkos_dev/config-core-intel-omp.sh
new file mode 100755
index 000000000..fd56d4116
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-intel-omp.sh
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Intel, OpenMP
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 intel/13.SP1.1.106
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=icc"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=icpc"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Pthread explicitly OFF
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-omp.sh b/lib/kokkos/config/kokkos_dev/config-core-omp.sh
new file mode 100755
index 000000000..f91ecd525
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-omp.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# OpenMP
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# OpenMP
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_OpenMP:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_OpenMP:BOOL=ON"
+
+# Pthread explicitly OFF, otherwise tribits will automatically turn it on
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=OFF"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/kokkos_dev/config-core-threads-hwloc.sh b/lib/kokkos/config/kokkos_dev/config-core-threads-hwloc.sh
new file mode 100755
index 000000000..19ab96902
--- /dev/null
+++ b/lib/kokkos/config/kokkos_dev/config-core-threads-hwloc.sh
@@ -0,0 +1,87 @@
+#!/bin/sh
+#
+# Copy this script, put it outside the Trilinos source directory, and
+# build there.
+#
+#-----------------------------------------------------------------------------
+# Building on 'kokkos-dev.sandia.gov' with enabled capabilities:
+#
+# Threads, hwloc
+#
+# module loaded on 'kokkos-dev.sandia.gov' for this build
+#
+# module load cmake/2.8.11.2 gcc/4.8.3
+#
+#-----------------------------------------------------------------------------
+# Source and installation directories:
+
+TRILINOS_SOURCE_DIR=${HOME}/Trilinos
+TRILINOS_INSTALL_DIR=${HOME}/TrilinosInstall/`date +%F`
+
+CMAKE_CONFIGURE=""
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_INSTALL_PREFIX=${TRILINOS_INSTALL_DIR}"
+
+#-----------------------------------------------------------------------------
+# Debug/optimized
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=DEBUG"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_BOUNDS_CHECK:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_BUILD_TYPE:STRING=RELEASE"
+
+#-----------------------------------------------------------------------------
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_FLAGS:STRING=-Wall"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_C_COMPILER=gcc"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D CMAKE_CXX_COMPILER=g++"
+
+#-----------------------------------------------------------------------------
+# Configure for Kokkos subpackages and tests:
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_Fortran:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_EXAMPLES:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TESTS:BOOL=ON"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosCore:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosContainers:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosAlgorithms:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_TpetraKernels:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_KokkosExample:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# Hardware locality configuration:
+
+HWLOC_BASE_DIR="/home/projects/hwloc/1.7.1/host/gnu/4.7.3"
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_HWLOC:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_INCLUDE_DIRS:FILEPATH=${HWLOC_BASE_DIR}/include"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D HWLOC_LIBRARY_DIRS:FILEPATH=${HWLOC_BASE_DIR}/lib"
+
+#-----------------------------------------------------------------------------
+# Pthread
+
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D TPL_ENABLE_Pthread:BOOL=ON"
+CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_Pthread:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+# C++11
+
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Trilinos_ENABLE_CXX11:BOOL=ON"
+# CMAKE_CONFIGURE="${CMAKE_CONFIGURE} -D Kokkos_ENABLE_CXX11:BOOL=ON"
+
+#-----------------------------------------------------------------------------
+#
+# Remove CMake output files to force reconfigure from scratch.
+#
+
+rm -rf CMake* Trilinos* packages Dart* Testing cmake_install.cmake MakeFile*
+
+#
+
+echo cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+cmake ${CMAKE_CONFIGURE} ${TRILINOS_SOURCE_DIR}
+
+#-----------------------------------------------------------------------------
+
diff --git a/lib/kokkos/config/snapshot.py b/lib/kokkos/config/snapshot.py
new file mode 100755
index 000000000..d816cd0c9
--- /dev/null
+++ b/lib/kokkos/config/snapshot.py
@@ -0,0 +1,279 @@
+#! /usr/bin/env python
+
+"""
+Snapshot a project into another project and perform the necessary repo actions
+to provide a commit message that can be used to trace back to the exact point
+in the source repository.
+"""
+
+#todo:
+# Support svn
+# Allow renaming of the source dir in the destination path
+# Check if a new snapshot is necessary?
+#
+
+import sys
+
+#check the version number so that there is a good error message when argparse is not available.
+#This checks for exactly 2.7 which is bad, but it is a python 2 script and argparse was introduced
+#in 2.7 which is also the last version of python 2. If this script is updated for python 3 this
+#will need to change, but for now it is not safe to allow 3.x to run this.
+if sys.version_info[:2] != (2, 7):
+ print "Error snapshot requires python 2.7 detected version is %d.%d." % (sys.version_info[0], sys.version_info[1])
+ sys.exit(1)
+
+import subprocess, argparse, re, doctest, os, datetime, traceback
+
+def parse_cmdline(description):
+ parser = argparse.ArgumentParser(usage="snapshot.py [options] source destination", description=description)
+
+ parser.add_argument("-n", "--no-comit", action="store_false", dest="create_commit", default=True,
+ help="Do not perform a commit or create a commit message.")
+ parser.add_argument("-v", "--verbose", action="store_true", dest="verbose_mode", default=False,
+ help="Enable verbose mode.")
+ parser.add_argument("-d", "--debug", action="store_true", dest="debug_mode", default=False,
+ help="Enable debugging output.")
+ parser.add_argument("--no-validate-repo", action="store_true", dest="no_validate_repo", default=False,
+ help="Reduce the validation that the source and destination repos are clean to a warning.")
+ parser.add_argument("--source-repo", choices=["git","none"], default="",
+ help="Type of repository of the source, use none to skip all repository operations.")
+ parser.add_argument("--dest-repo", choices=["git","none"], default="",
+ help="Type of repository of the destination, use none to skip all repository operations.")
+
+ parser.add_argument("source", help="Source project to snapshot from.")
+ parser.add_argument("destination", help="Destination to snapshot too.")
+
+ options = parser.parse_args()
+ options = validate_options(options)
+ return options
+#end parseCmdline
+
+def validate_options(options):
+ apparent_source_repo_type="none"
+ apparent_dest_repo_type="none"
+
+ #prevent user from accidentally giving us a path that rsync will treat differently than expected.
+ options.source = options.source.rstrip(os.sep)
+ options.destination = options.destination.rstrip(os.sep)
+
+ options.source = os.path.abspath(options.source)
+ options.destination = os.path.abspath(options.destination)
+
+ if os.path.exists(options.source):
+ apparent_source_repo_type, source_root = deterimine_repo_type(options.source)
+ else:
+ raise RuntimeError("Could not find source directory of %s." % options.source)
+ options.source_root = source_root
+
+ if not os.path.exists(options.destination):
+ print "Could not find destination directory of %s so it will be created." % options.destination
+ os.makedirs(options.destination)
+
+ apparent_dest_repo_type, dest_root = deterimine_repo_type(options.destination)
+ options.dest_root = dest_root
+
+ #error on svn repo types for now
+ if apparent_source_repo_type == "svn" or apparent_dest_repo_type == "svn":
+ raise RuntimeError("SVN repositories are not supported at this time.")
+
+ if options.source_repo == "":
+ #source repo type is not specified to just using the apparent type.
+ options.source_repo = apparent_source_repo_type
+ else:
+ if options.source_repo != "none" and options.source_repo != apparent_source_repo_type:
+ raise RuntimeError("Specified source repository type of %s conflicts with determined type of %s" % \
+ (options.source_repo, apparent_source_repo_type))
+
+ if options.dest_repo == "":
+ #destination repo type is not specified to just using the apparent type.
+ options.dest_repo = apparent_dest_repo_type
+ else:
+ if options.dest_repo != "none" and options.dest_repo != apparent_dest_repo_type:
+ raise RuntimeError("Specified destination repository type of %s conflicts with determined type of %s" % \
+ (options.dest_repo, apparent_dest_repo_type))
+
+ return options
+#end validate_options
+
+def run_cmd(cmd, options, working_dir="."):
+ cmd_str = " ".join(cmd)
+ if options.verbose_mode:
+ print "Running command '%s' in dir %s." % (cmd_str, working_dir)
+
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=working_dir)
+ proc_stdout, proc_stderr = proc.communicate()
+ ret_val = proc.wait()
+
+ if options.debug_mode:
+ print "==== %s stdout start ====" % cmd_str
+ print proc_stdout
+ print "==== %s stdout end ====" % cmd_str
+ print "==== %s stderr ====" % cmd_str
+ print proc_stderr
+ print "==== %s stderr ====" % cmd_str
+
+ if ret_val != 0:
+ raise RuntimeError("Command '%s' failed with error code %d. Error message:%s%s%sstdout:%s" % \
+ (cmd_str, ret_val, os.linesep, proc_stderr, os.linesep, proc_stdout))
+
+ return proc_stdout, proc_stderr
+#end run_cmd
+
+def deterimine_repo_type(location):
+ apparent_repo_type = "none"
+
+ while location != "":
+ if os.path.exists(os.path.join(location, ".git")):
+ apparent_repo_type = "git"
+ break
+ elif os.path.exists(os.path.join(location, ".svn")):
+ apparent_repo_type = "svn"
+ break
+ else:
+ location = location[:location.rfind(os.sep)]
+
+ return apparent_repo_type, location
+
+#end deterimine_repo_type
+
+def rsync(source, dest, options):
+ rsync_cmd = ["rsync", "-ar", "--delete"]
+ if options.debug_mode:
+ rsync_cmd.append("-v")
+
+ if options.source_repo == "git":
+ rsync_cmd.append("--exclude=.git")
+
+ rsync_cmd.append(options.source)
+ rsync_cmd.append(options.destination)
+ run_cmd(rsync_cmd, options)
+#end rsync
+
+def create_commit_message(commit_id, commit_log, project_name, project_location):
+ eol = os.linesep
+ message = "Snapshot of %s from commit %s" % (project_name, commit_id)
+ message += eol * 2
+ message += "From repository at %s" % project_location
+ message += eol * 2
+ message += "At commit:" + eol
+ message += commit_log
+ return message
+#end create_commit_message
+
+def find_git_commit_information(options):
+ r"""
+ >>> class fake_options:
+ ... source="."
+ ... verbose_mode=False
+ ... debug_mode=False
+ >>> myoptions = fake_options()
+ >>> find_git_commit_information(myoptions)[2:]
+ ('sems', 'software.sandia.gov:/git/sems')
+ """
+ git_log_cmd = ["git", "log", "-1"]
+
+ output, error = run_cmd(git_log_cmd, options, options.source)
+
+ commit_match = re.match("commit ([0-9a-fA-F]+)", output)
+ commit_id = commit_match.group(1)
+ commit_log = output
+
+ git_remote_cmd = ["git", "remote", "-v"]
+ output, error = run_cmd(git_remote_cmd, options, options.source)
+
+ remote_match = re.search("origin\s([^ ]*/([^ ]+))", output, re.MULTILINE)
+ if not remote_match:
+ raise RuntimeError("Could not find origin of repo at %s. Consider using none for source repo type." % (options.source))
+
+ source_location = remote_match.group(1)
+ source_name = remote_match.group(2).strip()
+
+ if source_name[-1] == "/":
+ source_name = source_name[:-1]
+
+ return commit_id, commit_log, source_name, source_location
+
+#end find_git_commit_information
+
+def do_git_commit(message, options):
+ if options.verbose_mode:
+ print "Commiting to destination repository."
+
+ git_add_cmd = ["git", "add", "-A"]
+ run_cmd(git_add_cmd, options, options.destination)
+
+ git_commit_cmd = ["git", "commit", "-m%s" % message]
+ run_cmd(git_commit_cmd, options, options.destination)
+
+ git_log_cmd = ["git", "log", "--format=%h", "-1"]
+ commit_sha1, error = run_cmd(git_log_cmd, options, options.destination)
+
+ print "Commit %s was made to %s." % (commit_sha1.strip(), options.dest_root)
+#end do_git_commit
+
+def verify_git_repo_clean(location, options):
+ git_status_cmd = ["git", "status", "--porcelain"]
+ output, error = run_cmd(git_status_cmd, options, location)
+
+ if output != "":
+ if options.no_validate_repo == False:
+ raise RuntimeError("%s is not clean.%sPlease commit or stash all changes before running snapshot."
+ % (location, os.linesep))
+ else:
+ print "WARNING: %s is not clean. Proceeding anyway." % location
+ print "WARNING: This could lead to differences in the source and destination."
+ print "WARNING: It could also lead to extra files being included in the snapshot commit."
+
+#end verify_git_repo_clean
+
+def main(options):
+ if options.verbose_mode:
+ print "Snapshotting %s to %s." % (options.source, options.destination)
+
+ if options.source_repo == "git":
+ verify_git_repo_clean(options.source, options)
+ commit_id, commit_log, repo_name, repo_location = find_git_commit_information(options)
+ elif options.source_repo == "none":
+ commit_id = "N/A"
+ commit_log = "Unknown commit from %s snapshotted at: %s" % (options.source, datetime.datetime.now())
+ repo_name = options.source
+ repo_location = options.source
+
+ commit_message = create_commit_message(commit_id, commit_log, repo_name, repo_location) + os.linesep*2
+
+ if options.dest_repo == "git":
+ verify_git_repo_clean(options.destination, options)
+
+ rsync(options.source, options.destination, options)
+
+ if options.dest_repo == "git":
+ do_git_commit(commit_message, options)
+ elif options.dest_repo == "none":
+ file_name = "snapshot_message.txt"
+ message_file = open(file_name, "w")
+ message_file.write(commit_message)
+ message_file.close()
+ cwd = os.getcwd()
+ print "No commit done by request. Please use file at:"
+ print "%s%sif you wish to commit this to a repo later." % (cwd+"/"+file_name, os.linesep)
+
+
+
+
+#end main
+
+if (__name__ == "__main__"):
+ if ("--test" in sys.argv):
+ doctest.testmod()
+ sys.exit(0)
+
+ try:
+ options = parse_cmdline(__doc__)
+ main(options)
+ except RuntimeError, e:
+ print "Error occured:", e
+ if "--debug" in sys.argv:
+ traceback.print_exc()
+ sys.exit(1)
+ else:
+ sys.exit(0)
diff --git a/lib/kokkos/config/test_all_sandia b/lib/kokkos/config/test_all_sandia
new file mode 100755
index 000000000..7d52039be
--- /dev/null
+++ b/lib/kokkos/config/test_all_sandia
@@ -0,0 +1,305 @@
+#!/bin/bash -e
+
+#
+# Global config
+#
+
+set -o pipefail
+
+COMPILER_ROOT="/home/projects/x86-64"
+
+GCC_BUILD_LIST="OpenMP,Pthread,Serial,OpenMP_Serial,Pthread_Serial"
+INTEL_BUILD_LIST="OpenMP,Pthread,Serial,OpenMP_Serial,Pthread_Serial"
+CLANG_BUILD_LIST="Pthread,Serial,Pthread_Serial"
+CUDA_BUILD_LIST="Cuda_OpenMP,Cuda_Pthread,Cuda_Serial"
+
+GCC_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wignored-qualifiers,-Wempty-body,-Wclobbered,-Wuninitialized"
+CLANG_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized"
+INTEL_WARNING_FLAGS="-Wall,-Wshadow,-pedantic,-Werror,-Wsign-compare,-Wtype-limits,-Wuninitialized"
+CUDA_WARNING_FLAGS=""
+
+# Format: (compiler module-list build-list exe-name warning-flag)
+COMPILERS=("gcc/4.7.2 gcc/4.7.2/base,hwloc/1.10.0/host/gnu/4.7.2 $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+ "gcc/4.8.4 gcc/4.9.2/base,hwloc/1.10.0/host/gnu/4.9.2 $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+ "gcc/4.9.2 gcc/4.9.2/base,hwloc/1.10.0/host/gnu/4.9.2 $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+ "gcc/5.1.0 gcc/5.1.0/base,hwloc/1.10.0/host/gnu/5.1.0 $GCC_BUILD_LIST g++ $GCC_WARNING_FLAGS"
+ "intel/14.0.4 intel/14.0.4/base,hwloc/1.10.0/host/gnu/4.7.2 $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+ "intel/15.0.2 intel/15.0.2/base,hwloc/1.10.0/host/gnu/4.7.2 $INTEL_BUILD_LIST icpc $INTEL_WARNING_FLAGS"
+ "clang/3.5.2 clang/3.5.2/base $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+ "clang/3.6.1 clang/3.6.1/base $CLANG_BUILD_LIST clang++ $CLANG_WARNING_FLAGS"
+ "cuda/6.5.14 cuda/6.5.14,nvcc-wrapper/gnu,gcc/4.7.2/base $CUDA_BUILD_LIST nvcc_wrapper $CUDA_WARNING_FLAGS"
+ "cuda/7.0.28 cuda/7.0.18,nvcc-wrapper/gnu,gcc/4.7.2/base $CUDA_BUILD_LIST nvcc_wrapper $CUDA_WARNING_FLAGS"
+ )
+
+export OMP_NUM_THREADS=4
+
+export SEMS_MODULE_ROOT=/projects/modulefiles
+module use /home/projects/modulefiles
+module use /projects/modulefiles/rhel6-x86_64/sems/compiler
+
+SCRIPT_KOKKOS_ROOT=$( cd "$( dirname "$0" )" && cd .. && pwd )
+
+#
+# Handle arguments
+#
+
+DEBUG=False
+ARGS=""
+CUSTOM_BUILD_LIST=""
+DRYRUN=False
+
+while [[ $# > 0 ]]
+do
+key="$1"
+case $key in
+--kokkos-path*)
+KOKKOS_PATH="${key#*=}"
+;;
+--build-list*)
+CUSTOM_BUILD_LIST="${key#*=}"
+;;
+--debug*)
+DEBUG=True
+;;
+--dry-run*)
+DRYRUN=True
+;;
+--help)
+echo "test_all_sandia <ARGS> <OPTIONS>:"
+echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory"
+echo " Defaults to root repo containing this script"
+echo "--debug: Run tests in debug. Defaults to False"
+echo "--dry-run: Just print what would be executed"
+echo "--build-list=BUILD,BUILD,BUILD..."
+echo " Provide a comma-separated list of builds instead of running all builds"
+echo " Valid items:"
+echo " OpenMP, Pthread, Serial, OpenMP_Serial, Pthread_Serial"
+echo " Cuda_OpenMP, Cuda_Pthread, Cuda_Serial"
+echo ""
+echo "ARGS: list of expressions matching compilers to test"
+echo ""
+echo "Examples:"
+echo " Run all tests"
+echo " % test_all_sandia"
+echo ""
+echo " Run all gcc tests"
+echo " % test_all_sandia gcc"
+echo ""
+echo " Run all gcc/4.7.2 and all intel tests"
+echo " % test_all_sandia gcc/4.7.2 intel"
+echo ""
+echo " Run all tests in debug"
+echo " % test_all_sandia --debug"
+echo ""
+echo " Run gcc/4.7.2 and only do OpenMP and OpenMP_Serial builds"
+echo " % test_all_sandia gcc/4.7.2 --build-list=OpenMP,OpenMP_Serial"
+echo
+exit 0
+;;
+*)
+# args, just append
+ARGS="$ARGS $1"
+;;
+esac
+shift
+done
+
+
+# set kokkos path
+if [ -z "$KOKKOS_PATH" ]; then
+ KOKKOS_PATH=$SCRIPT_KOKKOS_ROOT
+else
+ # Ensure KOKKOS_PATH is abs path
+ KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd )
+fi
+
+# set build type
+if [ "$DEBUG" = "True" ]; then
+ BUILD_TYPE=debug
+else
+ BUILD_TYPE=release
+fi
+
+# If no args provided, do all compilers
+if [ -z "$ARGS" ]; then
+ ARGS='?'
+fi
+
+# Process args to figure out which compilers to test
+COMPILERS_TO_TEST=""
+for ARG in $ARGS; do
+ for COMPILER_DATA in "${COMPILERS[@]}"; do
+ arr=($COMPILER_DATA)
+ COMPILER=${arr[0]}
+ if [[ "$COMPILER" = $ARG* ]]; then
+ if [[ "$COMPILERS_TO_TEST" != *${COMPILER}* ]]; then
+ COMPILERS_TO_TEST="$COMPILERS_TO_TEST $COMPILER"
+ else
+ echo "Tried to add $COMPILER twice"
+ fi
+ fi
+ done
+done
+
+#
+# Functions
+#
+
+# Do not call directly
+get_compiler_data() {
+ compiler=$1
+ item=$2
+
+ for compiler_data in "${COMPILERS[@]}" ; do
+ arr=($compiler_data)
+ if [ "$compiler" = "${arr[0]}" ]; then
+ echo "${arr[$item]}" | tr , ' '
+ return 0
+ fi
+ done
+
+ # Not found
+ echo "Unreconized compiler $compiler" >&2
+ exit 1
+}
+
+#
+# For all getters, usage: <GETTER> <COMPILER>
+#
+
+get_compiler_modules() {
+ get_compiler_data $1 1
+}
+
+get_compiler_build_list() {
+ get_compiler_data $1 2
+}
+
+get_compiler_exe_name() {
+ get_compiler_data $1 3
+}
+
+get_compiler_warning_flags() {
+ get_compiler_data $1 4
+}
+
+run_cmd() {
+ echo "RUNNING: $*"
+ if [ "$DRYRUN" != "True" ]; then
+ eval "$*"
+ fi
+}
+
+report_and_log_test_result() {
+ if [ "$1" = "0" ]; then
+ echo "PASSED $2"
+ TEST_RESULTS="${TEST_RESULTS}\nPASSED $2"
+ else
+ echo "FAILED $2" >&2
+ TEST_RESULTS="${TEST_RESULTS}\nFAILED $2 ($3)"
+ NUM_FAILED+=1
+ fi
+}
+
+# single_build_and_test <COMPILER> <BUILD> <BUILD_TYPE>
+single_build_and_test() {
+ # Use sane var names
+ local compiler=$1; local build=$2; local build_type=$3;
+
+ cd $ROOT_DIR/$compiler
+
+ local compiler_warning_flags=$(get_compiler_warning_flags $compiler)
+ local compiler_exe=$(get_compiler_exe_name $compiler)
+
+ if [[ "$build_type" = hwloc* ]]; then
+ local extra_args="--with-hwloc=$HWLOC_ROOT"
+ fi
+
+ if [[ "$build_type" = *debug* ]]; then
+ local extra_args="$extra_args --debug"
+ local cxxflags="-g $compiler_warning_flags"
+ else
+ local cxxflags="-O3 $compiler_warning_flags"
+ fi
+
+ local desc=$(echo "${compiler}-${build}-${build_type}" | sed 's:/:-:g')
+ echo " Doing build: $desc"
+
+ mkdir "${build}-$build_type"
+ cd "${build}-$build_type"
+
+ # cxxflags="-DKOKKOS_USING_EXPERIMENTAL_VIEW $cxxflags"
+
+ run_cmd ${KOKKOS_PATH}/generate_makefile.bash --with-devices=$build --compiler=$(which $compiler_exe) --cxxflags=\"$cxxflags\" \"$extra_args\" 2>&1 | tee ${desc}.configure.log || { report_and_log_test_result 1 ${desc} configure && return 0; }
+ run_cmd make build-test 2>&1 | tee ${desc}.build.log || { report_and_log_test_result 1 ${desc} build && return 0; }
+ run_cmd make test 2>&1 | tee ${desc}.test.log || { report_and_log_test_result 1 ${desc} test && return 0; }
+ report_and_log_test_result 0 $desc
+ return 0
+}
+
+setup_env() {
+ local compiler=$1
+ local compiler_modules=$(get_compiler_modules $compiler)
+
+ module purge
+
+ for mod in $compiler_modules; do
+ module load $mod
+ # It is ridiculously hard to check for the success of a loaded
+ # module. Module does not return error codes and piping to grep
+ # causes module to run in a subshell.
+ module list 2>&1 | grep "$mod"
+ done
+}
+
+# build_and_test_all <COMPILER>
+build_and_test_all() {
+ # Get compiler data
+ local compiler=$1
+ if [ -z "$CUSTOM_BUILD_LIST" ]; then
+ local compiler_build_list=$(get_compiler_build_list $compiler)
+ else
+ local compiler_build_list=$(echo "$CUSTOM_BUILD_LIST" | tr , ' ')
+ fi
+
+ # set up env
+ cd $ROOT_DIR
+ mkdir -p $compiler
+ setup_env $compiler
+
+ # do builds
+ for build in $compiler_build_list
+ do
+ single_build_and_test $compiler $build $BUILD_TYPE
+
+ # If not cuda, do a hwloc test too
+ if [[ "$compiler" != cuda* ]]; then
+ single_build_and_test $compiler $build "hwloc-$BUILD_TYPE"
+ fi
+ done
+
+ return 0
+}
+
+#
+# Main
+#
+
+/bin/rm -rf TestAll
+mkdir TestAll
+cd TestAll
+
+TEST_RESULTS=""
+declare -i NUM_FAILED=0
+ROOT_DIR=$(pwd)
+for COMPILER in $COMPILERS_TO_TEST; do
+ echo "Testing compiler $COMPILER"
+ build_and_test_all $COMPILER
+done
+
+echo "#######################################################"
+echo "RESULT SUMMARY"
+echo "#######################################################"
+echo -e $TEST_RESULTS
+
+exit $NUM_FAILED
diff --git a/lib/kokkos/config/testing_scripts/README b/lib/kokkos/config/testing_scripts/README
new file mode 100644
index 000000000..455afffd8
--- /dev/null
+++ b/lib/kokkos/config/testing_scripts/README
@@ -0,0 +1,5 @@
+jenkins_test_driver is designed to be run through Jenkins as a
+multiconfiguration job. It relies on a number of environment variables that will
+only be set when run in that context. It is possible to override these if you
+know the Jenkins job setup. It is not recommended that a non-expert try to run
+this script directly.
diff --git a/lib/kokkos/config/testing_scripts/jenkins_test_driver b/lib/kokkos/config/testing_scripts/jenkins_test_driver
new file mode 100755
index 000000000..9cba7fa51
--- /dev/null
+++ b/lib/kokkos/config/testing_scripts/jenkins_test_driver
@@ -0,0 +1,83 @@
+#!/bin/bash -x
+
+echo "Building for BUILD_TYPE = ${BUILD_TYPE}"
+echo "Building with HOST_COMPILER = ${HOST_COMPILER}"
+echo "Building in ${WORKSPACE}"
+
+module use /home/projects/modulefiles
+
+BUILD_TYPE=`echo $BUILD_TYPE | tr "~" " "`
+build_options=""
+for item in ${BUILD_TYPE}; do
+ build_options="$build_options --with-$item"
+done
+
+kokkos_path=${WORKSPACE}/kokkos
+gtest_path=${WORKSPACE}/kokkos/tpls/gtest
+
+echo ${WORKSPACE}
+pwd
+
+#extract information from the provided parameters.
+host_compiler_brand=`echo $HOST_COMPILER | grep -o "^[a-zA-Z]*"`
+cuda_compiler=`echo $BUILD_TYPE | grep -o "cuda_[^ ]*"`
+
+host_compiler_module=`echo $HOST_COMPILER | tr "_" "/"`
+cuda_compiler_module=`echo $cuda_compiler | tr "_" "/"`
+build_path=`echo $BUILD_TYPE | tr " " "_"`
+
+module load $host_compiler_module
+module load $cuda_compiler_module
+
+case $host_compiler_brand in
+ gcc)
+ module load nvcc-wrapper/gnu
+ compiler=g++
+ ;;
+ intel)
+ module load nvcc-wrapper/intel
+ compiler=icpc
+ ;;
+ *)
+ echo "Unrecognized compiler brand."
+ exit 1
+ ;;
+esac
+
+#if cuda is on we need to set the host compiler for the
+#nvcc wrapper and make the wrapper the compiler.
+if [ $cuda_compiler != "" ]; then
+ export NVCC_WRAPPER_DEFAULT_COMPILER=$compiler
+ compiler=$kokkos_path/config/nvcc_wrapper
+fi
+
+if [ $host_compiler_brand == "intel" -a $cuda_compiler != "" ]; then
+ echo "Intel compilers are not supported with cuda at this time."
+ exit 0
+fi
+
+rm -rf test-$build_path
+mkdir test-$build_path
+cd test-$build_path
+
+/bin/bash $kokkos_path/generate_makefile.bash $build_options --kokkos-path="$kokkos_path" --with-gtest="$gtest_path" --compiler=$compiler 2>&1 |tee configure.out
+
+if [ ${PIPESTATUS[0]} != 0 ]; then
+ echo "Configure failed."
+ exit 1
+fi
+
+make build-test 2>&1 | tee build.log
+
+if [ ${PIPESTATUS[0]} != 0 ]; then
+ echo "Build failed."
+ exit 1
+fi
+
+make test 2>&1 | tee test.log
+
+grep "FAIL" test.log
+if [ $? == 0 ]; then
+ echo "Tests failed."
+ exit 1
+fi
diff --git a/lib/kokkos/containers/performance_tests/Makefile b/lib/kokkos/containers/performance_tests/Makefile
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/containers/performance_tests/TestCuda.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp b/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestMain.cpp b/lib/kokkos/containers/performance_tests/TestMain.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestOpenMP.cpp b/lib/kokkos/containers/performance_tests/TestOpenMP.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestThreads.cpp b/lib/kokkos/containers/performance_tests/TestThreads.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp b/lib/kokkos/containers/performance_tests/TestUnorderedMapPerformance.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_Bitset.hpp b/lib/kokkos/containers/src/Kokkos_Bitset.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_DualView.hpp b/lib/kokkos/containers/src/Kokkos_DualView.hpp
old mode 100755
new mode 100644
index 95eea57e9..5e70731bd
--- a/lib/kokkos/containers/src/Kokkos_DualView.hpp
+++ b/lib/kokkos/containers/src/Kokkos_DualView.hpp
@@ -1,840 +1,880 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
/// \file Kokkos_DualView.hpp
/// \brief Declaration and definition of Kokkos::DualView.
///
/// This header file declares and defines Kokkos::DualView and its
/// related nonmember functions.
#ifndef KOKKOS_DUALVIEW_HPP
#define KOKKOS_DUALVIEW_HPP
#include <Kokkos_Core.hpp>
#include <impl/Kokkos_Error.hpp>
namespace Kokkos {
/* \class DualView
* \brief Container to manage mirroring a Kokkos::View that lives
* in device memory with a Kokkos::View that lives in host memory.
*
* This class provides capabilities to manage data which exists in two
* memory spaces at the same time. It keeps views of the same layout
* on two memory spaces as well as modified flags for both
* allocations. Users are responsible for setting the modified flags
* manually if they change the data in either memory space, by calling
* the sync() method templated on the device where they modified the
* data. Users may synchronize data by calling the modify() function,
* templated on the device towards which they want to synchronize
* (i.e., the target of the one-way copy operation).
*
* The DualView class also provides convenience methods such as
* realloc, resize and capacity which call the appropriate methods of
* the underlying Kokkos::View objects.
*
* The four template arguments are the same as those of Kokkos::View.
* (Please refer to that class' documentation for a detailed
* description.)
*
* \tparam DataType The type of the entries stored in the container.
*
* \tparam Layout The array's layout in memory.
*
* \tparam Device The Kokkos Device type. If its memory space is
* not the same as the host's memory space, then DualView will
* contain two separate Views: one in device memory, and one in
* host memory. Otherwise, DualView will only store one View.
*
* \tparam MemoryTraits (optional) The user's intended memory access
* behavior. Please see the documentation of Kokkos::View for
* examples. The default suffices for most users.
*/
template< class DataType ,
class Arg1Type = void ,
class Arg2Type = void ,
class Arg3Type = void>
class DualView : public ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type >
{
public:
//! \name Typedefs for device types and various Kokkos::View specializations.
//@{
typedef ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type > traits ;
//! The Kokkos Host Device type;
typedef typename traits::host_mirror_space host_mirror_space ;
//! The type of a Kokkos::View on the device.
typedef View< typename traits::data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits > t_dev ;
/// \typedef t_host
/// \brief The type of a Kokkos::View host mirror of \c t_dev.
typedef typename t_dev::HostMirror t_host ;
//! The type of a const View on the device.
//! The type of a Kokkos::View on the device.
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits > t_dev_const ;
/// \typedef t_host_const
/// \brief The type of a const View host mirror of \c t_dev_const.
typedef typename t_dev_const::HostMirror t_host_const;
//! The type of a const, random-access View on the device.
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
MemoryRandomAccess > t_dev_const_randomread ;
/// \typedef t_host_const_randomread
/// \brief The type of a const, random-access View host mirror of
/// \c t_dev_const_randomread.
typedef typename t_dev_const_randomread::HostMirror t_host_const_randomread;
//! The type of an unmanaged View on the device.
typedef View< typename traits::data_type ,
typename traits::array_layout ,
typename traits::device_type ,
MemoryUnmanaged> t_dev_um;
//! The type of an unmanaged View host mirror of \c t_dev_um.
typedef View< typename t_host::data_type ,
typename t_host::array_layout ,
typename t_host::device_type ,
MemoryUnmanaged> t_host_um;
//! The type of a const unmanaged View on the device.
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
MemoryUnmanaged> t_dev_const_um;
//! The type of a const unmanaged View host mirror of \c t_dev_const_um.
typedef View<typename t_host::const_data_type,
typename t_host::array_layout,
typename t_host::device_type,
MemoryUnmanaged> t_host_const_um;
//@}
//! \name The two View instances.
//@{
t_dev d_view;
t_host h_view;
//@}
//! \name Counters to keep track of changes ("modified" flags)
//@{
View<unsigned int,LayoutLeft,typename t_host::execution_space> modified_device;
View<unsigned int,LayoutLeft,typename t_host::execution_space> modified_host;
//@}
//! \name Constructors
//@{
/// \brief Empty constructor.
///
/// Both device and host View objects are constructed using their
/// default constructors. The "modified" flags are both initialized
/// to "unmodified."
DualView () :
modified_device (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_device")),
modified_host (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_host"))
{}
/// \brief Constructor that allocates View objects on both host and device.
///
/// This constructor works like the analogous constructor of View.
/// The first argument is a string label, which is entirely for your
/// benefit. (Different DualView objects may have the same label if
/// you like.) The arguments that follow are the dimensions of the
/// View objects. For example, if the View has three dimensions,
/// the first three integer arguments will be nonzero, and you may
/// omit the integer arguments that follow.
DualView (const std::string& label,
const size_t n0 = 0,
const size_t n1 = 0,
const size_t n2 = 0,
const size_t n3 = 0,
const size_t n4 = 0,
const size_t n5 = 0,
const size_t n6 = 0,
const size_t n7 = 0)
: d_view (label, n0, n1, n2, n3, n4, n5, n6, n7)
, h_view (create_mirror_view (d_view)) // without UVM, host View mirrors
, modified_device (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_device"))
, modified_host (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_host"))
{}
//! Copy constructor (shallow copy)
template<class SS, class LS, class DS, class MS>
DualView (const DualView<SS,LS,DS,MS>& src) :
d_view (src.d_view),
h_view (src.h_view),
modified_device (src.modified_device),
modified_host (src.modified_host)
{}
/// \brief Create DualView from existing device and host View objects.
///
/// This constructor assumes that the device and host View objects
/// are synchronized. You, the caller, are responsible for making
/// sure this is the case before calling this constructor. After
/// this constructor returns, you may use DualView's sync() and
/// modify() methods to ensure synchronization of the View objects.
///
/// \param d_view_ Device View
/// \param h_view_ Host View (must have type t_host = t_dev::HostMirror)
DualView (const t_dev& d_view_, const t_host& h_view_) :
d_view (d_view_),
h_view (h_view_),
modified_device (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_device")),
modified_host (View<unsigned int,LayoutLeft,typename t_host::execution_space> ("DualView::modified_host"))
{
Impl::assert_shapes_are_equal (d_view.shape (), h_view.shape ());
}
//@}
//! \name Methods for synchronizing, marking as modified, and getting Views.
//@{
/// \brief Return a View on a specific device \c Device.
///
/// Please don't be afraid of the if_c expression in the return
/// value's type. That just tells the method what the return type
/// should be: t_dev if the \c Device template parameter matches
/// this DualView's device type, else t_host.
///
/// For example, suppose you create a DualView on Cuda, like this:
/// \code
/// typedef Kokkos::DualView<float, Kokkos::LayoutRight, Kokkos::Cuda> dual_view_type;
/// dual_view_type DV ("my dual view", 100);
/// \endcode
/// If you want to get the CUDA device View, do this:
/// \code
/// typename dual_view_type::t_dev cudaView = DV.view<Kokkos::Cuda> ();
/// \endcode
/// and if you want to get the host mirror of that View, do this:
/// \code
/// typedef typename Kokkos::HostSpace::execution_space host_device_type;
/// typename dual_view_type::t_host hostView = DV.view<host_device_type> ();
/// \endcode
template< class Device >
KOKKOS_INLINE_FUNCTION
const typename Impl::if_c<
Impl::is_same<typename t_dev::memory_space,
typename Device::memory_space>::value,
t_dev,
t_host>::type& view () const
{
return Impl::if_c<
Impl::is_same<
typename t_dev::memory_space,
typename Device::memory_space>::value,
t_dev,
t_host >::select (d_view , h_view);
}
/// \brief Update data on device or host only if data in the other
/// space has been marked as modified.
///
/// If \c Device is the same as this DualView's device type, then
/// copy data from host to device. Otherwise, copy data from device
/// to host. In either case, only copy if the source of the copy
/// has been modified.
///
/// This is a one-way synchronization only. If the target of the
/// copy has been modified, this operation will discard those
/// modifications. It will also reset both device and host modified
/// flags.
///
/// \note This method doesn't know on its own whether you modified
/// the data in either View. You must manually mark modified data
/// as modified, by calling the modify() method with the
/// appropriate template parameter.
template<class Device>
void sync( const typename Impl::enable_if<
( Impl::is_same< typename traits::data_type , typename traits::non_const_data_type>::value) ||
( Impl::is_same< Device , int>::value)
, int >::type& = 0)
{
const unsigned int dev =
Impl::if_c<
Impl::is_same<
typename t_dev::memory_space,
typename Device::memory_space>::value ,
unsigned int,
unsigned int>::select (1, 0);
if (dev) { // if Device is the same as DualView's device type
if ((modified_host () > 0) && (modified_host () >= modified_device ())) {
deep_copy (d_view, h_view);
modified_host() = modified_device() = 0;
}
} else { // hopefully Device is the same as DualView's host type
if ((modified_device () > 0) && (modified_device () >= modified_host ())) {
deep_copy (h_view, d_view);
modified_host() = modified_device() = 0;
}
}
if(Impl::is_same<typename t_host::memory_space,typename t_dev::memory_space>::value) {
t_dev::execution_space::fence();
t_host::execution_space::fence();
}
}
template<class Device>
void sync ( const typename Impl::enable_if<
( ! Impl::is_same< typename traits::data_type , typename traits::non_const_data_type>::value ) ||
( Impl::is_same< Device , int>::value)
, int >::type& = 0 )
{
const unsigned int dev =
Impl::if_c<
Impl::is_same<
typename t_dev::memory_space,
typename Device::memory_space>::value,
unsigned int,
unsigned int>::select (1, 0);
if (dev) { // if Device is the same as DualView's device type
if ((modified_host () > 0) && (modified_host () >= modified_device ())) {
Impl::throw_runtime_exception("Calling sync on a DualView with a const datatype.");
}
} else { // hopefully Device is the same as DualView's host type
if ((modified_device () > 0) && (modified_device () >= modified_host ())) {
Impl::throw_runtime_exception("Calling sync on a DualView with a const datatype.");
}
}
}
+
+ template<class Device>
+ bool need_sync()
+ {
+ const unsigned int dev =
+ Impl::if_c<
+ Impl::is_same<
+ typename t_dev::memory_space,
+ typename Device::memory_space>::value ,
+ unsigned int,
+ unsigned int>::select (1, 0);
+
+ if (dev) { // if Device is the same as DualView's device type
+ if ((modified_host () > 0) && (modified_host () >= modified_device ())) {
+ return true;
+ }
+ } else { // hopefully Device is the same as DualView's host type
+ if ((modified_device () > 0) && (modified_device () >= modified_host ())) {
+ return true;
+ }
+ }
+ return false;
+ }
/// \brief Mark data as modified on the given device \c Device.
///
/// If \c Device is the same as this DualView's device type, then
/// mark the device's data as modified. Otherwise, mark the host's
/// data as modified.
template<class Device>
void modify () {
const unsigned int dev =
Impl::if_c<
Impl::is_same<
typename t_dev::memory_space,
typename Device::memory_space>::value,
unsigned int,
unsigned int>::select (1, 0);
if (dev) { // if Device is the same as DualView's device type
// Increment the device's modified count.
modified_device () = (modified_device () > modified_host () ?
modified_device () : modified_host ()) + 1;
} else { // hopefully Device is the same as DualView's host type
// Increment the host's modified count.
modified_host () = (modified_device () > modified_host () ?
modified_device () : modified_host ()) + 1;
}
}
//@}
//! \name Methods for reallocating or resizing the View objects.
//@{
/// \brief Reallocate both View objects.
///
/// This discards any existing contents of the objects, and resets
/// their modified flags. It does <i>not</i> copy the old contents
/// of either View into the new View objects.
void realloc( const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 ) {
::Kokkos::realloc(d_view,n0,n1,n2,n3,n4,n5,n6,n7);
h_view = create_mirror_view( d_view );
/* Reset dirty flags */
modified_device() = modified_host() = 0;
}
/// \brief Resize both views, copying old contents into new if necessary.
///
/// This method only copies the old contents into the new View
/// objects for the device which was last marked as modified.
void resize( const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 ) {
if(modified_device() >= modified_host()) {
/* Resize on Device */
::Kokkos::resize(d_view,n0,n1,n2,n3,n4,n5,n6,n7);
h_view = create_mirror_view( d_view );
/* Mark Device copy as modified */
modified_device() = modified_device()+1;
} else {
/* Realloc on Device */
::Kokkos::realloc(d_view,n0,n1,n2,n3,n4,n5,n6,n7);
t_host temp_view = create_mirror_view( d_view );
/* Remap on Host */
Kokkos::deep_copy( temp_view , h_view );
h_view = temp_view;
/* Mark Host copy as modified */
modified_host() = modified_host()+1;
}
}
//@}
//! \name Methods for getting capacity, stride, or dimension(s).
//@{
//! The allocation size (same as Kokkos::View::capacity).
size_t capacity() const {
#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
return d_view.span();
#else
return d_view.capacity();
#endif
}
//! Get stride(s) for each dimension.
template< typename iType>
void stride(iType* stride_) const {
d_view.stride(stride_);
}
/* \brief return size of dimension 0 */
size_t dimension_0() const {return d_view.dimension_0();}
/* \brief return size of dimension 1 */
size_t dimension_1() const {return d_view.dimension_1();}
/* \brief return size of dimension 2 */
size_t dimension_2() const {return d_view.dimension_2();}
/* \brief return size of dimension 3 */
size_t dimension_3() const {return d_view.dimension_3();}
/* \brief return size of dimension 4 */
size_t dimension_4() const {return d_view.dimension_4();}
/* \brief return size of dimension 5 */
size_t dimension_5() const {return d_view.dimension_5();}
/* \brief return size of dimension 6 */
size_t dimension_6() const {return d_view.dimension_6();}
/* \brief return size of dimension 7 */
size_t dimension_7() const {return d_view.dimension_7();}
//@}
};
} // namespace Kokkos
//
// Partial specializations of Kokkos::subview() for DualView objects.
//
namespace Kokkos {
namespace Impl {
template< class SrcDataType , class SrcArg1Type , class SrcArg2Type , class SrcArg3Type
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
, class SubArg4_type , class SubArg5_type , class SubArg6_type , class SubArg7_type
>
struct ViewSubview< DualView< SrcDataType , SrcArg1Type , SrcArg2Type , SrcArg3Type >
, SubArg0_type , SubArg1_type , SubArg2_type , SubArg3_type
, SubArg4_type , SubArg5_type , SubArg6_type , SubArg7_type >
{
private:
typedef DualView< SrcDataType , SrcArg1Type , SrcArg2Type , SrcArg3Type > SrcViewType ;
enum { V0 = Impl::is_same< SubArg0_type , void >::value ? 1 : 0 };
enum { V1 = Impl::is_same< SubArg1_type , void >::value ? 1 : 0 };
enum { V2 = Impl::is_same< SubArg2_type , void >::value ? 1 : 0 };
enum { V3 = Impl::is_same< SubArg3_type , void >::value ? 1 : 0 };
enum { V4 = Impl::is_same< SubArg4_type , void >::value ? 1 : 0 };
enum { V5 = Impl::is_same< SubArg5_type , void >::value ? 1 : 0 };
enum { V6 = Impl::is_same< SubArg6_type , void >::value ? 1 : 0 };
enum { V7 = Impl::is_same< SubArg7_type , void >::value ? 1 : 0 };
// The source view rank must be equal to the input argument rank
// Once a void argument is encountered all subsequent arguments must be void.
enum { InputRank =
Impl::StaticAssert<( SrcViewType::rank ==
( V0 ? 0 : (
V1 ? 1 : (
V2 ? 2 : (
V3 ? 3 : (
V4 ? 4 : (
V5 ? 5 : (
V6 ? 6 : (
V7 ? 7 : 8 ))))))) ))
&&
( SrcViewType::rank ==
( 8 - ( V0 + V1 + V2 + V3 + V4 + V5 + V6 + V7 ) ) )
>::value ? SrcViewType::rank : 0 };
enum { R0 = Impl::ViewOffsetRange< SubArg0_type >::is_range ? 1 : 0 };
enum { R1 = Impl::ViewOffsetRange< SubArg1_type >::is_range ? 1 : 0 };
enum { R2 = Impl::ViewOffsetRange< SubArg2_type >::is_range ? 1 : 0 };
enum { R3 = Impl::ViewOffsetRange< SubArg3_type >::is_range ? 1 : 0 };
enum { R4 = Impl::ViewOffsetRange< SubArg4_type >::is_range ? 1 : 0 };
enum { R5 = Impl::ViewOffsetRange< SubArg5_type >::is_range ? 1 : 0 };
enum { R6 = Impl::ViewOffsetRange< SubArg6_type >::is_range ? 1 : 0 };
enum { R7 = Impl::ViewOffsetRange< SubArg7_type >::is_range ? 1 : 0 };
enum { OutputRank = unsigned(R0) + unsigned(R1) + unsigned(R2) + unsigned(R3)
+ unsigned(R4) + unsigned(R5) + unsigned(R6) + unsigned(R7) };
// Reverse
enum { R0_rev = 0 == InputRank ? 0u : (
1 == InputRank ? unsigned(R0) : (
2 == InputRank ? unsigned(R1) : (
3 == InputRank ? unsigned(R2) : (
4 == InputRank ? unsigned(R3) : (
5 == InputRank ? unsigned(R4) : (
6 == InputRank ? unsigned(R5) : (
7 == InputRank ? unsigned(R6) : unsigned(R7) ))))))) };
typedef typename SrcViewType::array_layout SrcViewLayout ;
// Choose array layout, attempting to preserve original layout if at all possible.
typedef typename Impl::if_c<
( // Same Layout IF
// OutputRank 0
( OutputRank == 0 )
||
// OutputRank 1 or 2, InputLayout Left, Interval 0
// because single stride one or second index has a stride.
( OutputRank <= 2 && R0 && Impl::is_same<SrcViewLayout,LayoutLeft>::value )
||
// OutputRank 1 or 2, InputLayout Right, Interval [InputRank-1]
// because single stride one or second index has a stride.
( OutputRank <= 2 && R0_rev && Impl::is_same<SrcViewLayout,LayoutRight>::value )
), SrcViewLayout , Kokkos::LayoutStride >::type OutputViewLayout ;
// Choose data type as a purely dynamic rank array to accomodate a runtime range.
typedef typename Impl::if_c< OutputRank == 0 , typename SrcViewType::value_type ,
typename Impl::if_c< OutputRank == 1 , typename SrcViewType::value_type *,
typename Impl::if_c< OutputRank == 2 , typename SrcViewType::value_type **,
typename Impl::if_c< OutputRank == 3 , typename SrcViewType::value_type ***,
typename Impl::if_c< OutputRank == 4 , typename SrcViewType::value_type ****,
typename Impl::if_c< OutputRank == 5 , typename SrcViewType::value_type *****,
typename Impl::if_c< OutputRank == 6 , typename SrcViewType::value_type ******,
typename Impl::if_c< OutputRank == 7 , typename SrcViewType::value_type *******,
typename SrcViewType::value_type ********
>::type >::type >::type >::type >::type >::type >::type >::type OutputData ;
// Choose space.
// If the source view's template arg1 or arg2 is a space then use it,
// otherwise use the source view's execution space.
typedef typename Impl::if_c< Impl::is_space< SrcArg1Type >::value , SrcArg1Type ,
typename Impl::if_c< Impl::is_space< SrcArg2Type >::value , SrcArg2Type , typename SrcViewType::execution_space
>::type >::type OutputSpace ;
public:
// If keeping the layout then match non-data type arguments
// else keep execution space and memory traits.
typedef typename
Impl::if_c< Impl::is_same< SrcViewLayout , OutputViewLayout >::value
, Kokkos::DualView< OutputData , SrcArg1Type , SrcArg2Type , SrcArg3Type >
, Kokkos::DualView< OutputData , OutputViewLayout , OutputSpace
, typename SrcViewType::memory_traits >
>::type type ;
};
} /* namespace Impl */
} /* namespace Kokkos */
namespace Kokkos {
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , void , void , void
, void , void , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , void , void , void
, void , void , void , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0);
sub_view.h_view = subview(src.h_view,arg0);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , void , void
, void , void , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , void , void
, void , void , void , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1);
sub_view.h_view = subview(src.h_view,arg0,arg1);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , void
, void , void , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , void
, void , void , void , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, void , void , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, void , void , void , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2,arg3);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2,arg3);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , void , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , void , void ,void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2,arg3,arg4);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2,arg3,arg4);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , void , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , void , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2,arg3,arg4,arg5);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2,arg3,arg4,arg5);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 , class ArgType6 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , void
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 ,
const ArgType6 & arg6 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , void
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2,arg3,arg4,arg5,arg6);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2,arg3,arg4,arg5,arg6);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
template< class D , class A1 , class A2 , class A3 ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 , class ArgType6 , class ArgType7 >
typename Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , ArgType7
>::type
subview( const DualView<D,A1,A2,A3> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 ,
const ArgType6 & arg6 ,
const ArgType7 & arg7 )
{
typedef typename
Impl::ViewSubview< DualView<D,A1,A2,A3>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , ArgType7
>::type
DstViewType ;
DstViewType sub_view;
sub_view.d_view = subview(src.d_view,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7);
sub_view.h_view = subview(src.h_view,arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7);
sub_view.modified_device = src.modified_device;
sub_view.modified_host = src.modified_host;
return sub_view;
}
//
// Partial specialization of Kokkos::deep_copy() for DualView objects.
//
template< class DT , class DL , class DD , class DM ,
class ST , class SL , class SD , class SM >
void
deep_copy (DualView<DT,DL,DD,DM> dst, // trust me, this must not be a reference
const DualView<ST,SL,SD,SM>& src )
{
if (src.modified_device () >= src.modified_host ()) {
deep_copy (dst.d_view, src.d_view);
dst.template modify<typename DualView<DT,DL,DD,DM>::device_type> ();
} else {
deep_copy (dst.h_view, src.h_view);
dst.template modify<typename DualView<DT,DL,DD,DM>::host_mirror_space> ();
}
}
+template< class ExecutionSpace ,
+ class DT , class DL , class DD , class DM ,
+ class ST , class SL , class SD , class SM >
+void
+deep_copy (const ExecutionSpace& exec ,
+ DualView<DT,DL,DD,DM> dst, // trust me, this must not be a reference
+ const DualView<ST,SL,SD,SM>& src )
+{
+ if (src.modified_device () >= src.modified_host ()) {
+ deep_copy (exec, dst.d_view, src.d_view);
+ dst.template modify<typename DualView<DT,DL,DD,DM>::device_type> ();
+ } else {
+ deep_copy (exec, dst.h_view, src.h_view);
+ dst.template modify<typename DualView<DT,DL,DD,DM>::host_mirror_space> ();
+ }
+}
+
} // namespace Kokkos
#endif
diff --git a/lib/kokkos/containers/src/Kokkos_Functional.hpp b/lib/kokkos/containers/src/Kokkos_Functional.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_SegmentedView.hpp b/lib/kokkos/containers/src/Kokkos_SegmentedView.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp b/lib/kokkos/containers/src/Kokkos_StaticCrsGraph.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp b/lib/kokkos/containers/src/Kokkos_UnorderedMap.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/Kokkos_Vector.hpp b/lib/kokkos/containers/src/Kokkos_Vector.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_Bitset_impl.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_Functional_impl.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp b/lib/kokkos/containers/src/impl/Kokkos_StaticCrsGraph_factory.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp b/lib/kokkos/containers/src/impl/Kokkos_UnorderedMap_impl.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/Makefile b/lib/kokkos/containers/unit_tests/Makefile
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestBitset.hpp b/lib/kokkos/containers/unit_tests/TestBitset.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestComplex.hpp b/lib/kokkos/containers/unit_tests/TestComplex.hpp
old mode 100755
new mode 100644
index a2769fd11..5065d7257
--- a/lib/kokkos/containers/unit_tests/TestComplex.hpp
+++ b/lib/kokkos/containers/unit_tests/TestComplex.hpp
@@ -1,264 +1,264 @@
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
#ifndef KOKKOS_TEST_COMPLEX_HPP
#define KOKKOS_TEST_COMPLEX_HPP
-#include <Kokkos_Complex.hpp>
+//#include <Kokkos_Complex.hpp>
#include <gtest/gtest.h>
#include <iostream>
namespace Test {
namespace Impl {
template <typename RealType>
void testComplexConstructors () {
typedef Kokkos::complex<RealType> complex_type;
complex_type z1;
complex_type z2 (0.0, 0.0);
complex_type z3 (1.0, 0.0);
complex_type z4 (0.0, 1.0);
complex_type z5 (-1.0, -2.0);
ASSERT_TRUE( z1 == z2 );
ASSERT_TRUE( z1 != z3 );
ASSERT_TRUE( z1 != z4 );
ASSERT_TRUE( z1 != z5 );
ASSERT_TRUE( z2 != z3 );
ASSERT_TRUE( z2 != z4 );
ASSERT_TRUE( z2 != z5 );
ASSERT_TRUE( z3 != z4 );
ASSERT_TRUE( z3 != z5 );
complex_type z6 (-1.0, -2.0);
ASSERT_TRUE( z5 == z6 );
// Make sure that complex has value semantics, in particular, that
// equality tests use values and not pointers, so that
// reassignment actually changes the value.
z1 = complex_type (-3.0, -4.0);
ASSERT_TRUE( z1.real () == -3.0 );
ASSERT_TRUE( z1.imag () == -4.0 );
ASSERT_TRUE( z1 != z2 );
complex_type z7 (1.0);
ASSERT_TRUE( z3 == z7 );
ASSERT_TRUE( z7 == 1.0 );
ASSERT_TRUE( z7 != -1.0 );
z7 = complex_type (5.0);
ASSERT_TRUE( z7.real () == 5.0 );
ASSERT_TRUE( z7.imag () == 0.0 );
}
template <typename RealType>
void testPlus () {
typedef Kokkos::complex<RealType> complex_type;
complex_type z1 (1.0, -1.0);
complex_type z2 (-1.0, 1.0);
complex_type z3 = z1 + z2;
ASSERT_TRUE( z3 == complex_type (0.0, 0.0) );
}
template <typename RealType>
void testMinus () {
typedef Kokkos::complex<RealType> complex_type;
// Test binary minus.
complex_type z1 (1.0, -1.0);
complex_type z2 (-1.0, 1.0);
complex_type z3 = z1 - z2;
ASSERT_TRUE( z3 == complex_type (2.0, -2.0) );
// Test unary minus.
complex_type z4 (3.0, -4.0);
ASSERT_TRUE( -z1 == complex_type (-3.0, 4.0) );
}
template <typename RealType>
void testTimes () {
typedef Kokkos::complex<RealType> complex_type;
complex_type z1 (1.0, -1.0);
complex_type z2 (-1.0, 1.0);
complex_type z3 = z1 - z2;
ASSERT_TRUE( z3 == complex_type (2.0, -2.0) );
// Test unary minus.
complex_type z4 (3.0, -4.0);
ASSERT_TRUE( z4 == complex_type (3.0, -4.0) );
ASSERT_TRUE( -z4 == complex_type (-3.0, 4.0) );
ASSERT_TRUE( z4 == -complex_type (-3.0, 4.0) );
}
template <typename RealType>
void testDivide () {
typedef Kokkos::complex<RealType> complex_type;
// Test division of a complex number by a real number.
complex_type z1 (1.0, -1.0);
complex_type z2 (1.0 / 2.0, -1.0 / 2.0);
ASSERT_TRUE( z1 / 2.0 == z2 );
// (-1+2i)/(1-i) == ((-1+2i)(1+i)) / ((1-i)(1+i))
// (-1+2i)(1+i) == -3 + i
complex_type z3 (-1.0, 2.0);
complex_type z4 (1.0, -1.0);
complex_type z5 (-3.0, 1.0);
ASSERT_TRUE(z3 * Kokkos::conj (z4) == z5 );
// Test division of a complex number by a complex number.
// This assumes that RealType is a floating-point type.
complex_type z6 (Kokkos::real (z5) / 2.0,
Kokkos::imag (z5) / 2.0);
complex_type z7 = z3 / z4;
ASSERT_TRUE( z7 == z6 );
}
template <typename RealType>
void testOutsideKernel () {
testComplexConstructors<RealType> ();
testPlus<RealType> ();
testTimes<RealType> ();
testDivide<RealType> ();
}
template<typename RealType, typename Device>
void testCreateView () {
typedef Kokkos::complex<RealType> complex_type;
Kokkos::View<complex_type*, Device> x ("x", 10);
ASSERT_TRUE( x.dimension_0 () == 10 );
// Test that View assignment works.
Kokkos::View<complex_type*, Device> x_nonconst = x;
Kokkos::View<const complex_type*, Device> x_const = x;
}
template<typename RealType, typename Device>
class Fill {
public:
typedef typename Device::execution_space execution_space;
typedef Kokkos::View<Kokkos::complex<RealType>*, Device> view_type;
typedef typename view_type::size_type size_type;
KOKKOS_INLINE_FUNCTION
void operator () (const size_type i) const {
x_(i) = val_;
}
Fill (const view_type& x, const Kokkos::complex<RealType>& val) :
x_ (x), val_ (val)
{}
private:
view_type x_;
const Kokkos::complex<RealType> val_;
};
template<typename RealType, typename Device>
class Sum {
public:
typedef typename Device::execution_space execution_space;
typedef Kokkos::View<const Kokkos::complex<RealType>*, Device> view_type;
typedef typename view_type::size_type size_type;
typedef Kokkos::complex<RealType> value_type;
KOKKOS_INLINE_FUNCTION
void operator () (const size_type i, Kokkos::complex<RealType>& sum) const {
sum += x_(i);
}
Sum (const view_type& x) : x_ (x) {}
private:
view_type x_;
};
template<typename RealType, typename Device>
void testInsideKernel () {
typedef Kokkos::complex<RealType> complex_type;
typedef Kokkos::View<complex_type*, Device> view_type;
typedef typename view_type::size_type size_type;
const size_type N = 1000;
view_type x ("x", N);
ASSERT_TRUE( x.dimension_0 () == N );
// Kokkos::parallel_reduce (N, [=] (const size_type i, complex_type& result) {
// result += x[i];
// });
Kokkos::parallel_for (N, Fill<RealType, Device> (x, complex_type (1.0, -1.0)));
complex_type sum;
Kokkos::parallel_reduce (N, Sum<RealType, Device> (x), sum);
ASSERT_TRUE( sum.real () == 1000.0 && sum.imag () == -1000.0 );
}
} // namespace Impl
template <typename Device>
void testComplex ()
{
Impl::testOutsideKernel<float> ();
Impl::testOutsideKernel<double> ();
Impl::testCreateView<float, Device> ();
Impl::testCreateView<double, Device> ();
Impl::testInsideKernel<float, Device> ();
Impl::testInsideKernel<double, Device> ();
}
} // namespace Test
#endif // KOKKOS_TEST_COMPLEX_HPP
diff --git a/lib/kokkos/containers/unit_tests/TestCuda.cpp b/lib/kokkos/containers/unit_tests/TestCuda.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestDualView.hpp b/lib/kokkos/containers/unit_tests/TestDualView.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestOpenMP.cpp b/lib/kokkos/containers/unit_tests/TestOpenMP.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestSegmentedView.hpp b/lib/kokkos/containers/unit_tests/TestSegmentedView.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestSerial.cpp b/lib/kokkos/containers/unit_tests/TestSerial.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp b/lib/kokkos/containers/unit_tests/TestStaticCrsGraph.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestThreads.cpp b/lib/kokkos/containers/unit_tests/TestThreads.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp b/lib/kokkos/containers/unit_tests/TestUnorderedMap.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/TestVector.hpp b/lib/kokkos/containers/unit_tests/TestVector.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/containers/unit_tests/UnitTestMain.cpp b/lib/kokkos/containers/unit_tests/UnitTestMain.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/Makefile b/lib/kokkos/core/perf_test/Makefile
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp b/lib/kokkos/core/perf_test/PerfTestBlasKernels.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/PerfTestCuda.cpp b/lib/kokkos/core/perf_test/PerfTestCuda.cpp
old mode 100755
new mode 100644
index 28e654bb7..1263a7672
--- a/lib/kokkos/core/perf_test/PerfTestCuda.cpp
+++ b/lib/kokkos/core/perf_test/PerfTestCuda.cpp
@@ -1,189 +1,189 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
#if defined( KOKKOS_HAVE_CUDA )
#include <impl/Kokkos_Timer.hpp>
#include <PerfTestHexGrad.hpp>
#include <PerfTestBlasKernels.hpp>
#include <PerfTestGramSchmidt.hpp>
#include <PerfTestDriver.hpp>
namespace Test {
class cuda : public ::testing::Test {
protected:
static void SetUpTestCase() {
Kokkos::HostSpace::execution_space::initialize();
Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
}
static void TearDownTestCase() {
Kokkos::Cuda::finalize();
Kokkos::HostSpace::execution_space::finalize();
}
};
TEST_F( cuda, hexgrad )
{
EXPECT_NO_THROW( run_test_hexgrad< Kokkos::Cuda >( 10 , 20, "Kokkos::Cuda" ) );
}
TEST_F( cuda, gramschmidt )
{
EXPECT_NO_THROW( run_test_gramschmidt< Kokkos::Cuda >( 10 , 20, "Kokkos::Cuda" ) );
}
namespace {
template <typename T>
struct TextureFetch
{
typedef Kokkos::View< T *, Kokkos::CudaSpace> array_type;
typedef Kokkos::View< const T *, Kokkos::CudaSpace, Kokkos::MemoryRandomAccess> const_array_type;
typedef Kokkos::View< int *, Kokkos::CudaSpace> index_array_type;
typedef Kokkos::View< const int *, Kokkos::CudaSpace> const_index_array_type;
struct FillArray
{
array_type m_array;
FillArray( const array_type & array )
: m_array(array)
{}
void apply() const
{
- Kokkos::parallel_for( Kokkos::RangePolicy<Kokkos::Cuda,int>(0,m_array.size()), *this);
+ Kokkos::parallel_for( Kokkos::RangePolicy<Kokkos::Cuda,int>(0,m_array.dimension_0()), *this);
}
KOKKOS_INLINE_FUNCTION
void operator()(int i) const { m_array(i) = i; }
};
struct RandomIndexes
{
index_array_type m_indexes;
typename index_array_type::HostMirror m_host_indexes;
RandomIndexes( const index_array_type & indexes)
: m_indexes(indexes)
, m_host_indexes(Kokkos::create_mirror(m_indexes))
{}
void apply() const
{
- Kokkos::parallel_for( Kokkos::RangePolicy<Kokkos::HostSpace::execution_space,int>(0,m_host_indexes.size()), *this);
+ Kokkos::parallel_for( Kokkos::RangePolicy<Kokkos::HostSpace::execution_space,int>(0,m_host_indexes.dimension_0()), *this);
//random shuffle
Kokkos::HostSpace::execution_space::fence();
- std::random_shuffle(m_host_indexes.ptr_on_device(), m_host_indexes.ptr_on_device() + m_host_indexes.size());
+ std::random_shuffle(m_host_indexes.ptr_on_device(), m_host_indexes.ptr_on_device() + m_host_indexes.dimension_0());
Kokkos::deep_copy(m_indexes,m_host_indexes);
}
KOKKOS_INLINE_FUNCTION
void operator()(int i) const { m_host_indexes(i) = i; }
};
struct RandomReduce
{
const_array_type m_array;
const_index_array_type m_indexes;
RandomReduce( const const_array_type & array, const const_index_array_type & indexes)
: m_array(array)
, m_indexes(indexes)
{}
void apply(T & reduce) const
{
- Kokkos::parallel_reduce( Kokkos::RangePolicy<Kokkos::Cuda,int>(0,m_array.size()), *this, reduce);
+ Kokkos::parallel_reduce( Kokkos::RangePolicy<Kokkos::Cuda,int>(0,m_array.dimension_0()), *this, reduce);
}
KOKKOS_INLINE_FUNCTION
void operator()(int i, T & reduce) const
{ reduce += m_array(m_indexes(i)); }
};
static void run(int size, double & reduce_time, T &reduce)
{
array_type array("array",size);
index_array_type indexes("indexes",size);
{ FillArray f(array); f.apply(); }
{ RandomIndexes f(indexes); f.apply(); }
Kokkos::Cuda::fence();
Kokkos::Impl::Timer timer;
for (int j=0; j<10; ++j) {
RandomReduce f(array,indexes);
f.apply(reduce);
}
Kokkos::Cuda::fence();
reduce_time = timer.seconds();
}
};
} // unnamed namespace
TEST_F( cuda, texture_double )
{
printf("Random reduce of double through texture fetch\n");
for (int i=1; i<=27; ++i) {
int size = 1<<i;
double time = 0;
double reduce = 0;
TextureFetch<double>::run(size,time,reduce);
printf(" time = %1.3e size = 2^%d\n", time, i);
}
}
} // namespace Test
#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
diff --git a/lib/kokkos/core/perf_test/PerfTestDriver.hpp b/lib/kokkos/core/perf_test/PerfTestDriver.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/PerfTestGramSchmidt.hpp b/lib/kokkos/core/perf_test/PerfTestGramSchmidt.hpp
old mode 100755
new mode 100644
index 292e09cc4..03805dcdf
--- a/lib/kokkos/core/perf_test/PerfTestGramSchmidt.hpp
+++ b/lib/kokkos/core/perf_test/PerfTestGramSchmidt.hpp
@@ -1,231 +1,226 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <cmath>
#include <PerfTestBlasKernels.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Test {
// Reduction : result = dot( Q(:,j) , Q(:,j) );
// PostProcess : R(j,j) = result ; inv = 1 / result ;
template< class VectorView , class ValueView >
struct InvNorm2 : public Kokkos::DotSingle< VectorView > {
typedef typename Kokkos::DotSingle< VectorView >::value_type value_type ;
ValueView Rjj ;
ValueView inv ;
InvNorm2( const VectorView & argX ,
const ValueView & argR ,
const ValueView & argInv )
: Kokkos::DotSingle< VectorView >( argX )
, Rjj( argR )
, inv( argInv )
{}
KOKKOS_INLINE_FUNCTION
void final( value_type & result ) const
{
result = sqrt( result );
Rjj() = result ;
inv() = ( 0 < result ) ? 1.0 / result : 0 ;
}
};
template< class VectorView , class ValueView >
inline
void invnorm2( const VectorView & x ,
const ValueView & r ,
const ValueView & r_inv )
{
Kokkos::parallel_reduce( x.dimension_0() , InvNorm2< VectorView , ValueView >( x , r , r_inv ) );
}
// PostProcess : tmp = - ( R(j,k) = result );
template< class VectorView , class ValueView >
struct DotM : public Kokkos::Dot< VectorView > {
typedef typename Kokkos::Dot< VectorView >::value_type value_type ;
ValueView Rjk ;
ValueView tmp ;
DotM( const VectorView & argX ,
const VectorView & argY ,
const ValueView & argR ,
const ValueView & argTmp )
: Kokkos::Dot< VectorView >( argX , argY )
, Rjk( argR )
, tmp( argTmp )
{}
KOKKOS_INLINE_FUNCTION
void final( value_type & result ) const
{
Rjk() = result ;
tmp() = - result ;
}
};
template< class VectorView , class ValueView >
inline
void dot_neg( const VectorView & x ,
const VectorView & y ,
const ValueView & r ,
const ValueView & r_neg )
{
Kokkos::parallel_reduce( x.dimension_0() , DotM< VectorView , ValueView >( x , y , r , r_neg ) );
}
template< typename Scalar , class DeviceType >
struct ModifiedGramSchmidt
{
typedef DeviceType execution_space ;
typedef typename execution_space::size_type size_type ;
typedef Kokkos::View< Scalar** ,
Kokkos::LayoutLeft ,
execution_space > multivector_type ;
typedef Kokkos::View< Scalar* ,
Kokkos::LayoutLeft ,
execution_space > vector_type ;
typedef Kokkos::View< Scalar ,
Kokkos::LayoutLeft ,
execution_space > value_view ;
multivector_type Q ;
multivector_type R ;
static double factorization( const multivector_type Q_ ,
const multivector_type R_ )
{
-#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
- using Kokkos::Experimental::ALL ;
-#else
- const Kokkos::ALL ALL ;
-#endif
const size_type count = Q_.dimension_1();
value_view tmp("tmp");
value_view one("one");
Kokkos::deep_copy( one , (Scalar) 1 );
Kokkos::Impl::Timer timer ;
for ( size_type j = 0 ; j < count ; ++j ) {
// Reduction : tmp = dot( Q(:,j) , Q(:,j) );
// PostProcess : tmp = sqrt( tmp ); R(j,j) = tmp ; tmp = 1 / tmp ;
- const vector_type Qj = Kokkos::subview( Q_ , ALL , j );
+ const vector_type Qj = Kokkos::subview( Q_ , Kokkos::ALL() , j );
const value_view Rjj = Kokkos::subview( R_ , j , j );
invnorm2( Qj , Rjj , tmp );
// Q(:,j) *= ( 1 / R(j,j) ); => Q(:,j) *= tmp ;
Kokkos::scale( tmp , Qj );
for ( size_t k = j + 1 ; k < count ; ++k ) {
- const vector_type Qk = Kokkos::subview( Q_ , ALL , k );
+ const vector_type Qk = Kokkos::subview( Q_ , Kokkos::ALL() , k );
const value_view Rjk = Kokkos::subview( R_ , j , k );
// Reduction : R(j,k) = dot( Q(:,j) , Q(:,k) );
// PostProcess : tmp = - R(j,k);
dot_neg( Qj , Qk , Rjk , tmp );
// Q(:,k) -= R(j,k) * Q(:,j); => Q(:,k) += tmp * Q(:,j)
Kokkos::axpby( tmp , Qj , one , Qk );
}
}
execution_space::fence();
return timer.seconds();
}
//--------------------------------------------------------------------------
static double test( const size_t length ,
const size_t count ,
const size_t iter = 1 )
{
multivector_type Q_( "Q" , length , count );
multivector_type R_( "R" , count , count );
typename multivector_type::HostMirror A =
Kokkos::create_mirror( Q_ );
// Create and fill A on the host
for ( size_type j = 0 ; j < count ; ++j ) {
for ( size_type i = 0 ; i < length ; ++i ) {
A(i,j) = ( i + 1 ) * ( j + 1 );
}
}
double dt_min = 0 ;
for ( size_t i = 0 ; i < iter ; ++i ) {
Kokkos::deep_copy( Q_ , A );
// A = Q * R
const double dt = factorization( Q_ , R_ );
if ( 0 == i ) dt_min = dt ;
else dt_min = dt < dt_min ? dt : dt_min ;
}
return dt_min ;
}
};
}
diff --git a/lib/kokkos/core/perf_test/PerfTestHexGrad.hpp b/lib/kokkos/core/perf_test/PerfTestHexGrad.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/PerfTestHost.cpp b/lib/kokkos/core/perf_test/PerfTestHost.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/PerfTestMain.cpp b/lib/kokkos/core/perf_test/PerfTestMain.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/perf_test/test_atomic.cpp b/lib/kokkos/core/perf_test/test_atomic.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_View.hpp b/lib/kokkos/core/src/Cuda/KokkosExp_Cuda_View.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp b/lib/kokkos/core/src/Cuda/Kokkos_CudaExec.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
old mode 100755
new mode 100644
index 5b397845c..13316cb63
--- a/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
+++ b/lib/kokkos/core/src/Cuda/Kokkos_CudaSpace.cpp
@@ -1,670 +1,686 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <Kokkos_Macros.hpp>
/* only compile this file if CUDA is enabled for Kokkos */
#ifdef KOKKOS_HAVE_CUDA
#include <Kokkos_Cuda.hpp>
#include <Kokkos_CudaSpace.hpp>
#include <Cuda/Kokkos_Cuda_BasicAllocators.hpp>
#include <Cuda/Kokkos_Cuda_Internal.hpp>
#include <impl/Kokkos_Error.hpp>
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace Impl {
-DeepCopy<CudaSpace,CudaSpace>::DeepCopy( void * dst , const void * src , size_t n )
+namespace {
+ cudaStream_t get_deep_copy_stream() {
+ static cudaStream_t s = 0;
+ if( s == 0) {
+ cudaStreamCreate ( &s );
+ }
+ return s;
+ }
+}
+
+DeepCopy<CudaSpace,CudaSpace,Cuda>::DeepCopy( void * dst , const void * src , size_t n )
{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); }
-DeepCopy<CudaSpace,CudaSpace>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
-{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); }
+DeepCopy<HostSpace,CudaSpace,Cuda>::DeepCopy( void * dst , const void * src , size_t n )
+{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); }
-DeepCopy<HostSpace,CudaSpace>::DeepCopy( void * dst , const void * src , size_t n )
+DeepCopy<CudaSpace,HostSpace,Cuda>::DeepCopy( void * dst , const void * src , size_t n )
{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); }
-DeepCopy<HostSpace,CudaSpace>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
+DeepCopy<CudaSpace,CudaSpace,Cuda>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); }
-DeepCopy<CudaSpace,HostSpace>::DeepCopy( void * dst , const void * src , size_t n )
-{ CUDA_SAFE_CALL( cudaMemcpy( dst , src , n , cudaMemcpyDefault ) ); }
+DeepCopy<HostSpace,CudaSpace,Cuda>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
+{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); }
-DeepCopy<CudaSpace,HostSpace>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
+DeepCopy<CudaSpace,HostSpace,Cuda>::DeepCopy( const Cuda & instance , void * dst , const void * src , size_t n )
{ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , instance.cuda_stream() ) ); }
+void DeepCopyAsyncCuda( void * dst , const void * src , size_t n) {
+ cudaStream_t s = get_deep_copy_stream();
+ CUDA_SAFE_CALL( cudaMemcpyAsync( dst , src , n , cudaMemcpyDefault , s ) );
+ cudaStreamSynchronize(s);
+}
+
} // namespace Impl
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace {
void texture_object_attach_impl( Impl::AllocationTracker const & tracker
, unsigned type_size
, ::cudaChannelFormatDesc const & desc
)
{
enum { TEXTURE_BOUND_1D = 2u << 27 };
if ( tracker.attribute() == NULL ) {
// check for correct allocator
const bool ok_alloc = tracker.allocator()->support_texture_binding();
const bool ok_count = (tracker.alloc_size() / type_size) < TEXTURE_BOUND_1D;
if (ok_alloc && ok_count) {
Impl::TextureAttribute * attr = new Impl::TextureAttribute( tracker.alloc_ptr(), tracker.alloc_size(), desc );
tracker.set_attribute( attr );
}
else {
std::ostringstream oss;
oss << "Error: Cannot attach texture object";
if (!ok_alloc) {
oss << ", incompatabile allocator " << tracker.allocator()->name();
}
if (!ok_count) {
oss << ", array " << tracker.label() << " too large";
}
oss << ".";
Kokkos::Impl::throw_runtime_exception( oss.str() );
}
}
if ( NULL == dynamic_cast<Impl::TextureAttribute *>(tracker.attribute()) ) {
std::ostringstream oss;
oss << "Error: Allocation " << tracker.label() << " already has an attribute attached.";
Kokkos::Impl::throw_runtime_exception( oss.str() );
}
}
} // unnamed namespace
/*--------------------------------------------------------------------------*/
Impl::AllocationTracker CudaSpace::allocate_and_track( const std::string & label, const size_t size )
{
return Impl::AllocationTracker( allocator(), size, label);
}
void CudaSpace::texture_object_attach( Impl::AllocationTracker const & tracker
, unsigned type_size
, ::cudaChannelFormatDesc const & desc
)
{
texture_object_attach_impl( tracker, type_size, desc );
}
void CudaSpace::access_error()
{
const std::string msg("Kokkos::CudaSpace::access_error attempt to execute Cuda function from non-Cuda space" );
Kokkos::Impl::throw_runtime_exception( msg );
}
void CudaSpace::access_error( const void * const )
{
const std::string msg("Kokkos::CudaSpace::access_error attempt to execute Cuda function from non-Cuda space" );
Kokkos::Impl::throw_runtime_exception( msg );
}
/*--------------------------------------------------------------------------*/
Impl::AllocationTracker CudaUVMSpace::allocate_and_track( const std::string & label, const size_t size )
{
return Impl::AllocationTracker( allocator(), size, label);
}
void CudaUVMSpace::texture_object_attach( Impl::AllocationTracker const & tracker
, unsigned type_size
, ::cudaChannelFormatDesc const & desc
)
{
texture_object_attach_impl( tracker, type_size, desc );
}
bool CudaUVMSpace::available()
{
#if defined( CUDA_VERSION ) && ( 6000 <= CUDA_VERSION ) && !defined(__APPLE__)
enum { UVM_available = true };
#else
enum { UVM_available = false };
#endif
return UVM_available;
}
/*--------------------------------------------------------------------------*/
Impl::AllocationTracker CudaHostPinnedSpace::allocate_and_track( const std::string & label, const size_t size )
{
return Impl::AllocationTracker( allocator(), size, label);
}
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
CudaSpace::CudaSpace()
: m_device( Kokkos::Cuda().cuda_device() )
{
}
CudaUVMSpace::CudaUVMSpace()
: m_device( Kokkos::Cuda().cuda_device() )
{
}
CudaHostPinnedSpace::CudaHostPinnedSpace()
{
}
void * CudaSpace::allocate( const size_t arg_alloc_size ) const
{
void * ptr = NULL;
CUDA_SAFE_CALL( cudaMalloc( &ptr, arg_alloc_size ) );
return ptr ;
}
void * CudaUVMSpace::allocate( const size_t arg_alloc_size ) const
{
void * ptr = NULL;
CUDA_SAFE_CALL( cudaMallocManaged( &ptr, arg_alloc_size , cudaMemAttachGlobal ) );
return ptr ;
}
void * CudaHostPinnedSpace::allocate( const size_t arg_alloc_size ) const
{
void * ptr = NULL;
CUDA_SAFE_CALL( cudaHostAlloc( &ptr, arg_alloc_size , cudaHostAllocDefault ) );
return ptr ;
}
void CudaSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const
{
try {
CUDA_SAFE_CALL( cudaFree( arg_alloc_ptr ) );
} catch(...) {}
}
void CudaUVMSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const
{
try {
CUDA_SAFE_CALL( cudaFree( arg_alloc_ptr ) );
} catch(...) {}
}
void CudaHostPinnedSpace::deallocate( void * const arg_alloc_ptr , const size_t /* arg_alloc_size */ ) const
{
try {
CUDA_SAFE_CALL( cudaFreeHost( arg_alloc_ptr ) );
} catch(...) {}
}
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
SharedAllocationRecord< void , void >
SharedAllocationRecord< Kokkos::CudaSpace , void >::s_root_record ;
SharedAllocationRecord< void , void >
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::s_root_record ;
SharedAllocationRecord< void , void >
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::s_root_record ;
::cudaTextureObject_t
SharedAllocationRecord< Kokkos::CudaSpace , void >::
attach_texture_object( const unsigned sizeof_alias
, void * const alloc_ptr
, size_t const alloc_size )
{
// Only valid for 300 <= __CUDA_ARCH__
// otherwise return zero.
::cudaTextureObject_t tex_obj ;
struct cudaResourceDesc resDesc ;
struct cudaTextureDesc texDesc ;
memset( & resDesc , 0 , sizeof(resDesc) );
memset( & texDesc , 0 , sizeof(texDesc) );
resDesc.resType = cudaResourceTypeLinear ;
resDesc.res.linear.desc = ( sizeof_alias == 4 ? cudaCreateChannelDesc< int >() :
( sizeof_alias == 8 ? cudaCreateChannelDesc< ::int2 >() :
/* sizeof_alias == 16 */ cudaCreateChannelDesc< ::int4 >() ) );
resDesc.res.linear.sizeInBytes = alloc_size ;
resDesc.res.linear.devPtr = alloc_ptr ;
CUDA_SAFE_CALL( cudaCreateTextureObject( & tex_obj , & resDesc, & texDesc, NULL ) );
return tex_obj ;
}
std::string
SharedAllocationRecord< Kokkos::CudaSpace , void >::get_label() const
{
SharedAllocationHeader header ;
Kokkos::Impl::DeepCopy< Kokkos::HostSpace , Kokkos::CudaSpace >( & header , RecordBase::head() , sizeof(SharedAllocationHeader) );
return std::string( header.m_label );
}
std::string
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_label() const
{
return std::string( RecordBase::head()->m_label );
}
std::string
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_label() const
{
return std::string( RecordBase::head()->m_label );
}
SharedAllocationRecord< Kokkos::CudaSpace , void > *
SharedAllocationRecord< Kokkos::CudaSpace , void >::
allocate( const Kokkos::CudaSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
)
{
return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size );
}
SharedAllocationRecord< Kokkos::CudaUVMSpace , void > *
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
allocate( const Kokkos::CudaUVMSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
)
{
return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size );
}
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > *
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::
allocate( const Kokkos::CudaHostPinnedSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
)
{
return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size );
}
void
SharedAllocationRecord< Kokkos::CudaSpace , void >::
deallocate( SharedAllocationRecord< void , void > * arg_rec )
{
delete static_cast<SharedAllocationRecord*>(arg_rec);
}
void
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
deallocate( SharedAllocationRecord< void , void > * arg_rec )
{
delete static_cast<SharedAllocationRecord*>(arg_rec);
}
void
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::
deallocate( SharedAllocationRecord< void , void > * arg_rec )
{
delete static_cast<SharedAllocationRecord*>(arg_rec);
}
SharedAllocationRecord< Kokkos::CudaSpace , void >::
~SharedAllocationRecord()
{
m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr
, SharedAllocationRecord< void , void >::m_alloc_size
);
}
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
~SharedAllocationRecord()
{
m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr
, SharedAllocationRecord< void , void >::m_alloc_size
);
}
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::
~SharedAllocationRecord()
{
m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr
, SharedAllocationRecord< void , void >::m_alloc_size
);
}
SharedAllocationRecord< Kokkos::CudaSpace , void >::
SharedAllocationRecord( const Kokkos::CudaSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const SharedAllocationRecord< void , void >::function_type arg_dealloc
)
// Pass through allocated [ SharedAllocationHeader , user_memory ]
// Pass through deallocation function
: SharedAllocationRecord< void , void >
( & SharedAllocationRecord< Kokkos::CudaSpace , void >::s_root_record
, reinterpret_cast<SharedAllocationHeader*>( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) )
, sizeof(SharedAllocationHeader) + arg_alloc_size
, arg_dealloc
)
, m_tex_obj( 0 )
, m_space( arg_space )
{
SharedAllocationHeader header ;
// Fill in the Header information
header.m_record = static_cast< SharedAllocationRecord< void , void > * >( this );
strncpy( header.m_label
, arg_label.c_str()
, SharedAllocationHeader::maximum_label_length
);
// Copy to device memory
Kokkos::Impl::DeepCopy<CudaSpace,HostSpace>::DeepCopy( RecordBase::m_alloc_ptr , & header , sizeof(SharedAllocationHeader) );
}
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
SharedAllocationRecord( const Kokkos::CudaUVMSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const SharedAllocationRecord< void , void >::function_type arg_dealloc
)
// Pass through allocated [ SharedAllocationHeader , user_memory ]
// Pass through deallocation function
: SharedAllocationRecord< void , void >
( & SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::s_root_record
, reinterpret_cast<SharedAllocationHeader*>( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) )
, sizeof(SharedAllocationHeader) + arg_alloc_size
, arg_dealloc
)
, m_tex_obj( 0 )
, m_space( arg_space )
{
// Fill in the Header information, directly accessible via UVM
RecordBase::m_alloc_ptr->m_record = this ;
strncpy( RecordBase::m_alloc_ptr->m_label
, arg_label.c_str()
, SharedAllocationHeader::maximum_label_length
);
}
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::
SharedAllocationRecord( const Kokkos::CudaHostPinnedSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const SharedAllocationRecord< void , void >::function_type arg_dealloc
)
// Pass through allocated [ SharedAllocationHeader , user_memory ]
// Pass through deallocation function
: SharedAllocationRecord< void , void >
( & SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::s_root_record
, reinterpret_cast<SharedAllocationHeader*>( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) )
, sizeof(SharedAllocationHeader) + arg_alloc_size
, arg_dealloc
)
, m_space( arg_space )
{
// Fill in the Header information, directly accessible via UVM
RecordBase::m_alloc_ptr->m_record = this ;
strncpy( RecordBase::m_alloc_ptr->m_label
, arg_label.c_str()
, SharedAllocationHeader::maximum_label_length
);
}
SharedAllocationRecord< Kokkos::CudaSpace , void > *
SharedAllocationRecord< Kokkos::CudaSpace , void >::get_record( void * alloc_ptr )
{
using Header = SharedAllocationHeader ;
using RecordBase = SharedAllocationRecord< void , void > ;
using RecordCuda = SharedAllocationRecord< Kokkos::CudaSpace , void > ;
#if 0
// Copy the header from the allocation
SharedAllocationHeader head ;
SharedAllocationHeader const * const head_cuda = Header::get_header( alloc_ptr );
Kokkos::Impl::DeepCopy<HostSpace,CudaSpace>::DeepCopy( & head , head_cuda , sizeof(SharedAllocationHeader) );
RecordCuda * const record = static_cast< RecordCuda * >( head.m_record );
if ( record->m_alloc_ptr != head_cuda ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void >::get_record ERROR" ) );
}
#else
// Iterate the list to search for the record among all allocations
// requires obtaining the root of the list and then locking the list.
RecordCuda * const record = static_cast< RecordCuda * >( RecordBase::find( & s_root_record , alloc_ptr ) );
if ( record == 0 ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void >::get_record ERROR" ) );
}
#endif
return record ;
}
SharedAllocationRecord< Kokkos::CudaUVMSpace , void > *
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_record( void * alloc_ptr )
{
using Header = SharedAllocationHeader ;
using RecordCuda = SharedAllocationRecord< Kokkos::CudaUVMSpace , void > ;
Header * const h = reinterpret_cast< Header * >( alloc_ptr ) - 1 ;
if ( h->m_record->m_alloc_ptr != h ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::get_record ERROR" ) );
}
return static_cast< RecordCuda * >( h->m_record );
}
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > *
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_record( void * alloc_ptr )
{
using Header = SharedAllocationHeader ;
using RecordCuda = SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void > ;
Header * const h = reinterpret_cast< Header * >( alloc_ptr ) - 1 ;
if ( h->m_record->m_alloc_ptr != h ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::get_record ERROR" ) );
}
return static_cast< RecordCuda * >( h->m_record );
}
// Iterate records to print orphaned memory ...
void
SharedAllocationRecord< Kokkos::CudaSpace , void >::
print_records( std::ostream & s , const Kokkos::CudaSpace & space , bool detail )
{
SharedAllocationRecord< void , void > * r = & s_root_record ;
char buffer[256] ;
SharedAllocationHeader head ;
if ( detail ) {
do {
if ( r->m_alloc_ptr ) {
Kokkos::Impl::DeepCopy<HostSpace,CudaSpace>::DeepCopy( & head , r->m_alloc_ptr , sizeof(SharedAllocationHeader) );
}
else {
head.m_label[0] = 0 ;
}
snprintf( buffer , 256 , "Cuda addr( 0x%.12lx ) list( 0x%.12lx 0x%.12lx ) extent[ 0x%.12lx + %.8ld ] count(%d) dealloc(0x%.12lx) %s\n"
, reinterpret_cast<unsigned long>( r )
, reinterpret_cast<unsigned long>( r->m_prev )
, reinterpret_cast<unsigned long>( r->m_next )
, reinterpret_cast<unsigned long>( r->m_alloc_ptr )
, r->m_alloc_size
, r->m_count
, reinterpret_cast<unsigned long>( r->m_dealloc )
, head.m_label
);
std::cout << buffer ;
r = r->m_next ;
} while ( r != & s_root_record );
}
else {
do {
if ( r->m_alloc_ptr ) {
Kokkos::Impl::DeepCopy<HostSpace,CudaSpace>::DeepCopy( & head , r->m_alloc_ptr , sizeof(SharedAllocationHeader) );
snprintf( buffer , 256 , "Cuda [ 0x%.12lx + %ld ] %s\n"
, reinterpret_cast< unsigned long >( r->data() )
, r->size()
, head.m_label
);
}
else {
snprintf( buffer , 256 , "Cuda [ 0 + 0 ]\n" );
}
std::cout << buffer ;
r = r->m_next ;
} while ( r != & s_root_record );
}
}
void
SharedAllocationRecord< Kokkos::CudaUVMSpace , void >::
print_records( std::ostream & s , const Kokkos::CudaUVMSpace & space , bool detail )
{
SharedAllocationRecord< void , void >::print_host_accessible_records( s , "CudaUVM" , & s_root_record , detail );
}
void
SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >::
print_records( std::ostream & s , const Kokkos::CudaHostPinnedSpace & space , bool detail )
{
SharedAllocationRecord< void , void >::print_host_accessible_records( s , "CudaHostPinned" , & s_root_record , detail );
}
} // namespace Impl
} // namespace Experimental
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace {
__global__ void init_lock_array_kernel() {
unsigned i = blockIdx.x*blockDim.x + threadIdx.x;
if(i<CUDA_SPACE_ATOMIC_MASK+1)
kokkos_impl_cuda_atomic_lock_array[i] = 0;
}
}
namespace Impl {
int* lock_array_cuda_space_ptr(bool deallocate) {
static int* ptr = NULL;
if(deallocate) {
cudaFree(ptr);
ptr = NULL;
}
if(ptr==NULL && !deallocate)
cudaMalloc(&ptr,sizeof(int)*(CUDA_SPACE_ATOMIC_MASK+1));
return ptr;
}
void init_lock_array_cuda_space() {
int is_initialized = 0;
if(! is_initialized) {
int* lock_array_ptr = lock_array_cuda_space_ptr();
cudaMemcpyToSymbol( kokkos_impl_cuda_atomic_lock_array , & lock_array_ptr , sizeof(int*) );
init_lock_array_kernel<<<(CUDA_SPACE_ATOMIC_MASK+255)/256,256>>>();
}
}
}
}
#endif // KOKKOS_HAVE_CUDA
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Alloc.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BasicAllocators.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BasicAllocators.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BasicAllocators.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_BasicAllocators.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Error.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Impl.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Internal.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
old mode 100755
new mode 100644
index ce33c978c..3aea9be1d
--- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
+++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Parallel.hpp
@@ -1,1799 +1,1862 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_CUDA_PARALLEL_HPP
#define KOKKOS_CUDA_PARALLEL_HPP
#include <iostream>
#include <stdio.h>
#include <Kokkos_Macros.hpp>
/* only compile this file if CUDA is enabled for Kokkos */
#if defined( __CUDACC__ ) && defined( KOKKOS_HAVE_CUDA )
#include <utility>
#include <Kokkos_Parallel.hpp>
#include <Cuda/Kokkos_CudaExec.hpp>
#include <Cuda/Kokkos_Cuda_ReduceScan.hpp>
#include <Cuda/Kokkos_Cuda_Internal.hpp>
#include <Kokkos_Vectorization.hpp>
#ifdef KOKKOSP_ENABLE_PROFILING
#include <impl/Kokkos_Profiling_Interface.hpp>
#include <typeinfo>
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< typename Type >
struct CudaJoinFunctor {
typedef Type value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
volatile const value_type & input )
{ update += input ; }
};
class CudaTeamMember {
private:
typedef Kokkos::Cuda execution_space ;
typedef execution_space::scratch_memory_space scratch_memory_space ;
void * m_team_reduce ;
scratch_memory_space m_team_shared ;
int m_league_rank ;
int m_league_size ;
public:
#if defined( __CUDA_ARCH__ )
__device__ inline
const execution_space::scratch_memory_space & team_shmem() const
{ return m_team_shared ; }
__device__ inline int league_rank() const { return m_league_rank ; }
__device__ inline int league_size() const { return m_league_size ; }
__device__ inline int team_rank() const { return threadIdx.y ; }
__device__ inline int team_size() const { return blockDim.y ; }
__device__ inline void team_barrier() const { __syncthreads(); }
template<class ValueType>
__device__ inline void team_broadcast(ValueType& value, const int& thread_id) const {
__shared__ ValueType sh_val;
if(threadIdx.x == 0 && threadIdx.y == thread_id) {
sh_val = val;
}
team_barrier();
val = sh_val;
}
#ifdef KOKKOS_HAVE_CXX11
template< class ValueType, class JoinOp >
__device__ inline
typename JoinOp::value_type team_reduce( const ValueType & value
, const JoinOp & op_in ) const
{
typedef JoinLambdaAdapter<ValueType,JoinOp> JoinOpFunctor ;
const JoinOpFunctor op(op_in);
ValueType * const base_data = (ValueType *) m_team_reduce ;
#else
template< class JoinOp >
__device__ inline
typename JoinOp::value_type team_reduce( const typename JoinOp::value_type & value
, const JoinOp & op ) const
{
typedef JoinOp JoinOpFunctor ;
typename JoinOp::value_type * const base_data = (typename JoinOp::value_type *) m_team_reduce ;
#endif
__syncthreads(); // Don't write in to shared data until all threads have entered this function
if ( 0 == threadIdx.y ) { base_data[0] = 0 ; }
base_data[ threadIdx.y ] = value ;
Impl::cuda_intra_block_reduce_scan<false,JoinOpFunctor,void>( op , base_data );
return base_data[ blockDim.y - 1 ];
}
/** \brief Intra-team exclusive prefix sum with team_rank() ordering
* with intra-team non-deterministic ordering accumulation.
*
* The global inter-team accumulation value will, at the end of the
* league's parallel execution, be the scan's total.
* Parallel execution ordering of the league's teams is non-deterministic.
* As such the base value for each team's scan operation is similarly
* non-deterministic.
*/
template< typename Type >
__device__ inline Type team_scan( const Type & value , Type * const global_accum ) const
{
Type * const base_data = (Type *) m_team_reduce ;
__syncthreads(); // Don't write in to shared data until all threads have entered this function
if ( 0 == threadIdx.y ) { base_data[0] = 0 ; }
base_data[ threadIdx.y + 1 ] = value ;
Impl::cuda_intra_block_reduce_scan<true,Impl::CudaJoinFunctor<Type>,void>( Impl::CudaJoinFunctor<Type>() , base_data + 1 );
if ( global_accum ) {
if ( blockDim.y == threadIdx.y + 1 ) {
base_data[ blockDim.y ] = atomic_fetch_add( global_accum , base_data[ blockDim.y ] );
}
__syncthreads(); // Wait for atomic
base_data[ threadIdx.y ] += base_data[ blockDim.y ] ;
}
return base_data[ threadIdx.y ];
}
/** \brief Intra-team exclusive prefix sum with team_rank() ordering.
*
* The highest rank thread can compute the reduction total as
* reduction_total = dev.team_scan( value ) + value ;
*/
template< typename Type >
__device__ inline Type team_scan( const Type & value ) const
{ return this->template team_scan<Type>( value , 0 ); }
//----------------------------------------
// Private for the driver
__device__ inline
CudaTeamMember( void * shared
, const int shared_begin
, const int shared_size
, const int arg_league_rank
, const int arg_league_size )
: m_team_reduce( shared )
, m_team_shared( ((char *)shared) + shared_begin , shared_size )
, m_league_rank( arg_league_rank )
, m_league_size( arg_league_size )
{}
#else
const execution_space::scratch_memory_space & team_shmem() const {return m_team_shared;}
int league_rank() const {return 0;}
int league_size() const {return 1;}
int team_rank() const {return 0;}
int team_size() const {return 1;}
void team_barrier() const {}
template<class ValueType>
void team_broadcast(ValueType& value, const int& thread_id) const {}
template< class JoinOp >
typename JoinOp::value_type team_reduce( const typename JoinOp::value_type & value
, const JoinOp & op ) const {return typename JoinOp::value_type();}
template< typename Type >
Type team_scan( const Type & value , Type * const global_accum ) const {return Type();}
template< typename Type >
Type team_scan( const Type & value ) const {return Type();}
//----------------------------------------
// Private for the driver
CudaTeamMember( void * shared
, const int shared_begin
, const int shared_end
, const int arg_league_rank
, const int arg_league_size );
#endif /* #if ! defined( __CUDA_ARCH__ ) */
};
} // namespace Impl
template< class Arg0 , class Arg1 >
class TeamPolicy< Arg0 , Arg1 , Kokkos::Cuda >
{
private:
enum { MAX_WARP = 8 };
const int m_league_size ;
const int m_team_size ;
const int m_vector_length ;
public:
//! Tag this class as a kokkos execution policy
typedef TeamPolicy execution_policy ;
//! Execution space of this execution policy
typedef Kokkos::Cuda execution_space ;
typedef typename
Impl::if_c< ! Impl::is_same< Kokkos::Cuda , Arg0 >::value , Arg0 , Arg1 >::type
work_tag ;
//----------------------------------------
template< class FunctorType >
inline static
int team_size_max( const FunctorType & functor )
{
int n = MAX_WARP * Impl::CudaTraits::WarpSize ;
for ( ; n ; n >>= 1 ) {
const int shmem_size =
/* for global reduce */ Impl::cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,work_tag>( functor , n )
/* for team reduce */ + ( n + 2 ) * sizeof(double)
/* for team shared */ + Impl::FunctorTeamShmemSize< FunctorType >::value( functor , n );
if ( shmem_size < Impl::CudaTraits::SharedMemoryCapacity ) break ;
}
return n ;
}
template< class FunctorType >
static int team_size_recommended( const FunctorType & functor )
{ return team_size_max( functor ); }
template< class FunctorType >
static int team_size_recommended( const FunctorType & functor , const int vector_length)
{
int max = team_size_max( functor )/vector_length;
if(max<1) max = 1;
return max;
}
inline static
int vector_length_max()
{ return Impl::CudaTraits::WarpSize; }
//----------------------------------------
inline int vector_length() const { return m_vector_length ; }
inline int team_size() const { return m_team_size ; }
inline int league_size() const { return m_league_size ; }
/** \brief Specify league size, request team size */
TeamPolicy( execution_space & , int league_size_ , int team_size_request , int vector_length_request = 1 )
: m_league_size( league_size_ )
, m_team_size( team_size_request )
, m_vector_length ( vector_length_request )
{
// Allow only power-of-two vector_length
int check = 0;
for(int k = 1; k <= vector_length_max(); k*=2)
if(k == vector_length_request)
check = 1;
if(!check)
Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
// Make sure league size is permissable
if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
}
TeamPolicy( int league_size_ , int team_size_request , int vector_length_request = 1 )
: m_league_size( league_size_ )
, m_team_size( team_size_request )
, m_vector_length ( vector_length_request )
{
// Allow only power-of-two vector_length
int check = 0;
for(int k = 1; k <= vector_length_max(); k*=2)
if(k == vector_length_request)
check = 1;
if(!check)
Impl::throw_runtime_exception( "Requested non-power-of-two vector length for TeamPolicy.");
// Make sure league size is permissable
if(league_size_ >= int(Impl::cuda_internal_maximum_grid_count()))
Impl::throw_runtime_exception( "Requested too large league_size for TeamPolicy on Cuda execution space.");
}
typedef Kokkos::Impl::CudaTeamMember member_type ;
};
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class Arg0 , class Arg1 , class Arg2 >
class ParallelFor< FunctorType , Kokkos::RangePolicy< Arg0 , Arg1 , Arg2 , Kokkos::Cuda > >
{
private:
typedef Kokkos::RangePolicy< Arg0 , Arg1 , Arg2 , Kokkos::Cuda > Policy ;
const FunctorType m_functor ;
const Policy m_policy ;
ParallelFor();
ParallelFor & operator = ( const ParallelFor & );
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
)
{ functor( iwork ); }
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< ! Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
)
{ functor( Tag() , iwork ); }
public:
typedef FunctorType functor_type ;
inline
__device__
void operator()(void) const
{
const typename Policy::member_type work_stride = blockDim.y * gridDim.x ;
const typename Policy::member_type work_end = m_policy.end();
for ( typename Policy::member_type
iwork = m_policy.begin() + threadIdx.y + blockDim.y * blockIdx.x ;
iwork < work_end ;
iwork += work_stride ) {
ParallelFor::template driver< typename Policy::work_tag >( m_functor, iwork );
}
}
ParallelFor( const FunctorType & functor ,
const Policy & policy )
: m_functor( functor )
, m_policy( policy )
{
const dim3 block( 1 , CudaTraits::WarpSize * cuda_internal_maximum_warp_count(), 1);
const dim3 grid( std::min( ( int( policy.end() - policy.begin() ) + block.y - 1 ) / block.y
, cuda_internal_maximum_grid_count() )
, 1 , 1);
CudaParallelLaunch< ParallelFor >( *this , grid , block , 0 );
}
};
template< class FunctorType , class Arg0 , class Arg1 >
class ParallelFor< FunctorType , Kokkos::TeamPolicy< Arg0 , Arg1 , Kokkos::Cuda > >
{
private:
typedef Kokkos::TeamPolicy< Arg0 , Arg1 , Kokkos::Cuda > Policy ;
public:
typedef FunctorType functor_type ;
typedef Cuda::size_type size_type ;
private:
// Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == blockDim.z == 1
// shared memory utilization:
//
// [ team reduce space ]
// [ team shared space ]
//
const FunctorType m_functor ;
size_type m_shmem_begin ;
size_type m_shmem_size ;
size_type m_league_size ;
template< class TagType >
__device__ inline
void driver( typename Impl::enable_if< Impl::is_same< TagType , void >::value ,
const typename Policy::member_type & >::type member ) const
{ m_functor( member ); }
template< class TagType >
__device__ inline
void driver( typename Impl::enable_if< ! Impl::is_same< TagType , void >::value ,
const typename Policy::member_type & >::type member ) const
{ m_functor( TagType() , member ); }
public:
__device__ inline
void operator()(void) const
{
// Iterate this block through the league
for ( int league_rank = blockIdx.x ; league_rank < m_league_size ; league_rank += gridDim.x ) {
ParallelFor::template driver< typename Policy::work_tag >(
typename Policy::member_type( kokkos_impl_cuda_shared_memory<void>()
, m_shmem_begin
, m_shmem_size
, league_rank
, m_league_size ) );
}
}
ParallelFor( const FunctorType & functor
, const Policy & policy
)
: m_functor( functor )
, m_shmem_begin( sizeof(double) * ( policy.team_size() + 2 ) )
, m_shmem_size( FunctorTeamShmemSize< FunctorType >::value( functor , policy.team_size() ) )
, m_league_size( policy.league_size() )
{
// Functor's reduce memory, team scan memory, and team shared memory depend upon team size.
const int shmem_size_total = m_shmem_begin + m_shmem_size ;
if ( CudaTraits::SharedMemoryCapacity < shmem_size_total ) {
Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelFor< Cuda > insufficient shared memory"));
}
const dim3 grid( int(policy.league_size()) , 1 , 1 );
const dim3 block( policy.vector_length() , policy.team_size() , 1 );
CudaParallelLaunch< ParallelFor >( *this, grid, block, shmem_size_total ); // copy to device and execute
}
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class Arg0 , class Arg1 , class Arg2 >
class ParallelReduce< FunctorType , Kokkos::RangePolicy< Arg0 , Arg1 , Arg2 , Kokkos::Cuda > >
{
private:
typedef Kokkos::RangePolicy<Arg0,Arg1,Arg2, Kokkos::Cuda > Policy ;
typedef typename Policy::WorkRange work_range ;
typedef typename Policy::work_tag work_tag ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueInit< FunctorType , work_tag > ValueInit ;
public:
typedef typename ValueTraits::pointer_type pointer_type ;
typedef typename ValueTraits::value_type value_type ;
typedef typename ValueTraits::reference_type reference_type ;
typedef FunctorType functor_type ;
typedef Cuda::size_type size_type ;
// Algorithmic constraints: blockSize is a power of two AND blockDim.y == blockDim.z == 1
const FunctorType m_functor ;
const Policy m_policy ;
size_type * m_scratch_space ;
size_type * m_scratch_flags ;
size_type * m_unified_space ;
// Determine block size constrained by shared memory:
static inline
unsigned local_block_size( const FunctorType & f )
{
unsigned n = CudaTraits::WarpSize * 8 ;
while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,work_tag>( f , n ) ) { n >>= 1 ; }
return n ;
}
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
, reference_type value )
{ functor( iwork , value ); }
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< ! Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
, reference_type value )
{ functor( Tag() , iwork , value ); }
#ifndef KOKKOS_EXPERIMENTAL_CUDA_SHFL_REDUCTION
__device__ inline
void operator()(void) const
{
const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) >
word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) );
{
reference_type value =
ValueInit::init( m_functor , kokkos_impl_cuda_shared_memory<size_type>() + threadIdx.y * word_count.value );
// Number of blocks is bounded so that the reduction can be limited to two passes.
// Each thread block is given an approximately equal amount of work to perform.
// Accumulate the values for this block.
// The accumulation ordering does not match the final pass, but is arithmatically equivalent.
const work_range range( m_policy , blockIdx.x , gridDim.x );
for ( typename work_range::member_type iwork = range.begin() + threadIdx.y , iwork_end = range.end() ;
iwork < iwork_end ; iwork += blockDim.y ) {
ParallelReduce::template driver< work_tag >( m_functor , iwork , value );
}
}
// Reduce with final value at blockDim.y - 1 location.
if ( cuda_single_inter_block_reduce_scan<false,FunctorType,work_tag>(
m_functor , blockIdx.x , gridDim.x ,
kokkos_impl_cuda_shared_memory<size_type>() , m_scratch_space , m_scratch_flags ) ) {
// This is the final block with the final result at the final threads' location
size_type * const shared = kokkos_impl_cuda_shared_memory<size_type>() + ( blockDim.y - 1 ) * word_count.value ;
size_type * const global = m_unified_space ? m_unified_space : m_scratch_space ;
if ( threadIdx.y == 0 ) {
Kokkos::Impl::FunctorFinal< FunctorType , work_tag >::final( m_functor , shared );
}
if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); }
for ( unsigned i = threadIdx.y ; i < word_count.value ; i += blockDim.y ) { global[i] = shared[i]; }
}
}
#else
__device__ inline
void operator()(void) const
{
value_type value = 0;
// Number of blocks is bounded so that the reduction can be limited to two passes.
// Each thread block is given an approximately equal amount of work to perform.
// Accumulate the values for this block.
// The accumulation ordering does not match the final pass, but is arithmatically equivalent.
const Policy range( m_policy , blockIdx.x , gridDim.x );
for ( typename Policy::member_type iwork = range.begin() + threadIdx.y , iwork_end = range.end() ;
iwork < iwork_end ; iwork += blockDim.y ) {
ParallelReduce::template driver< work_tag >( m_functor , iwork , value );
}
pointer_type const result = (pointer_type) (m_unified_space ? m_unified_space : m_scratch_space) ;
int max_active_thread = range.end()-range.begin() < blockDim.y ? range.end() - range.begin():blockDim.y;
max_active_thread = max_active_thread == 0?blockDim.y:max_active_thread;
if(Impl::cuda_inter_block_reduction<FunctorType,Impl::JoinAdd<value_type> >
(value,Impl::JoinAdd<value_type>(),m_scratch_space,result,m_scratch_flags,max_active_thread)) {
const unsigned id = threadIdx.y*blockDim.x + threadIdx.x;
if(id==0) {
Kokkos::Impl::FunctorFinal< FunctorType , work_tag >::final( m_functor , (void*) &value );
*result = value;
}
}
}
#endif
template< class HostViewType >
ParallelReduce( const FunctorType & functor
, const Policy & policy
, const HostViewType & result
)
: m_functor( functor )
, m_policy( policy )
, m_scratch_space( 0 )
, m_scratch_flags( 0 )
, m_unified_space( 0 )
{
const int block_size = local_block_size( functor );
const int block_count = std::min( int(block_size)
, ( int(policy.end() - policy.begin()) + block_size - 1 ) / block_size
);
m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( functor ) * block_count );
m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) );
m_unified_space = cuda_internal_scratch_unified( ValueTraits::value_size( functor ) );
const dim3 grid( block_count , 1 , 1 );
const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 )
#ifdef KOKKOS_EXPERIMENTAL_CUDA_SHFL_REDUCTION
const int shmem = 0;
#else
const int shmem = cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,work_tag>( m_functor , block.y );
#endif
CudaParallelLaunch< ParallelReduce >( *this, grid, block, shmem ); // copy to device and execute
Cuda::fence();
if ( result.ptr_on_device() ) {
if ( m_unified_space ) {
const int count = ValueTraits::value_count( m_functor );
for ( int i = 0 ; i < count ; ++i ) { result.ptr_on_device()[i] = pointer_type(m_unified_space)[i] ; }
}
else {
const int size = ValueTraits::value_size( m_functor );
DeepCopy<HostSpace,CudaSpace>( result.ptr_on_device() , m_scratch_space , size );
}
}
}
};
template< class FunctorType , class Arg0 , class Arg1 >
class ParallelReduce< FunctorType , Kokkos::TeamPolicy< Arg0 , Arg1 , Kokkos::Cuda > >
{
private:
typedef Kokkos::TeamPolicy<Arg0,Arg1,Kokkos::Cuda> Policy ;
typedef typename Policy::work_tag work_tag ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueInit< FunctorType , work_tag > ValueInit ;
typedef typename ValueTraits::pointer_type pointer_type ;
typedef typename ValueTraits::reference_type reference_type ;
public:
typedef FunctorType functor_type ;
typedef Cuda::size_type size_type ;
private:
// Algorithmic constraints: blockDim.y is a power of two AND blockDim.y == blockDim.z == 1
// shared memory utilization:
//
// [ global reduce space ]
// [ team reduce space ]
// [ team shared space ]
//
const FunctorType m_functor ;
size_type * m_scratch_space ;
size_type * m_scratch_flags ;
size_type * m_unified_space ;
size_type m_team_begin ;
size_type m_shmem_begin ;
size_type m_shmem_size ;
size_type m_league_size ;
template< class TagType >
__device__ inline
void driver( typename Impl::enable_if< Impl::is_same< TagType , void >::value ,
const typename Policy::member_type & >::type member
, reference_type update ) const
{ m_functor( member , update ); }
template< class TagType >
__device__ inline
void driver( typename Impl::enable_if< ! Impl::is_same< TagType , void >::value ,
const typename Policy::member_type & >::type member
, reference_type update ) const
{ m_functor( TagType() , member , update ); }
public:
__device__ inline
void operator()(void) const
{
const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) >
word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) );
reference_type value =
ValueInit::init( m_functor , kokkos_impl_cuda_shared_memory<size_type>() + threadIdx.y * word_count.value );
// Iterate this block through the league
for ( int league_rank = blockIdx.x ; league_rank < m_league_size ; league_rank += gridDim.x ) {
ParallelReduce::template driver< work_tag >
( typename Policy::member_type( kokkos_impl_cuda_shared_memory<char>() + m_team_begin
, m_shmem_begin
, m_shmem_size
, league_rank
, m_league_size )
, value );
}
// Reduce with final value at blockDim.y - 1 location.
if ( cuda_single_inter_block_reduce_scan<false,FunctorType,work_tag>(
m_functor , blockIdx.x , gridDim.x ,
kokkos_impl_cuda_shared_memory<size_type>() , m_scratch_space , m_scratch_flags ) ) {
// This is the final block with the final result at the final threads' location
size_type * const shared = kokkos_impl_cuda_shared_memory<size_type>() + ( blockDim.y - 1 ) * word_count.value ;
size_type * const global = m_unified_space ? m_unified_space : m_scratch_space ;
if ( threadIdx.y == 0 ) {
Kokkos::Impl::FunctorFinal< FunctorType , work_tag >::final( m_functor , shared );
}
if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); }
for ( unsigned i = threadIdx.y ; i < word_count.value ; i += blockDim.y ) { global[i] = shared[i]; }
}
}
template< class HostViewType >
ParallelReduce( const FunctorType & functor
, const Policy & policy
, const HostViewType & result
)
: m_functor( functor )
, m_scratch_space( 0 )
, m_scratch_flags( 0 )
, m_unified_space( 0 )
, m_team_begin( cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,work_tag>( functor , policy.team_size() ) )
, m_shmem_begin( sizeof(double) * ( policy.team_size() + 2 ) )
, m_shmem_size( FunctorTeamShmemSize< FunctorType >::value( functor , policy.team_size() ) )
, m_league_size( policy.league_size() )
{
// The global parallel_reduce does not support vector_length other than 1 at the moment
if(policy.vector_length() > 1)
Impl::throw_runtime_exception( "Kokkos::parallel_reduce with a TeamPolicy using a vector length of greater than 1 is not currently supported for CUDA.");
// Functor's reduce memory, team scan memory, and team shared memory depend upon team size.
const int shmem_size_total = m_team_begin + m_shmem_begin + m_shmem_size ;
const int not_power_of_two = 0 != ( policy.team_size() & ( policy.team_size() - 1 ) );
if ( not_power_of_two || CudaTraits::SharedMemoryCapacity < shmem_size_total ) {
Kokkos::Impl::throw_runtime_exception(std::string("Kokkos::Impl::ParallelReduce< Cuda > bad team size"));
}
const int block_count = std::min( policy.league_size() , policy.team_size() );
m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( functor ) * block_count );
m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) );
m_unified_space = cuda_internal_scratch_unified( ValueTraits::value_size( functor ) );
const dim3 grid( block_count , 1 , 1 );
const dim3 block( 1 , policy.team_size() , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 )
CudaParallelLaunch< ParallelReduce >( *this, grid, block, shmem_size_total ); // copy to device and execute
Cuda::fence();
if ( result.ptr_on_device() ) {
if ( m_unified_space ) {
const int count = ValueTraits::value_count( m_functor );
for ( int i = 0 ; i < count ; ++i ) { result.ptr_on_device()[i] = pointer_type(m_unified_space)[i] ; }
}
else {
const int size = ValueTraits::value_size( m_functor );
DeepCopy<HostSpace,CudaSpace>( result.ptr_on_device() , m_scratch_space , size );
}
}
}
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class Arg0 , class Arg1 , class Arg2 >
class ParallelScan< FunctorType , Kokkos::RangePolicy< Arg0 , Arg1 , Arg2 , Kokkos::Cuda > >
{
private:
typedef Kokkos::RangePolicy<Arg0,Arg1,Arg2, Kokkos::Cuda > Policy ;
typedef typename Policy::WorkRange work_range ;
typedef typename Policy::work_tag work_tag ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueInit< FunctorType , work_tag > ValueInit ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , work_tag > ValueOps ;
public:
typedef typename ValueTraits::pointer_type pointer_type ;
typedef typename ValueTraits::reference_type reference_type ;
typedef FunctorType functor_type ;
typedef Cuda::size_type size_type ;
// Algorithmic constraints:
// (a) blockDim.y is a power of two
// (b) blockDim.y == blockDim.z == 1
// (c) gridDim.x <= blockDim.y * blockDim.y
// (d) gridDim.y == gridDim.z == 1
// Determine block size constrained by shared memory:
static inline
unsigned local_block_size( const FunctorType & f )
{
// blockDim.y must be power of two = 128 (4 warps) or 256 (8 warps) or 512 (16 warps)
// gridDim.x <= blockDim.y * blockDim.y
//
// 4 warps was 10% faster than 8 warps and 20% faster than 16 warps in unit testing
unsigned n = CudaTraits::WarpSize * 4 ;
while ( n && CudaTraits::SharedMemoryCapacity < cuda_single_inter_block_reduce_scan_shmem<false,FunctorType,work_tag>( f , n ) ) { n >>= 1 ; }
return n ;
}
const FunctorType m_functor ;
const Policy m_policy ;
size_type * m_scratch_space ;
size_type * m_scratch_flags ;
size_type m_final ;
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
, reference_type value
, const bool final )
{ functor( iwork , value , final ); }
template< class Tag >
inline static
__device__
void driver( const FunctorType & functor
, typename Impl::enable_if< ! Impl::is_same< Tag , void >::value
, typename Policy::member_type const & >::type iwork
, reference_type value
, const bool final )
{ functor( Tag() , iwork , value , final ); }
//----------------------------------------
__device__ inline
void initial(void) const
{
const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) >
word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) );
size_type * const shared_value = kokkos_impl_cuda_shared_memory<size_type>() + word_count.value * threadIdx.y ;
ValueInit::init( m_functor , shared_value );
// Number of blocks is bounded so that the reduction can be limited to two passes.
// Each thread block is given an approximately equal amount of work to perform.
// Accumulate the values for this block.
// The accumulation ordering does not match the final pass, but is arithmatically equivalent.
const work_range range( m_policy , blockIdx.x , gridDim.x );
for ( typename Policy::member_type iwork = range.begin() + threadIdx.y , iwork_end = range.end() ;
iwork < iwork_end ; iwork += blockDim.y ) {
ParallelScan::template driver< work_tag >
( m_functor , iwork , ValueOps::reference( shared_value ) , false );
}
// Reduce and scan, writing out scan of blocks' totals and block-groups' totals.
// Blocks' scan values are written to 'blockIdx.x' location.
// Block-groups' scan values are at: i = ( j * blockDim.y - 1 ) for i < gridDim.x
cuda_single_inter_block_reduce_scan<true,FunctorType,work_tag>( m_functor , blockIdx.x , gridDim.x , kokkos_impl_cuda_shared_memory<size_type>() , m_scratch_space , m_scratch_flags );
}
//----------------------------------------
__device__ inline
void final(void) const
{
const integral_nonzero_constant< size_type , ValueTraits::StaticValueSize / sizeof(size_type) >
word_count( ValueTraits::value_size( m_functor ) / sizeof(size_type) );
// Use shared memory as an exclusive scan: { 0 , value[0] , value[1] , value[2] , ... }
size_type * const shared_data = kokkos_impl_cuda_shared_memory<size_type>();
size_type * const shared_prefix = shared_data + word_count.value * threadIdx.y ;
size_type * const shared_accum = shared_data + word_count.value * ( blockDim.y + 1 );
// Starting value for this thread block is the previous block's total.
if ( blockIdx.x ) {
size_type * const block_total = m_scratch_space + word_count.value * ( blockIdx.x - 1 );
for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i] ; }
}
else if ( 0 == threadIdx.y ) {
ValueInit::init( m_functor , shared_accum );
}
const work_range range( m_policy , blockIdx.x , gridDim.x );
for ( typename Policy::member_type iwork_base = range.begin(); iwork_base < range.end() ; iwork_base += blockDim.y ) {
const typename Policy::member_type iwork = iwork_base + threadIdx.y ;
__syncthreads(); // Don't overwrite previous iteration values until they are used
ValueInit::init( m_functor , shared_prefix + word_count.value );
// Copy previous block's accumulation total into thread[0] prefix and inclusive scan value of this block
for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) {
shared_data[i + word_count.value] = shared_data[i] = shared_accum[i] ;
}
if ( CudaTraits::WarpSize < word_count.value ) { __syncthreads(); } // Protect against large scan values.
// Call functor to accumulate inclusive scan value for this work item
if ( iwork < range.end() ) {
ParallelScan::template driver< work_tag >
( m_functor , iwork , ValueOps::reference( shared_prefix + word_count.value ) , false );
}
// Scan block values into locations shared_data[1..blockDim.y]
cuda_intra_block_reduce_scan<true,FunctorType,work_tag>( m_functor , ValueTraits::pointer_type(shared_data+word_count.value) );
{
size_type * const block_total = shared_data + word_count.value * blockDim.y ;
for ( unsigned i = threadIdx.y ; i < word_count.value ; ++i ) { shared_accum[i] = block_total[i]; }
}
// Call functor with exclusive scan value
if ( iwork < range.end() ) {
ParallelScan::template driver< work_tag >
( m_functor , iwork , ValueOps::reference( shared_prefix ) , true );
}
}
}
//----------------------------------------
__device__ inline
void operator()(void) const
{
if ( ! m_final ) {
initial();
}
else {
final();
}
}
ParallelScan( const FunctorType & functor ,
const Policy & policy )
: m_functor( functor )
, m_policy( policy )
, m_scratch_space( 0 )
, m_scratch_flags( 0 )
, m_final( false )
{
enum { GridMaxComputeCapability_2x = 0x0ffff };
const int block_size = local_block_size( functor );
const int grid_max = ( block_size * block_size ) < GridMaxComputeCapability_2x ?
( block_size * block_size ) : GridMaxComputeCapability_2x ;
// At most 'max_grid' blocks:
const int nwork = policy.end() - policy.begin();
const int max_grid = std::min( int(grid_max) , int(( nwork + block_size - 1 ) / block_size ));
// How much work per block:
const int work_per_block = ( nwork + max_grid - 1 ) / max_grid ;
// How many block are really needed for this much work:
const dim3 grid( ( nwork + work_per_block - 1 ) / work_per_block , 1 , 1 );
const dim3 block( 1 , block_size , 1 ); // REQUIRED DIMENSIONS ( 1 , N , 1 )
const int shmem = ValueTraits::value_size( functor ) * ( block_size + 2 );
m_scratch_space = cuda_internal_scratch_space( ValueTraits::value_size( functor ) * grid.x );
m_scratch_flags = cuda_internal_scratch_flags( sizeof(size_type) * 1 );
m_final = false ;
CudaParallelLaunch< ParallelScan >( *this, grid, block, shmem ); // copy to device and execute
m_final = true ;
CudaParallelLaunch< ParallelScan >( *this, grid, block, shmem ); // copy to device and execute
}
void wait() const { Cuda::fence(); }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template<typename iType>
struct TeamThreadRangeBoundariesStruct<iType,CudaTeamMember> {
typedef iType index_type;
const iType start;
const iType end;
const iType increment;
const CudaTeamMember& thread;
#ifdef __CUDA_ARCH__
__device__ inline
TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count):
start( threadIdx.y ),
end( count ),
increment( blockDim.y ),
thread(thread_)
{}
__device__ inline
TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& begin_, const iType& end_):
start( begin_+threadIdx.y ),
end( end_ ),
increment( blockDim.y ),
thread(thread_)
{}
#else
KOKKOS_INLINE_FUNCTION
TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count):
start( 0 ),
end( count ),
increment( 1 ),
thread(thread_)
{}
KOKKOS_INLINE_FUNCTION
TeamThreadRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& begin_, const iType& end_):
start( begin_ ),
end( end_ ),
increment( 1 ),
thread(thread_)
{}
#endif
};
template<typename iType>
struct ThreadVectorRangeBoundariesStruct<iType,CudaTeamMember> {
typedef iType index_type;
const iType start;
const iType end;
const iType increment;
#ifdef __CUDA_ARCH__
__device__ inline
ThreadVectorRangeBoundariesStruct (const CudaTeamMember& thread, const iType& count):
start( threadIdx.x ),
end( count ),
increment( blockDim.x )
{}
#else
KOKKOS_INLINE_FUNCTION
ThreadVectorRangeBoundariesStruct (const CudaTeamMember& thread_, const iType& count):
start( 0 ),
end( count ),
increment( 1 )
{}
#endif
};
} // namespace Impl
template<typename iType>
KOKKOS_INLINE_FUNCTION
Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>
TeamThreadRange(const Impl::CudaTeamMember& thread, const iType& count) {
return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>(thread,count);
}
template<typename iType>
KOKKOS_INLINE_FUNCTION
Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>
TeamThreadRange(const Impl::CudaTeamMember& thread, const iType& begin, const iType& end) {
return Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>(thread,begin,end);
}
template<typename iType>
KOKKOS_INLINE_FUNCTION
Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >
ThreadVectorRange(const Impl::CudaTeamMember& thread, const iType& count) {
return Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >(thread,count);
}
KOKKOS_INLINE_FUNCTION
Impl::ThreadSingleStruct<Impl::CudaTeamMember> PerTeam(const Impl::CudaTeamMember& thread) {
return Impl::ThreadSingleStruct<Impl::CudaTeamMember>(thread);
}
KOKKOS_INLINE_FUNCTION
Impl::VectorSingleStruct<Impl::CudaTeamMember> PerThread(const Impl::CudaTeamMember& thread) {
return Impl::VectorSingleStruct<Impl::CudaTeamMember>(thread);
}
} // namespace Kokkos
namespace Kokkos {
/** \brief Inter-thread parallel_for. Executes lambda(iType i) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all threads of the the calling thread team.
* This functionality requires C++11 support.*/
template<typename iType, class Lambda>
KOKKOS_INLINE_FUNCTION
void parallel_for(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>& loop_boundaries, const Lambda& lambda) {
#ifdef __CUDA_ARCH__
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment)
lambda(i);
#endif
}
/** \brief Inter-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all threads of the the calling thread team and a summation of
* val is performed and put into result. This functionality requires C++11 support.*/
template< typename iType, class Lambda, typename ValueType >
KOKKOS_INLINE_FUNCTION
void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>& loop_boundaries,
const Lambda & lambda, ValueType& result) {
#ifdef __CUDA_ARCH__
result = ValueType();
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
lambda(i,result);
}
Impl::cuda_intra_warp_reduction(result,[&] (ValueType& dst, const ValueType& src) { dst+=src; });
Impl::cuda_inter_warp_reduction(result,[&] (ValueType& dst, const ValueType& src) { dst+=src; });
#endif
}
/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of
* val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result.
* The input value of init_result is used as initializer for temporary variables of ValueType. Therefore
* the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or
* '1 for *'). This functionality requires C++11 support.*/
template< typename iType, class Lambda, typename ValueType, class JoinType >
KOKKOS_INLINE_FUNCTION
void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::CudaTeamMember>& loop_boundaries,
const Lambda & lambda, const JoinType& join, ValueType& init_result) {
#ifdef __CUDA_ARCH__
ValueType result = init_result;
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
lambda(i,result);
}
Impl::cuda_intra_warp_reduction(result, join );
Impl::cuda_inter_warp_reduction(result, join );
init_result = result;
#endif
}
} //namespace Kokkos
namespace Kokkos {
/** \brief Intra-thread vector parallel_for. Executes lambda(iType i) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all vector lanes of the the calling thread.
* This functionality requires C++11 support.*/
template<typename iType, class Lambda>
KOKKOS_INLINE_FUNCTION
void parallel_for(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >&
loop_boundaries, const Lambda& lambda) {
#ifdef __CUDA_ARCH__
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment)
lambda(i);
#endif
}
/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a summation of
* val is performed and put into result. This functionality requires C++11 support.*/
template< typename iType, class Lambda, typename ValueType >
KOKKOS_INLINE_FUNCTION
void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >&
loop_boundaries, const Lambda & lambda, ValueType& result) {
#ifdef __CUDA_ARCH__
ValueType val = ValueType();
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
lambda(i,val);
}
result = val;
if (loop_boundaries.increment > 1)
result += shfl_down(result, 1,loop_boundaries.increment);
if (loop_boundaries.increment > 2)
result += shfl_down(result, 2,loop_boundaries.increment);
if (loop_boundaries.increment > 4)
result += shfl_down(result, 4,loop_boundaries.increment);
if (loop_boundaries.increment > 8)
result += shfl_down(result, 8,loop_boundaries.increment);
if (loop_boundaries.increment > 16)
result += shfl_down(result, 16,loop_boundaries.increment);
result = shfl(result,0,loop_boundaries.increment);
#endif
}
/** \brief Intra-thread vector parallel_reduce. Executes lambda(iType i, ValueType & val) for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all vector lanes of the the calling thread and a reduction of
* val is performed using JoinType(ValueType& val, const ValueType& update) and put into init_result.
* The input value of init_result is used as initializer for temporary variables of ValueType. Therefore
* the input value should be the neutral element with respect to the join operation (e.g. '0 for +-' or
* '1 for *'). This functionality requires C++11 support.*/
template< typename iType, class Lambda, typename ValueType, class JoinType >
KOKKOS_INLINE_FUNCTION
void parallel_reduce(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >&
loop_boundaries, const Lambda & lambda, const JoinType& join, ValueType& init_result) {
#ifdef __CUDA_ARCH__
ValueType result = init_result;
for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
lambda(i,result);
}
if (loop_boundaries.increment > 1)
join( result, shfl_down(result, 1,loop_boundaries.increment));
if (loop_boundaries.increment > 2)
join( result, shfl_down(result, 2,loop_boundaries.increment));
if (loop_boundaries.increment > 4)
join( result, shfl_down(result, 4,loop_boundaries.increment));
if (loop_boundaries.increment > 8)
join( result, shfl_down(result, 8,loop_boundaries.increment));
if (loop_boundaries.increment > 16)
join( result, shfl_down(result, 16,loop_boundaries.increment));
init_result = shfl(result,0,loop_boundaries.increment);
#endif
}
/** \brief Intra-thread vector parallel exclusive prefix sum. Executes lambda(iType i, ValueType & val, bool final)
* for each i=0..N-1.
*
* The range i=0..N-1 is mapped to all vector lanes in the thread and a scan operation is performed.
* Depending on the target execution space the operator might be called twice: once with final=false
* and once with final=true. When final==true val contains the prefix sum value. The contribution of this
* "i" needs to be added to val no matter whether final==true or not. In a serial execution
* (i.e. team_size==1) the operator is only called once with final==true. Scan_val will be set
* to the final sum value over all vector lanes.
* This functionality requires C++11 support.*/
template< typename iType, class FunctorType >
KOKKOS_INLINE_FUNCTION
void parallel_scan(const Impl::ThreadVectorRangeBoundariesStruct<iType,Impl::CudaTeamMember >&
loop_boundaries, const FunctorType & lambda) {
#ifdef __CUDA_ARCH__
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ;
typedef typename ValueTraits::value_type value_type ;
value_type scan_val = value_type();
const int VectorLength = blockDim.x;
iType loop_bound = ((loop_boundaries.end+VectorLength-1)/VectorLength) * VectorLength;
for(int _i = threadIdx.x; _i < loop_bound; _i += VectorLength) {
value_type val = value_type();
if(_i<loop_boundaries.end)
lambda(_i , val , false);
value_type tmp = val;
value_type result_i;
if(threadIdx.x%VectorLength == 0)
result_i = tmp;
if (VectorLength > 1) {
const value_type tmp2 = shfl_up(tmp, 1,VectorLength);
if(threadIdx.x > 0)
tmp+=tmp2;
}
if(threadIdx.x%VectorLength == 1)
result_i = tmp;
if (VectorLength > 3) {
const value_type tmp2 = shfl_up(tmp, 2,VectorLength);
if(threadIdx.x > 1)
tmp+=tmp2;
}
if ((threadIdx.x%VectorLength >= 2) &&
(threadIdx.x%VectorLength < 4))
result_i = tmp;
if (VectorLength > 7) {
const value_type tmp2 = shfl_up(tmp, 4,VectorLength);
if(threadIdx.x > 3)
tmp+=tmp2;
}
if ((threadIdx.x%VectorLength >= 4) &&
(threadIdx.x%VectorLength < 8))
result_i = tmp;
if (VectorLength > 15) {
const value_type tmp2 = shfl_up(tmp, 8,VectorLength);
if(threadIdx.x > 7)
tmp+=tmp2;
}
if ((threadIdx.x%VectorLength >= 8) &&
(threadIdx.x%VectorLength < 16))
result_i = tmp;
if (VectorLength > 31) {
const value_type tmp2 = shfl_up(tmp, 16,VectorLength);
if(threadIdx.x > 15)
tmp+=tmp2;
}
if (threadIdx.x%VectorLength >= 16)
result_i = tmp;
val = scan_val + result_i - val;
scan_val += shfl(tmp,VectorLength-1,VectorLength);
if(_i<loop_boundaries.end)
lambda(_i , val , true);
}
#endif
}
}
namespace Kokkos {
template<class FunctorType>
KOKKOS_INLINE_FUNCTION
void single(const Impl::VectorSingleStruct<Impl::CudaTeamMember>& , const FunctorType& lambda) {
#ifdef __CUDA_ARCH__
if(threadIdx.x == 0) lambda();
#endif
}
template<class FunctorType>
KOKKOS_INLINE_FUNCTION
void single(const Impl::ThreadSingleStruct<Impl::CudaTeamMember>& , const FunctorType& lambda) {
#ifdef __CUDA_ARCH__
if(threadIdx.x == 0 && threadIdx.y == 0) lambda();
#endif
}
template<class FunctorType, class ValueType>
KOKKOS_INLINE_FUNCTION
void single(const Impl::VectorSingleStruct<Impl::CudaTeamMember>& , const FunctorType& lambda, ValueType& val) {
#ifdef __CUDA_ARCH__
if(threadIdx.x == 0) lambda(val);
val = shfl(val,0,blockDim.x);
#endif
}
template<class FunctorType, class ValueType>
KOKKOS_INLINE_FUNCTION
void single(const Impl::ThreadSingleStruct<Impl::CudaTeamMember>& single_struct, const FunctorType& lambda, ValueType& val) {
#ifdef __CUDA_ARCH__
if(threadIdx.x == 0 && threadIdx.y == 0) {
lambda(val);
}
single_struct.team_member.team_broadcast(val,0);
#endif
}
}
namespace Kokkos {
namespace Impl {
template< class FunctorType, class ExecPolicy, class ValueType , class Tag = typename ExecPolicy::work_tag>
struct CudaFunctorAdapter {
const FunctorType f;
typedef ValueType value_type;
CudaFunctorAdapter(const FunctorType& f_):f(f_) {}
__device__ inline
void operator() (typename ExecPolicy::work_tag, const typename ExecPolicy::member_type& i, ValueType& val) const {
//Insert Static Assert with decltype on ValueType equals third argument type of FunctorType::operator()
f(typename ExecPolicy::work_tag(), i,val);
}
};
template< class FunctorType, class ExecPolicy, class ValueType >
struct CudaFunctorAdapter<FunctorType,ExecPolicy,ValueType,void> {
const FunctorType f;
typedef ValueType value_type;
CudaFunctorAdapter(const FunctorType& f_):f(f_) {}
__device__ inline
void operator() (const typename ExecPolicy::member_type& i, ValueType& val) const {
//Insert Static Assert with decltype on ValueType equals second argument type of FunctorType::operator()
f(i,val);
}
};
template< class FunctorType, class Enable = void>
struct ReduceFunctorHasInit {
enum {value = false};
};
template< class FunctorType>
struct ReduceFunctorHasInit<FunctorType, typename Impl::enable_if< 0 < sizeof( & FunctorType::init ) >::type > {
enum {value = true};
};
template< class FunctorType, class Enable = void>
struct ReduceFunctorHasJoin {
enum {value = false};
};
template< class FunctorType>
struct ReduceFunctorHasJoin<FunctorType, typename Impl::enable_if< 0 < sizeof( & FunctorType::join ) >::type > {
enum {value = true};
};
template< class FunctorType, class Enable = void>
struct ReduceFunctorHasFinal {
enum {value = false};
};
template< class FunctorType>
struct ReduceFunctorHasFinal<FunctorType, typename Impl::enable_if< 0 < sizeof( & FunctorType::final ) >::type > {
enum {value = true};
};
template< class FunctorType, bool Enable =
( FunctorDeclaresValueType<FunctorType,void>::value) ||
( ReduceFunctorHasInit<FunctorType>::value ) ||
( ReduceFunctorHasJoin<FunctorType>::value ) ||
( ReduceFunctorHasFinal<FunctorType>::value )
>
struct IsNonTrivialReduceFunctor {
enum {value = false};
};
template< class FunctorType>
struct IsNonTrivialReduceFunctor<FunctorType, true> {
enum {value = true};
};
template<class FunctorType, class ResultType, class Tag, bool Enable = IsNonTrivialReduceFunctor<FunctorType>::value >
struct FunctorReferenceType {
typedef ResultType& reference_type;
};
template<class FunctorType, class ResultType, class Tag>
struct FunctorReferenceType<FunctorType, ResultType, Tag, true> {
typedef typename Kokkos::Impl::FunctorValueTraits< FunctorType ,Tag >::reference_type reference_type;
};
}
// general policy and view ouput
template< class ExecPolicy , class FunctorTypeIn , class ViewType >
inline
void parallel_reduce( const ExecPolicy & policy
, const FunctorTypeIn & functor_in
, const ViewType & result_view
, const std::string& str = ""
, typename Impl::enable_if<
( Impl::is_view<ViewType>::value && ! Impl::is_integral< ExecPolicy >::value &&
Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value
)>::type * = 0 )
{
enum {FunctorHasValueType = Impl::IsNonTrivialReduceFunctor<FunctorTypeIn>::value };
typedef typename Kokkos::Impl::if_c<FunctorHasValueType, FunctorTypeIn, Impl::CudaFunctorAdapter<FunctorTypeIn,ExecPolicy,typename ViewType::value_type> >::type FunctorType;
FunctorType functor = Impl::if_c<FunctorHasValueType,FunctorTypeIn,FunctorType>::select(functor_in,FunctorType(functor_in));
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( functor , policy , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
// general policy and pod or array of pod output
template< class ExecPolicy , class FunctorTypeIn , class ResultType>
inline
void parallel_reduce( const ExecPolicy & policy
, const FunctorTypeIn & functor_in
, ResultType& result_ref
, const std::string& str = ""
, typename Impl::enable_if<
( ! Impl::is_view<ResultType>::value &&
! Impl::IsNonTrivialReduceFunctor<FunctorTypeIn>::value &&
! Impl::is_integral< ExecPolicy >::value &&
Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value )>::type * = 0 )
{
typedef typename Impl::CudaFunctorAdapter<FunctorTypeIn,ExecPolicy,ResultType> FunctorType;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , typename ExecPolicy::work_tag > ValueOps ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result_ref )
, 1
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( FunctorType(functor_in) , policy , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
// general policy and pod or array of pod output
template< class ExecPolicy , class FunctorType>
inline
void parallel_reduce( const ExecPolicy & policy
, const FunctorType & functor
, typename Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag >::reference_type result_ref
, const std::string& str = ""
, typename Impl::enable_if<
( Impl::IsNonTrivialReduceFunctor<FunctorType>::value &&
! Impl::is_integral< ExecPolicy >::value &&
Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value )>::type * = 0 )
{
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , typename ExecPolicy::work_tag > ValueOps ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result_ref )
, ValueTraits::value_count( functor )
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( functor , policy , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
// integral range policy and view ouput
template< class FunctorTypeIn , class ViewType >
inline
void parallel_reduce( const size_t work_count
, const FunctorTypeIn & functor_in
, const ViewType & result_view
, const std::string& str = ""
, typename Impl::enable_if<( Impl::is_view<ViewType>::value &&
Impl::is_same<
typename Impl::FunctorPolicyExecutionSpace< FunctorTypeIn , void >::execution_space,
Kokkos::Cuda>::value
)>::type * = 0 )
{
enum {FunctorHasValueType = Impl::IsNonTrivialReduceFunctor<FunctorTypeIn>::value };
typedef typename
Impl::FunctorPolicyExecutionSpace< FunctorTypeIn , void >::execution_space
execution_space ;
typedef RangePolicy< execution_space > ExecPolicy ;
typedef typename Kokkos::Impl::if_c<FunctorHasValueType, FunctorTypeIn, Impl::CudaFunctorAdapter<FunctorTypeIn,ExecPolicy,typename ViewType::value_type> >::type FunctorType;
FunctorType functor = Impl::if_c<FunctorHasValueType,FunctorTypeIn,FunctorType>::select(functor_in,FunctorType(functor_in));
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( functor , ExecPolicy(0,work_count) , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
// integral range policy and pod or array of pod output
template< class FunctorTypeIn , class ResultType>
inline
void parallel_reduce( const size_t work_count
, const FunctorTypeIn & functor_in
, ResultType& result
, const std::string& str = ""
, typename Impl::enable_if< ! Impl::is_view<ResultType>::value &&
! Impl::IsNonTrivialReduceFunctor<FunctorTypeIn>::value &&
Impl::is_same<
typename Impl::FunctorPolicyExecutionSpace< FunctorTypeIn , void >::execution_space,
Kokkos::Cuda>::value >::type * = 0 )
{
typedef typename
Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorTypeIn , void >::execution_space
execution_space ;
typedef Kokkos::RangePolicy< execution_space > ExecPolicy ;
typedef Impl::CudaFunctorAdapter<FunctorTypeIn,ExecPolicy,ResultType> FunctorType;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , void > ValueOps ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result )
, 1
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType , ExecPolicy >( FunctorType(functor_in) , ExecPolicy(0,work_count) , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
template< class FunctorType>
inline
void parallel_reduce( const size_t work_count
, const FunctorType & functor
, typename Kokkos::Impl::FunctorValueTraits< FunctorType , void >::reference_type result
, const std::string& str = ""
, typename Impl::enable_if< Impl::IsNonTrivialReduceFunctor<FunctorType>::value &&
Impl::is_same<
typename Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space,
Kokkos::Cuda>::value >::type * = 0 )
{
typedef typename
Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef Kokkos::RangePolicy< execution_space > ExecPolicy ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , void > ValueOps ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result )
, ValueTraits::value_count( functor )
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType , ExecPolicy >( functor , ExecPolicy(0,work_count) , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
+#ifdef KOKKOS_HAVE_CUDA
+template< class ExecPolicy , class FunctorType , class ResultType >
+inline
+void parallel_reduce( const std::string & str
+ , const ExecPolicy & policy
+ , const FunctorType & functor
+ , ResultType * result)
+{
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
+ #endif
+
+ parallel_reduce(policy,functor,result,str);
+
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
+ #endif
+ (void) str;
+}
+
+template< class ExecPolicy , class FunctorType , class ResultType >
+inline
+void parallel_reduce( const std::string & str
+ , const ExecPolicy & policy
+ , const FunctorType & functor
+ , ResultType & result)
+{
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
+ #endif
+
+ parallel_reduce(policy,functor,result,str);
+
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
+ #endif
+ (void) str;
+}
+
+template< class ExecPolicy , class FunctorType >
+inline
+void parallel_reduce( const std::string & str
+ , const ExecPolicy & policy
+ , const FunctorType & functor)
+{
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
+ #endif
+
+ parallel_reduce(policy,functor,str);
+
+ #if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
+ Kokkos::fence();
+ std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
+ #endif
+ (void) str;
+}
+#endif
} // namespace Kokkos
#endif /* defined( __CUDACC__ ) */
#endif /* #ifndef KOKKOS_CUDA_PARALLEL_HPP */
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_ReduceScan.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_Vectorization.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
old mode 100755
new mode 100644
index a78ead0cb..9074c249f
--- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
+++ b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_View.hpp
@@ -1,312 +1,427 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_CUDA_VIEW_HPP
#define KOKKOS_CUDA_VIEW_HPP
#include <Kokkos_Macros.hpp>
/* only compile this file if CUDA is enabled for Kokkos */
#ifdef KOKKOS_HAVE_CUDA
#include <cstring>
#include <Kokkos_HostSpace.hpp>
#include <Kokkos_CudaSpace.hpp>
#include <Kokkos_View.hpp>
#include <Cuda/Kokkos_Cuda_BasicAllocators.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template<>
struct AssertShapeBoundsAbort< CudaSpace >
{
KOKKOS_INLINE_FUNCTION
static void apply( const size_t /* rank */ ,
const size_t /* n0 */ , const size_t /* n1 */ ,
const size_t /* n2 */ , const size_t /* n3 */ ,
const size_t /* n4 */ , const size_t /* n5 */ ,
const size_t /* n6 */ , const size_t /* n7 */ ,
const size_t /* arg_rank */ ,
const size_t /* i0 */ , const size_t /* i1 */ ,
const size_t /* i2 */ , const size_t /* i3 */ ,
const size_t /* i4 */ , const size_t /* i5 */ ,
const size_t /* i6 */ , const size_t /* i7 */ )
{
Kokkos::abort("Kokkos::View array bounds violation");
}
};
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
//----------------------------------------------------------------------------
// Cuda Texture fetches can be performed for 4, 8 and 16 byte objects (int,int2,int4)
// Via reinterpret_case this can be used to support all scalar types of those sizes.
// Any other scalar type falls back to either normal reads out of global memory,
// or using the __ldg intrinsic on Kepler GPUs or newer (Compute Capability >= 3.0)
template< typename ValueType
, class MemorySpace
, class AliasType =
typename Kokkos::Impl::if_c< ( sizeof(ValueType) == 4 ) , int ,
typename Kokkos::Impl::if_c< ( sizeof(ValueType) == 8 ) , ::int2 ,
- typename Kokkos::Impl::if_c< ( sizeof(ValueType) == 16 ) , ::int4 , void
+ typename Kokkos::Impl::if_c< ( sizeof(ValueType) == 16 ) , ::int4 ,
+ typename Kokkos::Impl::if_c< ( sizeof(ValueType) == 32 ) , ::float4 ,void
+ >::type
>::type
>::type
>::type
>
class CudaTextureFetch {
private:
cuda_texture_object_type m_obj ;
const ValueType * m_alloc_ptr ;
int m_offset ;
void attach( const ValueType * const arg_ptr, AllocationTracker const & tracker )
{
typedef char const * const byte;
m_alloc_ptr = reinterpret_cast<ValueType *>(tracker.alloc_ptr());
size_t byte_offset = reinterpret_cast<byte>(arg_ptr) - reinterpret_cast<byte>(m_alloc_ptr);
const bool ok_aligned = 0 == byte_offset % sizeof(ValueType);
const size_t count = tracker.alloc_size() / sizeof(ValueType);
const bool ok_contains = (m_alloc_ptr <= arg_ptr) && (arg_ptr < (m_alloc_ptr + count));
if (ok_aligned && ok_contains) {
if (tracker.attribute() == NULL ) {
MemorySpace::texture_object_attach(
tracker
, sizeof(ValueType)
, cudaCreateChannelDesc< AliasType >()
);
}
m_obj = dynamic_cast<TextureAttribute*>(tracker.attribute())->m_tex_obj;
m_offset = arg_ptr - m_alloc_ptr;
}
else if( !ok_contains ) {
throw_runtime_exception("Error: cannot attach a texture object to a tracker which does not bound the pointer.");
}
else {
throw_runtime_exception("Error: cannot attach a texture object to an incorrectly aligned pointer.");
}
}
public:
KOKKOS_INLINE_FUNCTION
CudaTextureFetch() : m_obj() , m_alloc_ptr() , m_offset() {}
KOKKOS_INLINE_FUNCTION
~CudaTextureFetch() {}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch( const CudaTextureFetch & rhs )
: m_obj( rhs.m_obj )
, m_alloc_ptr( rhs.m_alloc_ptr )
, m_offset( rhs.m_offset )
{}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch & operator = ( const CudaTextureFetch & rhs )
{
m_obj = rhs.m_obj ;
m_alloc_ptr = rhs.m_alloc_ptr ;
m_offset = rhs.m_offset ;
return *this ;
}
KOKKOS_INLINE_FUNCTION explicit
CudaTextureFetch( const ValueType * const arg_ptr, AllocationTracker const & tracker )
: m_obj( 0 ) , m_alloc_ptr(0) , m_offset(0)
{
#if defined( KOKKOS_USE_LDG_INTRINSIC )
m_alloc_ptr(arg_ptr);
#elif defined( __CUDACC__ ) && ! defined( __CUDA_ARCH__ )
if ( arg_ptr != NULL ) {
if ( tracker.is_valid() ) {
attach( arg_ptr, tracker );
}
else {
AllocationTracker found_tracker = AllocationTracker::find<typename MemorySpace::allocator>(arg_ptr);
if ( found_tracker.is_valid() ) {
attach( arg_ptr, found_tracker );
} else {
throw_runtime_exception("Error: cannot attach a texture object to an untracked pointer!");
}
}
}
#endif
}
KOKKOS_INLINE_FUNCTION
operator const ValueType * () const { return m_alloc_ptr + m_offset ; }
template< typename iType >
KOKKOS_INLINE_FUNCTION
ValueType operator[]( const iType & i ) const
{
#if defined( KOKKOS_USE_LDG_INTRINSIC ) && defined( __CUDA_ARCH__ ) && ( 300 <= __CUDA_ARCH__ )
AliasType v = __ldg(reinterpret_cast<AliasType*>(&m_alloc_ptr[i]));
return *(reinterpret_cast<ValueType*> (&v));
#elif defined( __CUDA_ARCH__ ) && ( 300 <= __CUDA_ARCH__ )
AliasType v = tex1Dfetch<AliasType>( m_obj , i + m_offset );
return *(reinterpret_cast<ValueType*> (&v));
#else
return m_alloc_ptr[ i + m_offset ];
#endif
}
};
+
+template< typename ValueType, class MemorySpace >
+class CudaTextureFetch< const ValueType, MemorySpace, float4 > {
+private:
+ typedef float4 AliasType;
+ cuda_texture_object_type m_obj ;
+ const ValueType * m_alloc_ptr ;
+ int m_offset ;
+
+ void attach( const ValueType * const arg_ptr, AllocationTracker const & tracker )
+ {
+ typedef char const * const byte;
+
+ m_alloc_ptr = reinterpret_cast<ValueType *>(tracker.alloc_ptr());
+
+ size_t byte_offset = reinterpret_cast<byte>(arg_ptr) - reinterpret_cast<byte>(m_alloc_ptr);
+ const bool ok_aligned = 0 == byte_offset % sizeof(ValueType);
+
+ const size_t count = tracker.alloc_size() / sizeof(ValueType);
+ const bool ok_contains = (m_alloc_ptr <= arg_ptr) && (arg_ptr < (m_alloc_ptr + count));
+
+ if (ok_aligned && ok_contains) {
+ if (tracker.attribute() == NULL ) {
+ MemorySpace::texture_object_attach(
+ tracker
+ , sizeof(ValueType)
+ , cudaCreateChannelDesc< AliasType >()
+ );
+ }
+ m_obj = dynamic_cast<TextureAttribute*>(tracker.attribute())->m_tex_obj;
+ m_offset = arg_ptr - m_alloc_ptr;
+ }
+ else if( !ok_contains ) {
+ throw_runtime_exception("Error: cannot attach a texture object to a tracker which does not bound the pointer.");
+ }
+ else {
+ throw_runtime_exception("Error: cannot attach a texture object to an incorrectly aligned pointer.");
+ }
+ }
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ CudaTextureFetch() : m_obj() , m_alloc_ptr() , m_offset() {}
+
+ KOKKOS_INLINE_FUNCTION
+ ~CudaTextureFetch() {}
+
+ KOKKOS_INLINE_FUNCTION
+ CudaTextureFetch( const CudaTextureFetch & rhs )
+ : m_obj( rhs.m_obj )
+ , m_alloc_ptr( rhs.m_alloc_ptr )
+ , m_offset( rhs.m_offset )
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ CudaTextureFetch & operator = ( const CudaTextureFetch & rhs )
+ {
+ m_obj = rhs.m_obj ;
+ m_alloc_ptr = rhs.m_alloc_ptr ;
+ m_offset = rhs.m_offset ;
+ return *this ;
+ }
+
+ KOKKOS_INLINE_FUNCTION explicit
+ CudaTextureFetch( const ValueType * const arg_ptr, AllocationTracker const & tracker )
+ : m_obj( 0 ) , m_alloc_ptr(0) , m_offset(0)
+ {
+ #if defined( KOKKOS_USE_LDG_INTRINSIC )
+ m_alloc_ptr(arg_ptr);
+ #elif defined( __CUDACC__ ) && ! defined( __CUDA_ARCH__ )
+ if ( arg_ptr != NULL ) {
+ if ( tracker.is_valid() ) {
+ attach( arg_ptr, tracker );
+ }
+ else {
+ AllocationTracker found_tracker = AllocationTracker::find<typename MemorySpace::allocator>(arg_ptr);
+ if ( found_tracker.is_valid() ) {
+ attach( arg_ptr, found_tracker );
+ } else {
+ throw_runtime_exception("Error: cannot attach a texture object to an untracked pointer!");
+ }
+ }
+ }
+ #endif
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ operator const ValueType * () const { return m_alloc_ptr + m_offset ; }
+
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ ValueType operator[]( const iType & i ) const
+ {
+ #if defined( KOKKOS_USE_LDG_INTRINSIC ) && defined( __CUDA_ARCH__ ) && ( 300 <= __CUDA_ARCH__ )
+ AliasType v = __ldg(reinterpret_cast<AliasType*>(&m_alloc_ptr[i]));
+ return *(reinterpret_cast<ValueType*> (&v));
+ #elif defined( __CUDA_ARCH__ ) && ( 300 <= __CUDA_ARCH__ )
+ union Float4ValueType {
+ float4 f4[2];
+ ValueType val;
+ };
+ Float4ValueType convert;
+ convert.f4[0] = tex1Dfetch<AliasType>( m_obj , 2*(i + m_offset) );
+ convert.f4[1] = tex1Dfetch<AliasType>( m_obj , 2*(i + m_offset)+1 );
+ return convert.val;
+ #else
+ return m_alloc_ptr[ i + m_offset ];
+ #endif
+ }
+};
+
template< typename ValueType, class MemorySpace >
class CudaTextureFetch< const ValueType, MemorySpace, void >
{
private:
const ValueType * m_ptr ;
public:
KOKKOS_INLINE_FUNCTION
CudaTextureFetch() : m_ptr(0) {};
KOKKOS_INLINE_FUNCTION
~CudaTextureFetch() {
}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch( const ValueType * ptr, const AllocationTracker & ) : m_ptr(ptr) {}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch( const CudaTextureFetch & rhs ) : m_ptr(rhs.m_ptr) {}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch & operator = ( const CudaTextureFetch & rhs ) {
m_ptr = rhs.m_ptr;
return *this ;
}
explicit KOKKOS_INLINE_FUNCTION
CudaTextureFetch( ValueType * const base_view_ptr, AllocationTracker const & /*tracker*/ ) {
m_ptr = base_view_ptr;
}
KOKKOS_INLINE_FUNCTION
CudaTextureFetch & operator = (const ValueType* base_view_ptr) {
m_ptr = base_view_ptr;
return *this;
}
KOKKOS_INLINE_FUNCTION
operator const ValueType * () const { return m_ptr ; }
template< typename iType >
KOKKOS_INLINE_FUNCTION
ValueType operator[]( const iType & i ) const
{
return m_ptr[ i ];
}
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
/** \brief Replace Default ViewDataHandle with Cuda texture fetch specialization
* if 'const' value type, CudaSpace and random access.
*/
template< class ViewTraits >
class ViewDataHandle< ViewTraits ,
typename enable_if< ( is_same< typename ViewTraits::memory_space,CudaSpace>::value ||
is_same< typename ViewTraits::memory_space,CudaUVMSpace>::value )
&&
is_same<typename ViewTraits::const_value_type,typename ViewTraits::value_type>::value
&&
ViewTraits::memory_traits::RandomAccess
>::type >
{
public:
enum { ReturnTypeIsReference = false };
typedef Impl::CudaTextureFetch< typename ViewTraits::value_type
, typename ViewTraits::memory_space> handle_type;
KOKKOS_INLINE_FUNCTION
static handle_type create_handle( typename ViewTraits::value_type * arg_data_ptr, AllocationTracker const & arg_tracker )
{
return handle_type(arg_data_ptr, arg_tracker);
}
typedef typename ViewTraits::value_type return_type;
};
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif // KOKKOS_HAVE_CUDA
#endif /* #ifndef KOKKOS_CUDA_VIEW_HPP */
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp b/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/KokkosExp_View.hpp b/lib/kokkos/core/src/KokkosExp_View.hpp
old mode 100755
new mode 100644
index a2226f3de..fef76a457
--- a/lib/kokkos/core/src/KokkosExp_View.hpp
+++ b/lib/kokkos/core/src/KokkosExp_View.hpp
@@ -1,1945 +1,1989 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_EXPERIMENTAL_VIEW_HPP
#define KOKKOS_EXPERIMENTAL_VIEW_HPP
#include <string>
#include <type_traits>
#include <initializer_list>
#include <Kokkos_Core_fwd.hpp>
#include <Kokkos_HostSpace.hpp>
#include <Kokkos_MemoryTraits.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
-template< class > struct ViewDataAnalysis ;
+template< class DataType >
+struct ViewArrayAnalysis ;
+
+template< class DataType , class ValueType , class ArrayLayout >
+struct ViewDataAnalysis ;
template< class , class = void , typename Enable = void >
class ViewMapping { enum { is_assignable = false }; };
template< class DstMemorySpace , class SrcMemorySpace >
struct DeepCopy ;
} /* namespace Impl */
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
/** \class ViewTraits
* \brief Traits class for accessing attributes of a View.
*
* This is an implementation detail of View. It is only of interest
* to developers implementing a new specialization of View.
*
* Template argument permutations:
* - View< DataType , void , void , void >
* - View< DataType , Space , void , void >
* - View< DataType , Space , MemoryTraits , void >
* - View< DataType , Space , void , MemoryTraits >
* - View< DataType , ArrayLayout , void , void >
* - View< DataType , ArrayLayout , Space , void >
* - View< DataType , ArrayLayout , MemoryTraits , void >
* - View< DataType , ArrayLayout , Space , MemoryTraits >
* - View< DataType , MemoryTraits , void , void >
*/
template< class DataType ,
class Arg1 = void ,
class Arg2 = void ,
class Arg3 = void >
class ViewTraits {
private:
// Layout, Space, and MemoryTraits are optional
// but need to appear in that order. That means Layout
// can only be Arg1, Space can be Arg1 or Arg2, and
// MemoryTraits can be Arg1, Arg2 or Arg3
enum { Arg1IsLayout = Kokkos::Impl::is_array_layout<Arg1>::value };
enum { Arg1IsSpace = Kokkos::Impl::is_space<Arg1>::value };
enum { Arg2IsSpace = Kokkos::Impl::is_space<Arg2>::value };
enum { Arg1IsMemoryTraits = Kokkos::Impl::is_memory_traits<Arg1>::value };
enum { Arg2IsMemoryTraits = Kokkos::Impl::is_memory_traits<Arg2>::value };
enum { Arg3IsMemoryTraits = Kokkos::Impl::is_memory_traits<Arg3>::value };
enum { Arg1IsVoid = std::is_same< Arg1 , void >::value };
enum { Arg2IsVoid = std::is_same< Arg2 , void >::value };
enum { Arg3IsVoid = std::is_same< Arg3 , void >::value };
static_assert( 1 == Arg1IsLayout + Arg1IsSpace + Arg1IsMemoryTraits + Arg1IsVoid
, "Template argument #1 must be layout, space, traits, or void" );
// If Arg1 is Layout then Arg2 is Space, MemoryTraits, or void
// If Arg1 is Space then Arg2 is MemoryTraits or void
// If Arg1 is MemoryTraits then Arg2 is void
// If Arg1 is Void then Arg2 is void
static_assert( ( Arg1IsLayout && ( 1 == Arg2IsSpace + Arg2IsMemoryTraits + Arg2IsVoid ) ) ||
( Arg1IsSpace && ( 0 == Arg2IsSpace ) && ( 1 == Arg2IsMemoryTraits + Arg2IsVoid ) ) ||
( Arg1IsMemoryTraits && Arg2IsVoid ) ||
( Arg1IsVoid && Arg2IsVoid )
, "Template argument #2 must be space, traits, or void" );
// Arg3 is MemoryTraits or void and at most one argument is MemoryTraits
static_assert( ( 1 == Arg3IsMemoryTraits + Arg3IsVoid ) &&
( Arg1IsMemoryTraits + Arg2IsMemoryTraits + Arg3IsMemoryTraits <= 1 )
, "Template argument #3 must be traits or void" );
typedef
typename std::conditional< Arg1IsSpace , Arg1 ,
typename std::conditional< Arg2IsSpace , Arg2 , Kokkos::DefaultExecutionSpace
>::type >::type::execution_space
ExecutionSpace ;
typedef
typename std::conditional< Arg1IsSpace , Arg1 ,
typename std::conditional< Arg2IsSpace , Arg2 , Kokkos::DefaultExecutionSpace
>::type >::type::memory_space
MemorySpace ;
typedef
typename Kokkos::Impl::is_space<
typename std::conditional< Arg1IsSpace , Arg1 ,
typename std::conditional< Arg2IsSpace , Arg2 , Kokkos::DefaultExecutionSpace
>::type >::type >::host_mirror_space
HostMirrorSpace ;
typedef
typename std::conditional< Arg1IsLayout , Arg1 , typename ExecutionSpace::array_layout >::type
ArrayLayout ;
// Arg1, Arg2, or Arg3 may be memory traits
typedef
typename std::conditional< Arg1IsMemoryTraits , Arg1 ,
typename std::conditional< Arg2IsMemoryTraits , Arg2 ,
typename std::conditional< Arg3IsMemoryTraits , Arg3 , MemoryManaged
>::type >::type >::type
MemoryTraits ;
- typedef Kokkos::Experimental::Impl::ViewDataAnalysis< DataType > analysis ;
+ // Analyze data type's array properties
+ typedef Kokkos::Experimental::Impl::ViewArrayAnalysis< DataType > array_analysis ;
+
+ // Analyze data type's properties with opportunity to specialize based upon the array value type
+ typedef Kokkos::Experimental::Impl::
+ ViewDataAnalysis< DataType
+ , typename array_analysis::non_const_value_type
+ , ArrayLayout
+ > data_analysis ;
public:
//------------------------------------
// Data type traits:
- typedef typename analysis::type data_type ;
- typedef typename analysis::const_type const_data_type ;
- typedef typename analysis::non_const_type non_const_data_type ;
+ typedef typename data_analysis::type data_type ;
+ typedef typename data_analysis::const_type const_data_type ;
+ typedef typename data_analysis::non_const_type non_const_data_type ;
//------------------------------------
// Compatible array of trivial type traits:
- typedef typename analysis::array_scalar_type array_scalar_type ;
- typedef typename analysis::const_array_scalar_type const_array_scalar_type ;
- typedef typename analysis::non_const_array_scalar_type non_const_array_scalar_type ;
+ typedef typename data_analysis::array_scalar_type array_scalar_type ;
+ typedef typename data_analysis::const_array_scalar_type const_array_scalar_type ;
+ typedef typename data_analysis::non_const_array_scalar_type non_const_array_scalar_type ;
//------------------------------------
// Value type traits:
- typedef typename analysis::value_type value_type ;
- typedef typename analysis::const_value_type const_value_type ;
- typedef typename analysis::non_const_value_type non_const_value_type ;
+ typedef typename data_analysis::value_type value_type ;
+ typedef typename data_analysis::const_value_type const_value_type ;
+ typedef typename data_analysis::non_const_value_type non_const_value_type ;
//------------------------------------
// Mapping traits:
- typedef ArrayLayout array_layout ;
- typedef typename analysis::dimension dimension ;
- typedef typename analysis::specialize specialize /* mapping specialization tag */ ;
+ typedef ArrayLayout array_layout ;
+ typedef typename data_analysis::dimension dimension ;
+ typedef typename data_analysis::specialize specialize /* mapping specialization tag */ ;
enum { rank = dimension::rank };
enum { rank_dynamic = dimension::rank_dynamic };
//------------------------------------
// Execution space, memory space, memory access traits, and host mirror space.
typedef ExecutionSpace execution_space ;
typedef MemorySpace memory_space ;
typedef Device<ExecutionSpace,MemorySpace> device_type ;
typedef MemoryTraits memory_traits ;
typedef HostMirrorSpace host_mirror_space ;
typedef typename memory_space::size_type size_type ;
enum { is_hostspace = std::is_same< memory_space , HostSpace >::value };
enum { is_managed = memory_traits::Unmanaged == 0 };
enum { is_random_access = memory_traits::RandomAccess == 1 };
//------------------------------------
};
/** \class View
* \brief View to an array of data.
*
* A View represents an array of one or more dimensions.
* For details, please refer to Kokkos' tutorial materials.
*
* \section Kokkos_View_TemplateParameters Template parameters
*
* This class has both required and optional template parameters. The
* \c DataType parameter must always be provided, and must always be
* first. The parameters \c Arg1Type, \c Arg2Type, and \c Arg3Type are
* placeholders for different template parameters. The default value
* of the fifth template parameter \c Specialize suffices for most use
* cases. When explaining the template parameters, we won't refer to
* \c Arg1Type, \c Arg2Type, and \c Arg3Type; instead, we will refer
* to the valid categories of template parameters, in whatever order
* they may occur.
*
* Valid ways in which template arguments may be specified:
* - View< DataType , Space >
* - View< DataType , Space , MemoryTraits >
* - View< DataType , Space , void , MemoryTraits >
* - View< DataType , Layout , Space >
* - View< DataType , Layout , Space , MemoryTraits >
*
* \tparam DataType (required) This indicates both the type of each
* entry of the array, and the combination of compile-time and
* run-time array dimension(s). For example, <tt>double*</tt>
* indicates a one-dimensional array of \c double with run-time
* dimension, and <tt>int*[3]</tt> a two-dimensional array of \c int
* with run-time first dimension and compile-time second dimension
* (of 3). In general, the run-time dimensions (if any) must go
* first, followed by zero or more compile-time dimensions. For
* more examples, please refer to the tutorial materials.
*
* \tparam Space (required) The memory space.
*
* \tparam Layout (optional) The array's layout in memory. For
* example, LayoutLeft indicates a column-major (Fortran style)
* layout, and LayoutRight a row-major (C style) layout. If not
* specified, this defaults to the preferred layout for the
* <tt>Space</tt>.
*
* \tparam MemoryTraits (optional) Assertion of the user's intended
* access behavior. For example, RandomAccess indicates read-only
* access with limited spatial locality, and Unmanaged lets users
* wrap externally allocated memory in a View without automatic
* deallocation.
*
* \section Kokkos_View_MT MemoryTraits discussion
*
* \subsection Kokkos_View_MT_Interp MemoryTraits interpretation depends on Space
*
* Some \c MemoryTraits options may have different interpretations for
* different \c Space types. For example, with the Cuda device,
* \c RandomAccess tells Kokkos to fetch the data through the texture
* cache, whereas the non-GPU devices have no such hardware construct.
*
* \subsection Kokkos_View_MT_PrefUse Preferred use of MemoryTraits
*
* Users should defer applying the optional \c MemoryTraits parameter
* until the point at which they actually plan to rely on it in a
* computational kernel. This minimizes the number of template
* parameters exposed in their code, which reduces the cost of
* compilation. Users may always assign a View without specified
* \c MemoryTraits to a compatible View with that specification.
* For example:
* \code
* // Pass in the simplest types of View possible.
* void
* doSomething (View<double*, Cuda> out,
* View<const double*, Cuda> in)
* {
* // Assign the "generic" View in to a RandomAccess View in_rr.
* // Note that RandomAccess View objects must have const data.
* View<const double*, Cuda, RandomAccess> in_rr = in;
* // ... do something with in_rr and out ...
* }
* \endcode
*/
template< class DataType
, class Arg1 = void /* ArrayLayout, SpaceType, or MemoryTraits */
, class Arg2 = void /* SpaceType or MemoryTraits */
, class Arg3 = void /* MemoryTraits */ >
class View ;
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#include <impl/KokkosExp_ViewMapping.hpp>
#include <impl/KokkosExp_ViewAllocProp.hpp>
+#include <impl/KokkosExp_ViewArray.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace {
constexpr Kokkos::Experimental::Impl::ALL_t
ALL = Kokkos::Experimental::Impl::ALL_t();
constexpr Kokkos::Experimental::Impl::WithoutInitializing_t
WithoutInitializing = Kokkos::Experimental::Impl::WithoutInitializing_t();
constexpr Kokkos::Experimental::Impl::AllowPadding_t
AllowPadding = Kokkos::Experimental::Impl::AllowPadding_t();
}
/** \brief Create View allocation parameter bundle from argument list.
*
* Valid argument list members are:
* 1) label as a "string" or std::string
* 2) memory space instance of the View::memory_space type
* 3) execution space instance compatible with the View::memory_space
* 4) Kokkos::WithoutInitializing to bypass initialization
* 4) Kokkos::AllowPadding to allow allocation to pad dimensions for memory alignment
*/
template< class ... Args >
inline
Kokkos::Experimental::Impl::ViewAllocProp< Args ... >
view_alloc( Args ... args )
{
return Kokkos::Experimental::Impl::ViewAllocProp< Args ... >( args ... );
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
/**\brief Each R? template argument designates whether the subview argument is a range */
template< class V
, bool R0 = false , bool R1 = false , bool R2 = false , bool R3 = false
, bool R4 = false , bool R5 = false , bool R6 = false , bool R7 = false >
using Subview = typename Kokkos::Experimental::Impl::SubviewType< V, R0 , R1 , R2 , R3 , R4 , R5 , R6 , R7 >::type ;
template< class DataType , class Arg1 , class Arg2 , class Arg3 >
class View : public ViewTraits< DataType , Arg1 , Arg2 , Arg3 > {
private:
template< class , class , class , class > friend class View ;
typedef ViewTraits< DataType , Arg1 , Arg2 , Arg3 > traits ;
typedef Kokkos::Experimental::Impl::ViewMapping< traits > map_type ;
typedef Kokkos::Experimental::Impl::SharedAllocationTracker track_type ;
track_type m_track ;
map_type m_map ;
public:
//----------------------------------------
/** \brief Compatible view of array of scalar types */
typedef View< typename traits::array_scalar_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits >
array_type ;
/** \brief Compatible view of const data type */
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits >
const_type ;
/** \brief Compatible view of non-const data type */
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits >
non_const_type ;
/** \brief Compatible HostMirror view */
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::host_mirror_space ,
void >
HostMirror ;
//----------------------------------------
// Domain dimensions
enum { Rank = map_type::Rank };
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return m_map.dimension_0(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return m_map.dimension_1(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return m_map.dimension_2(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return m_map.dimension_3(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { return m_map.dimension_4(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_map.dimension_5(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_map.dimension_6(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_map.dimension_7(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_map.stride_0(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_map.stride_1(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { return m_map.stride_2(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { return m_map.stride_3(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { return m_map.stride_4(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { return m_map.stride_5(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { return m_map.stride_6(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { return m_map.stride_7(); }
//----------------------------------------
- // Range span
+ // Range span is the span which contains all members.
typedef typename map_type::reference_type reference_type ;
enum { reference_type_is_lvalue_reference = std::is_lvalue_reference< reference_type >::value };
KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_map.span(); }
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_map.span_is_contiguous(); }
KOKKOS_INLINE_FUNCTION constexpr typename traits::value_type * data() const { return m_map.data(); }
// Deprecated, use 'span_is_contigous()' instead
KOKKOS_INLINE_FUNCTION constexpr bool is_contiguous() const { return m_map.span_is_contiguous(); }
// Deprecated, use 'data()' instead
KOKKOS_INLINE_FUNCTION constexpr typename traits::value_type * ptr_on_device() const { return m_map.data(); }
//----------------------------------------
+ // Allow specializations to query their specialized map
+
+ KOKKOS_INLINE_FUNCTION
+ const map_type & implementation_map() const { return m_map ; }
+
+ //----------------------------------------
private:
typedef typename
std::conditional< Rank == 0 , reference_type
, Kokkos::Experimental::Impl::Error_view_scalar_reference_to_non_scalar_view >::type
scalar_operator_reference_type ;
typedef typename
std::conditional< Rank == 0 , const int
, Kokkos::Experimental::Impl::Error_view_scalar_reference_to_non_scalar_view >::type
scalar_operator_index_type ;
public:
// Rank == 0
KOKKOS_FORCEINLINE_FUNCTION
scalar_operator_reference_type operator()() const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, 0, 0, 0, 0, 0, 0, 0, 0 );
return scalar_operator_reference_type( m_map.reference() );
}
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( scalar_operator_index_type i0
, const int i1 = 0 , const int i2 = 0 , const int i3 = 0
, const int i4 = 0 , const int i5 = 0 , const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference();
}
// Rank == 1
template< typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 1 && std::is_integral<I0>::value
), reference_type >::type
operator[]( const I0 & i0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, 0, 0, 0, 0, 0, 0, 0 );
return m_map.reference(i0);
}
template< typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 1 && std::is_integral<I0>::value
), reference_type >::type
operator()( const I0 & i0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, 0, 0, 0, 0, 0, 0, 0 );
return m_map.reference(i0);
}
template< typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0
, typename std::enable_if<( Rank == 1 && std::is_integral<I0>::value ), const int >::type i1
, const int i2 = 0 , const int i3 = 0
, const int i4 = 0 , const int i5 = 0 , const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0);
}
// Rank == 2
template< typename I0 , typename I1 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 2 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, 0, 0, 0, 0, 0, 0 );
return m_map.reference(i0,i1);
}
template< typename I0 , typename I1 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1
, typename std::enable_if<( Rank == 2 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value
), const int >::type i2
, const int i3 = 0
, const int i4 = 0 , const int i5 = 0 , const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1);
}
// Rank == 3
template< typename I0 , typename I1 , typename I2 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 3 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, 0, 0, 0, 0, 0 );
return m_map.reference(i0,i1,i2);
}
template< typename I0 , typename I1 , typename I2 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2
, typename std::enable_if<( Rank == 3 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value
), const int >::type i3
, const int i4 = 0 , const int i5 = 0 , const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2);
}
// Rank == 4
template< typename I0 , typename I1 , typename I2 , typename I3 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 4 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, 0, 0, 0, 0 );
return m_map.reference(i0,i1,i2,i3);
}
template< typename I0 , typename I1 , typename I2 , typename I3 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, typename std::enable_if<( Rank == 4 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value
), const int >::type i4
, const int i5 = 0 , const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2,i3);
}
// Rank == 5
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 5 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, 0, 0, 0 );
return m_map.reference(i0,i1,i2,i3,i4);
}
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4
, typename std::enable_if<( Rank == 5 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value
), const int >::type i5
, const int i6 = 0 , const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2,i3,i4);
}
// Rank == 6
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 6 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value &&
std::is_integral<I5>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, 0, 0 );
return m_map.reference(i0,i1,i2,i3,i4,i5);
}
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5
, typename std::enable_if<( Rank == 6 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value
), const int >::type i6
, const int i7 = 0 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2,i3,i4,i5);
}
// Rank == 7
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 , typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 7 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value &&
std::is_integral<I5>::value &&
std::is_integral<I6>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 , const I6 & i6 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, 0 );
return m_map.reference(i0,i1,i2,i3,i4,i5,i6);
}
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 , typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 , const I6 & i6
, typename std::enable_if<( Rank == 7 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value
), const int >::type i7
) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2,i3,i4,i5,i6);
}
// Rank == 8
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 , typename I6 , typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if<( Rank == 8 &&
std::is_integral<I0>::value &&
std::is_integral<I1>::value &&
std::is_integral<I2>::value &&
std::is_integral<I3>::value &&
std::is_integral<I4>::value &&
std::is_integral<I5>::value &&
std::is_integral<I6>::value &&
std::is_integral<I7>::value
), reference_type >::type
operator()( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 ) const
{
KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( typename traits::memory_space, m_map, Rank, i0, i1, i2, i3, i4, i5, i6, i7 );
return m_map.reference(i0,i1,i2,i3,i4,i5,i6,i7);
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION
~View() {}
KOKKOS_INLINE_FUNCTION
View() : m_track(), m_map() {}
KOKKOS_INLINE_FUNCTION
View( const View & rhs ) : m_track( rhs.m_track ), m_map( rhs.m_map ) {}
KOKKOS_INLINE_FUNCTION
View( View && rhs ) : m_track( rhs.m_track ), m_map( rhs.m_map ) {}
KOKKOS_INLINE_FUNCTION
View & operator = ( const View & rhs ) { m_track = rhs.m_track ; m_map = rhs.m_map ; return *this ; }
KOKKOS_INLINE_FUNCTION
View & operator = ( View && rhs ) { m_track = rhs.m_track ; m_map = rhs.m_map ; return *this ; }
//----------------------------------------
template< class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
View( const View<RT,R1,R2,R3> & rhs )
: m_track( rhs.m_track )
, m_map()
{
typedef typename View<RT,R1,R2,R3>::traits SrcTraits ;
typedef Kokkos::Experimental::Impl::ViewMapping< traits , SrcTraits > Mapping ;
static_assert( Mapping::is_assignable , "Incompatible View copy construction" );
Mapping::assign( m_map , rhs.m_map , rhs.m_track );
}
template< class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
View( View<RT,R1,R2,R3> && rhs )
: m_track( rhs.m_track )
, m_map()
{
typedef typename View<RT,R1,R2,R3>::traits SrcTraits ;
typedef Kokkos::Experimental::Impl::ViewMapping< traits , SrcTraits > Mapping ;
static_assert( Mapping::is_assignable , "Incompatible View move construction" );
Mapping::assign( m_map , rhs.m_map , rhs.m_track );
}
template< class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
View & operator = ( const View<RT,R1,R2,R3> & rhs )
{
typedef typename View<RT,R1,R2,R3>::traits SrcTraits ;
typedef Kokkos::Experimental::Impl::ViewMapping< traits , SrcTraits > Mapping ;
static_assert( Mapping::is_assignable , "Incompatible View copy assignment" );
Mapping::assign( m_map , rhs.m_map , rhs.m_track );
m_track.operator=( rhs.m_track );
return *this ;
}
template< class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
View & operator = ( View<RT,R1,R2,R3> && rhs )
{
typedef typename View<RT,R1,R2,R3>::traits SrcTraits ;
typedef Kokkos::Experimental::Impl::ViewMapping< traits , SrcTraits > Mapping ;
static_assert( Mapping::is_assignable , "Incompatible View move assignment" );
Mapping::assign( m_map , rhs.m_map , rhs.m_track );
m_track.operator=( rhs.m_track );
return *this ;
}
//----------------------------------------
// Allocation according to allocation properties
private:
// Must call destructor for non-trivial types
template< class ExecSpace >
struct DestroyFunctor {
map_type m_map ;
ExecSpace m_space ;
KOKKOS_INLINE_FUNCTION
void destroy_shared_allocation() { m_map.destroy( m_space ); }
};
public:
inline
const std::string label() const { return m_track.template get_label< typename traits::memory_space >(); }
template< class Prop >
explicit inline
View( const Prop & arg_prop
, const size_t arg_N0 = 0
, const size_t arg_N1 = 0
, const size_t arg_N2 = 0
, const size_t arg_N3 = 0
, const size_t arg_N4 = 0
, const size_t arg_N5 = 0
, const size_t arg_N6 = 0
, const size_t arg_N7 = 0
)
: m_track()
, m_map()
{
// Merge the < execution_space , memory_space > into the properties.
typedef Kokkos::Experimental::Impl::ViewAllocProp< typename traits::device_type , Prop > alloc_prop ;
typedef typename alloc_prop::execution_space execution_space ;
typedef typename traits::memory_space memory_space ;
typedef DestroyFunctor< execution_space > destroy_functor ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< memory_space , destroy_functor > record_type ;
static_assert( traits::is_managed , "View allocation constructor requires managed memory" );
const alloc_prop prop( arg_prop );
+ // If initializing view data then the execution space must be initialized.
+ if ( prop.initialize.value && ! prop.execution.is_initialized() ) {
+ Kokkos::Impl::throw_runtime_exception("Constructing View and initializing data with uninitialized execution space");
+ }
+
// Query the mapping for byte-size of allocation.
const size_t alloc_size = map_type::memory_span( prop.allow_padding
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 );
// Allocate memory from the memory space.
record_type * const record = record_type::allocate( prop.memory , prop.label , alloc_size );
// Construct the mapping object prior to start of tracking
// to assign destroy functor and possibly initialize.
m_map = map_type( record->data()
, prop.allow_padding
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 );
// Copy the destroy functor into the allocation record before initiating tracking.
record->m_destroy.m_map = m_map ;
record->m_destroy.m_space = prop.execution ;
if ( prop.initialize.value ) {
m_map.construct( prop.execution );
}
// Destroy functor assigned and initialization complete, start tracking
m_track = track_type( record );
}
template< class Prop >
explicit inline
View( const Prop & arg_prop
, const typename traits::array_layout & arg_layout
)
: m_track()
, m_map()
{
// Merge the < execution_space , memory_space > into the properties.
typedef Kokkos::Experimental::Impl::ViewAllocProp< typename traits::device_type , Prop > alloc_prop ;
typedef typename alloc_prop::execution_space execution_space ;
typedef typename traits::memory_space memory_space ;
typedef DestroyFunctor< execution_space > destroy_functor ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< memory_space , destroy_functor > record_type ;
static_assert( traits::is_managed , "View allocation constructor requires managed memory" );
const alloc_prop prop( arg_prop );
+ // If initializing view data then the execution space must be initialized.
+ if ( prop.initialize.value && ! prop.execution.is_initialized() ) {
+ Kokkos::Impl::throw_runtime_exception("Constructing View and initializing data with uninitialized execution space");
+ }
+
// Query the mapping for byte-size of allocation.
const size_t alloc_size = map_type::memory_span( prop.allow_padding , arg_layout );
// Allocate memory from the memory space.
record_type * const record = record_type::allocate( prop.memory , prop.label , alloc_size );
// Construct the mapping object prior to start of tracking
// to assign destroy functor and possibly initialize.
m_map = map_type( record->data() , prop.allow_padding , arg_layout );
// Copy the destroy functor into the allocation record before initiating tracking.
record->m_destroy.m_map = m_map ;
record->m_destroy.m_space = prop.execution ;
if ( prop.initialize.value ) {
m_map.construct( prop.execution );
}
// Destroy functor assigned and initialization complete, start tracking
m_track = track_type( record );
}
//----------------------------------------
// Memory span required to wrap these dimensions.
static constexpr size_t memory_span( const size_t arg_N0 = 0
, const size_t arg_N1 = 0
, const size_t arg_N2 = 0
, const size_t arg_N3 = 0
, const size_t arg_N4 = 0
, const size_t arg_N5 = 0
, const size_t arg_N6 = 0
, const size_t arg_N7 = 0
)
{
return map_type::memory_span( std::integral_constant<bool,false>()
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 );
}
explicit inline
View( typename traits::value_type * const arg_ptr
, const size_t arg_N0 = 0
, const size_t arg_N1 = 0
, const size_t arg_N2 = 0
, const size_t arg_N3 = 0
, const size_t arg_N4 = 0
, const size_t arg_N5 = 0
, const size_t arg_N6 = 0
, const size_t arg_N7 = 0
)
: m_track() // No memory tracking
, m_map( arg_ptr , std::integral_constant<bool,false>()
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 )
{}
explicit inline
View( typename traits::value_type * const arg_ptr
, typename traits::array_layout & arg_layout
)
: m_track() // No memory tracking
, m_map( arg_ptr , std::integral_constant<bool,false>(), arg_layout )
{}
//----------------------------------------
// Shared scratch memory constructor
static inline
size_t shmem_size( const size_t arg_N0 = 0 ,
const size_t arg_N1 = 0 ,
const size_t arg_N2 = 0 ,
const size_t arg_N3 = 0 ,
const size_t arg_N4 = 0 ,
const size_t arg_N5 = 0 ,
const size_t arg_N6 = 0 ,
const size_t arg_N7 = 0 )
{
return map_type::memory_span( std::integral_constant<bool,false>()
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 );
}
explicit KOKKOS_INLINE_FUNCTION
View( const typename traits::execution_space::scratch_memory_space & arg_space
, const size_t arg_N0 = 0
, const size_t arg_N1 = 0
, const size_t arg_N2 = 0
, const size_t arg_N3 = 0
, const size_t arg_N4 = 0
, const size_t arg_N5 = 0
, const size_t arg_N6 = 0
, const size_t arg_N7 = 0 )
: m_track() // No memory tracking
, m_map( arg_space.get_shmem( map_type::memory_span( std::integral_constant<bool,false>()
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 ) )
, std::integral_constant<bool,false>()
, arg_N0 , arg_N1 , arg_N2 , arg_N3
, arg_N4 , arg_N5 , arg_N6 , arg_N7 )
{}
//----------------------------------------
// Subviews
private:
+ /**\brief Private method to support extensibility of subview construction */
+ KOKKOS_INLINE_FUNCTION
+ View( const track_type & arg_track , const map_type & arg_map )
+ : m_track( arg_track )
+ , m_map( arg_map )
+ {}
+
explicit KOKKOS_INLINE_FUNCTION
View( const track_type & rhs )
: m_track( rhs )
, m_map()
{}
public:
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 , class T6 , class T7 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T7>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5 , T6 const & arg6 , T7 const & arg7
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 , class T6 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5 , T6 const & arg6
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 , class T3
, class T4 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 , class T3 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 , class T2 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2
);
template< class D , class A1 , class A2 , class A3
, class T0 , class T1 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D , A1 , A2 , A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
>
subview( const View< D , A1 , A2 , A3 > & src
, T0 const & arg0 , T1 const & arg1
);
template< class D, class A1, class A2, class A3, class T0 >
friend
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
>
subview( const View< D, A1, A2, A3 > & src , T0 const & arg0 );
};
template< class > struct is_view : public std::false_type {};
template< class D, class A1, class A2, class A3 >
struct is_view< View<D,A1,A2,A3> > : public std::true_type {};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 , class T6 , class T7 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T7>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5 , T6 const & arg6 , T7 const & arg7
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T7>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 8 , "Subview of rank 8 View requires 8 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 , class T6 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5 , T6 const & arg6
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T6>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 7 , "Subview of rank 7 View requires 7 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, arg3, arg4, arg5, arg6, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 , class T3
, class T4 , class T5 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4 , T5 const & arg5
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T5>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 6 , "Subview of rank 6 View requires 6 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, arg3, arg4, arg5, 0, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 , class T3
, class T4 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
, T4 const & arg4
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T4>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 5 , "Subview of rank 5 View requires 5 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, arg3, arg4, 0, 0, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 , class T3 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2 , T3 const & arg3
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T3>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 4 , "Subview of rank 4 View requires 4 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, arg3, 0, 0, 0, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 , class T2 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1 , T2 const & arg2
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T2>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 3 , "Subview of rank 3 View requires 3 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, arg2, 0, 0, 0, 0, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3
, class T0 , class T1 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
>
subview( const View< D, A1, A2, A3 > & src
, T0 const & arg0 , T1 const & arg1
)
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
, Kokkos::Experimental::Impl::ViewOffsetRange<T1>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 2 , "Subview of rank 2 View requires 2 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map, src.m_map, arg0, arg1, 0, 0, 0, 0, 0, 0 );
return dst ;
}
template< class D, class A1, class A2, class A3, class T0 >
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::Subview< View< D, A1, A2, A3 >
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
>
subview( const View< D, A1, A2, A3 > & src , T0 const & arg0 )
{
typedef View< D, A1, A2, A3 > SrcView ;
typedef Kokkos::Experimental::Impl::SubviewMapping
< typename SrcView::traits
, Kokkos::Experimental::Impl::ViewOffsetRange<T0>::is_range
> Mapping ;
typedef typename Mapping::type DstView ;
static_assert( SrcView::Rank == 1 , "Subview of rank 1 View requires 1 arguments" );
DstView dst( src.m_track );
Mapping::assign( dst.m_map , src.m_map , arg0, 0, 0, 0, 0, 0, 0, 0 );
return dst ;
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
template< class LT , class L1 , class L2 , class L3
, class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
bool operator == ( const View<LT,L1,L2,L3> & lhs ,
const View<RT,R1,R2,R3> & rhs )
{
// Same data, layout, dimensions
typedef ViewTraits<LT,L1,L2,L3> lhs_traits ;
typedef ViewTraits<RT,R1,R2,R3> rhs_traits ;
return
std::is_same< typename lhs_traits::const_value_type ,
typename rhs_traits::const_value_type >::value &&
std::is_same< typename lhs_traits::array_layout ,
typename rhs_traits::array_layout >::value &&
std::is_same< typename lhs_traits::memory_space ,
typename rhs_traits::memory_space >::value &&
lhs_traits::Rank == rhs_traits::Rank &&
lhs.data() == rhs.data() &&
lhs.span() == rhs.span() &&
lhs.dimension_0() == rhs.dimension_0() &&
lhs.dimension_1() == rhs.dimension_1() &&
lhs.dimension_2() == rhs.dimension_2() &&
lhs.dimension_3() == rhs.dimension_3() &&
lhs.dimension_4() == rhs.dimension_4() &&
lhs.dimension_5() == rhs.dimension_5() &&
lhs.dimension_6() == rhs.dimension_6() &&
lhs.dimension_7() == rhs.dimension_7();
}
template< class LT , class L1 , class L2 , class L3
, class RT , class R1 , class R2 , class R3 >
KOKKOS_INLINE_FUNCTION
bool operator != ( const View<LT,L1,L2,L3> & lhs ,
const View<RT,R1,R2,R3> & rhs )
{
return ! ( operator==(lhs,rhs) );
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template< class OutputView , typename Enable = void >
struct ViewFill {
typedef typename OutputView::const_value_type const_value_type ;
const OutputView output ;
const_value_type input ;
KOKKOS_INLINE_FUNCTION
void operator()( const size_t i0 ) const
{
const size_t n1 = output.dimension_1();
const size_t n2 = output.dimension_2();
const size_t n3 = output.dimension_3();
const size_t n4 = output.dimension_4();
const size_t n5 = output.dimension_5();
const size_t n6 = output.dimension_6();
const size_t n7 = output.dimension_7();
for ( size_t i1 = 0 ; i1 < n1 ; ++i1 ) {
for ( size_t i2 = 0 ; i2 < n2 ; ++i2 ) {
for ( size_t i3 = 0 ; i3 < n3 ; ++i3 ) {
for ( size_t i4 = 0 ; i4 < n4 ; ++i4 ) {
for ( size_t i5 = 0 ; i5 < n5 ; ++i5 ) {
for ( size_t i6 = 0 ; i6 < n6 ; ++i6 ) {
for ( size_t i7 = 0 ; i7 < n7 ; ++i7 ) {
output(i0,i1,i2,i3,i4,i5,i6,i7) = input ;
}}}}}}}
}
ViewFill( const OutputView & arg_out , const_value_type & arg_in )
: output( arg_out ), input( arg_in )
{
typedef typename OutputView::execution_space execution_space ;
typedef Kokkos::RangePolicy< execution_space > Policy ;
(void) Kokkos::Impl::ParallelFor< ViewFill , Policy >( *this , Policy( 0 , output.dimension_0() ) );
execution_space::fence();
}
};
template< class OutputView >
struct ViewFill< OutputView , typename std::enable_if< OutputView::Rank == 0 >::type > {
ViewFill( const OutputView & dst , const typename OutputView::const_value_type & src )
{
Kokkos::Impl::DeepCopy< typename OutputView::memory_space , Kokkos::HostSpace >
( dst.data() , & src , sizeof(typename OutputView::const_value_type) );
}
};
template< class OutputView , class InputView >
struct ViewRemap {
const OutputView output ;
const InputView input ;
const size_t n0 ;
const size_t n1 ;
const size_t n2 ;
const size_t n3 ;
const size_t n4 ;
const size_t n5 ;
const size_t n6 ;
const size_t n7 ;
ViewRemap( const OutputView & arg_out , const InputView & arg_in )
: output( arg_out ), input( arg_in )
, n0( std::min( (size_t)arg_out.dimension_0() , (size_t)arg_in.dimension_0() ) )
, n1( std::min( (size_t)arg_out.dimension_1() , (size_t)arg_in.dimension_1() ) )
, n2( std::min( (size_t)arg_out.dimension_2() , (size_t)arg_in.dimension_2() ) )
, n3( std::min( (size_t)arg_out.dimension_3() , (size_t)arg_in.dimension_3() ) )
, n4( std::min( (size_t)arg_out.dimension_4() , (size_t)arg_in.dimension_4() ) )
, n5( std::min( (size_t)arg_out.dimension_5() , (size_t)arg_in.dimension_5() ) )
, n6( std::min( (size_t)arg_out.dimension_6() , (size_t)arg_in.dimension_6() ) )
, n7( std::min( (size_t)arg_out.dimension_7() , (size_t)arg_in.dimension_7() ) )
{
typedef typename OutputView::execution_space execution_space ;
typedef Kokkos::RangePolicy< execution_space > Policy ;
(void) Kokkos::Impl::ParallelFor< ViewRemap , Policy >( *this , Policy( 0 , n0 ) );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_t i0 ) const
{
for ( size_t i1 = 0 ; i1 < n1 ; ++i1 ) {
for ( size_t i2 = 0 ; i2 < n2 ; ++i2 ) {
for ( size_t i3 = 0 ; i3 < n3 ; ++i3 ) {
for ( size_t i4 = 0 ; i4 < n4 ; ++i4 ) {
for ( size_t i5 = 0 ; i5 < n5 ; ++i5 ) {
for ( size_t i6 = 0 ; i6 < n6 ; ++i6 ) {
for ( size_t i7 = 0 ; i7 < n7 ; ++i7 ) {
output(i0,i1,i2,i3,i4,i5,i6,i7) = input(i0,i1,i2,i3,i4,i5,i6,i7);
}}}}}}}
}
};
} /* namespace Impl */
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
/** \brief Deep copy a value from Host memory into a view. */
template< class DT , class D1 , class D2 , class D3 >
inline
void deep_copy( const View<DT,D1,D2,D3> & dst
, typename ViewTraits<DT,D1,D2,D3>::const_value_type & value )
{
static_assert( std::is_same< typename ViewTraits<DT,D1,D2,D3>::non_const_value_type ,
typename ViewTraits<DT,D1,D2,D3>::value_type >::value
, "ERROR: Incompatible deep_copy( View , value )" );
Kokkos::Experimental::Impl::ViewFill< View<DT,D1,D2,D3> >( dst , value );
}
/** \brief Deep copy into a value in Host memory from a view. */
template< class ST , class S1 , class S2 , class S3 >
inline
void deep_copy( ST & dst , const View<ST,S1,S2,S3> & src )
{
static_assert( ViewTraits<ST,S1,S2,S3>::rank == 0
, "ERROR: Non-rank-zero view in deep_copy( value , View )" );
typedef ViewTraits<ST,S1,S2,S3> src_traits ;
typedef typename src_traits::memory_space src_memory_space ;
Kokkos::Impl::DeepCopy< HostSpace , src_memory_space >( & dst , src.data() , sizeof(ST) );
}
//----------------------------------------------------------------------------
/** \brief A deep copy between views of compatible type, and rank zero. */
template< class DT , class D1 , class D2 , class D3
, class ST , class S1 , class S2 , class S3 >
inline
void deep_copy( const View<DT,D1,D2,D3> & dst ,
const View<ST,S1,S2,S3> & src ,
typename std::enable_if<(
// Rank zero:
( unsigned(ViewTraits<DT,D1,D2,D3>::rank) == unsigned(0) ) &&
( unsigned(ViewTraits<ST,S1,S2,S3>::rank) == unsigned(0) ) &&
// Same type and destination is not constant:
std::is_same< typename ViewTraits<DT,D1,D2,D3>::value_type ,
typename ViewTraits<ST,S1,S2,S3>::non_const_value_type >::value
)>::type * = 0 )
{
typedef View<DT,D1,D2,D3> dst_type ;
typedef View<ST,S1,S2,S3> src_type ;
typedef typename dst_type::value_type value_type ;
typedef typename dst_type::memory_space dst_memory_space ;
typedef typename src_type::memory_space src_memory_space ;
if ( dst.data() != src.data() ) {
Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.data() , src.data() , sizeof(value_type) );
}
}
//----------------------------------------------------------------------------
/** \brief A deep copy between views of the default specialization, compatible type,
* same non-zero rank, same contiguous layout.
*/
template< class DT , class D1 , class D2 , class D3 ,
class ST , class S1 , class S2 , class S3 >
inline
void deep_copy( const View<DT,D1,D2,D3> & dst ,
const View<ST,S1,S2,S3> & src ,
typename std::enable_if<(
// destination is non-const.
std::is_same< typename ViewTraits<DT,D1,D2,D3>::value_type ,
typename ViewTraits<DT,D1,D2,D3>::non_const_value_type >::value
&&
// Same non-zero rank:
( unsigned(ViewTraits<DT,D1,D2,D3>::rank) != 0 )
&&
( unsigned(ViewTraits<DT,D1,D2,D3>::rank) ==
unsigned(ViewTraits<ST,S1,S2,S3>::rank) )
&&
// Not specialized, default ViewMapping
std::is_same< typename ViewTraits<DT,D1,D2,D3>::specialize , void >::value
&&
std::is_same< typename ViewTraits<ST,S1,S2,S3>::specialize , void >::value
)>::type * = 0 )
{
typedef View<DT,D1,D2,D3> dst_type ;
typedef View<ST,S1,S2,S3> src_type ;
typedef typename dst_type::execution_space dst_execution_space ;
typedef typename dst_type::memory_space dst_memory_space ;
typedef typename src_type::memory_space src_memory_space ;
enum { DstExecCanAccessSrc =
Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< typename dst_execution_space::memory_space , src_memory_space >::value };
if ( (void *) dst.data() != (void*) src.data() ) {
// Concern: If overlapping views then a parallel copy will be erroneous.
// ...
// If same type, equal layout, equal dimensions, equal span, and contiguous memory then can byte-wise copy
if ( std::is_same< typename ViewTraits<DT,D1,D2,D3>::value_type ,
typename ViewTraits<ST,S1,S2,S3>::non_const_value_type >::value &&
std::is_same< typename ViewTraits<DT,D1,D2,D3>::array_layout ,
typename ViewTraits<ST,S1,S2,S3>::array_layout >::value &&
dst.span_is_contiguous() &&
src.span_is_contiguous() &&
dst.span() == src.span() &&
dst.dimension_0() == src.dimension_0() &&
dst.dimension_1() == src.dimension_1() &&
dst.dimension_2() == src.dimension_2() &&
dst.dimension_3() == src.dimension_3() &&
dst.dimension_4() == src.dimension_4() &&
dst.dimension_5() == src.dimension_5() &&
dst.dimension_6() == src.dimension_6() &&
dst.dimension_7() == src.dimension_7() ) {
const size_t nbytes = sizeof(typename dst_type::value_type) * dst.span();
Kokkos::Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.data() , src.data() , nbytes );
}
else if ( DstExecCanAccessSrc ) {
// Copying data between views in accessible memory spaces and either non-contiguous or incompatible shape.
Kokkos::Experimental::Impl::ViewRemap< dst_type , src_type >( dst , src );
}
else {
Kokkos::Impl::throw_runtime_exception("deep_copy given views that would require a temporary allocation");
}
}
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
template< class T , class A1, class A2, class A3 >
inline
typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror
create_mirror( const Kokkos::Experimental::View<T,A1,A2,A3> & src
, typename std::enable_if<
! std::is_same< typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::array_layout
, Kokkos::LayoutStride >::value
>::type * = 0
)
{
typedef View<T,A1,A2,A3> src_type ;
typedef typename src_type::HostMirror dst_type ;
return dst_type( std::string( src.label() ).append("_mirror")
, src.dimension_0()
, src.dimension_1()
, src.dimension_2()
, src.dimension_3()
, src.dimension_4()
, src.dimension_5()
, src.dimension_6()
, src.dimension_7() );
}
template< class T , class A1, class A2, class A3 >
inline
typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror
create_mirror( const Kokkos::Experimental::View<T,A1,A2,A3> & src
, typename std::enable_if<
std::is_same< typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::array_layout
, Kokkos::LayoutStride >::value
>::type * = 0
)
{
typedef View<T,A1,A2,A3> src_type ;
typedef typename src_type::HostMirror dst_type ;
Kokkos::LayoutStride layout ;
layout.dimension[0] = src.dimension_0();
layout.dimension[1] = src.dimension_1();
layout.dimension[2] = src.dimension_2();
layout.dimension[3] = src.dimension_3();
layout.dimension[4] = src.dimension_4();
layout.dimension[5] = src.dimension_5();
layout.dimension[6] = src.dimension_6();
layout.dimension[7] = src.dimension_7();
layout.stride[0] = src.stride_0();
layout.stride[1] = src.stride_1();
layout.stride[2] = src.stride_2();
layout.stride[3] = src.stride_3();
layout.stride[4] = src.stride_4();
layout.stride[5] = src.stride_5();
layout.stride[6] = src.stride_6();
layout.stride[7] = src.stride_7();
return dst_type( std::string( src.label() ).append("_mirror") , layout );
}
template< class T , class A1 , class A2 , class A3 >
inline
typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror
create_mirror_view( const Kokkos::Experimental::View<T,A1,A2,A3> & src
, typename std::enable_if<(
- std::is_same< typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::memory_space
- , typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::host_mirror_space
+ std::is_same< typename Kokkos::Experimental::View<T,A1,A2,A3>::memory_space
+ , typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror::memory_space
+ >::value
+ &&
+ std::is_same< typename Kokkos::Experimental::View<T,A1,A2,A3>::data_type
+ , typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror::data_type
>::value
)>::type * = 0
)
{
return src ;
}
template< class T , class A1 , class A2 , class A3 >
inline
typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror
create_mirror_view( const Kokkos::Experimental::View<T,A1,A2,A3> & src
- , typename std::enable_if<(
- ! std::is_same< typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::memory_space
- , typename Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::host_mirror_space
- >::value
+ , typename std::enable_if< ! (
+ std::is_same< typename Kokkos::Experimental::View<T,A1,A2,A3>::memory_space
+ , typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror::memory_space
+ >::value
+ &&
+ std::is_same< typename Kokkos::Experimental::View<T,A1,A2,A3>::data_type
+ , typename Kokkos::Experimental::View<T,A1,A2,A3>::HostMirror::data_type
+ >::value
)>::type * = 0
)
{
return Kokkos::Experimental::create_mirror( src );
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
/** \brief Resize a view with copying old data to new data at the corresponding indices. */
template< class T , class A1 , class A2 , class A3 >
inline
void resize( Kokkos::Experimental::View<T,A1,A2,A3> & v ,
const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
{
typedef Kokkos::Experimental::View<T,A1,A2,A3> view_type ;
static_assert( Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::is_managed , "Can only resize managed views" );
view_type v_resized( v.label(), n0, n1, n2, n3, n4, n5, n6, n7 );
Kokkos::Experimental::Impl::ViewRemap< view_type , view_type >( v_resized , v );
v = v_resized ;
}
/** \brief Resize a view with copying old data to new data at the corresponding indices. */
template< class T , class A1 , class A2 , class A3 >
inline
void realloc( Kokkos::Experimental::View<T,A1,A2,A3> & v ,
const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
{
typedef Kokkos::Experimental::View<T,A1,A2,A3> view_type ;
static_assert( Kokkos::Experimental::ViewTraits<T,A1,A2,A3>::is_managed , "Can only realloc managed views" );
const std::string label = v.label();
v = view_type(); // Deallocate first, if the only view to allocation
v = view_type( label, n0, n1, n2, n3, n4, n5, n6, n7 );
}
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
namespace Kokkos {
template< class D , class A1 = void , class A2 = void , class A3 = void >
using ViewTraits = Kokkos::Experimental::ViewTraits<D,A1,A2,A3> ;
template< class D , class A1 = void , class A2 = void , class A3 = void , class S = void >
using View = Kokkos::Experimental::View<D,A1,A2,A3> ;
using Kokkos::Experimental::deep_copy ;
using Kokkos::Experimental::create_mirror ;
using Kokkos::Experimental::create_mirror_view ;
using Kokkos::Experimental::subview ;
using Kokkos::Experimental::resize ;
using Kokkos::Experimental::realloc ;
namespace Impl {
using Kokkos::Experimental::is_view ;
class ViewDefault {};
template< class SrcViewType
, class Arg0Type
, class Arg1Type
, class Arg2Type
, class Arg3Type
, class Arg4Type
, class Arg5Type
, class Arg6Type
, class Arg7Type
>
struct ViewSubview /* { typedef ... type ; } */ ;
}
} /* namespace Kokkos */
#include <impl/Kokkos_Atomic_View.hpp>
#endif /* #if defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif
diff --git a/lib/kokkos/core/src/Kokkos_Array.hpp b/lib/kokkos/core/src/Kokkos_Array.hpp
new file mode 100644
index 000000000..7fe8b1c39
--- /dev/null
+++ b/lib/kokkos/core/src/Kokkos_Array.hpp
@@ -0,0 +1,300 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_ARRAY
+#define KOKKOS_ARRAY
+
+#include <type_traits>
+#include <limits>
+
+namespace Kokkos {
+
+/**\brief Derived from the C++17 'std::array'.
+ * Dropping the iterator interface.
+ */
+template< class T = void
+ , size_t N = ~size_t(0)
+ , class Proxy = void
+ >
+struct Array {
+private:
+ T m_elem[N];
+public:
+
+ typedef T & reference ;
+ typedef typename std::add_const<T>::type & const_reference ;
+ typedef size_t size_type ;
+ typedef ptrdiff_t difference_type ;
+ typedef T value_type ;
+ typedef T * pointer ;
+ typedef typename std::add_const<T>::type * const_pointer ;
+
+ KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return N ; }
+ KOKKOS_INLINE_FUNCTION static constexpr bool empty(){ return false ; }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ reference operator[]( const iType & i )
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i];
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ const_reference operator[]( const iType & i ) const
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i];
+ }
+
+ KOKKOS_INLINE_FUNCTION pointer data() { return & m_elem[0] ; }
+ KOKKOS_INLINE_FUNCTION const_pointer data() const { return & m_elem[0] ; }
+
+ ~Array() = default ;
+ Array() = default ;
+ Array( const Array & ) = default ;
+ Array & operator = ( const Array & ) = default ;
+
+ // Some supported compilers are not sufficiently C++11 compliant
+ // for default move constructor and move assignment operator.
+ // Array( Array && ) = default ;
+ // Array & operator = ( Array && ) = default ;
+};
+
+
+template< class T , class Proxy >
+struct Array<T,0,Proxy> {
+public:
+
+ typedef typename std::add_const<T>::type & reference ;
+ typedef typename std::add_const<T>::type & const_reference ;
+ typedef size_t size_type ;
+ typedef ptrdiff_t difference_type ;
+ typedef typename std::add_const<T>::type value_type ;
+ typedef typename std::add_const<T>::type * pointer ;
+ typedef typename std::add_const<T>::type * const_pointer ;
+
+ KOKKOS_INLINE_FUNCTION static constexpr size_type size() { return 0 ; }
+ KOKKOS_INLINE_FUNCTION static constexpr bool empty() { return true ; }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ value_type operator[]( const iType & )
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integer argument" );
+ return value_type();
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ value_type operator[]( const iType & ) const
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integer argument" );
+ return value_type();
+ }
+
+ KOKKOS_INLINE_FUNCTION pointer data() { return pointer(0) ; }
+ KOKKOS_INLINE_FUNCTION const_pointer data() const { return const_pointer(0); }
+
+ ~Array() = default ;
+ Array() = default ;
+ Array( const Array & ) = default ;
+ Array & operator = ( const Array & ) = default ;
+
+ // Some supported compilers are not sufficiently C++11 compliant
+ // for default move constructor and move assignment operator.
+ // Array( Array && ) = default ;
+ // Array & operator = ( Array && ) = default ;
+};
+
+
+template<>
+struct Array<void,~size_t(0),void>
+{
+ struct contiguous {};
+ struct strided {};
+};
+
+template< class T >
+struct Array< T , ~size_t(0) , Array<>::contiguous >
+{
+private:
+ T * m_elem ;
+ size_t m_size ;
+public:
+
+ typedef T & reference ;
+ typedef typename std::add_const<T>::type & const_reference ;
+ typedef size_t size_type ;
+ typedef ptrdiff_t difference_type ;
+ typedef T value_type ;
+ typedef T * pointer ;
+ typedef typename std::add_const<T>::type * const_pointer ;
+
+ KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size ; }
+ KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size ; }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ reference operator[]( const iType & i )
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i];
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ const_reference operator[]( const iType & i ) const
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i];
+ }
+
+ KOKKOS_INLINE_FUNCTION pointer data() { return m_elem ; }
+ KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem ; }
+
+ ~Array() = default ;
+ Array() = delete ;
+ Array( const Array & rhs ) = delete ;
+
+ // Some supported compilers are not sufficiently C++11 compliant
+ // for default move constructor and move assignment operator.
+ // Array( Array && rhs ) = default ;
+ // Array & operator = ( Array && rhs ) = delete ;
+
+ KOKKOS_INLINE_FUNCTION
+ Array & operator = ( const Array & rhs )
+ {
+ const size_t n = std::min( m_size , rhs.size() );
+ for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ;
+ return *this ;
+ }
+
+ template< size_t N , class P >
+ KOKKOS_INLINE_FUNCTION
+ Array & operator = ( const Array<T,N,P> & rhs )
+ {
+ const size_t n = std::min( m_size , rhs.size() );
+ for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ;
+ return *this ;
+ }
+
+ KOKKOS_INLINE_FUNCTION constexpr Array( pointer arg_ptr , size_type arg_size , size_type = 0 )
+ : m_elem(arg_ptr), m_size(arg_size) {}
+};
+
+template< class T >
+struct Array< T , ~size_t(0) , Array<>::strided >
+{
+private:
+ T * m_elem ;
+ size_t m_size ;
+ size_t m_stride ;
+public:
+
+ typedef T & reference ;
+ typedef typename std::add_const<T>::type & const_reference ;
+ typedef size_t size_type ;
+ typedef ptrdiff_t difference_type ;
+ typedef T value_type ;
+ typedef T * pointer ;
+ typedef typename std::add_const<T>::type * const_pointer ;
+
+ KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_size ; }
+ KOKKOS_INLINE_FUNCTION constexpr bool empty() const { return 0 != m_size ; }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ reference operator[]( const iType & i )
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i*m_stride];
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ const_reference operator[]( const iType & i ) const
+ {
+ static_assert( std::is_integral<iType>::value , "Must be integral argument" );
+ return m_elem[i*m_stride];
+ }
+
+ KOKKOS_INLINE_FUNCTION pointer data() { return m_elem ; }
+ KOKKOS_INLINE_FUNCTION const_pointer data() const { return m_elem ; }
+
+ ~Array() = default ;
+ Array() = delete ;
+ Array( const Array & ) = delete ;
+
+
+ // Some supported compilers are not sufficiently C++11 compliant
+ // for default move constructor and move assignment operator.
+ // Array( Array && rhs ) = default ;
+ // Array & operator = ( Array && rhs ) = delete ;
+
+ KOKKOS_INLINE_FUNCTION
+ Array & operator = ( const Array & rhs )
+ {
+ const size_t n = std::min( m_size , rhs.size() );
+ for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ;
+ return *this ;
+ }
+
+ template< size_t N , class P >
+ KOKKOS_INLINE_FUNCTION
+ Array & operator = ( const Array<T,N,P> & rhs )
+ {
+ const size_t n = std::min( m_size , rhs.size() );
+ for ( size_t i = 0 ; i < n ; ++i ) m_elem[i] = rhs[i] ;
+ return *this ;
+ }
+
+ KOKKOS_INLINE_FUNCTION constexpr Array( pointer arg_ptr , size_type arg_size , size_type arg_stride )
+ : m_elem(arg_ptr), m_size(arg_size), m_stride(arg_stride) {}
+};
+
+} // namespace Kokkos
+
+#endif /* #ifndef KOKKOS_ARRAY */
+
diff --git a/lib/kokkos/core/src/Kokkos_Atomic.hpp b/lib/kokkos/core/src/Kokkos_Atomic.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Core.hpp b/lib/kokkos/core/src/Kokkos_Core.hpp
old mode 100755
new mode 100644
index c521e2315..2578313d7
--- a/lib/kokkos/core/src/Kokkos_Core.hpp
+++ b/lib/kokkos/core/src/Kokkos_Core.hpp
@@ -1,228 +1,235 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_CORE_HPP
#define KOKKOS_CORE_HPP
//----------------------------------------------------------------------------
// Include the execution space header files for the enabled execution spaces.
#include <Kokkos_Core_fwd.hpp>
#if defined( KOKKOS_HAVE_CUDA )
#include <Kokkos_Cuda.hpp>
#endif
#if defined( KOKKOS_HAVE_OPENMP )
#include <Kokkos_OpenMP.hpp>
#endif
#if defined( KOKKOS_HAVE_SERIAL )
#include <Kokkos_Serial.hpp>
#endif
#if defined( KOKKOS_HAVE_PTHREAD )
#include <Kokkos_Threads.hpp>
#endif
#include <Kokkos_Pair.hpp>
+#include <Kokkos_Array.hpp>
#include <Kokkos_View.hpp>
#include <Kokkos_Vectorization.hpp>
#include <Kokkos_Atomic.hpp>
#include <Kokkos_hwloc.hpp>
#include <iostream>
+#ifdef KOKKOS_HAVE_CXX11
+////#include <Kokkos_Complex.hpp>
+#endif
+
+
//----------------------------------------------------------------------------
namespace Kokkos {
struct InitArguments {
int num_threads;
int num_numa;
int device_id;
InitArguments() {
num_threads = -1;
num_numa = -1;
device_id = -1;
}
};
void initialize(int& narg, char* arg[]);
void initialize(const InitArguments& args = InitArguments());
/** \brief Finalize the spaces that were initialized via Kokkos::initialize */
void finalize();
/** \brief Finalize all known execution spaces */
void finalize_all();
void fence();
}
#ifdef KOKKOS_HAVE_CXX11
namespace Kokkos {
namespace Impl {
// should only by used by kokkos_malloc and kokkos_free
struct MallocHelper
{
static void increment_ref_count( AllocationTracker const & tracker )
{
tracker.increment_ref_count();
}
static void decrement_ref_count( AllocationTracker const & tracker )
{
tracker.decrement_ref_count();
}
};
} // namespace Impl
/* Allocate memory from a memory space.
* The allocation is tracked in Kokkos memory tracking system, so
* leaked memory can be identified.
*/
template< class Arg = DefaultExecutionSpace>
void* kokkos_malloc(const std::string label, size_t count) {
+ if(count == 0) return NULL;
typedef typename Arg::memory_space MemorySpace;
Impl::AllocationTracker tracker = MemorySpace::allocate_and_track(label,count);;
Impl::MallocHelper::increment_ref_count( tracker );
return tracker.alloc_ptr();
}
template< class Arg = DefaultExecutionSpace>
void* kokkos_malloc(const size_t& count) {
return kokkos_malloc<Arg>("DefaultLabel",count);
}
/* Free memory from a memory space.
*/
template< class Arg = DefaultExecutionSpace>
void kokkos_free(const void* ptr) {
typedef typename Arg::memory_space MemorySpace;
typedef typename MemorySpace::allocator allocator;
Impl::AllocationTracker tracker = Impl::AllocationTracker::find<allocator>(ptr);
if (tracker.is_valid()) {
Impl::MallocHelper::decrement_ref_count( tracker );
}
}
template< class Arg = DefaultExecutionSpace>
const void* kokkos_realloc(const void* old_ptr, size_t size) {
typedef typename Arg::memory_space MemorySpace;
typedef typename MemorySpace::allocator allocator;
Impl::AllocationTracker tracker = Impl::AllocationTracker::find<allocator>(old_ptr);
tracker.reallocate(size);
return tracker.alloc_ptr();
}
} // namespace Kokkos
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space >
inline
void * kokkos_malloc( const size_t arg_alloc_size )
{
typedef typename Space::memory_space MemorySpace ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< void , void > RecordBase ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< MemorySpace , void > RecordHost ;
RecordHost * const r = RecordHost::allocate( MemorySpace() , "kokkos_malloc" , arg_alloc_size );
RecordBase::increment( r );
return r->data();
}
template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space >
inline
void kokkos_free( void * arg_alloc )
{
typedef typename Space::memory_space MemorySpace ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< void , void > RecordBase ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< MemorySpace , void > RecordHost ;
RecordHost * const r = RecordHost::get_record( arg_alloc );
RecordBase::decrement( r );
}
template< class Space = typename Kokkos::DefaultExecutionSpace::memory_space >
inline
void * kokkos_realloc( void * arg_alloc , const size_t arg_alloc_size )
{
typedef typename Space::memory_space MemorySpace ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< void , void > RecordBase ;
typedef Kokkos::Experimental::Impl::SharedAllocationRecord< MemorySpace , void > RecordHost ;
RecordHost * const r_old = RecordHost::get_record( arg_alloc );
RecordHost * const r_new = RecordHost::allocate( MemorySpace() , "kokkos_malloc" , arg_alloc_size );
Kokkos::Impl::DeepCopy<MemorySpace,MemorySpace>( r_new->data() , r_old->data()
, std::min( r_old->size() , r_new->size() ) );
RecordBase::increment( r_new );
RecordBase::decrement( r_old );
return r_new->data();
}
} // namespace Experimental
} // namespace Kokkos
#endif
diff --git a/lib/kokkos/core/src/Kokkos_Core_fwd.hpp b/lib/kokkos/core/src/Kokkos_Core_fwd.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Cuda.hpp b/lib/kokkos/core/src/Kokkos_Cuda.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_CudaSpace.hpp b/lib/kokkos/core/src/Kokkos_CudaSpace.hpp
old mode 100755
new mode 100644
index 34915fd38..3caf25053
--- a/lib/kokkos/core/src/Kokkos_CudaSpace.hpp
+++ b/lib/kokkos/core/src/Kokkos_CudaSpace.hpp
@@ -1,656 +1,790 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_CUDASPACE_HPP
#define KOKKOS_CUDASPACE_HPP
#include <Kokkos_Core_fwd.hpp>
#if defined( KOKKOS_HAVE_CUDA )
#include <iosfwd>
#include <typeinfo>
#include <string>
#include <Kokkos_HostSpace.hpp>
#include <impl/Kokkos_AllocationTracker.hpp>
#include <Cuda/Kokkos_Cuda_abort.hpp>
#include <Cuda/Kokkos_Cuda_BasicAllocators.hpp>
/*--------------------------------------------------------------------------*/
namespace Kokkos {
/** \brief Cuda on-device memory management */
class CudaSpace {
public:
//! Tag this class as a kokkos memory space
typedef CudaSpace memory_space ;
typedef Kokkos::Cuda execution_space ;
typedef Kokkos::Device<execution_space,memory_space> device_type;
typedef unsigned int size_type ;
typedef Impl::CudaMallocAllocator allocator;
/** \brief Allocate a contiguous block of memory.
*
* The input label is associated with the block of memory.
* The block of memory is tracked via reference counting where
* allocation gives it a reference count of one.
*/
static Impl::AllocationTracker allocate_and_track( const std::string & label, const size_t size );
/*--------------------------------*/
/** \brief Cuda specific function to attached texture object to an allocation.
* Output the texture object, base pointer, and offset from the input pointer.
*/
#if defined( __CUDACC__ )
static void texture_object_attach( Impl::AllocationTracker const & tracker
, unsigned type_size
, ::cudaChannelFormatDesc const & desc
);
#endif
/*--------------------------------*/
CudaSpace();
CudaSpace( const CudaSpace & rhs ) = default ;
CudaSpace & operator = ( const CudaSpace & rhs ) = default ;
~CudaSpace() = default ;
/**\brief Allocate memory in the cuda space */
void * allocate( const size_t arg_alloc_size ) const ;
/**\brief Deallocate memory in the cuda space */
void deallocate( void * const arg_alloc_ptr
, const size_t arg_alloc_size ) const ;
/*--------------------------------*/
/** \brief Error reporting for HostSpace attempt to access CudaSpace */
static void access_error();
static void access_error( const void * const );
private:
int m_device ; ///< Which Cuda device
// friend class Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::CudaSpace , void > ;
};
namespace Impl {
/// \brief Initialize lock array for arbitrary size atomics.
///
/// Arbitrary atomics are implemented using a hash table of locks
/// where the hash value is derived from the address of the
/// object for which an atomic operation is performed.
/// This function initializes the locks to zero (unset).
void init_lock_array_cuda_space();
/// \brief Retrieve the pointer to the lock array for arbitrary size atomics.
///
/// Arbitrary atomics are implemented using a hash table of locks
/// where the hash value is derived from the address of the
/// object for which an atomic operation is performed.
/// This function retrieves the lock array pointer.
/// If the array is not yet allocated it will do so.
int* lock_array_cuda_space_ptr(bool deallocate = false);
}
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
/** \brief Cuda memory that is accessible to Host execution space
* through Cuda's unified virtual memory (UVM) runtime.
*/
class CudaUVMSpace {
public:
//! Tag this class as a kokkos memory space
typedef CudaUVMSpace memory_space ;
typedef Cuda execution_space ;
typedef Kokkos::Device<execution_space,memory_space> device_type;
typedef unsigned int size_type ;
/** \brief If UVM capability is available */
static bool available();
typedef Impl::CudaUVMAllocator allocator;
/** \brief Allocate a contiguous block of memory.
*
* The input label is associated with the block of memory.
* The block of memory is tracked via reference counting where
* allocation gives it a reference count of one.
*/
static Impl::AllocationTracker allocate_and_track( const std::string & label, const size_t size );
/** \brief Cuda specific function to attached texture object to an allocation.
* Output the texture object, base pointer, and offset from the input pointer.
*/
#if defined( __CUDACC__ )
static void texture_object_attach( Impl::AllocationTracker const & tracker
, unsigned type_size
, ::cudaChannelFormatDesc const & desc
);
#endif
/*--------------------------------*/
CudaUVMSpace();
CudaUVMSpace( const CudaUVMSpace & rhs ) = default ;
CudaUVMSpace & operator = ( const CudaUVMSpace & rhs ) = default ;
~CudaUVMSpace() = default ;
/**\brief Allocate memory in the cuda space */
void * allocate( const size_t arg_alloc_size ) const ;
/**\brief Deallocate memory in the cuda space */
void deallocate( void * const arg_alloc_ptr
, const size_t arg_alloc_size ) const ;
/*--------------------------------*/
private:
int m_device ; ///< Which Cuda device
};
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
/** \brief Host memory that is accessible to Cuda execution space
* through Cuda's host-pinned memory allocation.
*/
class CudaHostPinnedSpace {
public:
//! Tag this class as a kokkos memory space
/** \brief Memory is in HostSpace so use the HostSpace::execution_space */
typedef HostSpace::execution_space execution_space ;
typedef CudaHostPinnedSpace memory_space ;
typedef Kokkos::Device<execution_space,memory_space> device_type;
typedef unsigned int size_type ;
typedef Impl::CudaHostAllocator allocator ;
/** \brief Allocate a contiguous block of memory.
*
* The input label is associated with the block of memory.
* The block of memory is tracked via reference counting where
* allocation gives it a reference count of one.
*/
static Impl::AllocationTracker allocate_and_track( const std::string & label, const size_t size );
/*--------------------------------*/
CudaHostPinnedSpace();
CudaHostPinnedSpace( const CudaHostPinnedSpace & rhs ) = default ;
CudaHostPinnedSpace & operator = ( const CudaHostPinnedSpace & rhs ) = default ;
~CudaHostPinnedSpace() = default ;
/**\brief Allocate memory in the cuda space */
void * allocate( const size_t arg_alloc_size ) const ;
/**\brief Deallocate memory in the cuda space */
void deallocate( void * const arg_alloc_ptr
, const size_t arg_alloc_size ) const ;
/*--------------------------------*/
};
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace Impl {
-template<> struct DeepCopy< CudaSpace , CudaSpace >
+void DeepCopyAsyncCuda( void * dst , const void * src , size_t n);
+
+template<> struct DeepCopy< CudaSpace , CudaSpace , Cuda>
{
DeepCopy( void * dst , const void * src , size_t );
DeepCopy( const Cuda & , void * dst , const void * src , size_t );
};
-template<> struct DeepCopy< CudaSpace , HostSpace >
+template<> struct DeepCopy< CudaSpace , HostSpace , Cuda >
{
DeepCopy( void * dst , const void * src , size_t );
DeepCopy( const Cuda & , void * dst , const void * src , size_t );
};
-template<> struct DeepCopy< HostSpace , CudaSpace >
+template<> struct DeepCopy< HostSpace , CudaSpace , Cuda >
{
DeepCopy( void * dst , const void * src , size_t );
DeepCopy( const Cuda & , void * dst , const void * src , size_t );
};
-template<> struct DeepCopy< CudaSpace , CudaUVMSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaSpace , CudaSpace , ExecutionSpace >
+{
+ inline
+ DeepCopy( void * dst , const void * src , size_t n )
+ { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
+};
+
+template<class ExecutionSpace> struct DeepCopy< CudaSpace , HostSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , HostSpace , Cuda>( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
+};
+
+template<class ExecutionSpace>
+struct DeepCopy< HostSpace , CudaSpace , ExecutionSpace >
+{
+ inline
+ DeepCopy( void * dst , const void * src , size_t n )
+ { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
+};
+
+template<class ExecutionSpace>
+struct DeepCopy< CudaSpace , CudaUVMSpace , ExecutionSpace >
+{
+ inline
+ DeepCopy( void * dst , const void * src , size_t n )
+ { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaSpace , CudaHostPinnedSpace >
+template<class ExecutionSpace>
+struct DeepCopy< CudaSpace , CudaHostPinnedSpace , ExecutionSpace>
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaUVMSpace , CudaSpace >
+template<class ExecutionSpace>
+struct DeepCopy< CudaUVMSpace , CudaSpace , ExecutionSpace>
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaUVMSpace , CudaUVMSpace >
+template<class ExecutionSpace>
+struct DeepCopy< CudaUVMSpace , CudaUVMSpace , ExecutionSpace>
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaUVMSpace , CudaHostPinnedSpace >
+template<class ExecutionSpace>
+struct DeepCopy< CudaUVMSpace , CudaHostPinnedSpace , ExecutionSpace>
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaUVMSpace , HostSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaUVMSpace , HostSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< CudaSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< CudaSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaHostPinnedSpace , CudaSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaHostPinnedSpace , CudaSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaHostPinnedSpace , CudaUVMSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaHostPinnedSpace , CudaUVMSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaHostPinnedSpace , CudaHostPinnedSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaHostPinnedSpace , CudaHostPinnedSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< CudaHostPinnedSpace , HostSpace >
+template<class ExecutionSpace> struct DeepCopy< CudaHostPinnedSpace , HostSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< HostSpace , CudaUVMSpace >
+template<class ExecutionSpace> struct DeepCopy< HostSpace , CudaUVMSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , CudaSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , CudaSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
-template<> struct DeepCopy< HostSpace , CudaHostPinnedSpace >
+template<class ExecutionSpace> struct DeepCopy< HostSpace , CudaHostPinnedSpace , ExecutionSpace >
{
inline
DeepCopy( void * dst , const void * src , size_t n )
- { (void) DeepCopy< HostSpace , HostSpace >( dst , src , n ); }
+ { (void) DeepCopy< HostSpace , HostSpace , Cuda >( dst , src , n ); }
+
+ inline
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n )
+ {
+ exec.fence();
+ DeepCopyAsyncCuda (dst,src,n);
+ }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
/** Running in CudaSpace attempting to access HostSpace: error */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::HostSpace >
{
enum { value = false };
KOKKOS_INLINE_FUNCTION static void verify( void )
{ Kokkos::abort("Cuda code attempted to access HostSpace memory"); }
KOKKOS_INLINE_FUNCTION static void verify( const void * )
{ Kokkos::abort("Cuda code attempted to access HostSpace memory"); }
};
/** Running in CudaSpace accessing CudaUVMSpace: ok */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::CudaUVMSpace >
{
enum { value = true };
KOKKOS_INLINE_FUNCTION static void verify( void ) { }
KOKKOS_INLINE_FUNCTION static void verify( const void * ) { }
};
/** Running in CudaSpace accessing CudaHostPinnedSpace: ok */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::CudaSpace , Kokkos::CudaHostPinnedSpace >
{
enum { value = true };
KOKKOS_INLINE_FUNCTION static void verify( void ) { }
KOKKOS_INLINE_FUNCTION static void verify( const void * ) { }
};
/** Running in CudaSpace attempting to access an unknown space: error */
template< class OtherSpace >
struct VerifyExecutionCanAccessMemorySpace<
typename enable_if< ! is_same<Kokkos::CudaSpace,OtherSpace>::value , Kokkos::CudaSpace >::type ,
OtherSpace >
{
enum { value = false };
KOKKOS_INLINE_FUNCTION static void verify( void )
{ Kokkos::abort("Cuda code attempted to access unknown Space memory"); }
KOKKOS_INLINE_FUNCTION static void verify( const void * )
{ Kokkos::abort("Cuda code attempted to access unknown Space memory"); }
};
//----------------------------------------------------------------------------
/** Running in HostSpace attempting to access CudaSpace */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaSpace >
{
enum { value = false };
inline static void verify( void ) { CudaSpace::access_error(); }
inline static void verify( const void * p ) { CudaSpace::access_error(p); }
};
/** Running in HostSpace accessing CudaUVMSpace is OK */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaUVMSpace >
{
enum { value = true };
inline static void verify( void ) { }
inline static void verify( const void * ) { }
};
/** Running in HostSpace accessing CudaHostPinnedSpace is OK */
template<>
struct VerifyExecutionCanAccessMemorySpace< Kokkos::HostSpace , Kokkos::CudaHostPinnedSpace >
{
enum { value = true };
KOKKOS_INLINE_FUNCTION static void verify( void ) {}
KOKKOS_INLINE_FUNCTION static void verify( const void * ) {}
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template<>
class SharedAllocationRecord< Kokkos::CudaSpace , void >
: public SharedAllocationRecord< void , void >
{
private:
friend class SharedAllocationRecord< Kokkos::CudaUVMSpace , void > ;
typedef SharedAllocationRecord< void , void > RecordBase ;
SharedAllocationRecord( const SharedAllocationRecord & ) = delete ;
SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ;
static void deallocate( RecordBase * );
static ::cudaTextureObject_t
attach_texture_object( const unsigned sizeof_alias
, void * const alloc_ptr
, const size_t alloc_size );
static RecordBase s_root_record ;
::cudaTextureObject_t m_tex_obj ;
const Kokkos::CudaSpace m_space ;
protected:
~SharedAllocationRecord();
SharedAllocationRecord() : RecordBase(), m_tex_obj(0), m_space() {}
SharedAllocationRecord( const Kokkos::CudaSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const RecordBase::function_type arg_dealloc = & deallocate
);
public:
std::string get_label() const ;
static SharedAllocationRecord * allocate( const Kokkos::CudaSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
);
template< typename AliasType >
inline
::cudaTextureObject_t attach_texture_object()
{
static_assert( ( std::is_same< AliasType , int >::value ||
std::is_same< AliasType , ::int2 >::value ||
std::is_same< AliasType , ::int4 >::value )
, "Cuda texture fetch only supported for alias types of int, ::int2, or ::int4" );
if ( m_tex_obj == 0 ) {
m_tex_obj = attach_texture_object( sizeof(AliasType)
, (void*) RecordBase::m_alloc_ptr
, RecordBase::m_alloc_size );
}
return m_tex_obj ;
}
template< typename AliasType >
inline
int attach_texture_object_offset( const AliasType * const ptr )
{
// Texture object is attached to the entire allocation range
return ptr - reinterpret_cast<AliasType*>( RecordBase::m_alloc_ptr );
}
static SharedAllocationRecord * get_record( void * arg_alloc_ptr );
static void print_records( std::ostream & , const Kokkos::CudaSpace & , bool detail = false );
};
template<>
class SharedAllocationRecord< Kokkos::CudaUVMSpace , void >
: public SharedAllocationRecord< void , void >
{
private:
typedef SharedAllocationRecord< void , void > RecordBase ;
SharedAllocationRecord( const SharedAllocationRecord & ) = delete ;
SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ;
static void deallocate( RecordBase * );
static RecordBase s_root_record ;
::cudaTextureObject_t m_tex_obj ;
const Kokkos::CudaUVMSpace m_space ;
protected:
~SharedAllocationRecord();
SharedAllocationRecord() : RecordBase(), m_tex_obj(0), m_space() {}
SharedAllocationRecord( const Kokkos::CudaUVMSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const RecordBase::function_type arg_dealloc = & deallocate
);
public:
std::string get_label() const ;
static SharedAllocationRecord * allocate( const Kokkos::CudaUVMSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
);
template< typename AliasType >
inline
::cudaTextureObject_t attach_texture_object()
{
static_assert( ( std::is_same< AliasType , int >::value ||
std::is_same< AliasType , ::int2 >::value ||
std::is_same< AliasType , ::int4 >::value )
, "Cuda texture fetch only supported for alias types of int, ::int2, or ::int4" );
if ( m_tex_obj == 0 ) {
m_tex_obj = SharedAllocationRecord< Kokkos::CudaSpace , void >::
attach_texture_object( sizeof(AliasType)
, (void*) RecordBase::m_alloc_ptr
, RecordBase::m_alloc_size );
}
return m_tex_obj ;
}
template< typename AliasType >
inline
int attach_texture_object_offset( const AliasType * const ptr )
{
// Texture object is attached to the entire allocation range
return ptr - reinterpret_cast<AliasType*>( RecordBase::m_alloc_ptr );
}
static SharedAllocationRecord * get_record( void * arg_alloc_ptr );
static void print_records( std::ostream & , const Kokkos::CudaUVMSpace & , bool detail = false );
};
template<>
class SharedAllocationRecord< Kokkos::CudaHostPinnedSpace , void >
: public SharedAllocationRecord< void , void >
{
private:
typedef SharedAllocationRecord< void , void > RecordBase ;
SharedAllocationRecord( const SharedAllocationRecord & ) = delete ;
SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ;
static void deallocate( RecordBase * );
static RecordBase s_root_record ;
const Kokkos::CudaHostPinnedSpace m_space ;
protected:
~SharedAllocationRecord();
SharedAllocationRecord() : RecordBase(), m_space() {}
SharedAllocationRecord( const Kokkos::CudaHostPinnedSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const RecordBase::function_type arg_dealloc = & deallocate
);
public:
std::string get_label() const ;
static SharedAllocationRecord * allocate( const Kokkos::CudaHostPinnedSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
);
static SharedAllocationRecord * get_record( void * arg_alloc_ptr );
static void print_records( std::ostream & , const Kokkos::CudaHostPinnedSpace & , bool detail = false );
};
} // namespace Impl
} // namespace Experimental
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
#endif /* #define KOKKOS_CUDASPACE_HPP */
diff --git a/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp b/lib/kokkos/core/src/Kokkos_ExecPolicy.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_HostSpace.hpp b/lib/kokkos/core/src/Kokkos_HostSpace.hpp
old mode 100755
new mode 100644
index 012743d43..2aa809e7c
--- a/lib/kokkos/core/src/Kokkos_HostSpace.hpp
+++ b/lib/kokkos/core/src/Kokkos_HostSpace.hpp
@@ -1,270 +1,276 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_HOSTSPACE_HPP
#define KOKKOS_HOSTSPACE_HPP
#include <cstring>
#include <string>
#include <iosfwd>
#include <typeinfo>
#include <Kokkos_Core_fwd.hpp>
#include <Kokkos_MemoryTraits.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_Error.hpp>
#include <impl/Kokkos_AllocationTracker.hpp>
#include <impl/Kokkos_BasicAllocators.hpp>
#include <impl/KokkosExp_SharedAlloc.hpp>
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace Impl {
/// \brief Initialize lock array for arbitrary size atomics.
///
/// Arbitrary atomics are implemented using a hash table of locks
/// where the hash value is derived from the address of the
/// object for which an atomic operation is performed.
/// This function initializes the locks to zero (unset).
void init_lock_array_host_space();
/// \brief Aquire a lock for the address
///
/// This function tries to aquire the lock for the hash value derived
/// from the provided ptr. If the lock is successfully aquired the
/// function returns true. Otherwise it returns false.
bool lock_address_host_space(void* ptr);
/// \brief Release lock for the address
///
/// This function releases the lock for the hash value derived
/// from the provided ptr. This function should only be called
/// after previously successfully aquiring a lock with
/// lock_address.
void unlock_address_host_space(void* ptr);
} // namespace Impl
} // namespace Kokkos
namespace Kokkos {
/// \class HostSpace
/// \brief Memory management for host memory.
///
/// HostSpace is a memory space that governs host memory. "Host"
/// memory means the usual CPU-accessible memory.
class HostSpace {
public:
//! Tag this class as a kokkos memory space
typedef HostSpace memory_space ;
typedef size_t size_type ;
/// \typedef execution_space
/// \brief Default execution space for this memory space.
///
/// Every memory space has a default execution space. This is
/// useful for things like initializing a View (which happens in
/// parallel using the View's default execution space).
#if defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP )
typedef Kokkos::OpenMP execution_space ;
#elif defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS )
typedef Kokkos::Threads execution_space ;
#elif defined( KOKKOS_HAVE_OPENMP )
typedef Kokkos::OpenMP execution_space ;
#elif defined( KOKKOS_HAVE_PTHREAD )
typedef Kokkos::Threads execution_space ;
#elif defined( KOKKOS_HAVE_SERIAL )
typedef Kokkos::Serial execution_space ;
#else
# error "At least one of the following host execution spaces must be defined: Kokkos::OpenMP, Kokkos::Serial, or Kokkos::Threads. You might be seeing this message if you disabled the Kokkos::Serial device explicitly using the Kokkos_ENABLE_Serial:BOOL=OFF CMake option, but did not enable any of the other host execution space devices."
#endif
//! This memory space preferred device_type
typedef Kokkos::Device<execution_space,memory_space> device_type;
#if defined( KOKKOS_USE_PAGE_ALIGNED_HOST_MEMORY )
typedef Impl::PageAlignedAllocator allocator ;
#else
typedef Impl::AlignedAllocator allocator ;
#endif
/** \brief Allocate a contiguous block of memory.
*
* The input label is associated with the block of memory.
* The block of memory is tracked via reference counting where
* allocation gives it a reference count of one.
*/
static Impl::AllocationTracker allocate_and_track( const std::string & label, const size_t size );
/*--------------------------------*/
/* Functions unique to the HostSpace */
static int in_parallel();
static void register_in_parallel( int (*)() );
/*--------------------------------*/
/**\brief Default memory space instance */
HostSpace();
HostSpace( const HostSpace & rhs ) = default ;
HostSpace & operator = ( const HostSpace & ) = default ;
~HostSpace() = default ;
/**\brief Non-default memory space instance to choose allocation mechansim, if available */
enum AllocationMechanism { STD_MALLOC , POSIX_MEMALIGN , POSIX_MMAP , INTEL_MM_ALLOC };
explicit
HostSpace( const AllocationMechanism & );
/**\brief Allocate memory in the host space */
void * allocate( const size_t arg_alloc_size ) const ;
/**\brief Deallocate memory in the host space */
void deallocate( void * const arg_alloc_ptr
, const size_t arg_alloc_size ) const ;
private:
AllocationMechanism m_alloc_mech ;
friend class Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::HostSpace , void > ;
};
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template<>
class SharedAllocationRecord< Kokkos::HostSpace , void >
: public SharedAllocationRecord< void , void >
{
private:
friend Kokkos::HostSpace ;
typedef SharedAllocationRecord< void , void > RecordBase ;
SharedAllocationRecord( const SharedAllocationRecord & ) = delete ;
SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ;
static void deallocate( RecordBase * );
/**\brief Root record for tracked allocations from this HostSpace instance */
static RecordBase s_root_record ;
const Kokkos::HostSpace m_space ;
protected:
~SharedAllocationRecord();
SharedAllocationRecord() = default ;
SharedAllocationRecord( const Kokkos::HostSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const RecordBase::function_type arg_dealloc = & deallocate
);
public:
inline
std::string get_label() const
{
return std::string( RecordBase::head()->m_label );
}
KOKKOS_INLINE_FUNCTION static
SharedAllocationRecord * allocate( const Kokkos::HostSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
)
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
return new SharedAllocationRecord( arg_space , arg_label , arg_alloc_size );
#else
return (SharedAllocationRecord *) 0 ;
#endif
}
static SharedAllocationRecord * get_record( void * arg_alloc_ptr );
static void print_records( std::ostream & , const Kokkos::HostSpace & , bool detail = false );
};
} // namespace Impl
} // namespace Experimental
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
-template< class , class > struct DeepCopy ;
-
-template<>
-struct DeepCopy<HostSpace,HostSpace> {
- DeepCopy( void * dst , const void * src , size_t n );
+template< class DstSpace, class SrcSpace, class ExecutionSpace = typename DstSpace::execution_space> struct DeepCopy ;
+
+template<class ExecutionSpace>
+struct DeepCopy<HostSpace,HostSpace,ExecutionSpace> {
+ DeepCopy( void * dst , const void * src , size_t n ) {
+ memcpy( dst , src , n );
+ }
+ DeepCopy( const ExecutionSpace& exec, void * dst , const void * src , size_t n ) {
+ exec.fence();
+ memcpy( dst , src , n );
+ }
};
} // namespace Impl
} // namespace Kokkos
#endif /* #define KOKKOS_HOSTSPACE_HPP */
diff --git a/lib/kokkos/core/src/Kokkos_Layout.hpp b/lib/kokkos/core/src/Kokkos_Layout.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Macros.hpp b/lib/kokkos/core/src/Kokkos_Macros.hpp
old mode 100755
new mode 100644
index 3978a0622..c221c2f9f
--- a/lib/kokkos/core/src/Kokkos_Macros.hpp
+++ b/lib/kokkos/core/src/Kokkos_Macros.hpp
@@ -1,397 +1,420 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_MACROS_HPP
#define KOKKOS_MACROS_HPP
//----------------------------------------------------------------------------
/** Pick up configure/build options via #define macros:
*
* KOKKOS_HAVE_CUDA Kokkos::Cuda execution and memory spaces
* KOKKOS_HAVE_PTHREAD Kokkos::Threads execution space
* KOKKOS_HAVE_QTHREAD Kokkos::Qthread execution space
* KOKKOS_HAVE_OPENMP Kokkos::OpenMP execution space
* KOKKOS_HAVE_HWLOC HWLOC library is available
* KOKKOS_ENABLE_DEBUG_BOUNDS_CHECK insert array bounds checks, is expensive!
* KOKKOS_HAVE_CXX11 enable C++11 features
*
* KOKKOS_HAVE_MPI negotiate MPI/execution space interactions
*
* KOKKOS_USE_CUDA_UVM Use CUDA UVM for Cuda memory space
*/
#ifndef KOKKOS_DONT_INCLUDE_CORE_CONFIG_H
#include <KokkosCore_config.h>
#endif
//----------------------------------------------------------------------------
/** Pick up compiler specific #define macros:
*
* Macros for known compilers evaluate to an integral version value
*
* KOKKOS_COMPILER_NVCC
* KOKKOS_COMPILER_GNU
* KOKKOS_COMPILER_INTEL
* KOKKOS_COMPILER_IBM
* KOKKOS_COMPILER_CRAYC
* KOKKOS_COMPILER_APPLECC
* KOKKOS_COMPILER_CLANG
* KOKKOS_COMPILER_PGI
*
* Macros for which compiler extension to use for atomics on intrinsice types
*
* KOKKOS_ATOMICS_USE_CUDA
* KOKKOS_ATOMICS_USE_GNU
* KOKKOS_ATOMICS_USE_INTEL
* KOKKOS_ATOMICS_USE_OPENMP31
*
* A suite of 'KOKKOS_HAVE_PRAGMA_...' are defined for internal use.
*
* Macros for marking functions to run in an execution space:
*
* KOKKOS_FUNCTION
* KOKKOS_INLINE_FUNCTION request compiler to inline
* KOKKOS_FORCEINLINE_FUNCTION force compiler to inline, use with care!
*/
//----------------------------------------------------------------------------
#if defined( KOKKOS_HAVE_CUDA ) && defined( __CUDACC__ )
/* Compiling with a CUDA compiler.
*
* Include <cuda.h> to pick up the CUDA_VERSION macro defined as:
* CUDA_VERSION = ( MAJOR_VERSION * 1000 ) + ( MINOR_VERSION * 10 )
*
* When generating device code the __CUDA_ARCH__ macro is defined as:
* __CUDA_ARCH__ = ( MAJOR_CAPABILITY * 100 ) + ( MINOR_CAPABILITY * 10 )
*/
#include <cuda_runtime.h>
#include <cuda.h>
#if ! defined( CUDA_VERSION )
#error "#include <cuda.h> did not define CUDA_VERSION"
#endif
#if ( CUDA_VERSION < 6050 )
// CUDA supports (inofficially) C++11 in device code starting with
// version 6.5. This includes auto type and device code internal
// lambdas.
#error "Cuda version 6.5 or greater required"
#endif
#if defined( __CUDA_ARCH__ ) && ( __CUDA_ARCH__ < 300 )
/* Compiling with CUDA compiler for device code. */
#error "Cuda device capability >= 3.0 is required"
#endif
+#ifdef KOKKOS_CUDA_USE_LAMBDA
+#if ( CUDA_VERSION < 7000 )
+// CUDA supports C++11 lambdas generated in host code to be given
+// to the device starting with version 7.5. But the release candidate (7.5.6)
+// still identifies as 7.0
+#error "Cuda version 7.5 or greater required for host-to-device Lambda support"
+#endif
+#define KOKKOS_LAMBDA [=]__device__
+#define KOKKOS_HAVE_CXX11_DISPATCH_LAMBDA 1
+#endif
#endif /* #if defined( KOKKOS_HAVE_CUDA ) && defined( __CUDACC__ ) */
/*--------------------------------------------------------------------------*/
/* Language info: C++, CUDA, OPENMP */
#if defined( __CUDA_ARCH__ ) && defined( KOKKOS_HAVE_CUDA )
// Compiling Cuda code to 'ptx'
#define KOKKOS_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__
#define KOKKOS_INLINE_FUNCTION __device__ __host__ inline
#define KOKKOS_FUNCTION __device__ __host__
#endif /* #if defined( __CUDA_ARCH__ ) */
#if defined( _OPENMP )
/* Compiling with OpenMP.
* The value of _OPENMP is an integer value YYYYMM
* where YYYY and MM are the year and month designation
* of the supported OpenMP API version.
*/
#endif /* #if defined( _OPENMP ) */
/*--------------------------------------------------------------------------*/
/* Mapping compiler built-ins to KOKKOS_COMPILER_*** macros */
#if defined( __NVCC__ )
// NVIDIA compiler is being used.
// Code is parsed and separated into host and device code.
// Host code is compiled again with another compiler.
// Device code is compile to 'ptx'.
#define KOKKOS_COMPILER_NVCC __NVCC__
#else
#if defined( KOKKOS_HAVE_CXX11 ) && ! defined( KOKKOS_HAVE_CXX11_DISPATCH_LAMBDA )
// CUDA (including version 6.5) does not support giving lambdas as
// arguments to global functions. Thus its not currently possible
// to dispatch lambdas from the host.
#define KOKKOS_HAVE_CXX11_DISPATCH_LAMBDA 1
#endif
#endif /* #if defined( __NVCC__ ) */
#if defined( KOKKOS_HAVE_CXX11 ) && !defined (KOKKOS_LAMBDA)
#define KOKKOS_LAMBDA [=]
#endif
#if ! defined( __CUDA_ARCH__ ) /* Not compiling Cuda code to 'ptx'. */
/* Intel compiler for host code */
#if defined( __INTEL_COMPILER )
#define KOKKOS_COMPILER_INTEL __INTEL_COMPILER
#elif defined( __ICC )
// Old define
#define KOKKOS_COMPILER_INTEL __ICC
#elif defined( __ECC )
// Very old define
#define KOKKOS_COMPILER_INTEL __ECC
#endif
/* CRAY compiler for host code */
#if defined( _CRAYC )
#define KOKKOS_COMPILER_CRAYC _CRAYC
#endif
#if defined( __IBMCPP__ )
// IBM C++
#define KOKKOS_COMPILER_IBM __IBMCPP__
#elif defined( __IBMC__ )
#define KOKKOS_COMPILER_IBM __IBMC__
#endif
#if defined( __APPLE_CC__ )
#define KOKKOS_COMPILER_APPLECC __APPLE_CC__
#endif
#if defined (__clang__) && !defined (KOKKOS_COMPILER_INTEL)
#define KOKKOS_COMPILER_CLANG __clang_major__*100+__clang_minor__*10+__clang_patchlevel__
#endif
#if ! defined( __clang__ ) && ! defined( KOKKOS_COMPILER_INTEL ) &&defined( __GNUC__ )
#define KOKKOS_COMPILER_GNU __GNUC__*100+__GNUC_MINOR__*10+__GNUC_PATCHLEVEL__
+ #if ( 472 > KOKKOS_COMPILER_GNU )
+ #error "Compiling with GCC version earlier than 4.7.2 is not supported."
+ #endif
#endif
#if defined( __PGIC__ ) && ! defined( __GNUC__ )
#define KOKKOS_COMPILER_PGI __PGIC__*100+__PGIC_MINOR__*10+__PGIC_PATCHLEVEL__
+ #if ( 1540 > KOKKOS_COMPILER_PGI )
+ #error "Compiling with PGI version earlier than 15.4 is not supported."
+ #endif
#endif
#endif /* #if ! defined( __CUDA_ARCH__ ) */
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/* Intel compiler macros */
#if defined( KOKKOS_COMPILER_INTEL )
#define KOKKOS_HAVE_PRAGMA_UNROLL 1
#define KOKKOS_HAVE_PRAGMA_IVDEP 1
#define KOKKOS_HAVE_PRAGMA_LOOPCOUNT 1
#define KOKKOS_HAVE_PRAGMA_VECTOR 1
#define KOKKOS_HAVE_PRAGMA_SIMD 1
-#if ( 1200 <= KOKKOS_COMPILER_INTEL ) && ! defined( KOKKOS_ENABLE_ASM ) && ! defined( _WIN32 )
+ #if ( 1400 > KOKKOS_COMPILER_INTEL )
+ #if ( 1300 > KOKKOS_COMPILER_INTEL )
+ #error "Compiling with Intel version earlier than 13.0 is not supported. Official minimal version is 14.0."
+ #else
+ #warning "Compiling with Intel version 13.x probably works but is not officially supported. Official minimal version is 14.0."
+ #endif
+ #endif
+ #if ( 1200 <= KOKKOS_COMPILER_INTEL ) && ! defined( KOKKOS_ENABLE_ASM ) && ! defined( _WIN32 )
#define KOKKOS_ENABLE_ASM 1
#endif
#if ( 1200 <= KOKKOS_COMPILER_INTEL ) && ! defined( KOKKOS_FORCEINLINE_FUNCTION )
#if !defined (_WIN32)
#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
#else
#define KOKKOS_FORCEINLINE_FUNCTION inline
#endif
#endif
#if defined( __MIC__ )
// Compiling for Xeon Phi
#endif
#endif
/*--------------------------------------------------------------------------*/
/* Cray compiler macros */
#if defined( KOKKOS_COMPILER_CRAYC )
#endif
/*--------------------------------------------------------------------------*/
/* IBM Compiler macros */
#if defined( KOKKOS_COMPILER_IBM )
#define KOKKOS_HAVE_PRAGMA_UNROLL 1
//#define KOKKOS_HAVE_PRAGMA_IVDEP 1
//#define KOKKOS_HAVE_PRAGMA_LOOPCOUNT 1
//#define KOKKOS_HAVE_PRAGMA_VECTOR 1
//#define KOKKOS_HAVE_PRAGMA_SIMD 1
#endif
/*--------------------------------------------------------------------------*/
/* CLANG compiler macros */
#if defined( KOKKOS_COMPILER_CLANG )
//#define KOKKOS_HAVE_PRAGMA_UNROLL 1
//#define KOKKOS_HAVE_PRAGMA_IVDEP 1
//#define KOKKOS_HAVE_PRAGMA_LOOPCOUNT 1
//#define KOKKOS_HAVE_PRAGMA_VECTOR 1
//#define KOKKOS_HAVE_PRAGMA_SIMD 1
#if ! defined( KOKKOS_FORCEINLINE_FUNCTION )
#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
#endif
#endif
/*--------------------------------------------------------------------------*/
/* GNU Compiler macros */
#if defined( KOKKOS_COMPILER_GNU )
//#define KOKKOS_HAVE_PRAGMA_UNROLL 1
//#define KOKKOS_HAVE_PRAGMA_IVDEP 1
//#define KOKKOS_HAVE_PRAGMA_LOOPCOUNT 1
//#define KOKKOS_HAVE_PRAGMA_VECTOR 1
//#define KOKKOS_HAVE_PRAGMA_SIMD 1
#if ! defined( KOKKOS_FORCEINLINE_FUNCTION )
#define KOKKOS_FORCEINLINE_FUNCTION inline __attribute__((always_inline))
#endif
#if ! defined( KOKKOS_ENABLE_ASM ) && \
! ( defined( __powerpc) || \
defined(__powerpc__) || \
defined(__powerpc64__) || \
defined(__POWERPC__) || \
defined(__ppc__) || \
defined(__ppc64__) || \
defined(__PGIC__) )
#define KOKKOS_ENABLE_ASM 1
#endif
#endif
/*--------------------------------------------------------------------------*/
#if defined( KOKKOS_COMPILER_PGI )
#define KOKKOS_HAVE_PRAGMA_UNROLL 1
#define KOKKOS_HAVE_PRAGMA_IVDEP 1
//#define KOKKOS_HAVE_PRAGMA_LOOPCOUNT 1
#define KOKKOS_HAVE_PRAGMA_VECTOR 1
//#define KOKKOS_HAVE_PRAGMA_SIMD 1
#endif
/*--------------------------------------------------------------------------*/
#if defined( KOKKOS_COMPILER_NVCC )
#if defined(__CUDA_ARCH__ )
#define KOKKOS_HAVE_PRAGMA_UNROLL 1
#endif
#endif
//----------------------------------------------------------------------------
/** Define function marking macros if compiler specific macros are undefined: */
#if ! defined( KOKKOS_FORCEINLINE_FUNCTION )
#define KOKKOS_FORCEINLINE_FUNCTION inline
#endif
#if ! defined( KOKKOS_INLINE_FUNCTION )
#define KOKKOS_INLINE_FUNCTION inline
#endif
#if ! defined( KOKKOS_FUNCTION )
#define KOKKOS_FUNCTION /**/
#endif
//----------------------------------------------------------------------------
/** Determine the default execution space for parallel dispatch.
* There is zero or one default execution space specified.
*/
#if 1 < ( ( defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_CUDA ) ? 1 : 0 ) + \
( defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP ) ? 1 : 0 ) + \
( defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS ) ? 1 : 0 ) + \
( defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL ) ? 1 : 0 ) )
#error "More than one KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_* specified" ;
#endif
/** If default is not specified then chose from enabled execution spaces.
* Priority: CUDA, OPENMP, THREADS, SERIAL
*/
#if defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_CUDA )
#elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP )
#elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS )
#elif defined ( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL )
#elif defined ( KOKKOS_HAVE_CUDA )
#define KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_CUDA
#elif defined ( KOKKOS_HAVE_OPENMP )
#define KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP
#elif defined ( KOKKOS_HAVE_PTHREAD )
#define KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS
#else
#define KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL
#endif
//----------------------------------------------------------------------------
/** Determine for what space the code is being compiled: */
#if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined (KOKKOS_HAVE_CUDA)
#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA
#else
#define KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* #ifndef KOKKOS_MACROS_HPP */
diff --git a/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp b/lib/kokkos/core/src/Kokkos_MemoryTraits.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_OpenMP.hpp b/lib/kokkos/core/src/Kokkos_OpenMP.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Pair.hpp b/lib/kokkos/core/src/Kokkos_Pair.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Parallel.hpp b/lib/kokkos/core/src/Kokkos_Parallel.hpp
old mode 100755
new mode 100644
index d714485e7..93bffcc78
--- a/lib/kokkos/core/src/Kokkos_Parallel.hpp
+++ b/lib/kokkos/core/src/Kokkos_Parallel.hpp
@@ -1,908 +1,908 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
/// \file Kokkos_Parallel.hpp
/// \brief Declaration of parallel operators
#ifndef KOKKOS_PARALLEL_HPP
#define KOKKOS_PARALLEL_HPP
#include <cstddef>
#include <Kokkos_Core_fwd.hpp>
#include <Kokkos_View.hpp>
#include <Kokkos_ExecPolicy.hpp>
#ifdef KOKKOSP_ENABLE_PROFILING
#include <impl/Kokkos_Profiling_Interface.hpp>
#include <typeinfo>
#endif
#include <impl/Kokkos_AllocationTracker.hpp>
#include <impl/Kokkos_Tags.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_FunctorAdapter.hpp>
#ifdef KOKKOS_HAVE_DEBUG
#include<iostream>
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
//----------------------------------------------------------------------------
/** \brief Given a Functor and Execution Policy query an execution space.
*
* if the Policy has an execution space use that
* else if the Functor has an execution_space use that
* else if the Functor has a device_type use that for backward compatibility
* else use the default
*/
template< class Functor
, class Policy
, class EnableFunctor = void
, class EnablePolicy = void
>
struct FunctorPolicyExecutionSpace {
typedef Kokkos::DefaultExecutionSpace execution_space ;
};
template< class Functor , class Policy >
struct FunctorPolicyExecutionSpace
< Functor , Policy
, typename enable_if_type< typename Functor::device_type >::type
, typename enable_if_type< typename Policy ::execution_space >::type
>
{
typedef typename Policy ::execution_space execution_space ;
};
template< class Functor , class Policy >
struct FunctorPolicyExecutionSpace
< Functor , Policy
, typename enable_if_type< typename Functor::execution_space >::type
, typename enable_if_type< typename Policy ::execution_space >::type
>
{
typedef typename Policy ::execution_space execution_space ;
};
template< class Functor , class Policy , class EnableFunctor >
struct FunctorPolicyExecutionSpace
< Functor , Policy
, EnableFunctor
, typename enable_if_type< typename Policy::execution_space >::type
>
{
typedef typename Policy ::execution_space execution_space ;
};
template< class Functor , class Policy , class EnablePolicy >
struct FunctorPolicyExecutionSpace
< Functor , Policy
, typename enable_if_type< typename Functor::device_type >::type
, EnablePolicy
>
{
typedef typename Functor::device_type execution_space ;
};
template< class Functor , class Policy , class EnablePolicy >
struct FunctorPolicyExecutionSpace
< Functor , Policy
, typename enable_if_type< typename Functor::execution_space >::type
, EnablePolicy
>
{
typedef typename Functor::execution_space execution_space ;
};
//----------------------------------------------------------------------------
/// \class ParallelFor
/// \brief Implementation of the ParallelFor operator that has a
/// partial specialization for the device.
///
/// This is an implementation detail of parallel_for. Users should
/// skip this and go directly to the nonmember function parallel_for.
template< class FunctorType , class ExecPolicy > class ParallelFor ;
/// \class ParallelReduce
/// \brief Implementation detail of parallel_reduce.
///
/// This is an implementation detail of parallel_reduce. Users should
/// skip this and go directly to the nonmember function parallel_reduce.
template< class FunctorType , class ExecPolicy > class ParallelReduce ;
/// \class ParallelScan
/// \brief Implementation detail of parallel_scan.
///
/// This is an implementation detail of parallel_scan. Users should
/// skip this and go directly to the documentation of the nonmember
/// template function Kokkos::parallel_scan.
template< class FunctorType , class ExecPolicy > class ParallelScan ;
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
/** \brief Execute \c functor in parallel according to the execution \c policy.
*
* A "functor" is a class containing the function to execute in parallel,
* data needed for that execution, and an optional \c execution_space
* typedef. Here is an example functor for parallel_for:
*
* \code
* class FunctorType {
* public:
* typedef ... execution_space ;
* void operator() ( WorkType iwork ) const ;
* };
* \endcode
*
* In the above example, \c WorkType is any integer type for which a
* valid conversion from \c size_t to \c IntType exists. Its
* <tt>operator()</tt> method defines the operation to parallelize,
* over the range of integer indices <tt>iwork=[0,work_count-1]</tt>.
* This compares to a single iteration \c iwork of a \c for loop.
* If \c execution_space is not defined DefaultExecutionSpace will be used.
*/
template< class ExecPolicy , class FunctorType >
inline
void parallel_for( const ExecPolicy & policy
, const FunctorType & functor
, const std::string& str = ""
, typename Impl::enable_if< ! Impl::is_integral< ExecPolicy >::value >::type * = 0
)
{
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelFor("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelFor< FunctorType , ExecPolicy >( Impl::CopyWithoutTracking::apply(functor) , policy );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelFor(kpID);
}
#endif
}
template< class FunctorType >
inline
void parallel_for( const size_t work_count
, const FunctorType & functor
, const std::string& str = ""
)
{
typedef typename
Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef RangePolicy< execution_space > policy ;
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelFor("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelFor< FunctorType , policy >( Impl::CopyWithoutTracking::apply(functor) , policy(0,work_count) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelFor(kpID);
}
#endif
}
template< class ExecPolicy , class FunctorType >
inline
void parallel_for( const std::string & str
, const ExecPolicy & policy
, const FunctorType & functor )
{
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG Start parallel_for kernel: " << str << std::endl;
#endif
parallel_for(policy,functor,str);
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG End parallel_for kernel: " << str << std::endl;
#endif
(void) str;
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/** \brief Parallel reduction
*
* Example of a parallel_reduce functor for a POD (plain old data) value type:
* \code
* class FunctorType { // For POD value type
* public:
* typedef ... execution_space ;
* typedef <podType> value_type ;
* void operator()( <intType> iwork , <podType> & update ) const ;
* void init( <podType> & update ) const ;
* void join( volatile <podType> & update ,
* volatile const <podType> & input ) const ;
*
* typedef true_type has_final ;
* void final( <podType> & update ) const ;
* };
* \endcode
*
* Example of a parallel_reduce functor for an array of POD (plain old data) values:
* \code
* class FunctorType { // For array of POD value
* public:
* typedef ... execution_space ;
* typedef <podType> value_type[] ;
* void operator()( <intType> , <podType> update[] ) const ;
* void init( <podType> update[] ) const ;
* void join( volatile <podType> update[] ,
* volatile const <podType> input[] ) const ;
*
* typedef true_type has_final ;
* void final( <podType> update[] ) const ;
* };
* \endcode
*/
template< class ExecPolicy , class FunctorType >
inline
void parallel_reduce( const ExecPolicy & policy
, const FunctorType & functor
, const std::string& str = ""
, typename Impl::enable_if< ! Impl::is_integral< ExecPolicy >::value >::type * = 0
)
{
// typedef typename
// Impl::FunctorPolicyExecutionSpace< FunctorType , ExecPolicy >::execution_space
// execution_space ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag > ValueTraits ;
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view ;
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType , ExecPolicy >( Impl::CopyWithoutTracking::apply(functor) , policy , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
// integral range policy
template< class FunctorType >
inline
void parallel_reduce( const size_t work_count
, const FunctorType & functor
, const std::string& str = ""
)
{
typedef typename
Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef RangePolicy< execution_space > policy ;
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ;
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view ;
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType , policy >( Impl::CopyWithoutTracking::apply(functor) , policy(0,work_count) , result_view );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
// general policy and view ouput
template< class ExecPolicy , class FunctorType , class ViewType >
inline
void parallel_reduce( const ExecPolicy & policy
, const FunctorType & functor
, const ViewType & result_view
, const std::string& str = ""
, typename Impl::enable_if<
( Impl::is_view<ViewType>::value && ! Impl::is_integral< ExecPolicy >::value
#ifdef KOKKOS_HAVE_CUDA
&& ! Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value
#endif
)>::type * = 0 )
{
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( Impl::CopyWithoutTracking::apply(functor) , policy , Impl::CopyWithoutTracking::apply(result_view) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
// general policy and pod or array of pod output
template< class ExecPolicy , class FunctorType >
void parallel_reduce( const ExecPolicy & policy
, const FunctorType & functor
#ifdef KOKKOS_HAVE_CUDA
, typename Impl::enable_if<
( ! Impl::is_integral< ExecPolicy >::value &&
! Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value )
, typename Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag >::reference_type>::type result_ref
, const std::string& str = ""
, typename Impl::enable_if<! Impl::is_same<typename ExecPolicy::execution_space,Kokkos::Cuda>::value >::type* = 0
)
#else
, typename Impl::enable_if<
( ! Impl::is_integral< ExecPolicy >::value)
, typename Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag >::reference_type
>::type result_ref
, const std::string& str = ""
)
#endif
{
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , typename ExecPolicy::work_tag > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , typename ExecPolicy::work_tag > ValueOps ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result_ref )
, ValueTraits::value_count( functor )
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( Impl::CopyWithoutTracking::apply(functor) , policy , Impl::CopyWithoutTracking::apply(result_view) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
// integral range policy and view ouput
template< class FunctorType , class ViewType >
inline
void parallel_reduce( const size_t work_count
, const FunctorType & functor
, const ViewType & result_view
, const std::string& str = ""
, typename Impl::enable_if<( Impl::is_view<ViewType>::value
#ifdef KOKKOS_HAVE_CUDA
&& ! Impl::is_same<
typename Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space,
Kokkos::Cuda>::value
#endif
)>::type * = 0 )
{
typedef typename
Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef RangePolicy< execution_space > ExecPolicy ;
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType, ExecPolicy >( Impl::CopyWithoutTracking::apply(functor) , ExecPolicy(0,work_count) , Impl::CopyWithoutTracking::apply(result_view) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
// integral range policy and pod or array of pod output
template< class FunctorType >
inline
void parallel_reduce( const size_t work_count
, const FunctorType & functor
, typename Kokkos::Impl::FunctorValueTraits<
typename Impl::if_c<Impl::is_execution_policy<FunctorType>::value ||
Impl::is_integral<FunctorType>::value,
void,FunctorType>::type
, void >::reference_type result
, const std::string& str = ""
, typename Impl::enable_if< true
#ifdef KOKKOS_HAVE_CUDA
&& ! Impl::is_same<
typename Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space,
Kokkos::Cuda>::value
#endif
>::type * = 0 )
{
typedef Kokkos::Impl::FunctorValueTraits< FunctorType , void > ValueTraits ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , void > ValueOps ;
typedef typename
Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef Kokkos::RangePolicy< execution_space > policy ;
// Wrap the result output request in a view to inform the implementation
// of the type and memory space.
typedef typename Kokkos::Impl::if_c< (ValueTraits::StaticValueSize != 0)
, typename ValueTraits::value_type
, typename ValueTraits::pointer_type
>::type value_type ;
Kokkos::View< value_type
, HostSpace
, Kokkos::MemoryUnmanaged
>
result_view( ValueOps::pointer( result )
, ValueTraits::value_count( functor )
);
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelReduce("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelReduce< FunctorType , policy >( Impl::CopyWithoutTracking::apply(functor) , policy(0,work_count) , Impl::CopyWithoutTracking::apply(result_view) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelReduce(kpID);
}
#endif
}
-
+#ifndef KOKKOS_HAVE_CUDA
template< class ExecPolicy , class FunctorType , class ResultType >
inline
void parallel_reduce( const std::string & str
, const ExecPolicy & policy
, const FunctorType & functor
, ResultType * result)
{
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
#endif
parallel_reduce(policy,functor,result,str);
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
#endif
(void) str;
}
template< class ExecPolicy , class FunctorType , class ResultType >
inline
void parallel_reduce( const std::string & str
, const ExecPolicy & policy
, const FunctorType & functor
, ResultType & result)
{
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
#endif
parallel_reduce(policy,functor,result,str);
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
#endif
(void) str;
}
template< class ExecPolicy , class FunctorType >
inline
void parallel_reduce( const std::string & str
, const ExecPolicy & policy
, const FunctorType & functor)
{
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG Start parallel_reduce kernel: " << str << std::endl;
#endif
parallel_reduce(policy,functor,str);
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG End parallel_reduce kernel: " << str << std::endl;
#endif
(void) str;
}
-
+#endif
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
/// \fn parallel_scan
/// \tparam ExecutionPolicy The execution policy type.
/// \tparam FunctorType The scan functor type.
///
/// \param policy [in] The execution policy.
/// \param functor [in] The scan functor.
///
/// This function implements a parallel scan pattern. The scan can
/// be either inclusive or exclusive, depending on how you implement
/// the scan functor.
///
/// A scan functor looks almost exactly like a reduce functor, except
/// that its operator() takes a third \c bool argument, \c final_pass,
/// which indicates whether this is the last pass of the scan
/// operation. We will show below how to use the \c final_pass
/// argument to control whether the scan is inclusive or exclusive.
///
/// Here is the minimum required interface of a scan functor for a POD
/// (plain old data) value type \c PodType. That is, the result is a
/// View of zero or more PodType. It is also possible for the result
/// to be an array of (same-sized) arrays of PodType, but we do not
/// show the required interface for that here.
/// \code
/// template< class ExecPolicy , class FunctorType >
/// class ScanFunctor {
/// public:
/// // The Kokkos device type
/// typedef ... execution_space;
/// // Type of an entry of the array containing the result;
/// // also the type of each of the entries combined using
/// // operator() or join().
/// typedef PodType value_type;
///
/// void operator () (const ExecPolicy::member_type & i, value_type& update, const bool final_pass) const;
/// void init (value_type& update) const;
/// void join (volatile value_type& update, volatile const value_type& input) const
/// };
/// \endcode
///
/// Here is an example of a functor which computes an inclusive plus-scan
/// of an array of \c int, in place. If given an array [1, 2, 3, 4], this
/// scan will overwrite that array with [1, 3, 6, 10].
///
/// \code
/// template<class SpaceType>
/// class InclScanFunctor {
/// public:
/// typedef SpaceType execution_space;
/// typedef int value_type;
/// typedef typename SpaceType::size_type size_type;
///
/// InclScanFunctor( Kokkos::View<value_type*, execution_space> x
/// , Kokkos::View<value_type*, execution_space> y ) : m_x(x), m_y(y) {}
///
/// void operator () (const size_type i, value_type& update, const bool final_pass) const {
/// update += m_x(i);
/// if (final_pass) {
/// m_y(i) = update;
/// }
/// }
/// void init (value_type& update) const {
/// update = 0;
/// }
/// void join (volatile value_type& update, volatile const value_type& input) const {
/// update += input;
/// }
///
/// private:
/// Kokkos::View<value_type*, execution_space> m_x;
/// Kokkos::View<value_type*, execution_space> m_y;
/// };
/// \endcode
///
/// Here is an example of a functor which computes an <i>exclusive</i>
/// scan of an array of \c int, in place. In operator(), note both
/// that the final_pass test and the update have switched places, and
/// the use of a temporary. If given an array [1, 2, 3, 4], this scan
/// will overwrite that array with [0, 1, 3, 6].
///
/// \code
/// template<class SpaceType>
/// class ExclScanFunctor {
/// public:
/// typedef SpaceType execution_space;
/// typedef int value_type;
/// typedef typename SpaceType::size_type size_type;
///
/// ExclScanFunctor (Kokkos::View<value_type*, execution_space> x) : x_ (x) {}
///
/// void operator () (const size_type i, value_type& update, const bool final_pass) const {
/// const value_type x_i = x_(i);
/// if (final_pass) {
/// x_(i) = update;
/// }
/// update += x_i;
/// }
/// void init (value_type& update) const {
/// update = 0;
/// }
/// void join (volatile value_type& update, volatile const value_type& input) const {
/// update += input;
/// }
///
/// private:
/// Kokkos::View<value_type*, execution_space> x_;
/// };
/// \endcode
///
/// Here is an example of a functor which builds on the above
/// exclusive scan example, to compute an offsets array from a
/// population count array, in place. We assume that the pop count
/// array has an extra entry at the end to store the final count. If
/// given an array [1, 2, 3, 4, 0], this scan will overwrite that
/// array with [0, 1, 3, 6, 10].
///
/// \code
/// template<class SpaceType>
/// class OffsetScanFunctor {
/// public:
/// typedef SpaceType execution_space;
/// typedef int value_type;
/// typedef typename SpaceType::size_type size_type;
///
/// // lastIndex_ is the last valid index (zero-based) of x.
/// // If x has length zero, then lastIndex_ won't be used anyway.
/// OffsetScanFunctor( Kokkos::View<value_type*, execution_space> x
/// , Kokkos::View<value_type*, execution_space> y )
/// : m_x(x), m_y(y), last_index_ (x.dimension_0 () == 0 ? 0 : x.dimension_0 () - 1)
/// {}
///
/// void operator () (const size_type i, int& update, const bool final_pass) const {
/// if (final_pass) {
/// m_y(i) = update;
/// }
/// update += m_x(i);
/// // The last entry of m_y gets the final sum.
/// if (final_pass && i == last_index_) {
/// m_y(i+1) = update;
/// }
/// }
/// void init (value_type& update) const {
/// update = 0;
/// }
/// void join (volatile value_type& update, volatile const value_type& input) const {
/// update += input;
/// }
///
/// private:
/// Kokkos::View<value_type*, execution_space> m_x;
/// Kokkos::View<value_type*, execution_space> m_y;
/// const size_type last_index_;
/// };
/// \endcode
///
template< class ExecutionPolicy , class FunctorType >
inline
void parallel_scan( const ExecutionPolicy & policy
, const FunctorType & functor
, const std::string& str = ""
, typename Impl::enable_if< ! Impl::is_integral< ExecutionPolicy >::value >::type * = 0
)
{
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
Impl::ParallelScan< FunctorType , ExecutionPolicy > scan( Impl::CopyWithoutTracking::apply(functor) , policy );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
template< class FunctorType >
inline
void parallel_scan( const size_t work_count
, const FunctorType & functor
, const std::string& str = "" )
{
typedef typename
Kokkos::Impl::FunctorPolicyExecutionSpace< FunctorType , void >::execution_space
execution_space ;
typedef Kokkos::RangePolicy< execution_space > policy ;
#ifdef KOKKOSP_ENABLE_PROFILING
uint64_t kpID = 0;
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::beginParallelScan("" == str ? typeid(FunctorType).name() : str, 0, &kpID);
}
#endif
(void) Impl::ParallelScan< FunctorType , policy >( Impl::CopyWithoutTracking::apply(functor) , policy(0,work_count) );
#ifdef KOKKOSP_ENABLE_PROFILING
if(Kokkos::Experimental::profileLibraryLoaded()) {
Kokkos::Experimental::endParallelScan(kpID);
}
#endif
}
template< class ExecutionPolicy , class FunctorType >
inline
void parallel_scan( const std::string& str
, const ExecutionPolicy & policy
, const FunctorType & functor)
{
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG Start parallel_scan kernel: " << str << std::endl;
#endif
parallel_scan(policy,functor,str);
#if KOKKOS_ENABLE_DEBUG_PRINT_KERNEL_NAMES
Kokkos::fence();
std::cout << "KOKKOS_DEBUG End parallel_scan kernel: " << str << std::endl;
#endif
(void) str;
}
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class Enable = void >
struct FunctorTeamShmemSize
{
static inline size_t value( const FunctorType & , int ) { return 0 ; }
};
template< class FunctorType >
struct FunctorTeamShmemSize< FunctorType , typename Impl::enable_if< 0 < sizeof( & FunctorType::team_shmem_size ) >::type >
{
static inline size_t value( const FunctorType & f , int team_size ) { return f.team_shmem_size( team_size ) ; }
};
template< class FunctorType >
struct FunctorTeamShmemSize< FunctorType , typename Impl::enable_if< 0 < sizeof( & FunctorType::shmem_size ) >::type >
{
static inline size_t value( const FunctorType & f , int team_size ) { return f.shmem_size( team_size ) ; }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* KOKKOS_PARALLEL_HPP */
diff --git a/lib/kokkos/core/src/Kokkos_Qthread.hpp b/lib/kokkos/core/src/Kokkos_Qthread.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp b/lib/kokkos/core/src/Kokkos_ScratchSpace.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Serial.hpp b/lib/kokkos/core/src/Kokkos_Serial.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp b/lib/kokkos/core/src/Kokkos_TaskPolicy.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Threads.hpp b/lib/kokkos/core/src/Kokkos_Threads.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_Vectorization.hpp b/lib/kokkos/core/src/Kokkos_Vectorization.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Kokkos_View.hpp b/lib/kokkos/core/src/Kokkos_View.hpp
old mode 100755
new mode 100644
index cd6c8af9f..531218b5d
--- a/lib/kokkos/core/src/Kokkos_View.hpp
+++ b/lib/kokkos/core/src/Kokkos_View.hpp
@@ -1,1915 +1,2120 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_VIEW_HPP
#define KOKKOS_VIEW_HPP
+#include <type_traits>
#include <string>
#include <Kokkos_Core_fwd.hpp>
#include <Kokkos_HostSpace.hpp>
#include <Kokkos_MemoryTraits.hpp>
#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
#include <impl/Kokkos_StaticAssert.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_Shape.hpp>
#include <impl/Kokkos_AnalyzeShape.hpp>
+#include <impl/Kokkos_Tags.hpp>
+
+// Must define before includng <impl/Kokkos_ViewOffset.hpp>
+namespace Kokkos { struct ALL ; }
+
#include <impl/Kokkos_ViewOffset.hpp>
#include <impl/Kokkos_ViewSupport.hpp>
-#include <impl/Kokkos_Tags.hpp>
-#include <type_traits>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
/** \brief View specialization mapping of view traits to a specialization tag */
template< class ValueType ,
class ArraySpecialize ,
class ArrayLayout ,
class MemorySpace ,
class MemoryTraits >
struct ViewSpecialize ;
/** \brief Defines the type of a subview given a source view type
* and subview argument types.
*/
template< class SrcViewType
, class Arg0Type
, class Arg1Type
, class Arg2Type
, class Arg3Type
, class Arg4Type
, class Arg5Type
, class Arg6Type
, class Arg7Type
>
struct ViewSubview /* { typedef ... type ; } */ ;
template< class DstViewSpecialize ,
class SrcViewSpecialize = void ,
class Enable = void >
struct ViewAssignment ;
-template< class DstMemorySpace , class SrcMemorySpace >
+template< class DstMemorySpace , class SrcMemorySpace , class ExecutionSpace>
struct DeepCopy ;
} /* namespace Impl */
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
/** \class ViewTraits
* \brief Traits class for accessing attributes of a View.
*
* This is an implementation detail of View. It is only of interest
* to developers implementing a new specialization of View.
*
* Template argument permutations:
* - View< DataType , void , void , void >
* - View< DataType , Space , void , void >
* - View< DataType , Space , MemoryTraits , void >
* - View< DataType , Space , void , MemoryTraits >
* - View< DataType , ArrayLayout , void , void >
* - View< DataType , ArrayLayout , Space , void >
* - View< DataType , ArrayLayout , MemoryTraits , void >
* - View< DataType , ArrayLayout , Space , MemoryTraits >
* - View< DataType , MemoryTraits , void , void >
*/
template< class DataType ,
class Arg1 = void ,
class Arg2 = void ,
class Arg3 = void >
class ViewTraits {
private:
// Layout, Space, and MemoryTraits are optional
// but need to appear in that order. That means Layout
// can only be Arg1, Space can be Arg1 or Arg2, and
// MemoryTraits can be Arg1, Arg2 or Arg3
enum { Arg1IsLayout = Impl::is_array_layout<Arg1>::value };
enum { Arg1IsSpace = Impl::is_space<Arg1>::value };
enum { Arg2IsSpace = Impl::is_space<Arg2>::value };
enum { Arg1IsMemoryTraits = Impl::is_memory_traits<Arg1>::value };
enum { Arg2IsMemoryTraits = Impl::is_memory_traits<Arg2>::value };
enum { Arg3IsMemoryTraits = Impl::is_memory_traits<Arg3>::value };
enum { Arg1IsVoid = Impl::is_same< Arg1 , void >::value };
enum { Arg2IsVoid = Impl::is_same< Arg2 , void >::value };
enum { Arg3IsVoid = Impl::is_same< Arg3 , void >::value };
// Arg1 is Layout, Space, MemoryTraits, or void
typedef typename
Impl::StaticAssert<
( 1 == Arg1IsLayout + Arg1IsSpace + Arg1IsMemoryTraits + Arg1IsVoid )
, Arg1 >::type Arg1Verified ;
// If Arg1 is Layout then Arg2 is Space, MemoryTraits, or void
// If Arg1 is Space then Arg2 is MemoryTraits or void
// If Arg1 is MemoryTraits then Arg2 is void
// If Arg1 is Void then Arg2 is void
typedef typename
Impl::StaticAssert<
( Arg1IsLayout && ( 1 == Arg2IsSpace + Arg2IsMemoryTraits + Arg2IsVoid ) ) ||
( Arg1IsSpace && ( 0 == Arg2IsSpace ) && ( 1 == Arg2IsMemoryTraits + Arg2IsVoid ) ) ||
( Arg1IsMemoryTraits && Arg2IsVoid ) ||
( Arg1IsVoid && Arg2IsVoid )
, Arg2 >::type Arg2Verified ;
// Arg3 is MemoryTraits or void and at most one argument is MemoryTraits
typedef typename
Impl::StaticAssert<
( 1 == Arg3IsMemoryTraits + Arg3IsVoid ) &&
( Arg1IsMemoryTraits + Arg2IsMemoryTraits + Arg3IsMemoryTraits <= 1 )
, Arg3 >::type Arg3Verified ;
// Arg1 or Arg2 may have execution and memory spaces
typedef typename Impl::if_c<( Arg1IsSpace ), Arg1Verified ,
typename Impl::if_c<( Arg2IsSpace ), Arg2Verified ,
Kokkos::DefaultExecutionSpace
>::type >::type::execution_space ExecutionSpace ;
typedef typename Impl::if_c<( Arg1IsSpace ), Arg1Verified ,
typename Impl::if_c<( Arg2IsSpace ), Arg2Verified ,
Kokkos::DefaultExecutionSpace
>::type >::type::memory_space MemorySpace ;
typedef typename Impl::is_space<
typename Impl::if_c<( Arg1IsSpace ), Arg1Verified ,
typename Impl::if_c<( Arg2IsSpace ), Arg2Verified ,
Kokkos::DefaultExecutionSpace
>::type >::type >::host_mirror_space HostMirrorSpace ;
// Arg1 may be array layout
typedef typename Impl::if_c< Arg1IsLayout , Arg1Verified ,
typename ExecutionSpace::array_layout
>::type ArrayLayout ;
// Arg1, Arg2, or Arg3 may be memory traits
typedef typename Impl::if_c< Arg1IsMemoryTraits , Arg1Verified ,
typename Impl::if_c< Arg2IsMemoryTraits , Arg2Verified ,
typename Impl::if_c< Arg3IsMemoryTraits , Arg3Verified ,
MemoryManaged
>::type >::type >::type MemoryTraits ;
typedef Impl::AnalyzeShape<DataType> analysis ;
public:
//------------------------------------
// Data type traits:
typedef DataType data_type ;
typedef typename analysis::const_type const_data_type ;
typedef typename analysis::non_const_type non_const_data_type ;
//------------------------------------
// Array of intrinsic scalar type traits:
typedef typename analysis::array_intrinsic_type array_intrinsic_type ;
typedef typename analysis::const_array_intrinsic_type const_array_intrinsic_type ;
typedef typename analysis::non_const_array_intrinsic_type non_const_array_intrinsic_type ;
//------------------------------------
// Value type traits:
typedef typename analysis::value_type value_type ;
typedef typename analysis::const_value_type const_value_type ;
typedef typename analysis::non_const_value_type non_const_value_type ;
//------------------------------------
// Layout and shape traits:
typedef ArrayLayout array_layout ;
typedef typename analysis::shape shape_type ;
enum { rank = shape_type::rank };
enum { rank_dynamic = shape_type::rank_dynamic };
//------------------------------------
// Execution space, memory space, memory access traits, and host mirror space.
typedef ExecutionSpace execution_space ;
typedef MemorySpace memory_space ;
typedef Device<ExecutionSpace,MemorySpace> device_type ;
typedef MemoryTraits memory_traits ;
typedef HostMirrorSpace host_mirror_space ;
typedef typename memory_space::size_type size_type ;
enum { is_hostspace = Impl::is_same< memory_space , HostSpace >::value };
enum { is_managed = memory_traits::Unmanaged == 0 };
enum { is_random_access = memory_traits::RandomAccess == 1 };
//------------------------------------
//------------------------------------
// Specialization tag:
typedef typename
Impl::ViewSpecialize< value_type
, typename analysis::specialize
, array_layout
, memory_space
, memory_traits
>::type specialize ;
};
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
class ViewDefault {};
/** \brief Default view specialization has LayoutLeft, LayoutRight, or LayoutStride.
*/
template< class ValueType , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< ValueType , void , LayoutLeft , MemorySpace , MemoryTraits >
{ typedef ViewDefault type ; };
template< class ValueType , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< ValueType , void , LayoutRight , MemorySpace , MemoryTraits >
{ typedef ViewDefault type ; };
template< class ValueType , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< ValueType , void , LayoutStride , MemorySpace , MemoryTraits >
{ typedef ViewDefault type ; };
} /* namespace Impl */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
/** \brief Types for compile-time detection of View usage errors */
namespace ViewError {
struct allocation_constructor_requires_managed {};
struct allocation_constructor_requires_nonconst {};
struct user_pointer_constructor_requires_unmanaged {};
struct device_shmem_constructor_requires_unmanaged {};
struct scalar_operator_called_from_non_scalar_view {};
} /* namespace ViewError */
//----------------------------------------------------------------------------
/** \brief Enable view parentheses operator for
* match of layout and integral arguments.
* If correct rank define type from traits,
* otherwise define type as an error message.
*/
template< class ReturnType , class Traits , class Layout , unsigned Rank ,
typename iType0 = int , typename iType1 = int ,
typename iType2 = int , typename iType3 = int ,
typename iType4 = int , typename iType5 = int ,
typename iType6 = int , typename iType7 = int ,
class Enable = void >
struct ViewEnableArrayOper ;
template< class ReturnType , class Traits , class Layout , unsigned Rank ,
typename iType0 , typename iType1 ,
typename iType2 , typename iType3 ,
typename iType4 , typename iType5 ,
typename iType6 , typename iType7 >
struct ViewEnableArrayOper<
ReturnType , Traits , Layout , Rank ,
iType0 , iType1 , iType2 , iType3 ,
iType4 , iType5 , iType6 , iType7 ,
typename enable_if<
iType0(0) == 0 && iType1(0) == 0 && iType2(0) == 0 && iType3(0) == 0 &&
iType4(0) == 0 && iType5(0) == 0 && iType6(0) == 0 && iType7(0) == 0 &&
is_same< typename Traits::array_layout , Layout >::value &&
( unsigned(Traits::rank) == Rank )
>::type >
{
typedef ReturnType type ;
};
} /* namespace Impl */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
/** \class View
* \brief View to an array of data.
*
* A View represents an array of one or more dimensions.
* For details, please refer to Kokkos' tutorial materials.
*
* \section Kokkos_View_TemplateParameters Template parameters
*
* This class has both required and optional template parameters. The
* \c DataType parameter must always be provided, and must always be
* first. The parameters \c Arg1Type, \c Arg2Type, and \c Arg3Type are
* placeholders for different template parameters. The default value
* of the fifth template parameter \c Specialize suffices for most use
* cases. When explaining the template parameters, we won't refer to
* \c Arg1Type, \c Arg2Type, and \c Arg3Type; instead, we will refer
* to the valid categories of template parameters, in whatever order
* they may occur.
*
* Valid ways in which template arguments may be specified:
* - View< DataType , Space >
* - View< DataType , Space , MemoryTraits >
* - View< DataType , Space , void , MemoryTraits >
* - View< DataType , Layout , Space >
* - View< DataType , Layout , Space , MemoryTraits >
*
* \tparam DataType (required) This indicates both the type of each
* entry of the array, and the combination of compile-time and
* run-time array dimension(s). For example, <tt>double*</tt>
* indicates a one-dimensional array of \c double with run-time
* dimension, and <tt>int*[3]</tt> a two-dimensional array of \c int
* with run-time first dimension and compile-time second dimension
* (of 3). In general, the run-time dimensions (if any) must go
* first, followed by zero or more compile-time dimensions. For
* more examples, please refer to the tutorial materials.
*
* \tparam Space (required) The memory space.
*
* \tparam Layout (optional) The array's layout in memory. For
* example, LayoutLeft indicates a column-major (Fortran style)
* layout, and LayoutRight a row-major (C style) layout. If not
* specified, this defaults to the preferred layout for the
* <tt>Space</tt>.
*
* \tparam MemoryTraits (optional) Assertion of the user's intended
* access behavior. For example, RandomAccess indicates read-only
* access with limited spatial locality, and Unmanaged lets users
* wrap externally allocated memory in a View without automatic
* deallocation.
*
* \section Kokkos_View_MT MemoryTraits discussion
*
* \subsection Kokkos_View_MT_Interp MemoryTraits interpretation depends on Space
*
* Some \c MemoryTraits options may have different interpretations for
* different \c Space types. For example, with the Cuda device,
* \c RandomAccess tells Kokkos to fetch the data through the texture
* cache, whereas the non-GPU devices have no such hardware construct.
*
* \subsection Kokkos_View_MT_PrefUse Preferred use of MemoryTraits
*
* Users should defer applying the optional \c MemoryTraits parameter
* until the point at which they actually plan to rely on it in a
* computational kernel. This minimizes the number of template
* parameters exposed in their code, which reduces the cost of
* compilation. Users may always assign a View without specified
* \c MemoryTraits to a compatible View with that specification.
* For example:
* \code
* // Pass in the simplest types of View possible.
* void
* doSomething (View<double*, Cuda> out,
* View<const double*, Cuda> in)
* {
* // Assign the "generic" View in to a RandomAccess View in_rr.
* // Note that RandomAccess View objects must have const data.
* View<const double*, Cuda, RandomAccess> in_rr = in;
* // ... do something with in_rr and out ...
* }
* \endcode
*/
template< class DataType ,
class Arg1Type = void , /* ArrayLayout, SpaceType, or MemoryTraits */
class Arg2Type = void , /* SpaceType or MemoryTraits */
class Arg3Type = void , /* MemoryTraits */
class Specialize =
typename ViewTraits<DataType,Arg1Type,Arg2Type,Arg3Type>::specialize >
class View ;
namespace Impl {
template< class C >
struct is_view : public bool_< false > {};
template< class D , class A1 , class A2 , class A3 , class S >
struct is_view< View< D , A1 , A2 , A3 , S > > : public bool_< true > {};
}
//----------------------------------------------------------------------------
template< class DataType ,
class Arg1Type ,
class Arg2Type ,
class Arg3Type >
class View< DataType , Arg1Type , Arg2Type , Arg3Type , Impl::ViewDefault >
: public ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type >
{
public:
typedef ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type > traits ;
private:
// Assignment of compatible views requirement:
template< class , class , class , class , class > friend class View ;
// Assignment of compatible subview requirement:
template< class , class , class > friend struct Impl::ViewAssignment ;
// Dimensions, cardinality, capacity, and offset computation for
// multidimensional array view of contiguous memory.
// Inherits from Impl::Shape
typedef Impl::ViewOffset< typename traits::shape_type
, typename traits::array_layout
> offset_map_type ;
// Intermediary class for data management and access
typedef Impl::ViewDataManagement< traits > view_data_management ;
//----------------------------------------
// Data members:
typename view_data_management::handle_type m_ptr_on_device ;
offset_map_type m_offset_map ;
view_data_management m_management ;
Impl::AllocationTracker m_tracker ;
//----------------------------------------
public:
/** return type for all indexing operators */
typedef typename view_data_management::return_type reference_type ;
enum { reference_type_is_lvalue = view_data_management::ReturnTypeIsReference };
typedef View< typename traits::array_intrinsic_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits > array_type ;
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits > const_type ;
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::device_type ,
typename traits::memory_traits > non_const_type ;
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::host_mirror_space ,
void > HostMirror ;
//------------------------------------
// Shape
enum { Rank = traits::rank };
KOKKOS_INLINE_FUNCTION offset_map_type shape() const { return m_offset_map ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_0() const { return m_offset_map.N0 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_1() const { return m_offset_map.N1 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_2() const { return m_offset_map.N2 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_3() const { return m_offset_map.N3 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_4() const { return m_offset_map.N4 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_5() const { return m_offset_map.N5 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_6() const { return m_offset_map.N6 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_7() const { return m_offset_map.N7 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type size() const { return m_offset_map.cardinality(); }
template< typename iType >
KOKKOS_INLINE_FUNCTION
typename traits::size_type dimension( const iType & i ) const
{ return Impl::dimension( m_offset_map , i ); }
//------------------------------------
// Destructor, constructors, assignment operators:
KOKKOS_INLINE_FUNCTION
~View() {}
KOKKOS_INLINE_FUNCTION
View()
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{ m_offset_map.assign(0, 0,0,0,0,0,0,0,0); }
KOKKOS_INLINE_FUNCTION
View( const View & rhs )
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
(void) Impl::ViewAssignment<
typename traits::specialize ,
typename traits::specialize >( *this , rhs );
}
KOKKOS_INLINE_FUNCTION
View & operator = ( const View & rhs )
{
(void) Impl::ViewAssignment<
typename traits::specialize ,
typename traits::specialize >( *this , rhs );
return *this ;
}
//------------------------------------
// Construct or assign compatible view:
template< class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
View( const View<RT,RL,RD,RM,RS> & rhs )
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
(void) Impl::ViewAssignment<
typename traits::specialize , RS >( *this , rhs );
}
template< class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
View & operator = ( const View<RT,RL,RD,RM,RS> & rhs )
{
(void) Impl::ViewAssignment<
typename traits::specialize , RS >( *this , rhs );
return *this ;
}
//------------------------------------
/**\brief Allocation of a managed view with possible alignment padding.
*
* Allocation properties for allocating and initializing to the default value_type:
* Kokkos::ViewAllocate()
* Kokkos::ViewAllocate("label") OR "label"
* Kokkos::ViewAllocate(std::string("label")) OR std::string("label")
*
* Allocation properties for allocating and bypassing initialization:
* Kokkos::ViewAllocateWithoutInitializing()
* Kokkos::ViewAllocateWithoutInitializing("label")
*/
template< class AllocationProperties >
explicit inline
View( const AllocationProperties & prop ,
// Impl::ViewAllocProp::size_type exists when the traits and allocation properties
// are valid for allocating viewed memory.
const typename Impl::ViewAllocProp< traits , AllocationProperties >::size_type n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 ,
const size_t n8 = 0 )
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
typedef Impl::ViewAllocProp< traits , AllocationProperties > Alloc ;
static_assert(!std::is_same<typename traits::array_layout, LayoutStride>::value,
"LayoutStride does not support View constructor which takes dimensions directly!");
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7, n8 );
if(Alloc::AllowPadding)
m_offset_map.set_padding();
m_ptr_on_device = view_data_management::template allocate< Alloc::Initialize >( Alloc::label(prop) , m_offset_map, m_tracker );
}
template< class AllocationProperties >
explicit inline
View( const AllocationProperties & prop ,
const typename traits::array_layout & layout ,
// Impl::ViewAllocProp::size_type exists when the traits and allocation properties
// are valid for allocating viewed memory.
const typename Impl::ViewAllocProp< traits , AllocationProperties >::size_type = 0 )
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
typedef Impl::ViewAllocProp< traits , AllocationProperties > Alloc ;
m_offset_map.assign( layout );
if(Alloc::AllowPadding)
m_offset_map.set_padding();
m_ptr_on_device = view_data_management::template allocate< Alloc::Initialize >( Alloc::label(prop) , m_offset_map, m_tracker );
m_management.set_noncontiguous();
}
//------------------------------------
// Assign an unmanaged View from pointer, can be called in functors.
// No alignment padding is performed.
template< class Type >
explicit KOKKOS_INLINE_FUNCTION
View( Type * ptr ,
typename Impl::ViewRawPointerProp< traits , Type >::size_type n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 ,
const size_t n8 = 0 )
: m_ptr_on_device(ptr)
, m_offset_map()
, m_management()
, m_tracker()
{
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7, n8 );
m_management.set_unmanaged();
}
template< class Type >
explicit KOKKOS_INLINE_FUNCTION
View( Type * ptr ,
typename traits::array_layout const & layout ,
typename Impl::ViewRawPointerProp< traits , Type >::size_type = 0 )
: m_ptr_on_device(ptr)
, m_offset_map()
, m_management()
, m_tracker()
{
m_offset_map.assign( layout );
m_management.set_unmanaged();
m_management.set_noncontiguous();
}
//------------------------------------
// Assign a View from an AllocationTracker,
// The allocator used must be compatiable with the memory space of the view
// No alignment padding is performed.
// TODO: Should these allow padding??? DJS 01/15/15
explicit
View( Impl::AllocationTracker const &arg_tracker ,
const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 ,
const size_t n8 = 0 )
: m_ptr_on_device(reinterpret_cast<typename traits::value_type*>(arg_tracker.alloc_ptr()))
, m_offset_map()
, m_management()
, m_tracker(arg_tracker)
{
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7, n8 );
const size_t req_size = m_offset_map.capacity() * sizeof(typename traits::value_type);
if ( m_tracker.alloc_size() < req_size ) {
Impl::throw_runtime_exception("Error: tracker.alloc_size() < req_size");
}
}
explicit
View( Impl::AllocationTracker const & arg_tracker
, typename traits::array_layout const & layout )
: m_ptr_on_device(reinterpret_cast<typename traits::value_type*>(arg_tracker.alloc_ptr()))
, m_offset_map()
, m_management()
, m_tracker(arg_tracker)
{
m_offset_map.assign( layout );
const size_t req_size = m_offset_map.capacity() * sizeof(typename traits::value_type);
if ( m_tracker.alloc_size() < req_size ) {
Impl::throw_runtime_exception("Error: tracker.alloc_size() < req_size");
}
m_management.set_noncontiguous();
}
//------------------------------------
/** \brief Constructors for subviews requires following
* type-compatibility condition, enforce via StaticAssert.
*
* Impl::is_same< View ,
* typename Impl::ViewSubview< View<D,A1,A2,A3,Impl::ViewDefault>
* , ArgType0 , ArgType1 , ArgType2 , ArgType3
* , ArgType4 , ArgType5 , ArgType6 , ArgType7
* >::type >::value
*/
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
, class SubArg4_type , class SubArg5_type , class SubArg6_type , class SubArg7_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2 , const SubArg3_type & arg3
, const SubArg4_type & arg4 , const SubArg5_type & arg5
, const SubArg6_type & arg6 , const SubArg7_type & arg7
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
, class SubArg4_type , class SubArg5_type , class SubArg6_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2 , const SubArg3_type & arg3
, const SubArg4_type & arg4 , const SubArg5_type & arg5
, const SubArg6_type & arg6
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
, class SubArg4_type , class SubArg5_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2 , const SubArg3_type & arg3
, const SubArg4_type & arg4 , const SubArg5_type & arg5
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
, class SubArg4_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2 , const SubArg3_type & arg3
, const SubArg4_type & arg4
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type , class SubArg3_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2 , const SubArg3_type & arg3
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type , class SubArg2_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
, const SubArg2_type & arg2
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type , class SubArg1_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0 , const SubArg1_type & arg1
);
template< class D , class A1 , class A2 , class A3
, class SubArg0_type
>
KOKKOS_INLINE_FUNCTION
View( const View<D,A1,A2,A3,Impl::ViewDefault> & src
, const SubArg0_type & arg0
);
//------------------------------------
// Assign unmanaged View to portion of execution space's shared memory
typedef Impl::if_c< ! traits::is_managed ,
const typename traits::execution_space::scratch_memory_space & ,
Impl::ViewError::device_shmem_constructor_requires_unmanaged >
if_scratch_memory_constructor ;
explicit KOKKOS_INLINE_FUNCTION
View( typename if_scratch_memory_constructor::type space ,
const unsigned n0 = 0 ,
const unsigned n1 = 0 ,
const unsigned n2 = 0 ,
const unsigned n3 = 0 ,
const unsigned n4 = 0 ,
const unsigned n5 = 0 ,
const unsigned n6 = 0 ,
const unsigned n7 = 0 )
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
typedef typename traits::value_type value_type_ ;
enum { align = 8 };
enum { mask = align - 1 };
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
typedef Impl::if_c< ! traits::is_managed ,
value_type_ * ,
Impl::ViewError::device_shmem_constructor_requires_unmanaged >
if_device_shmem_pointer ;
// Select the first argument:
m_ptr_on_device = if_device_shmem_pointer::select(
(value_type_*) space.get_shmem( unsigned( sizeof(value_type_) * m_offset_map.capacity() + unsigned(mask) ) & ~unsigned(mask) ) );
}
explicit KOKKOS_INLINE_FUNCTION
View( typename if_scratch_memory_constructor::type space ,
typename traits::array_layout const & layout)
: m_ptr_on_device()
, m_offset_map()
, m_management()
, m_tracker()
{
typedef typename traits::value_type value_type_ ;
typedef Impl::if_c< ! traits::is_managed ,
value_type_ * ,
Impl::ViewError::device_shmem_constructor_requires_unmanaged >
if_device_shmem_pointer ;
m_offset_map.assign( layout );
m_management.set_unmanaged();
m_management.set_noncontiguous();
enum { align = 8 };
enum { mask = align - 1 };
// Select the first argument:
m_ptr_on_device = if_device_shmem_pointer::select(
(value_type_*) space.get_shmem( unsigned( sizeof(value_type_) * m_offset_map.capacity() + unsigned(mask) ) & ~unsigned(mask) ) );
}
static inline
unsigned shmem_size( const unsigned n0 = 0 ,
const unsigned n1 = 0 ,
const unsigned n2 = 0 ,
const unsigned n3 = 0 ,
const unsigned n4 = 0 ,
const unsigned n5 = 0 ,
const unsigned n6 = 0 ,
const unsigned n7 = 0 )
{
enum { align = 8 };
enum { mask = align - 1 };
typedef typename traits::value_type value_type_ ;
offset_map_type offset_map ;
offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
return unsigned( sizeof(value_type_) * offset_map.capacity() + unsigned(mask) ) & ~unsigned(mask) ;
}
//------------------------------------
// Is not allocated
KOKKOS_FORCEINLINE_FUNCTION
bool is_null() const { return 0 == ptr_on_device() ; }
//------------------------------------
// Operators for scalar (rank zero) views.
typedef Impl::if_c< traits::rank == 0 ,
typename traits::value_type ,
Impl::ViewError::scalar_operator_called_from_non_scalar_view >
if_scalar_operator ;
KOKKOS_INLINE_FUNCTION
const View & operator = ( const typename if_scalar_operator::type & rhs ) const
{
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
*m_ptr_on_device = if_scalar_operator::select( rhs );
return *this ;
}
KOKKOS_FORCEINLINE_FUNCTION
operator typename if_scalar_operator::type & () const
{
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return if_scalar_operator::select( *m_ptr_on_device );
}
KOKKOS_FORCEINLINE_FUNCTION
typename if_scalar_operator::type & operator()() const
{
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return if_scalar_operator::select( *m_ptr_on_device );
}
KOKKOS_FORCEINLINE_FUNCTION
typename if_scalar_operator::type & operator*() const
{
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return if_scalar_operator::select( *m_ptr_on_device );
}
//------------------------------------
// Array member access operators enabled if
// (1) a zero value of all argument types are compile-time comparable to zero
// (2) the rank matches the number of arguments
// (3) the memory space is valid for the access
//------------------------------------
// rank 1:
// Specialisation for LayoutLeft and LayoutRight since we know its stride 1
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutLeft, 1, iType0 >::type
operator[] ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutLeft, 1, iType0 >::type
operator() ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutLeft, 1, iType0 >::type
at( const iType0 & i0 , const int , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutRight, 1, iType0 >::type
operator[] ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutRight, 1, iType0 >::type
operator() ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits, LayoutRight, 1, iType0 >::type
at( const iType0 & i0 , const int , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ i0 ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits,
typename Impl::if_c<
Impl::is_same<typename traits::array_layout, LayoutRight>::value ||
Impl::is_same<typename traits::array_layout, LayoutLeft>::value ,
void, typename traits::array_layout>::type,
1, iType0 >::type
operator[] ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0) ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits,
typename Impl::if_c<
Impl::is_same<typename traits::array_layout, LayoutRight>::value ||
Impl::is_same<typename traits::array_layout, LayoutLeft>::value ,
void, typename traits::array_layout>::type,
1, iType0 >::type
operator() ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0) ];
}
template< typename iType0 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type , traits,
typename Impl::if_c<
Impl::is_same<typename traits::array_layout, LayoutRight>::value ||
Impl::is_same<typename traits::array_layout, LayoutLeft>::value ,
void, typename traits::array_layout>::type,
1, iType0 >::type
at( const iType0 & i0 , const int , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_1( m_offset_map, i0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0) ];
}
// rank 2:
template< typename iType0 , typename iType1 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 2, iType0, iType1 >::type
operator() ( const iType0 & i0 , const iType1 & i1 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0,i1 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1) ];
}
template< typename iType0 , typename iType1 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 2, iType0, iType1 >::type
at( const iType0 & i0 , const iType1 & i1 , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0,i1 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1) ];
}
// rank 3:
template< typename iType0 , typename iType1 , typename iType2 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 3, iType0, iType1, iType2 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_3( m_offset_map, i0,i1,i2 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2) ];
}
template< typename iType0 , typename iType1 , typename iType2 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 3, iType0, iType1, iType2 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_3( m_offset_map, i0,i1,i2 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2) ];
}
// rank 4:
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 4, iType0, iType1, iType2, iType3 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_4( m_offset_map, i0,i1,i2,i3 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3) ];
}
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 4, iType0, iType1, iType2, iType3 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_4( m_offset_map, i0,i1,i2,i3 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3) ];
}
// rank 5:
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 5, iType0, iType1, iType2, iType3 , iType4 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_5( m_offset_map, i0,i1,i2,i3,i4 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4) ];
}
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 5, iType0, iType1, iType2, iType3 , iType4 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_5( m_offset_map, i0,i1,i2,i3,i4 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4) ];
}
// rank 6:
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 6,
iType0, iType1, iType2, iType3 , iType4, iType5 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_6( m_offset_map, i0,i1,i2,i3,i4,i5 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5) ];
}
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 6,
iType0, iType1, iType2, iType3 , iType4, iType5 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_6( m_offset_map, i0,i1,i2,i3,i4,i5 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5) ];
}
// rank 7:
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 , typename iType6 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 7,
iType0, iType1, iType2, iType3 , iType4, iType5, iType6 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 , const iType6 & i6 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_7( m_offset_map, i0,i1,i2,i3,i4,i5,i6 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5,i6) ];
}
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 , typename iType6 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 7,
iType0, iType1, iType2, iType3 , iType4, iType5, iType6 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 , const iType6 & i6 , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_7( m_offset_map, i0,i1,i2,i3,i4,i5,i6 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5,i6) ];
}
// rank 8:
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 , typename iType6 , typename iType7 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 8,
iType0, iType1, iType2, iType3 , iType4, iType5, iType6, iType7 >::type
operator() ( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 , const iType6 & i6 , const iType7 & i7 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_8( m_offset_map, i0,i1,i2,i3,i4,i5,i6,i7 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5,i6,i7) ];
}
template< typename iType0 , typename iType1 , typename iType2 , typename iType3 ,
typename iType4 , typename iType5 , typename iType6 , typename iType7 >
KOKKOS_FORCEINLINE_FUNCTION
typename Impl::ViewEnableArrayOper< reference_type ,
traits, typename traits::array_layout, 8,
iType0, iType1, iType2, iType3 , iType4, iType5, iType6, iType7 >::type
at( const iType0 & i0 , const iType1 & i1 , const iType2 & i2 , const iType3 & i3 ,
const iType4 & i4 , const iType5 & i5 , const iType6 & i6 , const iType7 & i7 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_8( m_offset_map, i0,i1,i2,i3,i4,i5,i6,i7 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , ptr_on_device() );
return m_ptr_on_device[ m_offset_map(i0,i1,i2,i3,i4,i5,i6,i7) ];
}
//------------------------------------
// Access to the underlying contiguous storage of this view specialization.
// These methods are specific to specialization of a view.
KOKKOS_FORCEINLINE_FUNCTION
typename traits::value_type * ptr_on_device() const
{ return (typename traits::value_type *) m_ptr_on_device ; }
// Stride of physical storage, dimensioned to at least Rank
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{ m_offset_map.stride(s); }
// Count of contiguously allocated data members including padding.
KOKKOS_INLINE_FUNCTION
typename traits::size_type capacity() const
{ return m_offset_map.capacity(); }
// If the view data can be treated (deep copied)
// as a contiguous block of memory.
KOKKOS_INLINE_FUNCTION
bool is_contiguous() const
{ return m_management.is_contiguous(); }
const Impl::AllocationTracker & tracker() const { return m_tracker; }
};
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
template< class LT , class LL , class LD , class LM , class LS ,
class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( Impl::is_same< LS , RS >::value ), bool >::type
operator == ( const View<LT,LL,LD,LM,LS> & lhs ,
const View<RT,RL,RD,RM,RS> & rhs )
{
// Same data, layout, dimensions
typedef ViewTraits<LT,LL,LD,LM> lhs_traits ;
typedef ViewTraits<RT,RL,RD,RM> rhs_traits ;
return
Impl::is_same< typename lhs_traits::const_data_type ,
typename rhs_traits::const_data_type >::value &&
Impl::is_same< typename lhs_traits::array_layout ,
typename rhs_traits::array_layout >::value &&
Impl::is_same< typename lhs_traits::memory_space ,
typename rhs_traits::memory_space >::value &&
Impl::is_same< typename lhs_traits::specialize ,
typename rhs_traits::specialize >::value &&
lhs.ptr_on_device() == rhs.ptr_on_device() &&
lhs.shape() == rhs.shape() ;
}
template< class LT , class LL , class LD , class LM , class LS ,
class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
bool operator != ( const View<LT,LL,LD,LM,LS> & lhs ,
const View<RT,RL,RD,RM,RS> & rhs )
{
return ! operator==( lhs , rhs );
}
//----------------------------------------------------------------------------
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
//----------------------------------------------------------------------------
/** \brief Deep copy a value into a view.
*/
template< class DT , class DL , class DD , class DM , class DS >
inline
void deep_copy( const View<DT,DL,DD,DM,DS> & dst ,
typename Impl::enable_if<(
Impl::is_same< typename ViewTraits<DT,DL,DD,DM>::non_const_value_type ,
typename ViewTraits<DT,DL,DD,DM>::value_type >::value
), typename ViewTraits<DT,DL,DD,DM>::const_value_type >::type & value )
{
Impl::ViewFill< View<DT,DL,DD,DM,DS> >( dst , value );
}
template< class ST , class SL , class SD , class SM , class SS >
inline
typename Impl::enable_if<( ViewTraits<ST,SL,SD,SM>::rank == 0 )>::type
deep_copy( ST & dst , const View<ST,SL,SD,SM,SS> & src )
{
typedef ViewTraits<ST,SL,SD,SM> src_traits ;
typedef typename src_traits::memory_space src_memory_space ;
Impl::DeepCopy< HostSpace , src_memory_space >( & dst , src.ptr_on_device() , sizeof(ST) );
}
//----------------------------------------------------------------------------
/** \brief A deep copy between views of compatible type, and rank zero.
*/
template< class DT , class DL , class DD , class DM , class DS ,
class ST , class SL , class SD , class SM , class SS >
inline
void deep_copy( const View<DT,DL,DD,DM,DS> & dst ,
const View<ST,SL,SD,SM,SS> & src ,
typename Impl::enable_if<(
// Same type and destination is not constant:
Impl::is_same< typename View<DT,DL,DD,DM,DS>::value_type ,
typename View<ST,SL,SD,SM,SS>::non_const_value_type >::value
&&
// Rank zero:
( unsigned(View<DT,DL,DD,DM,DS>::rank) == unsigned(0) ) &&
( unsigned(View<ST,SL,SD,SM,SS>::rank) == unsigned(0) )
)>::type * = 0 )
{
typedef View<DT,DL,DD,DM,DS> dst_type ;
typedef View<ST,SL,SD,SM,SS> src_type ;
typedef typename dst_type::memory_space dst_memory_space ;
typedef typename src_type::memory_space src_memory_space ;
typedef typename src_type::value_type value_type ;
if ( dst.ptr_on_device() != src.ptr_on_device() ) {
Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.ptr_on_device() , src.ptr_on_device() , sizeof(value_type) );
}
}
//----------------------------------------------------------------------------
/** \brief A deep copy between views of the default specialization, compatible type,
* same non-zero rank, same contiguous layout.
*/
template< class DT , class DL , class DD , class DM ,
class ST , class SL , class SD , class SM >
inline
void deep_copy( const View<DT,DL,DD,DM,Impl::ViewDefault> & dst ,
const View<ST,SL,SD,SM,Impl::ViewDefault> & src ,
typename Impl::enable_if<(
// Same type and destination is not constant:
Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::value_type ,
typename View<ST,SL,SD,SM,Impl::ViewDefault>::non_const_value_type >::value
&&
// Same non-zero rank:
( unsigned(View<DT,DL,DD,DM,Impl::ViewDefault>::rank) ==
unsigned(View<ST,SL,SD,SM,Impl::ViewDefault>::rank) )
&&
( 0 < unsigned(View<DT,DL,DD,DM,Impl::ViewDefault>::rank) )
&&
// Same layout:
Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout ,
typename View<ST,SL,SD,SM,Impl::ViewDefault>::array_layout >::value
)>::type * = 0 )
{
typedef View<DT,DL,DD,DM,Impl::ViewDefault> dst_type ;
typedef View<ST,SL,SD,SM,Impl::ViewDefault> src_type ;
typedef typename dst_type::memory_space dst_memory_space ;
typedef typename src_type::memory_space src_memory_space ;
enum { is_contiguous = // Contiguous (e.g., non-strided, non-tiled) layout
Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout , LayoutLeft >::value ||
Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout , LayoutRight >::value };
if ( dst.ptr_on_device() != src.ptr_on_device() ) {
// Same shape (dimensions)
const bool shapes_are_equal = dst.shape() == src.shape();
if ( shapes_are_equal && is_contiguous && dst.capacity() == src.capacity() ) {
// Views span equal length contiguous range.
// Assuming can perform a straight memory copy over this range.
const size_t nbytes = sizeof(typename dst_type::value_type) * dst.capacity();
Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.ptr_on_device() , src.ptr_on_device() , nbytes );
}
else {
// Destination view's execution space must be able to directly access source memory space
// in order for the ViewRemap functor run in the destination memory space's execution space.
size_t stride[8];
src.stride(stride);
size_t size_stride = stride[0]*src.dimension_0();
size_t size_dim = src.dimension_0();
for(int i = 1; i<src.rank; i++) {
if(stride[i]*src.dimension(i)>size_stride)
size_stride = stride[i]*src.dimension(i);
size_dim*=src.dimension(i);
}
if( shapes_are_equal && size_stride == size_dim) {
const size_t nbytes = sizeof(typename dst_type::value_type) * dst.capacity();
Impl::DeepCopy< dst_memory_space , src_memory_space >( dst.ptr_on_device() , src.ptr_on_device() , nbytes );
} else {
Impl::ViewRemap< dst_type , src_type >( dst , src );
}
}
}
}
/** \brief Deep copy equal dimension arrays in the same space which
* have different layouts or specializations.
*/
template< class DT , class DL , class DD , class DM , class DS ,
class ST , class SL , class SD , class SM , class SS >
inline
void deep_copy( const View< DT, DL, DD, DM, DS > & dst ,
const View< ST, SL, SD, SM, SS > & src ,
const typename Impl::enable_if<(
// Same type and destination is not constant:
Impl::is_same< typename View<DT,DL,DD,DM,DS>::value_type ,
typename View<DT,DL,DD,DM,DS>::non_const_value_type >::value
&&
// Source memory space is accessible to destination memory space
Impl::VerifyExecutionCanAccessMemorySpace< typename View<DT,DL,DD,DM,DS>::memory_space
, typename View<ST,SL,SD,SM,SS>::memory_space >::value
&&
// Same non-zero rank
( unsigned( View<DT,DL,DD,DM,DS>::rank ) ==
unsigned( View<ST,SL,SD,SM,SS>::rank ) )
&&
( 0 < unsigned( View<DT,DL,DD,DM,DS>::rank ) )
&&
// Different layout or different specialization:
( ( ! Impl::is_same< typename View<DT,DL,DD,DM,DS>::array_layout ,
typename View<ST,SL,SD,SM,SS>::array_layout >::value )
||
( ! Impl::is_same< DS , SS >::value )
)
)>::type * = 0 )
{
typedef View< DT, DL, DD, DM, DS > dst_type ;
typedef View< ST, SL, SD, SM, SS > src_type ;
assert_shapes_equal_dimension( dst.shape() , src.shape() );
Impl::ViewRemap< dst_type , src_type >( dst , src );
}
+}
+
+//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
//----------------------------------------------------------------------------
+/** \brief Deep copy a value into a view.
+ */
+template< class ExecSpace, class DT , class DL , class DD , class DM , class DS >
+inline
+void deep_copy( const ExecSpace&, const View<DT,DL,DD,DM,DS> & dst ,
+ typename Impl::enable_if<(
+ Impl::is_same< typename ViewTraits<DT,DL,DD,DM>::non_const_value_type ,
+ typename ViewTraits<DT,DL,DD,DM>::value_type >::value
+ ), typename ViewTraits<DT,DL,DD,DM>::const_value_type >::type & value )
+{
+ Impl::ViewFill< View<DT,DL,DD,DM,DS> >( dst , value );
+}
+
+template< class ExecSpace, class ST , class SL , class SD , class SM , class SS >
+inline
+typename Impl::enable_if<( ViewTraits<ST,SL,SD,SM>::rank == 0 )>::type
+deep_copy( const ExecSpace& exec, ST & dst , const View<ST,SL,SD,SM,SS> & src )
+{
+ typedef ViewTraits<ST,SL,SD,SM> src_traits ;
+ typedef typename src_traits::memory_space src_memory_space ;
+ Impl::DeepCopy< HostSpace , src_memory_space , ExecSpace >( exec , & dst , src.ptr_on_device() , sizeof(ST) );
+}
+
+//----------------------------------------------------------------------------
+/** \brief A deep copy between views of compatible type, and rank zero.
+ */
+template< class ExecSpace ,
+ class DT , class DL , class DD , class DM , class DS ,
+ class ST , class SL , class SD , class SM , class SS >
+inline
+void deep_copy( const ExecSpace& exec,
+ const View<DT,DL,DD,DM,DS> & dst ,
+ const View<ST,SL,SD,SM,SS> & src ,
+ typename Impl::enable_if<(
+ // Same type and destination is not constant:
+ Impl::is_same< typename View<DT,DL,DD,DM,DS>::value_type ,
+ typename View<ST,SL,SD,SM,SS>::non_const_value_type >::value
+ &&
+ // Rank zero:
+ ( unsigned(View<DT,DL,DD,DM,DS>::rank) == unsigned(0) ) &&
+ ( unsigned(View<ST,SL,SD,SM,SS>::rank) == unsigned(0) )
+ )>::type * = 0 )
+{
+ typedef View<DT,DL,DD,DM,DS> dst_type ;
+ typedef View<ST,SL,SD,SM,SS> src_type ;
+
+ typedef typename dst_type::memory_space dst_memory_space ;
+ typedef typename src_type::memory_space src_memory_space ;
+ typedef typename src_type::value_type value_type ;
+
+ if ( dst.ptr_on_device() != src.ptr_on_device() ) {
+ Impl::DeepCopy< dst_memory_space , src_memory_space , ExecSpace >( exec , dst.ptr_on_device() , src.ptr_on_device() , sizeof(value_type) );
+ }
+}
+
+//----------------------------------------------------------------------------
+/** \brief A deep copy between views of the default specialization, compatible type,
+ * same non-zero rank, same contiguous layout.
+ */
+template< class ExecSpace ,
+ class DT , class DL , class DD , class DM ,
+ class ST , class SL , class SD , class SM >
+inline
+void deep_copy( const ExecSpace & exec,
+ const View<DT,DL,DD,DM,Impl::ViewDefault> & dst ,
+ const View<ST,SL,SD,SM,Impl::ViewDefault> & src ,
+ typename Impl::enable_if<(
+ // Same type and destination is not constant:
+ Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::value_type ,
+ typename View<ST,SL,SD,SM,Impl::ViewDefault>::non_const_value_type >::value
+ &&
+ // Same non-zero rank:
+ ( unsigned(View<DT,DL,DD,DM,Impl::ViewDefault>::rank) ==
+ unsigned(View<ST,SL,SD,SM,Impl::ViewDefault>::rank) )
+ &&
+ ( 0 < unsigned(View<DT,DL,DD,DM,Impl::ViewDefault>::rank) )
+ &&
+ // Same layout:
+ Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout ,
+ typename View<ST,SL,SD,SM,Impl::ViewDefault>::array_layout >::value
+ )>::type * = 0 )
+{
+ typedef View<DT,DL,DD,DM,Impl::ViewDefault> dst_type ;
+ typedef View<ST,SL,SD,SM,Impl::ViewDefault> src_type ;
+
+ typedef typename dst_type::memory_space dst_memory_space ;
+ typedef typename src_type::memory_space src_memory_space ;
+
+ enum { is_contiguous = // Contiguous (e.g., non-strided, non-tiled) layout
+ Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout , LayoutLeft >::value ||
+ Impl::is_same< typename View<DT,DL,DD,DM,Impl::ViewDefault>::array_layout , LayoutRight >::value };
+
+ if ( dst.ptr_on_device() != src.ptr_on_device() ) {
+
+ // Same shape (dimensions)
+
+ const bool shapes_are_equal = dst.shape() == src.shape();
+
+ if ( shapes_are_equal && is_contiguous && dst.capacity() == src.capacity() ) {
+
+ // Views span equal length contiguous range.
+ // Assuming can perform a straight memory copy over this range.
+
+ const size_t nbytes = sizeof(typename dst_type::value_type) * dst.capacity();
+
+ Impl::DeepCopy< dst_memory_space , src_memory_space , ExecSpace >( exec , dst.ptr_on_device() , src.ptr_on_device() , nbytes );
+ }
+ else {
+ // Destination view's execution space must be able to directly access source memory space
+ // in order for the ViewRemap functor run in the destination memory space's execution space.
+ size_t stride[8];
+ src.stride(stride);
+ size_t size_stride = stride[0]*src.dimension_0();
+ size_t size_dim = src.dimension_0();
+ for(int i = 1; i<src.rank; i++) {
+ if(stride[i]*src.dimension(i)>size_stride)
+ size_stride = stride[i]*src.dimension(i);
+ size_dim*=src.dimension(i);
+ }
+
+ if( shapes_are_equal && size_stride == size_dim) {
+ const size_t nbytes = sizeof(typename dst_type::value_type) * dst.capacity();
+
+ Impl::DeepCopy< dst_memory_space , src_memory_space , ExecSpace >( exec , dst.ptr_on_device() , src.ptr_on_device() , nbytes );
+ } else {
+ Impl::ViewRemap< dst_type , src_type >( dst , src );
+ }
+ }
+ }
+}
+
+
+/** \brief Deep copy equal dimension arrays in the same space which
+ * have different layouts or specializations.
+ */
+template< class ExecSpace ,
+ class DT , class DL , class DD , class DM , class DS ,
+ class ST , class SL , class SD , class SM , class SS >
+inline
+void deep_copy( const ExecSpace& ,
+ const View< DT, DL, DD, DM, DS > & dst ,
+ const View< ST, SL, SD, SM, SS > & src ,
+ const typename Impl::enable_if<(
+ // Same type and destination is not constant:
+ Impl::is_same< typename View<DT,DL,DD,DM,DS>::value_type ,
+ typename View<DT,DL,DD,DM,DS>::non_const_value_type >::value
+ &&
+ // Source memory space is accessible to destination memory space
+ Impl::VerifyExecutionCanAccessMemorySpace< typename View<DT,DL,DD,DM,DS>::memory_space
+ , typename View<ST,SL,SD,SM,SS>::memory_space >::value
+ &&
+ // Same non-zero rank
+ ( unsigned( View<DT,DL,DD,DM,DS>::rank ) ==
+ unsigned( View<ST,SL,SD,SM,SS>::rank ) )
+ &&
+ ( 0 < unsigned( View<DT,DL,DD,DM,DS>::rank ) )
+ &&
+ // Different layout or different specialization:
+ ( ( ! Impl::is_same< typename View<DT,DL,DD,DM,DS>::array_layout ,
+ typename View<ST,SL,SD,SM,SS>::array_layout >::value )
+ ||
+ ( ! Impl::is_same< DS , SS >::value )
+ )
+ )>::type * = 0 )
+{
+ typedef View< DT, DL, DD, DM, DS > dst_type ;
+ typedef View< ST, SL, SD, SM, SS > src_type ;
+
+ assert_shapes_equal_dimension( dst.shape() , src.shape() );
+
+ Impl::ViewRemap< dst_type , src_type >( dst , src );
+}
+
+}
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
template< class T , class L , class D , class M , class S >
typename Impl::enable_if<(
View<T,L,D,M,S>::is_managed &&
!Impl::is_same<L,LayoutStride>::value
), typename View<T,L,D,M,S>::HostMirror >::type
inline
create_mirror( const View<T,L,D,M,S> & src )
{
typedef View<T,L,D,M,S> view_type ;
typedef typename view_type::HostMirror host_view_type ;
// 'view' is managed therefore we can allocate a
// compatible host_view through the ordinary constructor.
std::string label = src.tracker().label();
label.append("_mirror");
return host_view_type( label ,
src.dimension_0() ,
src.dimension_1() ,
src.dimension_2() ,
src.dimension_3() ,
src.dimension_4() ,
src.dimension_5() ,
src.dimension_6() ,
src.dimension_7() );
}
template< class T , class L , class D , class M , class S >
typename Impl::enable_if<(
View<T,L,D,M,S>::is_managed &&
Impl::is_same<L,LayoutStride>::value
), typename View<T,L,D,M,S>::HostMirror >::type
inline
create_mirror( const View<T,L,D,M,S> & src )
{
typedef View<T,L,D,M,S> view_type ;
typedef typename view_type::HostMirror host_view_type ;
// 'view' is managed therefore we can allocate a
// compatible host_view through the ordinary constructor.
std::string label = src.tracker().label();
label.append("_mirror");
LayoutStride layout;
src.stride(layout.stride);
layout.dimension[0] = src.dimension_0();
layout.dimension[1] = src.dimension_1();
layout.dimension[2] = src.dimension_2();
layout.dimension[3] = src.dimension_3();
layout.dimension[4] = src.dimension_4();
layout.dimension[5] = src.dimension_5();
layout.dimension[6] = src.dimension_6();
layout.dimension[7] = src.dimension_7();
return host_view_type( label , layout );
}
template< class T , class L , class D , class M , class S >
typename Impl::enable_if<(
View<T,L,D,M,S>::is_managed &&
Impl::ViewAssignable< typename View<T,L,D,M,S>::HostMirror , View<T,L,D,M,S> >::value
), typename View<T,L,D,M,S>::HostMirror >::type
inline
create_mirror_view( const View<T,L,D,M,S> & src )
{
return src ;
}
template< class T , class L , class D , class M , class S >
typename Impl::enable_if<(
View<T,L,D,M,S>::is_managed &&
! Impl::ViewAssignable< typename View<T,L,D,M,S>::HostMirror , View<T,L,D,M,S> >::value
), typename View<T,L,D,M,S>::HostMirror >::type
inline
create_mirror_view( const View<T,L,D,M,S> & src )
{
return create_mirror( src );
}
//----------------------------------------------------------------------------
/** \brief Resize a view with copying old data to new data at the corresponding indices. */
template< class T , class L , class D , class M , class S >
inline
void resize( View<T,L,D,M,S> & v ,
const typename Impl::enable_if< ViewTraits<T,L,D,M>::is_managed , size_t >::type n0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
{
typedef View<T,L,D,M,S> view_type ;
const std::string label = v.tracker().label();
view_type v_resized( label, n0, n1, n2, n3, n4, n5, n6, n7 );
Impl::ViewRemap< view_type , view_type >( v_resized , v );
v = v_resized ;
}
/** \brief Reallocate a view without copying old data to new data */
template< class T , class L , class D , class M , class S >
inline
void realloc( View<T,L,D,M,S> & v ,
const typename Impl::enable_if< ViewTraits<T,L,D,M>::is_managed , size_t >::type n0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
{
typedef View<T,L,D,M,S> view_type ;
// Query the current label and reuse it.
const std::string label = v.tracker().label();
v = view_type(); // deallocate first, if the only view to memory.
v = view_type( label, n0, n1, n2, n3, n4, n5, n6, n7 );
}
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
-/** \brief Tag denoting that a subview should capture all of a dimension */
-struct ALL { KOKKOS_INLINE_FUNCTION ALL(){} };
-
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 , class ArgType6 , class ArgType7 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , ArgType7
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 ,
const ArgType6 & arg6 ,
const ArgType7 & arg7 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , ArgType7
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 , class ArgType6 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 ,
const ArgType6 & arg6 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , ArgType6 , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2, arg3, arg4, arg5, arg6 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 , class ArgType5 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 ,
const ArgType5 & arg5 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , ArgType5 , void , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2, arg3, arg4, arg5 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 ,
class ArgType4 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , void , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 ,
const ArgType4 & arg4 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, ArgType4 , void , void , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2, arg3, arg4 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 , class ArgType3 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, void , void , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 ,
const ArgType3 & arg3 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , ArgType3
, void , void , void , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2, arg3 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 , class ArgType2 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , void
, void , void , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 ,
const ArgType2 & arg2 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , ArgType2 , void
, void , void , void , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1, arg2 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 , class ArgType1 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , void , void
, void , void , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 ,
const ArgType1 & arg1 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , ArgType1 , void , void
, void , void , void , void
>::type
DstViewType ;
return DstViewType( src, arg0, arg1 );
}
template< class D , class A1 , class A2 , class A3 , class S ,
class ArgType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , void , void , void
, void , void , void , void
>::type
subview( const View<D,A1,A2,A3,S> & src ,
const ArgType0 & arg0 )
{
typedef typename
Impl::ViewSubview< View<D,A1,A2,A3,S>
, ArgType0 , void , void , void
, void , void , void , void
>::type
DstViewType ;
return DstViewType( src, arg0 );
}
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#include <impl/Kokkos_ViewDefault.hpp>
#include <impl/Kokkos_Atomic_View.hpp>
+#include <impl/Kokkos_ViewOffset.hpp>
+#include <impl/Kokkos_ViewSupport.hpp>
+
+namespace Kokkos {
+/** \brief Tag denoting that a subview should capture all of a dimension */
+struct ALL { KOKKOS_INLINE_FUNCTION ALL(){} };
+}
+
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
+#include <KokkosExp_View.hpp>
+
#else
+// Must define before includng <impl/Kokkos_ViewOffset.hpp>
+namespace Kokkos {
+namespace Experimental {
+namespace Impl {
+struct ALL_t ;
+}
+}
+using ALL = Experimental::Impl::ALL_t ;
+}
+
#include <impl/Kokkos_ViewOffset.hpp>
#include <impl/Kokkos_ViewSupport.hpp>
-#endif /* #if defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
-
#include <KokkosExp_View.hpp>
+#endif /* #if defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
+
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif
diff --git a/lib/kokkos/core/src/Kokkos_hwloc.hpp b/lib/kokkos/core/src/Kokkos_hwloc.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Makefile b/lib/kokkos/core/src/Makefile
old mode 100755
new mode 100644
index 24d8e465f..8bb350859
--- a/lib/kokkos/core/src/Makefile
+++ b/lib/kokkos/core/src/Makefile
@@ -1,118 +1,127 @@
KOKKOS_PATH = ../..
PREFIX ?= /usr/local/lib/kokkos
default: messages build-lib
echo "End Build"
include $(KOKKOS_PATH)/Makefile.kokkos
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
CXX = nvcc_wrapper
CXXFLAGS ?= -O3
LINK = nvcc_wrapper
LINKFLAGS ?=
else
CXX ?= g++
CXXFLAGS ?= -O3
LINK ?= g++
LINKFLAGS ?=
endif
PWD = $(shell pwd)
KOKKOS_HEADERS_INCLUDE = $(wildcard $(KOKKOS_PATH)/core/src/*.hpp)
KOKKOS_HEADERS_INCLUDE_IMPL = $(wildcard $(KOKKOS_PATH)/core/src/impl/*.hpp)
KOKKOS_HEADERS_INCLUDE += $(wildcard $(KOKKOS_PATH)/containers/src/*.hpp)
KOKKOS_HEADERS_INCLUDE_IMPL += $(wildcard $(KOKKOS_PATH)/containers/src/impl/*.hpp)
KOKKOS_HEADERS_INCLUDE += $(wildcard $(KOKKOS_PATH)/algorithms/src/*.hpp)
CONDITIONAL_COPIES =
ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
KOKKOS_HEADERS_CUDA += $(wildcard $(KOKKOS_PATH)/core/src/Cuda/*.hpp)
CONDITIONAL_COPIES += copy-cuda
endif
ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
KOKKOS_HEADERS_THREADS += $(wildcard $(KOKKOS_PATH)/core/src/Threads/*.hpp)
CONDITIONAL_COPIES += copy-threads
endif
+ifeq ($(KOKKOS_INTERNAL_USE_QTHREAD), 1)
+ KOKKOS_HEADERS_QTHREAD += $(wildcard $(KOKKOS_PATH)/core/src/Qthread/*.hpp)
+ CONDITIONAL_COPIES += copy-qthread
+endif
+
ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
KOKKOS_HEADERS_OPENMP += $(wildcard $(KOKKOS_PATH)/core/src/OpenMP/*.hpp)
CONDITIONAL_COPIES += copy-openmp
endif
messages:
echo "Start Build"
build-makefile-kokkos:
rm -f Makefile.kokkos
echo "#Global Settings used to generate this library" >> Makefile.kokkos
echo "KOKKOS_PATH = $(PREFIX)" >> Makefile.kokkos
echo "KOKKOS_DEVICES = $(KOKKOS_DEVICES)" >> Makefile.kokkos
echo "KOKKOS_ARCH = $(KOKKOS_ARCH)" >> Makefile.kokkos
echo "KOKKOS_DEBUG = $(KOKKOS_DEBUG)" >> Makefile.kokkos
echo "KOKKOS_USE_TPLS = $(KOKKOS_USE_TPLS)" >> Makefile.kokkos
echo "KOKKOS_CXX_STANDARD = $(KOKKOS_CXX_STANDARD)" >> Makefile.kokkos
echo "KOKKOS_CUDA_OPTIONS = $(KOKKOS_CUDA_OPTIONS)" >> Makefile.kokkos
echo "CXX ?= $(CXX)" >> Makefile.kokkos
echo "" >> Makefile.kokkos
echo "#Source and Header files of Kokkos relative to KOKKOS_PATH" >> Makefile.kokkos
echo "KOKKOS_HEADERS = $(KOKKOS_HEADERS)" >> Makefile.kokkos
echo "KOKKOS_SRC = $(KOKKOS_SRC)" >> Makefile.kokkos
echo "" >> Makefile.kokkos
echo "#Variables used in application Makefiles" >> Makefile.kokkos
echo "KOKKOS_CPP_DEPENDS = $(KOKKOS_CPP_DEPENDS)" >> Makefile.kokkos
echo "KOKKOS_CXXFLAGS = $(KOKKOS_CXXFLAGS)" >> Makefile.kokkos
echo "KOKKOS_CPPFLAGS = $(KOKKOS_CPPFLAGS)" >> Makefile.kokkos
echo "KOKKOS_LINK_DEPENDS = $(KOKKOS_LINK_DEPENDS)" >> Makefile.kokkos
echo "KOKKOS_LIBS = $(KOKKOS_LIBS)" >> Makefile.kokkos
echo "KOKKOS_LDFLAGS = $(KOKKOS_LDFLAGS)" >> Makefile.kokkos
sed \
-e 's|$(KOKKOS_PATH)/core/src|$(PREFIX)/include|g' \
-e 's|$(KOKKOS_PATH)/containers/src|$(PREFIX)/include|g' \
-e 's|$(KOKKOS_PATH)/algorithms/src|$(PREFIX)/include|g' \
-e 's|-L$(PWD)|-L$(PREFIX)/lib|g' \
-e 's|= libkokkos.a|= $(PREFIX)/lib/libkokkos.a|g' \
-e 's|= KokkosCore_config.h|= $(PREFIX)/include/KokkosCore_config.h|g' Makefile.kokkos \
> Makefile.kokkos.tmp
mv -f Makefile.kokkos.tmp Makefile.kokkos
build-lib: build-makefile-kokkos $(KOKKOS_LINK_DEPENDS)
mkdir:
mkdir -p $(PREFIX)
mkdir -p $(PREFIX)/include
mkdir -p $(PREFIX)/lib
mkdir -p $(PREFIX)/include/impl
copy-cuda: mkdir
mkdir -p $(PREFIX)/include/Cuda
cp $(KOKKOS_HEADERS_CUDA) $(PREFIX)/include/Cuda
copy-threads: mkdir
mkdir -p $(PREFIX)/include/Threads
cp $(KOKKOS_HEADERS_THREADS) $(PREFIX)/include/Threads
+copy-qthread: mkdir
+ mkdir -p $(PREFIX)/include/Qthread
+ cp $(KOKKOS_HEADERS_QTHREAD) $(PREFIX)/include/Qthread
+
copy-openmp: mkdir
mkdir -p $(PREFIX)/include/OpenMP
cp $(KOKKOS_HEADERS_OPENMP) $(PREFIX)/include/OpenMP
install: mkdir $(CONDITIONAL_COPIES) build-lib
cp $(KOKKOS_HEADERS_INCLUDE) $(PREFIX)/include
cp $(KOKKOS_HEADERS_INCLUDE_IMPL) $(PREFIX)/include/impl
cp Makefile.kokkos $(PREFIX)
cp libkokkos.a $(PREFIX)/lib
cp KokkosCore_config.h $(PREFIX)/include
clean: kokkos-clean
rm Makefile.kokkos
diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMP_Parallel.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp b/lib/kokkos/core/src/OpenMP/Kokkos_OpenMPexec.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp
old mode 100755
new mode 100644
index d8b40943d..33ffb6314
--- a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp
+++ b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.cpp
@@ -1,484 +1,496 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_Core_fwd.hpp>
#if defined( KOKKOS_HAVE_QTHREAD )
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <utility>
#include <Kokkos_Qthread.hpp>
#include <Kokkos_Atomic.hpp>
#include <impl/Kokkos_Error.hpp>
// Defines to enable experimental Qthread functionality
#define QTHREAD_LOCAL_PRIORITY
#define CLONED_TASKS
#include <qthread/qthread.h>
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
namespace {
enum { MAXIMUM_QTHREAD_WORKERS = 1024 };
/** s_exec is indexed by the reverse rank of the workers
* for faster fan-in / fan-out lookups
* [ n - 1 , n - 2 , ... , 0 ]
*/
QthreadExec * s_exec[ MAXIMUM_QTHREAD_WORKERS ];
int s_number_shepherds = 0 ;
int s_number_workers_per_shepherd = 0 ;
int s_number_workers = 0 ;
inline
QthreadExec ** worker_exec()
{
return s_exec + s_number_workers - ( qthread_shep() * s_number_workers_per_shepherd + qthread_worker_local(NULL) + 1 );
}
const int s_base_size = QthreadExec::align_alloc( sizeof(QthreadExec) );
int s_worker_reduce_end = 0 ; /* End of worker reduction memory */
int s_worker_shared_end = 0 ; /* Total of worker scratch memory */
int s_worker_shared_begin = 0 ; /* Beginning of worker shared memory */
QthreadExecFunctionPointer volatile s_active_function = 0 ;
const void * volatile s_active_function_arg = 0 ;
} /* namespace */
} /* namespace Impl */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
namespace Kokkos {
void Qthread::initialize( int thread_count )
{
// Environment variable: QTHREAD_NUM_SHEPHERDS
// Environment variable: QTHREAD_NUM_WORKERS_PER_SHEP
// Environment variable: QTHREAD_HWPAR
{
char buffer[256];
snprintf(buffer,sizeof(buffer),"QTHREAD_HWPAR=%d",thread_count);
putenv(buffer);
}
const bool ok_init = ( QTHREAD_SUCCESS == qthread_initialize() ) &&
( thread_count == qthread_num_shepherds() * qthread_num_workers_local(NO_SHEPHERD) ) &&
( thread_count == qthread_num_workers() );
bool ok_symmetry = true ;
if ( ok_init ) {
Impl::s_number_shepherds = qthread_num_shepherds();
Impl::s_number_workers_per_shepherd = qthread_num_workers_local(NO_SHEPHERD);
Impl::s_number_workers = Impl::s_number_shepherds * Impl::s_number_workers_per_shepherd ;
for ( int i = 0 ; ok_symmetry && i < Impl::s_number_shepherds ; ++i ) {
ok_symmetry = ( Impl::s_number_workers_per_shepherd == qthread_num_workers_local(i) );
}
}
if ( ! ok_init || ! ok_symmetry ) {
std::ostringstream msg ;
msg << "Kokkos::Qthread::initialize(" << thread_count << ") FAILED" ;
msg << " : qthread_num_shepherds = " << qthread_num_shepherds();
msg << " : qthread_num_workers_per_shepherd = " << qthread_num_workers_local(NO_SHEPHERD);
msg << " : qthread_num_workers = " << qthread_num_workers();
if ( ! ok_symmetry ) {
msg << " : qthread_num_workers_local = {" ;
for ( int i = 0 ; i < Impl::s_number_shepherds ; ++i ) {
msg << " " << qthread_num_workers_local(i) ;
}
msg << " }" ;
}
Impl::s_number_workers = 0 ;
Impl::s_number_shepherds = 0 ;
Impl::s_number_workers_per_shepherd = 0 ;
if ( ok_init ) { qthread_finalize(); }
Kokkos::Impl::throw_runtime_exception( msg.str() );
}
Impl::QthreadExec::resize_worker_scratch( 256 , 256 );
// Init the array for used for arbitrarily sized atomics
Impl::init_lock_array_host_space();
}
void Qthread::finalize()
{
Impl::QthreadExec::clear_workers();
if ( Impl::s_number_workers ) {
qthread_finalize();
}
Impl::s_number_workers = 0 ;
Impl::s_number_shepherds = 0 ;
Impl::s_number_workers_per_shepherd = 0 ;
}
void Qthread::print_configuration( std::ostream & s , const bool detail )
{
s << "Kokkos::Qthread {"
<< " num_shepherds(" << Impl::s_number_shepherds << ")"
<< " num_workers_per_shepherd(" << Impl::s_number_workers_per_shepherd << ")"
<< " }" << std::endl ;
}
Qthread & Qthread::instance( int )
{
static Qthread q ;
return q ;
}
void Qthread::fence()
{
}
int Qthread::shepherd_size() const { return Impl::s_number_shepherds ; }
int Qthread::shepherd_worker_size() const { return Impl::s_number_workers_per_shepherd ; }
} /* namespace Kokkos */
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
namespace {
aligned_t driver_exec_all( void * arg )
{
QthreadExec & exec = **worker_exec();
(*s_active_function)( exec , s_active_function_arg );
/*
fprintf( stdout
, "QthreadExec driver worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n"
, exec.worker_rank()
, exec.worker_size()
, exec.shepherd_rank()
, exec.shepherd_size()
, exec.shepherd_worker_rank()
, exec.shepherd_worker_size()
);
fflush(stdout);
*/
return 0 ;
}
aligned_t driver_resize_worker_scratch( void * arg )
{
static volatile int lock_begin = 0 ;
static volatile int lock_end = 0 ;
QthreadExec ** const exec = worker_exec();
//----------------------------------------
// Serialize allocation for thread safety
while ( ! atomic_compare_exchange_strong( & lock_begin , 0 , 1 ) ); // Spin wait to claim lock
const bool ok = 0 == *exec ;
if ( ok ) { *exec = (QthreadExec *) malloc( s_base_size + s_worker_shared_end ); }
lock_begin = 0 ; // release lock
if ( ok ) { new( *exec ) QthreadExec(); }
//----------------------------------------
// Wait for all calls to complete to insure that each worker has executed.
if ( s_number_workers == 1 + atomic_fetch_add( & lock_end , 1 ) ) { lock_end = 0 ; }
while ( lock_end );
/*
fprintf( stdout
, "QthreadExec resize worker(%d:%d) shepherd(%d:%d) shepherd_worker(%d:%d) done\n"
, (**exec).worker_rank()
, (**exec).worker_size()
, (**exec).shepherd_rank()
, (**exec).shepherd_size()
, (**exec).shepherd_worker_rank()
, (**exec).shepherd_worker_size()
);
fflush(stdout);
*/
//----------------------------------------
if ( ! ok ) {
fprintf( stderr , "Kokkos::QthreadExec resize failed\n" );
fflush( stderr );
}
return 0 ;
}
void verify_is_process( const char * const label , bool not_active = false )
{
const bool not_process = 0 != qthread_shep() || 0 != qthread_worker_local(NULL);
const bool is_active = not_active && ( s_active_function || s_active_function_arg );
if ( not_process || is_active ) {
std::string msg( label );
msg.append( " : FAILED" );
if ( not_process ) msg.append(" : not called by main process");
if ( is_active ) msg.append(" : parallel execution in progress");
Kokkos::Impl::throw_runtime_exception( msg );
}
}
}
int QthreadExec::worker_per_shepherd()
{
return s_number_workers_per_shepherd ;
}
QthreadExec::QthreadExec()
{
const int shepherd_rank = qthread_shep();
const int shepherd_worker_rank = qthread_worker_local(NULL);
const int worker_rank = shepherd_rank * s_number_workers_per_shepherd + shepherd_worker_rank ;
m_worker_base = s_exec ;
m_shepherd_base = s_exec + s_number_workers_per_shepherd * ( ( s_number_shepherds - ( shepherd_rank + 1 ) ) );
m_scratch_alloc = ( (unsigned char *) this ) + s_base_size ;
m_reduce_end = s_worker_reduce_end ;
m_shepherd_rank = shepherd_rank ;
m_shepherd_size = s_number_shepherds ;
m_shepherd_worker_rank = shepherd_worker_rank ;
m_shepherd_worker_size = s_number_workers_per_shepherd ;
m_worker_rank = worker_rank ;
m_worker_size = s_number_workers ;
m_worker_state = QthreadExec::Active ;
}
void QthreadExec::clear_workers()
{
for ( int iwork = 0 ; iwork < s_number_workers ; ++iwork ) {
QthreadExec * const exec = s_exec[iwork] ;
s_exec[iwork] = 0 ;
free( exec );
}
}
void QthreadExec::shared_reset( Qthread::scratch_memory_space & space )
{
new( & space )
Qthread::scratch_memory_space(
((unsigned char *) (**m_shepherd_base).m_scratch_alloc ) + s_worker_shared_begin ,
s_worker_shared_end - s_worker_shared_begin
);
}
void QthreadExec::resize_worker_scratch( const int reduce_size , const int shared_size )
{
const int exec_all_reduce_alloc = align_alloc( reduce_size );
const int shepherd_scan_alloc = align_alloc( 8 );
const int shepherd_shared_end = exec_all_reduce_alloc + shepherd_scan_alloc + align_alloc( shared_size );
if ( s_worker_reduce_end < exec_all_reduce_alloc ||
s_worker_shared_end < shepherd_shared_end ) {
/*
fprintf( stdout , "QthreadExec::resize\n");
fflush(stdout);
*/
// Clear current worker memory before allocating new worker memory
clear_workers();
// Increase the buffers to an aligned allocation
s_worker_reduce_end = exec_all_reduce_alloc ;
s_worker_shared_begin = exec_all_reduce_alloc + shepherd_scan_alloc ;
s_worker_shared_end = shepherd_shared_end ;
// Need to query which shepherd this main 'process' is running...
const int main_shep = qthread_shep();
// Have each worker resize its memory for proper first-touch
#if 0
for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) {
for ( int i = jshep != main_shep ? 0 : 1 ; i < s_number_workers_per_shepherd ; ++i ) {
qthread_fork_to( driver_resize_worker_scratch , NULL , NULL , jshep );
}}
#else
// If this function is used before the 'qthread.task_policy' unit test
// the 'qthread.task_policy' unit test fails with a seg-fault within libqthread.so.
for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) {
const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1 ;
if ( num_clone ) {
const int ret = qthread_fork_clones_to_local_priority
( driver_resize_worker_scratch /* function */
, NULL /* function data block */
, NULL /* pointer to return value feb */
, jshep /* shepherd number */
, num_clone - 1 /* number of instances - 1 */
);
assert(ret == QTHREAD_SUCCESS);
}
}
#endif
driver_resize_worker_scratch( NULL );
// Verify all workers allocated
bool ok = true ;
for ( int iwork = 0 ; ok && iwork < s_number_workers ; ++iwork ) { ok = 0 != s_exec[iwork] ; }
if ( ! ok ) {
std::ostringstream msg ;
msg << "Kokkos::Impl::QthreadExec::resize : FAILED for workers {" ;
for ( int iwork = 0 ; iwork < s_number_workers ; ++iwork ) {
if ( 0 == s_exec[iwork] ) { msg << " " << ( s_number_workers - ( iwork + 1 ) ); }
}
msg << " }" ;
Kokkos::Impl::throw_runtime_exception( msg.str() );
}
}
}
void QthreadExec::exec_all( Qthread & , QthreadExecFunctionPointer func , const void * arg )
{
verify_is_process("QthreadExec::exec_all(...)",true);
/*
fprintf( stdout , "QthreadExec::exec_all\n");
fflush(stdout);
*/
s_active_function = func ;
s_active_function_arg = arg ;
// Need to query which shepherd this main 'process' is running...
const int main_shep = qthread_shep();
#if 0
for ( int jshep = 0 , iwork = 0 ; jshep < s_number_shepherds ; ++jshep ) {
for ( int i = jshep != main_shep ? 0 : 1 ; i < s_number_workers_per_shepherd ; ++i , ++iwork ) {
qthread_fork_to( driver_exec_all , NULL , NULL , jshep );
}}
#else
// If this function is used before the 'qthread.task_policy' unit test
// the 'qthread.task_policy' unit test fails with a seg-fault within libqthread.so.
for ( int jshep = 0 ; jshep < s_number_shepherds ; ++jshep ) {
const int num_clone = jshep != main_shep ? s_number_workers_per_shepherd : s_number_workers_per_shepherd - 1 ;
if ( num_clone ) {
const int ret = qthread_fork_clones_to_local_priority
( driver_exec_all /* function */
, NULL /* function data block */
, NULL /* pointer to return value feb */
, jshep /* shepherd number */
, num_clone - 1 /* number of instances - 1 */
);
assert(ret == QTHREAD_SUCCESS);
}
}
#endif
driver_exec_all( NULL );
s_active_function = 0 ;
s_active_function_arg = 0 ;
}
void * QthreadExec::exec_all_reduce_result()
{
return s_exec[0]->m_scratch_alloc ;
}
} /* namespace Impl */
} /* namespace Kokkos */
namespace Kokkos {
namespace Impl {
QthreadTeamPolicyMember::QthreadTeamPolicyMember()
: m_exec( **worker_exec() )
, m_team_shared(0,0)
- , m_team_size( 1 ) // s_number_workers_per_shepherd )
- , m_team_rank( 0 ) // m_exec.shepherd_worker_rank() )
+ , m_team_size( 1 )
+ , m_team_rank( 0 )
+ , m_league_size(1)
+ , m_league_end(1)
+ , m_league_rank(0)
+{
+ m_exec.shared_reset( m_team_shared );
+}
+
+QthreadTeamPolicyMember::QthreadTeamPolicyMember( const QthreadTeamPolicyMember::TaskTeam & )
+ : m_exec( **worker_exec() )
+ , m_team_shared(0,0)
+ , m_team_size( s_number_workers_per_shepherd )
+ , m_team_rank( m_exec.shepherd_worker_rank() )
, m_league_size(1)
, m_league_end(1)
, m_league_rank(0)
{
m_exec.shared_reset( m_team_shared );
}
} /* namespace Impl */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
#endif /* #if defined( KOKKOS_HAVE_QTHREAD ) */
diff --git a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp
old mode 100755
new mode 100644
index 365883685..d772aee2b
--- a/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp
+++ b/lib/kokkos/core/src/Qthread/Kokkos_QthreadExec.hpp
@@ -1,614 +1,617 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_QTHREADEXEC_HPP
#define KOKKOS_QTHREADEXEC_HPP
#include <impl/Kokkos_spinwait.hpp>
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
//----------------------------------------------------------------------------
class QthreadExec ;
typedef void (*QthreadExecFunctionPointer)( QthreadExec & , const void * );
class QthreadExec {
private:
enum { Inactive = 0 , Active = 1 };
const QthreadExec * const * m_worker_base ;
const QthreadExec * const * m_shepherd_base ;
void * m_scratch_alloc ; ///< Scratch memory [ reduce , team , shared ]
int m_reduce_end ; ///< End of scratch reduction memory
int m_shepherd_rank ;
int m_shepherd_size ;
int m_shepherd_worker_rank ;
int m_shepherd_worker_size ;
/*
* m_worker_rank = m_shepherd_rank * m_shepherd_worker_size + m_shepherd_worker_rank
* m_worker_size = m_shepherd_size * m_shepherd_worker_size
*/
int m_worker_rank ;
int m_worker_size ;
int mutable volatile m_worker_state ;
friend class Kokkos::Qthread ;
~QthreadExec();
QthreadExec( const QthreadExec & );
QthreadExec & operator = ( const QthreadExec & );
public:
QthreadExec();
/** Execute the input function on all available Qthread workers */
static void exec_all( Qthread & , QthreadExecFunctionPointer , const void * );
//----------------------------------------
/** Barrier across all workers participating in the 'exec_all' */
void exec_all_barrier() const
{
const int rev_rank = m_worker_size - ( m_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
Impl::spinwait( m_worker_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
m_worker_base[j]->m_worker_state = QthreadExec::Active ;
}
}
/** Barrier across workers within the shepherd with rank < team_rank */
void shepherd_barrier( const int team_size ) const
{
if ( m_shepherd_worker_rank < team_size ) {
const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
m_shepherd_base[j]->m_worker_state = QthreadExec::Active ;
}
}
}
//----------------------------------------
/** Reduce across all workers participating in the 'exec_all' */
template< class FunctorType , class ArgTag >
inline
void exec_all_reduce( const FunctorType & func ) const
{
typedef Kokkos::Impl::FunctorValueJoin< FunctorType , ArgTag > ValueJoin ;
const int rev_rank = m_worker_size - ( m_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
const QthreadExec & fan = *m_worker_base[j];
Impl::spinwait( fan.m_worker_state , QthreadExec::Active );
ValueJoin::join( func , m_scratch_alloc , fan.m_scratch_alloc );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
m_worker_base[j]->m_worker_state = QthreadExec::Active ;
}
}
//----------------------------------------
/** Scall across all workers participating in the 'exec_all' */
template< class FunctorType , class ArgTag >
inline
void exec_all_scan( const FunctorType & func ) const
{
typedef Kokkos::Impl::FunctorValueInit< FunctorType , ArgTag > ValueInit ;
typedef Kokkos::Impl::FunctorValueJoin< FunctorType , ArgTag > ValueJoin ;
typedef Kokkos::Impl::FunctorValueOps< FunctorType , ArgTag > ValueOps ;
const int rev_rank = m_worker_size - ( m_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
Impl::spinwait( m_worker_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
else {
// Root thread scans across values before releasing threads
// Worker data is in reverse order, so m_worker_base[0] is the
// highest ranking thread.
// Copy from lower ranking to higher ranking worker.
for ( int i = 1 ; i < m_worker_size ; ++i ) {
ValueOps::copy( func
, m_worker_base[i-1]->m_scratch_alloc
, m_worker_base[i]->m_scratch_alloc
);
}
ValueInit::init( func , m_worker_base[m_worker_size-1]->m_scratch_alloc );
// Join from lower ranking to higher ranking worker.
// Value at m_worker_base[n-1] is zero so skip adding it to m_worker_base[n-2].
for ( int i = m_worker_size - 1 ; --i ; ) {
ValueJoin::join( func , m_worker_base[i-1]->m_scratch_alloc , m_worker_base[i]->m_scratch_alloc );
}
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < m_worker_size ) ; n <<= 1 ) {
m_worker_base[j]->m_worker_state = QthreadExec::Active ;
}
}
//----------------------------------------
template< class Type>
inline
volatile Type * shepherd_team_scratch_value() const
{ return (volatile Type*)(((unsigned char *) m_scratch_alloc) + m_reduce_end); }
template< class Type >
inline
void shepherd_broadcast( Type & value , const int team_size , const int team_rank ) const
{
if ( m_shepherd_base ) {
Type * const shared_value = m_shepherd_base[0]->shepherd_team_scratch_value<Type>();
if ( m_shepherd_worker_rank == team_rank ) { *shared_value = value ; }
memory_fence();
shepherd_barrier( team_size );
value = *shared_value ;
}
}
template< class Type >
inline
Type shepherd_reduce( const int team_size , const Type & value ) const
{
*shepherd_team_scratch_value<Type>() = value ;
memory_fence();
const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
else {
Type & accum = * m_shepherd_base[0]->shepherd_team_scratch_value<Type>();
for ( int i = 1 ; i < n ; ++i ) {
accum += * m_shepherd_base[i]->shepherd_team_scratch_value<Type>();
}
for ( int i = 1 ; i < n ; ++i ) {
* m_shepherd_base[i]->shepherd_team_scratch_value<Type>() = accum ;
}
memory_fence();
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
m_shepherd_base[j]->m_worker_state = QthreadExec::Active ;
}
return *shepherd_team_scratch_value<Type>();
}
template< class JoinOp >
inline
typename JoinOp::value_type
shepherd_reduce( const int team_size
, const typename JoinOp::value_type & value
, const JoinOp & op ) const
{
typedef typename JoinOp::value_type Type ;
*shepherd_team_scratch_value<Type>() = value ;
memory_fence();
const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
else {
volatile Type & accum = * m_shepherd_base[0]->shepherd_team_scratch_value<Type>();
for ( int i = 1 ; i < team_size ; ++i ) {
op.join( accum , * m_shepherd_base[i]->shepherd_team_scratch_value<Type>() );
}
for ( int i = 1 ; i < team_size ; ++i ) {
* m_shepherd_base[i]->shepherd_team_scratch_value<Type>() = accum ;
}
memory_fence();
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
m_shepherd_base[j]->m_worker_state = QthreadExec::Active ;
}
return *shepherd_team_scratch_value<Type>();
}
template< class Type >
inline
Type shepherd_scan( const int team_size
, const Type & value
, Type * const global_value = 0 ) const
{
*shepherd_team_scratch_value<Type>() = value ;
memory_fence();
const int rev_rank = team_size - ( m_shepherd_worker_rank + 1 );
int n , j ;
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
Impl::spinwait( m_shepherd_base[j]->m_worker_state , QthreadExec::Active );
}
if ( rev_rank ) {
m_worker_state = QthreadExec::Inactive ;
Impl::spinwait( m_worker_state , QthreadExec::Inactive );
}
else {
// Root thread scans across values before releasing threads
// Worker data is in reverse order, so m_shepherd_base[0] is the
// highest ranking thread.
// Copy from lower ranking to higher ranking worker.
Type accum = * m_shepherd_base[0]->shepherd_team_scratch_value<Type>();
for ( int i = 1 ; i < team_size ; ++i ) {
const Type tmp = * m_shepherd_base[i]->shepherd_team_scratch_value<Type>();
accum += tmp ;
* m_shepherd_base[i-1]->shepherd_team_scratch_value<Type>() = tmp ;
}
* m_shepherd_base[team_size-1]->shepherd_team_scratch_value<Type>() =
global_value ? atomic_fetch_add( global_value , accum ) : 0 ;
// Join from lower ranking to higher ranking worker.
for ( int i = team_size ; --i ; ) {
* m_shepherd_base[i-1]->shepherd_team_scratch_value<Type>() += * m_shepherd_base[i]->shepherd_team_scratch_value<Type>();
}
memory_fence();
}
for ( n = 1 ; ( ! ( rev_rank & n ) ) && ( ( j = rev_rank + n ) < team_size ) ; n <<= 1 ) {
m_shepherd_base[j]->m_worker_state = QthreadExec::Active ;
}
return *shepherd_team_scratch_value<Type>();
}
//----------------------------------------
static inline
int align_alloc( int size )
{
enum { ALLOC_GRAIN = 1 << 6 /* power of two, 64bytes */};
enum { ALLOC_GRAIN_MASK = ALLOC_GRAIN - 1 };
return ( size + ALLOC_GRAIN_MASK ) & ~ALLOC_GRAIN_MASK ;
}
void shared_reset( Qthread::scratch_memory_space & );
void * exec_all_reduce_value() const { return m_scratch_alloc ; }
static void * exec_all_reduce_result();
static void resize_worker_scratch( const int reduce_size , const int shared_size );
static void clear_workers();
//----------------------------------------
inline int worker_rank() const { return m_worker_rank ; }
inline int worker_size() const { return m_worker_size ; }
inline int shepherd_worker_rank() const { return m_shepherd_worker_rank ; }
inline int shepherd_worker_size() const { return m_shepherd_worker_size ; }
inline int shepherd_rank() const { return m_shepherd_rank ; }
inline int shepherd_size() const { return m_shepherd_size ; }
static int worker_per_shepherd();
};
} /* namespace Impl */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
class QthreadTeamPolicyMember {
private:
typedef Kokkos::Qthread execution_space ;
typedef execution_space::scratch_memory_space scratch_memory_space ;
Impl::QthreadExec & m_exec ;
scratch_memory_space m_team_shared ;
const int m_team_size ;
const int m_team_rank ;
const int m_league_size ;
const int m_league_end ;
int m_league_rank ;
public:
KOKKOS_INLINE_FUNCTION
const scratch_memory_space & team_shmem() const { return m_team_shared ; }
KOKKOS_INLINE_FUNCTION int league_rank() const { return m_league_rank ; }
KOKKOS_INLINE_FUNCTION int league_size() const { return m_league_size ; }
KOKKOS_INLINE_FUNCTION int team_rank() const { return m_team_rank ; }
KOKKOS_INLINE_FUNCTION int team_size() const { return m_team_size ; }
KOKKOS_INLINE_FUNCTION void team_barrier() const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{}
#else
{ m_exec.shepherd_barrier( m_team_size ); }
#endif
template< typename Type >
KOKKOS_INLINE_FUNCTION Type team_broadcast( const Type & value , int rank ) const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return Type(); }
#else
{ return m_exec.template shepherd_broadcast<Type>( value , m_team_size , rank ); }
#endif
template< typename Type >
KOKKOS_INLINE_FUNCTION Type team_reduce( const Type & value ) const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return Type(); }
#else
{ return m_exec.template shepherd_reduce<Type>( m_team_size , value ); }
#endif
template< typename JoinOp >
KOKKOS_INLINE_FUNCTION typename JoinOp::value_type
team_reduce( const typename JoinOp::value_type & value
, const JoinOp & op ) const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return typename JoinOp::value_type(); }
#else
{ return m_exec.template shepherd_reduce<JoinOp>( m_team_size , value , op ); }
#endif
/** \brief Intra-team exclusive prefix sum with team_rank() ordering.
*
* The highest rank thread can compute the reduction total as
* reduction_total = dev.team_scan( value ) + value ;
*/
template< typename Type >
KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value ) const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return Type(); }
#else
{ return m_exec.template shepherd_scan<Type>( m_team_size , value ); }
#endif
/** \brief Intra-team exclusive prefix sum with team_rank() ordering
* with intra-team non-deterministic ordering accumulation.
*
* The global inter-team accumulation value will, at the end of the
* league's parallel execution, be the scan's total.
* Parallel execution ordering of the league's teams is non-deterministic.
* As such the base value for each team's scan operation is similarly
* non-deterministic.
*/
template< typename Type >
KOKKOS_INLINE_FUNCTION Type team_scan( const Type & value , Type * const global_accum ) const
#if ! defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return Type(); }
#else
{ return m_exec.template shepherd_scan<Type>( m_team_size , value , global_accum ); }
#endif
//----------------------------------------
// Private driver for task-team parallel
+ struct TaskTeam {};
+
QthreadTeamPolicyMember();
+ explicit QthreadTeamPolicyMember( const TaskTeam & );
//----------------------------------------
// Private for the driver ( for ( member_type i(exec,team); i ; i.next_team() ) { ... }
// Initialize
template< class Arg0 , class Arg1 >
QthreadTeamPolicyMember( Impl::QthreadExec & exec , const TeamPolicy<Arg0,Arg1,Qthread> & team )
: m_exec( exec )
, m_team_shared(0,0)
, m_team_size( team.m_team_size )
, m_team_rank( exec.shepherd_worker_rank() )
, m_league_size( team.m_league_size )
, m_league_end( team.m_league_size - team.m_shepherd_iter * ( exec.shepherd_size() - ( exec.shepherd_rank() + 1 ) ) )
, m_league_rank( m_league_end > team.m_shepherd_iter ? m_league_end - team.m_shepherd_iter : 0 )
{
m_exec.shared_reset( m_team_shared );
}
// Continue
operator bool () const { return m_league_rank < m_league_end ; }
// iterate
void next_team() { ++m_league_rank ; m_exec.shared_reset( m_team_shared ); }
};
} // namespace Impl
template< class Arg0 , class Arg1 >
class TeamPolicy< Arg0 , Arg1 , Kokkos::Qthread >
{
private:
const int m_league_size ;
const int m_team_size ;
const int m_shepherd_iter ;
public:
//! Tag this class as a kokkos execution policy
typedef TeamPolicy execution_policy ;
typedef Qthread execution_space ;
typedef typename
Impl::if_c< ! Impl::is_same< Kokkos::Qthread , Arg0 >::value , Arg0 , Arg1 >::type
work_tag ;
//----------------------------------------
template< class FunctorType >
inline static
int team_size_max( const FunctorType & )
{ return Qthread::instance().shepherd_worker_size(); }
template< class FunctorType >
static int team_size_recommended( const FunctorType & f )
{ return team_size_max( f ); }
template< class FunctorType >
inline static
int team_size_recommended( const FunctorType & f , const int& )
{ return team_size_max( f ); }
//----------------------------------------
inline int team_size() const { return m_team_size ; }
inline int league_size() const { return m_league_size ; }
// One active team per shepherd
TeamPolicy( Kokkos::Qthread & q
, const int league_size
, const int team_size
)
: m_league_size( league_size )
, m_team_size( team_size < q.shepherd_worker_size()
? team_size : q.shepherd_worker_size() )
, m_shepherd_iter( ( league_size + q.shepherd_size() - 1 ) / q.shepherd_size() )
{
}
// One active team per shepherd
TeamPolicy( const int league_size
, const int team_size
)
: m_league_size( league_size )
, m_team_size( team_size < Qthread::instance().shepherd_worker_size()
? team_size : Qthread::instance().shepherd_worker_size() )
, m_shepherd_iter( ( league_size + Qthread::instance().shepherd_size() - 1 ) / Qthread::instance().shepherd_size() )
{
}
typedef Impl::QthreadTeamPolicyMember member_type ;
friend class Impl::QthreadTeamPolicyMember ;
};
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* #define KOKKOS_QTHREADEXEC_HPP */
diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_Parallel.hpp b/lib/kokkos/core/src/Qthread/Kokkos_Qthread_Parallel.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp b/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp
old mode 100755
new mode 100644
index 9787d2646..9de9748de
--- a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp
+++ b/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.cpp
@@ -1,451 +1,483 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
// Experimental unified task-data parallel manycore LDRD
#include <Kokkos_Core_fwd.hpp>
#if defined( KOKKOS_HAVE_QTHREAD )
#include <stdio.h>
#include <stdlib.h>
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <string>
#include <Kokkos_Atomic.hpp>
#include <Qthread/Kokkos_Qthread_TaskPolicy.hpp>
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
typedef TaskMember< Kokkos::Qthread , void , void > Task ;
namespace {
inline
unsigned padded_sizeof_derived( unsigned sizeof_derived )
{
return sizeof_derived +
( sizeof_derived % sizeof(Task*) ? sizeof(Task*) - sizeof_derived % sizeof(Task*) : 0 );
}
// int lock_alloc_dealloc = 0 ;
} // namespace
void Task::deallocate( void * ptr )
{
// Counting on 'free' thread safety so lock/unlock not required.
// However, isolate calls here to mitigate future need to introduce lock/unlock.
// lock
// while ( ! Kokkos::atomic_compare_exchange_strong( & lock_alloc_dealloc , 0 , 1 ) );
free( ptr );
// unlock
// Kokkos::atomic_compare_exchange_strong( & lock_alloc_dealloc , 1 , 0 );
}
void * Task::allocate( const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity )
{
// Counting on 'malloc' thread safety so lock/unlock not required.
// However, isolate calls here to mitigate future need to introduce lock/unlock.
// lock
// while ( ! Kokkos::atomic_compare_exchange_strong( & lock_alloc_dealloc , 0 , 1 ) );
void * const ptr = malloc( padded_sizeof_derived( arg_sizeof_derived ) + arg_dependence_capacity * sizeof(Task*) );
// unlock
// Kokkos::atomic_compare_exchange_strong( & lock_alloc_dealloc , 1 , 0 );
return ptr ;
}
Task::~TaskMember()
{
}
Task::TaskMember( const function_verify_type arg_verify
, const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
)
: m_dealloc( arg_dealloc )
, m_verify( arg_verify )
, m_apply_single( arg_apply_single )
, m_apply_team( arg_apply_team )
, m_active_count( & arg_active_count )
, m_qfeb(0)
, m_dep( (Task **)( ((unsigned char *) this) + padded_sizeof_derived( arg_sizeof_derived ) ) )
, m_dep_capacity( arg_dependence_capacity )
, m_dep_size( 0 )
, m_ref_count( 0 )
, m_state( Kokkos::Experimental::TASK_STATE_CONSTRUCTING )
{
qthread_empty( & m_qfeb ); // Set to full when complete
for ( unsigned i = 0 ; i < arg_dependence_capacity ; ++i ) m_dep[i] = 0 ;
}
Task::TaskMember( const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
)
: m_dealloc( arg_dealloc )
, m_verify( & Task::verify_type<void> )
, m_apply_single( arg_apply_single )
, m_apply_team( arg_apply_team )
, m_active_count( & arg_active_count )
, m_qfeb(0)
, m_dep( (Task **)( ((unsigned char *) this) + padded_sizeof_derived( arg_sizeof_derived ) ) )
, m_dep_capacity( arg_dependence_capacity )
, m_dep_size( 0 )
, m_ref_count( 0 )
, m_state( Kokkos::Experimental::TASK_STATE_CONSTRUCTING )
{
qthread_empty( & m_qfeb ); // Set to full when complete
for ( unsigned i = 0 ; i < arg_dependence_capacity ; ++i ) m_dep[i] = 0 ;
}
//----------------------------------------------------------------------------
void Task::throw_error_add_dependence() const
{
std::cerr << "TaskMember< Qthread >::add_dependence ERROR"
<< " state(" << m_state << ")"
<< " dep_size(" << m_dep_size << ")"
<< std::endl ;
throw std::runtime_error("TaskMember< Qthread >::add_dependence ERROR");
}
void Task::throw_error_verify_type()
{
throw std::runtime_error("TaskMember< Qthread >::verify_type ERROR");
}
//----------------------------------------------------------------------------
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
void Task::assign( Task ** const lhs , Task * rhs , const bool no_throw )
{
static const char msg_error_header[] = "Kokkos::Impl::TaskManager<Kokkos::Qthread>::assign ERROR" ;
static const char msg_error_count[] = ": negative reference count" ;
static const char msg_error_complete[] = ": destroy task that is not complete" ;
static const char msg_error_dependences[] = ": destroy task that has dependences" ;
static const char msg_error_exception[] = ": caught internal exception" ;
if ( rhs ) { Kokkos::atomic_fetch_add( & (*rhs).m_ref_count , 1 ); }
Task * const lhs_val = Kokkos::atomic_exchange( lhs , rhs );
if ( lhs_val ) {
const int count = Kokkos::atomic_fetch_add( & (*lhs_val).m_ref_count , -1 );
const char * msg_error = 0 ;
try {
if ( 1 == count ) {
// Reference count at zero, delete it
// Should only be deallocating a completed task
if ( (*lhs_val).m_state == Kokkos::Experimental::TASK_STATE_COMPLETE ) {
// A completed task should not have dependences...
for ( int i = 0 ; i < (*lhs_val).m_dep_size && 0 == msg_error ; ++i ) {
if ( (*lhs_val).m_dep[i] ) msg_error = msg_error_dependences ;
}
}
else {
msg_error = msg_error_complete ;
}
if ( 0 == msg_error ) {
// Get deletion function and apply it
const Task::function_dealloc_type d = (*lhs_val).m_dealloc ;
(*d)( lhs_val );
}
}
else if ( count <= 0 ) {
msg_error = msg_error_count ;
}
}
catch( ... ) {
if ( 0 == msg_error ) msg_error = msg_error_exception ;
}
if ( 0 != msg_error ) {
if ( no_throw ) {
std::cerr << msg_error_header << msg_error << std::endl ;
std::cerr.flush();
}
else {
std::string msg(msg_error_header);
msg.append(msg_error);
throw std::runtime_error( msg );
}
}
}
}
#endif
//----------------------------------------------------------------------------
aligned_t Task::qthread_func( void * arg )
{
Task * const task = reinterpret_cast< Task * >(arg);
// First member of the team change state to executing.
// Use compare-exchange to avoid race condition with a respawn.
Kokkos::atomic_compare_exchange_strong( & task->m_state
, int(Kokkos::Experimental::TASK_STATE_WAITING)
, int(Kokkos::Experimental::TASK_STATE_EXECUTING)
);
// It is a single thread's responsibility to close out
// this task's execution.
bool close_out = false ;
- if ( task->m_apply_team ) {
+ if ( task->m_apply_team && ! task->m_apply_single ) {
+ const Kokkos::Impl::QthreadTeamPolicyMember::TaskTeam task_team_tag ;
- Kokkos::Impl::QthreadTeamPolicyMember member ;
+ // Initialize team size and rank with shephered info
+ Kokkos::Impl::QthreadTeamPolicyMember member( task_team_tag );
(*task->m_apply_team)( task , member );
+#if 0
fprintf( stdout
, "worker(%d.%d) task 0x%.12lx executed by member(%d:%d)\n"
, qthread_shep()
, qthread_worker_local(NULL)
, reinterpret_cast<unsigned long>(task)
, member.team_rank()
, member.team_size()
);
fflush(stdout);
+#endif
member.team_barrier();
close_out = member.team_rank() == 0 ;
}
+ else if ( task->m_apply_team && task->m_apply_single == reinterpret_cast<function_apply_single_type>(1) ) {
+ // Team hard-wired to one, no cloning
+ Kokkos::Impl::QthreadTeamPolicyMember member ;
+ (*task->m_apply_team)( task , member );
+ close_out = true ;
+ }
else {
(*task->m_apply_single)( task );
close_out = true ;
}
if ( close_out ) {
// When dependent tasks run there would be a race
// condition between destroying this task and
// querying the active count pointer from this task.
int volatile * active_count = task->m_active_count ;
if ( task->m_state == ( Kokkos::Experimental::TASK_STATE_WAITING | Kokkos::Experimental::TASK_STATE_EXECUTING ) ) {
#if 0
fprintf( stdout
, "worker(%d.%d) task 0x%.12lx respawn\n"
, qthread_shep()
, qthread_worker_local(NULL)
, reinterpret_cast<unsigned long>(task)
);
fflush(stdout);
#endif
// Task respawned, set state to waiting and reschedule the task
task->m_state = Kokkos::Experimental::TASK_STATE_WAITING ;
task->schedule();
}
else {
// Task did not respawn, is complete
task->m_state = Kokkos::Experimental::TASK_STATE_COMPLETE ;
// Release dependences before allowing dependent tasks to run.
// Otherwise there is a thread race condition for removing dependences.
for ( int i = 0 ; i < task->m_dep_size ; ++i ) {
assign( & task->m_dep[i] , 0 );
}
// Set qthread FEB to full so that dependent tasks are allowed to execute.
// This 'task' may be deleted immediately following this function call.
qthread_fill( & task->m_qfeb );
}
// Decrement active task count before returning.
Kokkos::atomic_decrement( active_count );
}
#if 0
fprintf( stdout
, "worker(%d.%d) task 0x%.12lx return\n"
, qthread_shep()
, qthread_worker_local(NULL)
, reinterpret_cast<unsigned long>(task)
);
fflush(stdout);
#endif
return 0 ;
}
void Task::respawn()
{
// Change state from pure executing to ( waiting | executing )
// to avoid confusion with simply waiting.
Kokkos::atomic_compare_exchange_strong( & m_state
, int(Kokkos::Experimental::TASK_STATE_EXECUTING)
, int(Kokkos::Experimental::TASK_STATE_WAITING |
Kokkos::Experimental::TASK_STATE_EXECUTING)
);
}
void Task::schedule()
{
// Is waiting for execution
// Increment active task count before spawning.
Kokkos::atomic_increment( m_active_count );
// spawn in qthread. must malloc the precondition array and give to qthread.
// qthread will eventually free this allocation so memory will not be leaked.
// concern with thread safety of malloc, does this need to be guarded?
aligned_t ** qprecon = (aligned_t **) malloc( ( m_dep_size + 1 ) * sizeof(aligned_t *) );
qprecon[0] = reinterpret_cast<aligned_t *>( uintptr_t(m_dep_size) );
for ( int i = 0 ; i < m_dep_size ; ++i ) {
qprecon[i+1] = & m_dep[i]->m_qfeb ; // Qthread precondition flag
}
- if ( m_apply_single ) {
- qthread_spawn( & Task::qthread_func /* function */
- , this /* function argument */
- , 0
- , NULL
- , m_dep_size , qprecon /* dependences */
- , NO_SHEPHERD
- , QTHREAD_SPAWN_SIMPLE /* allows optimization for non-blocking task */
- );
- }
- else {
+ if ( m_apply_team && ! m_apply_single ) {
// If more than one shepherd spawn on a shepherd other than this shepherd
const int num_shepherd = qthread_num_shepherds();
const int num_worker_per_shepherd = qthread_num_workers_local(NO_SHEPHERD);
const int this_shepherd = qthread_shep();
int spawn_shepherd = ( this_shepherd + 1 ) % num_shepherd ;
+#if 0
fprintf( stdout
, "worker(%d.%d) task 0x%.12lx spawning on shepherd(%d) clone(%d)\n"
, qthread_shep()
, qthread_worker_local(NULL)
, reinterpret_cast<unsigned long>(this)
, spawn_shepherd
, num_worker_per_shepherd - 1
);
fflush(stdout);
+#endif
qthread_spawn_cloneable
( & Task::qthread_func
, this
, 0
, NULL
, m_dep_size , qprecon /* dependences */
, spawn_shepherd
// , unsigned( QTHREAD_SPAWN_SIMPLE | QTHREAD_SPAWN_LOCAL_PRIORITY )
, unsigned( QTHREAD_SPAWN_LOCAL_PRIORITY )
, num_worker_per_shepherd - 1
);
}
+ else {
+ qthread_spawn( & Task::qthread_func /* function */
+ , this /* function argument */
+ , 0
+ , NULL
+ , m_dep_size , qprecon /* dependences */
+ , NO_SHEPHERD
+ , QTHREAD_SPAWN_SIMPLE /* allows optimization for non-blocking task */
+ );
+ }
}
} // namespace Impl
} // namespace Experimental
} // namespace Kokkos
namespace Kokkos {
namespace Experimental {
+TaskPolicy< Kokkos::Qthread >::
+ TaskPolicy( const unsigned arg_default_dependence_capacity
+ , const unsigned arg_team_size )
+ : m_default_dependence_capacity( arg_default_dependence_capacity )
+ , m_team_size( arg_team_size != 0 ? arg_team_size : unsigned(qthread_num_workers_local(NO_SHEPHERD)) )
+ , m_active_count_root(0)
+ , m_active_count( m_active_count_root )
+{
+ const unsigned num_worker_per_shepherd = unsigned( qthread_num_workers_local(NO_SHEPHERD) );
+
+ if ( m_team_size != 1 && m_team_size != num_worker_per_shepherd ) {
+ std::ostringstream msg ;
+ msg << "Kokkos::Experimental::TaskPolicy< Kokkos::Qthread >( "
+ << "default_depedence = " << arg_default_dependence_capacity
+ << " , team_size = " << arg_team_size
+ << " ) ERROR, valid team_size arguments are { (omitted) , 1 , " << num_worker_per_shepherd << " }" ;
+ Kokkos::Impl::throw_runtime_exception(msg.str());
+ }
+}
+
TaskPolicy< Kokkos::Qthread >::member_type &
TaskPolicy< Kokkos::Qthread >::member_single()
{
static member_type s ;
return s ;
}
void wait( Kokkos::Experimental::TaskPolicy< Kokkos::Qthread > & policy )
{
volatile int * const active_task_count = & policy.m_active_count ;
while ( *active_task_count ) qthread_yield();
}
} // namespace Experimental
} // namespace Kokkos
#endif /* #if defined( KOKKOS_HAVE_QTHREAD ) */
diff --git a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp b/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp
old mode 100755
new mode 100644
index af44b62a1..1f4a622eb
--- a/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp
+++ b/lib/kokkos/core/src/Qthread/Kokkos_Qthread_TaskPolicy.hpp
@@ -1,646 +1,642 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
// Experimental unified task-data parallel manycore LDRD
#ifndef KOKKOS_QTHREAD_TASKPOLICY_HPP
#define KOKKOS_QTHREAD_TASKPOLICY_HPP
#include <string>
#include <typeinfo>
#include <stdexcept>
//----------------------------------------------------------------------------
// Defines to enable experimental Qthread functionality
#define QTHREAD_LOCAL_PRIORITY
#define CLONED_TASKS
#include <qthread.h>
#undef QTHREAD_LOCAL_PRIORITY
#undef CLONED_TASKS
//----------------------------------------------------------------------------
#include <Kokkos_Qthread.hpp>
#include <Kokkos_TaskPolicy.hpp>
#include <Kokkos_View.hpp>
#include <impl/Kokkos_FunctorAdapter.hpp>
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template<>
class TaskMember< Kokkos::Qthread , void , void >
{
public:
typedef void (* function_apply_single_type) ( TaskMember * );
typedef void (* function_apply_team_type) ( TaskMember * , Kokkos::Impl::QthreadTeamPolicyMember & );
typedef void (* function_dealloc_type)( TaskMember * );
typedef TaskMember * (* function_verify_type) ( TaskMember * );
private:
const function_dealloc_type m_dealloc ; ///< Deallocation
const function_verify_type m_verify ; ///< Result type verification
const function_apply_single_type m_apply_single ; ///< Apply function
const function_apply_team_type m_apply_team ; ///< Apply function
int volatile * const m_active_count ; ///< Count of active tasks on this policy
aligned_t m_qfeb ; ///< Qthread full/empty bit
TaskMember ** const m_dep ; ///< Dependences
const int m_dep_capacity ; ///< Capacity of dependences
int m_dep_size ; ///< Actual count of dependences
int m_ref_count ; ///< Reference count
int m_state ; ///< State of the task
TaskMember() /* = delete */ ;
TaskMember( const TaskMember & ) /* = delete */ ;
TaskMember & operator = ( const TaskMember & ) /* = delete */ ;
static aligned_t qthread_func( void * arg );
static void * allocate( const unsigned arg_sizeof_derived , const unsigned arg_dependence_capacity );
static void deallocate( void * );
void throw_error_add_dependence() const ;
static void throw_error_verify_type();
template < class DerivedTaskType >
static
void deallocate( TaskMember * t )
{
DerivedTaskType * ptr = static_cast< DerivedTaskType * >(t);
ptr->~DerivedTaskType();
deallocate( (void *) ptr );
}
void schedule();
protected :
~TaskMember();
// Used by TaskMember< Qthread , ResultType , void >
TaskMember( const function_verify_type arg_verify
, const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
);
// Used for TaskMember< Qthread , void , void >
TaskMember( const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
);
public:
template< typename ResultType >
KOKKOS_FUNCTION static
TaskMember * verify_type( TaskMember * t )
{
enum { check_type = ! Kokkos::Impl::is_same< ResultType , void >::value };
if ( check_type && t != 0 ) {
// Verify that t->m_verify is this function
const function_verify_type self = & TaskMember::template verify_type< ResultType > ;
if ( t->m_verify != self ) {
t = 0 ;
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
throw_error_verify_type();
#endif
}
}
return t ;
}
//----------------------------------------
/* Inheritence Requirements on task types:
* typedef FunctorType::value_type value_type ;
* class DerivedTaskType
* : public TaskMember< Qthread , value_type , FunctorType >
* { ... };
* class TaskMember< Qthread , value_type , FunctorType >
* : public TaskMember< Qthread , value_type , void >
* , public Functor
* { ... };
* If value_type != void
* class TaskMember< Qthread , value_type , void >
* : public TaskMember< Qthread , void , void >
*
* Allocate space for DerivedTaskType followed by TaskMember*[ dependence_capacity ]
*
*/
/** \brief Allocate and construct a single-thread task */
template< class DerivedTaskType >
static
TaskMember * create_single( const typename DerivedTaskType::functor_type & arg_functor
, volatile int & arg_active_count
, const unsigned arg_dependence_capacity )
{
typedef typename DerivedTaskType::functor_type functor_type ;
typedef typename functor_type::value_type value_type ;
DerivedTaskType * const task =
new( allocate( sizeof(DerivedTaskType) , arg_dependence_capacity ) )
DerivedTaskType( & TaskMember::template deallocate< DerivedTaskType >
, & TaskMember::template apply_single< functor_type , value_type >
, 0
, arg_active_count
, sizeof(DerivedTaskType)
, arg_dependence_capacity
, arg_functor );
return static_cast< TaskMember * >( task );
}
/** \brief Allocate and construct a team-thread task */
template< class DerivedTaskType >
static
TaskMember * create_team( const typename DerivedTaskType::functor_type & arg_functor
, volatile int & arg_active_count
- , const unsigned arg_dependence_capacity )
+ , const unsigned arg_dependence_capacity
+ , const bool arg_is_team )
{
typedef typename DerivedTaskType::functor_type functor_type ;
typedef typename functor_type::value_type value_type ;
+ const function_apply_single_type flag = reinterpret_cast<function_apply_single_type>( arg_is_team ? 0 : 1 );
+
DerivedTaskType * const task =
new( allocate( sizeof(DerivedTaskType) , arg_dependence_capacity ) )
DerivedTaskType( & TaskMember::template deallocate< DerivedTaskType >
- , 0
+ , flag
, & TaskMember::template apply_team< functor_type , value_type >
, arg_active_count
, sizeof(DerivedTaskType)
, arg_dependence_capacity
, arg_functor );
return static_cast< TaskMember * >( task );
}
void respawn();
void spawn()
{
m_state = Kokkos::Experimental::TASK_STATE_WAITING ;
schedule();
}
//----------------------------------------
typedef FutureValueTypeIsVoidError get_result_type ;
KOKKOS_INLINE_FUNCTION
get_result_type get() const { return get_result_type() ; }
KOKKOS_INLINE_FUNCTION
Kokkos::Experimental::TaskState get_state() const { return Kokkos::Experimental::TaskState( m_state ); }
//----------------------------------------
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
static
void assign( TaskMember ** const lhs , TaskMember * const rhs , const bool no_throw = false );
#else
KOKKOS_INLINE_FUNCTION static
void assign( TaskMember ** const lhs , TaskMember * const rhs , const bool no_throw = false ) {}
#endif
KOKKOS_INLINE_FUNCTION
TaskMember * get_dependence( int i ) const
{ return ( Kokkos::Experimental::TASK_STATE_EXECUTING == m_state && 0 <= i && i < m_dep_size ) ? m_dep[i] : (TaskMember*) 0 ; }
KOKKOS_INLINE_FUNCTION
int get_dependence() const
{ return m_dep_size ; }
KOKKOS_INLINE_FUNCTION
void clear_dependence()
{
for ( int i = 0 ; i < m_dep_size ; ++i ) assign( m_dep + i , 0 );
m_dep_size = 0 ;
}
KOKKOS_INLINE_FUNCTION
void add_dependence( TaskMember * before )
{
if ( ( Kokkos::Experimental::TASK_STATE_CONSTRUCTING == m_state ||
Kokkos::Experimental::TASK_STATE_EXECUTING == m_state ) &&
m_dep_size < m_dep_capacity ) {
assign( m_dep + m_dep_size , before );
++m_dep_size ;
}
else {
throw_error_add_dependence();
}
}
//----------------------------------------
template< class FunctorType , class ResultType >
KOKKOS_INLINE_FUNCTION static
void apply_single( typename Kokkos::Impl::enable_if< ! Kokkos::Impl::is_same< ResultType , void >::value , TaskMember * >::type t )
{
typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ;
// TaskMember< Kokkos::Qthread , ResultType , FunctorType >
// : public TaskMember< Kokkos::Qthread , ResultType , void >
// , public FunctorType
// { ... };
derived_type & m = * static_cast< derived_type * >( t );
Kokkos::Impl::FunctorApply< FunctorType , void , ResultType & >::apply( (FunctorType &) m , & m.m_result );
}
template< class FunctorType , class ResultType >
KOKKOS_INLINE_FUNCTION static
void apply_single( typename Kokkos::Impl::enable_if< Kokkos::Impl::is_same< ResultType , void >::value , TaskMember * >::type t )
{
typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ;
// TaskMember< Kokkos::Qthread , ResultType , FunctorType >
// : public TaskMember< Kokkos::Qthread , ResultType , void >
// , public FunctorType
// { ... };
derived_type & m = * static_cast< derived_type * >( t );
Kokkos::Impl::FunctorApply< FunctorType , void , void >::apply( (FunctorType &) m );
}
//----------------------------------------
template< class FunctorType , class ResultType >
KOKKOS_INLINE_FUNCTION static
void apply_team( typename Kokkos::Impl::enable_if< ! Kokkos::Impl::is_same< ResultType , void >::value , TaskMember * >::type t
, Kokkos::Impl::QthreadTeamPolicyMember & member )
{
typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ;
derived_type & m = * static_cast< derived_type * >( t );
m.FunctorType::apply( member , m.m_result );
}
template< class FunctorType , class ResultType >
KOKKOS_INLINE_FUNCTION static
void apply_team( typename Kokkos::Impl::enable_if< Kokkos::Impl::is_same< ResultType , void >::value , TaskMember * >::type t
, Kokkos::Impl::QthreadTeamPolicyMember & member )
{
typedef TaskMember< Kokkos::Qthread , ResultType , FunctorType > derived_type ;
derived_type & m = * static_cast< derived_type * >( t );
m.FunctorType::apply( member );
}
};
//----------------------------------------------------------------------------
/** \brief Base class for tasks with a result value in the Qthread execution space.
*
* The FunctorType must be void because this class is accessed by the
* Future class for the task and result value.
*
* Must be derived from TaskMember<S,void,void> 'root class' so the Future class
* can correctly static_cast from the 'root class' to this class.
*/
template < class ResultType >
class TaskMember< Kokkos::Qthread , ResultType , void >
: public TaskMember< Kokkos::Qthread , void , void >
{
public:
ResultType m_result ;
typedef const ResultType & get_result_type ;
KOKKOS_INLINE_FUNCTION
get_result_type get() const { return m_result ; }
protected:
typedef TaskMember< Kokkos::Qthread , void , void > task_root_type ;
typedef task_root_type::function_dealloc_type function_dealloc_type ;
typedef task_root_type::function_apply_single_type function_apply_single_type ;
typedef task_root_type::function_apply_team_type function_apply_team_type ;
inline
TaskMember( const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
)
: task_root_type( & task_root_type::template verify_type< ResultType >
, arg_dealloc
, arg_apply_single
, arg_apply_team
, arg_active_count
, arg_sizeof_derived
, arg_dependence_capacity )
, m_result()
{}
};
template< class ResultType , class FunctorType >
class TaskMember< Kokkos::Qthread , ResultType , FunctorType >
: public TaskMember< Kokkos::Qthread , ResultType , void >
, public FunctorType
{
public:
typedef FunctorType functor_type ;
typedef TaskMember< Kokkos::Qthread , void , void > task_root_type ;
typedef TaskMember< Kokkos::Qthread , ResultType , void > task_base_type ;
typedef task_root_type::function_dealloc_type function_dealloc_type ;
typedef task_root_type::function_apply_single_type function_apply_single_type ;
typedef task_root_type::function_apply_team_type function_apply_team_type ;
inline
TaskMember( const function_dealloc_type arg_dealloc
, const function_apply_single_type arg_apply_single
, const function_apply_team_type arg_apply_team
, volatile int & arg_active_count
, const unsigned arg_sizeof_derived
, const unsigned arg_dependence_capacity
, const functor_type & arg_functor
)
: task_base_type( arg_dealloc
, arg_apply_single
, arg_apply_team
, arg_active_count
, arg_sizeof_derived
, arg_dependence_capacity )
, functor_type( arg_functor )
{}
};
} /* namespace Impl */
} /* namespace Experimental */
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
void wait( TaskPolicy< Kokkos::Qthread > & );
template<>
class TaskPolicy< Kokkos::Qthread >
{
public:
typedef Kokkos::Qthread execution_space ;
typedef Kokkos::Impl::QthreadTeamPolicyMember member_type ;
private:
typedef Impl::TaskMember< execution_space , void , void > task_root_type ;
TaskPolicy & operator = ( const TaskPolicy & ) /* = delete */ ;
template< class FunctorType >
static inline
const task_root_type * get_task_root( const FunctorType * f )
{
typedef Impl::TaskMember< execution_space , typename FunctorType::value_type , FunctorType > task_type ;
return static_cast< const task_root_type * >( static_cast< const task_type * >(f) );
}
template< class FunctorType >
static inline
task_root_type * get_task_root( FunctorType * f )
{
typedef Impl::TaskMember< execution_space , typename FunctorType::value_type , FunctorType > task_type ;
return static_cast< task_root_type * >( static_cast< task_type * >(f) );
}
const unsigned m_default_dependence_capacity ;
+ const unsigned m_team_size ;
volatile int m_active_count_root ;
volatile int & m_active_count ;
public:
- KOKKOS_INLINE_FUNCTION
- TaskPolicy()
- : m_default_dependence_capacity(4)
- , m_active_count_root(0)
- , m_active_count( m_active_count_root )
- {}
-
- KOKKOS_INLINE_FUNCTION
explicit
- TaskPolicy( const unsigned arg_default_dependence_capacity )
- : m_default_dependence_capacity( arg_default_dependence_capacity )
- , m_active_count_root(0)
- , m_active_count( m_active_count_root )
- {}
+ TaskPolicy( const unsigned arg_default_dependence_capacity = 4
+ , const unsigned arg_team_size = 0 /* assign default */ );
KOKKOS_INLINE_FUNCTION
TaskPolicy( const TaskPolicy & rhs )
: m_default_dependence_capacity( rhs.m_default_dependence_capacity )
+ , m_team_size( m_team_size )
, m_active_count_root(0)
, m_active_count( rhs.m_active_count )
{}
KOKKOS_INLINE_FUNCTION
TaskPolicy( const TaskPolicy & rhs
, const unsigned arg_default_dependence_capacity )
: m_default_dependence_capacity( arg_default_dependence_capacity )
+ , m_team_size( m_team_size )
, m_active_count_root(0)
, m_active_count( rhs.m_active_count )
{}
//----------------------------------------
template< class ValueType >
const Future< ValueType , execution_space > &
spawn( const Future< ValueType , execution_space > & f ) const
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
f.m_task->spawn();
#endif
return f ;
}
// Create single-thread task
template< class FunctorType >
Future< typename FunctorType::value_type , execution_space >
create( const FunctorType & functor
, const unsigned dependence_capacity = ~0u ) const
{
typedef typename FunctorType::value_type value_type ;
typedef Impl::TaskMember< execution_space , value_type , FunctorType > task_type ;
return Future< value_type , execution_space >(
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
task_root_type::create_single< task_type >
( functor
, m_active_count
, ( ~0u == dependence_capacity ? m_default_dependence_capacity : dependence_capacity )
)
#endif
);
}
// Create thread-team task
template< class FunctorType >
KOKKOS_INLINE_FUNCTION
Future< typename FunctorType::value_type , execution_space >
create_team( const FunctorType & functor
, const unsigned dependence_capacity = ~0u ) const
{
typedef typename FunctorType::value_type value_type ;
typedef Impl::TaskMember< execution_space , value_type , FunctorType > task_type ;
return Future< value_type , execution_space >(
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
task_root_type::create_team< task_type >
( functor
, m_active_count
, ( ~0u == dependence_capacity ? m_default_dependence_capacity : dependence_capacity )
+ , 1 < m_team_size
)
#endif
);
}
// Add dependence
template< class A1 , class A2 , class A3 , class A4 >
void add_dependence( const Future<A1,A2> & after
, const Future<A3,A4> & before
, typename Kokkos::Impl::enable_if
< Kokkos::Impl::is_same< typename Future<A1,A2>::execution_space , execution_space >::value
&&
Kokkos::Impl::is_same< typename Future<A3,A4>::execution_space , execution_space >::value
>::type * = 0
)
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
after.m_task->add_dependence( before.m_task );
#endif
}
//----------------------------------------
// Functions for an executing task functor to query dependences,
// set new dependences, and respawn itself.
template< class FunctorType >
Future< void , execution_space >
get_dependence( const FunctorType * task_functor , int i ) const
{
return Future<void,execution_space>(
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
get_task_root(task_functor)->get_dependence(i)
#endif
);
}
template< class FunctorType >
int get_dependence( const FunctorType * task_functor ) const
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ return get_task_root(task_functor)->get_dependence(); }
#else
{ return 0 ; }
#endif
template< class FunctorType >
void clear_dependence( FunctorType * task_functor ) const
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
get_task_root(task_functor)->clear_dependence();
#endif
}
template< class FunctorType , class A3 , class A4 >
void add_dependence( FunctorType * task_functor
, const Future<A3,A4> & before
, typename Kokkos::Impl::enable_if
< Kokkos::Impl::is_same< typename Future<A3,A4>::execution_space , execution_space >::value
>::type * = 0
)
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
get_task_root(task_functor)->add_dependence( before.m_task );
#endif
}
template< class FunctorType >
void respawn( FunctorType * task_functor ) const
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
{ get_task_root(task_functor)->respawn(); }
#else
{}
#endif
static member_type & member_single();
friend void wait( TaskPolicy< Kokkos::Qthread > & );
};
} /* namespace Experimental */
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* #define KOKKOS_QTHREAD_TASK_HPP */
diff --git a/lib/kokkos/core/src/Qthread/README b/lib/kokkos/core/src/Qthread/README
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec_base.cpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsExec_base.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp b/lib/kokkos/core/src/Threads/Kokkos_ThreadsTeam.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp b/lib/kokkos/core/src/Threads/Kokkos_Threads_Parallel.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_Threads_TaskPolicy.cpp b/lib/kokkos/core/src/Threads/Kokkos_Threads_TaskPolicy.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/Threads/Kokkos_Threads_TaskPolicy.hpp b/lib/kokkos/core/src/Threads/Kokkos_Threads_TaskPolicy.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.cpp b/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.hpp b/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.hpp
old mode 100755
new mode 100644
index d9491b553..c8c553731
--- a/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.hpp
+++ b/lib/kokkos/core/src/impl/KokkosExp_SharedAlloc.hpp
@@ -1,287 +1,292 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
namespace Kokkos {
namespace Experimental {
namespace Impl {
template< class MemorySpace = void , class DestroyFunctor = void >
class SharedAllocationRecord ;
class SharedAllocationHeader {
private:
typedef SharedAllocationRecord<void,void> Record ;
static constexpr unsigned maximum_label_length = ( 1u << 7 /* 128 */ ) - sizeof(Record*);
template< class , class > friend class SharedAllocationRecord ;
Record * m_record ;
char m_label[ maximum_label_length ];
public:
/* Given user memory get pointer to the header */
KOKKOS_INLINE_FUNCTION static
const SharedAllocationHeader * get_header( void * alloc_ptr )
{ return reinterpret_cast<SharedAllocationHeader*>( reinterpret_cast<char*>(alloc_ptr) - sizeof(SharedAllocationHeader) ); }
};
template<>
class SharedAllocationRecord< void , void > {
protected:
static_assert( sizeof(SharedAllocationHeader) == ( 1u << 7 /* 128 */ ) , "sizeof(SharedAllocationHeader) != 128" );
template< class , class > friend class SharedAllocationRecord ;
typedef void (* function_type )( SharedAllocationRecord<void,void> * );
SharedAllocationHeader * const m_alloc_ptr ;
size_t const m_alloc_size ;
function_type const m_dealloc ;
SharedAllocationRecord * const m_root ;
SharedAllocationRecord * m_prev ;
SharedAllocationRecord * m_next ;
int m_count ;
SharedAllocationRecord( const SharedAllocationRecord & ) = delete ;
SharedAllocationRecord & operator = ( const SharedAllocationRecord & ) = delete ;
/**\brief Construct and insert into 'arg_root' tracking set.
* use_count is zero.
*/
SharedAllocationRecord( SharedAllocationRecord * arg_root
, SharedAllocationHeader * arg_alloc_ptr
, size_t arg_alloc_size
, function_type arg_dealloc
);
public:
~SharedAllocationRecord() = default ;
constexpr SharedAllocationRecord()
: m_alloc_ptr( 0 )
, m_alloc_size( 0 )
, m_dealloc( 0 )
, m_root( this )
, m_prev( this )
, m_next( this )
, m_count( 0 )
{}
static constexpr unsigned maximum_label_length = SharedAllocationHeader::maximum_label_length ;
KOKKOS_INLINE_FUNCTION
const SharedAllocationHeader * head() const { return m_alloc_ptr ; }
/* User's memory begins at the end of the header */
KOKKOS_INLINE_FUNCTION
void * data() const { return reinterpret_cast<void*>( m_alloc_ptr + 1 ); }
/* User's memory begins at the end of the header */
constexpr size_t size() const { return m_alloc_size - sizeof(SharedAllocationHeader) ; }
/* Cannot be 'constexpr' because 'm_count' is volatile */
int use_count() const { return m_count ; }
/* Increment use count */
static void increment( SharedAllocationRecord * );
/* Decrement use count. If 1->0 then remove from the tracking list and invoke m_dealloc */
static SharedAllocationRecord * decrement( SharedAllocationRecord * );
/* Given a root record and data pointer find the record */
static SharedAllocationRecord * find( SharedAllocationRecord * const , void * const );
/* Sanity check for the whole set of records to which the input record belongs.
* Locks the set's insert/erase operations until the sanity check is complete.
*/
static bool is_sane( SharedAllocationRecord * );
/* Print host-accessible records */
static void print_host_accessible_records( std::ostream &
, const char * const space_name
, const SharedAllocationRecord * const root
, const bool detail );
};
/*
* Memory space specialization of SharedAllocationRecord< Space , void > requires :
*
* SharedAllocationRecord< Space , void > : public SharedAllocationRecord< void , void >
* {
* // delete allocated user memory via static_cast to this type.
* static void deallocate( const SharedAllocationRecord<void,void> * );
* Space m_space ;
* }
*/
template< class MemorySpace , class DestroyFunctor >
class SharedAllocationRecord : public SharedAllocationRecord< MemorySpace , void >
{
private:
static void deallocate( SharedAllocationRecord<void,void> * record_ptr )
{ delete static_cast<SharedAllocationRecord<MemorySpace,DestroyFunctor>*>(record_ptr); }
SharedAllocationRecord( const MemorySpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc
)
/* Allocate user memory as [ SharedAllocationHeader , user_memory ] */
: SharedAllocationRecord< MemorySpace , void >( arg_space , arg_label , arg_alloc , & deallocate )
, m_destroy()
{}
~SharedAllocationRecord() { m_destroy.destroy_shared_allocation(); }
public:
DestroyFunctor m_destroy ;
// Allocate with a zero use count. Incrementing the use count from zero to one
// inserts the record into the tracking list. Decrementing the count from one to zero
// removes from the trakcing list and deallocates.
KOKKOS_INLINE_FUNCTION static
SharedAllocationRecord * allocate( const MemorySpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc
)
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
return new SharedAllocationRecord( arg_space , arg_label , arg_alloc );
#else
return (SharedAllocationRecord *) 0 ;
#endif
}
};
union SharedAllocationTracker {
private:
typedef SharedAllocationRecord<void,void> Record ;
enum : unsigned long {
DO_NOT_DEREF_FLAG = 0x01ul
};
// The allocation record resides in Host memory space
Record * m_record ;
unsigned long m_record_bits;
KOKKOS_INLINE_FUNCTION
static Record * disable( Record * rec )
{ return reinterpret_cast<Record*>( reinterpret_cast<unsigned long>( rec ) & DO_NOT_DEREF_FLAG ); }
KOKKOS_INLINE_FUNCTION
void increment() const
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
if ( ! ( m_record_bits & DO_NOT_DEREF_FLAG ) ) Record::increment( m_record );
#endif
}
KOKKOS_INLINE_FUNCTION
void decrement() const
{
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
if ( ! ( m_record_bits & DO_NOT_DEREF_FLAG ) ) Record::decrement( m_record );
#endif
}
public:
KOKKOS_INLINE_FUNCTION
constexpr SharedAllocationTracker() : m_record_bits( DO_NOT_DEREF_FLAG ) {}
template< class MemorySpace >
constexpr
SharedAllocationRecord< MemorySpace , void > & get_record() const
{ return * static_cast< SharedAllocationRecord< MemorySpace , void > * >( m_record ); }
template< class MemorySpace >
std::string get_label() const
- { return static_cast< SharedAllocationRecord< MemorySpace , void > * >( m_record )->get_label(); }
+ {
+ return ( m_record_bits & DO_NOT_DEREF_FLAG )
+ ? std::string()
+ : static_cast< SharedAllocationRecord< MemorySpace , void > * >( m_record )->get_label()
+ ;
+ }
KOKKOS_INLINE_FUNCTION
SharedAllocationTracker( Record * arg_record )
: m_record( arg_record ) { increment(); }
KOKKOS_INLINE_FUNCTION
~SharedAllocationTracker() { decrement(); }
KOKKOS_INLINE_FUNCTION
SharedAllocationTracker( const SharedAllocationTracker & rhs )
: m_record( rhs.m_record ) { increment(); }
KOKKOS_INLINE_FUNCTION
SharedAllocationTracker( SharedAllocationTracker && rhs )
: m_record( rhs.m_record ) { rhs.m_record_bits = DO_NOT_DEREF_FLAG ; }
KOKKOS_INLINE_FUNCTION
SharedAllocationTracker & operator = ( const SharedAllocationTracker & rhs )
{
decrement();
m_record = rhs.m_record ;
increment();
return *this ;
}
KOKKOS_INLINE_FUNCTION
SharedAllocationTracker & operator = ( SharedAllocationTracker && rhs )
{
m_record = rhs.m_record ;
rhs.m_record_bits = DO_NOT_DEREF_FLAG ;
return *this ;
}
};
} /* namespace Impl */
} /* namespace Experimental */
} /* namespace Kokkos */
diff --git a/lib/kokkos/core/src/impl/KokkosExp_ViewAllocProp.hpp b/lib/kokkos/core/src/impl/KokkosExp_ViewAllocProp.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/KokkosExp_ViewArray.hpp b/lib/kokkos/core/src/impl/KokkosExp_ViewArray.hpp
new file mode 100644
index 000000000..6f49c57b3
--- /dev/null
+++ b/lib/kokkos/core/src/impl/KokkosExp_ViewArray.hpp
@@ -0,0 +1,616 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXPERIMENTAL_VIEW_ARRAY_MAPPING_HPP
+#define KOKKOS_EXPERIMENTAL_VIEW_ARRAY_MAPPING_HPP
+
+#include <Kokkos_Array.hpp>
+
+namespace Kokkos {
+namespace Experimental {
+namespace Impl {
+
+template< class DataType , class V , long N , class P , class ArrayLayout >
+struct ViewDataAnalysis< DataType , Kokkos::Array<V,N,P> , ArrayLayout >
+{
+private:
+
+ typedef ViewArrayAnalysis<DataType> array_analysis ;
+
+ static_assert( std::is_same<P,void>::value , "" );
+ static_assert( std::is_same<typename array_analysis::non_const_value_type , Kokkos::Array<V,N,P> >::value , "" );
+ static_assert( std::is_scalar<V>::value , "View of Array type must be of a scalar type" );
+
+public:
+
+ typedef Kokkos::Array<> specialize ;
+
+ typedef typename array_analysis::dimension dimension ;
+
+private:
+
+ enum { is_const = std::is_same< typename array_analysis::value_type
+ , typename array_analysis::const_value_type
+ >::value };
+
+ typedef ViewDimension< ( dimension::rank == 0 ? N : dimension::arg_N0 )
+ , ( dimension::rank == 1 ? N : dimension::arg_N1 )
+ , ( dimension::rank == 2 ? N : dimension::arg_N2 )
+ , ( dimension::rank == 3 ? N : dimension::arg_N3 )
+ , ( dimension::rank == 4 ? N : dimension::arg_N4 )
+ , ( dimension::rank == 5 ? N : dimension::arg_N5 )
+ , ( dimension::rank == 6 ? N : dimension::arg_N6 )
+ , ( dimension::rank == 7 ? N : dimension::arg_N7 )
+ > array_scalar_dimension ;
+
+ typedef typename std::conditional< is_const , const V , V >::type scalar_type ;
+ typedef V non_const_scalar_type ;
+ typedef const V const_scalar_type ;
+
+public:
+
+ typedef typename array_analysis::value_type value_type ;
+ typedef typename array_analysis::const_value_type const_value_type ;
+ typedef typename array_analysis::non_const_value_type non_const_value_type ;
+
+ typedef typename ViewDataType< value_type , dimension >::type type ;
+ typedef typename ViewDataType< const_value_type , dimension >::type const_type ;
+ typedef typename ViewDataType< non_const_value_type , dimension >::type non_const_type ;
+
+ typedef typename ViewDataType< scalar_type , array_scalar_dimension >::type array_scalar_type ;
+ typedef typename ViewDataType< const_scalar_type , array_scalar_dimension >::type const_array_scalar_type ;
+ typedef typename ViewDataType< non_const_scalar_type , array_scalar_dimension >::type non_const_array_scalar_type ;
+};
+
+}}} // namespace Kokkos::Experimental::Impl
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Experimental {
+namespace Impl {
+
+/** \brief View mapping for non-specialized data type and standard layout */
+template< class Traits >
+class ViewMapping< Traits , void ,
+ typename std::enable_if<( std::is_same< typename Traits::specialize , Kokkos::Array<> >::value &&
+ ( std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value )
+ )>::type >
+{
+private:
+
+ template< class , class , typename > friend class ViewMapping ;
+ template< class , bool , bool , bool , bool , bool , bool , bool , bool , class > friend struct SubviewMapping ;
+ template< class , class , class , class > friend class Kokkos::Experimental::View ;
+
+ typedef ViewOffset< typename Traits::dimension
+ , typename Traits::array_layout
+ , void
+ > offset_type ;
+
+ typedef typename Traits::value_type::pointer handle_type ;
+
+ handle_type m_handle ;
+ offset_type m_offset ;
+ size_t m_stride ;
+
+ typedef typename Traits::value_type::value_type scalar_type ;
+
+ typedef Kokkos::Array< scalar_type , ~size_t(0) , Kokkos::Array<>::contiguous > contiguous_reference ;
+ typedef Kokkos::Array< scalar_type , ~size_t(0) , Kokkos::Array<>::strided > strided_reference ;
+
+ enum { is_contiguous_reference =
+ ( Traits::rank == 0 ) || ( std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value ) };
+
+ enum { Array_N = Traits::value_type::size() };
+ enum { Array_S = is_contiguous_reference ? Array_N : 1 };
+
+ KOKKOS_INLINE_FUNCTION
+ ViewMapping( const handle_type & arg_handle , const offset_type & arg_offset )
+ : m_handle( arg_handle )
+ , m_offset( arg_offset )
+ , m_stride( is_contiguous_reference ? 0 : arg_offset.span() )
+ {}
+
+public:
+
+ //----------------------------------------
+ // Domain dimensions
+
+ enum { Rank = Traits::dimension::rank };
+
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return m_offset.dimension_0(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return m_offset.dimension_1(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return m_offset.dimension_2(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return m_offset.dimension_3(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { return m_offset.dimension_4(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_offset.dimension_5(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_offset.dimension_6(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_offset.dimension_7(); }
+
+ // Is a regular layout with uniform striding for each index.
+ using is_regular = typename offset_type::is_regular ;
+
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_offset.stride_0(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_offset.stride_1(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { return m_offset.stride_2(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { return m_offset.stride_3(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { return m_offset.stride_4(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { return m_offset.stride_5(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { return m_offset.stride_6(); }
+ KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { return m_offset.stride_7(); }
+
+ //----------------------------------------
+ // Range span
+
+ /** \brief Span of the mapped range */
+ KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_offset.span(); }
+
+ /** \brief Is the mapped range span contiguous */
+ KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_offset.span_is_contiguous(); }
+
+ typedef typename std::conditional< is_contiguous_reference , contiguous_reference , strided_reference >::type reference_type ;
+
+ /** \brief If data references are lvalue_reference than can query pointer to memory */
+ KOKKOS_INLINE_FUNCTION constexpr typename Traits::value_type * data() const
+ { return (typename Traits::value_type *) 0 ; }
+
+ //----------------------------------------
+ // The View class performs all rank and bounds checking before
+ // calling these element reference methods.
+
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference() const { return reference_type( m_handle + 0 , Array_N , 0 ); }
+
+ template< typename I0 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type
+ reference( const I0 & i0 ) const
+ { return reference_type( m_handle + m_offset(i0) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 ) const
+ { return reference_type( m_handle + m_offset(i0,i1) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 , typename I3 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2,i3) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 , typename I3
+ , typename I4 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
+ , const I4 & i4 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2,i3,i4) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 , typename I3
+ , typename I4 , typename I5 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
+ , const I4 & i4 , const I5 & i5 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2,i3,i4,i5) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 , typename I3
+ , typename I4 , typename I5 , typename I6 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
+ , const I4 & i4 , const I5 & i5 , const I6 & i6 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2,i3,i4,i5,i6) * Array_S , Array_N , m_stride ); }
+
+ template< typename I0 , typename I1 , typename I2 , typename I3
+ , typename I4 , typename I5 , typename I6 , typename I7 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
+ , const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 ) const
+ { return reference_type( m_handle + m_offset(i0,i1,i2,i3,i4,i5,i6,i7) * Array_S , Array_N , m_stride ); }
+
+ //----------------------------------------
+
+private:
+
+ enum { MemorySpanMask = 8 - 1 /* Force alignment on 8 byte boundary */ };
+ enum { MemorySpanSize = sizeof(typename Traits::value_type) };
+
+public:
+
+ /** \brief Span, in bytes, of the referenced memory */
+ KOKKOS_INLINE_FUNCTION constexpr size_t memory_span() const
+ {
+ return ( m_stride * sizeof(typename Traits::value_type) + MemorySpanMask ) & ~size_t(MemorySpanMask);
+ }
+
+ /** \brief Span, in bytes, of the required memory */
+ template< bool AllowPadding >
+ KOKKOS_INLINE_FUNCTION
+ static constexpr size_t memory_span( const std::integral_constant<bool,AllowPadding> &
+ , const size_t N0 , const size_t N1 , const size_t N2 , const size_t N3
+ , const size_t N4 , const size_t N5 , const size_t N6 , const size_t N7 )
+ {
+ typedef std::integral_constant< unsigned , AllowPadding ? MemorySpanSize : 0 > padding ;
+ return ( offset_type( padding(), N0, N1, N2, N3, N4, N5, N6, N7 ).span() * MemorySpanSize + MemorySpanMask ) & ~size_t(MemorySpanMask);
+ }
+
+ /** \brief Span, in bytes, of the required memory */
+ template< bool AllowPadding >
+ KOKKOS_INLINE_FUNCTION
+ static constexpr size_t memory_span( const std::integral_constant<bool,AllowPadding> &
+ , const typename Traits::array_layout & layout )
+ {
+ return ( offset_type( layout ).span() * MemorySpanSize + MemorySpanMask ) & ~size_t(MemorySpanMask);
+ }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION ~ViewMapping() {}
+ KOKKOS_INLINE_FUNCTION ViewMapping() : m_handle(), m_offset(), m_stride(0) {}
+ KOKKOS_INLINE_FUNCTION ViewMapping( const ViewMapping & rhs )
+ : m_handle( rhs.m_handle ), m_offset( rhs.m_offset ), m_stride( rhs.m_stride ) {}
+ KOKKOS_INLINE_FUNCTION ViewMapping & operator = ( const ViewMapping & rhs )
+ { m_handle = rhs.m_handle ; m_offset = rhs.m_offset ; m_stride = rhs.m_stride ; ; return *this ; }
+
+ KOKKOS_INLINE_FUNCTION ViewMapping( ViewMapping && rhs )
+ : m_handle( rhs.m_handle ), m_offset( rhs.m_offset ), m_stride( rhs.m_stride ) {}
+ KOKKOS_INLINE_FUNCTION ViewMapping & operator = ( ViewMapping && rhs )
+ { m_handle = rhs.m_handle ; m_offset = rhs.m_offset ; m_stride = rhs.m_stride ; return *this ; }
+
+ template< bool AllowPadding >
+ KOKKOS_INLINE_FUNCTION
+ ViewMapping( void * ptr
+ , const std::integral_constant<bool,AllowPadding> &
+ , const size_t N0 , const size_t N1 , const size_t N2 , const size_t N3
+ , const size_t N4 , const size_t N5 , const size_t N6 , const size_t N7 )
+ : m_handle( reinterpret_cast< handle_type >( ptr ) )
+ , m_offset( std::integral_constant< unsigned , AllowPadding ? sizeof(typename Traits::value_type) : 0 >()
+ , N0, N1, N2, N3, N4, N5, N6, N7 )
+ , m_stride( m_offset.span() )
+ {}
+
+ template< bool AllowPadding >
+ KOKKOS_INLINE_FUNCTION
+ ViewMapping( void * ptr
+ , const std::integral_constant<bool,AllowPadding> &
+ , const typename Traits::array_layout & layout )
+ : m_handle( reinterpret_cast< handle_type >( ptr ) )
+ , m_offset( layout )
+ , m_stride( m_offset.span() )
+ {}
+
+ //----------------------------------------
+ // If the View is to construct or destroy the elements.
+
+ KOKKOS_FORCEINLINE_FUNCTION
+ void operator()( const size_t i ) const
+ {
+ reference_type ref( m_handle + i * Array_S , Array_N , m_stride );
+ for ( size_t j = 0 ; j < Array_N ; ++j ) ref[j] = 0 ;
+ }
+
+ template< class ExecSpace >
+ void construct( const ExecSpace & space ) const
+ {
+ typedef Kokkos::RangePolicy< ExecSpace , size_t > Policy ;
+
+ (void) Kokkos::Impl::ParallelFor< ViewMapping , Policy >( *this , Policy( 0 , m_stride ) );
+ ExecSpace::fence();
+ }
+
+ template< class ExecSpace >
+ void destroy( const ExecSpace & ) const {}
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+/** \brief Assign compatible default mappings */
+
+template< class DstTraits , class SrcTraits >
+class ViewMapping< DstTraits , SrcTraits ,
+ typename std::enable_if<(
+ std::is_same< typename DstTraits::memory_space , typename SrcTraits::memory_space >::value
+ &&
+ std::is_same< typename DstTraits::specialize , Kokkos::Array<> >::value
+ &&
+ (
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value
+ )
+ &&
+ std::is_same< typename SrcTraits::specialize , Kokkos::Array<> >::value
+ &&
+ (
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutStride >::value
+ )
+ )>::type >
+{
+public:
+
+ enum { is_assignable = true };
+
+ typedef Kokkos::Experimental::Impl::SharedAllocationTracker TrackType ;
+ typedef ViewMapping< DstTraits , void , void > DstType ;
+ typedef ViewMapping< SrcTraits , void , void > SrcType ;
+
+ KOKKOS_INLINE_FUNCTION
+ static void assign( DstType & dst , const SrcType & src , const TrackType & src_track )
+ {
+ static_assert( std::is_same< typename DstTraits::value_type , typename SrcTraits::value_type >::value ||
+ std::is_same< typename DstTraits::value_type , typename SrcTraits::const_value_type >::value
+ , "View assignment must have same value type or const = non-const" );
+
+ static_assert( ViewDimensionAssignable< typename DstTraits::dimension , typename SrcTraits::dimension >::value
+ , "View assignment must have compatible dimensions" );
+
+ static_assert( std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value ||
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value ||
+ ( DstTraits::dimension::rank == 0 ) ||
+ ( DstTraits::dimension::rank == 1 && DstTraits::dimension::rank_dynamic == 1 )
+ , "View assignment must have compatible layout or have rank <= 1" );
+
+ typedef typename DstType::offset_type dst_offset_type ;
+
+ dst.m_offset = dst_offset_type( src.m_offset );
+ dst.m_handle = src.m_handle ;
+ dst.m_stride = src.m_stride ;
+ }
+};
+
+/** \brief Assign Array to non-Array */
+
+template< class DstTraits , class SrcTraits >
+class ViewMapping< DstTraits , SrcTraits ,
+ typename std::enable_if<(
+ std::is_same< typename DstTraits::memory_space , typename SrcTraits::memory_space >::value
+ &&
+ std::is_same< typename DstTraits::specialize , void >::value
+ &&
+ (
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value
+ )
+ &&
+ std::is_same< typename SrcTraits::specialize , Kokkos::Array<> >::value
+ &&
+ (
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutStride >::value
+ )
+ )>::type >
+{
+public:
+
+ // Can only convert to View::array_type
+
+ enum { is_assignable = std::is_same< typename DstTraits::data_type , typename SrcTraits::array_scalar_type >::value &&
+ std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value };
+
+ typedef Kokkos::Experimental::Impl::SharedAllocationTracker TrackType ;
+ typedef ViewMapping< DstTraits , void , void > DstType ;
+ typedef ViewMapping< SrcTraits , void , void > SrcType ;
+
+ KOKKOS_INLINE_FUNCTION
+ static void assign( DstType & dst , const SrcType & src , const TrackType & src_track )
+ {
+ static_assert( is_assignable , "Can only convert to array_type" );
+
+ typedef typename DstType::offset_type dst_offset_type ;
+
+ // Array dimension becomes the last dimension.
+ // Arguments beyond the destination rank are ignored.
+ if ( src.span_is_contiguous() ) { // not padded
+ dst.m_offset = dst_offset_type( std::integral_constant<unsigned,0>()
+ , ( 1 < SrcType::Rank ? src.dimension_1() : SrcTraits::value_type::size() )
+ , ( 2 < SrcType::Rank ? src.dimension_2() : SrcTraits::value_type::size() )
+ , ( 3 < SrcType::Rank ? src.dimension_3() : SrcTraits::value_type::size() )
+ , ( 4 < SrcType::Rank ? src.dimension_4() : SrcTraits::value_type::size() )
+ , ( 5 < SrcType::Rank ? src.dimension_5() : SrcTraits::value_type::size() )
+ , ( 6 < SrcType::Rank ? src.dimension_6() : SrcTraits::value_type::size() )
+ , ( 7 < SrcType::Rank ? src.dimension_7() : SrcTraits::value_type::size() )
+ );
+ }
+ else { // is padded
+ typedef std::integral_constant<unsigned,sizeof(typename SrcTraits::value_type::value_type)> padded ;
+
+ dst.m_offset = dst_offset_type( padded()
+ , ( 0 < SrcType::Rank ? src.dimension_0() : SrcTraits::value_type::size() )
+ , ( 1 < SrcType::Rank ? src.dimension_1() : SrcTraits::value_type::size() )
+ , ( 2 < SrcType::Rank ? src.dimension_2() : SrcTraits::value_type::size() )
+ , ( 3 < SrcType::Rank ? src.dimension_3() : SrcTraits::value_type::size() )
+ , ( 4 < SrcType::Rank ? src.dimension_4() : SrcTraits::value_type::size() )
+ , ( 5 < SrcType::Rank ? src.dimension_5() : SrcTraits::value_type::size() )
+ , ( 6 < SrcType::Rank ? src.dimension_6() : SrcTraits::value_type::size() )
+ , ( 7 < SrcType::Rank ? src.dimension_7() : SrcTraits::value_type::size() )
+ );
+ }
+
+ dst.m_handle = src.m_handle ;
+ }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+/** \brief View mapping for non-specialized data type and standard layout */
+template< class Traits , bool R0 , bool R1 , bool R2 , bool R3 , bool R4 , bool R5 , bool R6 , bool R7 >
+struct SubviewMapping< Traits, R0, R1, R2, R3, R4, R5, R6, R7 ,
+ typename std::enable_if<(
+ std::is_same< typename Traits::specialize , Kokkos::Array<> >::value
+ &&
+ (
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value ||
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value ||
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value
+ )
+ )>::type >
+{
+private:
+
+ // Subview's rank
+ enum { rank = unsigned(R0) + unsigned(R1) + unsigned(R2) + unsigned(R3)
+ + unsigned(R4) + unsigned(R5) + unsigned(R6) + unsigned(R7) };
+
+ // Whether right-most rank is a range.
+ enum { R0_rev = 0 == Traits::rank ? false : (
+ 1 == Traits::rank ? R0 : (
+ 2 == Traits::rank ? R1 : (
+ 3 == Traits::rank ? R2 : (
+ 4 == Traits::rank ? R3 : (
+ 5 == Traits::rank ? R4 : (
+ 6 == Traits::rank ? R5 : (
+ 7 == Traits::rank ? R6 : R7 ))))))) };
+
+ // Subview's layout
+ typedef typename std::conditional<
+ ( /* Same array layout IF */
+ ( rank == 0 ) /* output rank zero */
+ ||
+ // OutputRank 1 or 2, InputLayout Left, Interval 0
+ // because single stride one or second index has a stride.
+ ( rank <= 2 && R0 && std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value )
+ ||
+ // OutputRank 1 or 2, InputLayout Right, Interval [InputRank-1]
+ // because single stride one or second index has a stride.
+ ( rank <= 2 && R0_rev && std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value )
+ ), typename Traits::array_layout , Kokkos::LayoutStride
+ >::type array_layout ;
+
+ typedef typename Traits::value_type value_type ;
+
+ typedef typename std::conditional< rank == 0 , value_type ,
+ typename std::conditional< rank == 1 , value_type * ,
+ typename std::conditional< rank == 2 , value_type ** ,
+ typename std::conditional< rank == 3 , value_type *** ,
+ typename std::conditional< rank == 4 , value_type **** ,
+ typename std::conditional< rank == 5 , value_type ***** ,
+ typename std::conditional< rank == 6 , value_type ****** ,
+ typename std::conditional< rank == 7 , value_type ******* ,
+ value_type ********
+ >::type >::type >::type >::type >::type >::type >::type >::type
+ data_type ;
+
+public:
+
+ typedef
+ Kokkos::Experimental::ViewTraits< data_type , array_layout
+ , typename Traits::device_type
+ , typename Traits::memory_traits > traits_type ;
+
+ typedef Kokkos::Experimental::View< data_type
+ , array_layout
+ , typename Traits::device_type
+ , typename Traits::memory_traits > type ;
+
+ template< class T0 , class T1 , class T2 , class T3
+ , class T4 , class T5 , class T6 , class T7 >
+ KOKKOS_INLINE_FUNCTION
+ static void assign( ViewMapping< traits_type , void , void > & dst
+ , ViewMapping< Traits , void , void > const & src
+ , T0 const & arg0
+ , T1 const & arg1
+ , T2 const & arg2
+ , T3 const & arg3
+ , T4 const & arg4
+ , T5 const & arg5
+ , T6 const & arg6
+ , T7 const & arg7
+ )
+ {
+ typedef ViewMapping< traits_type , void , void > DstType ;
+
+ typedef typename DstType::offset_type dst_offset_type ;
+ typedef typename DstType::handle_type dst_handle_type ;
+
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T0> V0 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T1> V1 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T2> V2 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T3> V3 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T4> V4 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T5> V5 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T6> V6 ;
+ typedef Kokkos::Experimental::Impl::ViewOffsetRange<T7> V7 ;
+
+ dst.m_offset = dst_offset_type
+ ( src.m_offset
+ , V0::dimension( src.m_offset.dimension_0() , arg0 )
+ , V1::dimension( src.m_offset.dimension_1() , arg1 )
+ , V2::dimension( src.m_offset.dimension_2() , arg2 )
+ , V3::dimension( src.m_offset.dimension_3() , arg3 )
+ , V4::dimension( src.m_offset.dimension_4() , arg4 )
+ , V5::dimension( src.m_offset.dimension_5() , arg5 )
+ , V6::dimension( src.m_offset.dimension_6() , arg6 )
+ , V7::dimension( src.m_offset.dimension_7() , arg7 )
+ );
+
+ dst.m_handle = dst_handle_type( src.m_handle +
+ src.m_offset( V0::begin( arg0 )
+ , V1::begin( arg1 )
+ , V2::begin( arg2 )
+ , V3::begin( arg3 )
+ , V4::begin( arg4 )
+ , V5::begin( arg5 )
+ , V6::begin( arg6 )
+ , V7::begin( arg7 )
+ ) );
+ }
+};
+
+}}} // namespace Kokkos::Experimental::Impl
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_EXPERIMENTAL_VIEW_ARRAY_MAPPING_HPP */
+
diff --git a/lib/kokkos/core/src/impl/KokkosExp_ViewMapping.hpp b/lib/kokkos/core/src/impl/KokkosExp_ViewMapping.hpp
old mode 100755
new mode 100644
index bd2b4c675..5fa1bb715
--- a/lib/kokkos/core/src/impl/KokkosExp_ViewMapping.hpp
+++ b/lib/kokkos/core/src/impl/KokkosExp_ViewMapping.hpp
@@ -1,2683 +1,2830 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_EXPERIMENTAL_VIEW_MAPPING_HPP
#define KOKKOS_EXPERIMENTAL_VIEW_MAPPING_HPP
#include <type_traits>
#include <initializer_list>
#include <Kokkos_Pair.hpp>
#include <Kokkos_Layout.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_Atomic_View.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class ExecPolicy > class ParallelFor ;
}} /* namespace Kokkos::Impl */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template< long sN0 = -1
, long sN1 = -1
, long sN2 = -1
, long sN3 = -1
, long sN4 = -1
, long sN5 = -1
, long sN6 = -1
, long sN7 = -1
>
struct ViewDimension {
+ enum { arg_N0 = sN0 };
+ enum { arg_N1 = sN1 };
+ enum { arg_N2 = sN2 };
+ enum { arg_N3 = sN3 };
+ enum { arg_N4 = sN4 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN0 < 0 ? 0 :
( sN1 < 0 ? 1 :
( sN2 < 0 ? 2 :
( sN3 < 0 ? 3 :
( sN4 < 0 ? 4 :
( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 )))))))) };
enum { rank_dynamic = 0 };
enum { N0 = 0 < sN0 ? sN0 : 1 };
enum { N1 = 0 < sN1 ? sN1 : 1 };
enum { N2 = 0 < sN2 ? sN2 : 1 };
enum { N3 = 0 < sN3 ? sN3 : 1 };
enum { N4 = 0 < sN4 ? sN4 : 1 };
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t , unsigned , unsigned , unsigned
, unsigned , unsigned , unsigned , unsigned ) {}
};
template< long sN1
, long sN2
, long sN3
, long sN4
, long sN5
, long sN6
, long sN7
>
struct ViewDimension< 0, sN1, sN2, sN3, sN4, sN5, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = sN1 };
+ enum { arg_N2 = sN2 };
+ enum { arg_N3 = sN3 };
+ enum { arg_N4 = sN4 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN1 < 0 ? 1 :
( sN2 < 0 ? 2 :
( sN3 < 0 ? 3 :
( sN4 < 0 ? 4 :
( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 ))))))) };
enum { rank_dynamic = 1 };
size_t N0 ; /* When 1 == rank_dynamic allow N0 >= 2^32 */
enum { N1 = 0 < sN1 ? sN1 : 1 };
enum { N2 = 0 < sN2 ? sN2 : 1 };
enum { N3 = 0 < sN3 ? sN3 : 1 };
enum { N4 = 0 < sN4 ? sN4 : 1 };
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned , unsigned , unsigned
, unsigned , unsigned , unsigned , unsigned )
: N0( aN0 ) {}
};
template< long sN2
, long sN3
, long sN4
, long sN5
, long sN6
, long sN7
>
struct ViewDimension< 0, 0, sN2, sN3, sN4, sN5, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = sN2 };
+ enum { arg_N3 = sN3 };
+ enum { arg_N4 = sN4 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN2 < 0 ? 2 :
( sN3 < 0 ? 3 :
( sN4 < 0 ? 4 :
( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 )))))) };
enum { rank_dynamic = 2 };
size_t N0 ; /* When 2 == rank_dynamic allow N0 >= 2^32 */
size_t N1 ; /* When 2 == rank_dynamic allow N1 >= 2^32 */
enum { N2 = 0 < sN2 ? sN2 : 1 };
enum { N3 = 0 < sN3 ? sN3 : 1 };
enum { N4 = 0 < sN4 ? sN4 : 1 };
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned , unsigned
, unsigned , unsigned , unsigned , unsigned )
: N0( aN0 ) , N1( aN1 ) {}
};
template< long sN3
, long sN4
, long sN5
, long sN6
, long sN7
>
struct ViewDimension< 0, 0, 0, sN3, sN4, sN5, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = sN3 };
+ enum { arg_N4 = sN4 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN3 < 0 ? 3 :
( sN4 < 0 ? 4 :
( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 ))))) };
enum { rank_dynamic = 3 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
enum { N3 = 0 < sN3 ? sN3 : 1 };
enum { N4 = 0 < sN4 ? sN4 : 1 };
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned
, unsigned , unsigned , unsigned , unsigned )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) {}
};
template< long sN4
, long sN5
, long sN6
, long sN7
>
struct ViewDimension< 0, 0, 0, 0, sN4, sN5, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = 0 };
+ enum { arg_N4 = sN4 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN4 < 0 ? 4 :
( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 )))) };
enum { rank_dynamic = 4 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
unsigned N3 ;
enum { N4 = 0 < sN4 ? sN4 : 1 };
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned , unsigned , unsigned , unsigned )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) , N3( aN3 ) {}
};
template< long sN5
, long sN6
, long sN7
>
struct ViewDimension< 0, 0, 0, 0, 0, sN5, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = 0 };
+ enum { arg_N4 = 0 };
+ enum { arg_N5 = sN5 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN5 < 0 ? 5 :
( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 ))) };
enum { rank_dynamic = 5 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
unsigned N3 ;
unsigned N4 ;
enum { N5 = 0 < sN5 ? sN5 : 1 };
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned , unsigned , unsigned )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) , N3( aN3 ) , N4( aN4 ) {}
};
template< long sN6
, long sN7
>
struct ViewDimension< 0, 0, 0, 0, 0, 0, sN6, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = 0 };
+ enum { arg_N4 = 0 };
+ enum { arg_N5 = 0 };
+ enum { arg_N6 = sN6 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN6 < 0 ? 6 :
( sN7 < 0 ? 7 : 8 )) };
enum { rank_dynamic = 6 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
unsigned N3 ;
unsigned N4 ;
unsigned N5 ;
enum { N6 = 0 < sN6 ? sN6 : 1 };
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned , unsigned )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) , N3( aN3 ) , N4( aN4 ) , N5( aN5 ) {}
};
template< long sN7 >
struct ViewDimension< 0, 0, 0, 0, 0, 0, 0, sN7 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = 0 };
+ enum { arg_N4 = 0 };
+ enum { arg_N5 = 0 };
+ enum { arg_N6 = 0 };
+ enum { arg_N7 = sN7 };
+
enum { rank = ( sN7 < 0 ? 7 : 8 ) };
enum { rank_dynamic = 7 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
unsigned N3 ;
unsigned N4 ;
unsigned N5 ;
unsigned N6 ;
enum { N7 = 0 < sN7 ? sN7 : 1 };
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) , N3( aN3 ) , N4( aN4 ) , N5( aN5 ) , N6( aN6 ) {}
};
template<>
struct ViewDimension< 0, 0, 0, 0, 0, 0, 0, 0 > {
+ enum { arg_N0 = 0 };
+ enum { arg_N1 = 0 };
+ enum { arg_N2 = 0 };
+ enum { arg_N3 = 0 };
+ enum { arg_N4 = 0 };
+ enum { arg_N5 = 0 };
+ enum { arg_N6 = 0 };
+ enum { arg_N7 = 0 };
+
enum { rank = 8 };
enum { rank_dynamic = 8 };
unsigned N0 ;
unsigned N1 ;
unsigned N2 ;
unsigned N3 ;
unsigned N4 ;
unsigned N5 ;
unsigned N6 ;
unsigned N7 ;
ViewDimension() = default ;
ViewDimension( const ViewDimension & ) = default ;
ViewDimension & operator = ( const ViewDimension & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewDimension( size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned aN7 )
: N0( aN0 ) , N1( aN1 ) , N2( aN2 ) , N3( aN3 ) , N4( aN4 ) , N5( aN5 ) , N6( aN6 ) , N7( aN7 ) {}
};
//----------------------------------------------------------------------------
template< class DstDim , class SrcDim >
struct ViewDimensionAssignable ;
template< long dN0 , long dN1 , long dN2 , long dN3 , long dN4 , long dN5 , long dN6 , long dN7
, long sN0 , long sN1 , long sN2 , long sN3 , long sN4 , long sN5 , long sN6 , long sN7 >
struct ViewDimensionAssignable< ViewDimension<dN0,dN1,dN2,dN3,dN4,dN5,dN6,dN7>
, ViewDimension<sN0,sN1,sN2,sN3,sN4,sN5,sN6,sN7> >
{
typedef ViewDimension<dN0,dN1,dN2,dN3,dN4,dN5,dN6,dN7> dst ;
typedef ViewDimension<sN0,sN1,sN2,sN3,sN4,sN5,sN6,sN7> src ;
enum { value = dst::rank == src::rank &&
dst::rank_dynamic >= src::rank_dynamic &&
( 0 < dst::rank_dynamic || dN0 == sN0 ) &&
( 1 < dst::rank_dynamic || dN1 == sN1 ) &&
( 2 < dst::rank_dynamic || dN2 == sN2 ) &&
( 3 < dst::rank_dynamic || dN3 == sN3 ) &&
( 4 < dst::rank_dynamic || dN4 == sN4 ) &&
( 5 < dst::rank_dynamic || dN5 == sN5 ) &&
( 6 < dst::rank_dynamic || dN6 == sN6 ) &&
( 7 < dst::rank_dynamic || dN7 == sN7 ) };
};
-//----------------------------------------------------------------------------
-
-template< class Dim , unsigned N , unsigned R = Dim::rank_dynamic >
-struct ViewDimensionInsert ;
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 0 >
-{
- typedef ViewDimension< N
- , 0 < Dim::rank ? Dim::N0 : -1
- , 1 < Dim::rank ? Dim::N1 : -1
- , 2 < Dim::rank ? Dim::N2 : -1
- , 3 < Dim::rank ? Dim::N3 : -1
- , 4 < Dim::rank ? Dim::N4 : -1
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 1 >
-{
- typedef ViewDimension< 0 , N
- , 1 < Dim::rank ? Dim::N1 : -1
- , 2 < Dim::rank ? Dim::N2 : -1
- , 3 < Dim::rank ? Dim::N3 : -1
- , 4 < Dim::rank ? Dim::N4 : -1
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 2 >
-{
- typedef ViewDimension< 0 , 0 , N
- , 2 < Dim::rank ? Dim::N2 : -1
- , 3 < Dim::rank ? Dim::N3 : -1
- , 4 < Dim::rank ? Dim::N4 : -1
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 3 >
-{
- typedef ViewDimension< 0 , 0 , 0 , N
- , 3 < Dim::rank ? Dim::N3 : -1
- , 4 < Dim::rank ? Dim::N4 : -1
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 4 >
-{
- typedef ViewDimension< 0 , 0 , 0 , 0 , N
- , 4 < Dim::rank ? Dim::N4 : -1
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 5 >
-{
- typedef ViewDimension< 0 , 0 , 0 , 0 , 0 , N
- , 5 < Dim::rank ? Dim::N5 : -1
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 6 >
-{
- typedef ViewDimension< 0 , 0 , 0 , 0 , 0 , 0 , N
- , 6 < Dim::rank ? Dim::N6 : -1
- > type ;
-};
-
-template< class Dim , unsigned N >
-struct ViewDimensionInsert< Dim , N , 7 >
-{
- typedef ViewDimension< 0 , 0 , 0 , 0 , 0 , 0 , 0 , N > type ;
-};
-
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
-/** \brief Analyze the array dimensions defined by a Kokkos::View data type.
+/** \brief Given a value type and dimension generate the View data type */
+template< class T , class Dim /* ViewDimension */ >
+struct ViewDataType {
+ enum { R = Dim::rank };
+ enum { RD = Dim::rank_dynamic };
+
+ // Unused static dimensions are set to 1 (instead of 0 or -1L) to avoid compile errors
+ // in the 'false' clauses of the std::conditional.
+
+ enum { N0 = 0 < Dim::arg_N0 ? Dim::arg_N0 : 1 };
+ enum { N1 = 0 < Dim::arg_N1 ? Dim::arg_N1 : 1 };
+ enum { N2 = 0 < Dim::arg_N2 ? Dim::arg_N2 : 1 };
+ enum { N3 = 0 < Dim::arg_N3 ? Dim::arg_N3 : 1 };
+ enum { N4 = 0 < Dim::arg_N4 ? Dim::arg_N4 : 1 };
+ enum { N5 = 0 < Dim::arg_N5 ? Dim::arg_N5 : 1 };
+ enum { N6 = 0 < Dim::arg_N6 ? Dim::arg_N6 : 1 };
+ enum { N7 = 0 < Dim::arg_N7 ? Dim::arg_N7 : 1 };
+
+ typedef typename std::conditional< R == 0 , T ,
+ typename std::conditional< R == 1 ,
+ typename std::conditional< RD == 0 , T[N0] , T * >::type ,
+
+ typename std::conditional< R == 2 ,
+ typename std::conditional< RD == 0 , T[N0][N1] ,
+ typename std::conditional< RD == 1 , T* [N1] ,
+ T**
+ >::type >::type ,
+
+ typename std::conditional< R == 3 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2] ,
+ typename std::conditional< RD == 1 , T* [N1][N2] ,
+ typename std::conditional< RD == 2 , T** [N2] ,
+ T***
+ >::type >::type >::type ,
+
+ typename std::conditional< R == 4 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2][N3] ,
+ typename std::conditional< RD == 1 , T* [N1][N2][N3] ,
+ typename std::conditional< RD == 2 , T** [N2][N3] ,
+ typename std::conditional< RD == 3 , T*** [N3] ,
+ T****
+ >::type >::type >::type >::type ,
+
+ typename std::conditional< R == 5 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2][N3][N4] ,
+ typename std::conditional< RD == 1 , T* [N1][N2][N3][N4] ,
+ typename std::conditional< RD == 2 , T** [N2][N3][N4] ,
+ typename std::conditional< RD == 3 , T*** [N3][N4] ,
+ typename std::conditional< RD == 4 , T**** [N4] ,
+ T*****
+ >::type >::type >::type >::type >::type ,
+
+ typename std::conditional< R == 6 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2][N3][N4][N5] ,
+ typename std::conditional< RD == 1 , T* [N1][N2][N3][N4][N5] ,
+ typename std::conditional< RD == 2 , T** [N2][N3][N4][N5] ,
+ typename std::conditional< RD == 3 , T*** [N3][N4][N5] ,
+ typename std::conditional< RD == 4 , T**** [N4][N5] ,
+ typename std::conditional< RD == 5 , T***** [N5] ,
+ T******
+ >::type >::type >::type >::type >::type >::type ,
+
+ typename std::conditional< R == 7 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2][N3][N4][N5][N6] ,
+ typename std::conditional< RD == 1 , T* [N1][N2][N3][N4][N5][N6] ,
+ typename std::conditional< RD == 2 , T** [N2][N3][N4][N5][N6] ,
+ typename std::conditional< RD == 3 , T*** [N3][N4][N5][N6] ,
+ typename std::conditional< RD == 4 , T**** [N4][N5][N6] ,
+ typename std::conditional< RD == 5 , T***** [N5][N6] ,
+ typename std::conditional< RD == 6 , T****** [N6] ,
+ T*******
+ >::type >::type >::type >::type >::type >::type >::type ,
+
+ typename std::conditional< R == 8 ,
+ typename std::conditional< RD == 0 , T[N0][N1][N2][N3][N4][N5][N6][N7] ,
+ typename std::conditional< RD == 1 , T* [N1][N2][N3][N4][N5][N6][N7] ,
+ typename std::conditional< RD == 2 , T** [N2][N3][N4][N5][N6][N7] ,
+ typename std::conditional< RD == 3 , T*** [N3][N4][N5][N6][N7] ,
+ typename std::conditional< RD == 4 , T**** [N4][N5][N6][N7] ,
+ typename std::conditional< RD == 5 , T***** [N5][N6][N7] ,
+ typename std::conditional< RD == 6 , T****** [N6][N7] ,
+ typename std::conditional< RD == 7 , T******* [N7] ,
+ T********
+ >::type >::type >::type >::type >::type >::type >::type >::type ,
+
+ void >::type >::type >::type >::type >::type >::type >::type >::type >::type
+ type ;
+};
+
+/**\brief Analysis of View data type.
*
- * It is presumed that the data type can be mapped down to a multidimensional
- * array of an intrinsic scalar numerical type (double, float, int, ... ).
- * The 'value_type' of an array may be an embedded aggregate type such
- * as a fixed length array 'Array<T,N>'.
- * In this case the 'array_intrinsic_type' represents the
- * underlying array of intrinsic scalar numerical type.
+ * Data type conforms to one of the following patterns :
+ * {const} value_type [][#][#][#]
+ * {const} value_type ***[#][#][#]
+ * Where the sum of counts of '*' and '[#]' is at most ten.
*
- * The embedded aggregate type must have an AnalyzeShape specialization
- * to map it down to a shape and intrinsic scalar numerical type.
+ * Provide typedef for the ViewDimension<...> and value_type.
*/
template< class T >
-struct ViewDataAnalysis
+struct ViewArrayAnalysis
{
- typedef void specialize ; // No specialization
-
- typedef ViewDimension<> dimension ;
+private:
+ // std::rank<T>, std::extent<T,i>, and std::remove_all_extents<T>
+ // consider "const value_type***" to be the type.
- typedef T type ;
- typedef T value_type ;
- typedef T array_scalar_type ;
+ // Strip away pointers and count them
+ typedef typename std::remove_all_extents< T >::type t_0 ; // brackets removed
+ typedef typename std::remove_pointer< t_0 >::type t_1 ;
+ typedef typename std::remove_pointer< t_1 >::type t_2 ;
+ typedef typename std::remove_pointer< t_2 >::type t_3 ;
+ typedef typename std::remove_pointer< t_3 >::type t_4 ;
+ typedef typename std::remove_pointer< t_4 >::type t_5 ;
+ typedef typename std::remove_pointer< t_5 >::type t_6 ;
+ typedef typename std::remove_pointer< t_6 >::type t_7 ;
+ typedef typename std::remove_pointer< t_7 >::type t_8 ;
+ typedef typename std::remove_pointer< t_8 >::type t_9 ;
+ typedef typename std::remove_pointer< t_9 >::type t_10 ;
- typedef typename std::add_const< T >::type const_type ;
- typedef typename std::add_const< T >::type const_value_type ;
- typedef typename std::add_const< T >::type const_array_scalar_type ;
+ enum { rank_pointer =
+ ( ! std::is_pointer< t_0 >::value ? 0 :
+ ( ! std::is_pointer< t_1 >::value ? 1 :
+ ( ! std::is_pointer< t_2 >::value ? 2 :
+ ( ! std::is_pointer< t_3 >::value ? 3 :
+ ( ! std::is_pointer< t_4 >::value ? 4 :
+ ( ! std::is_pointer< t_5 >::value ? 5 :
+ ( ! std::is_pointer< t_6 >::value ? 6 :
+ ( ! std::is_pointer< t_7 >::value ? 7 :
+ ( ! std::is_pointer< t_8 >::value ? 8 :
+ ( ! std::is_pointer< t_9 >::value ? 9 :
+ ( ! std::is_pointer< t_10 >::value ? 10 : 0x7fffffff ))))))))))) };
- typedef typename std::remove_const< T >::type non_const_type ;
- typedef typename std::remove_const< T >::type non_const_value_type ;
- typedef typename std::remove_const< T >::type non_const_array_scalar_type ;
-};
+ // The pointer-stripped type t_10 may have been an array typedef of the form 'type[#][#]...'
+ // Append those dimensions.
-template< class T >
-struct ViewDataAnalysis< T * >
-{
-private:
+ enum { rank_bracket = std::rank< T >::value };
+ enum { rank_bracket_nested = std::rank< t_10 >::value };
+ enum { rank_base = rank_pointer + rank_bracket };
+ enum { rank = rank_pointer + rank_bracket + rank_bracket_nested };
- typedef ViewDataAnalysis< T > nested ;
+ static_assert( rank <= 10 , "Maximum ten dimensional array" );
-public:
+ enum { extent_0 = 0 < rank_base ? std::extent< T , rank_pointer <= 0 ? 0 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 0 ? 0 - rank_base : 10 >::value };
- typedef typename nested::specialize specialize ;
+ enum { extent_1 = 1 < rank_base ? std::extent< T , rank_pointer <= 1 ? 1 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 1 ? 1 - rank_base : 10 >::value };
- typedef typename ViewDimensionInsert< typename nested::dimension , 0 >::type dimension ;
+ enum { extent_2 = 2 < rank_base ? std::extent< T , rank_pointer <= 2 ? 2 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 2 ? 2 - rank_base : 10 >::value };
- typedef typename nested::type * type ;
- typedef typename nested::value_type value_type ;
- typedef typename nested::array_scalar_type * array_scalar_type ;
+ enum { extent_3 = 3 < rank_base ? std::extent< T , rank_pointer <= 3 ? 3 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 3 ? 3 - rank_base : 10 >::value };
- typedef typename nested::const_type * const_type ;
- typedef typename nested::const_value_type const_value_type ;
- typedef typename nested::const_array_scalar_type * const_array_scalar_type ;
+ enum { extent_4 = 4 < rank_base ? std::extent< T , rank_pointer <= 4 ? 4 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 4 ? 4 - rank_base : 10 >::value };
- typedef typename nested::non_const_type * non_const_type ;
- typedef typename nested::non_const_value_type non_const_value_type ;
- typedef typename nested::non_const_array_scalar_type * non_const_array_scalar_type ;
-};
+ enum { extent_5 = 5 < rank_base ? std::extent< T , rank_pointer <= 5 ? 5 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 5 ? 5 - rank_base : 10 >::value };
-template< class T >
-struct ViewDataAnalysis< T [] >
-{
-private:
+ enum { extent_6 = 6 < rank_base ? std::extent< T , rank_pointer <= 6 ? 6 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 6 ? 6 - rank_base : 10 >::value };
- typedef ViewDataAnalysis< T > nested ;
+ enum { extent_7 = 7 < rank_base ? std::extent< T , rank_pointer <= 7 ? 7 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 7 ? 7 - rank_base : 10 >::value };
-public:
+ enum { extent_8 = 8 < rank_base ? std::extent< T , rank_pointer <= 8 ? 8 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 8 ? 8 - rank_base : 10 >::value };
- typedef typename nested::specialize specialize ;
+ enum { extent_9 = 9 < rank_base ? std::extent< T , rank_pointer <= 9 ? 9 - rank_pointer : 10 >::value
+ : std::extent< t_10 , rank_base <= 9 ? 9 - rank_base : 10 >::value };
- typedef typename ViewDimensionInsert< typename nested::dimension , 0 >::type dimension ;
+ typedef typename std::remove_all_extents< t_10 >::type base_type ;
- typedef typename nested::type type [] ;
- typedef typename nested::value_type value_type ;
- typedef typename nested::array_scalar_type array_scalar_type [] ;
+ enum { rank_dynamic = rank_pointer ? rank_pointer : ( ( rank_bracket && extent_0 == 0 ) ? 1 : 0 ) };
- typedef typename nested::const_type const_type [] ;
- typedef typename nested::const_value_type const_value_type ;
- typedef typename nested::const_array_scalar_type const_array_scalar_type [] ;
+public:
- typedef typename nested::non_const_type non_const_type [] ;
- typedef typename nested::non_const_value_type non_const_value_type ;
- typedef typename nested::non_const_array_scalar_type non_const_array_scalar_type [] ;
+ typedef ViewDimension< ( rank <= 0 ? -1L : extent_0 )
+ , ( rank <= 1 ? -1L : extent_1 )
+ , ( rank <= 2 ? -1L : extent_2 )
+ , ( rank <= 3 ? -1L : extent_3 )
+ , ( rank <= 4 ? -1L : extent_4 )
+ , ( rank <= 5 ? -1L : extent_5 )
+ , ( rank <= 6 ? -1L : extent_6 )
+ , ( rank <= 7 ? -1L : extent_7 )
+ > dimension ;
+
+ typedef base_type value_type ;
+ typedef typename std::add_const< base_type >::type const_value_type ;
+ typedef typename std::remove_const< base_type >::type non_const_value_type ;
+
+ static_assert( unsigned(dimension::rank) == unsigned(rank) , "" );
+ static_assert( unsigned(dimension::rank_dynamic) == unsigned(rank_dynamic) , "" );
};
-template< class T , unsigned N >
-struct ViewDataAnalysis< T[N] >
+template< class DataType , class ValueType , class ArrayLayout >
+struct ViewDataAnalysis
{
private:
- typedef ViewDataAnalysis< T > nested ;
+ typedef ViewArrayAnalysis< DataType > array_analysis ;
-public:
+ // ValueType is opportunity for partial specialization.
+ // Must match array analysis when this default template is used.
+ static_assert( std::is_same< ValueType , typename array_analysis::non_const_value_type >::value , "" );
- typedef typename nested::specialize specialize ;
+public:
- typedef typename ViewDimensionInsert< typename nested::dimension , N >::type dimension ;
+ typedef void specialize ; // No specialization
- typedef typename nested::type type [N] ;
- typedef typename nested::value_type value_type ;
- typedef typename nested::array_scalar_type array_scalar_type [N] ;
+ typedef typename array_analysis::dimension dimension ;
+ typedef typename array_analysis::value_type value_type ;
+ typedef typename array_analysis::const_value_type const_value_type ;
+ typedef typename array_analysis::non_const_value_type non_const_value_type ;
- typedef typename nested::const_type const_type [N] ;
- typedef typename nested::const_value_type const_value_type ;
- typedef typename nested::const_array_scalar_type const_array_scalar_type [N] ;
+ // Generate analogous multidimensional array specification type.
+ typedef typename ViewDataType< value_type , dimension >::type type ;
+ typedef typename ViewDataType< const_value_type , dimension >::type const_type ;
+ typedef typename ViewDataType< non_const_value_type , dimension >::type non_const_type ;
- typedef typename nested::non_const_type non_const_type [N] ;
- typedef typename nested::non_const_value_type non_const_value_type ;
- typedef typename nested::non_const_array_scalar_type non_const_array_scalar_type [N] ;
+ // Generate "flattened" multidimensional array specification type.
+ typedef type array_scalar_type ;
+ typedef const_type const_array_scalar_type ;
+ typedef non_const_type non_const_array_scalar_type ;
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template < class Dimension , class Layout , typename Enable = void >
-struct ViewOffset ;
+struct ViewOffset {
+ using is_mapping_plugin = std::false_type ;
+};
//----------------------------------------------------------------------------
// LayoutLeft AND ( 1 >= rank OR 0 == rank_dynamic ) : no padding / striding
template < class Dimension >
struct ViewOffset< Dimension , Kokkos::LayoutLeft
, typename std::enable_if<( 1 >= Dimension::rank
||
0 == Dimension::rank_dynamic
)>::type >
{
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::true_type ;
+
typedef size_t size_type ;
typedef Dimension dimension_type ;
typedef Kokkos::LayoutLeft array_layout ;
dimension_type m_dim ;
//----------------------------------------
// rank 1
template< typename I0 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 ) const { return i0 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{ return i0 + m_dim.N0 * i1 ; }
//rank 3
template < typename I0, typename I1, typename I2 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2 ) const
{
return i0 + m_dim.N0 * ( i1 + m_dim.N1 * i2 );
}
//rank 4
template < typename I0, typename I1, typename I2, typename I3 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3 ) const
{
return i0 + m_dim.N0 * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * i3 ));
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
, typename I4 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4 ) const
{
return i0 + m_dim.N0 * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * i4 )));
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5 ) const
{
return i0 + m_dim.N0 * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * i5 ))));
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6 ) const
{
return i0 + m_dim.N0 * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * (
i5 + m_dim.N5 * i6 )))));
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6, typename I7 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6, I7 const & i7 ) const
{
return i0 + m_dim.N0 * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * (
i5 + m_dim.N5 * (
i6 + m_dim.N6 * i7 ))))));
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return m_dim.N7 ; }
/* Cardinality of the domain index space */
KOKKOS_INLINE_FUNCTION
constexpr size_type size() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
/* Span of the range space */
KOKKOS_INLINE_FUNCTION
constexpr size_type span() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return true ; }
/* Strides of dimensions */
KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return 1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return m_dim.N0 * m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return m_dim.N0 * m_dim.N1 * m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
s[0] = 1 ;
if ( 0 < dimension_type::rank ) { s[1] = m_dim.N0 ; }
if ( 1 < dimension_type::rank ) { s[2] = s[1] * m_dim.N1 ; }
if ( 2 < dimension_type::rank ) { s[3] = s[2] * m_dim.N2 ; }
if ( 3 < dimension_type::rank ) { s[4] = s[3] * m_dim.N3 ; }
if ( 4 < dimension_type::rank ) { s[5] = s[4] * m_dim.N4 ; }
if ( 5 < dimension_type::rank ) { s[6] = s[5] * m_dim.N5 ; }
if ( 6 < dimension_type::rank ) { s[7] = s[6] * m_dim.N6 ; }
if ( 7 < dimension_type::rank ) { s[8] = s[7] * m_dim.N7 ; }
}
//----------------------------------------
ViewOffset() = default ;
ViewOffset( const ViewOffset & ) = default ;
ViewOffset & operator = ( const ViewOffset & ) = default ;
template< unsigned TrivialScalarSize >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( std::integral_constant<unsigned,TrivialScalarSize> const &
, size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned aN7 )
: m_dim( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
{}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs )
: m_dim( rhs.m_dim.N0 , rhs.m_dim.N1 , rhs.m_dim.N2 , rhs.m_dim.N3
, rhs.m_dim.N4 , rhs.m_dim.N5 , rhs.m_dim.N6 , rhs.m_dim.N7 )
{
static_assert( int(DimRHS::rank) == int(dimension_type::rank) , "ViewOffset assignment requires equal rank" );
// Also requires equal static dimensions ...
}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > & rhs )
: m_dim( rhs.m_dim.N0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( DimRHS::rank == 1 && dimension_type::rank == 1 && dimension_type::rank_dynamic == 1
, "ViewOffset LayoutLeft and LayoutRight are only compatible when rank == 1" );
}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutStride , void > & rhs )
: m_dim( rhs.m_dim.N0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( DimRHS::rank == 1 && dimension_type::rank == 1 && dimension_type::rank_dynamic == 1
, "ViewOffset LayoutLeft and LayoutStride are only compatible when rank == 1" );
if ( rhs.m_stride.S0 != 1 ) {
Kokkos::abort("Kokkos::Experimental::ViewOffset assignment of LayoutLeft from LayoutStride requires stride == 1" );
}
}
//----------------------------------------
// Subview construction
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs
, const size_t n0
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
)
: m_dim( n0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( ( 0 == dimension_type::rank ) ||
( 1 == dimension_type::rank && 1 == dimension_type::rank_dynamic && 1 <= DimRHS::rank )
, "ViewOffset subview construction requires compatible rank" );
}
};
//----------------------------------------------------------------------------
// LayoutLeft AND ( 1 < rank AND 0 < rank_dynamic ) : has padding / striding
template < class Dimension >
struct ViewOffset< Dimension , Kokkos::LayoutLeft
, typename std::enable_if<( 1 < Dimension::rank
&&
0 < Dimension::rank_dynamic
)>::type >
{
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::true_type ;
+
typedef size_t size_type ;
typedef Dimension dimension_type ;
typedef Kokkos::LayoutLeft array_layout ;
dimension_type m_dim ;
size_type m_stride ;
//----------------------------------------
// rank 1
template< typename I0 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 ) const { return i0 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{ return i0 + m_stride * i1 ; }
//rank 3
template < typename I0, typename I1, typename I2 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2 ) const
{
return i0 + m_stride * ( i1 + m_dim.N1 * i2 );
}
//rank 4
template < typename I0, typename I1, typename I2, typename I3 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3 ) const
{
return i0 + m_stride * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * i3 ));
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
, typename I4 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4 ) const
{
return i0 + m_stride * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * i4 )));
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5 ) const
{
return i0 + m_stride * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * i5 ))));
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6 ) const
{
return i0 + m_stride * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * (
i5 + m_dim.N5 * i6 )))));
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6, typename I7 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6, I7 const & i7 ) const
{
return i0 + m_stride * (
i1 + m_dim.N1 * (
i2 + m_dim.N2 * (
i3 + m_dim.N3 * (
i4 + m_dim.N4 * (
i5 + m_dim.N5 * (
i6 + m_dim.N6 * i7 ))))));
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return m_dim.N7 ; }
/* Cardinality of the domain index space */
KOKKOS_INLINE_FUNCTION
constexpr size_type size() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
/* Span of the range space */
KOKKOS_INLINE_FUNCTION
constexpr size_type span() const
{ return m_stride * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_stride == m_dim.N0 ; }
/* Strides of dimensions */
KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return 1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return m_stride ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return m_stride * m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return m_stride * m_dim.N1 * m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return m_stride * m_dim.N1 * m_dim.N2 * m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return m_stride * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return m_stride * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return m_stride * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
s[0] = 1 ;
if ( 0 < dimension_type::rank ) { s[1] = m_stride ; }
if ( 1 < dimension_type::rank ) { s[2] = s[1] * m_dim.N1 ; }
if ( 2 < dimension_type::rank ) { s[3] = s[2] * m_dim.N2 ; }
if ( 3 < dimension_type::rank ) { s[4] = s[3] * m_dim.N3 ; }
if ( 4 < dimension_type::rank ) { s[5] = s[4] * m_dim.N4 ; }
if ( 5 < dimension_type::rank ) { s[6] = s[5] * m_dim.N5 ; }
if ( 6 < dimension_type::rank ) { s[7] = s[6] * m_dim.N6 ; }
if ( 7 < dimension_type::rank ) { s[8] = s[7] * m_dim.N7 ; }
}
//----------------------------------------
private:
template< unsigned TrivialScalarSize >
struct Padding {
enum { div = TrivialScalarSize == 0 ? 0 : Kokkos::Impl::MEMORY_ALIGNMENT / ( TrivialScalarSize ? TrivialScalarSize : 1 ) };
enum { mod = TrivialScalarSize == 0 ? 0 : Kokkos::Impl::MEMORY_ALIGNMENT % ( TrivialScalarSize ? TrivialScalarSize : 1 ) };
// If memory alignment is a multiple of the trivial scalar size then attempt to align.
enum { align = 0 != TrivialScalarSize && 0 == mod ? div : 0 };
enum { div_ok = div ? div : 1 }; // To valid modulo zero in constexpr
KOKKOS_INLINE_FUNCTION
static constexpr size_t stride( size_t const N )
{
return ( align && ( Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD * align < N ) && ( N % div_ok ) )
? N + align - ( N % div_ok ) : N ;
}
};
public:
ViewOffset() = default ;
ViewOffset( const ViewOffset & ) = default ;
ViewOffset & operator = ( const ViewOffset & ) = default ;
/* Enable padding for trivial scalar types with non-zero trivial scalar size */
template< unsigned TrivialScalarSize >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( std::integral_constant<unsigned,TrivialScalarSize> const & padding_type_size
, size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned aN7 )
: m_dim( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, m_stride( Padding<TrivialScalarSize>::stride( aN0 ) )
{}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs )
: m_dim( rhs.m_dim.N0 , rhs.m_dim.N1 , rhs.m_dim.N2 , rhs.m_dim.N3
, rhs.m_dim.N4 , rhs.m_dim.N5 , rhs.m_dim.N6 , rhs.m_dim.N7 )
, m_stride( rhs.stride_1() )
{
static_assert( int(DimRHS::rank) == int(dimension_type::rank) , "ViewOffset assignment requires equal rank" );
// Also requires equal static dimensions ...
}
//----------------------------------------
// Subview construction
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs
, const size_t aN0
, const size_t aN1
, const size_t aN2
, const size_t aN3
, const size_t aN4
, const size_t aN5
, const size_t aN6
, const size_t aN7
)
: m_dim( aN0
, ( 1 < DimRHS::rank && aN1 ? aN1 :
( 2 < DimRHS::rank && aN2 ? aN2 :
( 3 < DimRHS::rank && aN3 ? aN3 :
( 4 < DimRHS::rank && aN4 ? aN4 :
( 5 < DimRHS::rank && aN5 ? aN5 :
( 6 < DimRHS::rank && aN6 ? aN6 :
( 7 < DimRHS::rank && aN7 ? aN7 : 0 )))))))
, 0, 0, 0, 0, 0, 0 )
, m_stride( ( 1 < DimRHS::rank && aN1 ? rhs.stride_1() :
( 2 < DimRHS::rank && aN2 ? rhs.stride_2() :
( 3 < DimRHS::rank && aN3 ? rhs.stride_3() :
( 4 < DimRHS::rank && aN4 ? rhs.stride_4() :
( 5 < DimRHS::rank && aN5 ? rhs.stride_5() :
( 6 < DimRHS::rank && aN6 ? rhs.stride_6() :
( 7 < DimRHS::rank && aN7 ? rhs.stride_7() : 0 ))))))) )
{
// This subview must be 2 == rank and 2 == rank_dynamic
// due to only having stride #0.
// The source dimension #0 must be non-zero for stride-one leading dimension.
// At most subsequent dimension can be non-zero.
static_assert( ( 2 == dimension_type::rank ) &&
( 2 == dimension_type::rank_dynamic ) &&
( 2 <= DimRHS::rank )
, "ViewOffset subview construction requires compatible rank" );
}
};
//----------------------------------------------------------------------------
// LayoutRight AND ( 1 >= rank OR 0 == rank_dynamic ) : no padding / striding
template < class Dimension >
struct ViewOffset< Dimension , Kokkos::LayoutRight
, typename std::enable_if<( 1 >= Dimension::rank
||
0 == Dimension::rank_dynamic
)>::type >
{
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::true_type ;
+
typedef size_t size_type ;
typedef Dimension dimension_type ;
typedef Kokkos::LayoutRight array_layout ;
dimension_type m_dim ;
//----------------------------------------
// rank 1
template< typename I0 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 ) const { return i0 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{ return i1 + m_dim.N1 * i0 ; }
//rank 3
template < typename I0, typename I1, typename I2 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2 ) const
{
return i2 + m_dim.N2 * ( i1 + m_dim.N1 * ( i0 ));
}
//rank 4
template < typename I0, typename I1, typename I2, typename I3 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3 ) const
{
return i3 + m_dim.N3 * (
i2 + m_dim.N2 * (
i1 + m_dim.N1 * ( i0 )));
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
, typename I4 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4 ) const
{
return i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * (
i1 + m_dim.N1 * ( i0 ))));
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5 ) const
{
return i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * (
i1 + m_dim.N1 * ( i0 )))));
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6 ) const
{
return i6 + m_dim.N6 * (
i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * (
i1 + m_dim.N1 * ( i0 ))))));
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6, typename I7 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6, I7 const & i7 ) const
{
return i7 + m_dim.N7 * (
i6 + m_dim.N6 * (
i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * (
i1 + m_dim.N1 * ( i0 )))))));
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return m_dim.N7 ; }
/* Cardinality of the domain index space */
KOKKOS_INLINE_FUNCTION
constexpr size_type size() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
/* Span of the range space */
KOKKOS_INLINE_FUNCTION
constexpr size_type span() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return true ; }
/* Strides of dimensions */
KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return 1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return m_dim.N7 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return m_dim.N7 * m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 * m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 * m_dim.N2 * m_dim.N1 ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
size_type n = 1 ;
if ( 7 < dimension_type::rank ) { s[7] = n ; n *= m_dim.N7 ; }
if ( 6 < dimension_type::rank ) { s[6] = n ; n *= m_dim.N6 ; }
if ( 5 < dimension_type::rank ) { s[5] = n ; n *= m_dim.N5 ; }
if ( 4 < dimension_type::rank ) { s[4] = n ; n *= m_dim.N4 ; }
if ( 3 < dimension_type::rank ) { s[3] = n ; n *= m_dim.N3 ; }
if ( 2 < dimension_type::rank ) { s[2] = n ; n *= m_dim.N2 ; }
if ( 1 < dimension_type::rank ) { s[1] = n ; n *= m_dim.N1 ; }
if ( 0 < dimension_type::rank ) { s[0] = n ; }
s[dimension_type::rank] = n * m_dim.N0 ;
}
//----------------------------------------
ViewOffset() = default ;
ViewOffset( const ViewOffset & ) = default ;
ViewOffset & operator = ( const ViewOffset & ) = default ;
template< unsigned TrivialScalarSize >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( std::integral_constant<unsigned,TrivialScalarSize> const &
, size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned aN7 )
: m_dim( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
{}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > & rhs )
: m_dim( rhs.m_dim.N0 , rhs.m_dim.N1 , rhs.m_dim.N2 , rhs.m_dim.N3
, rhs.m_dim.N4 , rhs.m_dim.N5 , rhs.m_dim.N6 , rhs.m_dim.N7 )
{
static_assert( int(DimRHS::rank) == int(dimension_type::rank) , "ViewOffset assignment requires equal rank" );
// Also requires equal static dimensions ...
}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs )
: m_dim( rhs.m_dim.N0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( DimRHS::rank == 1 && dimension_type::rank == 1 && dimension_type::rank_dynamic == 1
, "ViewOffset LayoutRight and LayoutLeft are only compatible when rank == 1" );
}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutStride , void > & rhs )
: m_dim( rhs.m_dim.N0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( DimRHS::rank == 1 && dimension_type::rank == 1 && dimension_type::rank_dynamic == 1
, "ViewOffset LayoutLeft and LayoutStride are only compatible when rank == 1" );
if ( rhs.m_stride.S0 != 1 ) {
Kokkos::abort("Kokkos::Experimental::ViewOffset assignment of LayoutRight from LayoutStride requires stride == 1" );
}
}
//----------------------------------------
// Subview construction
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > & rhs
, const size_t n0
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
, const size_t
)
: m_dim( n0, 0, 0, 0, 0, 0, 0, 0 )
{
static_assert( ( 0 == dimension_type::rank ) ||
( 1 == dimension_type::rank && 1 == dimension_type::rank_dynamic && 1 <= DimRHS::rank )
, "ViewOffset subview construction requires compatible rank" );
}
};
//----------------------------------------------------------------------------
// LayoutRight AND ( 1 < rank AND 0 < rank_dynamic ) : has padding / striding
template < class Dimension >
struct ViewOffset< Dimension , Kokkos::LayoutRight
, typename std::enable_if<( 1 < Dimension::rank
&&
0 < Dimension::rank_dynamic
)>::type >
{
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::true_type ;
+
typedef size_t size_type ;
typedef Dimension dimension_type ;
typedef Kokkos::LayoutRight array_layout ;
dimension_type m_dim ;
size_type m_stride ;
//----------------------------------------
// rank 1
template< typename I0 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 ) const { return i0 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{ return i1 + i0 * m_stride ; }
//rank 3
template < typename I0, typename I1, typename I2 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2 ) const
{ return i2 + m_dim.N2 * ( i1 ) + i0 * m_stride ; }
//rank 4
template < typename I0, typename I1, typename I2, typename I3 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3 ) const
{
return i3 + m_dim.N3 * (
i2 + m_dim.N2 * ( i1 )) +
i0 * m_stride ;
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
, typename I4 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4 ) const
{
return i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * ( i1 ))) +
i0 * m_stride ;
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5 ) const
{
return i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * ( i1 )))) +
i0 * m_stride ;
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6 ) const
{
return i6 + m_dim.N6 * (
i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * ( i1 ))))) +
i0 * m_stride ;
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6, typename I7 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6, I7 const & i7 ) const
{
return i7 + m_dim.N7 * (
i6 + m_dim.N6 * (
i5 + m_dim.N5 * (
i4 + m_dim.N4 * (
i3 + m_dim.N3 * (
i2 + m_dim.N2 * ( i1 )))))) +
i0 * m_stride ;
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return m_dim.N7 ; }
/* Cardinality of the domain index space */
KOKKOS_INLINE_FUNCTION
constexpr size_type size() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
/* Span of the range space */
KOKKOS_INLINE_FUNCTION
constexpr size_type span() const
{ return m_dim.N0 * m_stride ; }
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const
{ return m_stride == m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 * m_dim.N2 * m_dim.N1 ; }
/* Strides of dimensions */
KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return 1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return m_dim.N7 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return m_dim.N7 * m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return m_dim.N7 * m_dim.N6 * m_dim.N5 * m_dim.N4 * m_dim.N3 * m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return m_stride ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
size_type n = 1 ;
if ( 7 < dimension_type::rank ) { s[7] = n ; n *= m_dim.N7 ; }
if ( 6 < dimension_type::rank ) { s[6] = n ; n *= m_dim.N6 ; }
if ( 5 < dimension_type::rank ) { s[5] = n ; n *= m_dim.N5 ; }
if ( 4 < dimension_type::rank ) { s[4] = n ; n *= m_dim.N4 ; }
if ( 3 < dimension_type::rank ) { s[3] = n ; n *= m_dim.N3 ; }
if ( 2 < dimension_type::rank ) { s[2] = n ; n *= m_dim.N2 ; }
if ( 1 < dimension_type::rank ) { s[1] = n ; }
if ( 0 < dimension_type::rank ) { s[0] = m_stride ; }
s[dimension_type::rank] = m_stride * m_dim.N0 ;
}
//----------------------------------------
private:
template< unsigned TrivialScalarSize >
struct Padding {
enum { div = TrivialScalarSize == 0 ? 0 : Kokkos::Impl::MEMORY_ALIGNMENT / ( TrivialScalarSize ? TrivialScalarSize : 1 ) };
enum { mod = TrivialScalarSize == 0 ? 0 : Kokkos::Impl::MEMORY_ALIGNMENT % ( TrivialScalarSize ? TrivialScalarSize : 1 ) };
// If memory alignment is a multiple of the trivial scalar size then attempt to align.
enum { align = 0 != TrivialScalarSize && 0 == mod ? div : 0 };
enum { div_ok = div ? div : 1 }; // To valid modulo zero in constexpr
KOKKOS_INLINE_FUNCTION
static constexpr size_t stride( size_t const N )
{
return ( align && ( Kokkos::Impl::MEMORY_ALIGNMENT_THRESHOLD * align < N ) && ( N % div_ok ) )
? N + align - ( N % div_ok ) : N ;
}
};
public:
ViewOffset() = default ;
ViewOffset( const ViewOffset & ) = default ;
ViewOffset & operator = ( const ViewOffset & ) = default ;
/* Enable padding for trivial scalar types with non-zero trivial scalar size. */
template< unsigned TrivialScalarSize >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( std::integral_constant<unsigned,TrivialScalarSize> const & padding_type_size
, size_t aN0 , unsigned aN1 , unsigned aN2 , unsigned aN3
, unsigned aN4 , unsigned aN5 , unsigned aN6 , unsigned aN7 )
: m_dim( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, m_stride( Padding<TrivialScalarSize>::
stride( /* 2 <= rank */
m_dim.N1 * ( dimension_type::rank == 2 ? 1 :
m_dim.N2 * ( dimension_type::rank == 3 ? 1 :
m_dim.N3 * ( dimension_type::rank == 4 ? 1 :
m_dim.N4 * ( dimension_type::rank == 5 ? 1 :
m_dim.N5 * ( dimension_type::rank == 6 ? 1 :
m_dim.N6 * ( dimension_type::rank == 7 ? 1 : m_dim.N7 )))))) ))
{}
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutLeft , void > & rhs )
: m_dim( rhs.m_dim.N0 , rhs.m_dim.N1 , rhs.m_dim.N2 , rhs.m_dim.N3
, rhs.m_dim.N4 , rhs.m_dim.N5 , rhs.m_dim.N6 , rhs.m_dim.N7 )
, m_stride( rhs.stride_0() )
{
static_assert( int(DimRHS::rank) == int(dimension_type::rank) , "ViewOffset assignment requires equal rank" );
// Also requires equal static dimensions ...
}
//----------------------------------------
// Subview construction
// Last dimension must be non-zero
template< class DimRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , Kokkos::LayoutRight , void > & rhs
, const size_t aN0
, const size_t aN1
, const size_t aN2
, const size_t aN3
, const size_t aN4
, const size_t aN5
, const size_t aN6
, const size_t aN7
)
: m_dim( // N0 == First non-zero dimension before the last dimension.
( 1 < DimRHS::rank && aN0 ? aN0 :
( 2 < DimRHS::rank && aN1 ? aN1 :
( 3 < DimRHS::rank && aN2 ? aN2 :
( 4 < DimRHS::rank && aN3 ? aN3 :
( 5 < DimRHS::rank && aN4 ? aN4 :
( 6 < DimRHS::rank && aN5 ? aN5 :
( 7 < DimRHS::rank && aN6 ? aN6 : 0 )))))))
, // N1 == Last dimension.
( 2 == DimRHS::rank ? aN1 :
( 3 == DimRHS::rank ? aN2 :
( 4 == DimRHS::rank ? aN3 :
( 5 == DimRHS::rank ? aN4 :
( 6 == DimRHS::rank ? aN5 :
( 7 == DimRHS::rank ? aN6 : aN7 ))))))
, 0, 0, 0, 0, 0, 0 )
, m_stride( ( 1 < DimRHS::rank && aN0 ? rhs.stride_0() :
( 2 < DimRHS::rank && aN1 ? rhs.stride_1() :
( 3 < DimRHS::rank && aN2 ? rhs.stride_2() :
( 4 < DimRHS::rank && aN3 ? rhs.stride_3() :
( 5 < DimRHS::rank && aN4 ? rhs.stride_4() :
( 6 < DimRHS::rank && aN5 ? rhs.stride_5() :
( 7 < DimRHS::rank && aN6 ? rhs.stride_6() : 0 ))))))) )
{
// This subview must be 2 == rank and 2 == rank_dynamic
// due to only having stride #0.
// The source dimension #0 must be non-zero for stride-one leading dimension.
// At most subsequent dimension can be non-zero.
static_assert( ( 2 == dimension_type::rank ) &&
( 2 == dimension_type::rank_dynamic ) &&
( 2 <= DimRHS::rank )
, "ViewOffset subview construction requires compatible rank" );
}
};
//----------------------------------------------------------------------------
/* Strided array layout only makes sense for 0 < rank */
template< unsigned Rank >
struct ViewStride ;
template<>
struct ViewStride<1> {
size_t S0 ;
enum { S1 = 0 , S2 = 0 , S3 = 0 , S4 = 0 , S5 = 0 , S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t , size_t , size_t
, size_t , size_t , size_t , size_t )
: S0( aS0 )
{}
};
template<>
struct ViewStride<2> {
size_t S0 , S1 ;
enum { S2 = 0 , S3 = 0 , S4 = 0 , S5 = 0 , S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t , size_t
, size_t , size_t , size_t , size_t )
: S0( aS0 ) , S1( aS1 )
{}
};
template<>
struct ViewStride<3> {
size_t S0 , S1 , S2 ;
enum { S3 = 0 , S4 = 0 , S5 = 0 , S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t
, size_t , size_t , size_t , size_t )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 )
{}
};
template<>
struct ViewStride<4> {
size_t S0 , S1 , S2 , S3 ;
enum { S4 = 0 , S5 = 0 , S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t aS3
, size_t , size_t , size_t , size_t )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 ) , S3( aS3 )
{}
};
template<>
struct ViewStride<5> {
size_t S0 , S1 , S2 , S3 , S4 ;
enum { S5 = 0 , S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t aS3
, size_t aS4 , size_t , size_t , size_t )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 ) , S3( aS3 )
, S4( aS4 )
{}
};
template<>
struct ViewStride<6> {
size_t S0 , S1 , S2 , S3 , S4 , S5 ;
enum { S6 = 0 , S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t aS3
, size_t aS4 , size_t aS5 , size_t , size_t )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 ) , S3( aS3 )
, S4( aS4 ) , S5( aS5 )
{}
};
template<>
struct ViewStride<7> {
size_t S0 , S1 , S2 , S3 , S4 , S5 , S6 ;
enum { S7 = 0 };
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t aS3
, size_t aS4 , size_t aS5 , size_t aS6 , size_t )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 ) , S3( aS3 )
, S4( aS4 ) , S5( aS5 ) , S6( aS6 )
{}
};
template<>
struct ViewStride<8> {
size_t S0 , S1 , S2 , S3 , S4 , S5 , S6 , S7 ;
ViewStride() = default ;
ViewStride( const ViewStride & ) = default ;
ViewStride & operator = ( const ViewStride & ) = default ;
KOKKOS_INLINE_FUNCTION
constexpr ViewStride( size_t aS0 , size_t aS1 , size_t aS2 , size_t aS3
, size_t aS4 , size_t aS5 , size_t aS6 , size_t aS7 )
: S0( aS0 ) , S1( aS1 ) , S2( aS2 ) , S3( aS3 )
, S4( aS4 ) , S5( aS5 ) , S6( aS6 ) , S7( aS7 )
{}
};
template < class Dimension >
struct ViewOffset< Dimension , Kokkos::LayoutStride
, typename std::enable_if<( 0 < Dimension::rank )>::type >
{
private:
typedef ViewStride< Dimension::rank > stride_type ;
public:
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::true_type ;
+
typedef size_t size_type ;
typedef Dimension dimension_type ;
typedef Kokkos::LayoutStride array_layout ;
dimension_type m_dim ;
stride_type m_stride ;
//----------------------------------------
// rank 1
template< typename I0 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 ) const
{
return i0 * m_stride.S0 ;
}
// rank 2
template < typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 ;
}
//rank 3
template < typename I0, typename I1, typename I2 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 ;
}
//rank 4
template < typename I0, typename I1, typename I2, typename I3 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 +
i3 * m_stride.S3 ;
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
, typename I4 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 +
i3 * m_stride.S3 +
i4 * m_stride.S4 ;
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 +
i3 * m_stride.S3 +
i4 * m_stride.S4 +
i5 * m_stride.S5 ;
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 +
i3 * m_stride.S3 +
i4 * m_stride.S4 +
i5 * m_stride.S5 +
i6 * m_stride.S6 ;
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
, typename I4, typename I5, typename I6, typename I7 >
KOKKOS_INLINE_FUNCTION constexpr
size_type operator()( I0 const & i0, I1 const & i1, I2 const & i2, I3 const & i3
, I4 const & i4, I5 const & i5, I6 const & i6, I7 const & i7 ) const
{
return i0 * m_stride.S0 +
i1 * m_stride.S1 +
i2 * m_stride.S2 +
i3 * m_stride.S3 +
i4 * m_stride.S4 +
i5 * m_stride.S5 +
i6 * m_stride.S6 +
i7 * m_stride.S7 ;
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return m_dim.N2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return m_dim.N3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return m_dim.N4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return m_dim.N5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return m_dim.N6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return m_dim.N7 ; }
/* Cardinality of the domain index space */
KOKKOS_INLINE_FUNCTION
constexpr size_type size() const
{ return m_dim.N0 * m_dim.N1 * m_dim.N2 * m_dim.N3 * m_dim.N4 * m_dim.N5 * m_dim.N6 * m_dim.N7 ; }
private:
KOKKOS_INLINE_FUNCTION
static constexpr size_type Max( size_type lhs , size_type rhs )
{ return lhs < rhs ? rhs : lhs ; }
public:
/* Span of the range space, largest stride * dimension */
KOKKOS_INLINE_FUNCTION
constexpr size_type span() const
{
return Max( m_dim.N0 * m_stride.S0 ,
Max( m_dim.N1 * m_stride.S1 ,
Max( m_dim.N2 * m_stride.S2 ,
Max( m_dim.N3 * m_stride.S3 ,
Max( m_dim.N4 * m_stride.S4 ,
Max( m_dim.N5 * m_stride.S5 ,
Max( m_dim.N6 * m_stride.S6 ,
m_dim.N7 * m_stride.S7 )))))));
}
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return span() == size(); }
/* Strides of dimensions */
KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return m_stride.S0 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return m_stride.S1 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return m_stride.S2 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return m_stride.S3 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return m_stride.S4 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return m_stride.S5 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return m_stride.S6 ; }
KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return m_stride.S7 ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
if ( 0 < dimension_type::rank ) { s[0] = m_stride.S0 ; }
if ( 1 < dimension_type::rank ) { s[1] = m_stride.S1 ; }
if ( 2 < dimension_type::rank ) { s[2] = m_stride.S2 ; }
if ( 3 < dimension_type::rank ) { s[3] = m_stride.S3 ; }
if ( 4 < dimension_type::rank ) { s[4] = m_stride.S4 ; }
if ( 5 < dimension_type::rank ) { s[5] = m_stride.S5 ; }
if ( 6 < dimension_type::rank ) { s[6] = m_stride.S6 ; }
if ( 7 < dimension_type::rank ) { s[7] = m_stride.S7 ; }
s[dimension_type::rank] = span();
}
//----------------------------------------
ViewOffset() = default ;
ViewOffset( const ViewOffset & ) = default ;
ViewOffset & operator = ( const ViewOffset & ) = default ;
KOKKOS_INLINE_FUNCTION
ViewOffset( const Kokkos::LayoutStride & rhs )
: m_dim( rhs.dimension[0] , rhs.dimension[1] , rhs.dimension[2] , rhs.dimension[3]
, rhs.dimension[4] , rhs.dimension[5] , rhs.dimension[6] , rhs.dimension[7] )
, m_stride( rhs.stride[0] , rhs.stride[1] , rhs.stride[2] , rhs.stride[3]
, rhs.stride[4] , rhs.stride[5] , rhs.stride[6] , rhs.stride[7] )
{}
template< class DimRHS , class LayoutRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , LayoutRHS , void > & rhs )
: m_dim( rhs.m_dim.N0 , rhs.m_dim.N1 , rhs.m_dim.N2 , rhs.m_dim.N3
, rhs.m_dim.N4 , rhs.m_dim.N5 , rhs.m_dim.N6 , rhs.m_dim.N7 )
, m_stride( rhs.stride_0() , rhs.stride_1() , rhs.stride_2() , rhs.stride_3()
, rhs.stride_4() , rhs.stride_5() , rhs.stride_6() , rhs.stride_7() )
{
static_assert( int(DimRHS::rank) == int(dimension_type::rank) , "ViewOffset assignment requires equal rank" );
// Also requires equal static dimensions ...
}
//----------------------------------------
// Subview construction
private:
KOKKOS_INLINE_FUNCTION
static constexpr unsigned
count_non_zero( const size_t aN0 = 0
, const size_t aN1 = 0
, const size_t aN2 = 0
, const size_t aN3 = 0
, const size_t aN4 = 0
, const size_t aN5 = 0
, const size_t aN6 = 0
, const size_t aN7 = 0
)
{
return ( aN0 ? 1 : 0 ) +
( aN1 ? 1 : 0 ) +
( aN2 ? 1 : 0 ) +
( aN3 ? 1 : 0 ) +
( aN4 ? 1 : 0 ) +
( aN5 ? 1 : 0 ) +
( aN6 ? 1 : 0 ) +
( aN7 ? 1 : 0 );
}
template< unsigned Rank , unsigned I >
KOKKOS_INLINE_FUNCTION
static constexpr size_t
get_non_zero( const size_t aN0
, const size_t aN1
, const size_t aN2
, const size_t aN3
, const size_t aN4
, const size_t aN5
, const size_t aN6
, const size_t aN7
)
{
return ( 0 < Rank && I < 1 && aN0 ? aN0 :
( 1 < Rank && I < 2 && I == count_non_zero(aN0) && aN1 ? aN1 :
( 2 < Rank && I < 3 && I == count_non_zero(aN0,aN1) && aN2 ? aN2 :
( 3 < Rank && I < 4 && I == count_non_zero(aN0,aN1,aN2) && aN3 ? aN3 :
( 4 < Rank && I < 5 && I == count_non_zero(aN0,aN1,aN2,aN3) && aN4 ? aN4 :
( 5 < Rank && I < 6 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4) && aN5 ? aN5 :
( 6 < Rank && I < 7 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4,aN5) && aN6 ? aN6 :
( 7 < Rank && I < 8 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4,aN5,aN6) && aN7 ? aN7 : 0 ))))))));
}
template< unsigned Rank , unsigned I , class DimRHS , class LayoutRHS >
KOKKOS_INLINE_FUNCTION
static constexpr size_t
get_non_zero( const size_t aN0 , const size_t aN1 , const size_t aN2 , const size_t aN3
, const size_t aN4 , const size_t aN5 , const size_t aN6 , const size_t aN7
, const ViewOffset< DimRHS , LayoutRHS , void > & rhs )
{
return ( 0 < Rank && I < 1 && aN0 ? rhs.stride_0() :
( 1 < Rank && I < 2 && I == count_non_zero(aN0) && aN1 ? rhs.stride_1() :
( 2 < Rank && I < 3 && I == count_non_zero(aN0,aN1) && aN2 ? rhs.stride_2() :
( 3 < Rank && I < 4 && I == count_non_zero(aN0,aN1,aN2) && aN3 ? rhs.stride_3() :
( 4 < Rank && I < 5 && I == count_non_zero(aN0,aN1,aN2,aN3) && aN4 ? rhs.stride_4() :
( 5 < Rank && I < 6 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4) && aN5 ? rhs.stride_5() :
( 6 < Rank && I < 7 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4,aN5) && aN6 ? rhs.stride_6() :
( 7 < Rank && I < 8 && I == count_non_zero(aN0,aN1,aN2,aN3,aN4,aN5,aN6) && aN7 ? rhs.stride_7() : 0 ))))))));
}
public:
template< class DimRHS , class LayoutRHS >
KOKKOS_INLINE_FUNCTION
constexpr ViewOffset( const ViewOffset< DimRHS , LayoutRHS , void > & rhs
, const size_t aN0
, const size_t aN1
, const size_t aN2
, const size_t aN3
, const size_t aN4
, const size_t aN5
, const size_t aN6
, const size_t aN7
)
// Contract the non-zero dimensions
: m_dim( ViewOffset::template get_non_zero<DimRHS::rank,0>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,1>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,2>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,3>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,4>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,5>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,6>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
, ViewOffset::template get_non_zero<DimRHS::rank,7>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7 )
)
, m_stride( ViewOffset::template get_non_zero<DimRHS::rank,0>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,1>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,2>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,3>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,4>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,5>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,6>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
, ViewOffset::template get_non_zero<DimRHS::rank,7>( aN0, aN1, aN2, aN3, aN4, aN5, aN6, aN7, rhs )
)
{
}
//----------------------------------------
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
-struct ALL_t {};
+struct ALL_t {
+ KOKKOS_INLINE_FUNCTION
+ constexpr const ALL_t & operator()() const { return *this ; }
+};
template< class T >
struct ViewOffsetRange {
static_assert( std::is_integral<T>::value , "Non-range must be an integral type" );
enum { is_range = false };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const , T const & ) { return 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( T const & i ) { return size_t(i) ; }
};
template<>
struct ViewOffsetRange<void> {
enum { is_range = false };
};
template<>
struct ViewOffsetRange< Kokkos::Experimental::Impl::ALL_t > {
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , Experimental::Impl::ALL_t const & ) { return n ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( Experimental::Impl::ALL_t const & ) { return 0 ; }
};
template< typename iType >
struct ViewOffsetRange< std::pair<iType,iType> > {
static_assert( std::is_integral<iType>::value , "Range bounds must be an integral type" );
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , std::pair<iType,iType> const & r )
{ return ( size_t(r.first) < size_t(r.second) && size_t(r.second) <= n ) ? size_t(r.second) - size_t(r.first) : 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( std::pair<iType,iType> const & r ) { return size_t(r.first) ; }
};
template< typename iType >
struct ViewOffsetRange< Kokkos::pair<iType,iType> > {
static_assert( std::is_integral<iType>::value , "Range bounds must be an integral type" );
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , Kokkos::pair<iType,iType> const & r )
{ return ( size_t(r.first) < size_t(r.second) && size_t(r.second) <= n ) ? size_t(r.second) - size_t(r.first) : 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( Kokkos::pair<iType,iType> const & r ) { return size_t(r.first) ; }
};
template< typename iType >
struct ViewOffsetRange< std::initializer_list< iType > > {
static_assert( std::is_integral<iType>::value , "Range bounds must be an integral type" );
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , std::initializer_list< iType > const & r )
{
return ( size_t(r.begin()[0]) < size_t(r.begin()[1]) && size_t(r.begin()[1]) <= n )
? size_t(r.begin()[1]) - size_t(r.begin()[0]) : 0 ;
}
KOKKOS_INLINE_FUNCTION static
size_t begin( std::initializer_list< iType > const & r ) { return size_t(r.begin()[0]) ; }
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
/** \brief ViewDataHandle provides the type of the 'data handle' which the view
* uses to access data with the [] operator. It also provides
* an allocate function and a function to extract a raw ptr from the
* data handle. ViewDataHandle also defines an enum ReferenceAble which
* specifies whether references/pointers to elements can be taken and a
* 'return_type' which is what the view operators will give back.
* Specialisation of this object allows three things depending
* on ViewTraits and compiler options:
* (i) Use special allocator (e.g. huge pages/small pages and pinned memory)
* (ii) Use special data handle type (e.g. add Cuda Texture Object)
* (iii) Use special access intrinsics (e.g. texture fetch and non-caching loads)
*/
template< class Traits , class Enable = void >
struct ViewDataHandle {
typedef typename Traits::value_type value_type ;
typedef typename Traits::value_type * handle_type ;
typedef typename Traits::value_type & return_type ;
typedef Kokkos::Experimental::Impl::SharedAllocationTracker track_type ;
KOKKOS_INLINE_FUNCTION
static handle_type assign( value_type * arg_data_ptr
, track_type const & /*arg_tracker*/ )
{
return handle_type( arg_data_ptr );
}
};
template< class Traits >
struct ViewDataHandle< Traits ,
typename std::enable_if<( std::is_same< typename Traits::non_const_value_type
, typename Traits::value_type >::value
&&
+ std::is_same< typename Traits::specialize , void >::value
+ &&
Traits::memory_traits::Atomic
)>::type >
{
typedef typename Traits::value_type value_type ;
typedef typename Kokkos::Impl::AtomicViewDataHandle< Traits > handle_type ;
typedef typename Kokkos::Impl::AtomicDataElement< Traits > return_type ;
typedef Kokkos::Experimental::Impl::SharedAllocationTracker track_type ;
KOKKOS_INLINE_FUNCTION
static handle_type assign( value_type * arg_data_ptr
, track_type const & /*arg_tracker*/ )
{
return handle_type( arg_data_ptr );
}
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template< class Traits
, bool R0 = false
, bool R1 = false
, bool R2 = false
, bool R3 = false
, bool R4 = false
, bool R5 = false
, bool R6 = false
, bool R7 = false
, typename Enable = void >
struct SubviewMapping ;
/** \brief View mapping for non-specialized data type and standard layout */
template< class Traits >
class ViewMapping< Traits , void ,
typename std::enable_if<(
std::is_same< typename Traits::specialize , void >::value
&&
- (
- std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value ||
- std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value ||
- std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value
- )
+ ViewOffset< typename Traits::dimension
+ , typename Traits::array_layout
+ , void >::is_mapping_plugin::value
)>::type >
{
private:
template< class , class , typename > friend class ViewMapping ;
template< class , bool , bool , bool , bool , bool , bool , bool , bool , class > friend struct SubviewMapping ;
template< class , class , class , class > friend class Kokkos::Experimental::View ;
typedef ViewOffset< typename Traits::dimension
, typename Traits::array_layout
, void
> offset_type ;
typedef typename ViewDataHandle< Traits >::handle_type handle_type ;
handle_type m_handle ;
offset_type m_offset ;
+ KOKKOS_INLINE_FUNCTION
+ ViewMapping( const handle_type & arg_handle , const offset_type & arg_offset )
+ : m_handle( arg_handle )
+ , m_offset( arg_offset )
+ {}
+
public:
//----------------------------------------
// Domain dimensions
enum { Rank = Traits::dimension::rank };
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_0() const { return m_offset.dimension_0(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_1() const { return m_offset.dimension_1(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_2() const { return m_offset.dimension_2(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_3() const { return m_offset.dimension_3(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_4() const { return m_offset.dimension_4(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_5() const { return m_offset.dimension_5(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_6() const { return m_offset.dimension_6(); }
KOKKOS_INLINE_FUNCTION constexpr size_t dimension_7() const { return m_offset.dimension_7(); }
+ // Is a regular layout with uniform striding for each index.
+ using is_regular = typename offset_type::is_regular ;
+
KOKKOS_INLINE_FUNCTION constexpr size_t stride_0() const { return m_offset.stride_0(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_1() const { return m_offset.stride_1(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_2() const { return m_offset.stride_2(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_3() const { return m_offset.stride_3(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_4() const { return m_offset.stride_4(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_5() const { return m_offset.stride_5(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_6() const { return m_offset.stride_6(); }
KOKKOS_INLINE_FUNCTION constexpr size_t stride_7() const { return m_offset.stride_7(); }
- /*
- KOKKOS_INLINE_FUNCTION
- Kokkos::Array<size_t,Rank> dimension() const
- { return Kokkos::Experimental::Impl::dimension( m_offset.m_dim ); }
- */
-
//----------------------------------------
// Range span
/** \brief Span of the mapped range */
KOKKOS_INLINE_FUNCTION constexpr size_t span() const { return m_offset.span(); }
/** \brief Is the mapped range span contiguous */
KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const { return m_offset.span_is_contiguous(); }
typedef typename ViewDataHandle< Traits >::return_type reference_type ;
/** \brief If data references are lvalue_reference than can query pointer to memory */
KOKKOS_INLINE_FUNCTION constexpr typename Traits::value_type * data() const
{
typedef typename Traits::value_type * ptr_type ;
return std::is_lvalue_reference< reference_type >::value
? (ptr_type) m_handle
: (ptr_type) 0 ;
}
//----------------------------------------
// The View class performs all rank and bounds checking before
// calling these element reference methods.
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference() const { return m_handle[0]; }
template< typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
- reference_type reference( const I0 & i0 ) const { return m_handle[i0]; }
+ typename
+ std::enable_if< std::is_integral<I0>::value &&
+ ! std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value
+ , reference_type >::type
+ reference( const I0 & i0 ) const { return m_handle[i0]; }
+
+ template< typename I0 >
+ KOKKOS_FORCEINLINE_FUNCTION
+ typename
+ std::enable_if< std::is_integral<I0>::value &&
+ std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value
+ , reference_type >::type
+ reference( const I0 & i0 ) const { return m_handle[ m_offset(i0) ]; }
template< typename I0 , typename I1 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 ) const
{ return m_handle[ m_offset(i0,i1) ]; }
template< typename I0 , typename I1 , typename I2 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 ) const
{ return m_handle[ m_offset(i0,i1,i2) ]; }
template< typename I0 , typename I1 , typename I2 , typename I3 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3 ) const
{ return m_handle[ m_offset(i0,i1,i2,i3) ]; }
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 ) const
{ return m_handle[ m_offset(i0,i1,i2,i3,i4) ]; }
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 ) const
{ return m_handle[ m_offset(i0,i1,i2,i3,i4,i5) ]; }
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 , typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 , const I6 & i6 ) const
{ return m_handle[ m_offset(i0,i1,i2,i3,i4,i5,i6) ]; }
template< typename I0 , typename I1 , typename I2 , typename I3
, typename I4 , typename I5 , typename I6 , typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
reference_type reference( const I0 & i0 , const I1 & i1 , const I2 & i2 , const I3 & i3
, const I4 & i4 , const I5 & i5 , const I6 & i6 , const I7 & i7 ) const
{ return m_handle[ m_offset(i0,i1,i2,i3,i4,i5,i6,i7) ]; }
//----------------------------------------
private:
enum { MemorySpanMask = 8 - 1 /* Force alignment on 8 byte boundary */ };
enum { MemorySpanSize = sizeof(typename Traits::value_type) };
public:
/** \brief Span, in bytes, of the referenced memory */
KOKKOS_INLINE_FUNCTION constexpr size_t memory_span() const
{
return ( m_offset.span() * sizeof(typename Traits::value_type) + MemorySpanMask ) & ~size_t(MemorySpanMask);
}
/** \brief Span, in bytes, of the required memory */
template< bool AllowPadding >
KOKKOS_INLINE_FUNCTION
static constexpr size_t memory_span( const std::integral_constant<bool,AllowPadding> &
, const size_t N0 , const size_t N1 , const size_t N2 , const size_t N3
, const size_t N4 , const size_t N5 , const size_t N6 , const size_t N7 )
{
typedef std::integral_constant< unsigned , AllowPadding ? MemorySpanSize : 0 > padding ;
return ( offset_type( padding(), N0, N1, N2, N3, N4, N5, N6, N7 ).span() * MemorySpanSize + MemorySpanMask ) & ~size_t(MemorySpanMask);
}
/** \brief Span, in bytes, of the required memory */
template< bool AllowPadding >
KOKKOS_INLINE_FUNCTION
static constexpr size_t memory_span( const std::integral_constant<bool,AllowPadding> &
, const typename Traits::array_layout & layout )
{
return ( offset_type( layout ).span() * MemorySpanSize + MemorySpanMask ) & ~size_t(MemorySpanMask);
}
//----------------------------------------
KOKKOS_INLINE_FUNCTION ~ViewMapping() {}
KOKKOS_INLINE_FUNCTION ViewMapping() : m_handle(), m_offset() {}
KOKKOS_INLINE_FUNCTION ViewMapping( const ViewMapping & rhs )
: m_handle( rhs.m_handle ), m_offset( rhs.m_offset ) {}
KOKKOS_INLINE_FUNCTION ViewMapping & operator = ( const ViewMapping & rhs )
{ m_handle = rhs.m_handle ; m_offset = rhs.m_offset ; return *this ; }
KOKKOS_INLINE_FUNCTION ViewMapping( ViewMapping && rhs )
: m_handle( rhs.m_handle ), m_offset( rhs.m_offset ) {}
KOKKOS_INLINE_FUNCTION ViewMapping & operator = ( ViewMapping && rhs )
{ m_handle = rhs.m_handle ; m_offset = rhs.m_offset ; return *this ; }
template< bool AllowPadding >
KOKKOS_INLINE_FUNCTION
ViewMapping( void * ptr
, const std::integral_constant<bool,AllowPadding> &
, const size_t N0 , const size_t N1 , const size_t N2 , const size_t N3
, const size_t N4 , const size_t N5 , const size_t N6 , const size_t N7 )
: m_handle( reinterpret_cast< handle_type >( ptr ) )
, m_offset( std::integral_constant< unsigned , AllowPadding ? sizeof(typename Traits::value_type) : 0 >()
, N0, N1, N2, N3, N4, N5, N6, N7 )
{}
template< bool AllowPadding >
KOKKOS_INLINE_FUNCTION
ViewMapping( void * ptr
, const std::integral_constant<bool,AllowPadding> &
, const typename Traits::array_layout & layout )
: m_handle( reinterpret_cast< handle_type >( ptr ) )
, m_offset( layout )
{}
//----------------------------------------
// If the View is to construct or destroy the elements.
struct FunctorTagConstructScalar {};
struct FunctorTagConstructNonScalar {};
struct FunctorTagDestructNonScalar {};
KOKKOS_FORCEINLINE_FUNCTION
void operator()( const FunctorTagConstructScalar & , const size_t i ) const
{ m_handle[i] = 0 ; }
KOKKOS_FORCEINLINE_FUNCTION
void operator()( const FunctorTagConstructNonScalar & , const size_t i ) const
{
typedef typename Traits::value_type value_type ;
new( & m_handle[i] ) value_type();
}
KOKKOS_FORCEINLINE_FUNCTION
void operator()( const FunctorTagDestructNonScalar & , const size_t i ) const
{
typedef typename Traits::value_type value_type ;
( & (m_handle[i]) )->~value_type();
}
template< class ExecSpace >
typename std::enable_if< Kokkos::Impl::is_execution_space<ExecSpace>::value &&
std::is_scalar< typename Traits::value_type >::value >::type
construct( const ExecSpace & space ) const
{
typedef Kokkos::RangePolicy< ExecSpace , FunctorTagConstructScalar , size_t > Policy ;
(void) Kokkos::Impl::ParallelFor< ViewMapping , Policy >( *this , Policy( 0 , m_offset.span() ) );
+ ExecSpace::fence();
}
template< class ExecSpace >
typename std::enable_if< Kokkos::Impl::is_execution_space<ExecSpace>::value &&
! std::is_scalar< typename Traits::value_type >::value >::type
construct( const ExecSpace & space ) const
{
typedef Kokkos::RangePolicy< ExecSpace , FunctorTagConstructNonScalar , size_t > Policy ;
(void) Kokkos::Impl::ParallelFor< ViewMapping , Policy >( *this , Policy( 0 , m_offset.span() ) );
+ ExecSpace::fence();
}
template< class ExecSpace >
typename std::enable_if< Kokkos::Impl::is_execution_space<ExecSpace>::value &&
std::is_scalar< typename Traits::value_type >::value >::type
destroy( const ExecSpace & ) const {}
template< class ExecSpace >
typename std::enable_if< Kokkos::Impl::is_execution_space<ExecSpace>::value &&
! std::is_scalar< typename Traits::value_type >::value >::type
destroy( const ExecSpace & space ) const
{
typedef Kokkos::RangePolicy< ExecSpace , FunctorTagDestructNonScalar , size_t > Policy ;
(void) Kokkos::Impl::ParallelFor< ViewMapping , Policy >( *this , Policy( 0 , m_offset.span() ) );
+ ExecSpace::fence();
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/** \brief Assign compatible default mappings */
template< class DstTraits , class SrcTraits >
class ViewMapping< DstTraits , SrcTraits ,
typename std::enable_if<(
std::is_same< typename DstTraits::memory_space , typename SrcTraits::memory_space >::value
&&
std::is_same< typename DstTraits::specialize , void >::value
&&
(
std::is_same< typename DstTraits::array_layout , Kokkos::LayoutLeft >::value ||
std::is_same< typename DstTraits::array_layout , Kokkos::LayoutRight >::value ||
std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value
)
&&
std::is_same< typename SrcTraits::specialize , void >::value
&&
(
std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutLeft >::value ||
std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutRight >::value ||
std::is_same< typename SrcTraits::array_layout , Kokkos::LayoutStride >::value
)
)>::type >
{
public:
enum { is_assignable = true };
typedef Kokkos::Experimental::Impl::SharedAllocationTracker TrackType ;
typedef ViewMapping< DstTraits , void , void > DstType ;
typedef ViewMapping< SrcTraits , void , void > SrcType ;
KOKKOS_INLINE_FUNCTION
static void assign( DstType & dst , const SrcType & src , const TrackType & src_track )
{
static_assert( std::is_same< typename DstTraits::value_type , typename SrcTraits::value_type >::value ||
std::is_same< typename DstTraits::value_type , typename SrcTraits::const_value_type >::value
, "View assignment must have same value type or const = non-const" );
static_assert( ViewDimensionAssignable< typename DstTraits::dimension , typename SrcTraits::dimension >::value
, "View assignment must have compatible dimensions" );
static_assert( std::is_same< typename DstTraits::array_layout , typename SrcTraits::array_layout >::value ||
std::is_same< typename DstTraits::array_layout , Kokkos::LayoutStride >::value ||
( DstTraits::dimension::rank == 0 ) ||
( DstTraits::dimension::rank == 1 && DstTraits::dimension::rank_dynamic == 1 )
, "View assignment must have compatible layout or have rank <= 1" );
typedef typename DstType::offset_type dst_offset_type ;
dst.m_offset = dst_offset_type( src.m_offset );
dst.m_handle = Kokkos::Experimental::Impl::ViewDataHandle< DstTraits >::assign( src.m_handle , src_track );
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/** \brief View mapping for non-specialized data type and standard layout */
template< class Traits , bool R0 , bool R1 , bool R2 , bool R3 , bool R4 , bool R5 , bool R6 , bool R7 >
struct SubviewMapping< Traits, R0, R1, R2, R3, R4, R5, R6, R7 ,
typename std::enable_if<(
std::is_same< typename Traits::specialize , void >::value
&&
(
std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value ||
std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value ||
std::is_same< typename Traits::array_layout , Kokkos::LayoutStride >::value
)
)>::type >
{
private:
// Subview's rank
enum { rank = unsigned(R0) + unsigned(R1) + unsigned(R2) + unsigned(R3)
+ unsigned(R4) + unsigned(R5) + unsigned(R6) + unsigned(R7) };
// Whether right-most rank is a range.
enum { R0_rev = 0 == Traits::rank ? false : (
1 == Traits::rank ? R0 : (
2 == Traits::rank ? R1 : (
3 == Traits::rank ? R2 : (
4 == Traits::rank ? R3 : (
5 == Traits::rank ? R4 : (
6 == Traits::rank ? R5 : (
7 == Traits::rank ? R6 : R7 ))))))) };
// Subview's layout
typedef typename std::conditional<
( /* Same array layout IF */
( rank == 0 ) /* output rank zero */
||
// OutputRank 1 or 2, InputLayout Left, Interval 0
// because single stride one or second index has a stride.
( rank <= 2 && R0 && std::is_same< typename Traits::array_layout , Kokkos::LayoutLeft >::value )
||
// OutputRank 1 or 2, InputLayout Right, Interval [InputRank-1]
// because single stride one or second index has a stride.
( rank <= 2 && R0_rev && std::is_same< typename Traits::array_layout , Kokkos::LayoutRight >::value )
), typename Traits::array_layout , Kokkos::LayoutStride
>::type array_layout ;
typedef typename Traits::value_type value_type ;
typedef typename std::conditional< rank == 0 , value_type ,
typename std::conditional< rank == 1 , value_type * ,
typename std::conditional< rank == 2 , value_type ** ,
typename std::conditional< rank == 3 , value_type *** ,
typename std::conditional< rank == 4 , value_type **** ,
typename std::conditional< rank == 5 , value_type ***** ,
typename std::conditional< rank == 6 , value_type ****** ,
typename std::conditional< rank == 7 , value_type ******* ,
value_type ********
>::type >::type >::type >::type >::type >::type >::type >::type
data_type ;
public:
typedef
Kokkos::Experimental::ViewTraits< data_type , array_layout
, typename Traits::device_type
, typename Traits::memory_traits > traits_type ;
typedef Kokkos::Experimental::View< data_type
, array_layout
, typename Traits::device_type
, typename Traits::memory_traits > type ;
template< class T0 , class T1 , class T2 , class T3
, class T4 , class T5 , class T6 , class T7 >
KOKKOS_INLINE_FUNCTION
static void assign( ViewMapping< traits_type , void , void > & dst
, ViewMapping< Traits , void , void > const & src
, T0 const & arg0
, T1 const & arg1
, T2 const & arg2
, T3 const & arg3
, T4 const & arg4
, T5 const & arg5
, T6 const & arg6
, T7 const & arg7
)
{
typedef ViewMapping< traits_type , void , void > DstType ;
typedef typename DstType::offset_type dst_offset_type ;
typedef typename DstType::handle_type dst_handle_type ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T0> V0 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T1> V1 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T2> V2 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T3> V3 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T4> V4 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T5> V5 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T6> V6 ;
typedef Kokkos::Experimental::Impl::ViewOffsetRange<T7> V7 ;
dst.m_offset = dst_offset_type
( src.m_offset
, V0::dimension( src.m_offset.dimension_0() , arg0 )
, V1::dimension( src.m_offset.dimension_1() , arg1 )
, V2::dimension( src.m_offset.dimension_2() , arg2 )
, V3::dimension( src.m_offset.dimension_3() , arg3 )
, V4::dimension( src.m_offset.dimension_4() , arg4 )
, V5::dimension( src.m_offset.dimension_5() , arg5 )
, V6::dimension( src.m_offset.dimension_6() , arg6 )
, V7::dimension( src.m_offset.dimension_7() , arg7 )
);
dst.m_handle = dst_handle_type( src.m_handle +
src.m_offset( V0::begin( arg0 )
, V1::begin( arg1 )
, V2::begin( arg2 )
, V3::begin( arg3 )
, V4::begin( arg4 )
, V5::begin( arg5 )
, V6::begin( arg6 )
, V7::begin( arg7 )
) );
}
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
template< class V
, bool R0 = false , bool R1 = false , bool R2 = false , bool R3 = false
, bool R4 = false , bool R5 = false , bool R6 = false , bool R7 = false >
struct SubviewType ;
template< class D , class A1, class A2, class A3
, bool R0 , bool R1 , bool R2 , bool R3
, bool R4 , bool R5 , bool R6 , bool R7 >
struct SubviewType< Kokkos::Experimental::View< D , A1, A2, A3 > , R0 , R1 , R2 , R3 , R4 , R5 , R6 , R7 >
{
private:
typedef Kokkos::Experimental::ViewTraits< D , A1 , A2 , A3 > traits ;
typedef Kokkos::Experimental::Impl::SubviewMapping< traits , R0 , R1 , R2 , R3 , R4 , R5 , R6 , R7 > mapping ;
public:
typedef typename mapping::type type ;
};
}}} // namespace Kokkos::Experimental::Impl
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Experimental {
namespace Impl {
class Error_view_scalar_reference_to_non_scalar_view ;
} /* namespace Impl */
} /* namespace Experimental */
} /* namespace Kokkos */
#if defined( KOKKOS_EXPRESSION_CHECK )
#define KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( SPACE , MAP , RANK , I0 , I1 , I2 , I3 , I4 , I5 , I6 , I7 ) \
Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \
Kokkos::Impl::ActiveExecutionMemorySpace , SPACE >::verify( MAP.data() ); \
/* array bounds checking */
#else
#define KOKKOS_ASSERT_VIEW_MAPPING_ACCESS( SPACE , MAP , RANK , I0 , I1 , I2 , I3 , I4 , I5 , I6 , I7 ) \
Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< \
Kokkos::Impl::ActiveExecutionMemorySpace , SPACE >::verify( MAP.data() )
#endif
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* #ifndef KOKKOS_EXPERIMENTAL_VIEW_MAPPING_HPP */
diff --git a/lib/kokkos/core/src/impl/KokkosExp_ViewTile.hpp b/lib/kokkos/core/src/impl/KokkosExp_ViewTile.hpp
new file mode 100644
index 000000000..a661a3534
--- /dev/null
+++ b/lib/kokkos/core/src/impl/KokkosExp_ViewTile.hpp
@@ -0,0 +1,219 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXPERIMENTAL_VIEWTILE_HPP
+#define KOKKOS_EXPERIMENTAL_VIEWTILE_HPP
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Experimental {
+namespace Impl {
+
+// View mapping for rank two tiled array
+
+template< class L >
+struct is_layout_tile : public std::false_type {};
+
+template< unsigned N0 , unsigned N1 >
+struct is_layout_tile< Kokkos::LayoutTileLeft<N0,N1,true> > : public std::true_type {};
+
+template< class Dimension , class Layout >
+struct ViewOffset< Dimension , Layout ,
+ typename std::enable_if<(
+ ( Dimension::rank == 2 )
+ &&
+ is_layout_tile< Layout >::value
+ )>::type >
+{
+public:
+
+ enum { SHIFT_0 = Kokkos::Impl::power_of_two<Layout::N0>::value };
+ enum { SHIFT_1 = Kokkos::Impl::power_of_two<Layout::N1>::value };
+ enum { SHIFT_T = SHIFT_0 + SHIFT_1 };
+ enum { MASK_0 = Layout::N0 - 1 };
+ enum { MASK_1 = Layout::N1 - 1 };
+
+ // Is an irregular layout that does not have uniform striding for each index.
+ using is_mapping_plugin = std::true_type ;
+ using is_regular = std::false_type ;
+
+ typedef size_t size_type ;
+ typedef Dimension dimension_type ;
+ typedef Layout array_layout ;
+
+ dimension_type m_dim ;
+ size_type m_tile_N0 ;
+
+ //----------------------------------------
+
+ // Only instantiated for rank 2
+ template< typename I0 , typename I1 >
+ KOKKOS_INLINE_FUNCTION constexpr
+ size_type operator()( I0 const & i0 , I1 const & i1
+ , int = 0 , int = 0
+ , int = 0 , int = 0
+ , int = 0 , int = 0
+ ) const
+ {
+ return /* ( ( Tile offset ) * Tile size ) */
+ ( ( (i0>>SHIFT_0) + m_tile_N0 * (i1>>SHIFT_1) ) << SHIFT_T) +
+ /* ( Offset within tile ) */
+ ( (i0 & MASK_0) + ((i1 & MASK_1)<<SHIFT_0) ) ;
+ }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_0() const { return m_dim.N0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_1() const { return m_dim.N1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_2() const { return 1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_3() const { return 1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_4() const { return 1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_5() const { return 1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_6() const { return 1 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type dimension_7() const { return 1 ; }
+
+ KOKKOS_INLINE_FUNCTION constexpr size_type size() const { return m_dim.N0 * m_dim.N1 ; }
+
+ // Strides are meaningless due to irregularity
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_0() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_1() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_2() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_3() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_4() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_5() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_6() const { return 0 ; }
+ KOKKOS_INLINE_FUNCTION constexpr size_type stride_7() const { return 0 ; }
+
+ KOKKOS_INLINE_FUNCTION constexpr size_type span() const
+ {
+ // ( TileDim0 * ( TileDim1 ) ) * TileSize
+ return ( m_tile_N0 * ( ( m_dim.N1 + MASK_1 ) >> SHIFT_1 ) ) << SHIFT_T ;
+ }
+
+ KOKKOS_INLINE_FUNCTION constexpr bool span_is_contiguous() const
+ {
+ // Only if dimensions align with tile size
+ return ( m_dim.N0 & MASK_0 ) == 0 && ( m_dim.N1 & MASK_1 ) == 0 ;
+ }
+
+ //----------------------------------------
+
+ ~ViewOffset() = default ;
+ ViewOffset() = default ;
+ ViewOffset( const ViewOffset & ) = default ;
+ ViewOffset & operator = ( const ViewOffset & ) = default ;
+
+ template< unsigned TrivialScalarSize >
+ KOKKOS_INLINE_FUNCTION
+ constexpr ViewOffset( std::integral_constant<unsigned,TrivialScalarSize> const &
+ , size_t aN0 , size_t aN1
+ , unsigned , unsigned , unsigned , unsigned , unsigned , unsigned )
+ : m_dim( aN0, aN1, 0, 0, 0, 0, 0, 0 )
+ , m_tile_N0( ( aN0 + MASK_0 ) >> SHIFT_0 /* number of tiles in first dimension */ )
+ {}
+};
+
+} /* namespace Impl */
+} /* namespace Experimental */
+} /* namespace Kokkos */
+
+namespace Kokkos {
+namespace Experimental {
+
+// Using View with an invalid data type to construct the tiling subview.
+// View is a friend of View so we use this invalid data type partial specialization
+// to access implementation of both source and destination view for constructing
+// the tile subview.
+
+template< unsigned N0 , unsigned N1 >
+struct View< void , Kokkos::LayoutTileLeft<N0,N1,true> , void , void >
+{
+ typedef Kokkos::LayoutTileLeft<N0,N1,true> Layout ;
+
+ template< typename T , class A2 , class A3 >
+ KOKKOS_INLINE_FUNCTION static
+ Kokkos::Experimental::View< T[N0][N1] , LayoutLeft , A2 , A3 >
+ tile_subview( const Kokkos::Experimental::View<T**,Layout,A2,A3> & src
+ , const size_t i_tile0
+ , const size_t i_tile1
+ )
+ {
+ typedef Kokkos::Experimental::View<T**,Layout,A2,A3> SrcView ;
+ typedef Kokkos::Experimental::View< T[N0][N1] , LayoutLeft , A2 , A3 > DstView ;
+
+ typedef typename SrcView::map_type::offset_type src_offset_type ;
+ typedef typename DstView::map_type dst_map_type ;
+ typedef typename DstView::map_type::handle_type dst_handle_type ;
+ typedef typename DstView::map_type::offset_type dst_offset_type ;
+
+ return DstView( src.m_track ,
+ dst_map_type(
+ dst_handle_type( src.m_map.m_handle +
+ ( ( i_tile0 + src.m_map.m_offset.m_tile_N0 * i_tile1 ) << src_offset_type::SHIFT_T ) ) ,
+ dst_offset_type() )
+ );
+ }
+};
+
+template< typename T , unsigned N0 , unsigned N1 , class A2 , class A3 >
+KOKKOS_INLINE_FUNCTION
+Kokkos::Experimental::View< T[N0][N1] , LayoutLeft , A2 , A3 >
+tile_subview( const Kokkos::Experimental::View<T**,Kokkos::LayoutTileLeft<N0,N1,true>,A2,A3> & src
+ , const size_t i_tile0
+ , const size_t i_tile1
+ )
+{
+ return View< void , Kokkos::LayoutTileLeft<N0,N1,true> , void , void >::
+ tile_subview( src , i_tile0 , i_tile1 );
+}
+
+} /* namespace Experimental */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_EXPERIENTAL_VIEWTILE_HPP */
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_AllocationTracker.cpp b/lib/kokkos/core/src/impl/Kokkos_AllocationTracker.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_AllocationTracker.hpp b/lib/kokkos/core/src/impl/Kokkos_AllocationTracker.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_AnalyzeShape.hpp b/lib/kokkos/core/src/impl/Kokkos_AnalyzeShape.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Assembly_X86.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Assembly_X86.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Compare_Exchange_Strong.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Exchange.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Exchange.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Add.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_And.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_And.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Or.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Or.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Sub.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Generic.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_View.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_View.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Windows.hpp b/lib/kokkos/core/src/impl/Kokkos_Atomic_Windows.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.cpp b/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.cpp
old mode 100755
new mode 100644
index 8da619fdb..08085dca3
--- a/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.cpp
+++ b/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.cpp
@@ -1,281 +1,281 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_HostSpace.hpp>
#include <impl/Kokkos_BasicAllocators.hpp>
#include <impl/Kokkos_Error.hpp>
#include <stdint.h> // uintptr_t
#include <cstdlib> // for malloc, realloc, and free
#include <cstring> // for memcpy
#include <sys/mman.h> // for mmap, munmap, MAP_ANON, etc
#include <unistd.h> // for sysconf, _SC_PAGE_SIZE, _SC_PHYS_PAGES
#include <sstream>
namespace Kokkos { namespace Impl {
/*--------------------------------------------------------------------------*/
void* MallocAllocator::allocate( size_t size )
{
void * ptr = NULL;
if (size) {
ptr = malloc(size);
if (!ptr)
{
std::ostringstream msg ;
msg << name() << ": allocate(" << size << ") FAILED";
throw_runtime_exception( msg.str() );
}
}
return ptr;
}
void MallocAllocator::deallocate( void * ptr, size_t /*size*/ )
{
if (ptr) {
free(ptr);
}
}
void * MallocAllocator::reallocate(void * old_ptr, size_t /*old_size*/, size_t new_size)
{
void * ptr = realloc(old_ptr, new_size);
if (new_size > 0u && ptr == NULL) {
throw_runtime_exception("Error: Malloc Allocator could not reallocate memory");
}
return ptr;
}
/*--------------------------------------------------------------------------*/
namespace {
void * raw_aligned_allocate( size_t size, size_t alignment )
{
void * ptr = NULL;
if ( size ) {
#if defined( __INTEL_COMPILER ) && !defined ( KOKKOS_HAVE_CUDA )
ptr = _mm_malloc( size , alignment );
#elif ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \
( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 )
posix_memalign( & ptr, alignment , size );
#else
// Over-allocate to and round up to guarantee proper alignment.
size_t size_padded = size + alignment + sizeof(void *);
void * alloc_ptr = malloc( size_padded );
if (alloc_ptr) {
uintptr_t address = reinterpret_cast<uintptr_t>(alloc_ptr);
// offset enough to record the alloc_ptr
address += sizeof(void *);
uintptr_t rem = address % alignment;
uintptr_t offset = rem ? (alignment - rem) : 0u;
address += offset;
ptr = reinterpret_cast<void *>(address);
// record the alloc'd pointer
address -= sizeof(void *);
*reinterpret_cast<void **>(address) = alloc_ptr;
}
#endif
}
return ptr;
}
void raw_aligned_deallocate( void * ptr, size_t /*size*/ )
{
if ( ptr ) {
#if defined( __INTEL_COMPILER ) && !defined ( KOKKOS_HAVE_CUDA )
_mm_free( ptr );
#elif ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \
( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 )
free( ptr );
#else
// get the alloc'd pointer
void * alloc_ptr = *(reinterpret_cast<void **>(ptr) -1);
free( alloc_ptr );
#endif
}
}
}
void* AlignedAllocator::allocate( size_t size )
{
void * ptr = 0 ;
if ( size ) {
ptr = raw_aligned_allocate(size, MEMORY_ALIGNMENT);
if (!ptr)
{
std::ostringstream msg ;
msg << name() << ": allocate(" << size << ") FAILED";
throw_runtime_exception( msg.str() );
}
}
return ptr;
}
void AlignedAllocator::deallocate( void * ptr, size_t size )
{
raw_aligned_deallocate( ptr, size);
}
void * AlignedAllocator::reallocate(void * old_ptr, size_t old_size, size_t new_size)
{
void * ptr = old_ptr;;
if (old_size < new_size) {
ptr = allocate( new_size );
memcpy(ptr, old_ptr, old_size );
deallocate( old_ptr, old_size );
}
return ptr;
}
/*--------------------------------------------------------------------------*/
// mmap flags for private anonymous memory allocation
#if defined( MAP_ANONYMOUS ) && defined( MAP_PRIVATE )
#define MMAP_FLAGS (MAP_PRIVATE | MAP_ANONYMOUS)
#elif defined( MAP_ANON) && defined( MAP_PRIVATE )
#define MMAP_FLAGS (MAP_PRIVATE | MAP_ANON)
#else
#define NO_MMAP
#endif
// huge page tables
#if !defined( NO_MMAP )
#if defined( MAP_HUGETLB )
#define MMAP_FLAGS_HUGE (MMAP_FLAGS | MAP_HUGETLB )
#elif defined( MMAP_FLAGS )
#define MMAP_FLAGS_HUGE MMAP_FLAGS
#endif
// threshold to use huge pages
#define MMAP_USE_HUGE_PAGES (1u << 27)
#endif
// read write access to private memory
#if !defined( NO_MMAP )
#define MMAP_PROTECTION (PROT_READ | PROT_WRITE)
#endif
void* PageAlignedAllocator::allocate( size_t size )
{
void *ptr = NULL;
if (size) {
#if !defined NO_MMAP
if ( size < MMAP_USE_HUGE_PAGES ) {
ptr = mmap( NULL, size, MMAP_PROTECTION, MMAP_FLAGS, -1 /*file descriptor*/, 0 /*offset*/);
} else {
ptr = mmap( NULL, size, MMAP_PROTECTION, MMAP_FLAGS_HUGE, -1 /*file descriptor*/, 0 /*offset*/);
}
if (ptr == MAP_FAILED) {
ptr = NULL;
}
#else
static const size_t page_size = 4096; // TODO: read in from sysconf( _SC_PAGE_SIZE )
ptr = raw_aligned_allocate( size, page_size);
#endif
if (!ptr)
{
std::ostringstream msg ;
msg << name() << ": allocate(" << size << ") FAILED";
throw_runtime_exception( msg.str() );
}
}
return ptr;
}
void PageAlignedAllocator::deallocate( void * ptr, size_t size )
{
#if !defined( NO_MMAP )
munmap(ptr, size);
#else
raw_aligned_deallocate(ptr, size);
#endif
}
void * PageAlignedAllocator::reallocate(void * old_ptr, size_t old_size, size_t new_size)
{
void * ptr = NULL;
-#if defined( NO_MMAP ) || defined( __APPLE__ )
+#if defined( NO_MMAP ) || defined( __APPLE__ ) || defined( __CYGWIN__ )
if (old_size != new_size) {
ptr = allocate( new_size );
memcpy(ptr, old_ptr, (old_size < new_size ? old_size : new_size) );
deallocate( old_ptr, old_size );
}
else {
ptr = old_ptr;
}
#else
ptr = mremap( old_ptr, old_size, new_size, MREMAP_MAYMOVE );
if (ptr == MAP_FAILED) {
throw_runtime_exception("Error: Page Aligned Allocator could not reallocate memory");
}
#endif
return ptr;
}
}} // namespace Kokkos::Impl
diff --git a/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.hpp b/lib/kokkos/core/src/impl/Kokkos_BasicAllocators.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Core.cpp b/lib/kokkos/core/src/impl/Kokkos_Core.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Error.cpp b/lib/kokkos/core/src/impl/Kokkos_Error.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Error.hpp b/lib/kokkos/core/src/impl/Kokkos_Error.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp b/lib/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
old mode 100755
new mode 100644
index ff6230b57..9d1119e56
--- a/lib/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
+++ b/lib/kokkos/core/src/impl/Kokkos_FunctorAdapter.hpp
@@ -1,1070 +1,1108 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_FUNCTORADAPTER_HPP
#define KOKKOS_FUNCTORADAPTER_HPP
#include <cstddef>
#include <Kokkos_Core_fwd.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_Tags.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class ArgTag , class Enable = void >
struct FunctorDeclaresValueType : public Impl::false_type {};
template< class FunctorType , class ArgTag >
struct FunctorDeclaresValueType< FunctorType , ArgTag
, typename Impl::enable_if_type< typename FunctorType::value_type >::type >
: public Impl::true_type {};
/** \brief Query Functor and execution policy argument tag for value type.
*
* If C++11 enabled and 'value_type' is not explicitly declared then attempt
* to deduce the type from FunctorType::operator().
*/
template< class FunctorType , class ArgTag , bool Dec = FunctorDeclaresValueType<FunctorType,ArgTag>::value >
struct FunctorValueTraits
{
typedef void value_type ;
typedef void pointer_type ;
typedef void reference_type ;
enum { StaticValueSize = 0 };
KOKKOS_FORCEINLINE_FUNCTION static
unsigned value_count( const FunctorType & ) { return 0 ; }
KOKKOS_FORCEINLINE_FUNCTION static
unsigned value_size( const FunctorType & ) { return 0 ; }
};
template<class ArgTag>
struct FunctorValueTraits<void, ArgTag,false>
{
typedef void reference_type;
};
/** \brief FunctorType::value_type is explicitly declared so use it.
*
* Two options for declaration
*
* 1) A plain-old-data (POD) type
* typedef {pod_type} value_type ;
*
* 2) An array of POD of a runtime specified count.
* typedef {pod_type} value_type[] ;
* const unsigned value_count ;
*/
template< class FunctorType , class ArgTag >
struct FunctorValueTraits< FunctorType , ArgTag , true /* == exists FunctorType::value_type */ >
{
typedef typename Impl::remove_extent< typename FunctorType::value_type >::type value_type ;
// If not an array then what is the sizeof(value_type)
enum { StaticValueSize = Impl::is_array< typename FunctorType::value_type >::value ? 0 : sizeof(value_type) };
typedef value_type * pointer_type ;
// The reference_type for an array is 'value_type *'
// The reference_type for a single value is 'value_type &'
typedef typename Impl::if_c< ! StaticValueSize , value_type *
, value_type & >::type reference_type ;
// Number of values if single value
template< class F >
KOKKOS_FORCEINLINE_FUNCTION static
typename Impl::enable_if< Impl::is_same<F,FunctorType>::value && StaticValueSize , unsigned >::type
value_count( const F & ) { return 1 ; }
// Number of values if an array, protect via templating because 'f.value_count'
// will only exist when the functor declares the value_type to be an array.
template< class F >
KOKKOS_FORCEINLINE_FUNCTION static
typename Impl::enable_if< Impl::is_same<F,FunctorType>::value && ! StaticValueSize , unsigned >::type
value_count( const F & f ) { return f.value_count ; }
// Total size of the value
KOKKOS_INLINE_FUNCTION static
unsigned value_size( const FunctorType & f ) { return value_count( f ) * sizeof(value_type) ; }
};
#if defined( KOKKOS_HAVE_CXX11 )
template< class FunctorType , class ArgTag >
struct FunctorValueTraits< FunctorType
, ArgTag
, false /* == exists FunctorType::value_type */
>
{
private:
struct VOIDTAG {}; // Allow declaration of non-matching operator() with void argument tag.
struct REJECTTAG {}; // Reject tagged operator() when using non-tagged execution policy.
typedef typename
Impl::if_c< Impl::is_same< ArgTag , void >::value , VOIDTAG , ArgTag >::type tag_type ;
//----------------------------------------
// parallel_for operator without a tag:
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( ArgMember ) const ) {}
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const ArgMember & ) const ) {}
template< class TagType , class ArgMember >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , ArgMember ) const ) {}
template< class TagType , class ArgMember >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , const ArgMember & ) const ) {}
template< class TagType , class ArgMember >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , ArgMember ) const ) {}
template< class TagType , class ArgMember >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , const ArgMember & ) const ) {}
//----------------------------------------
// parallel_for operator with a tag:
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , ArgMember ) const ) {}
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , ArgMember ) const ) {}
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , const ArgMember & ) const ) {}
template< class ArgMember >
KOKKOS_INLINE_FUNCTION
static VOIDTAG deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , const ArgMember & ) const ) {}
//----------------------------------------
// parallel_reduce operator without a tag:
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( ArgMember , T & ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const ArgMember & , T & ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , ArgMember , T & ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , const ArgMember & , T & ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , ArgMember , T & ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , const ArgMember & , T & ) const ) {}
//----------------------------------------
// parallel_reduce operator with a tag:
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , ArgMember , T & ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , ArgMember , T & ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , const ArgMember & , T & ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , const ArgMember & , T & ) const ) {}
//----------------------------------------
// parallel_scan operator without a tag:
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( ArgMember , T & , bool ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const ArgMember & , T & , bool ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , ArgMember , T & , bool ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , const ArgMember & , T & , bool ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , ArgMember , T & , bool ) const ) {}
template< class TagType , class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , const ArgMember & , T & , bool ) const ) {}
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( ArgMember , T & , const bool& ) const ) {}
+
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const ArgMember & , T & , const bool& ) const ) {}
+
+ template< class TagType , class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , ArgMember , T & , const bool& ) const ) {}
+
+ template< class TagType , class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( TagType , const ArgMember & , T & , const bool& ) const ) {}
+
+ template< class TagType , class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , ArgMember , T & , const bool& ) const ) {}
+
+ template< class TagType , class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static REJECTTAG deduce_reduce_type( VOIDTAG , void (FunctorType::*)( const TagType & , const ArgMember & , T & , const bool& ) const ) {}
//----------------------------------------
// parallel_scan operator with a tag:
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , ArgMember , T & , bool ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , ArgMember , T & , bool ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , const ArgMember& , T & , bool ) const ) {}
template< class ArgMember , class T >
KOKKOS_INLINE_FUNCTION
static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , const ArgMember& , T & , bool ) const ) {}
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , ArgMember , T & , const bool& ) const ) {}
+
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , ArgMember , T & , const bool& ) const ) {}
+
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( tag_type , void (FunctorType::*)( tag_type , const ArgMember& , T & , const bool& ) const ) {}
+
+ template< class ArgMember , class T >
+ KOKKOS_INLINE_FUNCTION
+ static T deduce_reduce_type( tag_type , void (FunctorType::*)( const tag_type & , const ArgMember& , T & , const bool& ) const ) {}
//----------------------------------------
typedef decltype( deduce_reduce_type( tag_type() , & FunctorType::operator() ) ) ValueType ;
enum { IS_VOID = Impl::is_same<VOIDTAG ,ValueType>::value };
enum { IS_REJECT = Impl::is_same<REJECTTAG,ValueType>::value };
public:
typedef typename Impl::if_c< IS_VOID || IS_REJECT , void , ValueType >::type value_type ;
typedef typename Impl::if_c< IS_VOID || IS_REJECT , void , ValueType * >::type pointer_type ;
typedef typename Impl::if_c< IS_VOID || IS_REJECT , void , ValueType & >::type reference_type ;
enum { StaticValueSize = IS_VOID || IS_REJECT ? 0 : sizeof(ValueType) };
KOKKOS_FORCEINLINE_FUNCTION static
unsigned value_size( const FunctorType & ) { return StaticValueSize ; }
KOKKOS_FORCEINLINE_FUNCTION static
unsigned value_count( const FunctorType & ) { return IS_VOID || IS_REJECT ? 0 : 1 ; }
};
#endif /* #if defined( KOKKOS_HAVE_CXX11 ) */
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
// Function signatures for FunctorType::init function with a tag and not an array
template< class FunctorType , class ArgTag , bool IsArray = 0 == FunctorValueTraits<FunctorType,ArgTag>::StaticValueSize >
struct FunctorValueInitFunction {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type volatile & ) );
};
// Function signatures for FunctorType::init function with a tag and is an array
template< class FunctorType , class ArgTag >
struct FunctorValueInitFunction< FunctorType , ArgTag , true > {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type volatile * ) );
};
// Function signatures for FunctorType::init function without a tag and not an array
template< class FunctorType >
struct FunctorValueInitFunction< FunctorType , void , false > {
typedef typename FunctorValueTraits<FunctorType,void>::reference_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type volatile & ) );
};
// Function signatures for FunctorType::init function without a tag and is an array
template< class FunctorType >
struct FunctorValueInitFunction< FunctorType , void , true > {
typedef typename FunctorValueTraits<FunctorType,void>::reference_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type volatile * ) );
};
// Adapter for value initialization function.
// If a proper FunctorType::init is declared then use it,
// otherwise use default constructor.
template< class FunctorType , class ArgTag
, class T = typename FunctorValueTraits<FunctorType,ArgTag>::reference_type
, class Enable = void >
struct FunctorValueInit ;
/* No 'init' function provided for single value */
template< class FunctorType , class ArgTag , class T , class Enable >
struct FunctorValueInit< FunctorType , ArgTag , T & , Enable >
{
KOKKOS_FORCEINLINE_FUNCTION static
T & init( const FunctorType & f , void * p )
{ return *( new(p) T() ); };
};
/* No 'init' function provided for array value */
template< class FunctorType , class ArgTag , class T , class Enable >
struct FunctorValueInit< FunctorType , ArgTag , T * , Enable >
{
KOKKOS_FORCEINLINE_FUNCTION static
T * init( const FunctorType & f , void * p )
{
const int n = FunctorValueTraits< FunctorType , ArgTag >::value_count(f);
for ( int i = 0 ; i < n ; ++i ) { new( ((T*)p) + i ) T(); }
return (T*)p ;
}
};
/* 'init' function provided for single value */
template< class FunctorType , class T >
struct FunctorValueInit
< FunctorType
, void
, T &
// First substitution failure when FunctorType::init does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when FunctorType::init is not compatible.
, decltype( FunctorValueInitFunction< FunctorType , void >::enable_if( & FunctorType::init ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::init ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
T & init( const FunctorType & f , void * p )
{ f.init( *((T*)p) ); return *((T*)p) ; }
};
/* 'init' function provided for array value */
template< class FunctorType , class T >
struct FunctorValueInit
< FunctorType
, void
, T *
// First substitution failure when FunctorType::init does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when FunctorType::init is not compatible
, decltype( FunctorValueInitFunction< FunctorType , void >::enable_if( & FunctorType::init ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::init ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
T * init( const FunctorType & f , void * p )
{ f.init( (T*)p ); return (T*)p ; }
};
/* 'init' function provided for single value */
template< class FunctorType , class ArgTag , class T >
struct FunctorValueInit
< FunctorType
, ArgTag
, T &
// First substitution failure when FunctorType::init does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when FunctorType::init is not compatible.
, decltype( FunctorValueInitFunction< FunctorType , ArgTag >::enable_if( & FunctorType::init ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::init ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
T & init( const FunctorType & f , void * p )
{ f.init( ArgTag() , *((T*)p) ); return *((T*)p) ; }
};
/* 'init' function provided for array value */
template< class FunctorType , class ArgTag , class T >
struct FunctorValueInit
< FunctorType
, ArgTag
, T *
// First substitution failure when FunctorType::init does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when FunctorType::init is not compatible
, decltype( FunctorValueInitFunction< FunctorType , ArgTag >::enable_if( & FunctorType::init ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::init ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
T * init( const FunctorType & f , void * p )
{ f.init( ArgTag() , (T*)p ); return (T*)p ; }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
// Signatures for compatible FunctorType::join with tag and not an array
template< class FunctorType , class ArgTag , bool IsArray = 0 == FunctorValueTraits<FunctorType,ArgTag>::StaticValueSize >
struct FunctorValueJoinFunction {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
typedef volatile value_type & vref_type ;
typedef const volatile value_type & cvref_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , vref_type , cvref_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , vref_type , cvref_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , vref_type , cvref_type ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , vref_type , cvref_type ) );
};
// Signatures for compatible FunctorType::join with tag and is an array
template< class FunctorType , class ArgTag >
struct FunctorValueJoinFunction< FunctorType , ArgTag , true > {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
typedef volatile value_type * vptr_type ;
typedef const volatile value_type * cvptr_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , vptr_type , cvptr_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , vptr_type , cvptr_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , vptr_type , cvptr_type ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , vptr_type , cvptr_type ) );
};
// Signatures for compatible FunctorType::join without tag and not an array
template< class FunctorType >
struct FunctorValueJoinFunction< FunctorType , void , false > {
typedef typename FunctorValueTraits<FunctorType,void>::value_type value_type ;
typedef volatile value_type & vref_type ;
typedef const volatile value_type & cvref_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( vref_type , cvref_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( vref_type , cvref_type ) );
};
// Signatures for compatible FunctorType::join without tag and is an array
template< class FunctorType >
struct FunctorValueJoinFunction< FunctorType , void , true > {
typedef typename FunctorValueTraits<FunctorType,void>::value_type value_type ;
typedef volatile value_type * vptr_type ;
typedef const volatile value_type * cvptr_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( vptr_type , cvptr_type ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( vptr_type , cvptr_type ) );
};
template< class FunctorType , class ArgTag
, class T = typename FunctorValueTraits<FunctorType,ArgTag>::reference_type
, class Enable = void >
struct FunctorValueJoin ;
/* No 'join' function provided, single value */
template< class FunctorType , class ArgTag , class T , class Enable >
struct FunctorValueJoin< FunctorType , ArgTag , T & , Enable >
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
*((volatile T*)lhs) += *((const volatile T*)rhs);
}
};
/* No 'join' function provided, array of values */
template< class FunctorType , class ArgTag , class T , class Enable >
struct FunctorValueJoin< FunctorType , ArgTag , T * , Enable >
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
const int n = FunctorValueTraits<FunctorType,ArgTag>::value_count(f);
for ( int i = 0 ; i < n ; ++i ) { ((volatile T*)lhs)[i] += ((const volatile T*)rhs)[i]; }
}
};
/* 'join' function provided, single value */
template< class FunctorType , class ArgTag , class T >
struct FunctorValueJoin
< FunctorType
, ArgTag
, T &
// First substitution failure when FunctorType::join does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::join ) does not exist
, decltype( FunctorValueJoinFunction< FunctorType , ArgTag >::enable_if( & FunctorType::join ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::join ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
f.join( ArgTag() , *((volatile T *)lhs) , *((const volatile T *)rhs) );
}
};
/* 'join' function provided, no tag, single value */
template< class FunctorType , class T >
struct FunctorValueJoin
< FunctorType
, void
, T &
// First substitution failure when FunctorType::join does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::join ) does not exist
, decltype( FunctorValueJoinFunction< FunctorType , void >::enable_if( & FunctorType::join ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::join ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
f.join( *((volatile T *)lhs) , *((const volatile T *)rhs) );
}
};
/* 'join' function provided for array value */
template< class FunctorType , class ArgTag , class T >
struct FunctorValueJoin
< FunctorType
, ArgTag
, T *
// First substitution failure when FunctorType::join does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::join ) does not exist
, decltype( FunctorValueJoinFunction< FunctorType , ArgTag >::enable_if( & FunctorType::join ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::join ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
f.join( ArgTag() , (volatile T *)lhs , (const volatile T *)rhs );
}
};
/* 'join' function provided, no tag, array value */
template< class FunctorType , class T >
struct FunctorValueJoin
< FunctorType
, void
, T *
// First substitution failure when FunctorType::join does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::join ) does not exist
, decltype( FunctorValueJoinFunction< FunctorType , void >::enable_if( & FunctorType::join ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::join ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void join( const FunctorType & f , volatile void * const lhs , const volatile void * const rhs )
{
f.join( (volatile T *)lhs , (const volatile T *)rhs );
}
};
} // namespace Impl
} // namespace Kokkos
namespace Kokkos {
namespace Impl {
#if defined( KOKKOS_HAVE_CXX11 )
template<typename ValueType, class JoinOp, class Enable = void>
struct JoinLambdaAdapter {
typedef ValueType value_type;
const JoinOp& lambda;
KOKKOS_INLINE_FUNCTION
JoinLambdaAdapter(const JoinOp& lambda_):lambda(lambda_) {}
KOKKOS_INLINE_FUNCTION
void join(volatile value_type& dst, const volatile value_type& src) const {
lambda(dst,src);
}
KOKKOS_INLINE_FUNCTION
void join(value_type& dst, const value_type& src) const {
lambda(dst,src);
}
KOKKOS_INLINE_FUNCTION
void operator() (volatile value_type& dst, const volatile value_type& src) const {
lambda(dst,src);
}
KOKKOS_INLINE_FUNCTION
void operator() (value_type& dst, const value_type& src) const {
lambda(dst,src);
}
};
template<typename ValueType, class JoinOp>
struct JoinLambdaAdapter<ValueType, JoinOp, decltype( FunctorValueJoinFunction< JoinOp , void >::enable_if( & JoinOp::join ) )> {
typedef ValueType value_type;
typedef StaticAssertSame<ValueType,typename JoinOp::value_type> assert_value_types_match;
const JoinOp& lambda;
KOKKOS_INLINE_FUNCTION
JoinLambdaAdapter(const JoinOp& lambda_):lambda(lambda_) {}
KOKKOS_INLINE_FUNCTION
void join(volatile value_type& dst, const volatile value_type& src) const {
lambda.join(dst,src);
}
KOKKOS_INLINE_FUNCTION
void join(value_type& dst, const value_type& src) const {
lambda.join(dst,src);
}
KOKKOS_INLINE_FUNCTION
void operator() (volatile value_type& dst, const volatile value_type& src) const {
lambda.join(dst,src);
}
KOKKOS_INLINE_FUNCTION
void operator() (value_type& dst, const value_type& src) const {
lambda.join(dst,src);
}
};
#endif
template<typename ValueType>
struct JoinAdd {
typedef ValueType value_type;
KOKKOS_INLINE_FUNCTION
JoinAdd() {}
KOKKOS_INLINE_FUNCTION
void join(volatile value_type& dst, const volatile value_type& src) const {
dst+=src;
}
KOKKOS_INLINE_FUNCTION
void operator() (value_type& dst, const value_type& src) const {
dst+=src;
}
KOKKOS_INLINE_FUNCTION
void operator() (volatile value_type& dst, const volatile value_type& src) const {
dst+=src;
}
};
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class ArgTag
, class T = typename FunctorValueTraits<FunctorType,ArgTag>::reference_type >
struct FunctorValueOps ;
template< class FunctorType , class ArgTag , class T >
struct FunctorValueOps< FunctorType , ArgTag , T & >
{
KOKKOS_FORCEINLINE_FUNCTION static
T * pointer( T & r ) { return & r ; }
KOKKOS_FORCEINLINE_FUNCTION static
T & reference( void * p ) { return *((T*)p); }
KOKKOS_FORCEINLINE_FUNCTION static
void copy( const FunctorType & , void * const lhs , const void * const rhs )
{ *((T*)lhs) = *((const T*)rhs); }
};
/* No 'join' function provided, array of values */
template< class FunctorType , class ArgTag , class T >
struct FunctorValueOps< FunctorType , ArgTag , T * >
{
KOKKOS_FORCEINLINE_FUNCTION static
T * pointer( T * p ) { return p ; }
KOKKOS_FORCEINLINE_FUNCTION static
T * reference( void * p ) { return ((T*)p); }
KOKKOS_FORCEINLINE_FUNCTION static
void copy( const FunctorType & f , void * const lhs , const void * const rhs )
{
const int n = FunctorValueTraits<FunctorType,ArgTag>::value_count(f);
for ( int i = 0 ; i < n ; ++i ) { ((T*)lhs)[i] = ((const T*)rhs)[i]; }
}
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
// Compatible functions for 'final' function and value_type not an array
template< class FunctorType , class ArgTag , bool IsArray = 0 == FunctorValueTraits<FunctorType,ArgTag>::StaticValueSize >
struct FunctorFinalFunction {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type volatile & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type const & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type const & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const volatile & ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type const volatile & ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type const volatile & ) );
};
// Compatible functions for 'final' function and value_type is an array
template< class FunctorType , class ArgTag >
struct FunctorFinalFunction< FunctorType , ArgTag , true > {
typedef typename FunctorValueTraits<FunctorType,ArgTag>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type volatile * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type const * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type const * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const volatile * ) const );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , value_type const volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , value_type const volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , value_type const volatile * ) );
// KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , value_type const volatile * ) );
};
template< class FunctorType >
struct FunctorFinalFunction< FunctorType , void , false > {
typedef typename FunctorValueTraits<FunctorType,void>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( const value_type & ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( const value_type & ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( const value_type & ) );
};
template< class FunctorType >
struct FunctorFinalFunction< FunctorType , void , true > {
typedef typename FunctorValueTraits<FunctorType,void>::value_type value_type ;
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( const value_type * ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( const value_type * ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( const value_type * ) );
};
/* No 'final' function provided */
template< class FunctorType , class ArgTag
, class ResultType = typename FunctorValueTraits<FunctorType,ArgTag>::reference_type
, class Enable = void >
struct FunctorFinal
{
KOKKOS_FORCEINLINE_FUNCTION static
void final( const FunctorType & , void * ) {}
};
/* 'final' function provided */
template< class FunctorType , class ArgTag , class T >
struct FunctorFinal
< FunctorType
, ArgTag
, T &
// First substitution failure when FunctorType::final does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::final ) does not exist
, decltype( FunctorFinalFunction< FunctorType , ArgTag >::enable_if( & FunctorType::final ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::final ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void final( const FunctorType & f , void * p ) { f.final( *((T*)p) ); }
KOKKOS_FORCEINLINE_FUNCTION static
void final( FunctorType & f , void * p ) { f.final( *((T*)p) ); }
};
/* 'final' function provided for array value */
template< class FunctorType , class ArgTag , class T >
struct FunctorFinal
< FunctorType
, ArgTag
, T *
// First substitution failure when FunctorType::final does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::final ) does not exist
, decltype( FunctorFinalFunction< FunctorType , ArgTag >::enable_if( & FunctorType::final ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::final ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void final( const FunctorType & f , void * p ) { f.final( (T*)p ); }
KOKKOS_FORCEINLINE_FUNCTION static
void final( FunctorType & f , void * p ) { f.final( (T*)p ); }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class FunctorType , class ArgTag
, class ReferenceType = typename FunctorValueTraits<FunctorType,ArgTag>::reference_type >
struct FunctorApplyFunction {
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , ReferenceType ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , ReferenceType ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag , ReferenceType ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ArgTag const & , ReferenceType ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag , ReferenceType ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ArgTag const & , ReferenceType ) );
};
template< class FunctorType , class ReferenceType >
struct FunctorApplyFunction< FunctorType , void , ReferenceType > {
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ReferenceType ) const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)( ReferenceType ) );
KOKKOS_INLINE_FUNCTION static void enable_if( void ( *)( ReferenceType ) );
};
template< class FunctorType >
struct FunctorApplyFunction< FunctorType , void , void > {
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)() const );
KOKKOS_INLINE_FUNCTION static void enable_if( void (FunctorType::*)() );
};
template< class FunctorType , class ArgTag , class ReferenceType
, class Enable = void >
struct FunctorApply
{
KOKKOS_FORCEINLINE_FUNCTION static
void apply( const FunctorType & , void * ) {}
};
/* 'apply' function provided for void value */
template< class FunctorType , class ArgTag >
struct FunctorApply
< FunctorType
, ArgTag
, void
// First substitution failure when FunctorType::apply does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::apply ) does not exist
, decltype( FunctorApplyFunction< FunctorType , ArgTag , void >::enable_if( & FunctorType::apply ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::apply ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void apply( FunctorType & f ) { f.apply(); }
KOKKOS_FORCEINLINE_FUNCTION static
void apply( const FunctorType & f ) { f.apply(); }
};
/* 'apply' function provided for single value */
template< class FunctorType , class ArgTag , class T >
struct FunctorApply
< FunctorType
, ArgTag
, T &
// First substitution failure when FunctorType::apply does not exist.
#if defined( KOKKOS_HAVE_CXX11 )
// Second substitution failure when enable_if( & Functor::apply ) does not exist
, decltype( FunctorApplyFunction< FunctorType , ArgTag >::enable_if( & FunctorType::apply ) )
#else
, typename Impl::enable_if< 0 < sizeof( & FunctorType::apply ) >::type
#endif
>
{
KOKKOS_FORCEINLINE_FUNCTION static
void apply( const FunctorType & f , void * p ) { f.apply( *((T*)p) ); }
KOKKOS_FORCEINLINE_FUNCTION static
void apply( FunctorType & f , void * p ) { f.apply( *((T*)p) ); }
};
} // namespace Impl
} // namespace Kokkos
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#endif /* KOKKOS_FUNCTORADAPTER_HPP */
diff --git a/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp b/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp
old mode 100755
new mode 100644
index 5c6a5b03b..69b8ce86d
--- a/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp
+++ b/lib/kokkos/core/src/impl/Kokkos_HostSpace.cpp
@@ -1,455 +1,441 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_Macros.hpp>
/*--------------------------------------------------------------------------*/
#if defined( __INTEL_COMPILER ) && ! defined ( KOKKOS_HAVE_CUDA )
// Intel specialized allocator does not interoperate with CUDA memory allocation
#define KOKKOS_INTEL_MM_ALLOC_AVAILABLE
#endif
/*--------------------------------------------------------------------------*/
#if ( defined( _POSIX_C_SOURCE ) && _POSIX_C_SOURCE >= 200112L ) || \
( defined( _XOPEN_SOURCE ) && _XOPEN_SOURCE >= 600 )
#define KOKKOS_POSIX_MEMALIGN_AVAILABLE
#include <unistd.h>
#include <sys/mman.h>
/* mmap flags for private anonymous memory allocation */
#if defined( MAP_ANONYMOUS ) && defined( MAP_PRIVATE )
#define KOKKOS_POSIX_MMAP_FLAGS (MAP_PRIVATE | MAP_ANONYMOUS)
#elif defined( MAP_ANON ) && defined( MAP_PRIVATE )
#define KOKKOS_POSIX_MMAP_FLAGS (MAP_PRIVATE | MAP_ANON)
#endif
// mmap flags for huge page tables
#if defined( KOKKOS_POSIX_MMAP_FLAGS )
#if defined( MAP_HUGETLB )
#define KOKKOS_POSIX_MMAP_FLAGS_HUGE (KOKKOS_POSIX_MMAP_FLAGS | MAP_HUGETLB )
#else
#define KOKKOS_POSIX_MMAP_FLAGS_HUGE KOKKOS_POSIX_MMAP_FLAGS
#endif
#endif
#endif
/*--------------------------------------------------------------------------*/
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include <memory.h>
#include <iostream>
#include <sstream>
#include <cstring>
#include <Kokkos_HostSpace.hpp>
#include <impl/Kokkos_BasicAllocators.hpp>
#include <impl/Kokkos_Error.hpp>
#include <Kokkos_Atomic.hpp>
-/*--------------------------------------------------------------------------*/
-
-namespace Kokkos {
-namespace Impl {
-
-
-DeepCopy<HostSpace,HostSpace>::DeepCopy( void * dst , const void * src , size_t n )
-{
- memcpy( dst , src , n );
-}
-
-}
-}
-
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace {
static const int QUERY_SPACE_IN_PARALLEL_MAX = 16 ;
typedef int (* QuerySpaceInParallelPtr )();
QuerySpaceInParallelPtr s_in_parallel_query[ QUERY_SPACE_IN_PARALLEL_MAX ] ;
int s_in_parallel_query_count = 0 ;
} // namespace <empty>
void HostSpace::register_in_parallel( int (*device_in_parallel)() )
{
if ( 0 == device_in_parallel ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::HostSpace::register_in_parallel ERROR : given NULL" ) );
}
int i = -1 ;
if ( ! (device_in_parallel)() ) {
for ( i = 0 ; i < s_in_parallel_query_count && ! (*(s_in_parallel_query[i]))() ; ++i );
}
if ( i < s_in_parallel_query_count ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::HostSpace::register_in_parallel_query ERROR : called in_parallel" ) );
}
if ( QUERY_SPACE_IN_PARALLEL_MAX <= i ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::HostSpace::register_in_parallel_query ERROR : exceeded maximum" ) );
}
for ( i = 0 ; i < s_in_parallel_query_count && s_in_parallel_query[i] != device_in_parallel ; ++i );
if ( i == s_in_parallel_query_count ) {
s_in_parallel_query[s_in_parallel_query_count++] = device_in_parallel ;
}
}
int HostSpace::in_parallel()
{
const int n = s_in_parallel_query_count ;
int i = 0 ;
while ( i < n && ! (*(s_in_parallel_query[i]))() ) { ++i ; }
return i < n ;
}
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
namespace Kokkos {
Impl::AllocationTracker HostSpace::allocate_and_track( const std::string & label, const size_t size )
{
return Impl::AllocationTracker( allocator(), size, label );
}
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
namespace Kokkos {
/* Default allocation mechanism */
HostSpace::HostSpace()
: m_alloc_mech(
#if defined( KOKKOS_INTEL_MM_ALLOC_AVAILABLE )
HostSpace::INTEL_MM_ALLOC
#elif defined( KOKKOS_POSIX_MMAP_FLAGS )
HostSpace::POSIX_MMAP
#elif defined( KOKKOS_POSIX_MEMALIGN_AVAILABLE )
HostSpace::POSIX_MEMALIGN
#else
HostSpace::STD_MALLOC
#endif
)
{}
/* Default allocation mechanism */
HostSpace::HostSpace( const HostSpace::AllocationMechanism & arg_alloc_mech )
: m_alloc_mech( HostSpace::STD_MALLOC )
{
if ( arg_alloc_mech == STD_MALLOC ) {
m_alloc_mech = HostSpace::STD_MALLOC ;
}
#if defined( KOKKOS_INTEL_MM_ALLOC_AVAILABLE )
else if ( arg_alloc_mech == HostSpace::INTEL_MM_ALLOC ) {
m_alloc_mech = HostSpace::INTEL_MM_ALLOC ;
}
#elif defined( KOKKOS_POSIX_MEMALIGN_AVAILABLE )
else if ( arg_alloc_mech == HostSpace::POSIX_MEMALIGN ) {
m_alloc_mech = HostSpace::POSIX_MEMALIGN ;
}
#elif defined( KOKKOS_POSIX_MMAP_FLAGS )
else if ( arg_alloc_mech == HostSpace::POSIX_MMAP ) {
m_alloc_mech = HostSpace::POSIX_MMAP ;
}
#endif
else {
const char * const mech =
( arg_alloc_mech == HostSpace::INTEL_MM_ALLOC ) ? "INTEL_MM_ALLOC" : (
( arg_alloc_mech == HostSpace::POSIX_MEMALIGN ) ? "POSIX_MEMALIGN" : (
( arg_alloc_mech == HostSpace::POSIX_MMAP ) ? "POSIX_MMAP" : "" ));
std::string msg ;
msg.append("Kokkos::HostSpace ");
msg.append(mech);
msg.append(" is not available" );
Kokkos::Impl::throw_runtime_exception( msg );
}
}
void * HostSpace::allocate( const size_t arg_alloc_size ) const
{
static_assert( sizeof(void*) == sizeof(uintptr_t)
, "Error sizeof(void*) != sizeof(uintptr_t)" );
static_assert( Kokkos::Impl::power_of_two< Kokkos::Impl::MEMORY_ALIGNMENT >::value
, "Memory alignment must be power of two" );
constexpr size_t alignment = Kokkos::Impl::MEMORY_ALIGNMENT ;
constexpr size_t alignment_mask = alignment - 1 ;
void * ptr = NULL;
if ( arg_alloc_size ) {
if ( m_alloc_mech == STD_MALLOC ) {
// Over-allocate to and round up to guarantee proper alignment.
size_t size_padded = arg_alloc_size + sizeof(void*) + alignment ;
void * alloc_ptr = malloc( size_padded );
if (alloc_ptr) {
uintptr_t address = reinterpret_cast<uintptr_t>(alloc_ptr);
// offset enough to record the alloc_ptr
address += sizeof(void *);
uintptr_t rem = address % alignment;
uintptr_t offset = rem ? (alignment - rem) : 0u;
address += offset;
ptr = reinterpret_cast<void *>(address);
// record the alloc'd pointer
address -= sizeof(void *);
*reinterpret_cast<void **>(address) = alloc_ptr;
}
}
#if defined( KOKKOS_INTEL_MM_ALLOC_AVAILABLE )
else if ( m_alloc_mech == INTEL_MM_ALLOC ) {
ptr = _mm_malloc( arg_alloc_size , alignment );
}
#endif
#if defined( KOKKOS_POSIX_MEMALIGN_AVAILABLE )
else if ( m_alloc_mech == POSIX_MEMALIGN ) {
posix_memalign( & ptr, alignment , arg_alloc_size );
}
#endif
#if defined( KOKKOS_POSIX_MMAP_FLAGS )
else if ( m_alloc_mech == POSIX_MMAP ) {
constexpr size_t use_huge_pages = (1u << 27);
constexpr int prot = PROT_READ | PROT_WRITE ;
const int flags = arg_alloc_size < use_huge_pages
? KOKKOS_POSIX_MMAP_FLAGS
: KOKKOS_POSIX_MMAP_FLAGS_HUGE ;
// read write access to private memory
ptr = mmap( NULL /* address hint, if NULL OS kernel chooses address */
, arg_alloc_size /* size in bytes */
, prot /* memory protection */
, flags /* visibility of updates */
, -1 /* file descriptor */
, 0 /* offset */
);
/* Associated reallocation:
ptr = mremap( old_ptr , old_size , new_size , MREMAP_MAYMOVE );
*/
}
#endif
}
if ( reinterpret_cast<uintptr_t>(ptr) & alignment_mask ) {
Kokkos::Impl::throw_runtime_exception( "Kokkos::HostSpace aligned allocation failed" );
}
return ptr;
}
void HostSpace::deallocate( void * const arg_alloc_ptr , const size_t arg_alloc_size ) const
{
if ( arg_alloc_ptr ) {
if ( m_alloc_mech == STD_MALLOC ) {
void * alloc_ptr = *(reinterpret_cast<void **>(arg_alloc_ptr) -1);
free( alloc_ptr );
}
#if defined( KOKKOS_INTEL_MM_ALLOC_AVAILABLE )
else if ( m_alloc_mech == INTEL_MM_ALLOC ) {
_mm_free( arg_alloc_ptr );
}
#endif
#if defined( KOKKOS_POSIX_MEMALIGN_AVAILABLE )
else if ( m_alloc_mech == POSIX_MEMALIGN ) {
free( arg_alloc_ptr );
}
#endif
#if defined( KOKKOS_POSIX_MMAP_FLAGS )
else if ( m_alloc_mech == POSIX_MMAP ) {
munmap( arg_alloc_ptr , arg_alloc_size );
}
#endif
}
}
} // namespace Kokkos
namespace Kokkos {
namespace Experimental {
namespace Impl {
SharedAllocationRecord< void , void >
SharedAllocationRecord< Kokkos::HostSpace , void >::s_root_record ;
void
SharedAllocationRecord< Kokkos::HostSpace , void >::
deallocate( SharedAllocationRecord< void , void > * arg_rec )
{
delete static_cast<SharedAllocationRecord*>(arg_rec);
}
SharedAllocationRecord< Kokkos::HostSpace , void >::
~SharedAllocationRecord()
{
m_space.deallocate( SharedAllocationRecord< void , void >::m_alloc_ptr
, SharedAllocationRecord< void , void >::m_alloc_size
);
}
SharedAllocationRecord< Kokkos::HostSpace , void >::
SharedAllocationRecord( const Kokkos::HostSpace & arg_space
, const std::string & arg_label
, const size_t arg_alloc_size
, const SharedAllocationRecord< void , void >::function_type arg_dealloc
)
// Pass through allocated [ SharedAllocationHeader , user_memory ]
// Pass through deallocation function
: SharedAllocationRecord< void , void >
( & SharedAllocationRecord< Kokkos::HostSpace , void >::s_root_record
, reinterpret_cast<SharedAllocationHeader*>( arg_space.allocate( sizeof(SharedAllocationHeader) + arg_alloc_size ) )
, sizeof(SharedAllocationHeader) + arg_alloc_size
, arg_dealloc
)
, m_space( arg_space )
{
// Fill in the Header information
RecordBase::m_alloc_ptr->m_record = static_cast< SharedAllocationRecord< void , void > * >( this );
strncpy( RecordBase::m_alloc_ptr->m_label
, arg_label.c_str()
, SharedAllocationHeader::maximum_label_length
);
}
SharedAllocationRecord< Kokkos::HostSpace , void > *
SharedAllocationRecord< Kokkos::HostSpace , void >::get_record( void * alloc_ptr )
{
typedef SharedAllocationHeader Header ;
typedef SharedAllocationRecord< Kokkos::HostSpace , void > RecordHost ;
SharedAllocationHeader const * const head = Header::get_header( alloc_ptr );
RecordHost * const record = static_cast< RecordHost * >( head->m_record );
if ( record->m_alloc_ptr != head ) {
Kokkos::Impl::throw_runtime_exception( std::string("Kokkos::Experimental::Impl::SharedAllocationRecord< Kokkos::HostSpace , void >::get_record ERROR" ) );
}
return record ;
}
// Iterate records to print orphaned memory ...
void SharedAllocationRecord< Kokkos::HostSpace , void >::
print_records( std::ostream & s , const Kokkos::HostSpace & space , bool detail )
{
SharedAllocationRecord< void , void >::print_host_accessible_records( s , "HostSpace" , & s_root_record , detail );
}
} // namespace Impl
} // namespace Experimental
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace {
const unsigned HOST_SPACE_ATOMIC_MASK = 0xFFFF;
const unsigned HOST_SPACE_ATOMIC_XOR_MASK = 0x5A39;
static int HOST_SPACE_ATOMIC_LOCKS[HOST_SPACE_ATOMIC_MASK+1];
}
namespace Impl {
void init_lock_array_host_space() {
static int is_initialized = 0;
if(! is_initialized)
for(int i = 0; i < static_cast<int> (HOST_SPACE_ATOMIC_MASK+1); i++)
HOST_SPACE_ATOMIC_LOCKS[i] = 0;
}
bool lock_address_host_space(void* ptr) {
return 0 == atomic_compare_exchange( &HOST_SPACE_ATOMIC_LOCKS[
(( size_t(ptr) >> 2 ) & HOST_SPACE_ATOMIC_MASK) ^ HOST_SPACE_ATOMIC_XOR_MASK] ,
0 , 1);
}
void unlock_address_host_space(void* ptr) {
atomic_exchange( &HOST_SPACE_ATOMIC_LOCKS[
(( size_t(ptr) >> 2 ) & HOST_SPACE_ATOMIC_MASK) ^ HOST_SPACE_ATOMIC_XOR_MASK] ,
0);
}
}
}
diff --git a/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp b/lib/kokkos/core/src/impl/Kokkos_Memory_Fence.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_PhysicalLayout.hpp b/lib/kokkos/core/src/impl/Kokkos_PhysicalLayout.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Profiling_DeviceInfo.hpp b/lib/kokkos/core/src/impl/Kokkos_Profiling_DeviceInfo.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp
old mode 100755
new mode 100644
index 85ec1709c..a88be37dd
--- a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp
+++ b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.cpp
@@ -1,141 +1,148 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <impl/Kokkos_Profiling_Interface.hpp>
#ifdef KOKKOSP_ENABLE_PROFILING
#include <string.h>
namespace Kokkos {
namespace Experimental {
bool profileLibraryLoaded() {
return (NULL != initProfileLibrary);
}
void beginParallelFor(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID) {
if(NULL != beginForCallee) {
Kokkos::fence();
(*beginForCallee)(kernelPrefix.c_str(), devID, kernelID);
}
};
void endParallelFor(const uint64_t kernelID) {
if(NULL != endForCallee) {
Kokkos::fence();
(*endForCallee)(kernelID);
}
};
void beginParallelScan(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID) {
if(NULL != beginScanCallee) {
Kokkos::fence();
(*beginScanCallee)(kernelPrefix.c_str(), devID, kernelID);
}
};
void endParallelScan(const uint64_t kernelID) {
if(NULL != endScanCallee) {
Kokkos::fence();
(*endScanCallee)(kernelID);
}
};
void beginParallelReduce(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID) {
if(NULL != beginReduceCallee) {
Kokkos::fence();
(*beginReduceCallee)(kernelPrefix.c_str(), devID, kernelID);
}
};
void endParallelReduce(const uint64_t kernelID) {
if(NULL != endReduceCallee) {
Kokkos::fence();
(*endReduceCallee)(kernelID);
}
};
void initialize() {
void* firstProfileLibrary;
char* envProfileLibrary = getenv("KOKKOS_PROFILE_LIBRARY");
+
+ // If we do not find a profiling library in the environment then exit
+ // early.
+ if( NULL == envProfileLibrary ) {
+ return ;
+ }
+
char* profileLibraryName = strtok(envProfileLibrary, ";");
if( (NULL != profileLibraryName) && (strcmp(profileLibraryName, "") != 0) ) {
firstProfileLibrary = dlopen(profileLibraryName, RTLD_NOW | RTLD_GLOBAL);
if(NULL == firstProfileLibrary) {
std::cerr << "Error: Unable to load KokkosP library: " <<
profileLibraryName << std::endl;
} else {
- std::cout << "KOKKOSP: Library Loaded: " << profileLibraryName << std::endl;
+ std::cout << "KokkosP: Library Loaded: " << profileLibraryName << std::endl;
beginForCallee = (beginFunction) dlsym(firstProfileLibrary, "kokkosp_begin_parallel_for");
beginScanCallee = (beginFunction) dlsym(firstProfileLibrary, "kokkosp_begin_parallel_scan");
beginReduceCallee = (beginFunction) dlsym(firstProfileLibrary, "kokkosp_begin_parallel_reduce");
endScanCallee = (endFunction) dlsym(firstProfileLibrary, "kokkosp_end_parallel_scan");
endForCallee = (endFunction) dlsym(firstProfileLibrary, "kokkosp_end_parallel_for");
endReduceCallee = (endFunction) dlsym(firstProfileLibrary, "kokkosp_end_parallel_reduce");
initProfileLibrary = (initFunction) dlsym(firstProfileLibrary, "kokkosp_init_library");
finalizeProfileLibrary = (finalizeFunction) dlsym(firstProfileLibrary, "kokkosp_finalize_library");
}
}
if(NULL != initProfileLibrary) {
(*initProfileLibrary)(0,
(uint64_t) KOKKOSP_INTERFACE_VERSION,
(uint32_t) 0,
NULL);
}
};
void finalize() {
if(NULL != finalizeProfileLibrary) {
(*finalizeProfileLibrary)();
}
};
}
}
#endif
diff --git a/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp b/lib/kokkos/core/src/impl/Kokkos_Profiling_Interface.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial.cpp b/lib/kokkos/core/src/impl/Kokkos_Serial.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial_TaskPolicy.cpp b/lib/kokkos/core/src/impl/Kokkos_Serial_TaskPolicy.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Serial_TaskPolicy.hpp b/lib/kokkos/core/src/impl/Kokkos_Serial_TaskPolicy.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Shape.cpp b/lib/kokkos/core/src/impl/Kokkos_Shape.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Shape.hpp b/lib/kokkos/core/src/impl/Kokkos_Shape.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Singleton.hpp b/lib/kokkos/core/src/impl/Kokkos_Singleton.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_StaticAssert.hpp b/lib/kokkos/core/src/impl/Kokkos_StaticAssert.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Tags.hpp b/lib/kokkos/core/src/impl/Kokkos_Tags.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Timer.hpp b/lib/kokkos/core/src/impl/Kokkos_Timer.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_Traits.hpp b/lib/kokkos/core/src/impl/Kokkos_Traits.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_ViewDefault.hpp b/lib/kokkos/core/src/impl/Kokkos_ViewDefault.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_ViewOffset.hpp b/lib/kokkos/core/src/impl/Kokkos_ViewOffset.hpp
old mode 100755
new mode 100644
index 61cd75844..a5dab382f
--- a/lib/kokkos/core/src/impl/Kokkos_ViewOffset.hpp
+++ b/lib/kokkos/core/src/impl/Kokkos_ViewOffset.hpp
@@ -1,1348 +1,1341 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_VIEWOFFSET_HPP
#define KOKKOS_VIEWOFFSET_HPP
#include <Kokkos_Pair.hpp>
#include <Kokkos_Layout.hpp>
#include <impl/Kokkos_Traits.hpp>
#include <impl/Kokkos_Shape.hpp>
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
-namespace Kokkos {
-struct ALL ;
-} // namespace Kokkos
-
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-
namespace Kokkos { namespace Impl {
template < class ShapeType , class LayoutType , typename Enable = void >
struct ViewOffset ;
//----------------------------------------------------------------------------
// LayoutLeft AND ( 1 >= rank OR 0 == rank_dynamic ) : no padding / striding
template < class ShapeType >
struct ViewOffset< ShapeType , LayoutLeft
, typename enable_if<( 1 >= ShapeType::rank
||
0 == ShapeType::rank_dynamic
)>::type >
: public ShapeType
{
typedef size_t size_type ;
typedef ShapeType shape_type ;
typedef LayoutLeft array_layout ;
enum { has_padding = false };
template< unsigned R >
KOKKOS_INLINE_FUNCTION
void assign( size_t n )
{ assign_shape_dimension<R>( *this , n ); }
// Return whether the subview introduced noncontiguity
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 0 == shape_type::rank &&
Impl::is_same<L,LayoutLeft>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> &
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{
return false ; // did not introduce noncontiguity
}
// This subview must be 1 == rank and 1 == rank_dynamic.
// The source dimension #0 must be non-zero and all other dimensions are zero.
// Return whether the subview introduced noncontiguity
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 1 == shape_type::rank &&
1 == shape_type::rank_dynamic &&
1 <= S::rank &&
Impl::is_same<L,LayoutLeft>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> &
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{
// n1 .. n7 must be zero
shape_type::N0 = n0 ;
return false ; // did not introduce noncontiguity
}
KOKKOS_INLINE_FUNCTION
void assign( size_t n0 , size_t n1 , size_t n2 , size_t n3
, size_t n4 , size_t n5 , size_t n6 , size_t n7
, size_t = 0 )
{ shape_type::assign( *this , n0, n1, n2, n3, n4, n5, n6, n7 ); }
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutLeft > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
)>::type * = 0 )
{ shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 ); }
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutRight > & rhs
, typename enable_if<( 1 == int(ShapeRHS::rank)
&&
1 == int(shape_type::rank)
&&
1 == int(shape_type::rank_dynamic)
)>::type * = 0 )
{ shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 ); }
KOKKOS_INLINE_FUNCTION
void set_padding() {}
KOKKOS_INLINE_FUNCTION
size_type cardinality() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type capacity() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
// Stride with [ rank ] value is the total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
s[0] = 1 ;
if ( 0 < shape_type::rank ) { s[1] = shape_type::N0 ; }
if ( 1 < shape_type::rank ) { s[2] = s[1] * shape_type::N1 ; }
if ( 2 < shape_type::rank ) { s[3] = s[2] * shape_type::N2 ; }
if ( 3 < shape_type::rank ) { s[4] = s[3] * shape_type::N3 ; }
if ( 4 < shape_type::rank ) { s[5] = s[4] * shape_type::N4 ; }
if ( 5 < shape_type::rank ) { s[6] = s[5] * shape_type::N5 ; }
if ( 6 < shape_type::rank ) { s[7] = s[6] * shape_type::N6 ; }
if ( 7 < shape_type::rank ) { s[8] = s[7] * shape_type::N7 ; }
}
KOKKOS_INLINE_FUNCTION size_type stride_0() const { return 1 ; }
KOKKOS_INLINE_FUNCTION size_type stride_1() const { return shape_type::N0 ; }
KOKKOS_INLINE_FUNCTION size_type stride_2() const { return shape_type::N0 * shape_type::N1 ; }
KOKKOS_INLINE_FUNCTION size_type stride_3() const { return shape_type::N0 * shape_type::N1 * shape_type::N2 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_4() const
{ return shape_type::N0 * shape_type::N1 * shape_type::N2 * shape_type::N3 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_5() const
{ return shape_type::N0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_6() const
{ return shape_type::N0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_7() const
{ return shape_type::N0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 ; }
// rank 1
template< typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const & i0 ) const { return i0 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const & i0 , I1 const & i1 ) const
{ return i0 + shape_type::N0 * i1 ; }
//rank 3
template <typename I0, typename I1, typename I2>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0
, I1 const& i1
, I2 const& i2
) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * i2 );
}
//rank 4
template <typename I0, typename I1, typename I2, typename I3>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3 ) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * i3 ));
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
,typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4 ) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * i4 )));
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5 ) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * i5 ))));
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * (
i5 + shape_type::N5 * i6 )))));
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6, typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6, I7 const& i7) const
{
return i0 + shape_type::N0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * (
i5 + shape_type::N5 * (
i6 + shape_type::N6 * i7 ))))));
}
};
//----------------------------------------------------------------------------
// LayoutLeft AND ( 1 < rank AND 0 < rank_dynamic ) : has padding / striding
template < class ShapeType >
struct ViewOffset< ShapeType , LayoutLeft
, typename enable_if<( 1 < ShapeType::rank
&&
0 < ShapeType::rank_dynamic
)>::type >
: public ShapeType
{
typedef size_t size_type ;
typedef ShapeType shape_type ;
typedef LayoutLeft array_layout ;
enum { has_padding = true };
size_type S0 ;
// This subview must be 2 == rank and 2 == rank_dynamic
// due to only having stride #0.
// The source dimension #0 must be non-zero for stride-one leading dimension.
// At most subsequent dimension can be non-zero.
// Return whether the subview introduced noncontiguity.
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 2 == shape_type::rank &&
2 == shape_type::rank_dynamic &&
2 <= S::rank &&
Impl::is_same<L,LayoutLeft>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> & rhs
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{
// N1 = second non-zero dimension
// S0 = stride for second non-zero dimension
shape_type::N0 = n0 ;
shape_type::N1 = 0 ;
S0 = 0 ;
if ( n1 ) { shape_type::N1 = n1 ; S0 = rhs.stride_1(); }
else if ( 2 < S::rank && n2 ) { shape_type::N1 = n2 ; S0 = rhs.stride_2(); }
else if ( 3 < S::rank && n3 ) { shape_type::N1 = n3 ; S0 = rhs.stride_3(); }
else if ( 4 < S::rank && n4 ) { shape_type::N1 = n4 ; S0 = rhs.stride_4(); }
else if ( 5 < S::rank && n5 ) { shape_type::N1 = n5 ; S0 = rhs.stride_5(); }
else if ( 6 < S::rank && n6 ) { shape_type::N1 = n6 ; S0 = rhs.stride_6(); }
else if ( 7 < S::rank && n7 ) { shape_type::N1 = n7 ; S0 = rhs.stride_7(); }
// Introduce noncontiguity if change the first dimension
// or took a range of a dimension after the second.
return ( size_t(shape_type::N0) != size_t(rhs.N0) ) || ( 0 == n1 );
}
template< unsigned R >
KOKKOS_INLINE_FUNCTION
void assign( size_t n )
{ assign_shape_dimension<R>( *this , n ); }
KOKKOS_INLINE_FUNCTION
void assign( size_t n0 , size_t n1 , size_t n2 , size_t n3
, size_t n4 , size_t n5 , size_t n6 , size_t n7
, size_t = 0 )
{ shape_type::assign( *this , n0, n1, n2, n3, n4, n5, n6, n7 ); S0 = shape_type::N0 ; }
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutLeft > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
&&
int(ShapeRHS::rank_dynamic) == 0
)>::type * = 0 )
{
shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 );
S0 = shape_type::N0 ; // No padding when dynamic_rank == 0
}
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutLeft > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
&&
int(ShapeRHS::rank_dynamic) > 0
)>::type * = 0 )
{
shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 );
S0 = rhs.S0 ; // possibly padding when dynamic rank > 0
}
KOKKOS_INLINE_FUNCTION
void set_padding()
{
enum { div = MEMORY_ALIGNMENT / shape_type::scalar_size };
enum { mod = MEMORY_ALIGNMENT % shape_type::scalar_size };
enum { align = 0 == mod ? div : 0 };
if ( align && MEMORY_ALIGNMENT_THRESHOLD * align < S0 ) {
const size_type count_mod = S0 % ( div ? div : 1 );
if ( count_mod ) { S0 += align - count_mod ; }
}
}
KOKKOS_INLINE_FUNCTION
size_type cardinality() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type capacity() const
{ return size_type(S0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
// Stride with [ rank ] as total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
s[0] = 1 ;
if ( 0 < shape_type::rank ) { s[1] = S0 ; }
if ( 1 < shape_type::rank ) { s[2] = s[1] * shape_type::N1 ; }
if ( 2 < shape_type::rank ) { s[3] = s[2] * shape_type::N2 ; }
if ( 3 < shape_type::rank ) { s[4] = s[3] * shape_type::N3 ; }
if ( 4 < shape_type::rank ) { s[5] = s[4] * shape_type::N4 ; }
if ( 5 < shape_type::rank ) { s[6] = s[5] * shape_type::N5 ; }
if ( 6 < shape_type::rank ) { s[7] = s[6] * shape_type::N6 ; }
if ( 7 < shape_type::rank ) { s[8] = s[7] * shape_type::N6 ; }
}
KOKKOS_INLINE_FUNCTION size_type stride_0() const { return 1 ; }
KOKKOS_INLINE_FUNCTION size_type stride_1() const { return S0 ; }
KOKKOS_INLINE_FUNCTION size_type stride_2() const { return S0 * shape_type::N1 ; }
KOKKOS_INLINE_FUNCTION size_type stride_3() const { return S0 * shape_type::N1 * shape_type::N2 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_4() const
{ return S0 * shape_type::N1 * shape_type::N2 * shape_type::N3 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_5() const
{ return S0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_6() const
{ return S0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_7() const
{ return S0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 ; }
// rank 2
template < typename I0 , typename I1 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const & i0 , I1 const & i1) const
{ return i0 + S0 * i1 ; }
//rank 3
template <typename I0, typename I1, typename I2>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * i2 );
}
//rank 4
template <typename I0, typename I1, typename I2, typename I3>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * i3 ));
}
//rank 5
template < typename I0, typename I1, typename I2, typename I3
,typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * i4 )));
}
//rank 6
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * i5 ))));
}
//rank 7
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * (
i5 + shape_type::N5 * i6 )))));
}
//rank 8
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6, typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2, I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6, I7 const& i7 ) const
{
return i0 + S0 * (
i1 + shape_type::N1 * (
i2 + shape_type::N2 * (
i3 + shape_type::N3 * (
i4 + shape_type::N4 * (
i5 + shape_type::N5 * (
i6 + shape_type::N6 * i7 ))))));
}
};
//----------------------------------------------------------------------------
// LayoutRight AND ( 1 >= rank OR 1 >= rank_dynamic ) : no padding / striding
template < class ShapeType >
struct ViewOffset< ShapeType , LayoutRight
, typename enable_if<( 1 >= ShapeType::rank
||
1 >= ShapeType::rank_dynamic
)>::type >
: public ShapeType
{
typedef size_t size_type;
typedef ShapeType shape_type;
typedef LayoutRight array_layout ;
enum { has_padding = false };
// This subview must be 1 == rank and 1 == rank_dynamic
// The source view's last dimension must be non-zero
// Return whether the subview introduced noncontiguity
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 0 == shape_type::rank &&
Impl::is_same<L,LayoutRight>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> &
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{ return false ; }
// This subview must be 1 == rank and 1 == rank_dynamic
// The source view's last dimension must be non-zero
// Return whether the subview introduced noncontiguity
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 1 == shape_type::rank &&
1 == shape_type::rank_dynamic &&
1 <= S::rank &&
Impl::is_same<L,LayoutRight>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> &
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{
shape_type::N0 = S::rank == 1 ? n0 : (
S::rank == 2 ? n1 : (
S::rank == 3 ? n2 : (
S::rank == 4 ? n3 : (
S::rank == 5 ? n4 : (
S::rank == 6 ? n5 : (
S::rank == 7 ? n6 : n7 ))))));
// should have n0 .. n_(rank-2) equal zero
return false ;
}
template< unsigned R >
KOKKOS_INLINE_FUNCTION
void assign( size_t n )
{ assign_shape_dimension<R>( *this , n ); }
KOKKOS_INLINE_FUNCTION
void assign( size_t n0 , size_t n1 , size_t n2 , size_t n3
, size_t n4 , size_t n5 , size_t n6 , size_t n7
, size_t = 0 )
{ shape_type::assign( *this , n0, n1, n2, n3, n4, n5, n6, n7 ); }
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutRight > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
)>::type * = 0 )
{ shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 ); }
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutLeft > & rhs
, typename enable_if<( 1 == int(ShapeRHS::rank)
&&
1 == int(shape_type::rank)
&&
1 == int(shape_type::rank_dynamic)
)>::type * = 0 )
{ shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 ); }
KOKKOS_INLINE_FUNCTION
void set_padding() {}
KOKKOS_INLINE_FUNCTION
size_type cardinality() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type capacity() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
size_type stride_R() const
{
return size_type(shape_type::N1) * shape_type::N2 * shape_type::N3 *
shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ;
};
// Stride with [rank] as total length
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
size_type n = 1 ;
if ( 7 < shape_type::rank ) { s[7] = n ; n *= shape_type::N7 ; }
if ( 6 < shape_type::rank ) { s[6] = n ; n *= shape_type::N6 ; }
if ( 5 < shape_type::rank ) { s[5] = n ; n *= shape_type::N5 ; }
if ( 4 < shape_type::rank ) { s[4] = n ; n *= shape_type::N4 ; }
if ( 3 < shape_type::rank ) { s[3] = n ; n *= shape_type::N3 ; }
if ( 2 < shape_type::rank ) { s[2] = n ; n *= shape_type::N2 ; }
if ( 1 < shape_type::rank ) { s[1] = n ; n *= shape_type::N1 ; }
if ( 0 < shape_type::rank ) { s[0] = n ; }
s[shape_type::rank] = n * shape_type::N0 ;
}
KOKKOS_INLINE_FUNCTION
size_type stride_7() const { return 1 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_6() const { return shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_5() const { return shape_type::N7 * shape_type::N6 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_4() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_3() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_2() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 * shape_type::N3 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_1() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 * shape_type::N3 * shape_type::N2 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_0() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 * shape_type::N3 * shape_type::N2 * shape_type::N1 ; }
// rank 1
template <typename I0>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0) const
{
return i0 ;
}
// rank 2
template <typename I0, typename I1>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1 ) const
{
return i1 + shape_type::N1 * i0 ;
}
template <typename I0, typename I1, typename I2>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 ) const
{
return i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 ));
}
template <typename I0, typename I1, typename I2, typename I3>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3 ) const
{
return i3 + shape_type::N3 * (
i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 )));
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4 ) const
{
return i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 ))));
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5 ) const
{
return i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 )))));
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6 ) const
{
return i6 + shape_type::N6 * (
i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 ))))));
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6, typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6, I7 const& i7 ) const
{
return i7 + shape_type::N7 * (
i6 + shape_type::N6 * (
i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * (
i1 + shape_type::N1 * ( i0 )))))));
}
};
//----------------------------------------------------------------------------
// LayoutRight AND ( 1 < rank AND 1 < rank_dynamic ) : has padding / striding
template < class ShapeType >
struct ViewOffset< ShapeType , LayoutRight
, typename enable_if<( 1 < ShapeType::rank
&&
1 < ShapeType::rank_dynamic
)>::type >
: public ShapeType
{
typedef size_t size_type;
typedef ShapeType shape_type;
typedef LayoutRight array_layout ;
enum { has_padding = true };
size_type SR ;
// This subview must be 2 == rank and 2 == rank_dynamic
// due to only having stride #(rank-1).
// The source dimension #(rank-1) must be non-zero for stride-one leading dimension.
// At most one prior dimension can be non-zero.
// Return whether the subview introduced noncontiguity.
template< class S , class L >
KOKKOS_INLINE_FUNCTION
typename Impl::enable_if<( 2 == shape_type::rank &&
2 == shape_type::rank_dynamic &&
2 <= S::rank &&
Impl::is_same<L,LayoutRight>::value
), bool >::type
assign_subview( const ViewOffset<S,L,void> & rhs
, const size_t n0
, const size_t n1
, const size_t n2
, const size_t n3
, const size_t n4
, const size_t n5
, const size_t n6
, const size_t n7
)
{
const size_type nR = S::rank == 2 ? n1 : (
S::rank == 3 ? n2 : (
S::rank == 4 ? n3 : (
S::rank == 5 ? n4 : (
S::rank == 6 ? n5 : (
S::rank == 7 ? n6 : n7 )))));
// N0 = first non-zero-dimension
// N1 = last non-zero dimension
// SR = stride for second non-zero dimension
shape_type::N0 = 0 ;
shape_type::N1 = nR ;
SR = 0 ;
if ( n0 ) { shape_type::N0 = n0 ; SR = rhs.stride_0(); }
else if ( 2 < S::rank && n1 ) { shape_type::N0 = n1 ; SR = rhs.stride_1(); }
else if ( 3 < S::rank && n2 ) { shape_type::N0 = n2 ; SR = rhs.stride_2(); }
else if ( 4 < S::rank && n3 ) { shape_type::N0 = n3 ; SR = rhs.stride_3(); }
else if ( 5 < S::rank && n4 ) { shape_type::N0 = n4 ; SR = rhs.stride_4(); }
else if ( 6 < S::rank && n5 ) { shape_type::N0 = n5 ; SR = rhs.stride_5(); }
else if ( 7 < S::rank && n6 ) { shape_type::N0 = n6 ; SR = rhs.stride_6(); }
// Introduce noncontiguous if change the last dimension
// or take a range of a dimension other than the second-to-last dimension.
return 2 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N1) || 0 == n0 ) : (
3 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N2) || 0 == n1 ) : (
4 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N3) || 0 == n2 ) : (
5 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N4) || 0 == n3 ) : (
6 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N5) || 0 == n4 ) : (
7 == S::rank ? ( size_t(shape_type::N1) != size_t(rhs.N6) || 0 == n5 ) : (
( size_t(shape_type::N1) != size_t(rhs.N7) || 0 == n6 ) ))))));
}
template< unsigned R >
KOKKOS_INLINE_FUNCTION
void assign( size_t n )
{ assign_shape_dimension<R>( *this , n ); }
KOKKOS_INLINE_FUNCTION
void assign( size_t n0 , size_t n1 , size_t n2 , size_t n3
, size_t n4 , size_t n5 , size_t n6 , size_t n7
, size_t = 0 )
{
shape_type::assign( *this , n0, n1, n2, n3, n4, n5, n6, n7 );
SR = size_type(shape_type::N1) * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ;
}
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutRight > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
&&
int(ShapeRHS::rank_dynamic) <= 1
)>::type * = 0 )
{
shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 );
SR = shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ;
}
template< class ShapeRHS >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset< ShapeRHS , LayoutRight > & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank)
&&
int(ShapeRHS::rank_dynamic) <= int(shape_type::rank_dynamic)
&&
int(ShapeRHS::rank_dynamic) > 1
)>::type * = 0 )
{
shape_type::assign( *this , rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 );
SR = rhs.SR ;
}
KOKKOS_INLINE_FUNCTION
void set_padding()
{
enum { div = MEMORY_ALIGNMENT / shape_type::scalar_size };
enum { mod = MEMORY_ALIGNMENT % shape_type::scalar_size };
enum { align = 0 == mod ? div : 0 };
if ( align && MEMORY_ALIGNMENT_THRESHOLD * align < SR ) {
const size_type count_mod = SR % ( div ? div : 1 );
if ( count_mod ) { SR += align - count_mod ; }
}
}
KOKKOS_INLINE_FUNCTION
size_type cardinality() const
{ return size_type(shape_type::N0) * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type capacity() const { return shape_type::N0 * SR ; }
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{
size_type n = 1 ;
if ( 7 < shape_type::rank ) { s[7] = n ; n *= shape_type::N7 ; }
if ( 6 < shape_type::rank ) { s[6] = n ; n *= shape_type::N6 ; }
if ( 5 < shape_type::rank ) { s[5] = n ; n *= shape_type::N5 ; }
if ( 4 < shape_type::rank ) { s[4] = n ; n *= shape_type::N4 ; }
if ( 3 < shape_type::rank ) { s[3] = n ; n *= shape_type::N3 ; }
if ( 2 < shape_type::rank ) { s[2] = n ; n *= shape_type::N2 ; }
if ( 1 < shape_type::rank ) { s[1] = n ; n *= shape_type::N1 ; }
if ( 0 < shape_type::rank ) { s[0] = SR ; }
s[shape_type::rank] = SR * shape_type::N0 ;
}
KOKKOS_INLINE_FUNCTION
size_type stride_7() const { return 1 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_6() const { return shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_5() const { return shape_type::N7 * shape_type::N6 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_4() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_3() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_2() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 * shape_type::N3 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_1() const { return shape_type::N7 * shape_type::N6 * shape_type::N5 * shape_type::N4 * shape_type::N3 * shape_type::N2 ; }
KOKKOS_INLINE_FUNCTION
size_type stride_0() const { return SR ; }
// rank 2
template <typename I0, typename I1>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1 ) const
{
return i1 + i0 * SR ;
}
template <typename I0, typename I1, typename I2>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 ) const
{
return i2 + shape_type::N2 * ( i1 ) +
i0 * SR ;
}
template <typename I0, typename I1, typename I2, typename I3>
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3 ) const
{
return i3 + shape_type::N3 * (
i2 + shape_type::N2 * ( i1 )) +
i0 * SR ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4 ) const
{
return i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * ( i1 ))) +
i0 * SR ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5 ) const
{
return i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * ( i1 )))) +
i0 * SR ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6 ) const
{
return i6 + shape_type::N6 * (
i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * ( i1 ))))) +
i0 * SR ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6, typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
size_type operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6, I7 const& i7 ) const
{
return i7 + shape_type::N7 * (
i6 + shape_type::N6 * (
i5 + shape_type::N5 * (
i4 + shape_type::N4 * (
i3 + shape_type::N3 * (
i2 + shape_type::N2 * ( i1 )))))) +
i0 * SR ;
}
};
//----------------------------------------------------------------------------
// LayoutStride :
template < class ShapeType >
struct ViewOffset< ShapeType , LayoutStride
, typename enable_if<( 0 < ShapeType::rank )>::type >
: public ShapeType
{
typedef size_t size_type;
typedef ShapeType shape_type;
typedef LayoutStride array_layout ;
size_type S[ shape_type::rank + 1 ];
template< class SType , class L >
KOKKOS_INLINE_FUNCTION
bool assign_subview( const ViewOffset<SType,L,void> & rhs
, const size_type n0
, const size_type n1
, const size_type n2
, const size_type n3
, const size_type n4
, const size_type n5
, const size_type n6
, const size_type n7
)
{
shape_type::assign( *this, 0,0,0,0, 0,0,0,0 );
for ( int i = 0 ; i < int(shape_type::rank+1) ; ++i ) { S[i] = 0 ; }
// preconditions:
// shape_type::rank <= rhs.rank
// shape_type::rank == count of nonzero( rhs_dim[i] )
size_type dim[8] = { n0 , n1 , n2 , n3 , n4 , n5 , n6 , n7 };
size_type str[ SType::rank + 1 ];
rhs.stride( str );
// contract the zero-dimensions
int r = 0 ;
for ( int i = 0 ; i < int(SType::rank) ; ++i ) {
if ( 0 != dim[i] ) {
dim[r] = dim[i] ;
str[r] = str[i] ;
++r ;
}
}
if ( int(shape_type::rank) == r ) {
// The shape is non-zero
for ( int i = 0 ; i < int(shape_type::rank) ; ++i ) {
const size_type cap = dim[i] * ( S[i] = str[i] );
if ( S[ shape_type::rank ] < cap ) S[ shape_type::rank ] = cap ;
}
// set the contracted nonzero dimensions
shape_type::assign( *this, dim[0], dim[1], dim[2], dim[3], dim[4], dim[5], dim[6], dim[7] );
}
return true ; // definitely noncontiguous
}
template< unsigned R >
KOKKOS_INLINE_FUNCTION
void assign( size_t n )
{ assign_shape_dimension<R>( *this , n ); }
template< class ShapeRHS , class Layout >
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset<ShapeRHS,Layout> & rhs
, typename enable_if<( int(ShapeRHS::rank) == int(shape_type::rank) )>::type * = 0 )
{
rhs.stride(S);
shape_type::assign( *this, rhs.N0, rhs.N1, rhs.N2, rhs.N3, rhs.N4, rhs.N5, rhs.N6, rhs.N7 );
}
KOKKOS_INLINE_FUNCTION
void assign( const LayoutStride & layout )
{
size_type max = 0 ;
for ( int i = 0 ; i < shape_type::rank ; ++i ) {
S[i] = layout.stride[i] ;
const size_type m = layout.dimension[i] * S[i] ;
if ( max < m ) { max = m ; }
}
S[ shape_type::rank ] = max ;
shape_type::assign( *this, layout.dimension[0], layout.dimension[1],
layout.dimension[2], layout.dimension[3],
layout.dimension[4], layout.dimension[5],
layout.dimension[6], layout.dimension[7] );
}
KOKKOS_INLINE_FUNCTION
void assign( size_t s0 , size_t s1 , size_t s2 , size_t s3
, size_t s4 , size_t s5 , size_t s6 , size_t s7
, size_t s8 )
{
const size_t str[9] = { s0, s1, s2, s3, s4, s5, s6, s7, s8 };
// Last argument is the total length.
// Total length must be non-zero.
// All strides must be non-zero and less than total length.
bool ok = 0 < str[ shape_type::rank ] ;
for ( int i = 0 ; ( i < shape_type::rank ) &&
( ok = 0 < str[i] && str[i] < str[ shape_type::rank ] ); ++i );
if ( ok ) {
size_t dim[8] = { 1,1,1,1,1,1,1,1 };
int iorder[9] = { 0,0,0,0,0,0,0,0,0 };
// Ordering of strides smallest to largest.
for ( int i = 1 ; i < shape_type::rank ; ++i ) {
int j = i ;
for ( ; 0 < j && str[i] < str[ iorder[j-1] ] ; --j ) {
iorder[j] = iorder[j-1] ;
}
iorder[j] = i ;
}
// Last argument is the total length.
iorder[ shape_type::rank ] = shape_type::rank ;
// Determine dimension associated with each stride.
// Guarantees non-overlap by truncating dimension
// if ( 0 != str[ iorder[i+1] ] % str[ iorder[i] ] )
for ( int i = 0 ; i < shape_type::rank ; ++i ) {
dim[ iorder[i] ] = str[ iorder[i+1] ] / str[ iorder[i] ] ;
}
// Assign dimensions and strides:
shape_type::assign( *this, dim[0], dim[1], dim[2], dim[3], dim[4], dim[5], dim[6], dim[7] );
for ( int i = 0 ; i <= shape_type::rank ; ++i ) { S[i] = str[i] ; }
}
else {
shape_type::assign(*this,0,0,0,0,0,0,0,0);
for ( int i = 0 ; i <= shape_type::rank ; ++i ) { S[i] = 0 ; }
}
}
KOKKOS_INLINE_FUNCTION
void set_padding() {}
KOKKOS_INLINE_FUNCTION
size_type cardinality() const
{ return shape_type::N0 * shape_type::N1 * shape_type::N2 * shape_type::N3 * shape_type::N4 * shape_type::N5 * shape_type::N6 * shape_type::N7 ; }
KOKKOS_INLINE_FUNCTION
size_type capacity() const { return S[ shape_type::rank ]; }
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{ for ( int i = 0 ; i <= shape_type::rank ; ++i ) { s[i] = S[i] ; } }
KOKKOS_INLINE_FUNCTION
size_type stride_0() const { return S[0] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_1() const { return S[1] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_2() const { return S[2] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_3() const { return S[3] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_4() const { return S[4] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_5() const { return S[5] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_6() const { return S[6] ; }
KOKKOS_INLINE_FUNCTION
size_type stride_7() const { return S[7] ; }
// rank 1
template <typename I0 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==1),size_type>::type
operator()( I0 const& i0) const
{
return i0 * S[0] ;
}
// rank 2
template <typename I0, typename I1>
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==2),size_type>::type
operator()( I0 const& i0, I1 const& i1 ) const
{
return i0 * S[0] + i1 * S[1] ;
}
template <typename I0, typename I1, typename I2>
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==3),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] ;
}
template <typename I0, typename I1, typename I2, typename I3>
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==4),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] + i3 * S[3] ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==5),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] + i3 * S[3] + i4 * S[4] ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==6),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] + i3 * S[3] + i4 * S[4] + i5 * S[5] ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==7),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] + i3 * S[3] + i4 * S[4] + i5 * S[5] + i6 * S[6] ;
}
template < typename I0, typename I1, typename I2, typename I3
,typename I4, typename I5, typename I6, typename I7 >
KOKKOS_FORCEINLINE_FUNCTION
typename std::enable_if< (std::is_integral<I0>::value) && (shape_type::rank==8),size_type>::type
operator()( I0 const& i0, I1 const& i1, I2 const& i2 , I3 const& i3, I4 const& i4, I5 const& i5, I6 const& i6, I7 const& i7 ) const
{
return i0 * S[0] + i1 * S[1] + i2 * S[2] + i3 * S[3] + i4 * S[4] + i5 * S[5] + i6 * S[6] + i7 * S[7] ;
}
};
//----------------------------------------------------------------------------
template< class T >
struct ViewOffsetRange {
enum { OK_integral_type = Impl::StaticAssert< Impl::is_integral<T>::value >::value };
enum { is_range = false };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const , T const & ) { return 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( T const & i ) { return size_t(i) ; }
};
template<>
struct ViewOffsetRange<void> {
enum { is_range = false };
};
template<>
struct ViewOffsetRange< Kokkos::ALL > {
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , ALL const & ) { return n ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( ALL const & ) { return 0 ; }
};
template< typename iType >
struct ViewOffsetRange< std::pair<iType,iType> > {
enum { OK_integral_type = Impl::StaticAssert< Impl::is_integral<iType>::value >::value };
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , std::pair<iType,iType> const & r )
{ return ( size_t(r.first) < size_t(r.second) && size_t(r.second) <= n ) ? size_t(r.second) - size_t(r.first) : 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( std::pair<iType,iType> const & r ) { return size_t(r.first) ; }
};
template< typename iType >
struct ViewOffsetRange< Kokkos::pair<iType,iType> > {
enum { OK_integral_type = Impl::StaticAssert< Impl::is_integral<iType>::value >::value };
enum { is_range = true };
KOKKOS_INLINE_FUNCTION static
size_t dimension( size_t const n , Kokkos::pair<iType,iType> const & r )
{ return ( size_t(r.first) < size_t(r.second) && size_t(r.second) <= n ) ? size_t(r.second) - size_t(r.first) : 0 ; }
KOKKOS_INLINE_FUNCTION static
size_t begin( Kokkos::pair<iType,iType> const & r ) { return size_t(r.first) ; }
};
}} // namespace Kokkos::Impl
#endif //KOKKOS_VIEWOFFSET_HPP
diff --git a/lib/kokkos/core/src/impl/Kokkos_ViewSupport.hpp b/lib/kokkos/core/src/impl/Kokkos_ViewSupport.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_ViewTileLeft.hpp b/lib/kokkos/core/src/impl/Kokkos_ViewTileLeft.hpp
old mode 100755
new mode 100644
index 91d30927a..0bbb781c8
--- a/lib/kokkos/core/src/impl/Kokkos_ViewTileLeft.hpp
+++ b/lib/kokkos/core/src/impl/Kokkos_ViewTileLeft.hpp
@@ -1,195 +1,209 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_VIEWTILELEFT_HPP
#define KOKKOS_VIEWTILELEFT_HPP
+#include <impl/KokkosExp_ViewTile.hpp>
+
+#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
+
+namespace Kokkos {
+
+using Kokkos::Experimental::tile_subview ;
+
+}
+
+#else
+
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
namespace Kokkos {
namespace Impl {
template< class T , unsigned N0 , unsigned N1 , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< T , void , LayoutTileLeft<N0,N1> , MemorySpace , MemoryTraits >
{
typedef ViewDefault type ;
};
struct ViewTile {};
template< class ShapeType , unsigned N0 , unsigned N1 >
struct ViewOffset< ShapeType
, LayoutTileLeft<N0,N1,true> /* Only accept properly shaped tiles */
, typename Impl::enable_if<( 2 == ShapeType::rank
&&
2 == ShapeType::rank_dynamic
)>::type >
: public ShapeType
{
enum { SHIFT_0 = Impl::power_of_two<N0>::value };
enum { SHIFT_1 = Impl::power_of_two<N1>::value };
enum { MASK_0 = N0 - 1 };
enum { MASK_1 = N1 - 1 };
typedef size_t size_type ;
typedef ShapeType shape_type ;
typedef LayoutTileLeft<N0,N1,true> array_layout ;
enum { has_padding = true };
size_type tile_N0 ;
KOKKOS_INLINE_FUNCTION
void assign( const ViewOffset & rhs )
{
shape_type::N0 = rhs.N0 ;
shape_type::N1 = rhs.N1 ;
tile_N0 = ( rhs.N0 + MASK_0 ) >> SHIFT_0 ; // number of tiles in first dimension
}
KOKKOS_INLINE_FUNCTION
void assign( size_t n0 , size_t n1
, int = 0 , int = 0
, int = 0 , int = 0
, int = 0 , int = 0
, int = 0
)
{
shape_type::N0 = n0 ;
shape_type::N1 = n1 ;
tile_N0 = ( n0 + MASK_0 ) >> SHIFT_0 ; // number of tiles in first dimension
}
KOKKOS_INLINE_FUNCTION
void set_padding() {}
template< typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION
size_type operator()( I0 const & i0 , I1 const & i1
, int = 0 , int = 0
, int = 0 , int = 0
, int = 0 , int = 0
) const
{
return /* ( ( Tile offset ) * ( Tile size ) ) */
( ( (i0>>SHIFT_0) + tile_N0 * (i1>>SHIFT_1) ) << (SHIFT_0 + SHIFT_1) ) +
/* ( Offset within tile ) */
( (i0 & MASK_0) + ((i1 & MASK_1)<<SHIFT_0) ) ;
}
template< typename I0 , typename I1 >
KOKKOS_INLINE_FUNCTION
size_type tile_begin( I0 const & i_tile0 , I1 const & i_tile1 ) const
{
return ( i_tile0 + tile_N0 * i_tile1 ) << ( SHIFT_0 + SHIFT_1 );
}
KOKKOS_INLINE_FUNCTION
size_type capacity() const
{
// ( TileDim0 * ( TileDim1 ) ) * TileSize
return ( tile_N0 * ( ( shape_type::N1 + MASK_1 ) >> SHIFT_1 ) ) << ( SHIFT_0 + SHIFT_1 );
}
};
template<>
struct ViewAssignment< ViewTile , void , void >
{
// Some compilers have type-matching issues on the integer values when using:
// template< class T , unsigned N0 , unsigned N1 , class A2 , class A3 >
template< class T , unsigned dN0 , unsigned dN1
, class A2 , class A3
, unsigned sN0 , unsigned sN1 >
KOKKOS_INLINE_FUNCTION
ViewAssignment( View< T[dN0][dN1], LayoutLeft, A2, A3, Impl::ViewDefault > & dst
, View< T** , LayoutTileLeft<sN0,sN1,true>, A2, A3, Impl::ViewDefault > const & src
, size_t const i_tile0
, typename Impl::enable_if< unsigned(dN0) == unsigned(sN0) &&
unsigned(dN1) == unsigned(sN1)
, size_t const
>::type i_tile1
)
{
// Destination is always contiguous but source may be non-contiguous
// so don't assign the whole view management object.
// Just query and appropriately set the reference-count state.
if ( ! src.m_management.is_managed() ) dst.m_management.set_unmanaged();
dst.m_ptr_on_device = src.m_ptr_on_device + src.m_offset_map.tile_begin(i_tile0,i_tile1);
dst.m_tracker = src.m_tracker;
}
};
} /* namespace Impl */
} /* namespace Kokkos */
namespace Kokkos {
template< class T , unsigned N0, unsigned N1, class A2, class A3 >
KOKKOS_INLINE_FUNCTION
View< T[N0][N1], LayoutLeft, A2, A3, Impl::ViewDefault >
tile_subview( const View<T**,LayoutTileLeft<N0,N1,true>,A2,A3,Impl::ViewDefault> & src
, const size_t i_tile0
, const size_t i_tile1
)
{
View< T[N0][N1], LayoutLeft, A2, A3, Impl::ViewDefault > dst ;
(void) Impl::ViewAssignment< Impl::ViewTile , void , void >( dst , src , i_tile0 , i_tile1 );
return dst ;
}
} /* namespace Kokkos */
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
+#endif
+
#endif /* #ifndef KOKKOS_VIEWTILELEFT_HPP */
diff --git a/lib/kokkos/core/src/impl/Kokkos_Volatile_Load.hpp b/lib/kokkos/core/src/impl/Kokkos_Volatile_Load.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_hwloc.cpp b/lib/kokkos/core/src/impl/Kokkos_hwloc.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp b/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp
old mode 100755
new mode 100644
index abd845da9..e16d9c495
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp
+++ b/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp
@@ -1,82 +1,82 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_Macros.hpp>
#include <impl/Kokkos_spinwait.hpp>
/*--------------------------------------------------------------------------*/
#if ( KOKKOS_ENABLE_ASM )
- #if defined( __arm__ )
+ #if defined( __arm__ ) || defined( __aarch64__ )
/* No-operation instruction to idle the thread. */
#define YIELD asm volatile("nop")
#else
/* Pause instruction to prevent excess processor bus usage */
#define YIELD asm volatile("pause\n":::"memory")
#endif
#elif defined ( KOKKOS_HAVE_WINTHREAD )
#include <process.h>
#define YIELD Sleep(0)
#elif defined ( _WIN32 )
#define YIELD __asm__ __volatile__("pause\n":::"memory")
#else
#include <sched.h>
#define YIELD sched_yield()
#endif
/*--------------------------------------------------------------------------*/
namespace Kokkos {
namespace Impl {
#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
void spinwait( volatile int & flag , const int value )
{
while ( value == flag ) {
YIELD ;
}
}
#endif
} /* namespace Impl */
} /* namespace Kokkos */
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/Makefile b/lib/kokkos/core/unit_test/Makefile
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestAggregate.hpp b/lib/kokkos/core/unit_test/TestAggregate.hpp
old mode 100755
new mode 100644
index 35e7a8930..b16e17b4c
--- a/lib/kokkos/core/unit_test/TestAggregate.hpp
+++ b/lib/kokkos/core/unit_test/TestAggregate.hpp
@@ -1,716 +1,753 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef TEST_AGGREGATE_HPP
#define TEST_AGGREGATE_HPP
#include <gtest/gtest.h>
#include <stdexcept>
#include <sstream>
#include <iostream>
/*--------------------------------------------------------------------------*/
+#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
+
namespace Test {
struct EmbedArray {};
struct ArrayProxyContiguous {};
struct ArrayProxyStrided {};
template< typename T , unsigned N = 0 , class Proxy = void >
struct Array ;
template< typename T >
struct Array<T,0,ArrayProxyContiguous>
{
public:
typedef T value_type ;
enum { StaticLength = 0 };
T * const value ;
const unsigned count ;
KOKKOS_INLINE_FUNCTION
Array( T * v , unsigned n ) : value(v), count(n) {}
template< class Proxy >
KOKKOS_INLINE_FUNCTION
Array & operator = ( const Array<T,0,Proxy> & rhs ) { return *this ; }
};
template< typename T , unsigned N >
struct Array<T,N,ArrayProxyContiguous>
{
public:
typedef T value_type ;
enum { StaticLength = N };
T * const value ;
KOKKOS_INLINE_FUNCTION
Array( T * v , unsigned ) : value(v) {}
template< class Proxy >
KOKKOS_INLINE_FUNCTION
Array & operator = ( const Array<T,N,Proxy> & rhs ) { return *this ; }
};
template< typename T , unsigned N >
struct Array<T,N,ArrayProxyStrided>
{
public:
typedef T value_type ;
enum { StaticLength = N };
T * const value ;
const unsigned stride ;
KOKKOS_INLINE_FUNCTION
Array( T * v , unsigned , unsigned s ) : value(v), stride(s) {}
template< class Proxy >
KOKKOS_INLINE_FUNCTION
Array & operator = ( const Array<T,N,Proxy> & rhs ) { return *this ; }
};
template< typename T >
struct Array<T,0,ArrayProxyStrided>
{
public:
typedef T value_type ;
enum { StaticLength = 0 };
T * const value ;
const unsigned count ;
const unsigned stride ;
KOKKOS_INLINE_FUNCTION
Array( T * v , unsigned n , unsigned s ) : value(v), count(n), stride(s) {}
template< class Proxy >
KOKKOS_INLINE_FUNCTION
Array & operator = ( const Array<T,0,Proxy> & rhs ) { return *this ; }
};
template< typename T >
struct Array<T,0,void>
{
public:
typedef T value_type ;
enum { StaticLength = 0 };
T * value ;
const unsigned count ;
KOKKOS_INLINE_FUNCTION
Array() : value(0) , count(0) {}
template< unsigned N , class Proxy >
KOKKOS_INLINE_FUNCTION
Array( const Array<T,N,Proxy> & rhs ) : value(rhs.value), count(N) {}
};
template< typename T , unsigned N >
struct Array<T,N,void>
{
public:
typedef T value_type ;
enum { StaticLength = N };
T value[N] ;
template< class Proxy >
KOKKOS_INLINE_FUNCTION
Array & operator = ( const Array<T,N,Proxy> & ) { return *this ; }
};
} // namespace Test
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
-#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
-
namespace Kokkos {
namespace Impl {
template< typename T , unsigned N >
struct AnalyzeShape< Test::Array< T , N > >
: public ShapeInsert< typename AnalyzeShape< T >::shape , N >::type
{
private:
typedef AnalyzeShape< T > nested ;
public:
typedef Test::EmbedArray specialize ;
typedef typename ShapeInsert< typename nested::shape , N >::type shape ;
typedef typename nested::array_intrinsic_type array_intrinsic_type[ N ];
typedef Test::Array< T , N > value_type ;
typedef Test::Array< T , N > type ;
typedef const array_intrinsic_type const_array_intrinsic_type ;
typedef const value_type const_value_type ;
typedef const type const_type ;
typedef typename nested::non_const_array_intrinsic_type non_const_array_intrinsic_type[ N ];
typedef Test::Array< typename nested::non_const_value_type , N > non_const_value_type ;
typedef Test::Array< typename nested::non_const_value_type , N > non_const_type ;
};
template< typename T >
struct AnalyzeShape< Test::Array< T , 0 > >
: public ShapeInsert< typename AnalyzeShape< T >::shape , 0 >::type
{
private:
typedef AnalyzeShape< T > nested ;
public:
typedef Test::EmbedArray specialize ;
typedef typename ShapeInsert< typename nested::shape , 0 >::type shape ;
typedef typename nested::array_intrinsic_type * array_intrinsic_type ;
typedef Test::Array< T , 0 > value_type ;
typedef Test::Array< T , 0 > type ;
typedef const array_intrinsic_type const_array_intrinsic_type ;
typedef const value_type const_value_type ;
typedef const type const_type ;
typedef typename nested::non_const_array_intrinsic_type * non_const_array_intrinsic_type ;
typedef Test::Array< typename nested::non_const_value_type , 0 > non_const_value_type ;
typedef Test::Array< typename nested::non_const_value_type , 0 > non_const_type ;
};
/*--------------------------------------------------------------------------*/
template< class ValueType , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< ValueType
, Test::EmbedArray
, LayoutLeft
, MemorySpace
, MemoryTraits >
{ typedef Test::EmbedArray type ; };
template< class ValueType , class MemorySpace , class MemoryTraits >
struct ViewSpecialize< ValueType
, Test::EmbedArray
, LayoutRight
, MemorySpace
, MemoryTraits >
{ typedef Test::EmbedArray type ; };
/*--------------------------------------------------------------------------*/
template<>
struct ViewAssignment< Test::EmbedArray , Test::EmbedArray , void >
{
//------------------------------------
/** \brief Compatible value and shape */
template< class DT , class DL , class DD , class DM ,
class ST , class SL , class SD , class SM >
KOKKOS_INLINE_FUNCTION
ViewAssignment( View<DT,DL,DD,DM,Test::EmbedArray> & dst
, const View<ST,SL,SD,SM,Test::EmbedArray> & src
, const typename enable_if<(
ViewAssignable< ViewTraits<DT,DL,DD,DM> ,
ViewTraits<ST,SL,SD,SM> >::value
)>::type * = 0
)
{
dst.m_offset_map.assign( src.m_offset_map );
dst.m_ptr_on_device = src.m_ptr_on_device ;
dst.m_tracker = src.m_tracker;
}
};
template<>
struct ViewAssignment< ViewDefault , Test::EmbedArray , void >
{
//------------------------------------
/** \brief Compatible value and shape */
template< class ST , class SL , class SD , class SM >
KOKKOS_INLINE_FUNCTION
ViewAssignment( typename View<ST,SL,SD,SM,Test::EmbedArray>::array_type & dst
, const View<ST,SL,SD,SM,Test::EmbedArray> & src
)
{
dst.m_offset_map.assign( src.m_offset_map );
dst.m_ptr_on_device = src.m_ptr_on_device ;
dst.m_tracker = src.m_tracker;
}
};
} // namespace Impl
} // namespace Kokkos
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Kokkos {
template< class DataType ,
class Arg1Type ,
class Arg2Type ,
class Arg3Type >
class View< DataType , Arg1Type , Arg2Type , Arg3Type , Test::EmbedArray >
: public ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type >
{
public:
typedef ViewTraits< DataType , Arg1Type , Arg2Type, Arg3Type > traits ;
private:
// Assignment of compatible views requirement:
template< class , class , class , class , class > friend class View ;
// Assignment of compatible subview requirement:
template< class , class , class > friend struct Impl::ViewAssignment ;
typedef Impl::ViewOffset< typename traits::shape_type ,
typename traits::array_layout > offset_map_type ;
typedef Impl::ViewDataManagement< traits > view_data_management ;
// traits::value_type = Test::Array< T , N >
typename traits::value_type::value_type * m_ptr_on_device ;
offset_map_type m_offset_map ;
view_data_management m_management ;
Impl::AllocationTracker m_tracker ;
public:
typedef View< typename traits::array_intrinsic_type ,
typename traits::array_layout ,
typename traits::execution_space ,
typename traits::memory_traits > array_type ;
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::execution_space ,
typename traits::memory_traits > non_const_type ;
typedef View< typename traits::const_data_type ,
typename traits::array_layout ,
typename traits::execution_space ,
typename traits::memory_traits > const_type ;
typedef View< typename traits::non_const_data_type ,
typename traits::array_layout ,
typename traits::host_mirror_space ,
void > HostMirror ;
//------------------------------------
// Shape
enum { Rank = traits::rank - 1 };
KOKKOS_INLINE_FUNCTION typename traits::shape_type shape() const { return m_offset_map ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_0() const { return m_offset_map.N0 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_1() const { return m_offset_map.N1 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_2() const { return m_offset_map.N2 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_3() const { return m_offset_map.N3 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_4() const { return m_offset_map.N4 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_5() const { return m_offset_map.N5 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_6() const { return m_offset_map.N6 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type dimension_7() const { return m_offset_map.N7 ; }
KOKKOS_INLINE_FUNCTION typename traits::size_type size() const
{
return m_offset_map.N0
* m_offset_map.N1
* m_offset_map.N2
* m_offset_map.N3
* m_offset_map.N4
* m_offset_map.N5
* m_offset_map.N6
* m_offset_map.N7
;
}
template< typename iType >
KOKKOS_INLINE_FUNCTION
typename traits::size_type dimension( const iType & i ) const
{ return Impl::dimension( m_offset_map , i ); }
//------------------------------------
// Destructor, constructors, assignment operators:
KOKKOS_INLINE_FUNCTION
~View() {}
KOKKOS_INLINE_FUNCTION
View()
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{ m_offset_map.assing(0,0,0,0,0,0,0,0); }
KOKKOS_INLINE_FUNCTION
View( const View & rhs )
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{
(void) Impl::ViewAssignment<
typename traits::specialize ,
typename traits::specialize >( *this , rhs );
}
KOKKOS_INLINE_FUNCTION
View & operator = ( const View & rhs )
{
(void) Impl::ViewAssignment<
typename traits::specialize ,
typename traits::specialize >( *this , rhs );
return *this ;
}
//------------------------------------
// Construct or assign compatible view:
template< class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
View( const View<RT,RL,RD,RM,RS> & rhs )
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{
(void) Impl::ViewAssignment<
typename traits::specialize , RS >( *this , rhs );
}
template< class RT , class RL , class RD , class RM , class RS >
KOKKOS_INLINE_FUNCTION
View & operator = ( const View<RT,RL,RD,RM,RS> & rhs )
{
(void) Impl::ViewAssignment<
typename traits::specialize , RS >( *this , rhs );
return *this ;
}
//------------------------------------
// Allocation of a managed view with possible alignment padding.
template< class AllocationProperties >
explicit inline
View( const AllocationProperties & prop ,
const typename Impl::ViewAllocProp< traits , AllocationProperties >::size_type n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{
typedef Impl::ViewAllocProp< traits , AllocationProperties > Alloc ;
typedef typename traits::memory_space memory_space ;
typedef typename traits::value_type::value_type scalar_type ;
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
m_offset_map.set_padding();
m_tracker = memory_space::allocate_and_track( Alloc::label( prop ), sizeof(scalar_type) * m_offset_map.capacity() );
m_ptr_on_device = reinterpret_cast<scalar_type *>(m_tracker.alloc_ptr());
(void) Impl::ViewDefaultConstruct< typename traits::execution_space , scalar_type , Alloc::Initialize >( m_ptr_on_device , m_offset_map.capacity() );
}
//------------------------------------
// Assign an unmanaged View from pointer, can be called in functors.
// No alignment padding is performed.
typedef Impl::if_c< ! traits::is_managed ,
typename traits::value_type::value_type * ,
Impl::ViewError::user_pointer_constructor_requires_unmanaged >
if_user_pointer_constructor ;
View( typename if_user_pointer_constructor::type ptr ,
const size_t n0 = 0 ,
const size_t n1 = 0 ,
const size_t n2 = 0 ,
const size_t n3 = 0 ,
const size_t n4 = 0 ,
const size_t n5 = 0 ,
const size_t n6 = 0 ,
const size_t n7 = 0 )
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
m_ptr_on_device = if_user_pointer_constructor::select( ptr );
m_management.set_unmanaged();
}
//------------------------------------
// Assign unmanaged View to portion of Device shared memory
typedef Impl::if_c< ! traits::is_managed ,
typename traits::execution_space ,
Impl::ViewError::device_shmem_constructor_requires_unmanaged >
if_device_shmem_constructor ;
explicit KOKKOS_INLINE_FUNCTION
View( typename if_device_shmem_constructor::type & dev ,
const unsigned n0 = 0 ,
const unsigned n1 = 0 ,
const unsigned n2 = 0 ,
const unsigned n3 = 0 ,
const unsigned n4 = 0 ,
const unsigned n5 = 0 ,
const unsigned n6 = 0 ,
const unsigned n7 = 0 )
: m_ptr_on_device(0)
, m_offset_map()
, m_management()
, m_tracker()
{
typedef typename traits::value_type::value_type scalar_type ;
enum { align = 8 };
enum { mask = align - 1 };
typedef Impl::if_c< ! traits::is_managed ,
scalar_type * ,
Impl::ViewError::device_shmem_constructor_requires_unmanaged >
if_device_shmem_pointer ;
m_offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
// Select the first argument:
m_ptr_on_device = if_device_shmem_pointer::select(
(scalar_type *) dev.get_shmem( unsigned( sizeof(scalar_type) * m_offset_map.capacity() + unsigned(mask) ) & ~unsigned(mask) ) );
}
static inline
unsigned shmem_size( const unsigned n0 = 0 ,
const unsigned n1 = 0 ,
const unsigned n2 = 0 ,
const unsigned n3 = 0 ,
const unsigned n4 = 0 ,
const unsigned n5 = 0 ,
const unsigned n6 = 0 ,
const unsigned n7 = 0 )
{
enum { align = 8 };
enum { mask = align - 1 };
typedef typename traits::value_type::value_type scalar_type ;
offset_map_type offset_map ;
offset_map.assign( n0, n1, n2, n3, n4, n5, n6, n7 );
return unsigned( sizeof(scalar_type) * offset_map.capacity() + unsigned(mask) ) & ~unsigned(mask) ;
}
//------------------------------------
// Is not allocated
KOKKOS_INLINE_FUNCTION
bool is_null() const { return 0 == m_ptr_on_device ; }
//------------------------------------
// LayoutLeft, rank 2:
typedef Test::Array< typename traits::value_type::value_type ,
traits::value_type::StaticLength ,
Test::ArrayProxyStrided > LeftValue ;
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< LeftValue , traits, LayoutLeft, 2, iType0 >::type
operator[] ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return LeftValue( m_ptr_on_device + i0 , m_offset_map.N1 , m_offset_map.S0 );
}
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< LeftValue , traits, LayoutLeft, 2, iType0 >::type
operator() ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return LeftValue( m_ptr_on_device + i0 , m_offset_map.N1 , m_offset_map.S0 );
}
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< LeftValue , traits, LayoutLeft, 2, iType0 >::type
at( const iType0 & i0 , const int , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return LeftValue( m_ptr_on_device + i0 , m_offset_map.N1 , m_offset_map.S0 );
}
//------------------------------------
// LayoutRight, rank 2:
typedef Test::Array< typename traits::value_type::value_type ,
traits::value_type::StaticLength ,
Test::ArrayProxyContiguous > RightValue ;
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< RightValue , traits, LayoutRight, 2, iType0 >::type
operator[] ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return RightValue( m_ptr_on_device + i0 , m_offset_map.N1 );
}
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< RightValue , traits, LayoutRight, 2, iType0 >::type
operator() ( const iType0 & i0 ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return RightValue( m_ptr_on_device + i0 , m_offset_map.N1 );
}
template< typename iType0 >
KOKKOS_INLINE_FUNCTION
typename Impl::ViewEnableArrayOper< RightValue , traits, LayoutRight, 2, iType0 >::type
at( const iType0 & i0 , const int , const int , const int ,
const int , const int , const int , const int ) const
{
KOKKOS_ASSERT_SHAPE_BOUNDS_2( m_offset_map, i0, 0 );
KOKKOS_RESTRICT_EXECUTION_TO_DATA( typename traits::memory_space , m_ptr_on_device );
return RightValue( m_ptr_on_device + i0 , m_offset_map.N1 );
}
//------------------------------------
// Access to the underlying contiguous storage of this view specialization.
// These methods are specific to specialization of a view.
KOKKOS_INLINE_FUNCTION
typename traits::value_type::value_type * ptr_on_device() const { return m_ptr_on_device ; }
// Stride of physical storage, dimensioned to at least Rank
template< typename iType >
KOKKOS_INLINE_FUNCTION
void stride( iType * const s ) const
{ m_offset_map.stride( s ); }
// Count of contiguously allocated data members including padding.
KOKKOS_INLINE_FUNCTION
typename traits::size_type capacity() const
{ return m_offset_map.capacity(); }
};
} // namespace Kokkos
-#endif /* #if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
-
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace Test {
template< class DeviceType >
int TestViewAggregate()
{
-
-#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
-
typedef Kokkos::View< Test::Array<double,32> * , DeviceType > a32_type ;
typedef typename a32_type::array_type a32_base_type ;
typedef Kokkos::View< Test::Array<double> * , DeviceType > a0_type ;
typedef typename a0_type::array_type a0_base_type ;
a32_type a32("a32",100);
a32_base_type a32_base ;
a0_type a0("a0",100,32);
a0_base_type a0_base ;
a32_base = a32 ;
a0_base = a0 ;
-#endif /* #if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
return 0 ;
}
}
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
+
+#else /* #if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
+
+namespace Test {
+
+template< class DeviceType >
+int TestViewAggregate()
+{
+/*
+ typedef Kokkos::ViewTraits< Kokkos::Array<double,32> ** , DeviceType > a32_traits ;
+ typedef Kokkos::ViewTraits< typename a32_traits::array_scalar_type , DeviceType > flat_traits ;
+
+ static_assert( std::is_same< typename a32_traits::specialize , Kokkos::Array<> >::value , "" );
+ static_assert( a32_traits::rank == 2 , "" );
+ static_assert( a32_traits::rank_dynamic == 2 , "" );
+
+ static_assert( std::is_same< typename flat_traits::specialize , void >::value , "" );
+ static_assert( flat_traits::rank == 3 , "" );
+ static_assert( flat_traits::rank_dynamic == 2 , "" );
+ static_assert( flat_traits::dimension::N2 == 32 , "" );
+
+
+
+
+ typedef Kokkos::View< Kokkos::Array<double,32> ** , DeviceType > a32_type ;
+ typedef typename a32_type::array_type a32_flat_type ;
+
+
+ static_assert( a32_type::Rank == 2 , "" );
+ static_assert( a32_flat_type::Rank == 3 , "" );
+*/
+
+ return 0 ;
+}
+
+}
+
+#endif /* #if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW ) */
+
+/*--------------------------------------------------------------------------*/
+/*--------------------------------------------------------------------------*/
#endif /* #ifndef TEST_AGGREGATE_HPP */
diff --git a/lib/kokkos/core/unit_test/TestAggregateReduction.hpp b/lib/kokkos/core/unit_test/TestAggregateReduction.hpp
old mode 100755
new mode 100644
index 7175d3434..9c2a4735a
--- a/lib/kokkos/core/unit_test/TestAggregateReduction.hpp
+++ b/lib/kokkos/core/unit_test/TestAggregateReduction.hpp
@@ -1,189 +1,195 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef TEST_AGGREGATE_REDUCTION_HPP
#define TEST_AGGREGATE_REDUCTION_HPP
#include <gtest/gtest.h>
#include <stdexcept>
#include <sstream>
#include <iostream>
namespace Test {
template< typename T , unsigned N >
struct StaticArray {
T value[N] ;
KOKKOS_INLINE_FUNCTION
StaticArray()
{ for ( unsigned i = 0 ; i < N ; ++i ) value[i] = T(); }
KOKKOS_INLINE_FUNCTION
StaticArray( const StaticArray & rhs )
{ for ( unsigned i = 0 ; i < N ; ++i ) value[i] = rhs.value[i]; }
KOKKOS_INLINE_FUNCTION
operator T () { return value[0]; }
KOKKOS_INLINE_FUNCTION
StaticArray & operator = ( const T & rhs )
{
for ( unsigned i = 0 ; i < N ; ++i ) value[i] = rhs ;
return *this ;
}
KOKKOS_INLINE_FUNCTION
StaticArray & operator = ( const StaticArray & rhs )
{
for ( unsigned i = 0 ; i < N ; ++i ) value[i] = rhs.value[i] ;
return *this ;
}
KOKKOS_INLINE_FUNCTION
StaticArray operator * ( const StaticArray & rhs )
{
StaticArray tmp ;
for ( unsigned i = 0 ; i < N ; ++i ) tmp.value[i] = value[i] * rhs.value[i] ;
return tmp ;
}
KOKKOS_INLINE_FUNCTION
StaticArray operator + ( const StaticArray & rhs )
{
StaticArray tmp ;
for ( unsigned i = 0 ; i < N ; ++i ) tmp.value[i] = value[i] + rhs.value[i] ;
return tmp ;
}
KOKKOS_INLINE_FUNCTION
StaticArray & operator += ( const StaticArray & rhs )
{
for ( unsigned i = 0 ; i < N ; ++i ) value[i] += rhs.value[i] ;
return *this ;
}
KOKKOS_INLINE_FUNCTION
void operator += ( const volatile StaticArray & rhs ) volatile
{
for ( unsigned i = 0 ; i < N ; ++i ) value[i] += rhs.value[i] ;
}
};
template< typename T , class Space >
struct DOT {
typedef T value_type ;
typedef Space execution_space ;
Kokkos::View< value_type * , Space > a ;
Kokkos::View< value_type * , Space > b ;
DOT( const Kokkos::View< value_type * , Space > arg_a
, const Kokkos::View< value_type * , Space > arg_b
)
: a( arg_a ), b( arg_b ) {}
KOKKOS_INLINE_FUNCTION
void operator()( const int i , value_type & update ) const
{
update += a(i) * b(i);
}
};
template< typename T , class Space >
struct FILL {
typedef T value_type ;
typedef Space execution_space ;
Kokkos::View< value_type * , Space > a ;
Kokkos::View< value_type * , Space > b ;
FILL( const Kokkos::View< value_type * , Space > & arg_a
, const Kokkos::View< value_type * , Space > & arg_b
)
: a( arg_a ), b( arg_b ) {}
KOKKOS_INLINE_FUNCTION
void operator()( const int i ) const
{
a(i) = i % 2 ? i + 1 : 1 ;
b(i) = i % 2 ? 1 : i + 1 ;
}
};
template< class Space >
void TestViewAggregateReduction()
{
+
+#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
+
const int count = 2 ;
const long result = count % 2 ? ( count * ( ( count + 1 ) / 2 ) )
: ( ( count / 2 ) * ( count + 1 ) );
Kokkos::View< long * , Space > a("a",count);
Kokkos::View< long * , Space > b("b",count);
Kokkos::View< StaticArray<long,4> * , Space > a4("a4",count);
Kokkos::View< StaticArray<long,4> * , Space > b4("b4",count);
Kokkos::View< StaticArray<long,10> * , Space > a10("a10",count);
Kokkos::View< StaticArray<long,10> * , Space > b10("b10",count);
Kokkos::parallel_for( count , FILL<long,Space>(a,b) );
Kokkos::parallel_for( count , FILL< StaticArray<long,4> , Space >(a4,b4) );
Kokkos::parallel_for( count , FILL< StaticArray<long,10> , Space >(a10,b10) );
long r = 0;
StaticArray<long,4> r4 ;
StaticArray<long,10> r10 ;
Kokkos::parallel_reduce( count , DOT<long,Space>(a,b) , r );
Kokkos::parallel_reduce( count , DOT< StaticArray<long,4> , Space >(a4,b4) , r4 );
Kokkos::parallel_reduce( count , DOT< StaticArray<long,10> , Space >(a10,b10) , r10 );
ASSERT_EQ( result , r );
for ( int i = 0 ; i < 10 ; ++i ) { ASSERT_EQ( result , r10.value[i] ); }
for ( int i = 0 ; i < 4 ; ++i ) { ASSERT_EQ( result , r4.value[i] ); }
+
+#endif
+
}
}
#endif /* #ifndef TEST_AGGREGATE_REDUCTION_HPP */
diff --git a/lib/kokkos/core/unit_test/TestAllocationTracker.cpp b/lib/kokkos/core/unit_test/TestAllocationTracker.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestAtomic.hpp b/lib/kokkos/core/unit_test/TestAtomic.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestCXX11.hpp b/lib/kokkos/core/unit_test/TestCXX11.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp b/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp
old mode 100755
new mode 100644
index 9d20079b2..359e17a44
--- a/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp
+++ b/lib/kokkos/core/unit_test/TestCXX11Deduction.hpp
@@ -1,103 +1,94 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_Core.hpp>
#ifndef TESTCXX11DEDUCTION_HPP
#define TESTCXX11DEDUCTION_HPP
namespace TestCXX11 {
-#if defined( KOKKOS_HAVE_CXX11 )
-
struct TestReductionDeductionTagA {};
struct TestReductionDeductionTagB {};
template < class ExecSpace >
struct TestReductionDeductionFunctor {
// KOKKOS_INLINE_FUNCTION
// void operator()( long i , long & value ) const
// { value += i + 1 ; }
KOKKOS_INLINE_FUNCTION
void operator()( TestReductionDeductionTagA , long i , long & value ) const
{ value += ( 2 * i + 1 ) + ( 2 * i + 2 ); }
KOKKOS_INLINE_FUNCTION
void operator()( const TestReductionDeductionTagB & , const long i , long & value ) const
{ value += ( 3 * i + 1 ) + ( 3 * i + 2 ) + ( 3 * i + 3 ) ; }
};
template< class ExecSpace >
void test_reduction_deduction()
{
typedef TestReductionDeductionFunctor< ExecSpace > Functor ;
const long N = 50 ;
// const long answer = N % 2 ? ( N * ((N+1)/2 )) : ( (N/2) * (N+1) );
const long answerA = N % 2 ? ( (2*N) * (((2*N)+1)/2 )) : ( ((2*N)/2) * ((2*N)+1) );
const long answerB = N % 2 ? ( (3*N) * (((3*N)+1)/2 )) : ( ((3*N)/2) * ((3*N)+1) );
long result = 0 ;
// Kokkos::parallel_reduce( Kokkos::RangePolicy<ExecSpace>(0,N) , Functor() , result );
// ASSERT_EQ( answer , result );
Kokkos::parallel_reduce( Kokkos::RangePolicy<ExecSpace,TestReductionDeductionTagA>(0,N) , Functor() , result );
ASSERT_EQ( answerA , result );
Kokkos::parallel_reduce( Kokkos::RangePolicy<ExecSpace,TestReductionDeductionTagB>(0,N) , Functor() , result );
ASSERT_EQ( answerB , result );
}
-#else /* ! defined( KOKKOS_HAVE_CXX11 ) */
-
-template< class ExecSpace >
-void test_reduction_deduction() {}
-
-#endif /* ! defined( KOKKOS_HAVE_CXX11 ) */
-
}
#endif
diff --git a/lib/kokkos/core/unit_test/TestCompilerMacros.hpp b/lib/kokkos/core/unit_test/TestCompilerMacros.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestCuda.cpp b/lib/kokkos/core/unit_test/TestCuda.cpp
old mode 100755
new mode 100644
index 4a74d1f18..17c757f2b
--- a/lib/kokkos/core/unit_test/TestCuda.cpp
+++ b/lib/kokkos/core/unit_test/TestCuda.cpp
@@ -1,495 +1,491 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <iostream>
#include <Kokkos_Core.hpp>
//----------------------------------------------------------------------------
#include <impl/Kokkos_ViewTileLeft.hpp>
+#include <TestTile.hpp>
//----------------------------------------------------------------------------
#include <TestSharedAlloc.hpp>
#include <TestViewMapping.hpp>
#include <TestViewImpl.hpp>
#include <TestAtomic.hpp>
#include <TestViewAPI.hpp>
#include <TestViewSubview.hpp>
-#include <TestTile.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestRange.hpp>
#include <TestTeam.hpp>
#include <TestAggregate.hpp>
#include <TestAggregateReduction.hpp>
#include <TestCompilerMacros.hpp>
#include <TestMemorySpaceTracking.hpp>
#include <TestTeamVector.hpp>
#include <TestTemplateMetaFunctions.hpp>
#include <TestCXX11Deduction.hpp>
//----------------------------------------------------------------------------
class cuda : public ::testing::Test {
protected:
static void SetUpTestCase()
{
Kokkos::Cuda::print_configuration( std::cout );
Kokkos::HostSpace::execution_space::initialize();
Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
}
static void TearDownTestCase()
{
Kokkos::Cuda::finalize();
Kokkos::HostSpace::execution_space::finalize();
}
};
//----------------------------------------------------------------------------
namespace Test {
__global__
void test_abort()
{
Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<
Kokkos::CudaSpace ,
Kokkos::HostSpace >::verify();
}
__global__
void test_cuda_spaces_int_value( int * ptr )
{
if ( *ptr == 42 ) { *ptr = 2 * 42 ; }
}
TEST_F( cuda , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Cuda >() ) );
}
TEST_F( cuda , memory_space )
{
TestMemorySpace< Kokkos::Cuda >();
}
TEST_F( cuda, spaces )
{
if ( Kokkos::CudaUVMSpace::available() ) {
Kokkos::Impl::AllocationTracker tracker = Kokkos::CudaUVMSpace::allocate_and_track("uvm_ptr",sizeof(int));
int * uvm_ptr = (int*) tracker.alloc_ptr();
*uvm_ptr = 42 ;
Kokkos::Cuda::fence();
test_cuda_spaces_int_value<<<1,1>>>(uvm_ptr);
Kokkos::Cuda::fence();
EXPECT_EQ( *uvm_ptr, int(2*42) );
}
}
//----------------------------------------------------------------------------
TEST_F( cuda , impl_shared_alloc )
{
test_shared_alloc< Kokkos::CudaSpace , Kokkos::HostSpace::execution_space >();
test_shared_alloc< Kokkos::CudaUVMSpace , Kokkos::HostSpace::execution_space >();
test_shared_alloc< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace::execution_space >();
}
TEST_F( cuda , impl_view_mapping )
{
test_view_mapping< Kokkos::Cuda >();
test_view_mapping_subview< Kokkos::Cuda >();
test_view_mapping_operator< Kokkos::Cuda >();
TestViewMappingAtomic< Kokkos::Cuda >::run();
}
template< class MemSpace >
struct TestViewCudaTexture {
enum { N = 1000 };
using V = Kokkos::Experimental::View<double*,MemSpace> ;
using T = Kokkos::Experimental::View<const double*, MemSpace, Kokkos::MemoryRandomAccess > ;
V m_base ;
T m_tex ;
struct TagInit {};
struct TagTest {};
KOKKOS_INLINE_FUNCTION
void operator()( const TagInit & , const int i ) const { m_base[i] = i + 1 ; }
KOKKOS_INLINE_FUNCTION
void operator()( const TagTest & , const int i , long & error_count ) const
{ if ( m_tex[i] != i + 1 ) ++error_count ; }
TestViewCudaTexture()
: m_base("base",N)
, m_tex( m_base )
{}
static void run()
{
EXPECT_TRUE( ( std::is_same< typename V::reference_type
, double &
>::value ) );
EXPECT_TRUE( ( std::is_same< typename T::reference_type
, const double
>::value ) );
EXPECT_TRUE( V::reference_type_is_lvalue_reference ); // An ordinary view
EXPECT_FALSE( T::reference_type_is_lvalue_reference ); // Texture fetch returns by value
TestViewCudaTexture self ;
Kokkos::parallel_for( Kokkos::RangePolicy< Kokkos::Cuda , TagInit >(0,N) , self );
long error_count = -1 ;
Kokkos::parallel_reduce( Kokkos::RangePolicy< Kokkos::Cuda , TagTest >(0,N) , self , error_count );
EXPECT_EQ( error_count , 0 );
}
};
TEST_F( cuda , impl_view_texture )
{
TestViewCudaTexture< Kokkos::CudaSpace >::run();
TestViewCudaTexture< Kokkos::CudaUVMSpace >::run();
}
template< class MemSpace , class ExecSpace >
struct TestViewCudaAccessible {
enum { N = 1000 };
using V = Kokkos::Experimental::View<double*,MemSpace> ;
V m_base ;
struct TagInit {};
struct TagTest {};
KOKKOS_INLINE_FUNCTION
void operator()( const TagInit & , const int i ) const { m_base[i] = i + 1 ; }
KOKKOS_INLINE_FUNCTION
void operator()( const TagTest & , const int i , long & error_count ) const
{ if ( m_base[i] != i + 1 ) ++error_count ; }
TestViewCudaAccessible()
: m_base("base",N)
{}
static void run()
{
TestViewCudaAccessible self ;
Kokkos::parallel_for( Kokkos::RangePolicy< typename MemSpace::execution_space , TagInit >(0,N) , self );
MemSpace::execution_space::fence();
// Next access is a different execution space, must complete prior kernel.
long error_count = -1 ;
Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace , TagTest >(0,N) , self , error_count );
EXPECT_EQ( error_count , 0 );
}
};
TEST_F( cuda , impl_view_accessible )
{
TestViewCudaAccessible< Kokkos::CudaSpace , Kokkos::Cuda >::run();
TestViewCudaAccessible< Kokkos::CudaUVMSpace , Kokkos::Cuda >::run();
TestViewCudaAccessible< Kokkos::CudaUVMSpace , Kokkos::HostSpace::execution_space >::run();
TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace , Kokkos::Cuda >::run();
TestViewCudaAccessible< Kokkos::CudaHostPinnedSpace , Kokkos::HostSpace::execution_space >::run();
}
//----------------------------------------------------------------------------
TEST_F( cuda, view_impl )
{
// test_abort<<<32,32>>>(); // Aborts the kernel with CUDA version 4.1 or greater
test_view_impl< Kokkos::Cuda >();
}
TEST_F( cuda, view_api )
{
typedef Kokkos::View< const int * , Kokkos::Cuda , Kokkos::MemoryTraits< Kokkos::RandomAccess > > view_texture_managed ;
typedef Kokkos::View< const int * , Kokkos::Cuda , Kokkos::MemoryTraits< Kokkos::RandomAccess | Kokkos::Unmanaged > > view_texture_unmanaged ;
TestViewAPI< double , Kokkos::Cuda >();
#if 0
Kokkos::View<double, Kokkos::Cuda > x("x");
Kokkos::View<double[1], Kokkos::Cuda > y("y");
// *x = 10 ;
// x() = 10 ;
// y[0] = 10 ;
// y(0) = 10 ;
#endif
}
TEST_F( cuda, view_subview_auto_1d_left ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Cuda >();
}
TEST_F( cuda, view_subview_auto_1d_right ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Cuda >();
}
TEST_F( cuda, view_subview_auto_1d_stride ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Cuda >();
}
TEST_F( cuda, view_subview_assign_strided ) {
TestViewSubview::test_1d_strided_assignment< Kokkos::Cuda >();
}
TEST_F( cuda, view_subview_left_0 ) {
TestViewSubview::test_left_0< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_left_1 ) {
TestViewSubview::test_left_1< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_left_2 ) {
TestViewSubview::test_left_2< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_left_3 ) {
TestViewSubview::test_left_3< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_right_0 ) {
TestViewSubview::test_right_0< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_right_1 ) {
TestViewSubview::test_right_1< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, view_subview_right_3 ) {
TestViewSubview::test_right_3< Kokkos::CudaUVMSpace >();
}
TEST_F( cuda, range_tag )
{
TestRange< Kokkos::Cuda >::test_for(1000);
TestRange< Kokkos::Cuda >::test_reduce(1000);
TestRange< Kokkos::Cuda >::test_scan(1000);
}
TEST_F( cuda, team_tag )
{
TestTeamPolicy< Kokkos::Cuda >::test_for(1000);
TestTeamPolicy< Kokkos::Cuda >::test_reduce(1000);
}
TEST_F( cuda, reduce )
{
TestReduce< long , Kokkos::Cuda >( 10000000 );
TestReduce< double , Kokkos::Cuda >( 1000000 );
}
TEST_F( cuda, reduce_team )
{
TestReduceTeam< long , Kokkos::Cuda >( 10000000 );
TestReduceTeam< double , Kokkos::Cuda >( 1000000 );
}
TEST_F( cuda, shared_team )
{
TestSharedTeam< Kokkos::Cuda >();
}
TEST_F( cuda, reduce_dynamic )
{
TestReduceDynamic< long , Kokkos::Cuda >( 10000000 );
TestReduceDynamic< double , Kokkos::Cuda >( 1000000 );
}
TEST_F( cuda, reduce_dynamic_view )
{
TestReduceDynamicView< long , Kokkos::Cuda >( 10000000 );
TestReduceDynamicView< double , Kokkos::Cuda >( 1000000 );
}
TEST_F( cuda, atomic )
{
const int loop_count = 1e3 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Cuda>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Cuda>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Cuda>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Cuda>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Cuda>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Cuda>(100,3) ) );
}
//----------------------------------------------------------------------------
TEST_F( cuda, tile_layout)
{
TestTile::test< Kokkos::Cuda , 1 , 1 >( 1 , 1 );
TestTile::test< Kokkos::Cuda , 1 , 1 >( 2 , 3 );
TestTile::test< Kokkos::Cuda , 1 , 1 >( 9 , 10 );
TestTile::test< Kokkos::Cuda , 2 , 2 >( 1 , 1 );
TestTile::test< Kokkos::Cuda , 2 , 2 >( 2 , 3 );
TestTile::test< Kokkos::Cuda , 2 , 2 >( 4 , 4 );
TestTile::test< Kokkos::Cuda , 2 , 2 >( 9 , 9 );
TestTile::test< Kokkos::Cuda , 2 , 4 >( 9 , 9 );
TestTile::test< Kokkos::Cuda , 4 , 4 >( 9 , 9 );
TestTile::test< Kokkos::Cuda , 4 , 4 >( 1 , 1 );
TestTile::test< Kokkos::Cuda , 4 , 4 >( 4 , 4 );
TestTile::test< Kokkos::Cuda , 4 , 4 >( 9 , 9 );
TestTile::test< Kokkos::Cuda , 4 , 4 >( 9 , 11 );
TestTile::test< Kokkos::Cuda , 8 , 8 >( 1 , 1 );
TestTile::test< Kokkos::Cuda , 8 , 8 >( 4 , 4 );
TestTile::test< Kokkos::Cuda , 8 , 8 >( 9 , 9 );
TestTile::test< Kokkos::Cuda , 8 , 8 >( 9 , 11 );
}
-
TEST_F( cuda , view_aggregate )
{
TestViewAggregate< Kokkos::Cuda >();
TestViewAggregateReduction< Kokkos::Cuda >();
}
TEST_F( cuda , scan )
{
TestScan< Kokkos::Cuda >::test_range( 1 , 1000 );
TestScan< Kokkos::Cuda >( 1000000 );
TestScan< Kokkos::Cuda >( 10000000 );
Kokkos::Cuda::fence();
}
TEST_F( cuda , team_scan )
{
TestScanTeam< Kokkos::Cuda >( 10 );
TestScanTeam< Kokkos::Cuda >( 10000 );
}
}
//----------------------------------------------------------------------------
TEST_F( cuda , template_meta_functions )
{
TestTemplateMetaFunctions<int, Kokkos::Cuda >();
}
//----------------------------------------------------------------------------
-#ifdef KOKKOS_HAVE_CXX11
-
namespace Test {
TEST_F( cuda , reduction_deduction )
{
TestCXX11::test_reduction_deduction< Kokkos::Cuda >();
}
TEST_F( cuda , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(4) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(5) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(6) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(7) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(8) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(9) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Cuda >(10) ) );
}
}
-#endif
diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp
old mode 100755
new mode 100644
index d1a525f9e..73e5bf85a
--- a/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp
+++ b/lib/kokkos/core/unit_test/TestDefaultDeviceType.cpp
@@ -1,250 +1,248 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
#if !defined(KOKKOS_HAVE_CUDA) || defined(__CUDACC__)
//----------------------------------------------------------------------------
#include <TestViewImpl.hpp>
#include <TestAtomic.hpp>
#include <TestViewAPI.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestTeam.hpp>
#include <TestAggregate.hpp>
#include <TestCompilerMacros.hpp>
#include <TestCXX11.hpp>
#include <TestTeamVector.hpp>
namespace Test {
class defaultdevicetype : public ::testing::Test {
protected:
static void SetUpTestCase()
{
Kokkos::initialize();
}
static void TearDownTestCase()
{
Kokkos::finalize();
}
};
TEST_F( defaultdevicetype, view_impl) {
test_view_impl< Kokkos::DefaultExecutionSpace >();
}
TEST_F( defaultdevicetype, view_api) {
TestViewAPI< double , Kokkos::DefaultExecutionSpace >();
}
TEST_F( defaultdevicetype, long_reduce) {
TestReduce< long , Kokkos::DefaultExecutionSpace >( 100000 );
}
TEST_F( defaultdevicetype, double_reduce) {
TestReduce< double , Kokkos::DefaultExecutionSpace >( 100000 );
}
TEST_F( defaultdevicetype, long_reduce_dynamic ) {
TestReduceDynamic< long , Kokkos::DefaultExecutionSpace >( 100000 );
}
TEST_F( defaultdevicetype, double_reduce_dynamic ) {
TestReduceDynamic< double , Kokkos::DefaultExecutionSpace >( 100000 );
}
TEST_F( defaultdevicetype, long_reduce_dynamic_view ) {
TestReduceDynamicView< long , Kokkos::DefaultExecutionSpace >( 100000 );
}
TEST_F( defaultdevicetype , atomics )
{
const int loop_count = 1e4 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::DefaultExecutionSpace>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::DefaultExecutionSpace>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::DefaultExecutionSpace>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::DefaultExecutionSpace>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::DefaultExecutionSpace>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::DefaultExecutionSpace>(100,3) ) );
}
/*TEST_F( defaultdevicetype , view_remap )
{
enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 };
typedef Kokkos::View< double*[N1][N2][N3] ,
Kokkos::LayoutRight ,
Kokkos::DefaultExecutionSpace > output_type ;
typedef Kokkos::View< int**[N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::DefaultExecutionSpace > input_type ;
typedef Kokkos::View< int*[N0][N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::DefaultExecutionSpace > diff_type ;
output_type output( "output" , N0 );
input_type input ( "input" , N0 , N1 );
diff_type diff ( "diff" , N0 );
int value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
input(i0,i1,i2,i3) = ++value ;
}}}}
// Kokkos::deep_copy( diff , input ); // throw with incompatible shape
Kokkos::deep_copy( output , input );
value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
++value ;
ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) );
}}}}
}*/
//----------------------------------------------------------------------------
TEST_F( defaultdevicetype , view_aggregate )
{
TestViewAggregate< Kokkos::DefaultExecutionSpace >();
}
//----------------------------------------------------------------------------
TEST_F( defaultdevicetype , scan )
{
TestScan< Kokkos::DefaultExecutionSpace >::test_range( 1 , 1000 );
TestScan< Kokkos::DefaultExecutionSpace >( 1000000 );
TestScan< Kokkos::DefaultExecutionSpace >( 10000000 );
Kokkos::DefaultExecutionSpace::fence();
}
TEST_F( defaultdevicetype , team_scan )
{
TestScanTeam< Kokkos::DefaultExecutionSpace >( 10 );
TestScanTeam< Kokkos::DefaultExecutionSpace >( 10000 );
}
//----------------------------------------------------------------------------
TEST_F( defaultdevicetype , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::DefaultExecutionSpace >() ) );
}
//----------------------------------------------------------------------------
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( defaultdevicetype , cxx11 )
{
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(1) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(2) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(3) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::DefaultExecutionSpace >(4) ) );
}
-#endif
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( defaultdevicetype , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(4) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::DefaultExecutionSpace >(5) ) );
}
-#endif
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( defaultdevicetype , malloc )
{
int* data = (int*) Kokkos::kokkos_malloc(100*sizeof(int));
ASSERT_NO_THROW(data = (int*) Kokkos::kokkos_realloc(data,120*sizeof(int)));
Kokkos::kokkos_free(data);
+
+ int* data2 = (int*) Kokkos::kokkos_malloc(0);
+ ASSERT_TRUE(data2==NULL);
+ Kokkos::kokkos_free(data);
}
-#endif
} // namespace test
#endif
diff --git a/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.cpp b/lib/kokkos/core/unit_test/TestDefaultDeviceTypeInit.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestHWLOC.cpp b/lib/kokkos/core/unit_test/TestHWLOC.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestMemorySpaceTracking.hpp b/lib/kokkos/core/unit_test/TestMemorySpaceTracking.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestOpenMP.cpp b/lib/kokkos/core/unit_test/TestOpenMP.cpp
old mode 100755
new mode 100644
index 8d4bcd1e2..7f3a24567
--- a/lib/kokkos/core/unit_test/TestOpenMP.cpp
+++ b/lib/kokkos/core/unit_test/TestOpenMP.cpp
@@ -1,375 +1,373 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
//----------------------------------------------------------------------------
#include <TestViewImpl.hpp>
#include <TestAtomic.hpp>
#include <TestViewAPI.hpp>
#include <TestViewSubview.hpp>
#include <TestSharedAlloc.hpp>
#include <TestViewMapping.hpp>
#include <TestRange.hpp>
#include <TestTeam.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestAggregate.hpp>
#include <TestAggregateReduction.hpp>
#include <TestCompilerMacros.hpp>
#include <TestCXX11.hpp>
#include <TestCXX11Deduction.hpp>
#include <TestTeamVector.hpp>
#include <TestMemorySpaceTracking.hpp>
#include <TestTemplateMetaFunctions.hpp>
namespace Test {
class openmp : public ::testing::Test {
protected:
static void SetUpTestCase()
{
const unsigned numa_count = Kokkos::hwloc::get_available_numa_count();
const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa();
const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core();
const unsigned threads_count = std::max( 1u , numa_count ) *
std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 );
Kokkos::OpenMP::initialize( threads_count );
Kokkos::OpenMP::print_configuration( std::cout , true );
}
static void TearDownTestCase()
{
Kokkos::OpenMP::finalize();
omp_set_num_threads(1);
ASSERT_EQ( 1 , omp_get_max_threads() );
}
};
TEST_F( openmp , impl_shared_alloc ) {
test_shared_alloc< Kokkos::HostSpace , Kokkos::OpenMP >();
}
TEST_F( openmp , impl_view_mapping ) {
test_view_mapping< Kokkos::OpenMP >();
test_view_mapping_subview< Kokkos::OpenMP >();
test_view_mapping_operator< Kokkos::OpenMP >();
TestViewMappingAtomic< Kokkos::OpenMP >::run();
}
TEST_F( openmp, view_impl) {
test_view_impl< Kokkos::OpenMP >();
}
TEST_F( openmp, view_api) {
TestViewAPI< double , Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_auto_1d_left ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_auto_1d_right ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_auto_1d_stride ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_assign_strided ) {
TestViewSubview::test_1d_strided_assignment< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_left_0 ) {
TestViewSubview::test_left_0< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_left_1 ) {
TestViewSubview::test_left_1< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_left_2 ) {
TestViewSubview::test_left_2< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_left_3 ) {
TestViewSubview::test_left_3< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_right_0 ) {
TestViewSubview::test_right_0< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_right_1 ) {
TestViewSubview::test_right_1< Kokkos::OpenMP >();
}
TEST_F( openmp, view_subview_right_3 ) {
TestViewSubview::test_right_3< Kokkos::OpenMP >();
}
TEST_F( openmp , range_tag )
{
TestRange< Kokkos::OpenMP >::test_for(1000);
TestRange< Kokkos::OpenMP >::test_reduce(1000);
TestRange< Kokkos::OpenMP >::test_scan(1000);
}
TEST_F( openmp , team_tag )
{
TestTeamPolicy< Kokkos::OpenMP >::test_for(1000);
TestTeamPolicy< Kokkos::OpenMP >::test_reduce(1000);
}
TEST_F( openmp, long_reduce) {
TestReduce< long , Kokkos::OpenMP >( 1000000 );
}
TEST_F( openmp, double_reduce) {
TestReduce< double , Kokkos::OpenMP >( 1000000 );
}
TEST_F( openmp, long_reduce_dynamic ) {
TestReduceDynamic< long , Kokkos::OpenMP >( 1000000 );
}
TEST_F( openmp, double_reduce_dynamic ) {
TestReduceDynamic< double , Kokkos::OpenMP >( 1000000 );
}
TEST_F( openmp, long_reduce_dynamic_view ) {
TestReduceDynamicView< long , Kokkos::OpenMP >( 1000000 );
}
TEST_F( openmp, team_long_reduce) {
TestReduceTeam< long , Kokkos::OpenMP >( 100000 );
}
TEST_F( openmp, team_double_reduce) {
TestReduceTeam< double , Kokkos::OpenMP >( 100000 );
}
TEST_F( openmp, team_shared_request) {
TestSharedTeam< Kokkos::OpenMP >();
}
TEST_F( openmp , atomics )
{
const int loop_count = 1e4 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::OpenMP>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::OpenMP>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::OpenMP>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::OpenMP>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::OpenMP>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::OpenMP>(100,3) ) );
#if defined( KOKKOS_ENABLE_ASM )
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::OpenMP>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::OpenMP>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::OpenMP>(100,3) ) );
#endif
}
TEST_F( openmp , view_remap )
{
enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 };
typedef Kokkos::View< double*[N1][N2][N3] ,
Kokkos::LayoutRight ,
Kokkos::OpenMP > output_type ;
typedef Kokkos::View< int**[N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::OpenMP > input_type ;
typedef Kokkos::View< int*[N0][N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::OpenMP > diff_type ;
output_type output( "output" , N0 );
input_type input ( "input" , N0 , N1 );
diff_type diff ( "diff" , N0 );
int value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
input(i0,i1,i2,i3) = ++value ;
}}}}
// Kokkos::deep_copy( diff , input ); // throw with incompatible shape
Kokkos::deep_copy( output , input );
value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
++value ;
ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) );
}}}}
}
//----------------------------------------------------------------------------
TEST_F( openmp , view_aggregate )
{
TestViewAggregate< Kokkos::OpenMP >();
TestViewAggregateReduction< Kokkos::OpenMP >();
}
//----------------------------------------------------------------------------
TEST_F( openmp , scan )
{
TestScan< Kokkos::OpenMP >::test_range( 1 , 1000 );
TestScan< Kokkos::OpenMP >( 1000000 );
TestScan< Kokkos::OpenMP >( 10000000 );
Kokkos::OpenMP::fence();
}
TEST_F( openmp , team_scan )
{
TestScanTeam< Kokkos::OpenMP >( 10000 );
TestScanTeam< Kokkos::OpenMP >( 10000 );
}
//----------------------------------------------------------------------------
TEST_F( openmp , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::OpenMP >() ) );
}
//----------------------------------------------------------------------------
TEST_F( openmp , memory_space )
{
TestMemorySpace< Kokkos::OpenMP >();
}
//----------------------------------------------------------------------------
TEST_F( openmp , template_meta_functions )
{
TestTemplateMetaFunctions<int, Kokkos::OpenMP >();
}
//----------------------------------------------------------------------------
-#if defined( KOKKOS_HAVE_CXX11 ) && defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP )
+#if defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_OPENMP )
TEST_F( openmp , cxx11 )
{
if ( Kokkos::Impl::is_same< Kokkos::DefaultExecutionSpace , Kokkos::OpenMP >::value ) {
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(1) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(2) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(3) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::OpenMP >(4) ) );
}
}
#endif
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( openmp , reduction_deduction )
{
TestCXX11::test_reduction_deduction< Kokkos::OpenMP >();
}
TEST_F( openmp , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(4) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(5) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(6) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(7) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(8) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(9) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::OpenMP >(10) ) );
}
-#endif
} // namespace test
diff --git a/lib/kokkos/core/unit_test/TestQthread.cpp b/lib/kokkos/core/unit_test/TestQthread.cpp
old mode 100755
new mode 100644
index 19bfa6bde..ff4053623
--- a/lib/kokkos/core/unit_test/TestQthread.cpp
+++ b/lib/kokkos/core/unit_test/TestQthread.cpp
@@ -1,283 +1,280 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
#include <Kokkos_Qthread.hpp>
#include <Qthread/Kokkos_Qthread_TaskPolicy.hpp>
//----------------------------------------------------------------------------
#include <TestViewImpl.hpp>
#include <TestAtomic.hpp>
#include <TestViewAPI.hpp>
#include <TestTeam.hpp>
#include <TestRange.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestAggregate.hpp>
#include <TestCompilerMacros.hpp>
#include <TestTaskPolicy.hpp>
// #include <TestTeamVector.hpp>
namespace Test {
class qthread : public ::testing::Test {
protected:
static void SetUpTestCase()
{
const unsigned numa_count = Kokkos::hwloc::get_available_numa_count();
const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa();
const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core();
int threads_count = std::max( 1u , numa_count )
* std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 );
Kokkos::Qthread::initialize( threads_count );
Kokkos::Qthread::print_configuration( std::cout , true );
}
static void TearDownTestCase()
{
Kokkos::Qthread::finalize();
}
};
TEST_F( qthread , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Qthread >() ) );
}
TEST_F( qthread, view_impl) {
test_view_impl< Kokkos::Qthread >();
}
TEST_F( qthread, view_api) {
TestViewAPI< double , Kokkos::Qthread >();
}
TEST_F( qthread , range_tag )
{
TestRange< Kokkos::Qthread >::test_for(1000);
TestRange< Kokkos::Qthread >::test_reduce(1000);
TestRange< Kokkos::Qthread >::test_scan(1000);
}
TEST_F( qthread , team_tag )
{
TestTeamPolicy< Kokkos::Qthread >::test_for( 1000 );
TestTeamPolicy< Kokkos::Qthread >::test_reduce( 1000 );
}
TEST_F( qthread, long_reduce) {
TestReduce< long , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, double_reduce) {
TestReduce< double , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, long_reduce_dynamic ) {
TestReduceDynamic< long , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, double_reduce_dynamic ) {
TestReduceDynamic< double , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, long_reduce_dynamic_view ) {
TestReduceDynamicView< long , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, team_long_reduce) {
TestReduceTeam< long , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread, team_double_reduce) {
TestReduceTeam< double , Kokkos::Qthread >( 1000000 );
}
TEST_F( qthread , atomics )
{
const int loop_count = 1e4 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Qthread>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Qthread>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Qthread>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Qthread>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Qthread>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Qthread>(100,3) ) );
#if defined( KOKKOS_ENABLE_ASM )
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Qthread>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Qthread>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Qthread>(100,3) ) );
#endif
}
TEST_F( qthread , view_remap )
{
enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 };
typedef Kokkos::View< double*[N1][N2][N3] ,
Kokkos::LayoutRight ,
Kokkos::Qthread > output_type ;
typedef Kokkos::View< int**[N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Qthread > input_type ;
typedef Kokkos::View< int*[N0][N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Qthread > diff_type ;
output_type output( "output" , N0 );
input_type input ( "input" , N0 , N1 );
diff_type diff ( "diff" , N0 );
int value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
input(i0,i1,i2,i3) = ++value ;
}}}}
// Kokkos::deep_copy( diff , input ); // throw with incompatible shape
Kokkos::deep_copy( output , input );
value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
++value ;
ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) );
}}}}
}
//----------------------------------------------------------------------------
TEST_F( qthread , view_aggregate )
{
TestViewAggregate< Kokkos::Qthread >();
}
//----------------------------------------------------------------------------
TEST_F( qthread , scan )
{
TestScan< Kokkos::Qthread >::test_range( 1 , 1000 );
TestScan< Kokkos::Qthread >( 1000000 );
TestScan< Kokkos::Qthread >( 10000000 );
Kokkos::Qthread::fence();
}
TEST_F( qthread, team_shared ) {
TestSharedTeam< Kokkos::Qthread >();
}
TEST_F( qthread , team_scan )
{
TestScanTeam< Kokkos::Qthread >( 10 );
TestScanTeam< Kokkos::Qthread >( 10000 );
}
-#if defined (KOKKOS_HAVE_CXX11) && 0 /* disable */
+#if 0 /* disable */
TEST_F( qthread , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Qthread >(4) ) );
}
#endif
//----------------------------------------------------------------------------
TEST_F( qthread , task_policy )
{
TestTaskPolicy::test_task_dep< Kokkos::Qthread >( 10 );
for ( long i = 0 ; i < 25 ; ++i ) TestTaskPolicy::test_fib< Kokkos::Qthread >(i);
for ( long i = 0 ; i < 35 ; ++i ) TestTaskPolicy::test_fib2< Kokkos::Qthread >(i);
}
-#if defined( KOKKOS_HAVE_CXX11 )
TEST_F( qthread , task_team )
{
- std::cout << "qthread.task_team test disabled due to unresolved error causing the test to hang." << std::endl ;
- // TestTaskPolicy::test_task_team< Kokkos::Qthread >(1000);
+ TestTaskPolicy::test_task_team< Kokkos::Qthread >(1000);
}
-#endif
//----------------------------------------------------------------------------
} // namespace test
diff --git a/lib/kokkos/core/unit_test/TestRange.hpp b/lib/kokkos/core/unit_test/TestRange.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestReduce.hpp b/lib/kokkos/core/unit_test/TestReduce.hpp
old mode 100755
new mode 100644
index 30b94d40f..f8a15d6c0
--- a/lib/kokkos/core/unit_test/TestReduce.hpp
+++ b/lib/kokkos/core/unit_test/TestReduce.hpp
@@ -1,371 +1,384 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <stdexcept>
#include <sstream>
#include <iostream>
#include <Kokkos_Core.hpp>
/*--------------------------------------------------------------------------*/
namespace Test {
template< typename ScalarType , class DeviceType >
class ReduceFunctor
{
public:
typedef DeviceType execution_space ;
typedef typename execution_space::size_type size_type ;
struct value_type {
ScalarType value[3] ;
};
const size_type nwork ;
ReduceFunctor( const size_type & arg_nwork ) : nwork( arg_nwork ) {}
ReduceFunctor( const ReduceFunctor & rhs )
: nwork( rhs.nwork ) {}
/*
KOKKOS_INLINE_FUNCTION
void init( value_type & dst ) const
{
dst.value[0] = 0 ;
dst.value[1] = 0 ;
dst.value[2] = 0 ;
}
*/
KOKKOS_INLINE_FUNCTION
void join( volatile value_type & dst ,
const volatile value_type & src ) const
{
dst.value[0] += src.value[0] ;
dst.value[1] += src.value[1] ;
dst.value[2] += src.value[2] ;
}
KOKKOS_INLINE_FUNCTION
void operator()( size_type iwork , value_type & dst ) const
{
dst.value[0] += 1 ;
dst.value[1] += iwork + 1 ;
dst.value[2] += nwork - iwork ;
}
};
template< class DeviceType >
class ReduceFunctorFinal : public ReduceFunctor< long , DeviceType > {
public:
typedef typename ReduceFunctor< long , DeviceType >::value_type value_type ;
ReduceFunctorFinal( const size_t n )
: ReduceFunctor<long,DeviceType>(n)
{}
KOKKOS_INLINE_FUNCTION
void final( value_type & dst ) const
{
dst.value[0] = - dst.value[0] ;
dst.value[1] = - dst.value[1] ;
dst.value[2] = - dst.value[2] ;
}
};
template< typename ScalarType , class DeviceType >
class RuntimeReduceFunctor
{
public:
// Required for functor:
typedef DeviceType execution_space ;
typedef ScalarType value_type[] ;
const unsigned value_count ;
// Unit test details:
typedef typename execution_space::size_type size_type ;
const size_type nwork ;
RuntimeReduceFunctor( const size_type arg_nwork ,
const size_type arg_count )
: value_count( arg_count )
, nwork( arg_nwork ) {}
/*
KOKKOS_INLINE_FUNCTION
void init( value_type dst ) const
{
for ( unsigned i = 0 ; i < value_count ; ++i ) dst[i] = 0 ;
}
*/
KOKKOS_INLINE_FUNCTION
void join( volatile ScalarType dst[] ,
const volatile ScalarType src[] ) const
{
for ( unsigned i = 0 ; i < value_count ; ++i ) dst[i] += src[i] ;
}
KOKKOS_INLINE_FUNCTION
void operator()( size_type iwork , ScalarType dst[] ) const
{
const size_type tmp[3] = { 1 , iwork + 1 , nwork - iwork };
for ( size_type i = 0 ; i < value_count ; ++i ) {
dst[i] += tmp[ i % 3 ];
}
}
};
template< class DeviceType >
class RuntimeReduceFunctorFinal : public RuntimeReduceFunctor< long , DeviceType > {
public:
typedef RuntimeReduceFunctor< long , DeviceType > base_type ;
typedef typename base_type::value_type value_type ;
typedef long scalar_type ;
RuntimeReduceFunctorFinal( const size_t theNwork , const size_t count ) : base_type(theNwork,count) {}
KOKKOS_INLINE_FUNCTION
void final( value_type dst ) const
{
for ( unsigned i = 0 ; i < base_type::value_count ; ++i ) {
dst[i] = - dst[i] ;
}
}
};
} // namespace Test
namespace {
template< typename ScalarType , class DeviceType >
class TestReduce
{
public:
typedef DeviceType execution_space ;
typedef typename execution_space::size_type size_type ;
//------------------------------------
TestReduce( const size_type & nwork )
{
run_test(nwork);
run_test_final(nwork);
}
void run_test( const size_type & nwork )
{
typedef Test::ReduceFunctor< ScalarType , execution_space > functor_type ;
typedef typename functor_type::value_type value_type ;
enum { Count = 3 };
enum { Repeat = 100 };
value_type result[ Repeat ];
const unsigned long nw = nwork ;
const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 )
: (nw/2) * ( nw + 1 );
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
Kokkos::parallel_reduce( nwork , functor_type(nwork) , result[i] );
}
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
for ( unsigned j = 0 ; j < Count ; ++j ) {
const unsigned long correct = 0 == j % 3 ? nw : nsum ;
ASSERT_EQ( (ScalarType) correct , result[i].value[j] );
}
}
}
void run_test_final( const size_type & nwork )
{
typedef Test::ReduceFunctorFinal< execution_space > functor_type ;
typedef typename functor_type::value_type value_type ;
enum { Count = 3 };
enum { Repeat = 100 };
value_type result[ Repeat ];
const unsigned long nw = nwork ;
const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 )
: (nw/2) * ( nw + 1 );
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
- Kokkos::parallel_reduce( nwork , functor_type(nwork) , result[i] );
+ if(i%2==0)
+ Kokkos::parallel_reduce( nwork , functor_type(nwork) , result[i] );
+ else
+ Kokkos::parallel_reduce( "Reduce", nwork , functor_type(nwork) , result[i] );
}
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
for ( unsigned j = 0 ; j < Count ; ++j ) {
const unsigned long correct = 0 == j % 3 ? nw : nsum ;
ASSERT_EQ( (ScalarType) correct , - result[i].value[j] );
}
}
}
};
template< typename ScalarType , class DeviceType >
class TestReduceDynamic
{
public:
typedef DeviceType execution_space ;
typedef typename execution_space::size_type size_type ;
//------------------------------------
TestReduceDynamic( const size_type nwork )
{
run_test_dynamic(nwork);
run_test_dynamic_final(nwork);
}
void run_test_dynamic( const size_type nwork )
{
typedef Test::RuntimeReduceFunctor< ScalarType , execution_space > functor_type ;
enum { Count = 3 };
enum { Repeat = 100 };
ScalarType result[ Repeat ][ Count ] ;
const unsigned long nw = nwork ;
const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 )
: (nw/2) * ( nw + 1 );
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
- Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] );
+ if(i%2==0)
+ Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] );
+ else
+ Kokkos::parallel_reduce( "Reduce", nwork , functor_type(nwork,Count) , result[i] );
}
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
for ( unsigned j = 0 ; j < Count ; ++j ) {
const unsigned long correct = 0 == j % 3 ? nw : nsum ;
ASSERT_EQ( (ScalarType) correct , result[i][j] );
}
}
}
void run_test_dynamic_final( const size_type nwork )
{
typedef Test::RuntimeReduceFunctorFinal< execution_space > functor_type ;
enum { Count = 3 };
enum { Repeat = 100 };
typename functor_type::scalar_type result[ Repeat ][ Count ] ;
const unsigned long nw = nwork ;
const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 )
: (nw/2) * ( nw + 1 );
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
- Kokkos::parallel_reduce( "TestKernelReduce" , nwork , functor_type(nwork,Count) , result[i] );
+ if(i%2==0)
+ Kokkos::parallel_reduce( nwork , functor_type(nwork,Count) , result[i] );
+ else
+ Kokkos::parallel_reduce( "TestKernelReduce" , nwork , functor_type(nwork,Count) , result[i] );
+
}
for ( unsigned i = 0 ; i < Repeat ; ++i ) {
for ( unsigned j = 0 ; j < Count ; ++j ) {
const unsigned long correct = 0 == j % 3 ? nw : nsum ;
ASSERT_EQ( (ScalarType) correct , - result[i][j] );
}
}
}
};
template< typename ScalarType , class DeviceType >
class TestReduceDynamicView
{
public:
typedef DeviceType execution_space ;
typedef typename execution_space::size_type size_type ;
//------------------------------------
TestReduceDynamicView( const size_type nwork )
{
run_test_dynamic_view(nwork);
}
void run_test_dynamic_view( const size_type nwork )
{
typedef Test::RuntimeReduceFunctor< ScalarType , execution_space > functor_type ;
typedef Kokkos::View< ScalarType* , DeviceType > result_type ;
typedef typename result_type::HostMirror result_host_type ;
const unsigned CountLimit = 23 ;
const unsigned long nw = nwork ;
const unsigned long nsum = nw % 2 ? nw * (( nw + 1 )/2 )
: (nw/2) * ( nw + 1 );
for ( unsigned count = 0 ; count < CountLimit ; ++count ) {
result_type result("result",count);
result_host_type host_result = Kokkos::create_mirror( result );
// Test result to host pointer:
std::string str("TestKernelReduce");
- Kokkos::parallel_reduce( str , nw , functor_type(nw,count) , host_result.ptr_on_device() );
+ if(count%2==0)
+ Kokkos::parallel_reduce( nw , functor_type(nw,count) , host_result.ptr_on_device() );
+ else
+ Kokkos::parallel_reduce( str , nw , functor_type(nw,count) , host_result.ptr_on_device() );
for ( unsigned j = 0 ; j < count ; ++j ) {
const unsigned long correct = 0 == j % 3 ? nw : nsum ;
ASSERT_EQ( host_result(j), (ScalarType) correct );
host_result(j) = 0 ;
}
}
}
};
}
/*--------------------------------------------------------------------------*/
diff --git a/lib/kokkos/core/unit_test/TestScan.hpp b/lib/kokkos/core/unit_test/TestScan.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestSerial.cpp b/lib/kokkos/core/unit_test/TestSerial.cpp
old mode 100755
new mode 100644
index dbe94005e..4514492e4
--- a/lib/kokkos/core/unit_test/TestSerial.cpp
+++ b/lib/kokkos/core/unit_test/TestSerial.cpp
@@ -1,419 +1,407 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
-#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
-
#include <impl/Kokkos_ViewTileLeft.hpp>
#include <TestTile.hpp>
-#endif
-
#include <impl/Kokkos_Serial_TaskPolicy.hpp>
//----------------------------------------------------------------------------
#include <TestSharedAlloc.hpp>
#include <TestViewMapping.hpp>
#include <TestViewImpl.hpp>
#include <TestViewAPI.hpp>
#include <TestViewOfClass.hpp>
#include <TestViewSubview.hpp>
#include <TestAtomic.hpp>
#include <TestRange.hpp>
#include <TestTeam.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestAggregate.hpp>
#include <TestAggregateReduction.hpp>
#include <TestCompilerMacros.hpp>
#include <TestTaskPolicy.hpp>
#include <TestCXX11.hpp>
#include <TestCXX11Deduction.hpp>
#include <TestTeamVector.hpp>
#include <TestMemorySpaceTracking.hpp>
#include <TestTemplateMetaFunctions.hpp>
namespace Test {
class serial : public ::testing::Test {
protected:
static void SetUpTestCase()
{
Kokkos::HostSpace::execution_space::initialize();
}
static void TearDownTestCase()
{
Kokkos::HostSpace::execution_space::finalize();
}
};
TEST_F( serial , impl_shared_alloc ) {
test_shared_alloc< Kokkos::HostSpace , Kokkos::Serial >();
}
TEST_F( serial , impl_view_mapping ) {
test_view_mapping< Kokkos::Serial >();
test_view_mapping_subview< Kokkos::Serial >();
test_view_mapping_operator< Kokkos::Serial >();
TestViewMappingAtomic< Kokkos::Serial >::run();
}
TEST_F( serial, view_impl) {
test_view_impl< Kokkos::Serial >();
}
TEST_F( serial, view_api) {
TestViewAPI< double , Kokkos::Serial >();
}
TEST_F( serial , view_nested_view )
{
::Test::view_nested_view< Kokkos::Serial >();
}
TEST_F( serial, view_subview_auto_1d_left ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Serial >();
}
TEST_F( serial, view_subview_auto_1d_right ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Serial >();
}
TEST_F( serial, view_subview_auto_1d_stride ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Serial >();
}
TEST_F( serial, view_subview_assign_strided ) {
TestViewSubview::test_1d_strided_assignment< Kokkos::Serial >();
}
TEST_F( serial, view_subview_left_0 ) {
TestViewSubview::test_left_0< Kokkos::Serial >();
}
TEST_F( serial, view_subview_left_1 ) {
TestViewSubview::test_left_1< Kokkos::Serial >();
}
TEST_F( serial, view_subview_left_2 ) {
TestViewSubview::test_left_2< Kokkos::Serial >();
}
TEST_F( serial, view_subview_left_3 ) {
TestViewSubview::test_left_3< Kokkos::Serial >();
}
TEST_F( serial, view_subview_right_0 ) {
TestViewSubview::test_right_0< Kokkos::Serial >();
}
TEST_F( serial, view_subview_right_1 ) {
TestViewSubview::test_right_1< Kokkos::Serial >();
}
TEST_F( serial, view_subview_right_3 ) {
TestViewSubview::test_right_3< Kokkos::Serial >();
}
TEST_F( serial , range_tag )
{
TestRange< Kokkos::Serial >::test_for(1000);
TestRange< Kokkos::Serial >::test_reduce(1000);
TestRange< Kokkos::Serial >::test_scan(1000);
}
TEST_F( serial , team_tag )
{
TestTeamPolicy< Kokkos::Serial >::test_for( 1000 );
TestTeamPolicy< Kokkos::Serial >::test_reduce( 1000 );
}
TEST_F( serial, long_reduce) {
TestReduce< long , Kokkos::Serial >( 1000000 );
}
TEST_F( serial, double_reduce) {
TestReduce< double , Kokkos::Serial >( 1000000 );
}
TEST_F( serial, long_reduce_dynamic ) {
TestReduceDynamic< long , Kokkos::Serial >( 1000000 );
}
TEST_F( serial, double_reduce_dynamic ) {
TestReduceDynamic< double , Kokkos::Serial >( 1000000 );
}
TEST_F( serial, long_reduce_dynamic_view ) {
TestReduceDynamicView< long , Kokkos::Serial >( 1000000 );
}
TEST_F( serial , scan )
{
TestScan< Kokkos::Serial >::test_range( 1 , 1000 );
TestScan< Kokkos::Serial >( 10 );
TestScan< Kokkos::Serial >( 10000 );
}
TEST_F( serial , team_long_reduce) {
TestReduceTeam< long , Kokkos::Serial >( 100000 );
}
TEST_F( serial , team_double_reduce) {
TestReduceTeam< double , Kokkos::Serial >( 100000 );
}
TEST_F( serial , team_shared_request) {
TestSharedTeam< Kokkos::Serial >();
}
TEST_F( serial , team_scan )
{
TestScanTeam< Kokkos::Serial >( 10 );
TestScanTeam< Kokkos::Serial >( 10000 );
}
TEST_F( serial , view_remap )
{
enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 };
typedef Kokkos::View< double*[N1][N2][N3] ,
Kokkos::LayoutRight ,
Kokkos::Serial > output_type ;
typedef Kokkos::View< int**[N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Serial > input_type ;
typedef Kokkos::View< int*[N0][N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Serial > diff_type ;
output_type output( "output" , N0 );
input_type input ( "input" , N0 , N1 );
diff_type diff ( "diff" , N0 );
int value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
input(i0,i1,i2,i3) = ++value ;
}}}}
// Kokkos::deep_copy( diff , input ); // throw with incompatible shape
Kokkos::deep_copy( output , input );
value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
++value ;
ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) );
}}}}
}
//----------------------------------------------------------------------------
TEST_F( serial , view_aggregate )
{
TestViewAggregate< Kokkos::Serial >();
TestViewAggregateReduction< Kokkos::Serial >();
}
//----------------------------------------------------------------------------
TEST_F( serial , atomics )
{
const int loop_count = 1e6 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Serial>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Serial>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Serial>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Serial>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Serial>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Serial>(100,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Serial>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Serial>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Serial>(100,3) ) );
}
//----------------------------------------------------------------------------
-#if ! defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
-
TEST_F( serial, tile_layout )
{
TestTile::test< Kokkos::Serial , 1 , 1 >( 1 , 1 );
TestTile::test< Kokkos::Serial , 1 , 1 >( 2 , 3 );
TestTile::test< Kokkos::Serial , 1 , 1 >( 9 , 10 );
TestTile::test< Kokkos::Serial , 2 , 2 >( 1 , 1 );
TestTile::test< Kokkos::Serial , 2 , 2 >( 2 , 3 );
TestTile::test< Kokkos::Serial , 2 , 2 >( 4 , 4 );
TestTile::test< Kokkos::Serial , 2 , 2 >( 9 , 9 );
TestTile::test< Kokkos::Serial , 2 , 4 >( 9 , 9 );
TestTile::test< Kokkos::Serial , 4 , 2 >( 9 , 9 );
TestTile::test< Kokkos::Serial , 4 , 4 >( 1 , 1 );
TestTile::test< Kokkos::Serial , 4 , 4 >( 4 , 4 );
TestTile::test< Kokkos::Serial , 4 , 4 >( 9 , 9 );
TestTile::test< Kokkos::Serial , 4 , 4 >( 9 , 11 );
TestTile::test< Kokkos::Serial , 8 , 8 >( 1 , 1 );
TestTile::test< Kokkos::Serial , 8 , 8 >( 4 , 4 );
TestTile::test< Kokkos::Serial , 8 , 8 >( 9 , 9 );
TestTile::test< Kokkos::Serial , 8 , 8 >( 9 , 11 );
}
-#endif
-
//----------------------------------------------------------------------------
TEST_F( serial , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Serial >() ) );
}
//----------------------------------------------------------------------------
TEST_F( serial , memory_space )
{
TestMemorySpace< Kokkos::Serial >();
}
//----------------------------------------------------------------------------
TEST_F( serial , task_policy )
{
TestTaskPolicy::test_task_dep< Kokkos::Serial >( 10 );
// TestTaskPolicy::test_norm2< Kokkos::Serial >( 1000 );
// for ( long i = 0 ; i < 30 ; ++i ) TestTaskPolicy::test_fib< Kokkos::Serial >(i);
// for ( long i = 0 ; i < 40 ; ++i ) TestTaskPolicy::test_fib2< Kokkos::Serial >(i);
for ( long i = 0 ; i < 20 ; ++i ) TestTaskPolicy::test_fib< Kokkos::Serial >(i);
for ( long i = 0 ; i < 25 ; ++i ) TestTaskPolicy::test_fib2< Kokkos::Serial >(i);
}
-#if defined( KOKKOS_HAVE_CXX11 )
TEST_F( serial , task_team )
{
TestTaskPolicy::test_task_team< Kokkos::Serial >(1000);
}
-#endif
//----------------------------------------------------------------------------
TEST_F( serial , template_meta_functions )
{
TestTemplateMetaFunctions<int, Kokkos::Serial >();
}
//----------------------------------------------------------------------------
-#if defined( KOKKOS_HAVE_CXX11 ) && defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL )
+#if defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_SERIAL )
TEST_F( serial , cxx11 )
{
if ( Kokkos::Impl::is_same< Kokkos::DefaultExecutionSpace , Kokkos::Serial >::value ) {
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(1) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(2) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(3) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Serial >(4) ) );
}
}
#endif
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( serial , reduction_deduction )
{
TestCXX11::test_reduction_deduction< Kokkos::Serial >();
}
TEST_F( serial , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(4) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(5) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(6) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(7) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(8) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(9) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Serial >(10) ) );
}
-#endif
} // namespace test
diff --git a/lib/kokkos/core/unit_test/TestSharedAlloc.hpp b/lib/kokkos/core/unit_test/TestSharedAlloc.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestTaskPolicy.hpp b/lib/kokkos/core/unit_test/TestTaskPolicy.hpp
old mode 100755
new mode 100644
index 96a5ca3b0..fa09e9a0c
--- a/lib/kokkos/core/unit_test/TestTaskPolicy.hpp
+++ b/lib/kokkos/core/unit_test/TestTaskPolicy.hpp
@@ -1,494 +1,490 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#ifndef KOKKOS_UNITTEST_TASKPOLICY_HPP
#define KOKKOS_UNITTEST_TASKPOLICY_HPP
#include <stdio.h>
#include <iostream>
#include <cmath>
#include <Kokkos_TaskPolicy.hpp>
namespace TestTaskPolicy {
//----------------------------------------------------------------------------
template< class ExecSpace >
struct FibChild {
typedef long value_type ;
Kokkos::Experimental::TaskPolicy<ExecSpace> policy ;
const value_type n ;
int has_nested ;
FibChild( const Kokkos::Experimental::TaskPolicy<ExecSpace> & arg_policy
, const value_type arg_n )
: policy(arg_policy,2) /* default dependence capacity = 2 */
, n( arg_n ), has_nested(0) {}
inline
void apply( value_type & result )
{
if ( n < 2 ) {
has_nested = -1 ;
result = n ;
}
else {
if ( has_nested == 0 ) {
// Spawn new children and respawn myself to sum their results:
has_nested = 2 ;
Kokkos::Experimental::respawn
( policy
, this
, Kokkos::Experimental::spawn( policy , FibChild(policy,n-1) )
, Kokkos::Experimental::spawn( policy , FibChild(policy,n-2) )
);
}
else if ( has_nested == 2 ) {
has_nested = -1 ;
const Kokkos::Experimental::Future<long,ExecSpace> fib_1 = policy.get_dependence(this,0);
const Kokkos::Experimental::Future<long,ExecSpace> fib_2 = policy.get_dependence(this,1);
result = fib_1.get() + fib_2.get();
}
else {
fprintf(stderr,"FibChild(%ld) execution error\n",(long)n);
fflush(stderr);
}
}
}
};
template< class ExecSpace >
struct FibChild2 {
typedef long value_type ;
Kokkos::Experimental::TaskPolicy<ExecSpace> policy ;
const value_type n ;
int has_nested ;
FibChild2( const Kokkos::Experimental::TaskPolicy<ExecSpace> & arg_policy
, const value_type arg_n )
: policy(arg_policy,2) /* default dependence capacity = 2 */
, n( arg_n ), has_nested(0) {}
inline
void apply( value_type & result )
{
if ( 0 == has_nested ) {
if ( n < 2 ) {
has_nested = -1 ;
result = n ;
}
else if ( n < 4 ) {
// Spawn new children and respawn myself to sum their results:
// result = Fib(n-1) + Fib(n-2)
has_nested = 2 ;
// Kokkos::respawn implements the following steps:
policy.clear_dependence( this );
policy.add_dependence( this , Kokkos::Experimental::spawn( policy , FibChild2(policy,n-1) ) );
policy.add_dependence( this , Kokkos::Experimental::spawn( policy , FibChild2(policy,n-2) ) );
policy.respawn( this );
}
else {
// Spawn new children and respawn myself to sum their results:
// result = Fib(n-1) + Fib(n-2)
// result = ( Fib(n-2) + Fib(n-3) ) + ( Fib(n-3) + Fib(n-4) )
// result = ( ( Fib(n-3) + Fib(n-4) ) + Fib(n-3) ) + ( Fib(n-3) + Fib(n-4) )
// result = 3 * Fib(n-3) + 2 * Fib(n-4)
has_nested = 4 ;
// Kokkos::Experimental::respawn implements the following steps:
policy.clear_dependence( this );
policy.add_dependence( this , Kokkos::Experimental::spawn( policy , FibChild2(policy,n-3) ) );
policy.add_dependence( this , Kokkos::Experimental::spawn( policy , FibChild2(policy,n-4) ) );
policy.respawn( this );
}
}
else if ( 2 == has_nested || 4 == has_nested ) {
const Kokkos::Experimental::Future<long,ExecSpace> fib_a = policy.get_dependence(this,0);
const Kokkos::Experimental::Future<long,ExecSpace> fib_b = policy.get_dependence(this,1);
result = ( has_nested == 2 ) ? fib_a.get() + fib_b.get()
: 3 * fib_a.get() + 2 * fib_b.get() ;
has_nested = -1 ;
}
else {
fprintf(stderr,"FibChild2(%ld) execution error\n",(long)n);
fflush(stderr);
}
}
};
namespace {
long eval_fib( long n )
{
if ( n < 2 ) return n ;
std::vector<long> fib(n+1);
fib[0] = 0 ;
fib[1] = 1 ;
for ( long i = 2 ; i <= n ; ++i ) { fib[i] = fib[i-2] + fib[i-1]; }
return fib[n];
}
}
template< class ExecSpace >
void test_fib( long n )
{
Kokkos::Experimental::TaskPolicy<ExecSpace> policy(2);
Kokkos::Experimental::Future<long,ExecSpace> f = Kokkos::Experimental::spawn( policy , FibChild<ExecSpace>(policy,n) );
Kokkos::Experimental::wait( policy );
if ( f.get() != eval_fib(n) ) {
std::cout << "Fib(" << n << ") = " << f.get();
std::cout << " != " << eval_fib(n);
std::cout << std::endl ;
}
}
template< class ExecSpace >
void test_fib2( long n )
{
Kokkos::Experimental::TaskPolicy<ExecSpace> policy(2); // default dependence capacity
Kokkos::Experimental::Future<long,ExecSpace> f = Kokkos::Experimental::spawn( policy , FibChild2<ExecSpace>(policy,n) );
Kokkos::Experimental::wait( policy );
if ( f.get() != eval_fib(n) ) {
std::cout << "Fib2(" << n << ") = " << f.get();
std::cout << " != " << eval_fib(n);
std::cout << std::endl ;
}
}
//----------------------------------------------------------------------------
template< class ExecSpace >
struct Norm2 {
typedef double value_type ;
const double * const m_x ;
Norm2( const double * x ) : m_x(x) {}
inline
void init( double & val ) const { val = 0 ; }
inline
void operator()( int i , double & val ) const { val += m_x[i] * m_x[i] ; }
void apply( double & dst ) const { dst = std::sqrt( dst ); }
};
template< class ExecSpace >
void test_norm2( const int n )
{
Kokkos::Experimental::TaskPolicy< ExecSpace > policy ;
double * const x = new double[n];
for ( int i = 0 ; i < n ; ++i ) x[i] = 1 ;
Kokkos::RangePolicy<ExecSpace> r(0,n);
Kokkos::Experimental::Future<double,ExecSpace> f = Kokkos::Experimental::spawn_reduce( policy , r , Norm2<ExecSpace>(x) );
Kokkos::Experimental::wait( policy );
#if defined(PRINT)
std::cout << "Norm2: " << f.get() << std::endl ;
#endif
delete[] x ;
}
//----------------------------------------------------------------------------
template< class Space >
struct TaskDep {
typedef int value_type ;
typedef Kokkos::Experimental::TaskPolicy< Space > policy_type ;
const policy_type policy ;
const int input ;
TaskDep( const policy_type & arg_p , const int arg_i )
: policy( arg_p ), input( arg_i ) {}
void apply( int & val )
{
val = input ;
const int num = policy.get_dependence( this );
for ( int i = 0 ; i < num ; ++i ) {
Kokkos::Experimental::Future<int,Space> f = policy.get_dependence( this , i );
val += f.get();
}
}
};
template< class Space >
void test_task_dep( const int n )
{
enum { NTEST = 64 };
Kokkos::Experimental::TaskPolicy< Space > policy ;
Kokkos::Experimental::Future<int,Space> f[ NTEST ];
for ( int i = 0 ; i < NTEST ; ++i ) {
// Create task in the "constructing" state with capacity for 'n+1' dependences
f[i] = policy.create( TaskDep<Space>(policy,0) , n + 1 );
if ( f[i].get_task_state() != Kokkos::Experimental::TASK_STATE_CONSTRUCTING ) {
Kokkos::Impl::throw_runtime_exception("get_task_state() != Kokkos::Experimental::TASK_STATE_CONSTRUCTING");
}
// Only use 'n' dependences
for ( int j = 0 ; j < n ; ++j ) {
Kokkos::Experimental::Future<int,Space> nested = policy.create( TaskDep<Space>(policy,j+1) );
policy.spawn( nested );
// Add dependence to a "constructing" task
policy.add_dependence( f[i] , nested );
}
// Spawn task from the "constructing" to the "waiting" state
policy.spawn( f[i] );
}
const int answer = n % 2 ? n * ( ( n + 1 ) / 2 ) : ( n / 2 ) * ( n + 1 );
Kokkos::Experimental::wait( policy );
int error = 0 ;
for ( int i = 0 ; i < NTEST ; ++i ) {
if ( f[i].get_task_state() != Kokkos::Experimental::TASK_STATE_COMPLETE ) {
Kokkos::Impl::throw_runtime_exception("get_task_state() != Kokkos::Experimental::TASK_STATE_COMPLETE");
}
if ( answer != f[i].get() && 0 == error ) {
std::cout << "test_task_dep(" << n << ") ERROR at[" << i << "]"
<< " answer(" << answer << ") != result(" << f[i].get() << ")" << std::endl ;
}
}
}
//----------------------------------------------------------------------------
-#if defined( KOKKOS_HAVE_CXX11 )
-
template< class ExecSpace >
struct TaskTeam {
enum { SPAN = 8 };
typedef void value_type ;
typedef Kokkos::Experimental::TaskPolicy<ExecSpace> policy_type ;
typedef Kokkos::Experimental::Future<ExecSpace> future_type ;
typedef Kokkos::View<long*,ExecSpace> view_type ;
policy_type policy ;
future_type future ;
view_type result ;
const long nvalue ;
TaskTeam( const policy_type & arg_policy
, const view_type & arg_result
, const long arg_nvalue )
: policy(arg_policy)
, future()
, result( arg_result )
, nvalue( arg_nvalue )
{}
inline
void apply( const typename policy_type::member_type & member )
{
const long end = nvalue + 1 ;
const long begin = 0 < end - SPAN ? end - SPAN : 0 ;
if ( 0 < begin && future.get_task_state() == Kokkos::Experimental::TASK_STATE_NULL ) {
if ( member.team_rank() == 0 ) {
future = policy.spawn( policy.create_team( TaskTeam( policy , result , begin - 1 ) ) );
policy.clear_dependence( this );
policy.add_dependence( this , future );
policy.respawn( this );
}
return ;
}
Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end)
, [&]( int i ) { result[i] = i + 1 ; }
);
}
};
template< class ExecSpace >
struct TaskTeamValue {
enum { SPAN = 8 };
typedef long value_type ;
typedef Kokkos::Experimental::TaskPolicy<ExecSpace> policy_type ;
typedef Kokkos::Experimental::Future<value_type,ExecSpace> future_type ;
typedef Kokkos::View<long*,ExecSpace> view_type ;
policy_type policy ;
future_type future ;
view_type result ;
const long nvalue ;
TaskTeamValue( const policy_type & arg_policy
, const view_type & arg_result
, const long arg_nvalue )
: policy(arg_policy)
, future()
, result( arg_result )
, nvalue( arg_nvalue )
{}
inline
void apply( const typename policy_type::member_type & member , value_type & final )
{
const long end = nvalue + 1 ;
const long begin = 0 < end - SPAN ? end - SPAN : 0 ;
if ( 0 < begin && future.get_task_state() == Kokkos::Experimental::TASK_STATE_NULL ) {
if ( member.team_rank() == 0 ) {
future = policy.spawn( policy.create_team( TaskTeamValue( policy , result , begin - 1 ) ) );
policy.clear_dependence( this );
policy.add_dependence( this , future );
policy.respawn( this );
}
return ;
}
Kokkos::parallel_for( Kokkos::TeamThreadRange(member,begin,end)
, [&]( int i ) { result[i] = i + 1 ; }
);
if ( member.team_rank() == 0 ) {
final = result[nvalue] ;
}
Kokkos::memory_fence();
}
};
template< class ExecSpace >
void test_task_team( long n )
{
typedef TaskTeam< ExecSpace > task_type ;
typedef TaskTeamValue< ExecSpace > task_value_type ;
typedef typename task_type::view_type view_type ;
typedef typename task_type::policy_type policy_type ;
typedef typename task_type::future_type future_type ;
typedef typename task_value_type::future_type future_value_type ;
policy_type policy ;
view_type result("result",n+1);
future_type f = policy.spawn( policy.create_team( task_type( policy , result , n ) ) );
Kokkos::Experimental::wait( policy );
for ( long i = 0 ; i <= n ; ++i ) {
const long answer = i + 1 ;
if ( result(i) != answer ) {
std::cerr << "test_task_team void ERROR result(" << i << ") = " << result(i) << " != " << answer << std::endl ;
}
}
future_value_type fv = policy.spawn( policy.create_team( task_value_type( policy , result , n ) ) );
Kokkos::Experimental::wait( policy );
if ( fv.get() != n + 1 ) {
std::cerr << "test_task_team value ERROR future = " << fv.get() << " != " << n + 1 << std::endl ;
}
for ( long i = 0 ; i <= n ; ++i ) {
const long answer = i + 1 ;
if ( result(i) != answer ) {
std::cerr << "test_task_team value ERROR result(" << i << ") = " << result(i) << " != " << answer << std::endl ;
}
}
}
-#endif
-
//----------------------------------------------------------------------------
} // namespace TestTaskPolicy
#endif /* #ifndef KOKKOS_UNITTEST_TASKPOLICY_HPP */
diff --git a/lib/kokkos/core/unit_test/TestTeam.hpp b/lib/kokkos/core/unit_test/TestTeam.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestTeamVector.hpp b/lib/kokkos/core/unit_test/TestTeamVector.hpp
old mode 100755
new mode 100644
index add8b7ed4..48187f036
--- a/lib/kokkos/core/unit_test/TestTeamVector.hpp
+++ b/lib/kokkos/core/unit_test/TestTeamVector.hpp
@@ -1,650 +1,646 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <Kokkos_Core.hpp>
#include <impl/Kokkos_Timer.hpp>
#include <iostream>
#include <cstdlib>
namespace TestTeamVector {
struct my_complex {
double re,im;
int dummy;
KOKKOS_INLINE_FUNCTION
my_complex() {
re = 0.0;
im = 0.0;
dummy = 0;
}
KOKKOS_INLINE_FUNCTION
my_complex(const my_complex& src) {
re = src.re;
im = src.im;
dummy = src.dummy;
}
KOKKOS_INLINE_FUNCTION
my_complex(const volatile my_complex& src) {
re = src.re;
im = src.im;
dummy = src.dummy;
}
KOKKOS_INLINE_FUNCTION
my_complex(const double& val) {
re = val;
im = 0.0;
dummy = 0;
}
KOKKOS_INLINE_FUNCTION
my_complex& operator += (const my_complex& src) {
re += src.re;
im += src.im;
dummy += src.dummy;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator += (const volatile my_complex& src) volatile {
re += src.re;
im += src.im;
dummy += src.dummy;
}
KOKKOS_INLINE_FUNCTION
my_complex& operator *= (const my_complex& src) {
double re_tmp = re*src.re - im*src.im;
double im_tmp = re * src.im + im * src.re;
re = re_tmp;
im = im_tmp;
dummy *= src.dummy;
return *this;
}
KOKKOS_INLINE_FUNCTION
void operator *= (const volatile my_complex& src) volatile {
double re_tmp = re*src.re - im*src.im;
double im_tmp = re * src.im + im * src.re;
re = re_tmp;
im = im_tmp;
dummy *= src.dummy;
}
KOKKOS_INLINE_FUNCTION
bool operator == (const my_complex& src) {
return (re == src.re) && (im == src.im) && ( dummy == src.dummy );
}
KOKKOS_INLINE_FUNCTION
bool operator != (const my_complex& src) {
return (re != src.re) || (im != src.im) || ( dummy != src.dummy );
}
KOKKOS_INLINE_FUNCTION
bool operator != (const double& val) {
return (re != val) ||
(im != 0) || (dummy != 0);
}
KOKKOS_INLINE_FUNCTION
my_complex& operator= (const int& val) {
re = val;
im = 0.0;
dummy = 0;
return *this;
}
KOKKOS_INLINE_FUNCTION
my_complex& operator= (const double& val) {
re = val;
im = 0.0;
dummy = 0;
return *this;
}
KOKKOS_INLINE_FUNCTION
operator double() {
return re;
}
};
-#if defined (KOKKOS_HAVE_CXX11)
-
-
template<typename Scalar, class ExecutionSpace>
struct functor_team_for {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_for(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
typedef typename ExecutionSpace::scratch_memory_space shmem_space ;
typedef Kokkos::View<Scalar*,shmem_space,Kokkos::MemoryUnmanaged> shared_int;
typedef typename shared_int::size_type size_type;
const size_type shmemSize = team.team_size () * 13;
shared_int values = shared_int (team.team_shmem (), shmemSize);
if (values.ptr_on_device () == NULL || values.dimension_0 () < shmemSize) {
printf ("FAILED to allocate shared memory of size %u\n",
static_cast<unsigned int> (shmemSize));
}
else {
// Initialize shared memory
values(team.team_rank ()) = 0;
// Accumulate value into per thread shared memory
// This is non blocking
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,131),[&] (int i) {
values(team.team_rank ()) += i - team.league_rank () + team.league_size () + team.team_size ();
});
// Wait for all memory to be written
team.team_barrier ();
// One thread per team executes the comparison
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
Scalar value = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
for (int i = 0; i < team.team_size (); ++i) {
value += values(i);
}
if (test != value) {
printf ("FAILED team_parallel_for %i %i %f %f\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value));
flag() = 1;
}
});
}
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_team_reduce {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_reduce(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = Scalar();
Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131),[&] (int i, Scalar& val) {
val += i - team.league_rank () + team.league_size () + team.team_size ();
},value);
team.team_barrier ();
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
if (test != value) {
if(team.league_rank() == 0)
printf ("FAILED team_parallel_reduce %i %i %f %f %lu\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value),sizeof(Scalar));
flag() = 1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_team_reduce_join {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_reduce_join(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = 0;
Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131)
, [&] (int i, Scalar& val) {
val += i - team.league_rank () + team.league_size () + team.team_size ();
}
, [&] (volatile Scalar& val, const volatile Scalar& src) {val+=src;}
, value
);
team.team_barrier ();
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
if (test != value) {
printf ("FAILED team_vector_parallel_reduce_join %i %i %f %f\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value));
flag() = 1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_team_vector_for {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_vector_for(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
typedef typename ExecutionSpace::scratch_memory_space shmem_space ;
typedef Kokkos::View<Scalar*,shmem_space,Kokkos::MemoryUnmanaged> shared_int;
typedef typename shared_int::size_type size_type;
const size_type shmemSize = team.team_size () * 13;
shared_int values = shared_int (team.team_shmem (), shmemSize);
if (values.ptr_on_device () == NULL || values.dimension_0 () < shmemSize) {
printf ("FAILED to allocate shared memory of size %u\n",
static_cast<unsigned int> (shmemSize));
}
else {
Kokkos::single(Kokkos::PerThread(team),[&] () {
values(team.team_rank ()) = 0;
});
Kokkos::parallel_for(Kokkos::TeamThreadRange(team,131),[&] (int i) {
Kokkos::single(Kokkos::PerThread(team),[&] () {
values(team.team_rank ()) += i - team.league_rank () + team.league_size () + team.team_size ();
});
});
team.team_barrier ();
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
Scalar value = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
for (int i = 0; i < team.team_size (); ++i) {
value += values(i);
}
if (test != value) {
printf ("FAILED team_vector_parallel_for %i %i %f %f\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value));
flag() = 1;
}
});
}
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_team_vector_reduce {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_vector_reduce(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = Scalar();
Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131),[&] (int i, Scalar& val) {
val += i - team.league_rank () + team.league_size () + team.team_size ();
},value);
team.team_barrier ();
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
if (test != value) {
if(team.league_rank() == 0)
printf ("FAILED team_vector_parallel_reduce %i %i %f %f %lu\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value),sizeof(Scalar));
flag() = 1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_team_vector_reduce_join {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_team_vector_reduce_join(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = 0;
Kokkos::parallel_reduce(Kokkos::TeamThreadRange(team,131)
, [&] (int i, Scalar& val) {
val += i - team.league_rank () + team.league_size () + team.team_size ();
}
, [&] (volatile Scalar& val, const volatile Scalar& src) {val+=src;}
, value
);
team.team_barrier ();
Kokkos::single(Kokkos::PerTeam(team),[&]() {
Scalar test = 0;
for (int i = 0; i < 131; ++i) {
test += i - team.league_rank () + team.league_size () + team.team_size ();
}
if (test != value) {
printf ("FAILED team_vector_parallel_reduce_join %i %i %f %f\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value));
flag() = 1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_vec_single {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_vec_single(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
// Warning: this test case intentionally violates permissable semantics
// It is not valid to get references to members of the enclosing region
// inside a parallel_for and write to it.
Scalar value = 0;
Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,13),[&] (int i) {
value = i; // This write is violating Kokkos semantics for nested parallelism
});
Kokkos::single(Kokkos::PerThread(team),[&] (Scalar& val) {
val = 1;
},value);
Scalar value2 = 0;
Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13), [&] (int i, Scalar& val) {
val += value;
},value2);
if(value2!=(value*13)) {
printf("FAILED vector_single broadcast %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) value2,(double) value);
flag()=1;
}
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_vec_for {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_vec_for(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
unsigned team_shmem_size(int team_size) const {return team_size*13*sizeof(Scalar)+8;}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
typedef typename ExecutionSpace::scratch_memory_space shmem_space ;
typedef Kokkos::View<Scalar*,shmem_space,Kokkos::MemoryUnmanaged> shared_int;
shared_int values = shared_int(team.team_shmem(),team.team_size()*13);
if (values.ptr_on_device () == NULL ||
values.dimension_0() < (unsigned) team.team_size() * 13) {
printf ("FAILED to allocate memory of size %i\n",
static_cast<int> (team.team_size () * 13));
flag() = 1;
}
else {
Kokkos::parallel_for(Kokkos::ThreadVectorRange(team,13), [&] (int i) {
values(13*team.team_rank() + i) = i - team.team_rank() - team.league_rank() + team.league_size() + team.team_size();
});
Kokkos::single(Kokkos::PerThread(team),[&] () {
Scalar test = 0;
Scalar value = 0;
for (int i = 0; i < 13; ++i) {
test += i - team.team_rank() - team.league_rank() + team.league_size() + team.team_size();
value += values(13*team.team_rank() + i);
}
if (test != value) {
printf ("FAILED vector_par_for %i %i %f %f\n",
team.league_rank (), team.team_rank (),
static_cast<double> (test), static_cast<double> (value));
flag() = 1;
}
});
}
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_vec_red {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_vec_red(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = 0;
Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13),[&] (int i, Scalar& val) {
val += i;
}, value);
Kokkos::single(Kokkos::PerThread(team),[&] () {
Scalar test = 0;
for(int i = 0; i < 13; i++) {
test+=i;
}
if(test!=value) {
printf("FAILED vector_par_reduce %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) value);
flag()=1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_vec_red_join {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_vec_red_join(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Scalar value = 1;
Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(team,13)
, [&] (int i, Scalar& val) { val *= i; }
, [&] (Scalar& val, const Scalar& src) {val*=src;}
, value
);
Kokkos::single(Kokkos::PerThread(team),[&] () {
Scalar test = 1;
for(int i = 0; i < 13; i++) {
test*=i;
}
if(test!=value) {
printf("FAILED vector_par_reduce_join %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) value);
flag()=1;
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_vec_scan {
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_vec_scan(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team) const {
Kokkos::parallel_scan(Kokkos::ThreadVectorRange(team,13),[&] (int i, Scalar& val, bool final) {
val += i;
if(final) {
Scalar test = 0;
for(int k = 0; k <= i; k++) {
test+=k;
}
if(test!=val) {
printf("FAILED vector_par_scan %i %i %f %f\n",team.league_rank(),team.team_rank(),(double) test,(double) val);
flag()=1;
}
}
});
}
};
template<typename Scalar, class ExecutionSpace>
struct functor_reduce {
typedef double value_type;
typedef Kokkos::TeamPolicy<ExecutionSpace> policy_type;
typedef ExecutionSpace execution_space;
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag;
functor_reduce(Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> flag_):flag(flag_) {}
KOKKOS_INLINE_FUNCTION
void operator() (typename policy_type::member_type team, double& sum) const {
sum += team.league_rank() * 100 + team.thread_rank();
}
};
-#endif
template<typename Scalar,class ExecutionSpace>
bool test_scalar(int nteams, int team_size, int test) {
Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace> d_flag("flag");
typename Kokkos::View<int,Kokkos::LayoutLeft,ExecutionSpace>::HostMirror h_flag("h_flag");
h_flag() = 0 ;
Kokkos::deep_copy(d_flag,h_flag);
- #ifdef KOKKOS_HAVE_CXX11
+
if(test==0)
Kokkos::parallel_for( std::string("A") , Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_vec_red<Scalar, ExecutionSpace>(d_flag));
if(test==1)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_vec_red_join<Scalar, ExecutionSpace>(d_flag));
if(test==2)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_vec_scan<Scalar, ExecutionSpace>(d_flag));
if(test==3)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_vec_for<Scalar, ExecutionSpace>(d_flag));
if(test==4)
Kokkos::parallel_for( "B" , Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_vec_single<Scalar, ExecutionSpace>(d_flag));
if(test==5)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size),
functor_team_for<Scalar, ExecutionSpace>(d_flag));
if(test==6)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size),
functor_team_reduce<Scalar, ExecutionSpace>(d_flag));
if(test==7)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size),
functor_team_reduce_join<Scalar, ExecutionSpace>(d_flag));
if(test==8)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_team_vector_for<Scalar, ExecutionSpace>(d_flag));
if(test==9)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_team_vector_reduce<Scalar, ExecutionSpace>(d_flag));
if(test==10)
Kokkos::parallel_for( Kokkos::TeamPolicy<ExecutionSpace>(nteams,team_size,8),
functor_team_vector_reduce_join<Scalar, ExecutionSpace>(d_flag));
- #endif
+
Kokkos::deep_copy(h_flag,d_flag);
return (h_flag() == 0);
}
template<class ExecutionSpace>
bool Test(int test) {
bool passed = true;
passed = passed && test_scalar<int, ExecutionSpace>(317,33,test);
passed = passed && test_scalar<long long int, ExecutionSpace>(317,33,test);
passed = passed && test_scalar<float, ExecutionSpace>(317,33,test);
passed = passed && test_scalar<double, ExecutionSpace>(317,33,test);
passed = passed && test_scalar<my_complex, ExecutionSpace>(317,33,test);
return passed;
}
}
diff --git a/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp b/lib/kokkos/core/unit_test/TestTemplateMetaFunctions.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestThreads.cpp b/lib/kokkos/core/unit_test/TestThreads.cpp
old mode 100755
new mode 100644
index 3832998ab..b254aacaf
--- a/lib/kokkos/core/unit_test/TestThreads.cpp
+++ b/lib/kokkos/core/unit_test/TestThreads.cpp
@@ -1,443 +1,436 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Macros.hpp>
#if defined( KOKKOS_HAVE_PTHREAD )
#include <Kokkos_Core.hpp>
#include <Threads/Kokkos_Threads_TaskPolicy.hpp>
//----------------------------------------------------------------------------
#include <TestSharedAlloc.hpp>
#include <TestViewMapping.hpp>
#include <TestViewImpl.hpp>
#include <TestViewAPI.hpp>
#include <TestViewSubview.hpp>
#include <TestAtomic.hpp>
#include <TestReduce.hpp>
#include <TestScan.hpp>
#include <TestRange.hpp>
#include <TestTeam.hpp>
#include <TestAggregate.hpp>
#include <TestAggregateReduction.hpp>
#include <TestCompilerMacros.hpp>
#include <TestCXX11.hpp>
#include <TestCXX11Deduction.hpp>
#include <TestTeamVector.hpp>
#include <TestMemorySpaceTracking.hpp>
#include <TestTemplateMetaFunctions.hpp>
#include <TestTaskPolicy.hpp>
namespace Test {
class threads : public ::testing::Test {
protected:
static void SetUpTestCase()
{
// Finalize without initialize is a no-op:
Kokkos::Threads::finalize();
const unsigned numa_count = Kokkos::hwloc::get_available_numa_count();
const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa();
const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core();
unsigned threads_count = 0 ;
// Initialize and finalize with no threads:
Kokkos::Threads::initialize( 1u );
Kokkos::Threads::finalize();
threads_count = std::max( 1u , numa_count )
* std::max( 2u , cores_per_numa * threads_per_core );
Kokkos::Threads::initialize( threads_count );
Kokkos::Threads::finalize();
threads_count = std::max( 1u , numa_count * 2 )
* std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 );
Kokkos::Threads::initialize( threads_count );
Kokkos::Threads::finalize();
// Quick attempt to verify thread start/terminate don't have race condition:
threads_count = std::max( 1u , numa_count )
* std::max( 2u , ( cores_per_numa * threads_per_core ) / 2 );
for ( unsigned i = 0 ; i < 10 ; ++i ) {
Kokkos::Threads::initialize( threads_count );
Kokkos::Threads::sleep();
Kokkos::Threads::wake();
Kokkos::Threads::finalize();
}
Kokkos::Threads::initialize( threads_count );
Kokkos::Threads::print_configuration( std::cout , true /* detailed */ );
}
static void TearDownTestCase()
{
Kokkos::Threads::finalize();
}
};
TEST_F( threads , init ) {
;
}
TEST_F( threads , impl_shared_alloc ) {
test_shared_alloc< Kokkos::HostSpace , Kokkos::Threads >();
}
TEST_F( threads , impl_view_mapping ) {
test_view_mapping< Kokkos::Threads >();
test_view_mapping_subview< Kokkos::Threads >();
test_view_mapping_operator< Kokkos::Threads >();
TestViewMappingAtomic< Kokkos::Threads >::run();
}
TEST_F( threads, view_impl) {
test_view_impl< Kokkos::Threads >();
}
TEST_F( threads, view_api) {
TestViewAPI< double , Kokkos::Threads >();
}
TEST_F( threads, view_subview_auto_1d_left ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutLeft,Kokkos::Threads >();
}
TEST_F( threads, view_subview_auto_1d_right ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutRight,Kokkos::Threads >();
}
TEST_F( threads, view_subview_auto_1d_stride ) {
TestViewSubview::test_auto_1d< Kokkos::LayoutStride,Kokkos::Threads >();
}
TEST_F( threads, view_subview_assign_strided ) {
TestViewSubview::test_1d_strided_assignment< Kokkos::Threads >();
}
TEST_F( threads, view_subview_left_0 ) {
TestViewSubview::test_left_0< Kokkos::Threads >();
}
TEST_F( threads, view_subview_left_1 ) {
TestViewSubview::test_left_1< Kokkos::Threads >();
}
TEST_F( threads, view_subview_left_2 ) {
TestViewSubview::test_left_2< Kokkos::Threads >();
}
TEST_F( threads, view_subview_left_3 ) {
TestViewSubview::test_left_3< Kokkos::Threads >();
}
TEST_F( threads, view_subview_right_0 ) {
TestViewSubview::test_right_0< Kokkos::Threads >();
}
TEST_F( threads, view_subview_right_1 ) {
TestViewSubview::test_right_1< Kokkos::Threads >();
}
TEST_F( threads, view_subview_right_3 ) {
TestViewSubview::test_right_3< Kokkos::Threads >();
}
TEST_F( threads, view_aggregate ) {
TestViewAggregate< Kokkos::Threads >();
TestViewAggregateReduction< Kokkos::Threads >();
}
TEST_F( threads , range_tag )
{
TestRange< Kokkos::Threads >::test_for(1000);
TestRange< Kokkos::Threads >::test_reduce(1000);
TestRange< Kokkos::Threads >::test_scan(1000);
}
TEST_F( threads , team_tag )
{
TestTeamPolicy< Kokkos::Threads >::test_for(1000);
TestTeamPolicy< Kokkos::Threads >::test_reduce(1000);
}
TEST_F( threads, long_reduce) {
TestReduce< long , Kokkos::Threads >( 1000000 );
}
TEST_F( threads, double_reduce) {
TestReduce< double , Kokkos::Threads >( 1000000 );
}
TEST_F( threads, team_long_reduce) {
TestReduceTeam< long , Kokkos::Threads >( 100000 );
}
TEST_F( threads, team_double_reduce) {
TestReduceTeam< double , Kokkos::Threads >( 100000 );
}
TEST_F( threads, long_reduce_dynamic ) {
TestReduceDynamic< long , Kokkos::Threads >( 1000000 );
}
TEST_F( threads, double_reduce_dynamic ) {
TestReduceDynamic< double , Kokkos::Threads >( 1000000 );
}
TEST_F( threads, long_reduce_dynamic_view ) {
TestReduceDynamicView< long , Kokkos::Threads >( 1000000 );
}
TEST_F( threads, team_shared_request) {
TestSharedTeam< Kokkos::Threads >();
}
TEST_F( threads , view_remap )
{
enum { N0 = 3 , N1 = 2 , N2 = 8 , N3 = 9 };
typedef Kokkos::View< double*[N1][N2][N3] ,
Kokkos::LayoutRight ,
Kokkos::Threads > output_type ;
typedef Kokkos::View< int**[N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Threads > input_type ;
typedef Kokkos::View< int*[N0][N2][N3] ,
Kokkos::LayoutLeft ,
Kokkos::Threads > diff_type ;
output_type output( "output" , N0 );
input_type input ( "input" , N0 , N1 );
diff_type diff ( "diff" , N0 );
int value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
input(i0,i1,i2,i3) = ++value ;
}}}}
// Kokkos::deep_copy( diff , input ); // throw with incompatible shape
Kokkos::deep_copy( output , input );
value = 0 ;
for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
for ( size_t i0 = 0 ; i0 < N0 ; ++i0 ) {
++value ;
ASSERT_EQ( value , ((int) output(i0,i1,i2,i3) ) );
}}}}
}
//----------------------------------------------------------------------------
TEST_F( threads , atomics )
{
const int loop_count = 1e6 ;
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<int,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned int,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long int,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<unsigned long int,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<long long int,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Threads>(loop_count,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<double,Kokkos::Threads>(loop_count,3) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Threads>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Threads>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<float,Kokkos::Threads>(100,3) ) );
#if defined( KOKKOS_ENABLE_ASM )
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Threads>(100,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Threads>(100,2) ) );
ASSERT_TRUE( ( TestAtomic::Loop<Kokkos::complex<double> ,Kokkos::Threads>(100,3) ) );
#endif
ASSERT_TRUE( ( TestAtomic::Loop<TestAtomic::SuperScalar<3>, Kokkos::Threads>(loop_count,1) ) );
ASSERT_TRUE( ( TestAtomic::Loop<TestAtomic::SuperScalar<3>, Kokkos::Threads>(loop_count,2) ) );
}
//----------------------------------------------------------------------------
#if 0
TEST_F( threads , scan_small )
{
typedef TestScan< Kokkos::Threads , Kokkos::Impl::ThreadsExecUseScanSmall > TestScanFunctor ;
for ( int i = 0 ; i < 1000 ; ++i ) {
TestScanFunctor( 10 );
TestScanFunctor( 10000 );
}
TestScanFunctor( 1000000 );
TestScanFunctor( 10000000 );
Kokkos::Threads::fence();
}
#endif
TEST_F( threads , scan )
{
TestScan< Kokkos::Threads >::test_range( 1 , 1000 );
TestScan< Kokkos::Threads >( 1000000 );
TestScan< Kokkos::Threads >( 10000000 );
Kokkos::Threads::fence();
}
//----------------------------------------------------------------------------
TEST_F( threads , team_scan )
{
TestScanTeam< Kokkos::Threads >( 10 );
TestScanTeam< Kokkos::Threads >( 10000 );
}
//----------------------------------------------------------------------------
TEST_F( threads , compiler_macros )
{
ASSERT_TRUE( ( TestCompilerMacros::Test< Kokkos::Threads >() ) );
}
TEST_F( threads , memory_space )
{
TestMemorySpace< Kokkos::Threads >();
}
//----------------------------------------------------------------------------
TEST_F( threads , template_meta_functions )
{
TestTemplateMetaFunctions<int, Kokkos::Threads >();
}
//----------------------------------------------------------------------------
-#if defined( KOKKOS_HAVE_CXX11 ) && defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS )
+#if defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS )
TEST_F( threads , cxx11 )
{
if ( Kokkos::Impl::is_same< Kokkos::DefaultExecutionSpace , Kokkos::Threads >::value ) {
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(1) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(2) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(3) ) );
ASSERT_TRUE( ( TestCXX11::Test< Kokkos::Threads >(4) ) );
}
}
-#endif
-
-#if defined (KOKKOS_HAVE_CXX11)
TEST_F( threads , reduction_deduction )
{
TestCXX11::test_reduction_deduction< Kokkos::Threads >();
}
+#endif /* #if defined( KOKKOS_HAVE_DEFAULT_DEVICE_TYPE_THREADS ) */
TEST_F( threads , team_vector )
{
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(0) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(1) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(2) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(3) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(4) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(5) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(6) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(7) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(8) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(9) ) );
ASSERT_TRUE( ( TestTeamVector::Test< Kokkos::Threads >(10) ) );
}
-#endif
-
TEST_F( threads , task_policy )
{
TestTaskPolicy::test_task_dep< Kokkos::Threads >( 10 );
for ( long i = 0 ; i < 25 ; ++i ) TestTaskPolicy::test_fib< Kokkos::Threads >(i);
for ( long i = 0 ; i < 35 ; ++i ) TestTaskPolicy::test_fib2< Kokkos::Threads >(i);
}
-#if defined( KOKKOS_HAVE_CXX11 )
TEST_F( threads , task_team )
{
TestTaskPolicy::test_task_team< Kokkos::Threads >(1000);
}
-#endif
-
} // namespace Test
#endif /* #if defined( KOKKOS_HAVE_PTHREAD ) */
diff --git a/lib/kokkos/core/unit_test/TestTile.hpp b/lib/kokkos/core/unit_test/TestTile.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestViewAPI.hpp b/lib/kokkos/core/unit_test/TestViewAPI.hpp
old mode 100755
new mode 100644
index b0a81cec6..1aeab1e41
--- a/lib/kokkos/core/unit_test/TestViewAPI.hpp
+++ b/lib/kokkos/core/unit_test/TestViewAPI.hpp
@@ -1,1305 +1,1370 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
#include <stdexcept>
#include <sstream>
#include <iostream>
/*--------------------------------------------------------------------------*/
#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
namespace Test {
template< typename T, class DeviceType >
class TestViewAPI {
public:
TestViewAPI() {}
};
}
#else
/*--------------------------------------------------------------------------*/
namespace Test {
template< class T , class L , class D , class M , class S >
size_t allocation_count( const Kokkos::View<T,L,D,M,S> & view )
{
const size_t card = Kokkos::Impl::cardinality_count( view.shape() );
const size_t alloc = view.capacity();
return card <= alloc ? alloc : 0 ;
}
/*--------------------------------------------------------------------------*/
template< typename T, class DeviceType>
struct TestViewOperator
{
typedef DeviceType execution_space ;
static const unsigned N = 100 ;
static const unsigned D = 3 ;
typedef Kokkos::View< T*[D] , execution_space > view_type ;
const view_type v1 ;
const view_type v2 ;
TestViewOperator()
: v1( "v1" , N )
, v2( "v2" , N )
{}
static void testit()
{
Kokkos::parallel_for( N , TestViewOperator() );
}
KOKKOS_INLINE_FUNCTION
void operator()( const unsigned i ) const
{
const unsigned X = 0 ;
const unsigned Y = 1 ;
const unsigned Z = 2 ;
v2(i,X) = v1(i,X);
v2(i,Y) = v1(i,Y);
v2(i,Z) = v1(i,Z);
}
};
/*--------------------------------------------------------------------------*/
template< class DataType >
struct rank {
private:
typedef typename Kokkos::Impl::AnalyzeShape<DataType>::shape shape ;
public:
static const unsigned value = shape::rank ;
};
template< class DataType ,
class DeviceType ,
unsigned Rank = rank< DataType >::value >
struct TestViewOperator_LeftAndRight ;
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 8 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutStride, execution_space > stride_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
stride_view left_stride ;
stride_view right_stride ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( "left" )
, right( "right" )
, left_stride( left )
, right_stride( right )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i7 = 0 ; i7 < unsigned(lsh.N7) ; ++i7 )
for ( unsigned i6 = 0 ; i6 < unsigned(lsh.N6) ; ++i6 )
for ( unsigned i5 = 0 ; i5 < unsigned(lsh.N5) ; ++i5 )
for ( unsigned i4 = 0 ; i4 < unsigned(lsh.N4) ; ++i4 )
for ( unsigned i3 = 0 ; i3 < unsigned(lsh.N3) ; ++i3 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2, i3, i4, i5, i6, i7 ) -
& left( 0, 0, 0, 0, 0, 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
if ( & left(i0,i1,i2,i3,i4,i5,i6,i7) !=
& left_stride(i0,i1,i2,i3,i4,i5,i6,i7) ) {
update |= 4 ;
}
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
for ( unsigned i3 = 0 ; i3 < unsigned(rsh.N3) ; ++i3 )
for ( unsigned i4 = 0 ; i4 < unsigned(rsh.N4) ; ++i4 )
for ( unsigned i5 = 0 ; i5 < unsigned(rsh.N5) ; ++i5 )
for ( unsigned i6 = 0 ; i6 < unsigned(rsh.N6) ; ++i6 )
for ( unsigned i7 = 0 ; i7 < unsigned(rsh.N7) ; ++i7 )
{
const long j = & right( i0, i1, i2, i3, i4, i5, i6, i7 ) -
& right( 0, 0, 0, 0, 0, 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
if ( & right(i0,i1,i2,i3,i4,i5,i6,i7) !=
& right_stride(i0,i1,i2,i3,i4,i5,i6,i7) ) {
update |= 8 ;
}
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 7 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( "left" )
, right( "right" )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i6 = 0 ; i6 < unsigned(lsh.N6) ; ++i6 )
for ( unsigned i5 = 0 ; i5 < unsigned(lsh.N5) ; ++i5 )
for ( unsigned i4 = 0 ; i4 < unsigned(lsh.N4) ; ++i4 )
for ( unsigned i3 = 0 ; i3 < unsigned(lsh.N3) ; ++i3 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2, i3, i4, i5, i6 ) -
& left( 0, 0, 0, 0, 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
for ( unsigned i3 = 0 ; i3 < unsigned(rsh.N3) ; ++i3 )
for ( unsigned i4 = 0 ; i4 < unsigned(rsh.N4) ; ++i4 )
for ( unsigned i5 = 0 ; i5 < unsigned(rsh.N5) ; ++i5 )
for ( unsigned i6 = 0 ; i6 < unsigned(rsh.N6) ; ++i6 )
{
const long j = & right( i0, i1, i2, i3, i4, i5, i6 ) -
& right( 0, 0, 0, 0, 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 6 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( "left" )
, right( "right" )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i5 = 0 ; i5 < unsigned(lsh.N5) ; ++i5 )
for ( unsigned i4 = 0 ; i4 < unsigned(lsh.N4) ; ++i4 )
for ( unsigned i3 = 0 ; i3 < unsigned(lsh.N3) ; ++i3 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2, i3, i4, i5 ) -
& left( 0, 0, 0, 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
for ( unsigned i3 = 0 ; i3 < unsigned(rsh.N3) ; ++i3 )
for ( unsigned i4 = 0 ; i4 < unsigned(rsh.N4) ; ++i4 )
for ( unsigned i5 = 0 ; i5 < unsigned(rsh.N5) ; ++i5 )
{
const long j = & right( i0, i1, i2, i3, i4, i5 ) -
& right( 0, 0, 0, 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 5 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutStride, execution_space > stride_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
stride_view left_stride ;
stride_view right_stride ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( "left" )
, right( "right" )
, left_stride( left )
, right_stride( right )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i4 = 0 ; i4 < unsigned(lsh.N4) ; ++i4 )
for ( unsigned i3 = 0 ; i3 < unsigned(lsh.N3) ; ++i3 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2, i3, i4 ) -
& left( 0, 0, 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
if ( & left( i0, i1, i2, i3, i4 ) !=
& left_stride( i0, i1, i2, i3, i4 ) ) { update |= 4 ; }
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
for ( unsigned i3 = 0 ; i3 < unsigned(rsh.N3) ; ++i3 )
for ( unsigned i4 = 0 ; i4 < unsigned(rsh.N4) ; ++i4 )
{
const long j = & right( i0, i1, i2, i3, i4 ) -
& right( 0, 0, 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
if ( & right( i0, i1, i2, i3, i4 ) !=
& right_stride( i0, i1, i2, i3, i4 ) ) { update |= 8 ; }
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 4 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( "left" )
, right( "right" )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i3 = 0 ; i3 < unsigned(lsh.N3) ; ++i3 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2, i3 ) -
& left( 0, 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
for ( unsigned i3 = 0 ; i3 < unsigned(rsh.N3) ; ++i3 )
{
const long j = & right( i0, i1, i2, i3 ) -
& right( 0, 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 3 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutStride, execution_space > stride_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
stride_view left_stride ;
stride_view right_stride ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( std::string("left") )
, right( std::string("right") )
, left_stride( left )
, right_stride( right )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1, i2 ) -
& left( 0, 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
if ( & left(i0,i1,i2) != & left_stride(i0,i1,i2) ) { update |= 4 ; }
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(rsh.N2) ; ++i2 )
{
const long j = & right( i0, i1, i2 ) -
& right( 0, 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
if ( & right(i0,i1,i2) != & right_stride(i0,i1,i2) ) { update |= 8 ; }
}
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i2 = 0 ; i2 < unsigned(lsh.N2) ; ++i2 )
{
if ( & left(i0,i1,i2) != & left.at(i0,i1,i2,0,0,0,0,0) ) { update |= 3 ; }
if ( & right(i0,i1,i2) != & right.at(i0,i1,i2,0,0,0,0,0) ) { update |= 3 ; }
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 2 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( Kokkos::ViewAllocate("left") )
, right( Kokkos::ViewAllocate("right") )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
long offset ;
offset = -1 ;
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
const long j = & left( i0, i1 ) -
& left( 0, 0 );
if ( j <= offset || left_alloc <= j ) { update |= 1 ; }
offset = j ;
}
offset = -1 ;
for ( unsigned i0 = 0 ; i0 < unsigned(rsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(rsh.N1) ; ++i1 )
{
const long j = & right( i0, i1 ) -
& right( 0, 0 );
if ( j <= offset || right_alloc <= j ) { update |= 2 ; }
offset = j ;
}
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
for ( unsigned i1 = 0 ; i1 < unsigned(lsh.N1) ; ++i1 )
{
if ( & left(i0,i1) != & left.at(i0,i1,0,0,0,0,0,0) ) { update |= 3 ; }
if ( & right(i0,i1) != & right.at(i0,i1,0,0,0,0,0,0) ) { update |= 3 ; }
}
}
};
template< class DataType , class DeviceType >
struct TestViewOperator_LeftAndRight< DataType , DeviceType , 1 >
{
typedef DeviceType execution_space ;
typedef typename execution_space::memory_space memory_space ;
typedef typename execution_space::size_type size_type ;
typedef int value_type ;
KOKKOS_INLINE_FUNCTION
static void join( volatile value_type & update ,
const volatile value_type & input )
{ update |= input ; }
KOKKOS_INLINE_FUNCTION
static void init( value_type & update )
{ update = 0 ; }
typedef Kokkos::
View< DataType, Kokkos::LayoutLeft, execution_space > left_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutRight, execution_space > right_view ;
typedef Kokkos::
View< DataType, Kokkos::LayoutStride, execution_space > stride_view ;
typedef typename left_view ::shape_type left_shape ;
typedef typename right_view::shape_type right_shape ;
left_shape lsh ;
right_shape rsh ;
left_view left ;
right_view right ;
stride_view left_stride ;
stride_view right_stride ;
long left_alloc ;
long right_alloc ;
TestViewOperator_LeftAndRight()
: lsh()
, rsh()
, left( Kokkos::ViewAllocate() )
, right( Kokkos::ViewAllocate() )
, left_stride( left )
, right_stride( right )
, left_alloc( allocation_count( left ) )
, right_alloc( allocation_count( right ) )
{}
static void testit()
{
TestViewOperator_LeftAndRight driver ;
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.lsh ) <= driver.left_alloc );
ASSERT_TRUE( (long) Kokkos::Impl::cardinality_count( driver.rsh ) <= driver.right_alloc );
int error_flag = 0 ;
Kokkos::parallel_reduce( 1 , driver , error_flag );
ASSERT_EQ( error_flag , 0 );
}
KOKKOS_INLINE_FUNCTION
void operator()( const size_type , value_type & update ) const
{
for ( unsigned i0 = 0 ; i0 < unsigned(lsh.N0) ; ++i0 )
{
if ( & left(i0) != & left.at(i0,0,0,0,0,0,0,0) ) { update |= 3 ; }
if ( & right(i0) != & right.at(i0,0,0,0,0,0,0,0) ) { update |= 3 ; }
if ( & left(i0) != & left_stride(i0) ) { update |= 4 ; }
if ( & right(i0) != & right_stride(i0) ) { update |= 8 ; }
}
}
};
/*--------------------------------------------------------------------------*/
template< typename T, class DeviceType >
class TestViewAPI
{
public:
typedef DeviceType device ;
enum { N0 = 1000 ,
N1 = 3 ,
N2 = 5 ,
N3 = 7 };
typedef Kokkos::View< T , device > dView0 ;
typedef Kokkos::View< T* , device > dView1 ;
typedef Kokkos::View< T*[N1] , device > dView2 ;
typedef Kokkos::View< T*[N1][N2] , device > dView3 ;
typedef Kokkos::View< T*[N1][N2][N3] , device > dView4 ;
typedef Kokkos::View< const T*[N1][N2][N3] , device > const_dView4 ;
typedef Kokkos::View< T****, device, Kokkos::MemoryUnmanaged > dView4_unmanaged ;
typedef typename dView0::host_mirror_space host ;
TestViewAPI()
{
run_test_mirror();
run_test();
run_test_scalar();
run_test_const();
run_test_subview();
run_test_subview_strided();
run_test_vector();
TestViewOperator< T , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2][3] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4][2][3][4][2] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4][2][3][4] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4][2][3] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4][2] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3][4] , device >::testit();
TestViewOperator_LeftAndRight< int[2][3] , device >::testit();
TestViewOperator_LeftAndRight< int[2] , device >::testit();
}
static void run_test_mirror()
{
typedef Kokkos::View< int , host > view_type ;
typedef typename view_type::HostMirror mirror_type ;
view_type a("a");
mirror_type am = Kokkos::create_mirror_view(a);
mirror_type ax = Kokkos::create_mirror(a);
ASSERT_EQ( & a() , & am() );
}
static void run_test_scalar()
{
typedef typename dView0::HostMirror hView0 ;
dView0 dx , dy ;
hView0 hx , hy ;
dx = dView0( "dx" );
dy = dView0( "dy" );
hx = Kokkos::create_mirror( dx );
hy = Kokkos::create_mirror( dy );
hx = 1 ;
Kokkos::deep_copy( dx , hx );
Kokkos::deep_copy( dy , dx );
Kokkos::deep_copy( hy , dy );
ASSERT_EQ( hx(), hy() );
}
static void run_test()
{
// mfh 14 Feb 2014: This test doesn't actually create instances of
// these types. In order to avoid "declared but unused typedef"
// warnings, we declare empty instances of these types, with the
// usual "(void)" marker to avoid compiler warnings for unused
// variables.
typedef typename dView0::HostMirror hView0 ;
typedef typename dView1::HostMirror hView1 ;
typedef typename dView2::HostMirror hView2 ;
typedef typename dView3::HostMirror hView3 ;
typedef typename dView4::HostMirror hView4 ;
{
hView0 thing;
(void) thing;
}
{
hView1 thing;
(void) thing;
}
{
hView2 thing;
(void) thing;
}
{
hView3 thing;
(void) thing;
}
{
hView4 thing;
(void) thing;
}
dView4 dx , dy , dz ;
hView4 hx , hy , hz ;
ASSERT_TRUE( dx.is_null() );
ASSERT_TRUE( dy.is_null() );
ASSERT_TRUE( dz.is_null() );
ASSERT_TRUE( hx.is_null() );
ASSERT_TRUE( hy.is_null() );
ASSERT_TRUE( hz.is_null() );
ASSERT_EQ( dx.dimension_0() , 0u );
ASSERT_EQ( dy.dimension_0() , 0u );
ASSERT_EQ( dz.dimension_0() , 0u );
ASSERT_EQ( hx.dimension_0() , 0u );
ASSERT_EQ( hy.dimension_0() , 0u );
ASSERT_EQ( hz.dimension_0() , 0u );
ASSERT_EQ( dx.dimension_1() , unsigned(N1) );
ASSERT_EQ( dy.dimension_1() , unsigned(N1) );
ASSERT_EQ( dz.dimension_1() , unsigned(N1) );
ASSERT_EQ( hx.dimension_1() , unsigned(N1) );
ASSERT_EQ( hy.dimension_1() , unsigned(N1) );
ASSERT_EQ( hz.dimension_1() , unsigned(N1) );
dx = dView4( "dx" , N0 );
dy = dView4( "dy" , N0 );
dView4_unmanaged unmanaged_dx = dx;
dView4_unmanaged unmanaged_from_ptr_dx = dView4_unmanaged(dx.ptr_on_device(),
dx.dimension_0(),
dx.dimension_1(),
dx.dimension_2(),
dx.dimension_3());
{
// Destruction of this view should be harmless
const_dView4 unmanaged_from_ptr_const_dx( dx.ptr_on_device() ,
dx.dimension_0() ,
dx.dimension_1() ,
dx.dimension_2() ,
dx.dimension_3() );
}
const_dView4 const_dx = dx ;
ASSERT_FALSE( dx.is_null() );
ASSERT_FALSE( const_dx.is_null() );
ASSERT_FALSE( unmanaged_dx.is_null() );
ASSERT_FALSE( unmanaged_from_ptr_dx.is_null() );
ASSERT_FALSE( dy.is_null() );
ASSERT_NE( dx , dy );
ASSERT_EQ( dx.dimension_0() , unsigned(N0) );
ASSERT_EQ( dx.dimension_1() , unsigned(N1) );
ASSERT_EQ( dx.dimension_2() , unsigned(N2) );
ASSERT_EQ( dx.dimension_3() , unsigned(N3) );
ASSERT_EQ( dy.dimension_0() , unsigned(N0) );
ASSERT_EQ( dy.dimension_1() , unsigned(N1) );
ASSERT_EQ( dy.dimension_2() , unsigned(N2) );
ASSERT_EQ( dy.dimension_3() , unsigned(N3) );
ASSERT_EQ( unmanaged_from_ptr_dx.capacity(),unsigned(N0)*unsigned(N1)*unsigned(N2)*unsigned(N3) );
hx = Kokkos::create_mirror( dx );
hy = Kokkos::create_mirror( dy );
// T v1 = hx() ; // Generates compile error as intended
// T v2 = hx(0,0) ; // Generates compile error as intended
// hx(0,0) = v2 ; // Generates compile error as intended
- size_t count = 0 ;
- for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
- for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) {
- for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) {
- for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) {
- hx(ip,i1,i2,i3) = ++count ;
- }}}}
-
- Kokkos::deep_copy( dx , hx );
- Kokkos::deep_copy( dy , dx );
- Kokkos::deep_copy( hy , dy );
-
- for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
- for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
- for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
- for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
- { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); }
- }}}}
-
- Kokkos::deep_copy( dx , T(0) );
- Kokkos::deep_copy( hx , dx );
-
- for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
- for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
- for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
- for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
- { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); }
- }}}}
+ // Testing with asynchronous deep copy with respect to device
+ {
+ size_t count = 0 ;
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) {
+ hx(ip,i1,i2,i3) = ++count ;
+ }}}}
+
+ Kokkos::deep_copy(typename hView4::execution_space(), dx , hx );
+ Kokkos::deep_copy(typename hView4::execution_space(), dy , dx );
+ Kokkos::deep_copy(typename hView4::execution_space(), hy , dy );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); }
+ }}}}
+
+ Kokkos::deep_copy(typename hView4::execution_space(), dx , T(0) );
+ Kokkos::deep_copy(typename hView4::execution_space(), hx , dx );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); }
+ }}}}
+ }
+ // Testing with asynchronous deep copy with respect to host
+ {
+ size_t count = 0 ;
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) {
+ hx(ip,i1,i2,i3) = ++count ;
+ }}}}
+
+ Kokkos::deep_copy(typename dView4::execution_space(), dx , hx );
+ Kokkos::deep_copy(typename dView4::execution_space(), dy , dx );
+ Kokkos::deep_copy(typename dView4::execution_space(), hy , dy );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); }
+ }}}}
+
+ Kokkos::deep_copy(typename dView4::execution_space(), dx , T(0) );
+ Kokkos::deep_copy(typename dView4::execution_space(), hx , dx );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); }
+ }}}}
+ }
+ // Testing with synchronous deep copy
+ {
+ size_t count = 0 ;
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < hx.dimension_1() ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < hx.dimension_2() ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < hx.dimension_3() ; ++i3 ) {
+ hx(ip,i1,i2,i3) = ++count ;
+ }}}}
+
+ Kokkos::deep_copy( dx , hx );
+ Kokkos::deep_copy( dy , dx );
+ Kokkos::deep_copy( hy , dy );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , hy(ip,i1,i2,i3) ); }
+ }}}}
+
+ Kokkos::deep_copy( dx , T(0) );
+ Kokkos::deep_copy( hx , dx );
+
+ for ( size_t ip = 0 ; ip < N0 ; ++ip ) {
+ for ( size_t i1 = 0 ; i1 < N1 ; ++i1 ) {
+ for ( size_t i2 = 0 ; i2 < N2 ; ++i2 ) {
+ for ( size_t i3 = 0 ; i3 < N3 ; ++i3 ) {
+ { ASSERT_EQ( hx(ip,i1,i2,i3) , T(0) ); }
+ }}}}
+ }
dz = dx ; ASSERT_EQ( dx, dz); ASSERT_NE( dy, dz);
dz = dy ; ASSERT_EQ( dy, dz); ASSERT_NE( dx, dz);
dx = dView4();
ASSERT_TRUE( dx.is_null() );
ASSERT_FALSE( dy.is_null() );
ASSERT_FALSE( dz.is_null() );
dy = dView4();
ASSERT_TRUE( dx.is_null() );
ASSERT_TRUE( dy.is_null() );
ASSERT_FALSE( dz.is_null() );
dz = dView4();
ASSERT_TRUE( dx.is_null() );
ASSERT_TRUE( dy.is_null() );
ASSERT_TRUE( dz.is_null() );
}
typedef T DataType[2] ;
static void
check_auto_conversion_to_const(
const Kokkos::View< const DataType , device > & arg_const ,
const Kokkos::View< DataType , device > & arg )
{
ASSERT_TRUE( arg_const == arg );
}
static void run_test_const()
{
typedef Kokkos::View< DataType , device > typeX ;
typedef Kokkos::View< const DataType , device > const_typeX ;
typedef Kokkos::View< const DataType , device , Kokkos::MemoryRandomAccess > const_typeR ;
typeX x( "X" );
const_typeX xc = x ;
const_typeR xr = x ;
ASSERT_TRUE( xc == x );
ASSERT_TRUE( x == xc );
ASSERT_TRUE( x.ptr_on_device() == xr.ptr_on_device() );
// typeX xf = xc ; // setting non-const from const must not compile
check_auto_conversion_to_const( x , x );
}
static void run_test_subview()
{
typedef Kokkos::View< const T , device > sView ;
dView0 d0( "d0" );
dView1 d1( "d1" , N0 );
dView2 d2( "d2" , N0 );
dView3 d3( "d3" , N0 );
dView4 d4( "d4" , N0 );
sView s0 = d0 ;
sView s1 = Kokkos::subview( d1 , 1 );
sView s2 = Kokkos::subview( d2 , 1 , 1 );
sView s3 = Kokkos::subview( d3 , 1 , 1 , 1 );
sView s4 = Kokkos::subview( d4 , 1 , 1 , 1 , 1 );
}
static void run_test_subview_strided()
{
typedef Kokkos::View< int **** , Kokkos::LayoutLeft , host > view_left_4 ;
typedef Kokkos::View< int **** , Kokkos::LayoutRight , host > view_right_4 ;
typedef Kokkos::View< int ** , Kokkos::LayoutLeft , host > view_left_2 ;
typedef Kokkos::View< int ** , Kokkos::LayoutRight , host > view_right_2 ;
typedef Kokkos::View< int * , Kokkos::LayoutStride , host > view_stride_1 ;
typedef Kokkos::View< int ** , Kokkos::LayoutStride , host > view_stride_2 ;
view_left_2 xl2("xl2", 100 , 200 );
view_right_2 xr2("xr2", 100 , 200 );
view_stride_1 yl1 = Kokkos::subview( xl2 , 0 , Kokkos::ALL() );
view_stride_1 yl2 = Kokkos::subview( xl2 , 1 , Kokkos::ALL() );
view_stride_1 yr1 = Kokkos::subview( xr2 , 0 , Kokkos::ALL() );
view_stride_1 yr2 = Kokkos::subview( xr2 , 1 , Kokkos::ALL() );
ASSERT_EQ( yl1.dimension_0() , xl2.dimension_1() );
ASSERT_EQ( yl2.dimension_0() , xl2.dimension_1() );
ASSERT_EQ( yr1.dimension_0() , xr2.dimension_1() );
ASSERT_EQ( yr2.dimension_0() , xr2.dimension_1() );
ASSERT_EQ( & yl1(0) - & xl2(0,0) , 0 );
ASSERT_EQ( & yl2(0) - & xl2(1,0) , 0 );
ASSERT_EQ( & yr1(0) - & xr2(0,0) , 0 );
ASSERT_EQ( & yr2(0) - & xr2(1,0) , 0 );
view_left_4 xl4( "xl4" , 10 , 20 , 30 , 40 );
view_right_4 xr4( "xr4" , 10 , 20 , 30 , 40 );
view_stride_2 yl4 = Kokkos::subview( xl4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() );
view_stride_2 yr4 = Kokkos::subview( xr4 , 1 , Kokkos::ALL() , 2 , Kokkos::ALL() );
ASSERT_EQ( yl4.dimension_0() , xl4.dimension_1() );
ASSERT_EQ( yl4.dimension_1() , xl4.dimension_3() );
ASSERT_EQ( yr4.dimension_0() , xr4.dimension_1() );
ASSERT_EQ( yr4.dimension_1() , xr4.dimension_3() );
ASSERT_EQ( & yl4(4,4) - & xl4(1,4,2,4) , 0 );
ASSERT_EQ( & yr4(4,4) - & xr4(1,4,2,4) , 0 );
}
static void run_test_vector()
{
static const unsigned Length = 1000 , Count = 8 ;
typedef Kokkos::View< T* , Kokkos::LayoutLeft , host > vector_type ;
typedef Kokkos::View< T** , Kokkos::LayoutLeft , host > multivector_type ;
typedef Kokkos::View< T* , Kokkos::LayoutRight , host > vector_right_type ;
typedef Kokkos::View< T** , Kokkos::LayoutRight , host > multivector_right_type ;
typedef Kokkos::View< const T* , Kokkos::LayoutRight, host > const_vector_right_type ;
typedef Kokkos::View< const T* , Kokkos::LayoutLeft , host > const_vector_type ;
typedef Kokkos::View< const T** , Kokkos::LayoutLeft , host > const_multivector_type ;
multivector_type mv = multivector_type( "mv" , Length , Count );
multivector_right_type mv_right = multivector_right_type( "mv" , Length , Count );
vector_type v1 = Kokkos::subview( mv , Kokkos::ALL() , 0 );
vector_type v2 = Kokkos::subview( mv , Kokkos::ALL() , 1 );
vector_type v3 = Kokkos::subview( mv , Kokkos::ALL() , 2 );
vector_type rv1 = Kokkos::subview( mv_right , 0 , Kokkos::ALL() );
vector_type rv2 = Kokkos::subview( mv_right , 1 , Kokkos::ALL() );
vector_type rv3 = Kokkos::subview( mv_right , 2 , Kokkos::ALL() );
multivector_type mv1 = Kokkos::subview( mv , std::make_pair( 1 , 998 ) ,
std::make_pair( 2 , 5 ) );
multivector_right_type mvr1 =
Kokkos::subview( mv_right ,
std::make_pair( 1 , 998 ) ,
std::make_pair( 2 , 5 ) );
const_vector_type cv1 = Kokkos::subview( mv , Kokkos::ALL(), 0 );
const_vector_type cv2 = Kokkos::subview( mv , Kokkos::ALL(), 1 );
const_vector_type cv3 = Kokkos::subview( mv , Kokkos::ALL(), 2 );
vector_right_type vr1 = Kokkos::subview( mv , Kokkos::ALL() , 0 );
vector_right_type vr2 = Kokkos::subview( mv , Kokkos::ALL() , 1 );
vector_right_type vr3 = Kokkos::subview( mv , Kokkos::ALL() , 2 );
const_vector_right_type cvr1 = Kokkos::subview( mv , Kokkos::ALL() , 0 );
const_vector_right_type cvr2 = Kokkos::subview( mv , Kokkos::ALL() , 1 );
const_vector_right_type cvr3 = Kokkos::subview( mv , Kokkos::ALL() , 2 );
ASSERT_TRUE( & v1[0] == & v1(0) );
ASSERT_TRUE( & v1[0] == & mv(0,0) );
ASSERT_TRUE( & v2[0] == & mv(0,1) );
ASSERT_TRUE( & v3[0] == & mv(0,2) );
ASSERT_TRUE( & cv1[0] == & mv(0,0) );
ASSERT_TRUE( & cv2[0] == & mv(0,1) );
ASSERT_TRUE( & cv3[0] == & mv(0,2) );
ASSERT_TRUE( & vr1[0] == & mv(0,0) );
ASSERT_TRUE( & vr2[0] == & mv(0,1) );
ASSERT_TRUE( & vr3[0] == & mv(0,2) );
ASSERT_TRUE( & cvr1[0] == & mv(0,0) );
ASSERT_TRUE( & cvr2[0] == & mv(0,1) );
ASSERT_TRUE( & cvr3[0] == & mv(0,2) );
ASSERT_TRUE( & mv1(0,0) == & mv( 1 , 2 ) );
ASSERT_TRUE( & mv1(1,1) == & mv( 2 , 3 ) );
ASSERT_TRUE( & mv1(3,2) == & mv( 4 , 4 ) );
ASSERT_TRUE( & mvr1(0,0) == & mv_right( 1 , 2 ) );
ASSERT_TRUE( & mvr1(1,1) == & mv_right( 2 , 3 ) );
ASSERT_TRUE( & mvr1(3,2) == & mv_right( 4 , 4 ) );
const_vector_type c_cv1( v1 );
typename vector_type::const_type c_cv2( v2 );
typename const_vector_type::const_type c_ccv2( v2 );
const_multivector_type cmv( mv );
typename multivector_type::const_type cmvX( cmv );
typename const_multivector_type::const_type ccmvX( cmv );
}
};
} // namespace Test
#endif
/*--------------------------------------------------------------------------*/
diff --git a/lib/kokkos/core/unit_test/TestViewImpl.hpp b/lib/kokkos/core/unit_test/TestViewImpl.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestViewMapping.hpp b/lib/kokkos/core/unit_test/TestViewMapping.hpp
old mode 100755
new mode 100644
index 31e0c6a7b..e38098410
--- a/lib/kokkos/core/unit_test/TestViewMapping.hpp
+++ b/lib/kokkos/core/unit_test/TestViewMapping.hpp
@@ -1,1018 +1,1080 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <stdexcept>
#include <sstream>
#include <iostream>
#include <Kokkos_Core.hpp>
/*--------------------------------------------------------------------------*/
namespace Test {
template< class RangeType >
void test_view_range( const size_t N , const RangeType & range , const size_t begin , const size_t dim )
{
typedef Kokkos::Experimental::Impl::ViewOffsetRange< RangeType > query ;
ASSERT_EQ( query::begin( range ) , begin );
ASSERT_EQ( query::dimension( N , range ) , dim );
ASSERT_EQ( query::is_range , dim != 0 );
}
template< class ExecSpace >
void test_view_mapping()
{
typedef Kokkos::Experimental::Impl::ViewDimension<> dim_0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<2> dim_s2 ;
typedef Kokkos::Experimental::Impl::ViewDimension<2,3> dim_s2_s3 ;
typedef Kokkos::Experimental::Impl::ViewDimension<2,3,4> dim_s2_s3_s4 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0> dim_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,3> dim_s0_s3 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,3,4> dim_s0_s3_s4 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0> dim_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,4> dim_s0_s0_s4 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0> dim_s0_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0> dim_s0_s0_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0> dim_s0_s0_s0_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0_s0 ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0,0,0,0,0,0> dim_s0_s0_s0_s0_s0_s0_s0_s0 ;
// Fully static dimensions should not be larger than an int
ASSERT_LE( sizeof(dim_0) , sizeof(int) );
ASSERT_LE( sizeof(dim_s2) , sizeof(int) );
ASSERT_LE( sizeof(dim_s2_s3) , sizeof(int) );
ASSERT_LE( sizeof(dim_s2_s3_s4) , sizeof(int) );
// Rank 1 is size_t
ASSERT_EQ( sizeof(dim_s0) , sizeof(size_t) );
ASSERT_EQ( sizeof(dim_s0_s3) , sizeof(size_t) );
ASSERT_EQ( sizeof(dim_s0_s3_s4) , sizeof(size_t) );
// Allow for padding
ASSERT_LE( sizeof(dim_s0_s0) , 2 * sizeof(size_t) );
ASSERT_LE( sizeof(dim_s0_s0_s4) , 2 * sizeof(size_t) );
ASSERT_LE( sizeof(dim_s0_s0_s0) , 4 * sizeof(size_t) );
ASSERT_EQ( sizeof(dim_s0_s0_s0_s0) , 4 * sizeof(unsigned) );
ASSERT_LE( sizeof(dim_s0_s0_s0_s0_s0) , 6 * sizeof(unsigned) );
ASSERT_EQ( sizeof(dim_s0_s0_s0_s0_s0_s0) , 6 * sizeof(unsigned) );
ASSERT_LE( sizeof(dim_s0_s0_s0_s0_s0_s0_s0) , 8 * sizeof(unsigned) );
ASSERT_EQ( sizeof(dim_s0_s0_s0_s0_s0_s0_s0_s0) , 8 * sizeof(unsigned) );
ASSERT_EQ( int(dim_0::rank) , int(0) );
ASSERT_EQ( int(dim_0::rank_dynamic) , int(0) );
ASSERT_EQ( int(dim_s2::rank) , int(1) );
ASSERT_EQ( int(dim_s2::rank_dynamic) , int(0) );
ASSERT_EQ( int(dim_s2_s3::rank) , int(2) );
ASSERT_EQ( int(dim_s2_s3::rank_dynamic) , int(0) );
ASSERT_EQ( int(dim_s2_s3_s4::rank) , int(3) );
ASSERT_EQ( int(dim_s2_s3_s4::rank_dynamic) , int(0) );
ASSERT_EQ( int(dim_s0::rank) , int(1) );
ASSERT_EQ( int(dim_s0::rank_dynamic) , int(1) );
ASSERT_EQ( int(dim_s0_s3::rank) , int(2) );
ASSERT_EQ( int(dim_s0_s3::rank_dynamic) , int(1) );
ASSERT_EQ( int(dim_s0_s3_s4::rank) , int(3) );
ASSERT_EQ( int(dim_s0_s3_s4::rank_dynamic) , int(1) );
ASSERT_EQ( int(dim_s0_s0_s4::rank) , int(3) );
ASSERT_EQ( int(dim_s0_s0_s4::rank_dynamic) , int(2) );
ASSERT_EQ( int(dim_s0_s0_s0::rank) , int(3) );
ASSERT_EQ( int(dim_s0_s0_s0::rank_dynamic) , int(3) );
ASSERT_EQ( int(dim_s0_s0_s0_s0::rank) , int(4) );
ASSERT_EQ( int(dim_s0_s0_s0_s0::rank_dynamic) , int(4) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0::rank) , int(5) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0::rank_dynamic) , int(5) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0::rank) , int(6) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0::rank_dynamic) , int(6) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0_s0::rank) , int(7) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0_s0::rank_dynamic) , int(7) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0_s0_s0::rank) , int(8) );
ASSERT_EQ( int(dim_s0_s0_s0_s0_s0_s0_s0_s0::rank_dynamic) , int(8) );
dim_s0 d1( 2, 3, 4, 5, 6, 7, 8, 9 );
dim_s0_s0 d2( 2, 3, 4, 5, 6, 7, 8, 9 );
dim_s0_s0_s0 d3( 2, 3, 4, 5, 6, 7, 8, 9 );
dim_s0_s0_s0_s0 d4( 2, 3, 4, 5, 6, 7, 8, 9 );
ASSERT_EQ( d1.N0 , 2 );
ASSERT_EQ( d2.N0 , 2 );
ASSERT_EQ( d3.N0 , 2 );
ASSERT_EQ( d4.N0 , 2 );
ASSERT_EQ( d1.N1 , 1 );
ASSERT_EQ( d2.N1 , 3 );
ASSERT_EQ( d3.N1 , 3 );
ASSERT_EQ( d4.N1 , 3 );
ASSERT_EQ( d1.N2 , 1 );
ASSERT_EQ( d2.N2 , 1 );
ASSERT_EQ( d3.N2 , 4 );
ASSERT_EQ( d4.N2 , 4 );
ASSERT_EQ( d1.N3 , 1 );
ASSERT_EQ( d2.N3 , 1 );
ASSERT_EQ( d3.N3 , 1 );
ASSERT_EQ( d4.N3 , 5 );
//----------------------------------------
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s0 , Kokkos::LayoutStride > stride_s0_s0_s0 ;
//----------------------------------------
// Static dimension
{
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4 , Kokkos::LayoutLeft > left_s2_s3_s4 ;
ASSERT_EQ( sizeof(left_s2_s3_s4) , sizeof(dim_s2_s3_s4) );
left_s2_s3_s4 off3 ;
stride_s0_s0_s0 stride3( off3 );
ASSERT_EQ( off3.stride_0() , 1 );
ASSERT_EQ( off3.stride_1() , 2 );
ASSERT_EQ( off3.stride_2() , 6 );
ASSERT_EQ( off3.span() , 24 );
ASSERT_EQ( off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( off3.stride_2() , stride3.stride_2() );
ASSERT_EQ( off3.span() , stride3.span() );
int offset = 0 ;
for ( int k = 0 ; k < 4 ; ++k ){
for ( int j = 0 ; j < 3 ; ++j ){
for ( int i = 0 ; i < 2 ; ++i , ++offset ){
ASSERT_EQ( off3(i,j,k) , offset );
ASSERT_EQ( stride3(i,j,k) , off3(i,j,k) );
}}}
}
//----------------------------------------
// Small dimension is unpadded
{
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ;
left_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), 2, 3, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 );
ASSERT_EQ( dyn_off3.m_dim.rank , 3 );
ASSERT_EQ( dyn_off3.m_dim.N0 , 2 );
ASSERT_EQ( dyn_off3.m_dim.N1 , 3 );
ASSERT_EQ( dyn_off3.m_dim.N2 , 4 );
ASSERT_EQ( dyn_off3.m_dim.N3 , 1 );
ASSERT_EQ( dyn_off3.size() , 2 * 3 * 4 );
ASSERT_EQ( stride3.m_dim.rank , 3 );
ASSERT_EQ( stride3.m_dim.N0 , 2 );
ASSERT_EQ( stride3.m_dim.N1 , 3 );
ASSERT_EQ( stride3.m_dim.N2 , 4 );
ASSERT_EQ( stride3.m_dim.N3 , 1 );
ASSERT_EQ( stride3.size() , 2 * 3 * 4 );
int offset = 0 ;
for ( int k = 0 ; k < 4 ; ++k ){
for ( int j = 0 ; j < 3 ; ++j ){
for ( int i = 0 ; i < 2 ; ++i , ++offset ){
ASSERT_EQ( offset , dyn_off3(i,j,k) );
ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) );
}}}
ASSERT_EQ( dyn_off3.span() , offset );
ASSERT_EQ( stride3.span() , dyn_off3.span() );
}
// Large dimension is likely padded
{
constexpr int N0 = 2000 ;
constexpr int N1 = 300 ;
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ;
left_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), N0, N1, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 );
ASSERT_EQ( dyn_off3.m_dim.rank , 3 );
ASSERT_EQ( dyn_off3.m_dim.N0 , N0 );
ASSERT_EQ( dyn_off3.m_dim.N1 , N1 );
ASSERT_EQ( dyn_off3.m_dim.N2 , 4 );
ASSERT_EQ( dyn_off3.m_dim.N3 , 1 );
ASSERT_EQ( dyn_off3.size() , N0 * N1 * 4 );
ASSERT_EQ( stride3.m_dim.rank , 3 );
ASSERT_EQ( stride3.m_dim.N0 , N0 );
ASSERT_EQ( stride3.m_dim.N1 , N1 );
ASSERT_EQ( stride3.m_dim.N2 , 4 );
ASSERT_EQ( stride3.m_dim.N3 , 1 );
ASSERT_EQ( stride3.size() , N0 * N1 * 4 );
ASSERT_EQ( stride3.span() , dyn_off3.span() );
int offset = 0 ;
for ( int k = 0 ; k < 4 ; ++k ){
for ( int j = 0 ; j < N1 ; ++j ){
for ( int i = 0 ; i < N0 ; ++i ){
ASSERT_LE( offset , dyn_off3(i,j,k) );
ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) );
offset = dyn_off3(i,j,k) + 1 ;
}}}
ASSERT_LE( offset , dyn_off3.span() );
}
//----------------------------------------
// Static dimension
{
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s2_s3_s4 , Kokkos::LayoutRight > right_s2_s3_s4 ;
ASSERT_EQ( sizeof(right_s2_s3_s4) , sizeof(dim_s2_s3_s4) );
right_s2_s3_s4 off3 ;
stride_s0_s0_s0 stride3( off3 );
ASSERT_EQ( off3.stride_0() , 12 );
ASSERT_EQ( off3.stride_1() , 4 );
ASSERT_EQ( off3.stride_2() , 1 );
ASSERT_EQ( off3.dimension_0() , stride3.dimension_0() );
ASSERT_EQ( off3.dimension_1() , stride3.dimension_1() );
ASSERT_EQ( off3.dimension_2() , stride3.dimension_2() );
ASSERT_EQ( off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( off3.stride_2() , stride3.stride_2() );
ASSERT_EQ( off3.span() , stride3.span() );
int offset = 0 ;
for ( int i = 0 ; i < 2 ; ++i ){
for ( int j = 0 ; j < 3 ; ++j ){
for ( int k = 0 ; k < 4 ; ++k , ++offset ){
ASSERT_EQ( off3(i,j,k) , offset );
ASSERT_EQ( off3(i,j,k) , stride3(i,j,k) );
}}}
ASSERT_EQ( off3.span() , offset );
}
//----------------------------------------
// Small dimension is unpadded
{
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ;
right_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), 2, 3, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 );
ASSERT_EQ( dyn_off3.m_dim.rank , 3 );
ASSERT_EQ( dyn_off3.m_dim.N0 , 2 );
ASSERT_EQ( dyn_off3.m_dim.N1 , 3 );
ASSERT_EQ( dyn_off3.m_dim.N2 , 4 );
ASSERT_EQ( dyn_off3.m_dim.N3 , 1 );
ASSERT_EQ( dyn_off3.size() , 2 * 3 * 4 );
ASSERT_EQ( dyn_off3.dimension_0() , stride3.dimension_0() );
ASSERT_EQ( dyn_off3.dimension_1() , stride3.dimension_1() );
ASSERT_EQ( dyn_off3.dimension_2() , stride3.dimension_2() );
ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() );
ASSERT_EQ( dyn_off3.span() , stride3.span() );
int offset = 0 ;
for ( int i = 0 ; i < 2 ; ++i ){
for ( int j = 0 ; j < 3 ; ++j ){
for ( int k = 0 ; k < 4 ; ++k , ++offset ){
ASSERT_EQ( offset , dyn_off3(i,j,k) );
ASSERT_EQ( dyn_off3(i,j,k) , stride3(i,j,k) );
}}}
ASSERT_EQ( dyn_off3.span() , offset );
}
// Large dimension is likely padded
{
constexpr int N0 = 2000 ;
constexpr int N1 = 300 ;
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ;
right_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), N0, N1, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 );
ASSERT_EQ( dyn_off3.m_dim.rank , 3 );
ASSERT_EQ( dyn_off3.m_dim.N0 , N0 );
ASSERT_EQ( dyn_off3.m_dim.N1 , N1 );
ASSERT_EQ( dyn_off3.m_dim.N2 , 4 );
ASSERT_EQ( dyn_off3.m_dim.N3 , 1 );
ASSERT_EQ( dyn_off3.size() , N0 * N1 * 4 );
ASSERT_EQ( dyn_off3.dimension_0() , stride3.dimension_0() );
ASSERT_EQ( dyn_off3.dimension_1() , stride3.dimension_1() );
ASSERT_EQ( dyn_off3.dimension_2() , stride3.dimension_2() );
ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() );
ASSERT_EQ( dyn_off3.span() , stride3.span() );
int offset = 0 ;
for ( int i = 0 ; i < N0 ; ++i ){
for ( int j = 0 ; j < N1 ; ++j ){
for ( int k = 0 ; k < 4 ; ++k ){
ASSERT_LE( offset , dyn_off3(i,j,k) );
ASSERT_EQ( dyn_off3(i,j,k) , stride3(i,j,k) );
offset = dyn_off3(i,j,k) + 1 ;
}}}
ASSERT_LE( offset , dyn_off3.span() );
}
//----------------------------------------
// Subview
{
constexpr int N0 = 2000 ;
constexpr int N1 = 300 ;
constexpr int sub_N0 = 1000 ;
constexpr int sub_N1 = 200 ;
constexpr int sub_N2 = 4 ;
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutLeft > left_s0_s0_s4 ;
left_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), N0, N1, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 , sub_N0 , sub_N1 , sub_N2 , 0 , 0 , 0 , 0 , 0 );
ASSERT_EQ( stride3.dimension_0() , sub_N0 );
ASSERT_EQ( stride3.dimension_1() , sub_N1 );
ASSERT_EQ( stride3.dimension_2() , sub_N2 );
ASSERT_EQ( stride3.size() , sub_N0 * sub_N1 * sub_N2 );
ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() );
ASSERT_GE( dyn_off3.span() , stride3.span() );
for ( int k = 0 ; k < sub_N2 ; ++k ){
for ( int j = 0 ; j < sub_N1 ; ++j ){
for ( int i = 0 ; i < sub_N0 ; ++i ){
ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) );
}}}
}
{
constexpr int N0 = 2000 ;
constexpr int N1 = 300 ;
constexpr int sub_N0 = 1000 ;
constexpr int sub_N1 = 200 ;
constexpr int sub_N2 = 4 ;
typedef Kokkos::Experimental::Impl::ViewOffset< dim_s0_s0_s4 , Kokkos::LayoutRight > right_s0_s0_s4 ;
right_s0_s0_s4 dyn_off3( std::integral_constant<unsigned,sizeof(int)>(), N0, N1, 0, 0, 0, 0, 0, 0 );
stride_s0_s0_s0 stride3( dyn_off3 , sub_N0 , sub_N1 , sub_N2 , 0 , 0 , 0 , 0 , 0 );
ASSERT_EQ( stride3.dimension_0() , sub_N0 );
ASSERT_EQ( stride3.dimension_1() , sub_N1 );
ASSERT_EQ( stride3.dimension_2() , sub_N2 );
ASSERT_EQ( stride3.size() , sub_N0 * sub_N1 * sub_N2 );
ASSERT_EQ( dyn_off3.stride_0() , stride3.stride_0() );
ASSERT_EQ( dyn_off3.stride_1() , stride3.stride_1() );
ASSERT_EQ( dyn_off3.stride_2() , stride3.stride_2() );
ASSERT_GE( dyn_off3.span() , stride3.span() );
for ( int i = 0 ; i < sub_N0 ; ++i ){
for ( int j = 0 ; j < sub_N1 ; ++j ){
for ( int k = 0 ; k < sub_N2 ; ++k ){
ASSERT_EQ( stride3(i,j,k) , dyn_off3(i,j,k) );
}}}
}
//----------------------------------------
{
constexpr int N = 1000 ;
test_view_range( N , N / 2 , N / 2 , 0 );
test_view_range( N , Kokkos::Experimental::ALL , 0 , N );
test_view_range( N , std::pair<int,int>( N / 4 , 10 + N / 4 ) , N / 4 , 10 );
test_view_range( N , Kokkos::pair<int,int>( N / 4 , 10 + N / 4 ) , N / 4 , 10 );
}
//----------------------------------------
// view data analysis
{
- typedef Kokkos::Experimental::Impl::ViewDataAnalysis< const int[] > a_const_int_r1 ;
-
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::specialize , void >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::dimension , Kokkos::Experimental::Impl::ViewDimension<0> >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::type , const int[] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::value_type , const int >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::array_scalar_type , const int[] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::const_type , const int[] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::const_value_type , const int >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::const_array_scalar_type , const int[] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::non_const_type , int [] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r1::non_const_value_type , int >::value ));
-
- typedef Kokkos::Experimental::Impl::ViewDataAnalysis< const int**[4] > a_const_int_r3 ;
-
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::specialize , void >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::dimension , Kokkos::Experimental::Impl::ViewDimension<0,0,4> >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::type , const int**[4] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::value_type , const int >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::array_scalar_type , const int**[4] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::const_type , const int**[4] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::const_value_type , const int >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::const_array_scalar_type , const int**[4] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::non_const_type , int**[4] >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::non_const_value_type , int >::value ));
- ASSERT_TRUE( ( std::is_same< typename a_const_int_r3::non_const_array_scalar_type , int**[4] >::value ));
+ using namespace Kokkos::Experimental::Impl ;
+
+ typedef ViewArrayAnalysis< int[] > a_int_r1 ;
+ typedef ViewArrayAnalysis< int**[4][5][6] > a_int_r5 ;
+ typedef ViewArrayAnalysis< const int[] > a_const_int_r1 ;
+ typedef ViewArrayAnalysis< const int**[4][5][6] > a_const_int_r5 ;
+
+ static_assert( a_int_r1::dimension::rank == 1 , "" );
+ static_assert( a_int_r1::dimension::rank_dynamic == 1 , "" );
+ static_assert( std::is_same< typename a_int_r1::dimension , ViewDimension<0> >::value , "" );
+ static_assert( std::is_same< typename a_int_r1::non_const_value_type , int >::value , "" );
+
+ static_assert( a_const_int_r1::dimension::rank == 1 , "" );
+ static_assert( a_const_int_r1::dimension::rank_dynamic == 1 , "" );
+ static_assert( std::is_same< typename a_const_int_r1::dimension , ViewDimension<0> >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::non_const_value_type , int >::value , "" );
+
+ static_assert( a_const_int_r5::dimension::rank == 5 , "" );
+ static_assert( a_const_int_r5::dimension::rank_dynamic == 2 , "" );
+ static_assert( std::is_same< typename a_const_int_r5::dimension , ViewDimension<0,0,4,5,6> >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r5::non_const_value_type , int >::value , "" );
+
+ static_assert( a_int_r5::dimension::rank == 5 , "" );
+ static_assert( a_int_r5::dimension::rank_dynamic == 2 , "" );
+ static_assert( std::is_same< typename a_int_r5::dimension , ViewDimension<0,0,4,5,6> >::value , "" );
+ static_assert( std::is_same< typename a_int_r5::non_const_value_type , int >::value , "" );
+ }
+
+ {
+ using namespace Kokkos::Experimental::Impl ;
+
+ typedef int t_i4[4] ;
+
+ // Dimensions of t_i4 are appended to the multdimensional array.
+ typedef ViewArrayAnalysis< t_i4 ***[3] > a_int_r5 ;
+
+ static_assert( a_int_r5::dimension::rank == 5 , "" );
+ static_assert( a_int_r5::dimension::rank_dynamic == 3 , "" );
+ static_assert( a_int_r5::dimension::arg_N0 == 0 , "" );
+ static_assert( a_int_r5::dimension::arg_N1 == 0 , "" );
+ static_assert( a_int_r5::dimension::arg_N2 == 0 , "" );
+ static_assert( a_int_r5::dimension::arg_N3 == 3 , "" );
+ static_assert( a_int_r5::dimension::arg_N4 == 4 , "" );
+ static_assert( std::is_same< typename a_int_r5::non_const_value_type , int >::value , "" );
+ }
+
+ {
+ using namespace Kokkos::Experimental::Impl ;
+
+ typedef ViewDataAnalysis< const int[] , typename ViewArrayAnalysis<const int[]>::non_const_value_type , void > a_const_int_r1 ;
+
+ static_assert( std::is_same< typename a_const_int_r1::specialize , void >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::dimension , Kokkos::Experimental::Impl::ViewDimension<0> >::value , "" );
+
+ static_assert( std::is_same< typename a_const_int_r1::type , const int * >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::value_type , const int >::value , "" );
+
+ static_assert( std::is_same< typename a_const_int_r1::array_scalar_type , const int * >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::const_type , const int * >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::const_value_type , const int >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::const_array_scalar_type , const int * >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::non_const_type , int * >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r1::non_const_value_type , int >::value , "" );
+
+ typedef ViewDataAnalysis< const int**[4] , typename ViewArrayAnalysis< const int **[4] >::non_const_value_type , void > a_const_int_r3 ;
+
+ static_assert( std::is_same< typename a_const_int_r3::specialize , void >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::dimension , Kokkos::Experimental::Impl::ViewDimension<0,0,4> >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::type , const int**[4] >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::value_type , const int >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::array_scalar_type , const int**[4] >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::const_type , const int**[4] >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::const_value_type , const int >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::const_array_scalar_type , const int**[4] >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::non_const_type , int**[4] >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::non_const_value_type , int >::value , "" );
+ static_assert( std::is_same< typename a_const_int_r3::non_const_array_scalar_type , int**[4] >::value , "" );
+
+
+ // std::cout << "typeid(const int**[4]).name() = " << typeid(const int**[4]).name() << std::endl ;
}
//----------------------------------------
{
constexpr int N = 10 ;
typedef Kokkos::Experimental::View<int*,ExecSpace> T ;
typedef Kokkos::Experimental::View<const int*,ExecSpace> C ;
int data[N] ;
T vr1(data,N);
C cr1(vr1);
// Generate static_assert error:
// T tmp( cr1 );
ASSERT_EQ( vr1.span() , N );
ASSERT_EQ( cr1.span() , N );
ASSERT_EQ( vr1.data() , & data[0] );
ASSERT_EQ( cr1.data() , & data[0] );
ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::array_scalar_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_array_scalar_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_array_scalar_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type , int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::memory_space , typename ExecSpace::memory_space >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::reference_type , int & >::value ) );
ASSERT_EQ( T::Rank , 1 );
ASSERT_TRUE( ( std::is_same< typename C::data_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::const_data_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::non_const_data_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::array_scalar_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::const_array_scalar_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::non_const_array_scalar_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::value_type , const int >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::const_value_type , const int >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::non_const_value_type , int >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::memory_space , typename ExecSpace::memory_space >::value ) );
ASSERT_TRUE( ( std::is_same< typename C::reference_type , const int & >::value ) );
ASSERT_EQ( C::Rank , 1 );
ASSERT_EQ( vr1.dimension_0() , N );
if ( Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< typename ExecSpace::memory_space , Kokkos::HostSpace >::value ) {
for ( int i = 0 ; i < N ; ++i ) data[i] = i + 1 ;
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 1 );
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( cr1[i] , i + 1 );
{
T tmp( vr1 );
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 1 );
for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 2 ;
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 2 );
}
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 2 );
}
}
{
constexpr int N = 10 ;
typedef Kokkos::Experimental::View<int*,ExecSpace> T ;
typedef Kokkos::Experimental::View<const int*,ExecSpace> C ;
T vr1("vr1",N);
C cr1(vr1);
ASSERT_TRUE( ( std::is_same< typename T::data_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_data_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_data_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::array_scalar_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_array_scalar_type , const int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_array_scalar_type , int* >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::value_type , int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::const_value_type , const int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::non_const_value_type , int >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::memory_space , typename ExecSpace::memory_space >::value ) );
ASSERT_TRUE( ( std::is_same< typename T::reference_type , int & >::value ) );
ASSERT_EQ( T::Rank , 1 );
ASSERT_EQ( vr1.dimension_0() , N );
if ( Kokkos::Impl::VerifyExecutionCanAccessMemorySpace< typename ExecSpace::memory_space , Kokkos::HostSpace >::value ) {
for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 1 ;
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 1 );
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( cr1[i] , i + 1 );
{
T tmp( vr1 );
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 1 );
for ( int i = 0 ; i < N ; ++i ) vr1(i) = i + 2 ;
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( tmp[i] , i + 2 );
}
for ( int i = 0 ; i < N ; ++i ) ASSERT_EQ( vr1[i] , i + 2 );
}
}
- {
+ // Testing using space instance for allocation.
+ // The execution space of the memory space must be available for view data initialization
+
+ if ( std::is_same< ExecSpace , typename ExecSpace::memory_space::execution_space >::value ) {
+
using namespace Kokkos::Experimental ;
typedef typename ExecSpace::memory_space memory_space ;
typedef View<int*,memory_space> V ;
constexpr int N = 10 ;
memory_space mem_space ;
V v( "v" , N );
V va( view_alloc() , N );
V vb( view_alloc( "vb" ) , N );
V vc( view_alloc( "vc" , AllowPadding ) , N );
V vd( view_alloc( "vd" , WithoutInitializing ) , N );
V ve( view_alloc( "ve" , WithoutInitializing , AllowPadding ) , N );
V vf( view_alloc( "vf" , mem_space , WithoutInitializing , AllowPadding ) , N );
V vg( view_alloc( mem_space , "vg" , WithoutInitializing , AllowPadding ) , N );
V vh( view_alloc( WithoutInitializing , AllowPadding ) , N );
V vi( view_alloc( WithoutInitializing ) , N );
V vj( view_alloc( std::string("vj") , AllowPadding ) , N );
V vk( view_alloc( mem_space , std::string("vk") , AllowPadding ) , N );
}
{
typedef Kokkos::Experimental::ViewTraits<int***,Kokkos::LayoutStride,ExecSpace> traits_t ;
typedef Kokkos::Experimental::Impl::ViewDimension<0,0,0> dims_t ;
typedef Kokkos::Experimental::Impl::ViewOffset< dims_t , Kokkos::LayoutStride > offset_t ;
Kokkos::LayoutStride stride ;
stride.dimension[0] = 3 ;
stride.dimension[1] = 4 ;
stride.dimension[2] = 5 ;
stride.stride[0] = 4 ;
stride.stride[1] = 1 ;
stride.stride[2] = 12 ;
const offset_t offset( stride );
ASSERT_EQ( offset.dimension_0() , 3 );
ASSERT_EQ( offset.dimension_1() , 4 );
ASSERT_EQ( offset.dimension_2() , 5 );
ASSERT_EQ( offset.stride_0() , 4 );
ASSERT_EQ( offset.stride_1() , 1 );
ASSERT_EQ( offset.stride_2() , 12 );
ASSERT_EQ( offset.span() , 60 );
ASSERT_TRUE( offset.span_is_contiguous() );
Kokkos::Experimental::Impl::ViewMapping< traits_t , void > v( (int*) 0 , std::false_type() , stride );
}
{
typedef Kokkos::Experimental::View<int**,ExecSpace> V ;
typedef typename V::HostMirror M ;
constexpr int N0 = 10 ;
constexpr int N1 = 11 ;
V a("a",N0,N1);
M b = Kokkos::Experimental::create_mirror(a);
M c = Kokkos::Experimental::create_mirror_view(a);
+ M d ;
for ( int i0 = 0 ; i0 < N0 ; ++i0 )
for ( int i1 = 0 ; i1 < N1 ; ++i1 )
b(i0,i1) = 1 + i0 + i1 * N0 ;
Kokkos::Experimental::deep_copy( a , b );
Kokkos::Experimental::deep_copy( c , a );
for ( int i0 = 0 ; i0 < N0 ; ++i0 )
for ( int i1 = 0 ; i1 < N1 ; ++i1 )
ASSERT_EQ( b(i0,i1) , c(i0,i1) );
Kokkos::Experimental::resize( b , 5 , 6 );
Kokkos::Experimental::realloc( c , 5 , 6 );
+ Kokkos::Experimental::realloc( d , 5 , 6 );
ASSERT_EQ( b.dimension_0() , 5 );
ASSERT_EQ( b.dimension_1() , 6 );
ASSERT_EQ( c.dimension_0() , 5 );
ASSERT_EQ( c.dimension_1() , 6 );
+ ASSERT_EQ( d.dimension_0() , 5 );
+ ASSERT_EQ( d.dimension_1() , 6 );
}
}
template< class ExecSpace >
struct TestViewMappingSubview {
constexpr static int AN = 10 ;
typedef Kokkos::Experimental::View<int*,ExecSpace> AT ;
typedef Kokkos::Experimental::Subview< AT , true > AS ;
constexpr static int BN0 = 10 , BN1 = 11 , BN2 = 12 ;
typedef Kokkos::Experimental::View<int***,ExecSpace> BT ;
typedef Kokkos::Experimental::Subview< BT , true , true , true > BS ;
constexpr static int CN0 = 10 , CN1 = 11 , CN2 = 12 ;
typedef Kokkos::Experimental::View<int***[13][14],ExecSpace> CT ;
typedef Kokkos::Experimental::Subview< CT , true , true , true , false , false > CS ;
constexpr static int DN0 = 10 , DN1 = 11 , DN2 = 12 ;
typedef Kokkos::Experimental::View<int***[13][14],ExecSpace> DT ;
typedef Kokkos::Experimental::Subview< DT , false , true , true , true , false > DS ;
typedef Kokkos::Experimental::View<int***[13][14],Kokkos::LayoutLeft,ExecSpace> DLT ;
typedef Kokkos::Experimental::Subview< DLT , true , false , false , false , false > DLS1 ;
static_assert( DLS1::rank == 1 && std::is_same< typename DLS1::array_layout , Kokkos::LayoutLeft >::value
, "Subview layout error for rank 1 subview of left-most range of LayoutLeft" );
typedef Kokkos::Experimental::View<int***[13][14],Kokkos::LayoutRight,ExecSpace> DRT ;
typedef Kokkos::Experimental::Subview< DRT , false , false , false , false , true > DRS1 ;
static_assert( DRS1::rank == 1 && std::is_same< typename DRS1::array_layout , Kokkos::LayoutRight >::value
, "Subview layout error for rank 1 subview of right-most range of LayoutRight" );
AT Aa ;
AS Ab ;
BT Ba ;
BS Bb ;
CT Ca ;
CS Cb ;
DT Da ;
DS Db ;
TestViewMappingSubview()
: Aa("Aa",AN)
, Ab( Kokkos::Experimental::subview( Aa , std::pair<int,int>(1,AN-1) ) )
, Ba("Ba",BN0,BN1,BN2)
, Bb( Kokkos::Experimental::subview( Ba
, std::pair<int,int>(1,BN0-1)
, std::pair<int,int>(1,BN1-1)
, std::pair<int,int>(1,BN2-1)
) )
, Ca("Ca",CN0,CN1,CN2)
, Cb( Kokkos::Experimental::subview( Ca
, std::pair<int,int>(1,CN0-1)
, std::pair<int,int>(1,CN1-1)
, std::pair<int,int>(1,CN2-1)
, 1
, 2
) )
, Da("Da",DN0,DN1,DN2)
, Db( Kokkos::Experimental::subview( Da
, 1
, std::pair<int,int>(1,DN0-1)
, std::pair<int,int>(1,DN1-1)
, std::pair<int,int>(1,DN2-1)
, 2
) )
{
}
KOKKOS_INLINE_FUNCTION
void operator()( const int , long & error_count ) const
{
for ( int i = 1 ; i < AN-1 ; ++i ) if( & Aa[i] != & Ab[i-1] ) ++error_count ;
for ( int i2 = 1 ; i2 < BN2-1 ; ++i2 ) {
for ( int i1 = 1 ; i1 < BN1-1 ; ++i1 ) {
for ( int i0 = 1 ; i0 < BN0-1 ; ++i0 ) {
if ( & Ba(i0,i1,i2) != & Bb(i0-1,i1-1,i2-1) ) ++error_count ;
}}}
for ( int i2 = 1 ; i2 < CN2-1 ; ++i2 ) {
for ( int i1 = 1 ; i1 < CN1-1 ; ++i1 ) {
for ( int i0 = 1 ; i0 < CN0-1 ; ++i0 ) {
if ( & Ca(i0,i1,i2,1,2) != & Cb(i0-1,i1-1,i2-1) ) ++error_count ;
}}}
for ( int i2 = 1 ; i2 < DN2-1 ; ++i2 ) {
for ( int i1 = 1 ; i1 < DN1-1 ; ++i1 ) {
for ( int i0 = 1 ; i0 < DN0-1 ; ++i0 ) {
if ( & Da(1,i0,i1,i2,2) != & Db(i0-1,i1-1,i2-1) ) ++error_count ;
}}}
}
static void run()
{
TestViewMappingSubview self ;
ASSERT_EQ( self.Da.stride_1() , self.Db.stride_0() );
ASSERT_EQ( self.Da.stride_2() , self.Db.stride_1() );
ASSERT_EQ( self.Da.stride_3() , self.Db.stride_2() );
long error_count = -1 ;
Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace >(0,1) , self , error_count );
ASSERT_EQ( error_count , 0 );
}
};
template< class ExecSpace >
void test_view_mapping_subview()
{
TestViewMappingSubview< ExecSpace >::run();
}
/*--------------------------------------------------------------------------*/
template< class ViewType >
struct TestViewMapOperator {
static_assert( ViewType::reference_type_is_lvalue_reference
, "Test only valid for lvalue reference type" );
const ViewType v ;
KOKKOS_INLINE_FUNCTION
void test_left( size_t i0 , long & error_count ) const
{
typename ViewType::value_type * const base_ptr = & v(0,0,0,0,0,0,0,0);
const size_t n1 = v.dimension_1();
const size_t n2 = v.dimension_2();
const size_t n3 = v.dimension_3();
const size_t n4 = v.dimension_4();
const size_t n5 = v.dimension_5();
const size_t n6 = v.dimension_6();
const size_t n7 = v.dimension_7();
long offset = 0 ;
for ( size_t i7 = 0 ; i7 < n7 ; ++i7 )
for ( size_t i6 = 0 ; i6 < n6 ; ++i6 )
for ( size_t i5 = 0 ; i5 < n5 ; ++i5 )
for ( size_t i4 = 0 ; i4 < n4 ; ++i4 )
for ( size_t i3 = 0 ; i3 < n3 ; ++i3 )
for ( size_t i2 = 0 ; i2 < n2 ; ++i2 )
for ( size_t i1 = 0 ; i1 < n1 ; ++i1 )
{
const long d = & v(i0,i1,i2,i3,i4,i5,i6,i7) - base_ptr ;
if ( d < offset ) ++error_count ;
offset = d ;
}
if ( v.span() <= size_t(offset) ) ++error_count ;
}
KOKKOS_INLINE_FUNCTION
void test_right( size_t i0 , long & error_count ) const
{
typename ViewType::value_type * const base_ptr = & v(0,0,0,0,0,0,0,0);
const size_t n1 = v.dimension_1();
const size_t n2 = v.dimension_2();
const size_t n3 = v.dimension_3();
const size_t n4 = v.dimension_4();
const size_t n5 = v.dimension_5();
const size_t n6 = v.dimension_6();
const size_t n7 = v.dimension_7();
long offset = 0 ;
for ( size_t i1 = 0 ; i1 < n1 ; ++i1 )
for ( size_t i2 = 0 ; i2 < n2 ; ++i2 )
for ( size_t i3 = 0 ; i3 < n3 ; ++i3 )
for ( size_t i4 = 0 ; i4 < n4 ; ++i4 )
for ( size_t i5 = 0 ; i5 < n5 ; ++i5 )
for ( size_t i6 = 0 ; i6 < n6 ; ++i6 )
for ( size_t i7 = 0 ; i7 < n7 ; ++i7 )
{
const long d = & v(i0,i1,i2,i3,i4,i5,i6,i7) - base_ptr ;
if ( d < offset ) ++error_count ;
offset = d ;
}
if ( v.span() <= size_t(offset) ) ++error_count ;
}
KOKKOS_INLINE_FUNCTION
void operator()( size_t i , long & error_count ) const
{
if ( std::is_same< typename ViewType::array_layout , Kokkos::LayoutLeft >::value )
test_left(i,error_count);
else if ( std::is_same< typename ViewType::array_layout , Kokkos::LayoutRight >::value )
test_right(i,error_count);
}
constexpr static size_t N0 = 10 ;
constexpr static size_t N1 = 9 ;
constexpr static size_t N2 = 8 ;
constexpr static size_t N3 = 7 ;
constexpr static size_t N4 = 6 ;
constexpr static size_t N5 = 5 ;
constexpr static size_t N6 = 4 ;
constexpr static size_t N7 = 3 ;
TestViewMapOperator() : v( "Test" , N0, N1, N2, N3, N4, N5, N6, N7 ) {}
static void run()
{
TestViewMapOperator self ;
ASSERT_EQ( self.v.dimension_0() , ( 0 < ViewType::rank ? N0 : 1 ) );
ASSERT_EQ( self.v.dimension_1() , ( 1 < ViewType::rank ? N1 : 1 ) );
ASSERT_EQ( self.v.dimension_2() , ( 2 < ViewType::rank ? N2 : 1 ) );
ASSERT_EQ( self.v.dimension_3() , ( 3 < ViewType::rank ? N3 : 1 ) );
ASSERT_EQ( self.v.dimension_4() , ( 4 < ViewType::rank ? N4 : 1 ) );
ASSERT_EQ( self.v.dimension_5() , ( 5 < ViewType::rank ? N5 : 1 ) );
ASSERT_EQ( self.v.dimension_6() , ( 6 < ViewType::rank ? N6 : 1 ) );
ASSERT_EQ( self.v.dimension_7() , ( 7 < ViewType::rank ? N7 : 1 ) );
ASSERT_LE( self.v.dimension_0()*
self.v.dimension_1()*
self.v.dimension_2()*
self.v.dimension_3()*
self.v.dimension_4()*
self.v.dimension_5()*
self.v.dimension_6()*
self.v.dimension_7()
, self.v.span() );
long error_count ;
Kokkos::RangePolicy< typename ViewType::execution_space > range(0,self.v.dimension_0());
Kokkos::parallel_reduce( range , self , error_count );
ASSERT_EQ( 0 , error_count );
}
};
template< class ExecSpace >
void test_view_mapping_operator()
{
TestViewMapOperator< Kokkos::Experimental::View<int,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int**,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int***,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int****,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*****,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int******,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*******,Kokkos::LayoutLeft,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int**,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int***,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int****,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*****,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int******,Kokkos::LayoutRight,ExecSpace> >::run();
TestViewMapOperator< Kokkos::Experimental::View<int*******,Kokkos::LayoutRight,ExecSpace> >::run();
}
/*--------------------------------------------------------------------------*/
template< class ExecSpace >
struct TestViewMappingAtomic {
typedef Kokkos::MemoryTraits< Kokkos::Atomic > mem_trait ;
typedef Kokkos::Experimental::View< int * , ExecSpace > T ;
typedef Kokkos::Experimental::View< int * , ExecSpace , mem_trait > T_atom ;
T x ;
T_atom x_atom ;
constexpr static size_t N = 100000 ;
struct TagInit {};
struct TagUpdate {};
struct TagVerify {};
KOKKOS_INLINE_FUNCTION
void operator()( const TagInit & , const int i ) const
{ x(i) = i ; }
KOKKOS_INLINE_FUNCTION
void operator()( const TagUpdate & , const int i ) const
{ x_atom(i%2) += 1 ; }
KOKKOS_INLINE_FUNCTION
void operator()( const TagVerify & , const int i , long & error_count ) const
{
if ( i < 2 ) { if ( x(i) != int(i + N / 2) ) ++error_count ; }
else { if ( x(i) != int(i) ) ++error_count ; }
}
TestViewMappingAtomic()
: x("x",N)
, x_atom( x )
{}
static void run()
{
ASSERT_TRUE( T::reference_type_is_lvalue_reference );
ASSERT_FALSE( T_atom::reference_type_is_lvalue_reference );
TestViewMappingAtomic self ;
Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace , TagInit >(0,N) , self );
Kokkos::parallel_for( Kokkos::RangePolicy< ExecSpace , TagUpdate >(0,N) , self );
long error_count = -1 ;
Kokkos::parallel_reduce( Kokkos::RangePolicy< ExecSpace , TagVerify >(0,N) , self , error_count );
ASSERT_EQ( 0 , error_count );
}
};
} /* namespace Test */
/*--------------------------------------------------------------------------*/
diff --git a/lib/kokkos/core/unit_test/TestViewOfClass.hpp b/lib/kokkos/core/unit_test/TestViewOfClass.hpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/core/unit_test/TestViewSubview.hpp b/lib/kokkos/core/unit_test/TestViewSubview.hpp
old mode 100755
new mode 100644
index 8bf201fb4..e0c00d3a8
--- a/lib/kokkos/core/unit_test/TestViewSubview.hpp
+++ b/lib/kokkos/core/unit_test/TestViewSubview.hpp
@@ -1,632 +1,646 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
#include <stdexcept>
#include <sstream>
#include <iostream>
/*--------------------------------------------------------------------------*/
namespace TestViewSubview {
-#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
-
-using Kokkos::Experimental::ALL ;
-
-#else
-
-namespace {
-
-const Kokkos::ALL ALL ;
-
-}
-
-#endif
-
template<class Layout, class Space>
struct getView {
static
Kokkos::View<double**,Layout,Space> get(int n, int m) {
return Kokkos::View<double**,Layout,Space>("G",n,m);
}
};
template<class Space>
struct getView<Kokkos::LayoutStride,Space> {
static
Kokkos::View<double**,Kokkos::LayoutStride,Space> get(int n, int m) {
const int rank = 2 ;
const int order[] = { 0, 1 };
const unsigned dim[] = { unsigned(n), unsigned(m) };
Kokkos::LayoutStride stride = Kokkos::LayoutStride::order_dimensions( rank , order , dim );
return Kokkos::View<double**,Kokkos::LayoutStride,Space>("G",stride);
}
};
template<class ViewType, class Space>
struct fill_1D {
typedef typename Space::execution_space execution_space;
typedef typename ViewType::size_type size_type;
ViewType a;
double val;
fill_1D(ViewType a_, double val_):a(a_),val(val_) {
}
KOKKOS_INLINE_FUNCTION
void operator() (const int i) const {
a(i) = val;
}
};
template<class ViewType, class Space>
struct fill_2D {
typedef typename Space::execution_space execution_space;
typedef typename ViewType::size_type size_type;
ViewType a;
double val;
fill_2D(ViewType a_, double val_):a(a_),val(val_) {
}
KOKKOS_INLINE_FUNCTION
void operator() (const int i) const{
for(int j = 0; j < static_cast<int>(a.dimension_1()); j++)
a(i,j) = val;
}
};
template<class Layout, class Space>
void test_auto_1d ()
{
typedef Kokkos::View<double**, Layout, Space> mv_type;
typedef typename mv_type::size_type size_type;
const double ZERO = 0.0;
const double ONE = 1.0;
const double TWO = 2.0;
const size_type numRows = 10;
const size_type numCols = 3;
mv_type X = getView<Layout,Space>::get(numRows, numCols);
typename mv_type::HostMirror X_h = Kokkos::create_mirror_view (X);
fill_2D<mv_type,Space> f1(X, ONE);
Kokkos::parallel_for(X.dimension_0(),f1);
Kokkos::deep_copy (X_h, X);
for (size_type j = 0; j < numCols; ++j) {
for (size_type i = 0; i < numRows; ++i) {
ASSERT_TRUE(X_h(i,j) == ONE);
}
}
fill_2D<mv_type,Space> f2(X, 0.0);
Kokkos::parallel_for(X.dimension_0(),f2);
Kokkos::deep_copy (X_h, X);
for (size_type j = 0; j < numCols; ++j) {
for (size_type i = 0; i < numRows; ++i) {
ASSERT_TRUE(X_h(i,j) == ZERO);
}
}
fill_2D<mv_type,Space> f3(X, TWO);
Kokkos::parallel_for(X.dimension_0(),f3);
Kokkos::deep_copy (X_h, X);
for (size_type j = 0; j < numCols; ++j) {
for (size_type i = 0; i < numRows; ++i) {
ASSERT_TRUE(X_h(i,j) == TWO);
}
}
for (size_type j = 0; j < numCols; ++j) {
- auto X_j = Kokkos::subview (X, TestViewSubview::ALL, j);
+ auto X_j = Kokkos::subview (X, Kokkos::ALL(), j);
fill_1D<decltype(X_j),Space> f4(X_j, ZERO);
Kokkos::parallel_for(X_j.dimension_0(),f4);
Kokkos::deep_copy (X_h, X);
for (size_type i = 0; i < numRows; ++i) {
ASSERT_TRUE(X_h(i,j) == ZERO);
}
for (size_type jj = 0; jj < numCols; ++jj) {
- auto X_jj = Kokkos::subview (X, TestViewSubview::ALL, jj);
+ auto X_jj = Kokkos::subview (X, Kokkos::ALL(), jj);
fill_1D<decltype(X_jj),Space> f5(X_jj, ONE);
Kokkos::parallel_for(X_jj.dimension_0(),f5);
Kokkos::deep_copy (X_h, X);
for (size_type i = 0; i < numRows; ++i) {
ASSERT_TRUE(X_h(i,jj) == ONE);
}
}
}
}
template<class LD, class LS, class Space>
void test_1d_strided_assignment_impl(bool a, bool b, bool c, bool d, int n, int m) {
Kokkos::View<double**,LS,Space> l2d("l2d",n,m);
int col = n>2?2:0;
int row = m>2?2:0;
if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
if(a) {
- Kokkos::View<double*,LD,Space> l1da = Kokkos::subview(l2d,TestViewSubview::ALL,row);
+ Kokkos::View<double*,LD,Space> l1da = Kokkos::subview(l2d,Kokkos::ALL(),row);
ASSERT_TRUE( & l1da(0) == & l2d(0,row) );
if(n>1)
ASSERT_TRUE( & l1da(1) == & l2d(1,row) );
}
if(b && n>13) {
Kokkos::View<double*,LD,Space> l1db = Kokkos::subview(l2d,std::pair<unsigned,unsigned>(2,13),row);
ASSERT_TRUE( & l1db(0) == & l2d(2,row) );
ASSERT_TRUE( & l1db(1) == & l2d(3,row) );
}
if(c) {
- Kokkos::View<double*,LD,Space> l1dc = Kokkos::subview(l2d,col,TestViewSubview::ALL);
+ Kokkos::View<double*,LD,Space> l1dc = Kokkos::subview(l2d,col,Kokkos::ALL());
ASSERT_TRUE( & l1dc(0) == & l2d(col,0) );
if(m>1)
ASSERT_TRUE( & l1dc(1) == & l2d(col,1) );
}
if(d && m>13) {
Kokkos::View<double*,LD,Space> l1dd = Kokkos::subview(l2d,col,std::pair<unsigned,unsigned>(2,13));
ASSERT_TRUE( & l1dd(0) == & l2d(col,2) );
ASSERT_TRUE( & l1dd(1) == & l2d(col,3) );
}
}
}
template<class Space >
void test_1d_strided_assignment() {
test_1d_strided_assignment_impl<Kokkos::LayoutStride,Kokkos::LayoutLeft,Space>(true,true,true,true,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutStride,Kokkos::LayoutRight,Space>(true,true,true,true,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutLeft,Space>(true,true,false,false,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutLeft,Space>(true,true,false,false,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutRight,Space>(false,false,true,true,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutRight,Space>(false,false,true,true,17,3);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutLeft,Space>(true,true,false,false,17,1);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutLeft,Space>(true,true,true,true,1,17);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutLeft,Space>(true,true,true,true,1,17);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutLeft,Space>(true,true,false,false,17,1);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutRight,Space>(true,true,true,true,17,1);
test_1d_strided_assignment_impl<Kokkos::LayoutLeft,Kokkos::LayoutRight,Space>(false,false,true,true,1,17);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutRight,Space>(false,false,true,true,1,17);
test_1d_strided_assignment_impl<Kokkos::LayoutRight,Kokkos::LayoutRight,Space>(true,true,true,true,17,1);
}
template< class Space >
void test_left_0()
{
typedef Kokkos::View< int [2][3][4][5][2][3][4][5] , Kokkos::LayoutLeft , Space >
view_static_8_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_static_8_type x_static_8("x_static_left_8");
ASSERT_TRUE( x_static_8.is_contiguous() );
Kokkos::View<int,Kokkos::LayoutLeft,Space> x0 = Kokkos::subview( x_static_8 , 0, 0, 0, 0, 0, 0, 0, 0 );
ASSERT_TRUE( x0.is_contiguous() );
ASSERT_TRUE( & x0() == & x_static_8(0,0,0,0,0,0,0,0) );
Kokkos::View<int*,Kokkos::LayoutLeft,Space> x1 =
Kokkos::subview( x_static_8, Kokkos::pair<int,int>(0,2), 1, 2, 3, 0, 1, 2, 3 );
ASSERT_TRUE( x1.is_contiguous() );
ASSERT_TRUE( & x1(0) == & x_static_8(0,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x1(1) == & x_static_8(1,1,2,3,0,1,2,3) );
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2 =
Kokkos::subview( x_static_8, Kokkos::pair<int,int>(0,2), 1, 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( ! x2.is_contiguous() );
ASSERT_TRUE( & x2(0,0) == & x_static_8(0,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x2(0,1) == & x_static_8(0,1,2,3,1,1,2,3) );
ASSERT_TRUE( & x2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) );
// Kokkos::View<int**,Kokkos::LayoutLeft,Space> error_2 =
Kokkos::View<int**,Kokkos::LayoutStride,Space> sx2 =
Kokkos::subview( x_static_8, 1, Kokkos::pair<int,int>(0,2), 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( ! sx2.is_contiguous() );
ASSERT_TRUE( & sx2(0,0) == & x_static_8(1,0,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(0,1) == & x_static_8(1,0,2,3,1,1,2,3) );
ASSERT_TRUE( & sx2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) );
Kokkos::View<int****,Kokkos::LayoutStride,Space> sx4 =
Kokkos::subview( x_static_8, 0, Kokkos::pair<int,int>(0,2) /* of [3] */
, 1, Kokkos::pair<int,int>(1,3) /* of [5] */
, 1, Kokkos::pair<int,int>(0,2) /* of [3] */
, 2, Kokkos::pair<int,int>(2,4) /* of [5] */
);
ASSERT_TRUE( ! sx4.is_contiguous() );
for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 )
for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 )
for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 )
for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) {
ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x_static_8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) );
}
+
+ }
}
template< class Space >
void test_left_1()
{
typedef Kokkos::View< int ****[2][3][4][5] , Kokkos::LayoutLeft , Space >
view_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_type x8("x_left_8",2,3,4,5);
ASSERT_TRUE( x8.is_contiguous() );
Kokkos::View<int,Kokkos::LayoutLeft,Space> x0 = Kokkos::subview( x8 , 0, 0, 0, 0, 0, 0, 0, 0 );
ASSERT_TRUE( x0.is_contiguous() );
ASSERT_TRUE( & x0() == & x8(0,0,0,0,0,0,0,0) );
Kokkos::View<int*,Kokkos::LayoutLeft,Space> x1 =
Kokkos::subview( x8, Kokkos::pair<int,int>(0,2), 1, 2, 3, 0, 1, 2, 3 );
ASSERT_TRUE( x1.is_contiguous() );
ASSERT_TRUE( & x1(0) == & x8(0,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x1(1) == & x8(1,1,2,3,0,1,2,3) );
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2 =
Kokkos::subview( x8, Kokkos::pair<int,int>(0,2), 1, 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( ! x2.is_contiguous() );
ASSERT_TRUE( & x2(0,0) == & x8(0,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x2(1,0) == & x8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & x2(0,1) == & x8(0,1,2,3,1,1,2,3) );
ASSERT_TRUE( & x2(1,1) == & x8(1,1,2,3,1,1,2,3) );
// Kokkos::View<int**,Kokkos::LayoutLeft,Space> error_2 =
Kokkos::View<int**,Kokkos::LayoutStride,Space> sx2 =
Kokkos::subview( x8, 1, Kokkos::pair<int,int>(0,2), 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( ! sx2.is_contiguous() );
ASSERT_TRUE( & sx2(0,0) == & x8(1,0,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(1,0) == & x8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(0,1) == & x8(1,0,2,3,1,1,2,3) );
ASSERT_TRUE( & sx2(1,1) == & x8(1,1,2,3,1,1,2,3) );
Kokkos::View<int****,Kokkos::LayoutStride,Space> sx4 =
Kokkos::subview( x8, 0, Kokkos::pair<int,int>(0,2) /* of [3] */
, 1, Kokkos::pair<int,int>(1,3) /* of [5] */
, 1, Kokkos::pair<int,int>(0,2) /* of [3] */
, 2, Kokkos::pair<int,int>(2,4) /* of [5] */
);
ASSERT_TRUE( ! sx4.is_contiguous() );
for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 )
for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 )
for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 )
for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) {
ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) );
}
+
+ }
}
template< class Space >
void test_left_2()
{
typedef Kokkos::View< int **** , Kokkos::LayoutLeft , Space > view_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_type x4("x4",2,3,4,5);
ASSERT_TRUE( x4.is_contiguous() );
Kokkos::View<int,Kokkos::LayoutLeft,Space> x0 = Kokkos::subview( x4 , 0, 0, 0, 0 );
ASSERT_TRUE( x0.is_contiguous() );
ASSERT_TRUE( & x0() == & x4(0,0,0,0) );
Kokkos::View<int*,Kokkos::LayoutLeft,Space> x1 =
Kokkos::subview( x4, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( x1.is_contiguous() );
ASSERT_TRUE( & x1(0) == & x4(0,1,2,3) );
ASSERT_TRUE( & x1(1) == & x4(1,1,2,3) );
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2 =
Kokkos::subview( x4, Kokkos::pair<int,int>(0,2), 1, Kokkos::pair<int,int>(1,3), 2 );
ASSERT_TRUE( ! x2.is_contiguous() );
ASSERT_TRUE( & x2(0,0) == & x4(0,1,1,2) );
ASSERT_TRUE( & x2(1,0) == & x4(1,1,1,2) );
ASSERT_TRUE( & x2(0,1) == & x4(0,1,2,2) );
ASSERT_TRUE( & x2(1,1) == & x4(1,1,2,2) );
// Kokkos::View<int**,Kokkos::LayoutLeft,Space> error_2 =
Kokkos::View<int**,Kokkos::LayoutStride,Space> sx2 =
Kokkos::subview( x4, 1, Kokkos::pair<int,int>(0,2)
, 2, Kokkos::pair<int,int>(1,4) );
ASSERT_TRUE( ! sx2.is_contiguous() );
ASSERT_TRUE( & sx2(0,0) == & x4(1,0,2,1) );
ASSERT_TRUE( & sx2(1,0) == & x4(1,1,2,1) );
ASSERT_TRUE( & sx2(0,1) == & x4(1,0,2,2) );
ASSERT_TRUE( & sx2(1,1) == & x4(1,1,2,2) );
ASSERT_TRUE( & sx2(0,2) == & x4(1,0,2,3) );
ASSERT_TRUE( & sx2(1,2) == & x4(1,1,2,3) );
Kokkos::View<int****,Kokkos::LayoutStride,Space> sx4 =
Kokkos::subview( x4, Kokkos::pair<int,int>(1,2) /* of [2] */
, Kokkos::pair<int,int>(1,3) /* of [3] */
, Kokkos::pair<int,int>(0,4) /* of [4] */
, Kokkos::pair<int,int>(2,4) /* of [5] */
);
ASSERT_TRUE( ! sx4.is_contiguous() );
for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 )
for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 )
for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 )
for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) {
ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x4( 1+i0, 1+i1, 0+i2, 2+i3 ) );
}
+
+ }
}
template< class Space >
void test_left_3()
{
typedef Kokkos::View< int ** , Kokkos::LayoutLeft , Space > view_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_type xm("x4",10,5);
ASSERT_TRUE( xm.is_contiguous() );
Kokkos::View<int,Kokkos::LayoutLeft,Space> x0 = Kokkos::subview( xm , 5, 3 );
ASSERT_TRUE( x0.is_contiguous() );
ASSERT_TRUE( & x0() == & xm(5,3) );
Kokkos::View<int*,Kokkos::LayoutLeft,Space> x1 =
- Kokkos::subview( xm, TestViewSubview::ALL, 3 );
+ Kokkos::subview( xm, Kokkos::ALL(), 3 );
ASSERT_TRUE( x1.is_contiguous() );
for ( int i = 0 ; i < int(xm.dimension_0()) ; ++i ) {
ASSERT_TRUE( & x1(i) == & xm(i,3) );
}
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2 =
- Kokkos::subview( xm, Kokkos::pair<int,int>(1,9), TestViewSubview::ALL );
+ Kokkos::subview( xm, Kokkos::pair<int,int>(1,9), Kokkos::ALL() );
ASSERT_TRUE( ! x2.is_contiguous() );
for ( int j = 0 ; j < int(x2.dimension_1()) ; ++j )
for ( int i = 0 ; i < int(x2.dimension_0()) ; ++i ) {
ASSERT_TRUE( & x2(i,j) == & xm(1+i,j) );
}
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2c =
- Kokkos::subview( xm, TestViewSubview::ALL, std::pair<int,int>(2,4) );
+ Kokkos::subview( xm, Kokkos::ALL(), std::pair<int,int>(2,4) );
ASSERT_TRUE( x2c.is_contiguous() );
for ( int j = 0 ; j < int(x2c.dimension_1()) ; ++j )
for ( int i = 0 ; i < int(x2c.dimension_0()) ; ++i ) {
ASSERT_TRUE( & x2c(i,j) == & xm(i,2+j) );
}
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2_n1 =
- Kokkos::subview( xm , std::pair<int,int>(1,1) , TestViewSubview::ALL );
+ Kokkos::subview( xm , std::pair<int,int>(1,1) , Kokkos::ALL() );
ASSERT_TRUE( x2_n1.dimension_0() == 0 );
ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() );
Kokkos::View<int**,Kokkos::LayoutLeft,Space> x2_n2 =
- Kokkos::subview( xm , TestViewSubview::ALL , std::pair<int,int>(1,1) );
+ Kokkos::subview( xm , Kokkos::ALL() , std::pair<int,int>(1,1) );
ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() );
ASSERT_TRUE( x2_n2.dimension_1() == 0 );
+
+ }
}
//----------------------------------------------------------------------------
template< class Space >
void test_right_0()
{
typedef Kokkos::View< int [2][3][4][5][2][3][4][5] , Kokkos::LayoutRight , Space >
view_static_8_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_static_8_type x_static_8("x_static_right_8");
Kokkos::View<int,Kokkos::LayoutRight,Space> x0 = Kokkos::subview( x_static_8 , 0, 0, 0, 0, 0, 0, 0, 0 );
ASSERT_TRUE( & x0() == & x_static_8(0,0,0,0,0,0,0,0) );
Kokkos::View<int*,Kokkos::LayoutRight,Space> x1 =
Kokkos::subview( x_static_8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair<int,int>(1,3) );
ASSERT_TRUE( & x1(0) == & x_static_8(0,1,2,3,0,1,2,1) );
ASSERT_TRUE( & x1(1) == & x_static_8(0,1,2,3,0,1,2,2) );
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2 =
Kokkos::subview( x_static_8, 0, 1, 2, Kokkos::pair<int,int>(1,3)
, 0, 1, 2, Kokkos::pair<int,int>(1,3) );
ASSERT_TRUE( & x2(0,0) == & x_static_8(0,1,2,1,0,1,2,1) );
ASSERT_TRUE( & x2(1,0) == & x_static_8(0,1,2,2,0,1,2,1) );
ASSERT_TRUE( & x2(0,1) == & x_static_8(0,1,2,1,0,1,2,2) );
ASSERT_TRUE( & x2(1,1) == & x_static_8(0,1,2,2,0,1,2,2) );
// Kokkos::View<int**,Kokkos::LayoutRight,Space> error_2 =
Kokkos::View<int**,Kokkos::LayoutStride,Space> sx2 =
Kokkos::subview( x_static_8, 1, Kokkos::pair<int,int>(0,2), 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( & sx2(0,0) == & x_static_8(1,0,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(1,0) == & x_static_8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(0,1) == & x_static_8(1,0,2,3,1,1,2,3) );
ASSERT_TRUE( & sx2(1,1) == & x_static_8(1,1,2,3,1,1,2,3) );
Kokkos::View<int****,Kokkos::LayoutStride,Space> sx4 =
Kokkos::subview( x_static_8, 0, Kokkos::pair<int,int>(0,2) /* of [3] */
, 1, Kokkos::pair<int,int>(1,3) /* of [5] */
, 1, Kokkos::pair<int,int>(0,2) /* of [3] */
, 2, Kokkos::pair<int,int>(2,4) /* of [5] */
);
for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 )
for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 )
for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 )
for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) {
ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x_static_8(0, 0+i0, 1, 1+i1, 1, 0+i2, 2, 2+i3) );
}
+
+ }
}
template< class Space >
void test_right_1()
{
typedef Kokkos::View< int ****[2][3][4][5] , Kokkos::LayoutRight , Space >
view_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_type x8("x_right_8",2,3,4,5);
Kokkos::View<int,Kokkos::LayoutRight,Space> x0 = Kokkos::subview( x8 , 0, 0, 0, 0, 0, 0, 0, 0 );
ASSERT_TRUE( & x0() == & x8(0,0,0,0,0,0,0,0) );
Kokkos::View<int*,Kokkos::LayoutRight,Space> x1 =
Kokkos::subview( x8, 0, 1, 2, 3, 0, 1, 2, Kokkos::pair<int,int>(1,3) );
ASSERT_TRUE( & x1(0) == & x8(0,1,2,3,0,1,2,1) );
ASSERT_TRUE( & x1(1) == & x8(0,1,2,3,0,1,2,2) );
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2 =
Kokkos::subview( x8, 0, 1, 2, Kokkos::pair<int,int>(1,3)
, 0, 1, 2, Kokkos::pair<int,int>(1,3) );
ASSERT_TRUE( & x2(0,0) == & x8(0,1,2,1,0,1,2,1) );
ASSERT_TRUE( & x2(1,0) == & x8(0,1,2,2,0,1,2,1) );
ASSERT_TRUE( & x2(0,1) == & x8(0,1,2,1,0,1,2,2) );
ASSERT_TRUE( & x2(1,1) == & x8(0,1,2,2,0,1,2,2) );
// Kokkos::View<int**,Kokkos::LayoutRight,Space> error_2 =
Kokkos::View<int**,Kokkos::LayoutStride,Space> sx2 =
Kokkos::subview( x8, 1, Kokkos::pair<int,int>(0,2), 2, 3
, Kokkos::pair<int,int>(0,2), 1, 2, 3 );
ASSERT_TRUE( & sx2(0,0) == & x8(1,0,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(1,0) == & x8(1,1,2,3,0,1,2,3) );
ASSERT_TRUE( & sx2(0,1) == & x8(1,0,2,3,1,1,2,3) );
ASSERT_TRUE( & sx2(1,1) == & x8(1,1,2,3,1,1,2,3) );
Kokkos::View<int****,Kokkos::LayoutStride,Space> sx4 =
Kokkos::subview( x8, 0, Kokkos::pair<int,int>(0,2) /* of [3] */
, 1, Kokkos::pair<int,int>(1,3) /* of [5] */
, 1, Kokkos::pair<int,int>(0,2) /* of [3] */
, 2, Kokkos::pair<int,int>(2,4) /* of [5] */
);
for ( int i0 = 0 ; i0 < (int) sx4.dimension_0() ; ++i0 )
for ( int i1 = 0 ; i1 < (int) sx4.dimension_1() ; ++i1 )
for ( int i2 = 0 ; i2 < (int) sx4.dimension_2() ; ++i2 )
for ( int i3 = 0 ; i3 < (int) sx4.dimension_3() ; ++i3 ) {
ASSERT_TRUE( & sx4(i0,i1,i2,i3) == & x8(0,0+i0, 1,1+i1, 1,0+i2, 2,2+i3) );
}
+
+ }
}
template< class Space >
void test_right_3()
{
typedef Kokkos::View< int ** , Kokkos::LayoutRight , Space > view_type ;
+ if(Kokkos::Impl::VerifyExecutionCanAccessMemorySpace<Kokkos::HostSpace,Space>::value) {
+
view_type xm("x4",10,5);
ASSERT_TRUE( xm.is_contiguous() );
Kokkos::View<int,Kokkos::LayoutRight,Space> x0 = Kokkos::subview( xm , 5, 3 );
ASSERT_TRUE( x0.is_contiguous() );
ASSERT_TRUE( & x0() == & xm(5,3) );
Kokkos::View<int*,Kokkos::LayoutRight,Space> x1 =
- Kokkos::subview( xm, 3, TestViewSubview::ALL );
+ Kokkos::subview( xm, 3, Kokkos::ALL() );
ASSERT_TRUE( x1.is_contiguous() );
for ( int i = 0 ; i < int(xm.dimension_1()) ; ++i ) {
ASSERT_TRUE( & x1(i) == & xm(3,i) );
}
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2c =
- Kokkos::subview( xm, Kokkos::pair<int,int>(1,9), TestViewSubview::ALL );
+ Kokkos::subview( xm, Kokkos::pair<int,int>(1,9), Kokkos::ALL() );
ASSERT_TRUE( x2c.is_contiguous() );
for ( int j = 0 ; j < int(x2c.dimension_1()) ; ++j )
for ( int i = 0 ; i < int(x2c.dimension_0()) ; ++i ) {
ASSERT_TRUE( & x2c(i,j) == & xm(1+i,j) );
}
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2 =
- Kokkos::subview( xm, TestViewSubview::ALL, std::pair<int,int>(2,4) );
+ Kokkos::subview( xm, Kokkos::ALL(), std::pair<int,int>(2,4) );
ASSERT_TRUE( ! x2.is_contiguous() );
for ( int j = 0 ; j < int(x2.dimension_1()) ; ++j )
for ( int i = 0 ; i < int(x2.dimension_0()) ; ++i ) {
ASSERT_TRUE( & x2(i,j) == & xm(i,2+j) );
}
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2_n1 =
- Kokkos::subview( xm , std::pair<int,int>(1,1) , TestViewSubview::ALL );
+ Kokkos::subview( xm , std::pair<int,int>(1,1) , Kokkos::ALL() );
ASSERT_TRUE( x2_n1.dimension_0() == 0 );
ASSERT_TRUE( x2_n1.dimension_1() == xm.dimension_1() );
Kokkos::View<int**,Kokkos::LayoutRight,Space> x2_n2 =
- Kokkos::subview( xm , TestViewSubview::ALL , std::pair<int,int>(1,1) );
+ Kokkos::subview( xm , Kokkos::ALL() , std::pair<int,int>(1,1) );
ASSERT_TRUE( x2_n2.dimension_0() == xm.dimension_0() );
ASSERT_TRUE( x2_n2.dimension_1() == 0 );
+
+ }
}
//----------------------------------------------------------------------------
}
diff --git a/lib/kokkos/core/unit_test/UnitTestMain.cpp b/lib/kokkos/core/unit_test/UnitTestMain.cpp
old mode 100755
new mode 100644
diff --git a/lib/kokkos/doc/Doxyfile b/lib/kokkos/doc/Doxyfile
deleted file mode 100755
index bc5c7486b..000000000
--- a/lib/kokkos/doc/Doxyfile
+++ /dev/null
@@ -1,127 +0,0 @@
-#
-# Include the global look and feel options
-#
-@INCLUDE = ../../common/Doxyfile
-#
-# Package options
-#
-PROJECT_NAME = "Kokkos Core Kernels Package"
-PROJECT_NUMBER = "Version of the Day"
-OUTPUT_DIRECTORY = .
-OUTPUT_LANGUAGE = English
-
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = YES
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ALWAYS_DETAILED_SEC = YES
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-INTERNAL_DOCS = NO
-CLASS_DIAGRAMS = YES
-SOURCE_BROWSER = YES
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = NO
-REFERENCES_RELATION = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-VERBATIM_HEADERS = YES
-SHOW_INCLUDE_FILES = YES
-#JAVADOC_AUTOBRIEF = YES
-INHERIT_DOCS = YES
-INLINE_INHERITED_MEMB = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = NO
-TAB_SIZE = 2
-ENABLED_SECTIONS =
-SORT_BRIEF_DOCS = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_FORMAT = "$file:$line: $text"
-
-#
-# INPUT: Where to find files that Doxygen should process. ../classic
-# has a doc/ subdirectory with its own Doxyfile that points to its own
-# files. The other Kokkos subpackages don't currently have their own
-# Doxyfile files, so we have to do it manually here.
-#
-# mfh 26 Sep 2013: I've only added those directories in the Core
-# subpackage that constitute the "public interface" of that
-# subpackage. Please feel free to include additional subdirectories
-# of ../core if you want to generate their documentation as well.
-#
-# mfh 26 Sep 2013: I've only added the Kokkos subpackages here that I
-# think are ready for Doxygen documentation generation. Please feel
-# free to amend this list as you see fit.
-#
-
-INPUT = index.doc ../classic ../core/src ../containers/src ../linalg/src
-FILE_PATTERNS = *.hpp *.cpp *.cuh *.cu
-RECURSIVE = NO
-EXCLUDE_PATTERNS = *.x *.o *.out
-EXAMPLE_PATH =
-EXAMPLE_RECURSIVE = YES
-EXAMPLE_PATTERNS = *.cpp *.hpp
-IMAGE_PATH =
-INPUT_FILTER =
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 4
-IGNORE_PREFIX =
-#
-# What diagrams are created
-#
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = NO
-INCLUDE_GRAPH = NO
-INCLUDED_BY_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-#
-# Preprocessing
-#
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = YES
-SEARCH_INCLUDES = YES
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS DOXYGEN_USE_ONLY
-INCLUDE_PATH = ../src
-EXPAND_AS_DEFINED =
-#
-# Links to other packages
-#
-TAGFILES = ../../common/tag_files/teuchos.tag=../../../teuchos/doc/html ../../common/tag_files/epetra.tag=../../../epetra/doc/html \
- ../../common/tag_files/belos.tag=../../../belos/doc/html ../../common/tag_files/anasazi.tag=../../../anasazi/doc/html \
- ../../common/tag_files/kokkos.tag=../../../kokkos/doc/html
-GENERATE_TAGFILE = ../../common/tag_files/tpetra.tag
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = NO
-#
-# Environment
-#
-PERL_PATH = /usr/bin/perl
-HAVE_DOT = YES
-DOT_PATH =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-#
-# What kind of documentation is generated
-#
-#GENERATE_HTML = YES
-#HTML_OUTPUT = html
-#HTML_HEADER = includes/header.html
-#HTML_FOOTER = includes/footer.html
-#HTML_STYLESHEET = includes/stylesheet.css
-#HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-DISABLE_INDEX = NO
-GENERATE_LATEX = NO
-GENERATE_RTF = NO
-GENERATE_MAN = NO
-GENERATE_XML = NO
diff --git a/lib/kokkos/doc/Kokkos_PG.pdf b/lib/kokkos/doc/Kokkos_PG.pdf
deleted file mode 100755
index 3c415698c..000000000
Binary files a/lib/kokkos/doc/Kokkos_PG.pdf and /dev/null differ
diff --git a/lib/kokkos/doc/README b/lib/kokkos/doc/README
deleted file mode 100755
index 31e75f365..000000000
--- a/lib/kokkos/doc/README
+++ /dev/null
@@ -1,32 +0,0 @@
-Kokkos uses the Doxygen tool for providing three documentation
-sources:
-- man pages
-- Latex User Guide
-- HTML Online User Guide.
-
-Man Pages
-
-Man pages are available for all files and functions in the directory
-TRILINOS_HOME/doc/kokkos/man, where TRILINOS_HOME is the location of your
-copy of Trilinos. To use these pages with the Unix man utility, add
-the directory to your man path as follows:
-
-setenv MANPATH `echo $MANPATH`:TRILINOS_HOME/doc/kokkos/man
-
-
-LaTeX User Guide
-
-A postscript version of this guide is in
-TRILINOS_HOME/doc/kokkos/latex/user_guide.ps. The LaTeX source is in the
-directory TRILINOS_HOME/doc/kokkos/latex.
-
-HTML Online User Guide
-
-The online guide is initiated by pointing your browser to
-TRILINOS_HOME/doc/kokkos/html/index.html
-
-Any question, comments or suggestions are welcome. Please send to
-Mike Heroux at
-
-320-845-7695
-maherou@sandia.gov
diff --git a/lib/kokkos/doc/build_docs b/lib/kokkos/doc/build_docs
deleted file mode 100755
index da1d3e4f6..000000000
--- a/lib/kokkos/doc/build_docs
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-if [ $TRILINOS_HOME ]; then
- echo "TRILINOS_HOME has already been set!"
-else
- echo "TRILINOS_HOME has not been set. Setting it!"
- export TRILINOS_HOME=`pwd`/../../..
-fi
-
-echo
-echo "Generating main Kokkos doxygen documentation ..."
-echo
-
-doxygen Doxyfile
-
diff --git a/lib/kokkos/doc/index.doc b/lib/kokkos/doc/index.doc
deleted file mode 100755
index 27a9e4f2e..000000000
--- a/lib/kokkos/doc/index.doc
+++ /dev/null
@@ -1,72 +0,0 @@
-/*!
-\mainpage Trilinos/Kokkos: Shared-memory programming interface and computational kernels
-
-\section Kokkos_Intro Introduction
-
-The %Kokkos package has two main components. The first, sometimes
-called "%Kokkos Array" or just "%Kokkos," implements a
-performance-portable shared-memory parallel programming model and data
-containers. The second, called "%Kokkos Classic," consists of
-computational kernels that support the %Tpetra package.
-
-\section Kokkos_Kokkos The %Kokkos programming model
-
-%Kokkos implements a performance-portable shared-memory parallel
-programming model and data containers. It lets you write an algorithm
-once, and just change a template parameter to get the optimal data
-layout for your hardware. %Kokkos has back-ends for the following
-parallel programming models:
-
-- Kokkos::Threads: POSIX Threads (Pthreads)
-- Kokkos::OpenMP: OpenMP
-- Kokkos::Cuda: NVIDIA's CUDA programming model for graphics
- processing units (GPUs)
-- Kokkos::Serial: No thread parallelism
-
-%Kokkos also has optimizations for shared-memory parallel systems with
-nonuniform memory access (NUMA). Its containers can hold data of any
-primitive ("plain old") data type (and some aggregate types). %Kokkos
-Array may be used as a stand-alone programming model.
-
-%Kokkos' parallel operations include the following:
-
-- parallel_for: a thread-parallel "for loop"
-- parallel_reduce: a thread-parallel reduction
-- parallel_scan: a thread-parallel prefix scan operation
-
-as well as expert-level platform-independent interfaces to thread
-"teams," per-team "shared memory," synchronization, and atomic update
-operations.
-
-%Kokkos' data containers include the following:
-
-- Kokkos::View: A multidimensional array suitable for thread-parallel
- operations. Its layout (e.g., row-major or column-major) is
- optimized by default for the particular thread-parallel device.
-- Kokkos::Vector: A drop-in replacement for std::vector that eases
- porting from standard sequential C++ data structures to %Kokkos'
- parallel data structures.
-- Kokkos::UnorderedMap: A parallel lookup table comparable in
- functionality to std::unordered_map.
-
-%Kokkos also uses the above basic containers to implement higher-level
-data structures, like sparse graphs and matrices.
-
-A good place to start learning about %Kokkos would be <a href="http://trilinos.sandia.gov/events/trilinos_user_group_2013/presentations/2013-11-TUG-Kokkos-Tutorial.pdf">these tutorial slides</a> from the 2013 Trilinos Users' Group meeting.
-
-\section Kokkos_Classic %Kokkos Classic
-
-"%Kokkos Classic" consists of computational kernels that support the
-%Tpetra package. These kernels include sparse matrix-vector multiply,
-sparse triangular solve, Gauss-Seidel, and dense vector operations.
-They are templated on the type of objects (\c Scalar) on which they
-operate. This component was not meant to be visible to users; it is
-an implementation detail of the %Tpetra distributed linear algebra
-package.
-
-%Kokkos Classic also implements a shared-memory parallel programming
-model. This inspired and preceded the %Kokkos programming model
-described in the previous section. Users should consider the %Kokkos
-Classic programming model deprecated, and prefer the new %Kokkos
-programming model.
-*/
diff --git a/lib/kokkos/example/README b/lib/kokkos/example/README
new file mode 100644
index 000000000..ec6400484
--- /dev/null
+++ b/lib/kokkos/example/README
@@ -0,0 +1,16 @@
+This directory contains example application proxies that use different
+parts of Kokkos. If you are looking for the FENL ("finite element
+nonlinear" solve) example, it has moved into the LinAlg subpackage of
+Tpetra.
+
+MANIFEST:
+
+ - common: Header files used by different examples
+ - feint: Unstructured finite-element method
+ - fixture: Some other finite-element method example
+ - global_2_local_ids: Example of global-to-local index lookup
+ - grow_array: Parallel dynamic memory allocation
+ - md_skeleton: Molecular dynamics
+ - query_device: Kokkos' HWLOC wrapper for querying device topology
+ - sort_array: Parallel sort
+ - tutorial: Kokkos tutorial (START HERE)
diff --git a/lib/kokkos/example/common/VectorImport.hpp b/lib/kokkos/example/common/VectorImport.hpp
new file mode 100644
index 000000000..8ecd74d46
--- /dev/null
+++ b/lib/kokkos/example/common/VectorImport.hpp
@@ -0,0 +1,294 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_VECTORIMPORT_HPP
+#define KOKKOS_VECTORIMPORT_HPP
+
+#include <utility>
+#include <limits>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+
+#include <Kokkos_Core.hpp>
+
+#include <WrapMPI.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+template< class CommMessageType , class CommIdentType , class VectorType >
+struct VectorImport ;
+
+} // namespace Example
+} // namespace Kokkos
+
+#if ! defined( KOKKOS_HAVE_MPI )
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+template< class CommMessageType , class CommIdentType , class VectorType >
+struct VectorImport {
+
+ const MPI_Comm comm ;
+ const unsigned count_owned ;
+ const unsigned count_receive ;
+
+ VectorImport( MPI_Comm arg_comm ,
+ const CommMessageType & ,
+ const CommMessageType & ,
+ const CommIdentType & ,
+ const unsigned arg_count_owned ,
+ const unsigned arg_count_receive )
+ : comm( arg_comm )
+ , count_owned( arg_count_owned )
+ , count_receive( arg_count_receive )
+ {}
+
+ inline
+ void operator()( const VectorType & ) const {}
+};
+
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#else /* defined( KOKKOS_HAVE_MPI ) */
+
+namespace Kokkos {
+namespace Example {
+
+template< class CommMessageType , class CommIdentType , class VectorType >
+class VectorImport {
+private:
+
+ // rank == 1 or array_layout == LayoutRight
+ enum { OK = Kokkos::Impl::StaticAssert<
+ ( VectorType::rank == 1 ) ||
+ Kokkos::Impl::is_same< typename VectorType::array_layout , Kokkos::LayoutRight >::value
+ >::value };
+
+ typedef typename VectorType::HostMirror HostVectorType ;
+
+ enum { ReceiveInPlace =
+ Kokkos::Impl::is_same< typename VectorType::memory_space ,
+ typename HostVectorType::memory_space >::value };
+
+ const CommMessageType recv_msg ;
+ const CommMessageType send_msg ;
+ const CommIdentType send_nodeid ;
+ VectorType send_buffer ;
+ HostVectorType host_send_buffer ;
+ HostVectorType host_recv_buffer ;
+ unsigned chunk ;
+
+public:
+
+ const MPI_Comm comm ;
+ const unsigned count_owned ;
+ const unsigned count_receive ;
+
+ struct Pack {
+ typedef typename VectorType::execution_space execution_space ;
+ const CommIdentType index ;
+ const VectorType source ;
+ const VectorType buffer ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned i ) const
+ { buffer( i ) = source( index(i) ); }
+
+ Pack( const CommIdentType & arg_index ,
+ const VectorType & arg_source ,
+ const VectorType & arg_buffer )
+ : index( arg_index )
+ , source( arg_source )
+ , buffer( arg_buffer )
+ {
+ Kokkos::parallel_for( index.dimension_0() , *this );
+ execution_space::fence();
+ }
+ };
+
+ VectorImport( MPI_Comm arg_comm ,
+ const CommMessageType & arg_recv_msg ,
+ const CommMessageType & arg_send_msg ,
+ const CommIdentType & arg_send_nodeid ,
+ const unsigned arg_count_owned ,
+ const unsigned arg_count_receive )
+ : recv_msg( arg_recv_msg )
+ , send_msg( arg_send_msg )
+ , send_nodeid( arg_send_nodeid )
+ , send_buffer()
+ , host_send_buffer()
+ , host_recv_buffer()
+ , comm( arg_comm )
+ , count_owned( arg_count_owned )
+ , count_receive( arg_count_receive )
+ {
+ if ( ! ReceiveInPlace ) {
+ host_recv_buffer = HostVectorType("recv_buffer",count_receive);
+ }
+
+ unsigned send_count = 0 ;
+ for ( unsigned i = 0 ; i < send_msg.dimension_0() ; ++i ) { send_count += send_msg(i,1); }
+ send_buffer = VectorType("send_buffer",send_count);
+ host_send_buffer = Kokkos::create_mirror_view( send_buffer );
+ }
+
+ inline
+ void operator()( const VectorType & v ) const
+ {
+ typedef typename VectorType::value_type scalar_type ;
+
+ const int mpi_tag = 42 ;
+ const unsigned chunk = v.dimension_1();
+
+ // Subvector for receives
+ const std::pair<unsigned,unsigned> recv_range( count_owned , count_owned + count_receive );
+ const VectorType recv_vector = Kokkos::subview( v , recv_range );
+
+ std::vector< MPI_Request > recv_request( recv_msg.dimension_0() , MPI_REQUEST_NULL );
+
+ { // Post receives
+ scalar_type * ptr =
+ ReceiveInPlace ? recv_vector.ptr_on_device() : host_recv_buffer.ptr_on_device();
+
+ for ( size_t i = 0 ; i < recv_msg.dimension_0() ; ++i ) {
+ const int proc = recv_msg(i,0);
+ const int count = recv_msg(i,1) * chunk ;
+
+ MPI_Irecv( ptr , count * sizeof(scalar_type) , MPI_BYTE ,
+ proc , mpi_tag , comm , & recv_request[i] );
+
+ ptr += count ;
+ }
+ }
+
+ MPI_Barrier( comm );
+
+ { // Pack and send
+ const Pack pack( send_nodeid , v , send_buffer );
+
+ Kokkos::deep_copy( host_send_buffer , send_buffer );
+
+ scalar_type * ptr = host_send_buffer.ptr_on_device();
+
+ for ( size_t i = 0 ; i < send_msg.dimension_0() ; ++i ) {
+ const int proc = send_msg(i,0);
+ const int count = send_msg(i,1) * chunk ;
+
+ // MPI_Ssend blocks until
+ // (1) a receive is matched for the message and
+ // (2) the send buffer can be re-used.
+ //
+ // It is suggested that MPI_Ssend will have the best performance:
+ // http://www.mcs.anl.gov/research/projects/mpi/sendmode.html .
+
+ MPI_Ssend( ptr ,
+ count * sizeof(scalar_type) , MPI_BYTE ,
+ proc , mpi_tag , comm );
+
+ ptr += count ;
+ }
+ }
+
+ // Wait for receives and verify:
+
+ for ( size_t i = 0 ; i < recv_msg.dimension_0() ; ++i ) {
+ MPI_Status recv_status ;
+ int recv_which = 0 ;
+ int recv_size = 0 ;
+
+ MPI_Waitany( recv_msg.dimension_0() , & recv_request[0] , & recv_which , & recv_status );
+
+ const int recv_proc = recv_status.MPI_SOURCE ;
+
+ MPI_Get_count( & recv_status , MPI_BYTE , & recv_size );
+
+ // Verify message properly received:
+
+ const int expected_proc = recv_msg(recv_which,0);
+ const int expected_size = recv_msg(recv_which,1) * chunk * sizeof(scalar_type);
+
+ if ( ( expected_proc != recv_proc ) ||
+ ( expected_size != recv_size ) ) {
+
+ int local_rank = 0 ;
+
+ MPI_Comm_rank( comm , & local_rank );
+
+ std::ostringstream msg ;
+ msg << "VectorImport error:"
+ << " P" << local_rank
+ << " received from P" << recv_proc
+ << " size " << recv_size
+ << " expected " << expected_size
+ << " from P" << expected_proc ;
+ throw std::runtime_error( msg.str() );
+ }
+ }
+
+ // Copy received data to device memory.
+
+ if ( ! ReceiveInPlace ) { Kokkos::deep_copy( recv_vector , host_recv_buffer ); }
+ }
+};
+
+} // namespace Example
+} // namespace Kokkos
+
+#endif
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_VECTORIMPORT_HPP */
+
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_Error.hpp b/lib/kokkos/example/common/WrapMPI.hpp
old mode 100755
new mode 100644
similarity index 61%
copy from lib/kokkos/core/src/impl/Kokkos_Error.hpp
copy to lib/kokkos/example/common/WrapMPI.hpp
index 33e203c94..c75e4bc5c
--- a/lib/kokkos/core/src/impl/Kokkos_Error.hpp
+++ b/lib/kokkos/example/common/WrapMPI.hpp
@@ -1,78 +1,103 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#ifndef KOKKOS_IMPL_ERROR_HPP
-#define KOKKOS_IMPL_ERROR_HPP
+#ifndef KOKKOS_EXAMPLE_WRAP_MPI
+#define KOKKOS_EXAMPLE_WRAP_MPI
+#include <Kokkos_Macros.hpp>
#include <string>
-#include <iosfwd>
+
+#if defined( KOKKOS_HAVE_MPI )
+
+#include <mpi.h>
namespace Kokkos {
-namespace Impl {
+namespace Example {
-void host_abort( const char * const );
+inline
+double all_reduce( double value , MPI_Comm comm )
+{
+ double local = value ;
+ MPI_Allreduce( & local , & value , 1 , MPI_DOUBLE , MPI_SUM , comm );
+ return value ;
+}
-void throw_runtime_exception( const std::string & );
+inline
+double all_reduce_max( double value , MPI_Comm comm )
+{
+ double local = value ;
+ MPI_Allreduce( & local , & value , 1 , MPI_DOUBLE , MPI_MAX , comm );
+ return value ;
+}
-void traceback_callstack( std::ostream & );
+} // namespace Example
+} // namespace Kokkos
-std::string human_memory_size(size_t arg_bytes);
+#elif ! defined( KOKKOS_HAVE_MPI )
-}
-}
+/* Wrap the the MPI_Comm type and heavily used MPI functions
+ * to reduce the number of '#if defined( KOKKOS_HAVE_MPI )'
+ * blocks which have to be sprinkled throughout the examples.
+ */
+
+typedef int MPI_Comm ;
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+inline int MPI_Comm_size( MPI_Comm , int * size ) { *size = 1 ; return 0 ; }
+inline int MPI_Comm_rank( MPI_Comm , int * rank ) { *rank = 0 ; return 0 ; }
+inline int MPI_Barrier( MPI_Comm ) { return 0; }
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
namespace Kokkos {
+namespace Example {
+
inline
-void abort( const char * const message ) { Kokkos::Impl::host_abort(message); }
-}
-#endif /* defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) */
+double all_reduce( double value , MPI_Comm ) { return value ; }
+
+inline
+double all_reduce_max( double value , MPI_Comm ) { return value ; }
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+} // namespace Example
+} // namespace Kokkos
-#endif /* #ifndef KOKKOS_IMPL_ERROR_HPP */
+#endif /* ! defined( KOKKOS_HAVE_MPI ) */
+#endif /* #ifndef KOKKOS_EXAMPLE_WRAP_MPI */
diff --git a/lib/kokkos/example/feint/ElemFunctor.hpp b/lib/kokkos/example/feint/ElemFunctor.hpp
new file mode 100644
index 000000000..c935aab16
--- /dev/null
+++ b/lib/kokkos/example/feint/ElemFunctor.hpp
@@ -0,0 +1,489 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_FEINT_FUNCTORS_HPP
+#define KOKKOS_EXAMPLE_FEINT_FUNCTORS_HPP
+
+#include <stdio.h>
+#include <Kokkos_Core.hpp>
+#include <BoxElemFixture.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+/** \brief Numerically integrate a function on a finite element mesh and
+ * project the integrated values to nodes.
+ */
+template< class FixtureType ,
+ class FunctionType ,
+ bool PerformScatterAddWithAtomic >
+struct FiniteElementIntegration ;
+
+// Specialized for an 'Example::BoxElemFixture' finite element mesh
+template< class Device , BoxElemPart::ElemOrder ElemOrder , class GridMap ,
+ class FunctionType ,
+ bool PerformScatterAddWithAtomic >
+struct FiniteElementIntegration<
+ Kokkos::Example::BoxElemFixture< Device , ElemOrder , GridMap > ,
+ FunctionType ,
+ PerformScatterAddWithAtomic >
+{
+ // Element mesh types:
+ typedef Kokkos::Example::BoxElemFixture< Device , ElemOrder >
+ BoxFixtureType ;
+
+ typedef Kokkos::Example::HexElement_Data< BoxFixtureType::ElemNode >
+ HexElemDataType ;
+
+ enum { ElemNodeCount = HexElemDataType::element_node_count };
+ enum { IntegrationCount = HexElemDataType::integration_count };
+ enum { ValueCount = FunctionType::value_count };
+
+ // Dictionary of view types:
+ typedef View<int*, Device> ElemErrorType ;
+ typedef View<double*[ElemNodeCount][ValueCount],Device> ElemValueType ;
+ typedef View<double*[ValueCount], Device> NodeValueType ;
+
+ // Data members for this Functor:
+ const HexElemDataType m_hex_elem_data ; ///< Master element
+ const BoxFixtureType m_box_fixture ; ///< Unstructured mesh data
+ const FunctionType m_function ; ///< Function to integrate
+ const ElemErrorType m_elem_error ; ///< Flags for element errors
+ const ElemValueType m_elem_integral ; ///< Per-element quantities
+ const NodeValueType m_node_lumped ; ///< Quantities lumped to nodes
+
+ //----------------------------------------
+
+ FiniteElementIntegration(
+ const BoxFixtureType & box_fixture ,
+ const FunctionType & function )
+ : m_hex_elem_data()
+ , m_box_fixture( box_fixture ) // Shallow copy of the mesh fixture
+ , m_function( function )
+ , m_elem_error( "elem_error" , box_fixture.elem_count() )
+ , m_elem_integral( "elem_integral" , box_fixture.elem_count() )
+ , m_node_lumped( "node_lumped" , box_fixture.node_count() )
+ {}
+
+ //----------------------------------------
+ // Device for parallel dispatch.
+ typedef typename Device::execution_space execution_space;
+
+ // Value type for global parallel reduction.
+ struct value_type {
+ double value[ ValueCount ]; ///< Integrated quantitie
+ int error ; ///< Element inversion flag
+ };
+
+ //----------------------------------------
+ // Transform element interpolation function gradients and
+ // compute determinant of spatial jacobian.
+ KOKKOS_INLINE_FUNCTION
+ float transform_gradients(
+ const float grad[][ ElemNodeCount ] , // Gradient of bases master element
+ const double coord[][ ElemNodeCount ] ,
+ float dpsi[][ ElemNodeCount ] ) const
+ {
+ enum { TensorDim = 9 };
+ enum { j11 = 0 , j12 = 1 , j13 = 2 ,
+ j21 = 3 , j22 = 4 , j23 = 5 ,
+ j31 = 6 , j32 = 7 , j33 = 8 };
+
+ // Temporary for jacobian accumulation is double for summation accuracy.
+ double J[ TensorDim ] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ for( int i = 0; i < ElemNodeCount ; ++i ) {
+ J[j11] += grad[0][i] * coord[0][i] ;
+ J[j12] += grad[0][i] * coord[1][i] ;
+ J[j13] += grad[0][i] * coord[2][i] ;
+
+ J[j21] += grad[1][i] * coord[0][i] ;
+ J[j22] += grad[1][i] * coord[1][i] ;
+ J[j23] += grad[1][i] * coord[2][i] ;
+
+ J[j31] += grad[2][i] * coord[0][i] ;
+ J[j32] += grad[2][i] * coord[1][i] ;
+ J[j33] += grad[2][i] * coord[2][i] ;
+ }
+
+ // Inverse jacobian, compute as double and store as float.
+ float invJ[ TensorDim ] = {
+ float( J[j22] * J[j33] - J[j23] * J[j32] ) ,
+ float( J[j13] * J[j32] - J[j12] * J[j33] ) ,
+ float( J[j12] * J[j23] - J[j13] * J[j22] ) ,
+
+ float( J[j23] * J[j31] - J[j21] * J[j33] ) ,
+ float( J[j11] * J[j33] - J[j13] * J[j31] ) ,
+ float( J[j13] * J[j21] - J[j11] * J[j23] ) ,
+
+ float( J[j21] * J[j32] - J[j22] * J[j31] ) ,
+ float( J[j12] * J[j31] - J[j11] * J[j32] ) ,
+ float( J[j11] * J[j22] - J[j12] * J[j21] ) };
+
+ const float detJ = J[j11] * invJ[j11] +
+ J[j21] * invJ[j12] +
+ J[j31] * invJ[j13] ;
+
+ {
+ const float detJinv = 1.0 / detJ ;
+ for ( int i = 0 ; i < TensorDim ; ++i ) { invJ[i] *= detJinv ; }
+ }
+
+ // Transform gradients:
+ for ( int i = 0; i < ElemNodeCount ; ++i ) {
+ dpsi[0][i] = grad[0][i] * invJ[j11] +
+ grad[1][i] * invJ[j12] +
+ grad[2][i] * invJ[j13];
+ dpsi[1][i] = grad[0][i] * invJ[j21] +
+ grad[1][i] * invJ[j22] +
+ grad[2][i] * invJ[j23];
+ dpsi[2][i] = grad[0][i] * invJ[j31] +
+ grad[1][i] * invJ[j32] +
+ grad[2][i] * invJ[j33];
+ }
+
+ return detJ ;
+ }
+
+ // Functor's function called for each element in the mesh
+ // to numerically integrate the function and add element quantities
+ // to the global integral.
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const int ielem , value_type & update ) const
+ {
+ // Local temporaries for gathering nodal data.
+ double node_coord[3][ ElemNodeCount ];
+
+ int inode[ ElemNodeCount ] ;
+
+ // Gather indices of element's node from global memory to local memory.
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ inode[i] = m_box_fixture.elem_node( ielem , i );
+ }
+
+ // Gather coordinates of element's nodes from global memory to local memory.
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ node_coord[0][i] = m_box_fixture.node_coord( inode[i] , 0 );
+ node_coord[1][i] = m_box_fixture.node_coord( inode[i] , 1 );
+ node_coord[2][i] = m_box_fixture.node_coord( inode[i] , 2 );
+ }
+
+ // Local temporary to accumulate numerical integration
+ // of vector valued function.
+ double accum[ ValueCount ];
+
+ for ( int j = 0 ; j < ValueCount ; ++j ) { accum[j] = 0 ; }
+
+ int error = 0 ;
+
+ // Numerical integration loop for this element:
+ for ( int k = 0 ; k < IntegrationCount ; ++k ) {
+
+ // Integration point in space as interpolated from nodal coordinates:
+ double point[3] = { 0 , 0 , 0 };
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ point[0] += node_coord[0][i] * m_hex_elem_data.values[k][i] ;
+ point[1] += node_coord[1][i] * m_hex_elem_data.values[k][i] ;
+ point[2] += node_coord[2][i] * m_hex_elem_data.values[k][i] ;
+ }
+
+ // Example function vector value at cubature point:
+ double val_at_pt[ ValueCount ];
+ m_function( point , val_at_pt );
+
+ // Temporary array for transformed element basis functions' gradient.
+ // Not used in this example, but computed anyway by the more general
+ // deformation function.
+ float dpsi[3][ ElemNodeCount ];
+
+ // Compute deformation jacobian, transform basis function gradient,
+ // and return determinant of deformation jacobian.
+ float detJ = transform_gradients( m_hex_elem_data.gradients[k] ,
+ node_coord , dpsi );
+
+ // Check for inverted spatial jacobian
+ if ( detJ <= 0 ) { error = 1 ; detJ = 0 ; }
+
+ // Integration weight.
+ const float w = m_hex_elem_data.weights[k] * detJ ;
+
+ // Cubature of function.
+ for ( int j = 0 ; j < ValueCount ; ++j ) {
+ accum[j] += val_at_pt[j] * w ;
+ }
+ }
+
+ m_elem_error(ielem) = error ;
+
+
+ // Element contribution to global integral:
+
+ if ( error ) { update.error = 1 ; }
+
+ for ( int j = 0 ; j < ValueCount ; ++j ) { update.value[j] += accum[j] ; }
+
+ // Element-node quantity for lumping to nodes:
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ for ( int j = 0 ; j < ValueCount ; ++j ) {
+ // Save element's integral apportionment to nodes to global memory
+ m_elem_integral( ielem , i , j ) = accum[j] / ElemNodeCount ;
+ }
+ }
+
+ if ( PerformScatterAddWithAtomic ) {
+ // Option to immediately scatter-add the integrated quantities to nodes.
+ // This is a race condition as two or more threads could attempt
+ // concurrent update of nodal values. The atomic_fetch_add (+=)
+ // function guarantees that the summation will occur correctly;
+ // however, there can be no guarantee for the order of summation.
+ // Due to non-associativity of floating point arithmetic the result
+ // is non-deterministic within bounds of floating point round-off.
+
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ for ( int j = 0 ; j < ValueCount ; ++j ) {
+ Kokkos::atomic_fetch_add( & m_node_lumped( inode[i] , j ) ,
+ m_elem_integral( ielem , i , j ) );
+ }
+ }
+ }
+ }
+ //--------------------------------------------------------------------------
+
+ // Initialization of the global reduction value.
+ KOKKOS_INLINE_FUNCTION
+ void init( value_type & update ) const
+ {
+ for ( int j = 0 ; j < ValueCount ; ++j ) update.value[j] = 0 ;
+ update.error = 0 ;
+ }
+
+ // Join two contributions to global reduction value.
+ KOKKOS_INLINE_FUNCTION
+ void join( volatile value_type & update ,
+ volatile const value_type & input ) const
+ {
+ for ( int j = 0 ; j < ValueCount ; ++j ) update.value[j] += input.value[j] ;
+ if ( input.error ) update.error = 1 ;
+ }
+};
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+template< class ViewElemNode ,
+ class ViewNodeScan ,
+ class ViewNodeElem >
+void map_node_to_elem( const ViewElemNode & elem_node ,
+ const ViewNodeScan & node_scan ,
+ const ViewNodeElem & node_elem );
+
+/** \brief Functor to gather-sum elements' per-node quantities
+ * to element nodes. Gather-sum is thread safe and
+ * does not require atomic updates.
+ */
+template< class ViewNodeValue ,
+ class ViewElemValue ,
+ bool AlreadyUsedAtomic >
+struct LumpElemToNode {
+
+ typedef typename ViewElemValue::execution_space execution_space ;
+
+ // In this example we know that the ViewElemValue
+ // array specification is < double*[nNode][nValue] >
+
+#if defined( KOKKOS_USING_EXPERIMENTAL_VIEW )
+ enum { value_count = ViewElemValue::dimension::N2 };
+#else
+ enum { value_count = ViewElemValue::shape_type::N2 };
+#endif
+
+ ViewNodeValue m_node_value ; ///< Integrated values at nodes
+ ViewElemValue m_elem_value ; ///< Values apportioned to nodes
+ View<int*, execution_space> m_node_scan ; ///< Offsets for nodes->element
+ View<int*[2],execution_space> m_node_elem ; ///< Node->element connectivity
+
+ // Only allocate node->element connectivity if have
+ // not already used atomic updates for the nodes.
+ template< class ViewElemNode >
+ LumpElemToNode( const ViewNodeValue & node_value ,
+ const ViewElemValue & elem_value ,
+ const ViewElemNode & elem_node )
+ : m_node_value( node_value )
+ , m_elem_value( elem_value )
+ , m_node_scan( "node_scan" ,
+ AlreadyUsedAtomic ? 0 : node_value.dimension_0() + 1 )
+ , m_node_elem( "node_elem" ,
+ AlreadyUsedAtomic ? 0 : elem_node.dimension_0() *
+ elem_node.dimension_1() )
+ {
+ if ( ! AlreadyUsedAtomic ) {
+ map_node_to_elem( elem_node , m_node_scan , m_node_elem );
+ }
+ }
+
+ //----------------------------------------
+
+ struct value_type { double value[ value_count ]; };
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const int inode , value_type & update ) const
+ {
+ if ( ! AlreadyUsedAtomic ) {
+ // Sum element quantities to a local variable.
+ value_type local ;
+ for ( int j = 0 ; j < value_count ; ++j ) { local.value[j] = 0 ; }
+
+ {
+ // nodes' element ids span [i,end)
+ int i = m_node_scan(inode);
+ const int end = m_node_scan(inode+1);
+
+ for ( ; i < end ; ++i ) {
+ // element #ielem , local node #ielem_node is this node:
+ const int ielem = m_node_elem(i,0);
+ const int ielem_node = m_node_elem(i,1);
+ // Sum the vector-values quantity
+ for ( int j = 0 ; j < value_count ; ++j ) {
+ local.value[j] += m_elem_value( ielem , ielem_node , j );
+ }
+ }
+ }
+
+ // Assign nodal quantity (no race condition).
+ // Sum global value.
+ for ( int j = 0 ; j < value_count ; ++j ) {
+ m_node_value( inode , j ) = local.value[j] ;
+ update.value[j] += local.value[j] ;
+ }
+ }
+ else {
+ // Already used atomic update of the nodal quantity,
+ // query and sum the value.
+ for ( int j = 0 ; j < value_count ; ++j ) {
+ update.value[j] += m_node_value( inode , j );
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void init( value_type & update ) const
+ { for ( int j = 0 ; j < value_count ; ++j ) { update.value[j] = 0 ; } }
+
+ KOKKOS_INLINE_FUNCTION
+ void join( volatile value_type & update ,
+ volatile const value_type & input ) const
+ {
+ for ( int j = 0 ; j < value_count ; ++j ) {
+ update.value[j] += input.value[j] ;
+ }
+ }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template< class ViewElemNode ,
+ class ViewNodeScan ,
+ class ViewNodeElem >
+void map_node_to_elem( const ViewElemNode & elem_node ,
+ const ViewNodeScan & node_scan ,
+ const ViewNodeElem & node_elem )
+{
+ typedef typename ViewElemNode::host_mirror_space host_mirror_space ;
+
+ const typename ViewElemNode::HostMirror host_elem_node =
+ Kokkos::create_mirror_view(elem_node);
+
+ const typename ViewNodeScan::HostMirror host_node_scan =
+ Kokkos::create_mirror_view(node_scan);
+
+ const typename ViewNodeElem::HostMirror host_node_elem =
+ Kokkos::create_mirror_view(node_elem);
+
+ const int elem_count = host_elem_node.dimension_0();
+ const int elem_node_count = host_elem_node.dimension_1();
+ const int node_count = host_node_scan.dimension_0() - 1 ;
+
+ const View<int*, host_mirror_space >
+ node_elem_count( "node_elem_count" , node_count );
+
+ Kokkos::deep_copy( host_elem_node , elem_node );
+
+ for ( int i = 0 ; i < elem_count ; ++i ) {
+ for ( int j = 0 ; j < elem_node_count ; ++j ) {
+ ++node_elem_count( host_elem_node(i,j) );
+ }
+ }
+
+ for ( int i = 0 ; i < node_count ; ++i ) {
+ host_node_scan(i+1) += host_node_scan(i) + node_elem_count(i);
+ node_elem_count(i) = 0 ;
+ }
+
+ for ( int i = 0 ; i < elem_count ; ++i ) {
+ for ( int j = 0 ; j < elem_node_count ; ++j ) {
+ const int inode = host_elem_node(i,j);
+ const int offset = host_node_scan(inode) + node_elem_count(inode);
+
+ host_node_elem( offset , 0 ) = i ;
+ host_node_elem( offset , 1 ) = j ;
+
+ ++node_elem_count(inode);
+ }
+ }
+
+ Kokkos::deep_copy( node_scan , host_node_scan );
+ Kokkos::deep_copy( node_elem , host_node_elem );
+}
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #ifndef KOKKOS_EXAMPLE_FEINT_FUNCTORS_HPP */
+
diff --git a/lib/kokkos/example/feint/Makefile b/lib/kokkos/example/feint/Makefile
new file mode 100644
index 000000000..98ab8747b
--- /dev/null
+++ b/lib/kokkos/example/feint/Makefile
@@ -0,0 +1,62 @@
+KOKKOS_PATH = ../..
+
+vpath %.cpp ${KOKKOS_PATH}/example/fixture ${KOKKOS_PATH}/example/feint
+
+EXAMPLE_HEADERS = $(wildcard $(KOKKOS_PATH)/example/common/*.hpp ${KOKKOS_PATH}/example/fixture/*.hpp ${KOKKOS_PATH}/example/feint/*.hpp)
+
+default: build_all
+ echo "End Build"
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
+ CXX = nvcc_wrapper
+ CXXFLAGS ?= -O3
+ LINK = $(CXX)
+ LDFLAGS ?= -lpthread
+else
+ CXX ?= g++
+ CXXFLAGS ?= -O3
+ LINK ?= $(CXX)
+ LDFLAGS ?= -lpthread
+endif
+
+KOKKOS_CXXFLAGS += \
+ -I${KOKKOS_PATH}/example/common \
+ -I${KOKKOS_PATH}/example/fixture \
+ -I${KOKKOS_PATH}/example/feint
+
+
+EXE_EXAMPLE_FEINT = KokkosExample_Feint
+OBJ_EXAMPLE_FEINT = BoxElemPart.o main.o
+
+ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
+ OBJ_EXAMPLE_FEINT += feint_cuda.o
+endif
+
+ifeq ($(KOKKOS_INTERNAL_USE_PTHREADS), 1)
+ OBJ_EXAMPLE_FEINT += feint_threads.o
+endif
+
+ifeq ($(KOKKOS_INTERNAL_USE_OPENMP), 1)
+ OBJ_EXAMPLE_FEINT += feint_openmp.o
+endif
+
+TARGETS = $(EXE_EXAMPLE_FEINT)
+
+#TEST_TARGETS =
+
+$(EXE_EXAMPLE_FEINT) : $(OBJ_EXAMPLE_FEINT) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_EXAMPLE_FEINT) $(KOKKOS_LIBS) $(LIB) -o $(EXE_EXAMPLE_FEINT)
+
+build_all : $(TARGETS)
+
+
+test : build_all
+
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(EXAMPLE_HEADERS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
+
diff --git a/lib/kokkos/example/feint/feint.hpp b/lib/kokkos/example/feint/feint.hpp
new file mode 100644
index 000000000..4b7196c4c
--- /dev/null
+++ b/lib/kokkos/example/feint/feint.hpp
@@ -0,0 +1,165 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_FEINT_HPP
+#define KOKKOS_EXAMPLE_FEINT_HPP
+
+#include <iostream>
+#include <BoxElemFixture.hpp>
+#include <ElemFunctor.hpp>
+#include <feint_fwd.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+/** \brief Vector valued function to numerically integrate.
+ *
+ * F(X) = { 1 , x , y , z , x*y , y*z , z*x , x*y*z }
+ *
+ * Integrates on a unit cube to:
+ * { 1 , 1/2 , 1/2 , 1/2 , 1/4 , 1/4 , 1/4 , 1/8 }
+ */
+struct MyFunctionType {
+
+ enum { value_count = 8 };
+
+ // Evaluate function at coordinate.
+ template< typename CoordType , typename ValueType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const CoordType point[] , ValueType value[] ) const
+ {
+ value[0] = 1 ;
+ value[1] = point[0] ;
+ value[2] = point[1] ;
+ value[3] = point[2] ;
+ value[4] = point[0] * point[1] ;
+ value[5] = point[1] * point[2] ;
+ value[6] = point[2] * point[0] ;
+ value[7] = point[0] * point[1] * point[2] ;
+ }
+};
+
+template < class Device , bool UseAtomic >
+void feint(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz )
+{
+ //----------------------------------------
+ // Create the unstructured finite element mesh box fixture on the device:
+
+ typedef Kokkos::Example::
+ BoxElemFixture< Device , Kokkos::Example::BoxElemPart::ElemLinear >
+ // BoxElemFixture< Device , Kokkos::Example::BoxElemPart::ElemQuadratic >
+ BoxFixtureType ;
+
+ // MPI distributed parallel domain decomposition of the fixture.
+ // Either by element (DecomposeElem) or by node (DecomposeNode)
+ // with ghosted elements.
+
+ static const Kokkos::Example::BoxElemPart::Decompose
+ decompose = Kokkos::Example::BoxElemPart:: DecomposeElem ;
+ // decompose = Kokkos::Example::BoxElemPart:: DecomposeNode ;
+
+ // Not using MPI in this example.
+ const unsigned mpi_rank = 0 ;
+ const unsigned mpi_size = 1 ;
+
+ const BoxFixtureType fixture( decompose , mpi_size , mpi_rank ,
+ global_elem_nx ,
+ global_elem_ny ,
+ global_elem_nz );
+
+ //----------------------------------------
+ // Create and execute the numerical integration functor on the device:
+
+ typedef Kokkos::Example::
+ FiniteElementIntegration< BoxFixtureType , MyFunctionType , UseAtomic >
+ FeintType ;
+
+ const FeintType feint( fixture , MyFunctionType() );
+
+ typename FeintType::value_type elem_integral ;
+
+ // A reduction for the global integral:
+ Kokkos::parallel_reduce( fixture.elem_count() , feint , elem_integral );
+
+ if ( elem_integral.error ) {
+ std::cout << "An element had a spatial jacobian error" << std::endl ;
+ return ;
+ }
+
+ std::cout << "Elem integral =" ;
+ for ( int i = 0 ; i < MyFunctionType::value_count ; ++i ) {
+ std::cout << " " << elem_integral.value[i] ;
+ }
+ std::cout << std::endl ;
+
+ //----------------------------------------
+ // Create and execute the nodal lumped value projection and reduction functor:
+
+ typedef Kokkos::Example::
+ LumpElemToNode< typename FeintType::NodeValueType ,
+ typename FeintType::ElemValueType ,
+ UseAtomic > LumpType ;
+
+ const LumpType lump( feint.m_node_lumped ,
+ feint.m_elem_integral ,
+ fixture.elem_node() );
+
+ typename LumpType ::value_type node_sum ;
+
+ Kokkos::parallel_reduce( fixture.node_count() , lump , node_sum );
+
+ std::cout << "Node lumped sum =" ;
+ for ( int i = 0 ; i < MyFunctionType::value_count ; ++i ) {
+ std::cout << " " << node_sum.value[i] ;
+ }
+ std::cout << std::endl ;
+}
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #ifndef KOKKOS_EXAMPLE_FEINT_HPP */
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/example/feint/feint_cuda.cpp
old mode 100755
new mode 100644
similarity index 83%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
copy to lib/kokkos/example/feint/feint_cuda.cpp
index cc87771fa..1370822fe
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
+++ b/lib/kokkos/example/feint/feint_cuda.cpp
@@ -1,64 +1,67 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
+#include <Kokkos_Core.hpp>
-#ifndef KOKKOS_SPINWAIT_HPP
-#define KOKKOS_SPINWAIT_HPP
+#if defined( KOKKOS_HAVE_CUDA )
-#include <Kokkos_Macros.hpp>
+#include <feint.hpp>
namespace Kokkos {
-namespace Impl {
+namespace Example {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value );
-#else
-KOKKOS_INLINE_FUNCTION
-void spinwait( volatile int & , const int ) {}
-#endif
+template void feint<Kokkos::Cuda,false>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
+
+template void feint<Kokkos::Cuda,true>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
-} /* namespace Impl */
+} /* namespace Example */
} /* namespace Kokkos */
-#endif /* #ifndef KOKKOS_SPINWAIT_HPP */
+#endif
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/example/feint/feint_fwd.hpp
old mode 100755
new mode 100644
similarity index 84%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
copy to lib/kokkos/example/feint/feint_fwd.hpp
index cc87771fa..f02e547cf
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
+++ b/lib/kokkos/example/feint/feint_fwd.hpp
@@ -1,64 +1,60 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-
-#ifndef KOKKOS_SPINWAIT_HPP
-#define KOKKOS_SPINWAIT_HPP
-
-#include <Kokkos_Macros.hpp>
+#ifndef KOKKOS_EXAMPLE_FEINT_FWD_HPP
+#define KOKKOS_EXAMPLE_FEINT_FWD_HPP
namespace Kokkos {
-namespace Impl {
+namespace Example {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value );
-#else
-KOKKOS_INLINE_FUNCTION
-void spinwait( volatile int & , const int ) {}
-#endif
+template < class Device , bool UseAtomic >
+void feint(
+ const unsigned global_elem_nx = 100 ,
+ const unsigned global_elem_ny = 115 ,
+ const unsigned global_elem_nz = 130 );
-} /* namespace Impl */
+} /* namespace Example */
} /* namespace Kokkos */
-#endif /* #ifndef KOKKOS_SPINWAIT_HPP */
+#endif /* #ifndef KOKKOS_EXAMPLE_FEINT_FWD_HPP */
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/example/feint/feint_openmp.cpp
old mode 100755
new mode 100644
similarity index 83%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
copy to lib/kokkos/example/feint/feint_openmp.cpp
index cc87771fa..cf2fdca5b
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
+++ b/lib/kokkos/example/feint/feint_openmp.cpp
@@ -1,64 +1,67 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
+#include <Kokkos_Core.hpp>
-#ifndef KOKKOS_SPINWAIT_HPP
-#define KOKKOS_SPINWAIT_HPP
+#ifdef KOKKOS_HAVE_OPENMP
-#include <Kokkos_Macros.hpp>
+#include <feint.hpp>
namespace Kokkos {
-namespace Impl {
+namespace Example {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value );
-#else
-KOKKOS_INLINE_FUNCTION
-void spinwait( volatile int & , const int ) {}
-#endif
+template void feint<Kokkos::OpenMP,false>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
+
+template void feint<Kokkos::OpenMP,true>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
-} /* namespace Impl */
+} /* namespace Example */
} /* namespace Kokkos */
-#endif /* #ifndef KOKKOS_SPINWAIT_HPP */
+#endif
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/example/feint/feint_threads.cpp
old mode 100755
new mode 100644
similarity index 80%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
copy to lib/kokkos/example/feint/feint_threads.cpp
index cc87771fa..5dcf5654f
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
+++ b/lib/kokkos/example/feint/feint_threads.cpp
@@ -1,64 +1,66 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
+#include <Kokkos_Core.hpp>
-#ifndef KOKKOS_SPINWAIT_HPP
-#define KOKKOS_SPINWAIT_HPP
+#if defined( KOKKOS_HAVE_PTHREAD )
-#include <Kokkos_Macros.hpp>
+#include <feint.hpp>
namespace Kokkos {
-namespace Impl {
+namespace Example {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value );
-#else
-KOKKOS_INLINE_FUNCTION
-void spinwait( volatile int & , const int ) {}
-#endif
+template void feint< Kokkos::Threads ,false>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
-} /* namespace Impl */
-} /* namespace Kokkos */
+template void feint< Kokkos::Threads ,true>(
+ const unsigned global_elem_nx ,
+ const unsigned global_elem_ny ,
+ const unsigned global_elem_nz );
-#endif /* #ifndef KOKKOS_SPINWAIT_HPP */
+} /* namespace Example */
+} /* namespace Kokkos */
+#endif /* #if defined( KOKKOS_HAVE_PTHREAD ) */
diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/example/feint/main.cpp
old mode 100755
new mode 100644
similarity index 53%
copy from lib/kokkos/containers/performance_tests/TestCuda.cpp
copy to lib/kokkos/example/feint/main.cpp
index aee262de9..c45d483e7
--- a/lib/kokkos/containers/performance_tests/TestCuda.cpp
+++ b/lib/kokkos/example/feint/main.cpp
@@ -1,100 +1,110 @@
-/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
-*/
-#include <stdint.h>
-#include <string>
+#include <utility>
#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <fstream>
-
-#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
-#if defined( KOKKOS_HAVE_CUDA )
+#include <feint_fwd.hpp>
-#include <Kokkos_UnorderedMap.hpp>
+int main()
+{
+#if defined( KOKKOS_HAVE_PTHREAD )
+ {
+ // Use 4 cores per NUMA region, unless fewer available
-#include <TestGlobal2LocalIds.hpp>
+ const unsigned use_numa_count = Kokkos::hwloc::get_available_numa_count();
+ const unsigned use_cores_per_numa = std::min( 4u , Kokkos::hwloc::get_available_cores_per_numa() );
-#include <TestUnorderedMapPerformance.hpp>
+ Kokkos::Threads::initialize( use_numa_count * use_cores_per_numa );
-namespace Performance {
+ std::cout << "feint< Threads , NotUsingAtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::Threads , false >();
-class cuda : public ::testing::Test {
-protected:
- static void SetUpTestCase()
- {
- std::cout << std::setprecision(5) << std::scientific;
- Kokkos::HostSpace::execution_space::initialize();
- Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
+ std::cout << "feint< Threads , Usingtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::Threads , true >();
+
+ Kokkos::Threads::finalize();
}
- static void TearDownTestCase()
+#endif
+
+#if defined( KOKKOS_HAVE_OPENMP )
{
- Kokkos::Cuda::finalize();
- Kokkos::HostSpace::execution_space::finalize();
+ // Use 4 cores per NUMA region, unless fewer available
+
+ const unsigned use_numa_count = Kokkos::hwloc::get_available_numa_count();
+ const unsigned use_cores_per_numa = std::min( 4u , Kokkos::hwloc::get_available_cores_per_numa() );
+
+ Kokkos::OpenMP::initialize( use_numa_count * use_cores_per_numa );
+
+ std::cout << "feint< OpenMP , NotUsingAtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::OpenMP , false >();
+
+ std::cout << "feint< OpenMP , Usingtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::OpenMP , true >();
+
+ Kokkos::OpenMP::finalize();
}
-};
+#endif
-TEST_F( cuda, global_2_local)
-{
- std::cout << "Cuda" << std::endl;
- std::cout << "size, create, generate, fill, find" << std::endl;
- for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step)
- test_global_to_local_ids<Kokkos::Cuda>(i);
-}
+#if defined( KOKKOS_HAVE_CUDA )
+ {
+ // Initialize Host mirror device
+ Kokkos::HostSpace::execution_space::initialize(1);
+ const unsigned device_count = Kokkos::Cuda::detect_device_count();
-TEST_F( cuda, unordered_map_performance_near)
-{
- Perf::run_performance_tests<Kokkos::Cuda,true>("cuda-near");
-}
+ // Use the last device:
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(device_count-1) );
-TEST_F( cuda, unordered_map_performance_far)
-{
- Perf::run_performance_tests<Kokkos::Cuda,false>("cuda-far");
-}
+ std::cout << "feint< Cuda , NotUsingAtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::Cuda , false >();
+
+ std::cout << "feint< Cuda , UsingAtomic >" << std::endl ;
+ Kokkos::Example::feint< Kokkos::Cuda , true >();
+
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+ }
+#endif
}
-#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
diff --git a/lib/kokkos/example/fenl/CGSolve.hpp b/lib/kokkos/example/fenl/CGSolve.hpp
new file mode 100644
index 000000000..370dee15a
--- /dev/null
+++ b/lib/kokkos/example/fenl/CGSolve.hpp
@@ -0,0 +1,296 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_CG_SOLVE
+#define KOKKOS_EXAMPLE_CG_SOLVE
+
+#include <cmath>
+#include <limits>
+#include <Kokkos_Core.hpp>
+#include <impl/Kokkos_Timer.hpp>
+
+#include <WrapMPI.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+template< typename ValueType , class Space >
+struct CrsMatrix {
+ typedef Kokkos::StaticCrsGraph< unsigned , Space , void , unsigned > StaticCrsGraphType ;
+ typedef View< ValueType * , Space > coeff_type ;
+
+ StaticCrsGraphType graph ;
+ coeff_type coeff ;
+
+ CrsMatrix() : graph(), coeff() {}
+
+ CrsMatrix( const StaticCrsGraphType & arg_graph )
+ : graph( arg_graph )
+ , coeff( "crs_matrix_coeff" , arg_graph.entries.dimension_0() )
+ {}
+};
+
+template< typename MScalar
+ , typename VScalar
+ , class Space >
+struct Multiply {
+
+ const Example::CrsMatrix< MScalar , Space > m_A ;
+ const Kokkos::View< const VScalar * , Space > m_x ;
+ const Kokkos::View< VScalar * , Space > m_y ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const int iRow ) const
+ {
+ const int iEntryBegin = m_A.graph.row_map[iRow];
+ const int iEntryEnd = m_A.graph.row_map[iRow+1];
+
+ double sum = 0 ;
+
+ for ( int iEntry = iEntryBegin ; iEntry < iEntryEnd ; ++iEntry ) {
+ sum += m_A.coeff(iEntry) * m_x( m_A.graph.entries(iEntry) );
+ }
+
+ m_y(iRow) = sum ;
+ }
+
+ Multiply( const View< VScalar * , Space > & y
+ , const CrsMatrix< MScalar , Space > & A
+ , const View< const VScalar * , Space > & x
+ )
+ : m_A( A ), m_x( x ), m_y( y )
+ {}
+};
+
+template< typename MScalar
+ , typename VScalar
+ , class Space >
+inline
+void multiply( const int nrow
+ , const Kokkos::View< VScalar * , Space > & y
+ , const Example::CrsMatrix< MScalar , Space > & A
+ , const Kokkos::View< VScalar * , Space > & x
+ )
+{
+ Kokkos::parallel_for( Kokkos::RangePolicy<Space>(0,nrow), Multiply<MScalar,VScalar,Space>( y , A , x ) );
+}
+
+template< typename ValueType , class Space >
+struct WAXPBY {
+ const Kokkos::View< const ValueType * , Space > m_x ;
+ const Kokkos::View< const ValueType * , Space > m_y ;
+ const Kokkos::View< ValueType * , Space > m_w ;
+ const double m_alpha ;
+ const double m_beta ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const int i ) const
+ { m_w(i) = m_alpha * m_x(i) + m_beta * m_y(i); }
+
+ WAXPBY( const View< ValueType * , Space > & arg_w
+ , const double arg_alpha
+ , const View< ValueType * , Space > & arg_x
+ , const double arg_beta
+ , const View< ValueType * , Space > & arg_y
+ )
+ : m_x( arg_x )
+ , m_y( arg_y )
+ , m_w( arg_w )
+ , m_alpha( arg_alpha )
+ , m_beta( arg_beta )
+ {}
+};
+
+template< typename VScalar , class Space >
+void waxpby( const int n
+ , const Kokkos::View< VScalar * , Space > & arg_w
+ , const double arg_alpha
+ , const Kokkos::View< VScalar * , Space > & arg_x
+ , const double arg_beta
+ , const Kokkos::View< VScalar * , Space > & arg_y
+ )
+{
+ Kokkos::parallel_for( Kokkos::RangePolicy<Space>(0,n), WAXPBY<VScalar,Space>(arg_w,arg_alpha,arg_x,arg_beta,arg_y) );
+}
+
+template< typename VScalar , class Space >
+struct Dot {
+ typedef double value_type ;
+
+ const Kokkos::View< const VScalar * , Space > m_x ;
+ const Kokkos::View< const VScalar * , Space > m_y ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const int i , value_type & update ) const
+ { update += m_x(i) * m_y(i); }
+
+ Dot( const Kokkos::View< VScalar * , Space > & arg_x
+ , const Kokkos::View< VScalar * , Space > & arg_y
+ )
+ : m_x(arg_x), m_y(arg_y) {}
+};
+
+template< typename VScalar , class Space >
+double dot( const int n
+ , const Kokkos::View< VScalar * , Space > & arg_x
+ , const Kokkos::View< VScalar * , Space > & arg_y
+ )
+{
+ double result = 0 ;
+ Kokkos::parallel_reduce( Kokkos::RangePolicy<Space>(0,n) , Dot<VScalar,Space>( arg_x , arg_y ) , result );
+ return result ;
+}
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+struct CGSolveResult {
+ size_t iteration ;
+ double iter_time ;
+ double matvec_time ;
+ double norm_res ;
+};
+
+template< class ImportType
+ , typename MScalar
+ , typename VScalar
+ , class Space
+ >
+inline
+void cgsolve( const ImportType & import
+ , const CrsMatrix< MScalar , Space > & A
+ , const Kokkos::View< VScalar * , Space > & b
+ , const Kokkos::View< VScalar * , Space > & x
+ , const size_t maximum_iteration = 200
+ , const double tolerance = std::numeric_limits<double>::epsilon()
+ , CGSolveResult * result = 0
+ )
+{
+ typedef View< VScalar * , Space > VectorType ;
+
+ const size_t count_owned = import.count_owned ;
+ const size_t count_total = import.count_owned + import.count_receive;
+
+ size_t iteration = 0 ;
+ double iter_time = 0 ;
+ double matvec_time = 0 ;
+ double norm_res = 0 ;
+
+ // Need input vector to matvec to be owned + received
+ VectorType pAll ( "cg::p" , count_total );
+
+ VectorType p = Kokkos::subview( pAll , std::pair<size_t,size_t>(0,count_owned) );
+ VectorType r ( "cg::r" , count_owned );
+ VectorType Ap( "cg::Ap", count_owned );
+
+ /* r = b - A * x ; */
+
+ /* p = x */ Kokkos::deep_copy( p , x );
+ /* import p */ import( pAll );
+ /* Ap = A * p */ multiply( count_owned , Ap , A , pAll );
+ /* r = b - Ap */ waxpby( count_owned , r , 1.0 , b , -1.0 , Ap );
+ /* p = r */ Kokkos::deep_copy( p , r );
+
+ double old_rdot = Kokkos::Example::all_reduce( dot( count_owned , r , r ) , import.comm );
+
+ norm_res = sqrt( old_rdot );
+ iteration = 0 ;
+
+ Kokkos::Impl::Timer wall_clock ;
+ Kokkos::Impl::Timer timer;
+
+ while ( tolerance < norm_res && iteration < maximum_iteration ) {
+
+ /* pAp_dot = dot( p , Ap = A * p ) */
+
+ timer.reset();
+ /* import p */ import( pAll );
+ /* Ap = A * p */ multiply( count_owned , Ap , A , pAll );
+ Space::fence();
+ matvec_time += timer.seconds();
+
+ const double pAp_dot = Kokkos::Example::all_reduce( dot( count_owned , p , Ap ) , import.comm );
+ const double alpha = old_rdot / pAp_dot ;
+
+ /* x += alpha * p ; */ waxpby( count_owned , x , alpha, p , 1.0 , x );
+ /* r += -alpha * Ap ; */ waxpby( count_owned , r , -alpha, Ap , 1.0 , r );
+
+ const double r_dot = Kokkos::Example::all_reduce( dot( count_owned , r , r ) , import.comm );
+ const double beta = r_dot / old_rdot ;
+
+ /* p = r + beta * p ; */ waxpby( count_owned , p , 1.0 , r , beta , p );
+
+ norm_res = sqrt( old_rdot = r_dot );
+
+ ++iteration ;
+ }
+
+ Space::fence();
+ iter_time = wall_clock.seconds();
+
+ if ( 0 != result ) {
+ result->iteration = iteration ;
+ result->iter_time = iter_time ;
+ result->matvec_time = matvec_time ;
+ result->norm_res = norm_res ;
+ }
+}
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_EXAMPLE_CG_SOLVE */
+
+
diff --git a/lib/kokkos/example/fenl/Makefile b/lib/kokkos/example/fenl/Makefile
new file mode 100644
index 000000000..491ed4ee6
--- /dev/null
+++ b/lib/kokkos/example/fenl/Makefile
@@ -0,0 +1,50 @@
+KOKKOS_PATH = ../..
+
+vpath %.cpp ${KOKKOS_PATH}/example/fixture ${KOKKOS_PATH}/example/fenl
+
+EXAMPLE_HEADERS = $(wildcard $(KOKKOS_PATH)/example/common/*.hpp ${KOKKOS_PATH}/example/fixture/*.hpp ${KOKKOS_PATH}/example/fenl/*.hpp)
+
+default: build_all
+ echo "End Build"
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
+ CXX = nvcc_wrapper
+ CXXFLAGS ?= -O3
+ LINK = $(CXX)
+ LDFLAGS ?= -lpthread
+else
+ CXX ?= g++
+ CXXFLAGS ?= -O3
+ LINK ?= $(CXX)
+ LDFLAGS ?= -lpthread
+endif
+
+KOKKOS_CXXFLAGS += \
+ -I${KOKKOS_PATH}/example/common \
+ -I${KOKKOS_PATH}/example/fixture \
+ -I${KOKKOS_PATH}/example/fenl
+
+
+EXE_EXAMPLE_FENL = KokkosExample_Fenl
+OBJ_EXAMPLE_FENL = BoxElemPart.o main.o fenl.o
+
+TARGETS = $(EXE_EXAMPLE_FENL)
+
+#TEST_TARGETS =
+
+$(EXE_EXAMPLE_FENL) : $(OBJ_EXAMPLE_FENL) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_EXAMPLE_FENL) $(KOKKOS_LIBS) $(LIB) -o $(EXE_EXAMPLE_FENL)
+
+build_all : $(TARGETS)
+
+
+test : build_all
+
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(EXAMPLE_HEADERS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp b/lib/kokkos/example/fenl/fenl.cpp
old mode 100755
new mode 100644
similarity index 54%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.cpp
copy to lib/kokkos/example/fenl/fenl.cpp
index abd845da9..a5cba608f
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.cpp
+++ b/lib/kokkos/example/fenl/fenl.cpp
@@ -1,82 +1,117 @@
/*
-//@HEADER
// ************************************************************************
-//
-// Kokkos v. 2.0
-// Copyright (2014) Sandia Corporation
-//
+//
+// Kokkos: Manycore Performance-Portable Multidimensional Arrays
+// Copyright (2012) Sandia Corporation
+//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
-//
+//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
-//
+//
// ************************************************************************
-//@HEADER
*/
-#include <Kokkos_Macros.hpp>
-#include <impl/Kokkos_spinwait.hpp>
-
-/*--------------------------------------------------------------------------*/
-
-#if ( KOKKOS_ENABLE_ASM )
- #if defined( __arm__ )
- /* No-operation instruction to idle the thread. */
- #define YIELD asm volatile("nop")
- #else
- /* Pause instruction to prevent excess processor bus usage */
- #define YIELD asm volatile("pause\n":::"memory")
- #endif
-#elif defined ( KOKKOS_HAVE_WINTHREAD )
- #include <process.h>
- #define YIELD Sleep(0)
-#elif defined ( _WIN32 )
- #define YIELD __asm__ __volatile__("pause\n":::"memory")
-#else
- #include <sched.h>
- #define YIELD sched_yield()
+#include <HexElement.hpp>
+#include <fenl_impl.hpp>
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+#if defined( KOKKOS_HAVE_PTHREAD )
+
+template
+Perf fenl< Kokkos::Threads , Kokkos::Example::BoxElemPart::ElemLinear >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
+
+template
+Perf fenl< Kokkos::Threads , Kokkos::Example::BoxElemPart::ElemQuadratic >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
#endif
-/*--------------------------------------------------------------------------*/
-namespace Kokkos {
-namespace Impl {
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value )
-{
- while ( value == flag ) {
- YIELD ;
- }
-}
+#if defined (KOKKOS_HAVE_OPENMP)
+
+template
+Perf fenl< Kokkos::OpenMP , Kokkos::Example::BoxElemPart::ElemLinear >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
+
+template
+Perf fenl< Kokkos::OpenMP , Kokkos::Example::BoxElemPart::ElemQuadratic >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
#endif
-} /* namespace Impl */
+#if defined( KOKKOS_HAVE_CUDA )
+
+template
+Perf fenl< Kokkos::Cuda , Kokkos::Example::BoxElemPart::ElemLinear >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
+
+template
+Perf fenl< Kokkos::Cuda , Kokkos::Example::BoxElemPart::ElemQuadratic >(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
+
+#endif
+
+
+} /* namespace FENL */
+} /* namespace Example */
} /* namespace Kokkos */
diff --git a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp b/lib/kokkos/example/fenl/fenl.hpp
old mode 100755
new mode 100644
similarity index 68%
copy from lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
copy to lib/kokkos/example/fenl/fenl.hpp
index cc87771fa..e524a378c
--- a/lib/kokkos/core/src/impl/Kokkos_spinwait.hpp
+++ b/lib/kokkos/example/fenl/fenl.hpp
@@ -1,64 +1,89 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
+#ifndef KOKKOS_EXAMPLE_FENL_HPP
+#define KOKKOS_EXAMPLE_FENL_HPP
-#ifndef KOKKOS_SPINWAIT_HPP
-#define KOKKOS_SPINWAIT_HPP
-
-#include <Kokkos_Macros.hpp>
+#include <stdlib.h>
+#include <BoxElemPart.hpp>
+#include <WrapMPI.hpp>
namespace Kokkos {
-namespace Impl {
+namespace Example {
+namespace FENL {
+
+struct Perf {
+ size_t global_elem_count ;
+ size_t global_node_count ;
+ size_t newton_iter_count ;
+ size_t cg_iter_count ;
+ double map_ratio ;
+ double fill_node_set ;
+ double scan_node_count ;
+ double fill_graph_entries ;
+ double sort_graph_entries ;
+ double fill_element_graph ;
+ double create_sparse_matrix ;
+ double fill_time ;
+ double bc_time ;
+ double matvec_time ;
+ double cg_time ;
+ double newton_residual ;
+ double error_max ;
+
+};
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-void spinwait( volatile int & flag , const int value );
-#else
-KOKKOS_INLINE_FUNCTION
-void spinwait( volatile int & , const int ) {}
-#endif
+template < class Device , BoxElemPart::ElemOrder ElemOrder >
+Perf fenl(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int global_elems[] );
-} /* namespace Impl */
+} /* namespace FENL */
+} /* namespace Example */
} /* namespace Kokkos */
-#endif /* #ifndef KOKKOS_SPINWAIT_HPP */
+#endif /* #ifndef KOKKOS_EXAMPLE_FENL_HPP */
diff --git a/lib/kokkos/example/fenl/fenl_functors.hpp b/lib/kokkos/example/fenl/fenl_functors.hpp
new file mode 100644
index 000000000..30f5274a5
--- /dev/null
+++ b/lib/kokkos/example/fenl/fenl_functors.hpp
@@ -0,0 +1,1173 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_FENLFUNCTORS_HPP
+#define KOKKOS_EXAMPLE_FENLFUNCTORS_HPP
+
+#include <stdio.h>
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
+#include <limits>
+
+#include <Kokkos_Pair.hpp>
+#include <Kokkos_UnorderedMap.hpp>
+
+#include <impl/Kokkos_Timer.hpp>
+
+#include <BoxElemFixture.hpp>
+#include <HexElement.hpp>
+#include <CGSolve.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+template< class ElemNodeIdView , class CrsGraphType , unsigned ElemNode >
+class NodeNodeGraph {
+public:
+
+ typedef typename ElemNodeIdView::execution_space execution_space ;
+ typedef pair<unsigned,unsigned> key_type ;
+
+ typedef Kokkos::UnorderedMap< key_type, void , execution_space > SetType ;
+ typedef typename CrsGraphType::row_map_type::non_const_type RowMapType ;
+ typedef Kokkos::View< unsigned , execution_space > UnsignedValue ;
+
+ // Static dimensions of 0 generate compiler warnings or errors.
+ typedef Kokkos::View< unsigned*[ElemNode][ElemNode] , execution_space >
+ ElemGraphType ;
+
+ struct TagFillNodeSet {};
+ struct TagScanNodeCount {};
+ struct TagFillGraphEntries {};
+ struct TagSortGraphEntries {};
+ struct TagFillElementGraph {};
+
+private:
+
+ enum PhaseType { FILL_NODE_SET ,
+ SCAN_NODE_COUNT ,
+ FILL_GRAPH_ENTRIES ,
+ SORT_GRAPH_ENTRIES ,
+ FILL_ELEMENT_GRAPH };
+
+ const unsigned node_count ;
+ const ElemNodeIdView elem_node_id ;
+ UnsignedValue row_total ;
+ RowMapType row_count ;
+ RowMapType row_map ;
+ SetType node_node_set ;
+ PhaseType phase ;
+
+public:
+
+ CrsGraphType graph ;
+ ElemGraphType elem_graph ;
+
+ struct Times
+ {
+ double ratio;
+ double fill_node_set;
+ double scan_node_count;
+ double fill_graph_entries;
+ double sort_graph_entries;
+ double fill_element_graph;
+ };
+
+ NodeNodeGraph( const ElemNodeIdView & arg_elem_node_id ,
+ const unsigned arg_node_count,
+ Times & results
+ )
+ : node_count(arg_node_count)
+ , elem_node_id( arg_elem_node_id )
+ , row_total( "row_total" )
+ , row_count(Kokkos::ViewAllocateWithoutInitializing("row_count") , node_count ) // will deep_copy to 0 inside loop
+ , row_map( "graph_row_map" , node_count + 1 )
+ , node_node_set()
+ , phase( FILL_NODE_SET )
+ , graph()
+ , elem_graph()
+ {
+ //--------------------------------
+ // Guess at capacity required for the map:
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ wall_clock.reset();
+ phase = FILL_NODE_SET ;
+
+ // upper bound on the capacity
+ size_t set_capacity = (28ull * node_count) / 2;
+ unsigned failed_insert_count = 0 ;
+
+ do {
+ // Zero the row count to restart the fill
+ Kokkos::deep_copy( row_count , 0u );
+
+ node_node_set = SetType( ( set_capacity += failed_insert_count ) );
+
+ // May be larger that requested:
+ set_capacity = node_node_set.capacity();
+
+ Kokkos::parallel_reduce( Kokkos::RangePolicy<execution_space,TagFillNodeSet>(0,elem_node_id.dimension_0())
+ , *this
+ , failed_insert_count );
+
+ } while ( failed_insert_count );
+
+ execution_space::fence();
+ results.ratio = (double)node_node_set.size() / (double)node_node_set.capacity();
+ results.fill_node_set = wall_clock.seconds();
+ //--------------------------------
+
+ wall_clock.reset();
+ phase = SCAN_NODE_COUNT ;
+
+ // Exclusive scan of row_count into row_map
+ // including the final total in the 'node_count + 1' position.
+ // Zero the 'row_count' values.
+ Kokkos::parallel_scan( node_count , *this );
+
+ // Zero the row count for the fill:
+ Kokkos::deep_copy( row_count , 0u );
+
+ unsigned graph_entry_count = 0 ;
+
+ Kokkos::deep_copy( graph_entry_count , row_total );
+
+ // Assign graph's row_map and allocate graph's entries
+ graph.row_map = row_map ;
+ graph.entries = typename CrsGraphType::entries_type( "graph_entries" , graph_entry_count );
+
+ //--------------------------------
+ // Fill graph's entries from the (node,node) set.
+
+ execution_space::fence();
+ results.scan_node_count = wall_clock.seconds();
+
+ wall_clock.reset();
+ phase = FILL_GRAPH_ENTRIES ;
+ Kokkos::parallel_for( node_node_set.capacity() , *this );
+
+ execution_space::fence();
+ results.fill_graph_entries = wall_clock.seconds();
+
+ //--------------------------------
+ // Done with the temporary sets and arrays
+ wall_clock.reset();
+ phase = SORT_GRAPH_ENTRIES ;
+
+ row_total = UnsignedValue();
+ row_count = RowMapType();
+ row_map = RowMapType();
+ node_node_set.clear();
+
+ //--------------------------------
+
+ Kokkos::parallel_for( node_count , *this );
+
+ execution_space::fence();
+ results.sort_graph_entries = wall_clock.seconds();
+
+ //--------------------------------
+ // Element-to-graph mapping:
+ wall_clock.reset();
+ phase = FILL_ELEMENT_GRAPH ;
+ elem_graph = ElemGraphType("elem_graph", elem_node_id.dimension_0() );
+ Kokkos::parallel_for( elem_node_id.dimension_0() , *this );
+
+ execution_space::fence();
+ results.fill_element_graph = wall_clock.seconds();
+ }
+
+ //------------------------------------
+ // parallel_for: create map and count row length
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const TagFillNodeSet & , unsigned ielem , unsigned & count ) const
+ {
+ // Loop over element's (row_local_node,col_local_node) pairs:
+ for ( unsigned row_local_node = 0 ; row_local_node < elem_node_id.dimension_1() ; ++row_local_node ) {
+
+ const unsigned row_node = elem_node_id( ielem , row_local_node );
+
+ for ( unsigned col_local_node = row_local_node ; col_local_node < elem_node_id.dimension_1() ; ++col_local_node ) {
+
+ const unsigned col_node = elem_node_id( ielem , col_local_node );
+
+ // If either node is locally owned then insert the pair into the unordered map:
+
+ if ( row_node < row_count.dimension_0() || col_node < row_count.dimension_0() ) {
+
+ const key_type key = (row_node < col_node) ? make_pair( row_node, col_node ) : make_pair( col_node, row_node ) ;
+
+ const typename SetType::insert_result result = node_node_set.insert( key );
+
+ // A successfull insert: the first time this pair was added
+ if ( result.success() ) {
+
+ // If row node is owned then increment count
+ if ( row_node < row_count.dimension_0() ) { atomic_fetch_add( & row_count( row_node ) , 1 ); }
+
+ // If column node is owned and not equal to row node then increment count
+ if ( col_node < row_count.dimension_0() && col_node != row_node ) { atomic_fetch_add( & row_count( col_node ) , 1 ); }
+ }
+ else if ( result.failed() ) {
+ ++count ;
+ }
+ }
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void fill_graph_entries( const unsigned iset ) const
+ {
+ if ( node_node_set.valid_at(iset) ) {
+ // Add each entry to the graph entries.
+
+ const key_type key = node_node_set.key_at(iset) ;
+ const unsigned row_node = key.first ;
+ const unsigned col_node = key.second ;
+
+ if ( row_node < row_count.dimension_0() ) {
+ const unsigned offset = graph.row_map( row_node ) + atomic_fetch_add( & row_count( row_node ) , 1 );
+ graph.entries( offset ) = col_node ;
+ }
+
+ if ( col_node < row_count.dimension_0() && col_node != row_node ) {
+ const unsigned offset = graph.row_map( col_node ) + atomic_fetch_add( & row_count( col_node ) , 1 );
+ graph.entries( offset ) = row_node ;
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void sort_graph_entries( const unsigned irow ) const
+ {
+ const unsigned row_beg = graph.row_map( irow );
+ const unsigned row_end = graph.row_map( irow + 1 );
+ for ( unsigned i = row_beg + 1 ; i < row_end ; ++i ) {
+ const unsigned col = graph.entries(i);
+ unsigned j = i ;
+ for ( ; row_beg < j && col < graph.entries(j-1) ; --j ) {
+ graph.entries(j) = graph.entries(j-1);
+ }
+ graph.entries(j) = col ;
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void fill_elem_graph_map( const unsigned ielem ) const
+ {
+ for ( unsigned row_local_node = 0 ; row_local_node < elem_node_id.dimension_1() ; ++row_local_node ) {
+
+ const unsigned row_node = elem_node_id( ielem , row_local_node );
+
+ for ( unsigned col_local_node = 0 ; col_local_node < elem_node_id.dimension_1() ; ++col_local_node ) {
+
+ const unsigned col_node = elem_node_id( ielem , col_local_node );
+
+ unsigned entry = ~0u ;
+
+ if ( row_node + 1 < graph.row_map.dimension_0() ) {
+
+ const unsigned entry_end = graph.row_map( row_node + 1 );
+
+ entry = graph.row_map( row_node );
+
+ for ( ; entry < entry_end && graph.entries(entry) != col_node ; ++entry );
+
+ if ( entry == entry_end ) entry = ~0u ;
+ }
+
+ elem_graph( ielem , row_local_node , col_local_node ) = entry ;
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned iwork ) const
+ {
+/*
+ if ( phase == FILL_NODE_SET ) {
+ operator()( TagFillNodeSet() , iwork );
+ }
+ else */
+ if ( phase == FILL_GRAPH_ENTRIES ) {
+ fill_graph_entries( iwork );
+ }
+ else if ( phase == SORT_GRAPH_ENTRIES ) {
+ sort_graph_entries( iwork );
+ }
+ else if ( phase == FILL_ELEMENT_GRAPH ) {
+ fill_elem_graph_map( iwork );
+ }
+ }
+
+ //------------------------------------
+ // parallel_scan: row offsets
+
+ typedef unsigned value_type ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned irow , unsigned & update , const bool final ) const
+ {
+ // exclusive scan
+ if ( final ) { row_map( irow ) = update ; }
+
+ update += row_count( irow );
+
+ if ( final ) {
+ if ( irow + 1 == row_count.dimension_0() ) {
+ row_map( irow + 1 ) = update ;
+ row_total() = update ;
+ }
+ }
+ }
+
+ // For the reduce phase:
+ KOKKOS_INLINE_FUNCTION
+ void init( const TagFillNodeSet & , unsigned & update ) const { update = 0 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ void join( const TagFillNodeSet &
+ , volatile unsigned & update
+ , volatile const unsigned & input ) const { update += input ; }
+
+ // For the scan phase::
+ KOKKOS_INLINE_FUNCTION
+ void init( unsigned & update ) const { update = 0 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ void join( volatile unsigned & update
+ , volatile const unsigned & input ) const { update += input ; }
+
+ //------------------------------------
+};
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+template< class ElemCompType >
+class NodeElemGatherFill {
+public:
+
+ typedef typename ElemCompType::execution_space execution_space ;
+ typedef typename ElemCompType::vector_type vector_type ;
+ typedef typename ElemCompType::sparse_matrix_type sparse_matrix_type ;
+ typedef typename ElemCompType::elem_node_type elem_node_type ;
+ typedef typename ElemCompType::elem_vectors_type elem_vectors_type ;
+ typedef typename ElemCompType::elem_matrices_type elem_matrices_type ;
+ typedef typename ElemCompType::elem_graph_type elem_graph_type ;
+
+ static const unsigned ElemNodeCount = ElemCompType::ElemNodeCount ;
+
+ //------------------------------------
+
+private:
+
+ typedef Kokkos::StaticCrsGraph< unsigned[2] , execution_space > CrsGraphType ;
+ typedef typename CrsGraphType::row_map_type::non_const_type RowMapType ;
+ typedef Kokkos::View< unsigned , execution_space > UnsignedValue ;
+
+ enum PhaseType { FILL_NODE_COUNT ,
+ SCAN_NODE_COUNT ,
+ FILL_GRAPH_ENTRIES ,
+ SORT_GRAPH_ENTRIES ,
+ GATHER_FILL };
+
+ const elem_node_type elem_node_id ;
+ const elem_graph_type elem_graph ;
+ UnsignedValue row_total ;
+ RowMapType row_count ;
+ RowMapType row_map ;
+ CrsGraphType graph ;
+ vector_type residual ;
+ sparse_matrix_type jacobian ;
+ elem_vectors_type elem_residual ;
+ elem_matrices_type elem_jacobian ;
+ PhaseType phase ;
+
+public:
+
+ NodeElemGatherFill()
+ : elem_node_id()
+ , elem_graph()
+ , row_total()
+ , row_count()
+ , row_map()
+ , graph()
+ , residual()
+ , jacobian()
+ , elem_residual()
+ , elem_jacobian()
+ , phase( FILL_NODE_COUNT )
+ {}
+
+ NodeElemGatherFill( const NodeElemGatherFill & rhs )
+ : elem_node_id( rhs.elem_node_id )
+ , elem_graph( rhs.elem_graph )
+ , row_total( rhs.row_total )
+ , row_count( rhs.row_count )
+ , row_map( rhs.row_map )
+ , graph( rhs.graph )
+ , residual( rhs.residual )
+ , jacobian( rhs.jacobian )
+ , elem_residual( rhs.elem_residual )
+ , elem_jacobian( rhs.elem_jacobian )
+ , phase( rhs.phase )
+ {}
+
+ NodeElemGatherFill( const elem_node_type & arg_elem_node_id ,
+ const elem_graph_type & arg_elem_graph ,
+ const vector_type & arg_residual ,
+ const sparse_matrix_type & arg_jacobian ,
+ const elem_vectors_type & arg_elem_residual ,
+ const elem_matrices_type & arg_elem_jacobian )
+ : elem_node_id( arg_elem_node_id )
+ , elem_graph( arg_elem_graph )
+ , row_total( "row_total" )
+ , row_count( "row_count" , arg_residual.dimension_0() )
+ , row_map( "graph_row_map" , arg_residual.dimension_0() + 1 )
+ , graph()
+ , residual( arg_residual )
+ , jacobian( arg_jacobian )
+ , elem_residual( arg_elem_residual )
+ , elem_jacobian( arg_elem_jacobian )
+ , phase( FILL_NODE_COUNT )
+ {
+ //--------------------------------
+ // Count node->element relations
+
+ phase = FILL_NODE_COUNT ;
+
+ Kokkos::parallel_for( elem_node_id.dimension_0() , *this );
+
+ //--------------------------------
+
+ phase = SCAN_NODE_COUNT ;
+
+ // Exclusive scan of row_count into row_map
+ // including the final total in the 'node_count + 1' position.
+ // Zero the 'row_count' values.
+ Kokkos::parallel_scan( residual.dimension_0() , *this );
+
+ // Zero the row count for the fill:
+ Kokkos::deep_copy( row_count , typename RowMapType::value_type(0) );
+
+ unsigned graph_entry_count = 0 ;
+
+ Kokkos::deep_copy( graph_entry_count , row_total );
+
+ // Assign graph's row_map and allocate graph's entries
+ graph.row_map = row_map ;
+
+ typedef typename CrsGraphType::entries_type graph_entries_type ;
+
+ graph.entries = graph_entries_type( "graph_entries" , graph_entry_count );
+
+ //--------------------------------
+ // Fill graph's entries from the (node,node) set.
+
+ phase = FILL_GRAPH_ENTRIES ;
+
+ Kokkos::deep_copy( row_count , 0u );
+ Kokkos::parallel_for( elem_node_id.dimension_0() , *this );
+
+ execution_space::fence();
+
+ //--------------------------------
+ // Done with the temporary sets and arrays
+
+ row_total = UnsignedValue();
+ row_count = RowMapType();
+ row_map = RowMapType();
+
+ //--------------------------------
+
+ phase = SORT_GRAPH_ENTRIES ;
+ Kokkos::parallel_for( residual.dimension_0() , *this );
+
+ execution_space::fence();
+
+ phase = GATHER_FILL ;
+ }
+
+ void apply() const
+ {
+ Kokkos::parallel_for( residual.dimension_0() , *this );
+ }
+
+ //------------------------------------
+ //------------------------------------
+ // parallel_for: Count node->element pairs
+
+ KOKKOS_INLINE_FUNCTION
+ void fill_node_count( const unsigned ielem ) const
+ {
+ for ( unsigned row_local_node = 0 ; row_local_node < elem_node_id.dimension_1() ; ++row_local_node ) {
+
+ const unsigned row_node = elem_node_id( ielem , row_local_node );
+
+ if ( row_node < row_count.dimension_0() ) {
+ atomic_fetch_add( & row_count( row_node ) , 1 );
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void fill_graph_entries( const unsigned ielem ) const
+ {
+ for ( unsigned row_local_node = 0 ; row_local_node < elem_node_id.dimension_1() ; ++row_local_node ) {
+
+ const unsigned row_node = elem_node_id( ielem , row_local_node );
+
+ if ( row_node < row_count.dimension_0() ) {
+
+ const unsigned offset = graph.row_map( row_node ) + atomic_fetch_add( & row_count( row_node ) , 1 );
+
+ graph.entries( offset , 0 ) = ielem ;
+ graph.entries( offset , 1 ) = row_local_node ;
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void sort_graph_entries( const unsigned irow ) const
+ {
+ const unsigned row_beg = graph.row_map( irow );
+ const unsigned row_end = graph.row_map( irow + 1 );
+ for ( unsigned i = row_beg + 1 ; i < row_end ; ++i ) {
+ const unsigned elem = graph.entries(i,0);
+ const unsigned local = graph.entries(i,1);
+ unsigned j = i ;
+ for ( ; row_beg < j && elem < graph.entries(j-1,0) ; --j ) {
+ graph.entries(j,0) = graph.entries(j-1,0);
+ graph.entries(j,1) = graph.entries(j-1,1);
+ }
+ graph.entries(j,0) = elem ;
+ graph.entries(j,1) = local ;
+ }
+ }
+
+ //------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void gather_fill( const unsigned irow ) const
+ {
+ const unsigned node_elem_begin = graph.row_map(irow);
+ const unsigned node_elem_end = graph.row_map(irow+1);
+
+ // for each element that a node belongs to
+
+ for ( unsigned i = node_elem_begin ; i < node_elem_end ; i++ ) {
+
+ const unsigned elem_id = graph.entries( i, 0);
+ const unsigned row_index = graph.entries( i, 1);
+
+ residual(irow) += elem_residual(elem_id, row_index);
+
+ // for each node in a particular related element
+ // gather the contents of the element stiffness
+ // matrix that belong in irow
+
+ for ( unsigned j = 0 ; j < ElemNodeCount ; ++j ) {
+ const unsigned A_index = elem_graph( elem_id , row_index , j );
+
+ jacobian.coeff( A_index ) += elem_jacobian( elem_id, row_index, j );
+ }
+ }
+ }
+
+ //------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned iwork ) const
+ {
+ if ( phase == FILL_NODE_COUNT ) {
+ fill_node_count( iwork );
+ }
+ else if ( phase == FILL_GRAPH_ENTRIES ) {
+ fill_graph_entries( iwork );
+ }
+ else if ( phase == SORT_GRAPH_ENTRIES ) {
+ sort_graph_entries( iwork );
+ }
+ else if ( phase == GATHER_FILL ) {
+ gather_fill( iwork );
+ }
+ }
+
+ //------------------------------------
+ // parallel_scan: row offsets
+
+ typedef unsigned value_type ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned irow , unsigned & update , const bool final ) const
+ {
+ // exclusive scan
+ if ( final ) { row_map( irow ) = update ; }
+
+ update += row_count( irow );
+
+ if ( final ) {
+ if ( irow + 1 == row_count.dimension_0() ) {
+ row_map( irow + 1 ) = update ;
+ row_total() = update ;
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void init( unsigned & update ) const { update = 0 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ void join( volatile unsigned & update , const volatile unsigned & input ) const { update += input ; }
+};
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+template< class FiniteElementMeshType , class SparseMatrixType >
+class ElementComputation ;
+
+
+template< class ExecSpace , BoxElemPart::ElemOrder Order , class CoordinateMap , typename ScalarType >
+class ElementComputation<
+ Kokkos::Example::BoxElemFixture< ExecSpace , Order , CoordinateMap > ,
+ Kokkos::Example::CrsMatrix< ScalarType , ExecSpace > >
+{
+public:
+
+ typedef Kokkos::Example::BoxElemFixture< ExecSpace, Order, CoordinateMap > mesh_type ;
+ typedef Kokkos::Example::HexElement_Data< mesh_type::ElemNode > element_data_type ;
+
+ typedef Kokkos::Example::CrsMatrix< ScalarType , ExecSpace > sparse_matrix_type ;
+ typedef typename sparse_matrix_type::StaticCrsGraphType sparse_graph_type ;
+
+ typedef ExecSpace execution_space ;
+ typedef ScalarType scalar_type ;
+
+ static const unsigned SpatialDim = element_data_type::spatial_dimension ;
+ static const unsigned TensorDim = SpatialDim * SpatialDim ;
+ static const unsigned ElemNodeCount = element_data_type::element_node_count ;
+ static const unsigned FunctionCount = element_data_type::function_count ;
+ static const unsigned IntegrationCount = element_data_type::integration_count ;
+
+ //------------------------------------
+
+ typedef typename mesh_type::node_coord_type node_coord_type ;
+ typedef typename mesh_type::elem_node_type elem_node_type ;
+ typedef Kokkos::View< scalar_type*[FunctionCount][FunctionCount] , execution_space > elem_matrices_type ;
+ typedef Kokkos::View< scalar_type*[FunctionCount] , execution_space > elem_vectors_type ;
+ typedef Kokkos::View< scalar_type* , execution_space > vector_type ;
+
+ typedef typename NodeNodeGraph< elem_node_type , sparse_graph_type , ElemNodeCount >::ElemGraphType elem_graph_type ;
+
+ //------------------------------------
+
+
+ //------------------------------------
+ // Computational data:
+
+ const element_data_type elem_data ;
+ const elem_node_type elem_node_ids ;
+ const node_coord_type node_coords ;
+ const elem_graph_type elem_graph ;
+ const elem_matrices_type elem_jacobians ;
+ const elem_vectors_type elem_residuals ;
+ const vector_type solution ;
+ const vector_type residual ;
+ const sparse_matrix_type jacobian ;
+ const scalar_type coeff_K ;
+
+ ElementComputation( const ElementComputation & rhs )
+ : elem_data()
+ , elem_node_ids( rhs.elem_node_ids )
+ , node_coords( rhs.node_coords )
+ , elem_graph( rhs.elem_graph )
+ , elem_jacobians( rhs.elem_jacobians )
+ , elem_residuals( rhs.elem_residuals )
+ , solution( rhs.solution )
+ , residual( rhs.residual )
+ , jacobian( rhs.jacobian )
+ , coeff_K( rhs.coeff_K )
+ {}
+
+ // If the element->sparse_matrix graph is provided then perform atomic updates
+ // Otherwise fill per-element contributions for subequent gather-add into a residual and jacobian.
+ ElementComputation( const mesh_type & arg_mesh ,
+ const scalar_type arg_coeff_K ,
+ const vector_type & arg_solution ,
+ const elem_graph_type & arg_elem_graph ,
+ const sparse_matrix_type & arg_jacobian ,
+ const vector_type & arg_residual )
+ : elem_data()
+ , elem_node_ids( arg_mesh.elem_node() )
+ , node_coords( arg_mesh.node_coord() )
+ , elem_graph( arg_elem_graph )
+ , elem_jacobians()
+ , elem_residuals()
+ , solution( arg_solution )
+ , residual( arg_residual )
+ , jacobian( arg_jacobian )
+ , coeff_K( arg_coeff_K )
+ {}
+
+ ElementComputation( const mesh_type & arg_mesh ,
+ const scalar_type arg_coeff_K ,
+ const vector_type & arg_solution )
+ : elem_data()
+ , elem_node_ids( arg_mesh.elem_node() )
+ , node_coords( arg_mesh.node_coord() )
+ , elem_graph()
+ , elem_jacobians( "elem_jacobians" , arg_mesh.elem_count() )
+ , elem_residuals( "elem_residuals" , arg_mesh.elem_count() )
+ , solution( arg_solution )
+ , residual()
+ , jacobian()
+ , coeff_K( arg_coeff_K )
+ {}
+
+ //------------------------------------
+
+ void apply() const
+ {
+ parallel_for( elem_node_ids.dimension_0() , *this );
+ }
+
+ //------------------------------------
+
+ static const unsigned FLOPS_transform_gradients =
+ /* Jacobian */ FunctionCount * TensorDim * 2 +
+ /* Inverse jacobian */ TensorDim * 6 + 6 +
+ /* Gradient transform */ FunctionCount * 15 ;
+
+ KOKKOS_INLINE_FUNCTION
+ float transform_gradients(
+ const float grad[][ FunctionCount ] , // Gradient of bases master element
+ const double x[] ,
+ const double y[] ,
+ const double z[] ,
+ float dpsidx[] ,
+ float dpsidy[] ,
+ float dpsidz[] ) const
+ {
+ enum { j11 = 0 , j12 = 1 , j13 = 2 ,
+ j21 = 3 , j22 = 4 , j23 = 5 ,
+ j31 = 6 , j32 = 7 , j33 = 8 };
+
+ // Jacobian accumulation:
+
+ double J[ TensorDim ] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ for( unsigned i = 0; i < FunctionCount ; ++i ) {
+ const double x1 = x[i] ;
+ const double x2 = y[i] ;
+ const double x3 = z[i] ;
+
+ const float g1 = grad[0][i] ;
+ const float g2 = grad[1][i] ;
+ const float g3 = grad[2][i] ;
+
+ J[j11] += g1 * x1 ;
+ J[j12] += g1 * x2 ;
+ J[j13] += g1 * x3 ;
+
+ J[j21] += g2 * x1 ;
+ J[j22] += g2 * x2 ;
+ J[j23] += g2 * x3 ;
+
+ J[j31] += g3 * x1 ;
+ J[j32] += g3 * x2 ;
+ J[j33] += g3 * x3 ;
+ }
+
+ // Inverse jacobian:
+
+ float invJ[ TensorDim ] = {
+ static_cast<float>( J[j22] * J[j33] - J[j23] * J[j32] ) ,
+ static_cast<float>( J[j13] * J[j32] - J[j12] * J[j33] ) ,
+ static_cast<float>( J[j12] * J[j23] - J[j13] * J[j22] ) ,
+
+ static_cast<float>( J[j23] * J[j31] - J[j21] * J[j33] ) ,
+ static_cast<float>( J[j11] * J[j33] - J[j13] * J[j31] ) ,
+ static_cast<float>( J[j13] * J[j21] - J[j11] * J[j23] ) ,
+
+ static_cast<float>( J[j21] * J[j32] - J[j22] * J[j31] ) ,
+ static_cast<float>( J[j12] * J[j31] - J[j11] * J[j32] ) ,
+ static_cast<float>( J[j11] * J[j22] - J[j12] * J[j21] ) };
+
+ const float detJ = J[j11] * invJ[j11] +
+ J[j21] * invJ[j12] +
+ J[j31] * invJ[j13] ;
+
+ const float detJinv = 1.0 / detJ ;
+
+ for ( unsigned i = 0 ; i < TensorDim ; ++i ) { invJ[i] *= detJinv ; }
+
+ // Transform gradients:
+
+ for( unsigned i = 0; i < FunctionCount ; ++i ) {
+ const float g0 = grad[0][i];
+ const float g1 = grad[1][i];
+ const float g2 = grad[2][i];
+
+ dpsidx[i] = g0 * invJ[j11] + g1 * invJ[j12] + g2 * invJ[j13];
+ dpsidy[i] = g0 * invJ[j21] + g1 * invJ[j22] + g2 * invJ[j23];
+ dpsidz[i] = g0 * invJ[j31] + g1 * invJ[j32] + g2 * invJ[j33];
+ }
+
+ return detJ ;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void contributeResidualJacobian(
+ const float coeff_k ,
+ const double dof_values[] ,
+ const float dpsidx[] ,
+ const float dpsidy[] ,
+ const float dpsidz[] ,
+ const float detJ ,
+ const float integ_weight ,
+ const float bases_vals[] ,
+ double elem_res[] ,
+ double elem_mat[][ FunctionCount ] ) const
+ {
+ double value_at_pt = 0 ;
+ double gradx_at_pt = 0 ;
+ double grady_at_pt = 0 ;
+ double gradz_at_pt = 0 ;
+
+ for ( unsigned m = 0 ; m < FunctionCount ; m++ ) {
+ value_at_pt += dof_values[m] * bases_vals[m] ;
+ gradx_at_pt += dof_values[m] * dpsidx[m] ;
+ grady_at_pt += dof_values[m] * dpsidy[m] ;
+ gradz_at_pt += dof_values[m] * dpsidz[m] ;
+ }
+
+ const scalar_type k_detJ_weight = coeff_k * detJ * integ_weight ;
+ const double res_val = value_at_pt * value_at_pt * detJ * integ_weight ;
+ const double mat_val = 2.0 * value_at_pt * detJ * integ_weight ;
+
+ // $$ R_i = \int_{\Omega} \nabla \phi_i \cdot (k \nabla T) + \phi_i T^2 d \Omega $$
+ // $$ J_{i,j} = \frac{\partial R_i}{\partial T_j} = \int_{\Omega} k \nabla \phi_i \cdot \nabla \phi_j + 2 \phi_i \phi_j T d \Omega $$
+
+ for ( unsigned m = 0; m < FunctionCount; ++m) {
+ double * const mat = elem_mat[m] ;
+ const float bases_val_m = bases_vals[m];
+ const float dpsidx_m = dpsidx[m] ;
+ const float dpsidy_m = dpsidy[m] ;
+ const float dpsidz_m = dpsidz[m] ;
+
+ elem_res[m] += k_detJ_weight * ( dpsidx_m * gradx_at_pt +
+ dpsidy_m * grady_at_pt +
+ dpsidz_m * gradz_at_pt ) +
+ res_val * bases_val_m ;
+
+ for( unsigned n = 0; n < FunctionCount; n++) {
+
+ mat[n] += k_detJ_weight * ( dpsidx_m * dpsidx[n] +
+ dpsidy_m * dpsidy[n] +
+ dpsidz_m * dpsidz[n] ) +
+ mat_val * bases_val_m * bases_vals[n];
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned ielem ) const
+ {
+ // Gather nodal coordinates and solution vector:
+
+ double x[ FunctionCount ] ;
+ double y[ FunctionCount ] ;
+ double z[ FunctionCount ] ;
+ double val[ FunctionCount ] ;
+ unsigned node_index[ ElemNodeCount ];
+
+ for ( unsigned i = 0 ; i < ElemNodeCount ; ++i ) {
+ const unsigned ni = elem_node_ids( ielem , i );
+
+ node_index[i] = ni ;
+
+ x[i] = node_coords( ni , 0 );
+ y[i] = node_coords( ni , 1 );
+ z[i] = node_coords( ni , 2 );
+
+ val[i] = solution( ni );
+ }
+
+
+ double elem_vec[ FunctionCount ] ;
+ double elem_mat[ FunctionCount ][ FunctionCount ] ;
+
+ for( unsigned i = 0; i < FunctionCount ; i++ ) {
+ elem_vec[i] = 0 ;
+ for( unsigned j = 0; j < FunctionCount ; j++){
+ elem_mat[i][j] = 0 ;
+ }
+ }
+
+
+ for ( unsigned i = 0 ; i < IntegrationCount ; ++i ) {
+ float dpsidx[ FunctionCount ] ;
+ float dpsidy[ FunctionCount ] ;
+ float dpsidz[ FunctionCount ] ;
+
+ const float detJ =
+ transform_gradients( elem_data.gradients[i] , x , y , z ,
+ dpsidx , dpsidy , dpsidz );
+
+ contributeResidualJacobian( coeff_K ,
+ val , dpsidx , dpsidy , dpsidz ,
+ detJ ,
+ elem_data.weights[i] ,
+ elem_data.values[i] ,
+ elem_vec , elem_mat );
+ }
+
+#if 0
+
+if ( 1 == ielem ) {
+ printf("ElemResidual { %f %f %f %f %f %f %f %f }\n",
+ elem_vec[0], elem_vec[1], elem_vec[2], elem_vec[3],
+ elem_vec[4], elem_vec[5], elem_vec[6], elem_vec[7]);
+
+ printf("ElemJacobian {\n");
+
+ for ( unsigned j = 0 ; j < FunctionCount ; ++j ) {
+ printf(" { %f %f %f %f %f %f %f %f }\n",
+ elem_mat[j][0], elem_mat[j][1], elem_mat[j][2], elem_mat[j][3],
+ elem_mat[j][4], elem_mat[j][5], elem_mat[j][6], elem_mat[j][7]);
+ }
+ printf("}\n");
+}
+
+#endif
+
+ if ( ! residual.dimension_0() ) {
+ for( unsigned i = 0; i < FunctionCount ; i++){
+ elem_residuals(ielem, i) = elem_vec[i] ;
+ for( unsigned j = 0; j < FunctionCount ; j++){
+ elem_jacobians(ielem, i, j) = elem_mat[i][j] ;
+ }
+ }
+ }
+ else {
+ for( unsigned i = 0 ; i < FunctionCount ; i++ ) {
+ const unsigned row = node_index[i] ;
+ if ( row < residual.dimension_0() ) {
+ atomic_fetch_add( & residual( row ) , elem_vec[i] );
+
+ for( unsigned j = 0 ; j < FunctionCount ; j++ ) {
+ const unsigned entry = elem_graph( ielem , i , j );
+ if ( entry != ~0u ) {
+ atomic_fetch_add( & jacobian.coeff( entry ) , elem_mat[i][j] );
+ }
+ }
+ }
+ }
+ }
+ }
+}; /* ElementComputation */
+
+//----------------------------------------------------------------------------
+
+template< class FixtureType , class SparseMatrixType >
+class DirichletComputation ;
+
+template< class ExecSpace , BoxElemPart::ElemOrder Order , class CoordinateMap , typename ScalarType >
+class DirichletComputation<
+ Kokkos::Example::BoxElemFixture< ExecSpace , Order , CoordinateMap > ,
+ Kokkos::Example::CrsMatrix< ScalarType , ExecSpace > >
+{
+public:
+
+ typedef Kokkos::Example::BoxElemFixture< ExecSpace, Order, CoordinateMap > mesh_type ;
+ typedef typename mesh_type::node_coord_type node_coord_type ;
+ typedef typename node_coord_type::value_type scalar_coord_type ;
+
+ typedef Kokkos::Example::CrsMatrix< ScalarType , ExecSpace > sparse_matrix_type ;
+ typedef typename sparse_matrix_type::StaticCrsGraphType sparse_graph_type ;
+
+ typedef ExecSpace execution_space ;
+ typedef ScalarType scalar_type ;
+
+ //------------------------------------
+
+ typedef Kokkos::View< scalar_type* , execution_space > vector_type ;
+
+ //------------------------------------
+ // Computational data:
+
+ const node_coord_type node_coords ;
+ const vector_type solution ;
+ const sparse_matrix_type jacobian ;
+ const vector_type residual ;
+ const scalar_type bc_lower_value ;
+ const scalar_type bc_upper_value ;
+ const scalar_coord_type bc_lower_limit ;
+ const scalar_coord_type bc_upper_limit ;
+ const unsigned bc_plane ;
+ const unsigned node_count ;
+ bool init ;
+
+
+ DirichletComputation( const mesh_type & arg_mesh ,
+ const vector_type & arg_solution ,
+ const sparse_matrix_type & arg_jacobian ,
+ const vector_type & arg_residual ,
+ const unsigned arg_bc_plane ,
+ const scalar_type arg_bc_lower_value ,
+ const scalar_type arg_bc_upper_value )
+ : node_coords( arg_mesh.node_coord() )
+ , solution( arg_solution )
+ , jacobian( arg_jacobian )
+ , residual( arg_residual )
+ , bc_lower_value( arg_bc_lower_value )
+ , bc_upper_value( arg_bc_upper_value )
+ , bc_lower_limit( std::numeric_limits<scalar_coord_type>::epsilon() )
+ , bc_upper_limit( scalar_coord_type(1) - std::numeric_limits<scalar_coord_type>::epsilon() )
+ , bc_plane( arg_bc_plane )
+ , node_count( arg_mesh.node_count_owned() )
+ , init( false )
+ {
+ parallel_for( node_count , *this );
+ init = true ;
+ }
+
+ void apply() const
+ {
+ parallel_for( node_count , *this );
+ }
+
+ //------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned inode ) const
+ {
+ // Apply dirichlet boundary condition on the Solution and Residual vectors.
+ // To maintain the symmetry of the original global stiffness matrix,
+ // zero out the columns that correspond to boundary conditions, and
+ // update the residual vector accordingly
+
+ const unsigned iBeg = jacobian.graph.row_map[inode];
+ const unsigned iEnd = jacobian.graph.row_map[inode+1];
+
+ const scalar_coord_type c = node_coords(inode,bc_plane);
+ const bool bc_lower = c <= bc_lower_limit ;
+ const bool bc_upper = bc_upper_limit <= c ;
+
+ if ( ! init ) {
+ solution(inode) = bc_lower ? bc_lower_value : (
+ bc_upper ? bc_upper_value : 0 );
+ }
+ else {
+ if ( bc_lower || bc_upper ) {
+
+ residual(inode) = 0 ;
+
+ // zero each value on the row, and leave a one
+ // on the diagonal
+
+ for( unsigned i = iBeg ; i < iEnd ; ++i ) {
+ jacobian.coeff(i) = int(inode) == int(jacobian.graph.entries(i)) ? 1 : 0 ;
+ }
+ }
+ else {
+
+ // Find any columns that are boundary conditions.
+ // Clear them and adjust the residual vector
+
+ for( unsigned i = iBeg ; i < iEnd ; ++i ) {
+ const unsigned cnode = jacobian.graph.entries(i) ;
+ const scalar_coord_type cc = node_coords(cnode,bc_plane);
+
+ if ( ( cc <= bc_lower_limit ) || ( bc_upper_limit <= cc ) ) {
+ jacobian.coeff(i) = 0 ;
+ }
+ }
+ }
+ }
+ }
+};
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+/* A Cuda-specific specialization for the element computation functor. */
+#if defined( __CUDACC__ )
+// #include <NonlinearElement_Cuda.hpp>
+#endif
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_EXAMPLE_FENLFUNCTORS_HPP */
+
diff --git a/lib/kokkos/example/fenl/fenl_impl.hpp b/lib/kokkos/example/fenl/fenl_impl.hpp
new file mode 100644
index 000000000..9c57da298
--- /dev/null
+++ b/lib/kokkos/example/fenl/fenl_impl.hpp
@@ -0,0 +1,598 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_FENL_IMPL_HPP
+#define KOKKOS_EXAMPLE_FENL_IMPL_HPP
+
+#include <math.h>
+
+// Kokkos libraries' headers:
+
+#include <Kokkos_UnorderedMap.hpp>
+#include <Kokkos_StaticCrsGraph.hpp>
+#include <impl/Kokkos_Timer.hpp>
+
+// Examples headers:
+
+#include <BoxElemFixture.hpp>
+#include <VectorImport.hpp>
+#include <CGSolve.hpp>
+
+#include <fenl.hpp>
+#include <fenl_functors.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+inline
+double maximum( MPI_Comm comm , double local )
+{
+ double global = local ;
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Allreduce( & local , & global , 1 , MPI_DOUBLE , MPI_MAX , comm );
+#endif
+ return global ;
+}
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+class ManufacturedSolution {
+public:
+
+ // Manufactured solution for one dimensional nonlinear PDE
+ //
+ // -K T_zz + T^2 = 0 ; T(zmin) = T_zmin ; T(zmax) = T_zmax
+ //
+ // Has an analytic solution of the form:
+ //
+ // T(z) = ( a ( z - zmin ) + b )^(-2) where K = 1 / ( 6 a^2 )
+ //
+ // Given T_0 and T_L compute K for this analytic solution.
+ //
+ // Two analytic solutions:
+ //
+ // Solution with singularity:
+ // , a( ( 1.0 / sqrt(T_zmax) + 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ // , b( -1.0 / sqrt(T_zmin) )
+ //
+ // Solution without singularity:
+ // , a( ( 1.0 / sqrt(T_zmax) - 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ // , b( 1.0 / sqrt(T_zmin) )
+
+ const double zmin ;
+ const double zmax ;
+ const double T_zmin ;
+ const double T_zmax ;
+ const double a ;
+ const double b ;
+ const double K ;
+
+ ManufacturedSolution( const double arg_zmin ,
+ const double arg_zmax ,
+ const double arg_T_zmin ,
+ const double arg_T_zmax )
+ : zmin( arg_zmin )
+ , zmax( arg_zmax )
+ , T_zmin( arg_T_zmin )
+ , T_zmax( arg_T_zmax )
+ , a( ( 1.0 / sqrt(T_zmax) - 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ , b( 1.0 / sqrt(T_zmin) )
+ , K( 1.0 / ( 6.0 * a * a ) )
+ {}
+
+ double operator()( const double z ) const
+ {
+ const double tmp = a * ( z - zmin ) + b ;
+ return 1.0 / ( tmp * tmp );
+ }
+};
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+namespace FENL {
+
+template < class Space , BoxElemPart::ElemOrder ElemOrder >
+Perf fenl(
+ MPI_Comm comm ,
+ const int use_print ,
+ const int use_trials ,
+ const int use_atomic ,
+ const int use_elems[] )
+{
+ typedef Kokkos::Example::BoxElemFixture< Space , ElemOrder > FixtureType ;
+
+ typedef Kokkos::Example::CrsMatrix< double , Space >
+ SparseMatrixType ;
+
+ typedef typename SparseMatrixType::StaticCrsGraphType
+ SparseGraphType ;
+
+ typedef Kokkos::Example::FENL::NodeNodeGraph< typename FixtureType::elem_node_type , SparseGraphType , FixtureType::ElemNode >
+ NodeNodeGraphType ;
+
+ typedef Kokkos::Example::FENL::ElementComputation< FixtureType , SparseMatrixType >
+ ElementComputationType ;
+
+ typedef Kokkos::Example::FENL::DirichletComputation< FixtureType , SparseMatrixType >
+ DirichletComputationType ;
+
+ typedef NodeElemGatherFill< ElementComputationType >
+ NodeElemGatherFillType ;
+
+ typedef typename ElementComputationType::vector_type VectorType ;
+
+ typedef Kokkos::Example::VectorImport<
+ typename FixtureType::comm_list_type ,
+ typename FixtureType::send_nodeid_type ,
+ VectorType > ImportType ;
+
+ //------------------------------------
+
+ const unsigned newton_iteration_limit = 10 ;
+ const double newton_iteration_tolerance = 1e-7 ;
+ const unsigned cg_iteration_limit = 200 ;
+ const double cg_iteration_tolerance = 1e-7 ;
+
+ //------------------------------------
+
+ const int print_flag = use_print && Kokkos::Impl::is_same< Kokkos::HostSpace , typename Space::memory_space >::value ;
+
+ int comm_rank ;
+ int comm_size ;
+
+ MPI_Comm_rank( comm , & comm_rank );
+ MPI_Comm_size( comm , & comm_size );
+
+ // Decompose by node to avoid mpi-communication for assembly
+
+ const float bubble_x = 1.0 ;
+ const float bubble_y = 1.0 ;
+ const float bubble_z = 1.0 ;
+
+ const FixtureType fixture( BoxElemPart::DecomposeNode , comm_size , comm_rank ,
+ use_elems[0] , use_elems[1] , use_elems[2] ,
+ bubble_x , bubble_y , bubble_z );
+
+
+ {
+ int global_error = ! fixture.ok();
+
+#if defined( KOKKOS_HAVE_MPI )
+ int local_error = global_error ;
+ global_error = 0 ;
+ MPI_Allreduce( & local_error , & global_error , 1 , MPI_INT , MPI_SUM , comm );
+#endif
+
+ if ( global_error ) {
+ throw std::runtime_error(std::string("Error generating finite element fixture"));
+ }
+ }
+
+ //------------------------------------
+
+ const ImportType comm_nodal_import(
+ comm ,
+ fixture.recv_node() ,
+ fixture.send_node() ,
+ fixture.send_nodeid() ,
+ fixture.node_count_owned() ,
+ fixture.node_count() - fixture.node_count_owned() );
+
+ //------------------------------------
+
+ const double bc_lower_value = 1 ;
+ const double bc_upper_value = 2 ;
+
+ const Kokkos::Example::FENL::ManufacturedSolution
+ manufactured_solution( 0 , 1 , bc_lower_value , bc_upper_value );
+
+ //------------------------------------
+
+ for ( int k = 0 ; k < comm_size && use_print ; ++k ) {
+ if ( k == comm_rank ) {
+ typename FixtureType::node_grid_type::HostMirror
+ h_node_grid = Kokkos::create_mirror_view( fixture.node_grid() );
+
+ typename FixtureType::node_coord_type::HostMirror
+ h_node_coord = Kokkos::create_mirror_view( fixture.node_coord() );
+
+ typename FixtureType::elem_node_type::HostMirror
+ h_elem_node = Kokkos::create_mirror_view( fixture.elem_node() );
+
+ Kokkos::deep_copy( h_node_grid , fixture.node_grid() );
+ Kokkos::deep_copy( h_node_coord , fixture.node_coord() );
+ Kokkos::deep_copy( h_elem_node , fixture.elem_node() );
+
+ std::cout << "MPI[" << comm_rank << "]" << std::endl ;
+ std::cout << "Node grid {" ;
+ for ( unsigned inode = 0 ; inode < fixture.node_count() ; ++inode ) {
+ std::cout << " (" << h_node_grid(inode,0)
+ << "," << h_node_grid(inode,1)
+ << "," << h_node_grid(inode,2)
+ << ")" ;
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "Node coord {" ;
+ for ( unsigned inode = 0 ; inode < fixture.node_count() ; ++inode ) {
+ std::cout << " (" << h_node_coord(inode,0)
+ << "," << h_node_coord(inode,1)
+ << "," << h_node_coord(inode,2)
+ << ")" ;
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "Manufactured solution"
+ << " a[" << manufactured_solution.a << "]"
+ << " b[" << manufactured_solution.b << "]"
+ << " K[" << manufactured_solution.K << "]"
+ << " {" ;
+ for ( unsigned inode = 0 ; inode < fixture.node_count() ; ++inode ) {
+ std::cout << " " << manufactured_solution( h_node_coord( inode , 2 ) );
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "ElemNode {" << std::endl ;
+ for ( unsigned ielem = 0 ; ielem < fixture.elem_count() ; ++ielem ) {
+ std::cout << " elem[" << ielem << "]{" ;
+ for ( unsigned inode = 0 ; inode < FixtureType::ElemNode ; ++inode ) {
+ std::cout << " " << h_elem_node(ielem,inode);
+ }
+ std::cout << " }{" ;
+ for ( unsigned inode = 0 ; inode < FixtureType::ElemNode ; ++inode ) {
+ std::cout << " (" << h_node_grid(h_elem_node(ielem,inode),0)
+ << "," << h_node_grid(h_elem_node(ielem,inode),1)
+ << "," << h_node_grid(h_elem_node(ielem,inode),2)
+ << ")" ;
+ }
+ std::cout << " }" << std::endl ;
+ }
+ std::cout << "}" << std::endl ;
+ }
+ std::cout.flush();
+ MPI_Barrier( comm );
+ }
+
+ //------------------------------------
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ Perf perf_stats = Perf() ;
+
+ for ( int itrial = 0 ; itrial < use_trials ; ++itrial ) {
+
+ Perf perf = Perf() ;
+
+ perf.global_elem_count = fixture.elem_count_global();
+ perf.global_node_count = fixture.node_count_global();
+
+ //----------------------------------
+ // Create the sparse matrix graph and element-to-graph map
+ // from the element->to->node identifier array.
+ // The graph only has rows for the owned nodes.
+
+ typename NodeNodeGraphType::Times graph_times;
+
+ const NodeNodeGraphType
+ mesh_to_graph( fixture.elem_node() , fixture.node_count_owned(), graph_times );
+
+ perf.map_ratio = maximum(comm, graph_times.ratio);
+ perf.fill_node_set = maximum(comm, graph_times.fill_node_set);
+ perf.scan_node_count = maximum(comm, graph_times.scan_node_count);
+ perf.fill_graph_entries = maximum(comm, graph_times.fill_graph_entries);
+ perf.sort_graph_entries = maximum(comm, graph_times.sort_graph_entries);
+ perf.fill_element_graph = maximum(comm, graph_times.fill_element_graph);
+
+ wall_clock.reset();
+ // Create the sparse matrix from the graph:
+
+ SparseMatrixType jacobian( mesh_to_graph.graph );
+
+ Space::fence();
+
+ perf.create_sparse_matrix = maximum( comm , wall_clock.seconds() );
+
+ //----------------------------------
+
+ for ( int k = 0 ; k < comm_size && print_flag ; ++k ) {
+ if ( k == comm_rank ) {
+ const unsigned nrow = jacobian.graph.numRows();
+ std::cout << "MPI[" << comm_rank << "]" << std::endl ;
+ std::cout << "JacobianGraph {" << std::endl ;
+ for ( unsigned irow = 0 ; irow < nrow ; ++irow ) {
+ std::cout << " row[" << irow << "]{" ;
+ const unsigned entry_end = jacobian.graph.row_map(irow+1);
+ for ( unsigned entry = jacobian.graph.row_map(irow) ; entry < entry_end ; ++entry ) {
+ std::cout << " " << jacobian.graph.entries(entry);
+ }
+ std::cout << " }" << std::endl ;
+ }
+ std::cout << "}" << std::endl ;
+
+ std::cout << "ElemGraph {" << std::endl ;
+ for ( unsigned ielem = 0 ; ielem < mesh_to_graph.elem_graph.dimension_0() ; ++ielem ) {
+ std::cout << " elem[" << ielem << "]{" ;
+ for ( unsigned irow = 0 ; irow < mesh_to_graph.elem_graph.dimension_1() ; ++irow ) {
+ std::cout << " {" ;
+ for ( unsigned icol = 0 ; icol < mesh_to_graph.elem_graph.dimension_2() ; ++icol ) {
+ std::cout << " " << mesh_to_graph.elem_graph(ielem,irow,icol);
+ }
+ std::cout << " }" ;
+ }
+ std::cout << " }" << std::endl ;
+ }
+ std::cout << "}" << std::endl ;
+ }
+ std::cout.flush();
+ MPI_Barrier( comm );
+ }
+
+ //----------------------------------
+
+ // Allocate solution vector for each node in the mesh and residual vector for each owned node
+ const VectorType nodal_solution( "nodal_solution" , fixture.node_count() );
+ const VectorType nodal_residual( "nodal_residual" , fixture.node_count_owned() );
+ const VectorType nodal_delta( "nodal_delta" , fixture.node_count_owned() );
+
+ // Create element computation functor
+ const ElementComputationType elemcomp(
+ use_atomic ? ElementComputationType( fixture , manufactured_solution.K , nodal_solution ,
+ mesh_to_graph.elem_graph , jacobian , nodal_residual )
+ : ElementComputationType( fixture , manufactured_solution.K , nodal_solution ) );
+
+ const NodeElemGatherFillType gatherfill(
+ use_atomic ? NodeElemGatherFillType()
+ : NodeElemGatherFillType( fixture.elem_node() ,
+ mesh_to_graph.elem_graph ,
+ nodal_residual ,
+ jacobian ,
+ elemcomp.elem_residuals ,
+ elemcomp.elem_jacobians ) );
+
+ // Create boundary condition functor
+ const DirichletComputationType dirichlet(
+ fixture , nodal_solution , jacobian , nodal_residual ,
+ 2 /* apply at 'z' ends */ ,
+ manufactured_solution.T_zmin ,
+ manufactured_solution.T_zmax );
+
+ //----------------------------------
+ // Nonlinear Newton iteration:
+
+ double residual_norm_init = 0 ;
+
+ for ( perf.newton_iter_count = 0 ;
+ perf.newton_iter_count < newton_iteration_limit ;
+ ++perf.newton_iter_count ) {
+
+ //--------------------------------
+
+ comm_nodal_import( nodal_solution );
+
+ //--------------------------------
+ // Element contributions to residual and jacobian
+
+ wall_clock.reset();
+
+ Kokkos::deep_copy( nodal_residual , double(0) );
+ Kokkos::deep_copy( jacobian.coeff , double(0) );
+
+ elemcomp.apply();
+
+ if ( ! use_atomic ) {
+ gatherfill.apply();
+ }
+
+ Space::fence();
+ perf.fill_time = maximum( comm , wall_clock.seconds() );
+
+ //--------------------------------
+ // Apply boundary conditions
+
+ wall_clock.reset();
+
+ dirichlet.apply();
+
+ Space::fence();
+ perf.bc_time = maximum( comm , wall_clock.seconds() );
+
+ //--------------------------------
+ // Evaluate convergence
+
+ const double residual_norm =
+ std::sqrt(
+ Kokkos::Example::all_reduce(
+ Kokkos::Example::dot( fixture.node_count_owned() , nodal_residual, nodal_residual ) , comm ) );
+
+ perf.newton_residual = residual_norm ;
+
+ if ( 0 == perf.newton_iter_count ) { residual_norm_init = residual_norm ; }
+
+ if ( residual_norm < residual_norm_init * newton_iteration_tolerance ) { break ; }
+
+ //--------------------------------
+ // Solve for nonlinear update
+
+ CGSolveResult cg_result ;
+
+ Kokkos::Example::cgsolve( comm_nodal_import
+ , jacobian
+ , nodal_residual
+ , nodal_delta
+ , cg_iteration_limit
+ , cg_iteration_tolerance
+ , & cg_result
+ );
+
+ // Update solution vector
+
+ Kokkos::Example::waxpby( fixture.node_count_owned() , nodal_solution , -1.0 , nodal_delta , 1.0 , nodal_solution );
+
+ perf.cg_iter_count += cg_result.iteration ;
+ perf.matvec_time += cg_result.matvec_time ;
+ perf.cg_time += cg_result.iter_time ;
+
+ //--------------------------------
+
+ if ( print_flag ) {
+ const double delta_norm =
+ std::sqrt(
+ Kokkos::Example::all_reduce(
+ Kokkos::Example::dot( fixture.node_count_owned() , nodal_delta, nodal_delta ) , comm ) );
+
+ if ( 0 == comm_rank ) {
+ std::cout << "Newton iteration[" << perf.newton_iter_count << "]"
+ << " residual[" << perf.newton_residual << "]"
+ << " update[" << delta_norm << "]"
+ << " cg_iteration[" << cg_result.iteration << "]"
+ << " cg_residual[" << cg_result.norm_res << "]"
+ << std::endl ;
+ }
+
+ for ( int k = 0 ; k < comm_size ; ++k ) {
+ if ( k == comm_rank ) {
+ const unsigned nrow = jacobian.graph.numRows();
+
+ std::cout << "MPI[" << comm_rank << "]" << std::endl ;
+ std::cout << "Residual {" ;
+ for ( unsigned irow = 0 ; irow < nrow ; ++irow ) {
+ std::cout << " " << nodal_residual(irow);
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "Delta {" ;
+ for ( unsigned irow = 0 ; irow < nrow ; ++irow ) {
+ std::cout << " " << nodal_delta(irow);
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "Solution {" ;
+ for ( unsigned irow = 0 ; irow < nrow ; ++irow ) {
+ std::cout << " " << nodal_solution(irow);
+ }
+ std::cout << " }" << std::endl ;
+
+ std::cout << "Jacobian[ "
+ << jacobian.graph.numRows() << " x " << Kokkos::maximum_entry( jacobian.graph )
+ << " ] {" << std::endl ;
+ for ( unsigned irow = 0 ; irow < nrow ; ++irow ) {
+ std::cout << " {" ;
+ const unsigned entry_end = jacobian.graph.row_map(irow+1);
+ for ( unsigned entry = jacobian.graph.row_map(irow) ; entry < entry_end ; ++entry ) {
+ std::cout << " (" << jacobian.graph.entries(entry)
+ << "," << jacobian.coeff(entry)
+ << ")" ;
+ }
+ std::cout << " }" << std::endl ;
+ }
+ std::cout << "}" << std::endl ;
+ }
+ std::cout.flush();
+ MPI_Barrier( comm );
+ }
+ }
+ //--------------------------------
+ }
+
+ // Evaluate solution error
+
+ if ( 0 == itrial ) {
+ const typename FixtureType::node_coord_type::HostMirror
+ h_node_coord = Kokkos::create_mirror_view( fixture.node_coord() );
+
+ const typename VectorType::HostMirror
+ h_nodal_solution = Kokkos::create_mirror_view( nodal_solution );
+
+ Kokkos::deep_copy( h_node_coord , fixture.node_coord() );
+ Kokkos::deep_copy( h_nodal_solution , nodal_solution );
+
+ double error_max = 0 ;
+ for ( unsigned inode = 0 ; inode < fixture.node_count_owned() ; ++inode ) {
+ const double answer = manufactured_solution( h_node_coord( inode , 2 ) );
+ const double error = ( h_nodal_solution(inode) - answer ) / answer ;
+ if ( error_max < fabs( error ) ) { error_max = fabs( error ); }
+ }
+
+ perf.error_max = std::sqrt( Kokkos::Example::all_reduce_max( error_max , comm ) );
+
+ perf_stats = perf ;
+ }
+ else {
+ perf_stats.fill_node_set = std::min( perf_stats.fill_node_set , perf.fill_node_set );
+ perf_stats.scan_node_count = std::min( perf_stats.scan_node_count , perf.scan_node_count );
+ perf_stats.fill_graph_entries = std::min( perf_stats.fill_graph_entries , perf.fill_graph_entries );
+ perf_stats.sort_graph_entries = std::min( perf_stats.sort_graph_entries , perf.sort_graph_entries );
+ perf_stats.fill_element_graph = std::min( perf_stats.fill_element_graph , perf.fill_element_graph );
+ perf_stats.create_sparse_matrix = std::min( perf_stats.create_sparse_matrix , perf.create_sparse_matrix );
+ perf_stats.fill_time = std::min( perf_stats.fill_time , perf.fill_time );
+ perf_stats.bc_time = std::min( perf_stats.bc_time , perf.bc_time );
+ perf_stats.cg_time = std::min( perf_stats.cg_time , perf.cg_time );
+ }
+ }
+
+ return perf_stats ;
+}
+
+} /* namespace FENL */
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #ifndef KOKKOS_EXAMPLE_FENL_IMPL_HPP */
+
diff --git a/lib/kokkos/example/fenl/main.cpp b/lib/kokkos/example/fenl/main.cpp
new file mode 100644
index 000000000..06005d97c
--- /dev/null
+++ b/lib/kokkos/example/fenl/main.cpp
@@ -0,0 +1,422 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <strings.h>
+
+#include <utility>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+
+#include <Kokkos_Core.hpp>
+
+#include <WrapMPI.hpp>
+#include <fenl.hpp>
+
+// For vtune
+#include <sys/types.h>
+#include <unistd.h>
+
+//----------------------------------------------------------------------------
+
+enum { CMD_USE_THREADS = 0
+ , CMD_USE_NUMA
+ , CMD_USE_CORE_PER_NUMA
+ , CMD_USE_CUDA
+ , CMD_USE_OPENMP
+ , CMD_USE_CUDA_DEV
+ , CMD_USE_FIXTURE_X
+ , CMD_USE_FIXTURE_Y
+ , CMD_USE_FIXTURE_Z
+ , CMD_USE_FIXTURE_BEGIN
+ , CMD_USE_FIXTURE_END
+ , CMD_USE_FIXTURE_QUADRATIC
+ , CMD_USE_ATOMIC
+ , CMD_USE_TRIALS
+ , CMD_VTUNE
+ , CMD_PRINT
+ , CMD_ECHO
+ , CMD_ERROR
+ , CMD_COUNT };
+
+void print_cmdline( std::ostream & s , const int cmd[] )
+{
+ if ( cmd[ CMD_USE_THREADS ] ) {
+ s << " Threads(" << cmd[ CMD_USE_THREADS ]
+ << ") NUMA(" << cmd[ CMD_USE_NUMA ]
+ << ") CORE_PER_NUMA(" << cmd[ CMD_USE_CORE_PER_NUMA ]
+ << ")" ;
+ }
+ if ( cmd[ CMD_USE_OPENMP ] ) {
+ s << " OpenMP(" << cmd[ CMD_USE_OPENMP ]
+ << ") NUMA(" << cmd[ CMD_USE_NUMA ]
+ << ") CORE_PER_NUMA(" << cmd[ CMD_USE_CORE_PER_NUMA ]
+ << ")" ;
+ }
+ if ( cmd[ CMD_USE_FIXTURE_X ] ) {
+ s << " Fixture(" << cmd[ CMD_USE_FIXTURE_X ]
+ << "x" << cmd[ CMD_USE_FIXTURE_Y ]
+ << "x" << cmd[ CMD_USE_FIXTURE_Z ]
+ << ")" ;
+ }
+ if ( cmd[ CMD_USE_FIXTURE_BEGIN ] ) {
+ s << " Fixture( " << cmd[ CMD_USE_FIXTURE_BEGIN ]
+ << " .. " << cmd[ CMD_USE_FIXTURE_END ]
+ << " )" ;
+ }
+ if ( cmd[ CMD_USE_FIXTURE_QUADRATIC ] ) {
+ s << " Quadratic-Element" ;
+ }
+ if ( cmd[ CMD_USE_CUDA ] ) {
+ s << " CUDA(" << cmd[ CMD_USE_CUDA_DEV ] << ")" ;
+ }
+ if ( cmd[ CMD_USE_ATOMIC ] ) {
+ s << " ATOMIC" ;
+ }
+ if ( cmd[ CMD_USE_TRIALS ] ) {
+ s << " TRIALS(" << cmd[ CMD_USE_TRIALS ] << ")" ;
+ }
+ if ( cmd[ CMD_VTUNE ] ) {
+ s << " VTUNE" ;
+ }
+ if ( cmd[ CMD_PRINT ] ) {
+ s << " PRINT" ;
+ }
+ s << std::endl ;
+}
+
+void print_perf_value( std::ostream & s , const std::vector<size_t> & widths, const Kokkos::Example::FENL::Perf & perf )
+{
+ int i=0;
+ s << std::setw(widths[i++]) << perf.global_elem_count << " ,";
+ s << std::setw(widths[i++]) << perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << perf.newton_iter_count << " ,";
+ s << std::setw(widths[i++]) << perf.cg_iter_count << " ,";
+ s << std::setw(widths[i++]) << perf.map_ratio << " ,";
+ s << std::setw(widths[i++]) << ( perf.fill_node_set * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.scan_node_count * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.fill_graph_entries * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.sort_graph_entries * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.fill_element_graph * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.create_sparse_matrix * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.fill_time * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( perf.bc_time * 1000.0 ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( ( perf.matvec_time * 1000.0 ) / perf.cg_iter_count ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i++]) << ( ( perf.cg_time * 1000.0 ) / perf.cg_iter_count ) / perf.global_node_count << " ,";
+ s << std::setw(widths[i]) << perf.error_max;
+ s << std::endl ;
+}
+
+template< class Device , Kokkos::Example::BoxElemPart::ElemOrder ElemOrder >
+void run( MPI_Comm comm , const int cmd[] )
+{
+ int comm_rank = 0 ;
+
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Comm_rank( comm , & comm_rank );
+#else
+ comm = 0 ;
+#endif
+
+
+ if ( 0 == comm_rank ) {
+ if ( cmd[ CMD_USE_THREADS ] ) { std::cout << "THREADS , " << cmd[ CMD_USE_THREADS ] ; }
+ else if ( cmd[ CMD_USE_OPENMP ] ) { std::cout << "OPENMP , " << cmd[ CMD_USE_OPENMP ] ; }
+ else if ( cmd[ CMD_USE_CUDA ] ) { std::cout << "CUDA" ; }
+
+ if ( cmd[ CMD_USE_FIXTURE_QUADRATIC ] ) { std::cout << " , QUADRATIC-ELEMENT" ; }
+ else { std::cout << " , LINEAR-ELEMENT" ; }
+
+ if ( cmd[ CMD_USE_ATOMIC ] ) { std::cout << " , USING ATOMICS" ; }
+ }
+
+ std::vector< std::pair<std::string,std::string> > headers;
+
+
+ headers.push_back(std::make_pair("ELEMS","count"));
+ headers.push_back(std::make_pair("NODES","count"));
+ headers.push_back(std::make_pair("NEWTON","iter"));
+ headers.push_back(std::make_pair("CG","iter"));
+ headers.push_back(std::make_pair("MAP_RATIO","ratio"));
+ headers.push_back(std::make_pair("SET_FILL/NODE","millisec"));
+ headers.push_back(std::make_pair("SCAN/NODE","millisec"));
+ headers.push_back(std::make_pair("GRAPH_FILL/NODE","millisec"));
+ headers.push_back(std::make_pair("SORT/NODE","millisec"));
+ headers.push_back(std::make_pair("ELEM_GRAPH_FILL/NODE","millisec"));
+ headers.push_back(std::make_pair("MATRIX_CREATE/NODE","millisec"));
+ headers.push_back(std::make_pair("MATRIX_FILL/NODE","millisec"));
+ headers.push_back(std::make_pair("BOUNDARY/NODE","millisec"));
+ headers.push_back(std::make_pair("MAT_VEC/ITER/ROW","millisec"));
+ headers.push_back(std::make_pair("CG/ITER/ROW","millisec"));
+ headers.push_back(std::make_pair("ERROR","ratio"));
+
+ // find print widths
+ size_t min_width = 10;
+ std::vector< size_t > widths(headers.size());
+ for (size_t i=0, ie=headers.size(); i<ie; ++i)
+ widths[i] = std::max(min_width, headers[i].first.size()+1);
+
+ // print column headers
+ if ( 0 == comm_rank ) {
+ std::cout << std::endl ;
+ for (size_t i=0; i<headers.size(); ++i)
+ std::cout << std::setw(widths[i]) << headers[i].first << " ,";
+ std::cout << "\b\b " << std::endl;
+ for (size_t i=0; i<headers.size(); ++i)
+ std::cout << std::setw(widths[i]) << headers[i].second << " ,";
+ std::cout << "\b\b " << std::endl;
+
+ std::cout << std::scientific;
+ std::cout.precision(3);
+ }
+
+ if ( cmd[ CMD_USE_FIXTURE_BEGIN ] ) {
+ for ( int i = cmd[CMD_USE_FIXTURE_BEGIN] ; i < cmd[CMD_USE_FIXTURE_END] * 2 ; i *= 2 ) {
+ int nelem[3] ;
+ nelem[0] = std::max( 1 , (int) cbrt( ((double) i) / 2.0 ) );
+ nelem[1] = 1 + nelem[0] ;
+ nelem[2] = 2 * nelem[0] ;
+
+ const Kokkos::Example::FENL::Perf perf =
+ cmd[ CMD_USE_FIXTURE_QUADRATIC ]
+ ? Kokkos::Example::FENL::fenl< Device , Kokkos::Example::BoxElemPart::ElemQuadratic >
+ ( comm , cmd[CMD_PRINT], cmd[CMD_USE_TRIALS], cmd[CMD_USE_ATOMIC], nelem )
+ : Kokkos::Example::FENL::fenl< Device , Kokkos::Example::BoxElemPart::ElemLinear >
+ ( comm , cmd[CMD_PRINT], cmd[CMD_USE_TRIALS], cmd[CMD_USE_ATOMIC], nelem )
+ ;
+
+ if ( 0 == comm_rank ) print_perf_value( std::cout , widths, perf );
+ }
+ }
+ else {
+ int nelem[3] = { cmd[ CMD_USE_FIXTURE_X ] ,
+ cmd[ CMD_USE_FIXTURE_Y ] ,
+ cmd[ CMD_USE_FIXTURE_Z ] };
+
+ const Kokkos::Example::FENL::Perf perf =
+ cmd[ CMD_USE_FIXTURE_QUADRATIC ]
+ ? Kokkos::Example::FENL::fenl< Device , Kokkos::Example::BoxElemPart::ElemQuadratic >
+ ( comm , cmd[CMD_PRINT], cmd[CMD_USE_TRIALS], cmd[CMD_USE_ATOMIC], nelem )
+ : Kokkos::Example::FENL::fenl< Device , Kokkos::Example::BoxElemPart::ElemLinear >
+ ( comm , cmd[CMD_PRINT], cmd[CMD_USE_TRIALS], cmd[CMD_USE_ATOMIC], nelem )
+ ;
+
+ if ( 0 == comm_rank ) print_perf_value( std::cout , widths, perf );
+ }
+}
+
+//----------------------------------------------------------------------------
+
+int main( int argc , char ** argv )
+{
+ int comm_rank = 0 ;
+
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Init( & argc , & argv );
+ MPI_Comm comm = MPI_COMM_WORLD ;
+ MPI_Comm_rank( comm , & comm_rank );
+#else
+ MPI_Comm comm = 0 ;
+ (void) comm ; // suppress warning
+#endif
+
+ int cmdline[ CMD_COUNT ] ;
+
+ for ( int i = 0 ; i < CMD_COUNT ; ++i ) cmdline[i] = 0 ;
+
+ if ( 0 == comm_rank ) {
+ for ( int i = 1 ; i < argc ; ++i ) {
+ if ( 0 == strcasecmp( argv[i] , "threads" ) ) {
+ cmdline[ CMD_USE_THREADS ] = atoi( argv[++i] );
+ }
+ else if ( 0 == strcasecmp( argv[i] , "openmp" ) ) {
+ cmdline[ CMD_USE_OPENMP ] = atoi( argv[++i] );
+ }
+ else if ( 0 == strcasecmp( argv[i] , "cores" ) ) {
+ sscanf( argv[++i] , "%dx%d" ,
+ cmdline + CMD_USE_NUMA ,
+ cmdline + CMD_USE_CORE_PER_NUMA );
+ }
+ else if ( 0 == strcasecmp( argv[i] , "cuda" ) ) {
+ cmdline[ CMD_USE_CUDA ] = 1 ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "cuda-dev" ) ) {
+ cmdline[ CMD_USE_CUDA ] = 1 ;
+ cmdline[ CMD_USE_CUDA_DEV ] = atoi( argv[++i] ) ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "fixture" ) ) {
+ sscanf( argv[++i] , "%dx%dx%d" ,
+ cmdline + CMD_USE_FIXTURE_X ,
+ cmdline + CMD_USE_FIXTURE_Y ,
+ cmdline + CMD_USE_FIXTURE_Z );
+ }
+ else if ( 0 == strcasecmp( argv[i] , "fixture-range" ) ) {
+ sscanf( argv[++i] , "%d..%d" ,
+ cmdline + CMD_USE_FIXTURE_BEGIN ,
+ cmdline + CMD_USE_FIXTURE_END );
+ }
+ else if ( 0 == strcasecmp( argv[i] , "fixture-quadratic" ) ) {
+ cmdline[ CMD_USE_FIXTURE_QUADRATIC ] = 1 ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "atomic" ) ) {
+ cmdline[ CMD_USE_ATOMIC ] = 1 ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "trials" ) ) {
+ cmdline[ CMD_USE_TRIALS ] = atoi( argv[++i] ) ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "vtune" ) ) {
+ cmdline[ CMD_VTUNE ] = 1 ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "print" ) ) {
+ cmdline[ CMD_PRINT ] = 1 ;
+ }
+ else if ( 0 == strcasecmp( argv[i] , "echo" ) ) {
+ cmdline[ CMD_ECHO ] = 1 ;
+ }
+ else {
+ cmdline[ CMD_ERROR ] = 1 ;
+
+ std::cerr << "Unrecognized command line argument #" << i << ": " << argv[i] << std::endl ;
+ }
+ }
+
+ if ( cmdline[ CMD_ECHO ] && 0 == comm_rank ) { print_cmdline( std::cout , cmdline ); }
+ }
+
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Bcast( cmdline , CMD_COUNT , MPI_INT , 0 , comm );
+#endif
+
+ if ( cmdline[ CMD_VTUNE ] ) {
+ std::stringstream cmd;
+ pid_t my_os_pid=getpid();
+ const std::string vtune_loc =
+ "/usr/local/intel/vtune_amplifier_xe_2013/bin64/amplxe-cl";
+ const std::string output_dir = "./vtune/vtune.";
+ const int p_rank = comm_rank;
+ cmd << vtune_loc
+ << " -collect hotspots -result-dir " << output_dir << p_rank
+ << " -target-pid " << my_os_pid << " &";
+ if (p_rank == 0)
+ std::cout << cmd.str() << std::endl;
+ system(cmd.str().c_str());
+ system("sleep 10");
+ }
+
+ if ( ! cmdline[ CMD_ERROR ] && ! cmdline[ CMD_ECHO ] ) {
+
+ if ( ! cmdline[ CMD_USE_TRIALS ] ) { cmdline[ CMD_USE_TRIALS ] = 1 ; }
+
+ if ( ! cmdline[ CMD_USE_FIXTURE_X ] && ! cmdline[ CMD_USE_FIXTURE_BEGIN ] ) {
+ cmdline[ CMD_USE_FIXTURE_X ] = 2 ;
+ cmdline[ CMD_USE_FIXTURE_Y ] = 2 ;
+ cmdline[ CMD_USE_FIXTURE_Z ] = 2 ;
+ }
+
+#if defined( KOKKOS_HAVE_PTHREAD )
+
+ if ( cmdline[ CMD_USE_THREADS ] ) {
+
+ if ( cmdline[ CMD_USE_NUMA ] && cmdline[ CMD_USE_CORE_PER_NUMA ] ) {
+ Kokkos::Threads::initialize( cmdline[ CMD_USE_THREADS ] ,
+ cmdline[ CMD_USE_NUMA ] ,
+ cmdline[ CMD_USE_CORE_PER_NUMA ] );
+ }
+ else {
+ Kokkos::Threads::initialize( cmdline[ CMD_USE_THREADS ] );
+ }
+
+ run< Kokkos::Threads , Kokkos::Example::BoxElemPart::ElemLinear >( comm , cmdline );
+
+ Kokkos::Threads::finalize();
+ }
+
+#endif
+
+#if defined( KOKKOS_HAVE_OPENMP )
+
+ if ( cmdline[ CMD_USE_OPENMP ] ) {
+
+ if ( cmdline[ CMD_USE_NUMA ] && cmdline[ CMD_USE_CORE_PER_NUMA ] ) {
+ Kokkos::OpenMP::initialize( cmdline[ CMD_USE_OPENMP ] ,
+ cmdline[ CMD_USE_NUMA ] ,
+ cmdline[ CMD_USE_CORE_PER_NUMA ] );
+ }
+ else {
+ Kokkos::OpenMP::initialize( cmdline[ CMD_USE_OPENMP ] );
+ }
+
+ run< Kokkos::OpenMP , Kokkos::Example::BoxElemPart::ElemLinear >( comm , cmdline );
+
+ Kokkos::OpenMP::finalize();
+ }
+
+#endif
+
+#if defined( KOKKOS_HAVE_CUDA )
+ if ( cmdline[ CMD_USE_CUDA ] ) {
+ // Use the last device:
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice( cmdline[ CMD_USE_CUDA_DEV ] ) );
+
+ run< Kokkos::Cuda , Kokkos::Example::BoxElemPart::ElemLinear >( comm , cmdline );
+
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+ }
+
+#endif
+
+ }
+
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Finalize();
+#endif
+
+ return cmdline[ CMD_ERROR ] ? -1 : 0 ;
+}
+
diff --git a/lib/kokkos/example/fixture/BoxElemFixture.hpp b/lib/kokkos/example/fixture/BoxElemFixture.hpp
new file mode 100644
index 000000000..66d6e741a
--- /dev/null
+++ b/lib/kokkos/example/fixture/BoxElemFixture.hpp
@@ -0,0 +1,355 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_BOXELEMFIXTURE_HPP
+#define KOKKOS_EXAMPLE_BOXELEMFIXTURE_HPP
+
+#include <stdio.h>
+#include <utility>
+
+#include <Kokkos_Core.hpp>
+
+#include <HexElement.hpp>
+#include <BoxElemPart.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+/** \brief Map a grid onto a unit cube with smooth nonlinear grading
+ * of the map.
+ */
+struct MapGridUnitCube {
+
+ const float m_a ;
+ const float m_b ;
+ const float m_c ;
+ const size_t m_max_x ;
+ const size_t m_max_y ;
+ const size_t m_max_z ;
+
+ MapGridUnitCube( const size_t grid_max_x ,
+ const size_t grid_max_y ,
+ const size_t grid_max_z ,
+ const float bubble_x ,
+ const float bubble_y ,
+ const float bubble_z )
+ : m_a( bubble_x )
+ , m_b( bubble_y )
+ , m_c( bubble_z )
+ , m_max_x( grid_max_x )
+ , m_max_y( grid_max_y )
+ , m_max_z( grid_max_z )
+ {}
+
+ template< typename Scalar >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int grid_x ,
+ int grid_y ,
+ int grid_z ,
+ Scalar & coord_x ,
+ Scalar & coord_y ,
+ Scalar & coord_z ) const
+ {
+ // Map to a unit cube [0,1]^3
+
+ const double x = double(grid_x) / double(m_max_x);
+ const double y = double(grid_y) / double(m_max_y);
+ const double z = double(grid_z) / double(m_max_z);
+
+ coord_x = x + x * x * ( x - 1 ) * ( x - 1 ) * m_a ;
+ coord_y = y + y * y * ( y - 1 ) * ( y - 1 ) * m_b ;
+ coord_z = z + z * z * ( z - 1 ) * ( z - 1 ) * m_c ;
+ }
+};
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+/** \brief Generate a distributed unstructured finite element mesh
+ * from a partitioned NX*NY*NZ box of elements.
+ *
+ * Order owned nodes first followed by off-process nodes
+ * grouped by owning process.
+ */
+template< class Device ,
+ BoxElemPart::ElemOrder Order ,
+ class CoordinateMap = MapGridUnitCube >
+class BoxElemFixture {
+public:
+
+ typedef Device execution_space ;
+
+ enum { SpaceDim = 3 };
+ enum { ElemNode = Order == BoxElemPart::ElemLinear ? 8 :
+ Order == BoxElemPart::ElemQuadratic ? 27 : 0 };
+
+private:
+
+ typedef Kokkos::Example::HexElement_TensorData< ElemNode > hex_data ;
+
+ Kokkos::Example::BoxElemPart m_box_part ;
+ CoordinateMap m_coord_map ;
+
+ Kokkos::View< double *[SpaceDim] , Device > m_node_coord ;
+ Kokkos::View< size_t *[SpaceDim] , Device > m_node_grid ;
+ Kokkos::View< size_t *[ElemNode] , Device > m_elem_node ;
+ Kokkos::View< size_t *[2] , Device > m_recv_node ;
+ Kokkos::View< size_t *[2] , Device > m_send_node ;
+ Kokkos::View< size_t * , Device > m_send_node_id ;
+
+ unsigned char m_elem_node_local[ ElemNode ][4] ;
+
+public:
+
+ typedef Kokkos::View< const size_t * [ElemNode], Device > elem_node_type ;
+ typedef Kokkos::View< const double * [SpaceDim], Device > node_coord_type ;
+ typedef Kokkos::View< const size_t * [SpaceDim], Device > node_grid_type ;
+ typedef Kokkos::View< const size_t * [2] , Device > comm_list_type ;
+ typedef Kokkos::View< const size_t * , Device > send_nodeid_type ;
+
+ inline bool ok() const { return m_box_part.ok(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_count() const { return m_node_grid.dimension_0(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_count_owned() const { return m_box_part.owns_node_count(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_count_global() const { return m_box_part.global_node_count(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t elem_count() const { return m_elem_node.dimension_0(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t elem_count_global() const { return m_box_part.global_elem_count(); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t elem_node_local( size_t inode , int k ) const
+ { return m_elem_node_local[inode][k] ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_grid( size_t inode , int iaxis ) const
+ { return m_node_grid(inode,iaxis); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_global_index( size_t local ) const
+ {
+ const size_t tmp_node_grid[SpaceDim] =
+ { m_node_grid(local,0) , m_node_grid(local,1) , m_node_grid(local,2) };
+ return m_box_part.global_node_id( tmp_node_grid );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ double node_coord( size_t inode , int iaxis ) const
+ { return m_node_coord(inode,iaxis); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t node_grid_max( int iaxis ) const
+ { return m_box_part.global_coord_max(iaxis); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t elem_node( size_t ielem , size_t inode ) const
+ { return m_elem_node(ielem,inode); }
+
+ elem_node_type elem_node() const { return m_elem_node ; }
+ node_coord_type node_coord() const { return m_node_coord ; }
+ node_grid_type node_grid() const { return m_node_grid ; }
+ comm_list_type recv_node() const { return m_recv_node ; }
+ comm_list_type send_node() const { return m_send_node ; }
+ send_nodeid_type send_nodeid() const { return m_send_node_id ; }
+
+ KOKKOS_INLINE_FUNCTION
+ BoxElemFixture( const BoxElemFixture & rhs )
+ : m_box_part( rhs.m_box_part )
+ , m_coord_map( rhs.m_coord_map )
+ , m_node_coord( rhs.m_node_coord )
+ , m_node_grid( rhs.m_node_grid )
+ , m_elem_node( rhs.m_elem_node )
+ , m_recv_node( rhs.m_recv_node )
+ , m_send_node( rhs.m_send_node )
+ , m_send_node_id( rhs.m_send_node_id )
+ {
+ for ( int i = 0 ; i < ElemNode ; ++i ) {
+ m_elem_node_local[i][0] = rhs.m_elem_node_local[i][0] ;
+ m_elem_node_local[i][1] = rhs.m_elem_node_local[i][1] ;
+ m_elem_node_local[i][2] = rhs.m_elem_node_local[i][2] ;
+ m_elem_node_local[i][3] = 0 ;
+ }
+ }
+
+ BoxElemFixture & operator = ( const BoxElemFixture & rhs )
+ {
+ m_box_part = rhs.m_box_part ;
+ m_coord_map = rhs.m_coord_map ;
+ m_node_coord = rhs.m_node_coord ;
+ m_node_grid = rhs.m_node_grid ;
+ m_elem_node = rhs.m_elem_node ;
+ m_recv_node = rhs.m_recv_node ;
+ m_send_node = rhs.m_send_node ;
+ m_send_node_id = rhs.m_send_node_id ;
+
+ for ( int i = 0 ; i < ElemNode ; ++i ) {
+ m_elem_node_local[i][0] = rhs.m_elem_node_local[i][0] ;
+ m_elem_node_local[i][1] = rhs.m_elem_node_local[i][1] ;
+ m_elem_node_local[i][2] = rhs.m_elem_node_local[i][2] ;
+ m_elem_node_local[i][3] = 0 ;
+ }
+ return *this ;
+ }
+
+ BoxElemFixture( const BoxElemPart::Decompose decompose ,
+ const size_t global_size ,
+ const size_t global_rank ,
+ const size_t elem_nx ,
+ const size_t elem_ny ,
+ const size_t elem_nz ,
+ const float bubble_x = 1.1f ,
+ const float bubble_y = 1.2f ,
+ const float bubble_z = 1.3f )
+ : m_box_part( Order , decompose , global_size , global_rank , elem_nx , elem_ny , elem_nz )
+ , m_coord_map( m_box_part.global_coord_max(0) ,
+ m_box_part.global_coord_max(1) ,
+ m_box_part.global_coord_max(2) ,
+ bubble_x ,
+ bubble_y ,
+ bubble_z )
+ , m_node_coord( "fixture_node_coord" , m_box_part.uses_node_count() )
+ , m_node_grid( "fixture_node_grid" , m_box_part.uses_node_count() )
+ , m_elem_node( "fixture_elem_node" , m_box_part.uses_elem_count() )
+ , m_recv_node( "fixture_recv_node" , m_box_part.recv_node_msg_count() )
+ , m_send_node( "fixture_send_node" , m_box_part.send_node_msg_count() )
+ , m_send_node_id( "fixture_send_node_id" , m_box_part.send_node_id_count() )
+ {
+ {
+ const hex_data elem_data ;
+
+ for ( int i = 0 ; i < ElemNode ; ++i ) {
+ m_elem_node_local[i][0] = elem_data.eval_map[i][0] ;
+ m_elem_node_local[i][1] = elem_data.eval_map[i][1] ;
+ m_elem_node_local[i][2] = elem_data.eval_map[i][2] ;
+ m_elem_node_local[i][3] = 0 ;
+ }
+ }
+
+ const size_t nwork =
+ std::max( m_recv_node.dimension_0() ,
+ std::max( m_send_node.dimension_0() ,
+ std::max( m_send_node_id.dimension_0() ,
+ std::max( m_node_grid.dimension_0() ,
+ m_elem_node.dimension_0() * m_elem_node.dimension_1() ))));
+
+ Kokkos::parallel_for( nwork , *this );
+ }
+
+
+ // Initialization:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( size_t i ) const
+ {
+ if ( i < m_elem_node.dimension_0() * m_elem_node.dimension_1() ) {
+
+ const size_t ielem = i / ElemNode ;
+ const size_t inode = i % ElemNode ;
+
+ size_t elem_grid[SpaceDim] ;
+ size_t tmp_node_grid[SpaceDim] ;
+
+ m_box_part.uses_elem_coord( ielem , elem_grid );
+
+ enum { elem_node_scale = Order == BoxElemPart::ElemLinear ? 1 :
+ Order == BoxElemPart::ElemQuadratic ? 2 : 0 };
+
+ tmp_node_grid[0] = elem_node_scale * elem_grid[0] + m_elem_node_local[inode][0] ;
+ tmp_node_grid[1] = elem_node_scale * elem_grid[1] + m_elem_node_local[inode][1] ;
+ tmp_node_grid[2] = elem_node_scale * elem_grid[2] + m_elem_node_local[inode][2] ;
+
+ m_elem_node(ielem,inode) = m_box_part.local_node_id( tmp_node_grid );
+ }
+
+ if ( i < m_node_grid.dimension_0() ) {
+ size_t tmp_node_grid[SpaceDim] ;
+ m_box_part.local_node_coord( i , tmp_node_grid );
+ m_node_grid(i,0) = tmp_node_grid[0] ;
+ m_node_grid(i,1) = tmp_node_grid[1] ;
+ m_node_grid(i,2) = tmp_node_grid[2] ;
+
+ m_coord_map( tmp_node_grid[0] ,
+ tmp_node_grid[1] ,
+ tmp_node_grid[2] ,
+ m_node_coord(i,0) ,
+ m_node_coord(i,1) ,
+ m_node_coord(i,2) );
+ }
+
+ if ( i < m_recv_node.dimension_0() ) {
+ m_recv_node(i,0) = m_box_part.recv_node_rank(i);
+ m_recv_node(i,1) = m_box_part.recv_node_count(i);
+ }
+
+ if ( i < m_send_node.dimension_0() ) {
+ m_send_node(i,0) = m_box_part.send_node_rank(i);
+ m_send_node(i,1) = m_box_part.send_node_count(i);
+ }
+
+ if ( i < m_send_node_id.dimension_0() ) {
+ m_send_node_id(i) = m_box_part.send_node_id(i);
+ }
+ }
+};
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_EXAMPLE_BOXELEMFIXTURE_HPP */
+
diff --git a/lib/kokkos/example/fixture/BoxElemPart.cpp b/lib/kokkos/example/fixture/BoxElemPart.cpp
new file mode 100644
index 000000000..fe8924668
--- /dev/null
+++ b/lib/kokkos/example/fixture/BoxElemPart.cpp
@@ -0,0 +1,413 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <utility>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+#include <limits>
+#include <BoxElemPart.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+void box_partition( const size_t global_size ,
+ const size_t global_rank ,
+ const size_t global_box[][2] ,
+ size_t box[][2] )
+{
+ box[0][0] = global_box[0][0] ; box[0][1] = global_box[0][1] ;
+ box[1][0] = global_box[1][0] ; box[1][1] = global_box[1][1] ;
+ box[2][0] = global_box[2][0] ; box[2][1] = global_box[2][1] ;
+
+ size_t ip = 0 ;
+ size_t np = global_size ;
+
+ while ( 1 < np ) {
+
+ // P = [ ip + j * portion , ip + ( j + 1 ) * portion )
+
+ size_t jip , jup ;
+
+ {
+ const size_t part = ( 0 == ( np % 5 ) ) ? 5 : (
+ ( 0 == ( np % 3 ) ) ? 3 : 2 );
+
+ const size_t portion = np / part ;
+
+ if ( 2 < part || global_rank < ip + portion ) {
+ jip = portion * size_t( double( global_rank - ip ) / double(portion) );
+ jup = jip + portion ;
+ }
+ else {
+ jip = portion ;
+ jup = np ;
+ }
+ }
+
+ // Choose axis with largest count:
+
+ const size_t nb[3] = {
+ box[0][1] - box[0][0] ,
+ box[1][1] - box[1][0] ,
+ box[2][1] - box[2][0] };
+
+ const int axis = nb[2] > nb[1] ? ( nb[2] > nb[0] ? 2 : 0 )
+ : ( nb[1] > nb[0] ? 1 : 0 );
+
+ box[ axis ][1] = box[ axis ][0] + size_t( double(nb[axis]) * ( double(jup) / double(np) ));
+ box[ axis ][0] = box[ axis ][0] + size_t( double(nb[axis]) * ( double(jip) / double(np) ));
+
+ np = jup - jip ;
+ ip = ip + jip ;
+ }
+}
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+void BoxElemPart::local( const size_t rank ,
+ size_t uses_elem[][2] ,
+ size_t owns_node[][2] ,
+ size_t uses_node[][2] ) const
+{
+ if ( BoxElemPart::DecomposeElem == m_decompose ) {
+
+ Kokkos::Example::box_partition( m_global_size , rank , m_global_elem_box , uses_elem );
+
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ owns_node[i][0] = uses_elem[i][0] ;
+ owns_node[i][1] = uses_elem[i][1] + ( m_global_elem_box[i][1] == uses_elem[i][1] ? 1 : 0 );
+ }
+ }
+ else {
+
+ const size_t global_vert[3][2] =
+ { { 0 , m_global_elem_box[0][1] + 1 },
+ { 0 , m_global_elem_box[1][1] + 1 },
+ { 0 , m_global_elem_box[2][1] + 1 } };
+
+ Kokkos::Example::box_partition( m_global_size , rank , global_vert , owns_node );
+
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ uses_elem[i][0] = global_vert[i][0] == owns_node[i][0] ? owns_node[i][0] : owns_node[i][0] - 1 ;
+ uses_elem[i][1] = global_vert[i][1] == owns_node[i][1] ? owns_node[i][1] - 1 : owns_node[i][1] ;
+ }
+ }
+
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ uses_node[i][0] = uses_elem[i][0] ;
+ uses_node[i][1] = uses_elem[i][1] + 1 ;
+ }
+
+ if ( BoxElemPart::ElemQuadratic == m_elem_order ) {
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ owns_node[i][0] = 2 * owns_node[i][0] ;
+ uses_node[i][0] = 2 * uses_node[i][0] ;
+ owns_node[i][1] = 2 * owns_node[i][1] - 1 ;
+ uses_node[i][1] = 2 * uses_node[i][1] - 1 ;
+ }
+ }
+}
+
+BoxElemPart::BoxElemPart(
+ const BoxElemPart::ElemOrder elem_order ,
+ const BoxElemPart::Decompose decompose ,
+ const size_t global_size ,
+ const size_t global_rank ,
+ const size_t elem_nx ,
+ const size_t elem_ny ,
+ const size_t elem_nz )
+{
+ m_global_size = global_size ;
+ m_global_rank = global_rank ;
+ m_decompose = decompose ;
+ m_elem_order = elem_order ;
+
+ m_global_elem_box[0][0] = 0 ; m_global_elem_box[0][1] = elem_nx ;
+ m_global_elem_box[1][0] = 0 ; m_global_elem_box[1][1] = elem_ny ;
+ m_global_elem_box[2][0] = 0 ; m_global_elem_box[2][1] = elem_nz ;
+
+ m_global_node_box[0][0] = 0 ; m_global_node_box[0][1] = 0 ;
+ m_global_node_box[1][0] = 0 ; m_global_node_box[1][1] = 0 ;
+ m_global_node_box[2][0] = 0 ; m_global_node_box[2][1] = 0 ;
+
+ m_owns_node_count = 0 ;
+ m_send_node_count = 0 ;
+
+ m_ok = true ;
+
+ //----------------------------------------
+
+ if ( ElemLinear == elem_order ) {
+ m_global_node_box[0][1] = elem_nx + 1 ;
+ m_global_node_box[1][1] = elem_ny + 1 ;
+ m_global_node_box[2][1] = elem_nz + 1 ;
+ }
+ else if ( ElemQuadratic == elem_order ) {
+ m_global_node_box[0][1] = 2 * elem_nx + 1 ;
+ m_global_node_box[1][1] = 2 * elem_ny + 1 ;
+ m_global_node_box[2][1] = 2 * elem_nz + 1 ;
+ }
+
+ //----------------------------------------
+
+ local( m_global_rank , m_uses_elem_box , m_owns_node_box[0] , m_uses_node_box );
+
+ const size_t global_node_count_ = Kokkos::Example::box_count( m_global_node_box );
+ const size_t global_elem_count_ = Kokkos::Example::box_count( m_global_elem_box );
+
+ //----------------------------------------
+
+ size_t elem_count = Kokkos::Example::box_count( m_uses_elem_box );
+ size_t node_count = Kokkos::Example::box_count( m_owns_node_box[0] );
+
+ m_owns_node[0][0] = global_rank ;
+ m_owns_node[0][1] = node_count ;
+ m_owns_node_count = 1 ;
+ m_send_node_count = 0 ;
+
+ for ( size_t rr = 1 ; rr < m_global_size && m_ok ; ++rr ) {
+
+ const size_t rank = ( m_global_rank + rr ) % m_global_size ;
+
+ size_t elem_box[3][2] , o_node_box[3][2] , u_node_box[3][2] ;
+
+ // Boxes for process 'rank'
+ local( rank , elem_box , o_node_box , u_node_box );
+
+ // Box that this process uses but is owned by process 'rank'
+ Kokkos::Example::box_intersect( m_owns_node_box[ m_owns_node_count ] , m_uses_node_box , o_node_box );
+
+ m_owns_node[ m_owns_node_count ][1] = Kokkos::Example::box_count( m_owns_node_box[ m_owns_node_count ] );
+
+ if ( m_owns_node[ m_owns_node_count ][1] ) {
+
+ if ( ( PROC_NEIGH_MAX - 1 ) <= m_owns_node_count ) {
+ std::cout << "BoxElemPart exceeded maximum neighbor count" << std::endl ;
+ m_ok = false ;
+ break ;
+ }
+
+ m_owns_node[ m_owns_node_count ][0] = rank ;
+
+ ++m_owns_node_count ;
+ }
+
+ // Box that this process owns and is used by process 'rank'
+ Kokkos::Example::box_intersect( m_send_node_box[ m_send_node_count ] , m_owns_node_box[0] , u_node_box );
+
+ m_send_node[ m_send_node_count ][1] = Kokkos::Example::box_count( m_send_node_box[ m_send_node_count ] );
+
+ if ( m_send_node[ m_send_node_count ][1] ) {
+
+ if ( ( PROC_NEIGH_MAX - 1 ) <= m_send_node_count ) {
+ std::cout << "BoxElemPart exceeded maximum neighbor count" << std::endl ;
+ m_ok = false ;
+ break ;
+ }
+
+ m_send_node[ m_send_node_count ][0] = rank ;
+ ++m_send_node_count ;
+ }
+
+ // Error checking:
+
+ size_t test_box[3][2] ;
+
+ elem_count += Kokkos::Example::box_count( elem_box );
+ node_count += Kokkos::Example::box_count( o_node_box );
+
+ {
+ Kokkos::Example::box_intersect( test_box , m_owns_node_box[0] , o_node_box );
+
+ if ( Kokkos::Example::box_count( test_box ) ) {
+ std::cout << "Box partitioning error" << std::endl ;
+ std::cout << "owns_node[" << m_global_rank << "]{"
+ << " [" << m_owns_node_box[0][0][0] << "," << m_owns_node_box[0][0][1] << ")"
+ << " [" << m_owns_node_box[0][1][0] << "," << m_owns_node_box[0][1][1] << ")"
+ << " [" << m_owns_node_box[0][2][0] << "," << m_owns_node_box[0][2][1] << ")"
+ << "} intersects"
+ << " owns_node[" << rank << "]{"
+ << " [" << o_node_box[0][0] << "," << o_node_box[0][1] << ")"
+ << " [" << o_node_box[1][0] << "," << o_node_box[1][1] << ")"
+ << " [" << o_node_box[2][0] << "," << o_node_box[2][1] << ")"
+ << "}" << std::endl ;
+ m_ok = false ;
+ break ;
+ }
+ }
+
+ if ( DecomposeElem == decompose ) {
+
+ Kokkos::Example::box_intersect( test_box , m_uses_elem_box , elem_box );
+
+ if ( Kokkos::Example::box_count( test_box ) ) {
+ std::cout << "Box partitioning error" << std::endl ;
+ std::cout << "ElemBox[" << m_global_rank << "]{"
+ << " [" << m_uses_elem_box[0][0] << "," << m_uses_elem_box[0][1] << ")"
+ << " [" << m_uses_elem_box[1][0] << "," << m_uses_elem_box[1][1] << ")"
+ << " [" << m_uses_elem_box[2][0] << "," << m_uses_elem_box[2][1] << ")"
+ << "} intersects"
+ << " ElemBox[" << rank << "]{"
+ << " [" << elem_box[0][0] << "," << elem_box[0][1] << ")"
+ << " [" << elem_box[1][0] << "," << elem_box[1][1] << ")"
+ << " [" << elem_box[2][0] << "," << elem_box[2][1] << ")"
+ << "}" << std::endl ;
+ m_ok = false ;
+ break ;
+ }
+ }
+ }
+
+ // Sentinal values at the end of the owns and send lists:
+
+ m_owns_node[ m_owns_node_count ][0] = ~0u ;
+ m_owns_node[ m_owns_node_count ][1] = ~0u ;
+ m_owns_node_box[ m_owns_node_count ][0][0] = 0u ; m_owns_node_box[ m_owns_node_count ][0][0] = ~0u ;
+ m_owns_node_box[ m_owns_node_count ][1][0] = 0u ; m_owns_node_box[ m_owns_node_count ][1][0] = ~0u ;
+ m_owns_node_box[ m_owns_node_count ][2][0] = 0u ; m_owns_node_box[ m_owns_node_count ][2][0] = ~0u ;
+
+ m_send_node[ m_send_node_count ][0] = ~0u ;
+ m_send_node[ m_send_node_count ][1] = ~0u ;
+ m_send_node_box[ m_send_node_count ][0][0] = 0u ; m_send_node_box[ m_send_node_count ][0][0] = ~0u ;
+ m_send_node_box[ m_send_node_count ][1][0] = 0u ; m_send_node_box[ m_send_node_count ][1][0] = ~0u ;
+ m_send_node_box[ m_send_node_count ][2][0] = 0u ; m_send_node_box[ m_send_node_count ][2][0] = ~0u ;
+
+ {
+ size_t count = 0 ;
+ for ( size_t i = 0 ; i < m_owns_node_count ; ++i ) {
+ count += m_owns_node[i][1] ;
+ }
+ if ( count != Kokkos::Example::box_count( m_uses_node_box ) ) {
+ std::cout << "Node uses count = " << Kokkos::Example::box_count( m_uses_node_box )
+ << " error count = " << count << std::endl ;
+ m_ok = false ;
+ }
+ }
+
+ if ( global_node_count_ != node_count ) {
+ std::cout << "Node count = " << global_node_count_ << " overlap error count = " << node_count << std::endl ;
+ m_ok = false ;
+ }
+
+ if ( DecomposeElem == decompose && global_elem_count_ != elem_count ) {
+ std::cout << "Elem count = " << global_elem_count_ << " overlap error count = " << elem_count << std::endl ;
+ m_ok = false ;
+ }
+
+ if ( ! m_ok ) {
+ for ( int i = 0 ; i < 3 ; ++i ) { for ( int j = 0 ; j < 2 ; ++j ) {
+ m_global_elem_box[i][j] = 0 ;
+ m_global_node_box[i][j] = 0 ;
+ m_uses_elem_box[i][j] = 0 ;
+ m_uses_node_box[i][j] = 0 ;
+ }}
+ m_owns_node_count = 0 ;
+ m_send_node_count = 0 ;
+ }
+}
+
+void BoxElemPart::print( std::ostream & s ) const
+{
+ s << "BoxElemPart P[" << m_global_rank << ":" << m_global_size << "]"
+ << std::endl
+ << " elem_box {"
+ << " [" << m_uses_elem_box[0][0] << "," << m_uses_elem_box[0][1] << ")"
+ << " [" << m_uses_elem_box[1][0] << "," << m_uses_elem_box[1][1] << ")"
+ << " [" << m_uses_elem_box[2][0] << "," << m_uses_elem_box[2][1] << ")"
+ << " } / {"
+ << " [" << m_global_elem_box[0][0] << "," << m_global_elem_box[0][1] << ")"
+ << " [" << m_global_elem_box[1][0] << "," << m_global_elem_box[1][1] << ")"
+ << " [" << m_global_elem_box[2][0] << "," << m_global_elem_box[2][1] << ")"
+ << " }"
+ << std::endl
+ << " node_box {"
+ << " [" << m_owns_node_box[0][0][0] << "," << m_owns_node_box[0][0][1] << ")"
+ << " [" << m_owns_node_box[0][1][0] << "," << m_owns_node_box[0][1][1] << ")"
+ << " [" << m_owns_node_box[0][2][0] << "," << m_owns_node_box[0][2][1] << ")"
+ << " } / {"
+ << " [" << m_uses_node_box[0][0] << "," << m_uses_node_box[0][1] << ")"
+ << " [" << m_uses_node_box[1][0] << "," << m_uses_node_box[1][1] << ")"
+ << " [" << m_uses_node_box[2][0] << "," << m_uses_node_box[2][1] << ")"
+ << " } / {"
+ << " [" << m_global_node_box[0][0] << "," << m_global_node_box[0][1] << ")"
+ << " [" << m_global_node_box[1][0] << "," << m_global_node_box[1][1] << ")"
+ << " [" << m_global_node_box[2][0] << "," << m_global_node_box[2][1] << ")"
+ << " }"
+ << std::endl ;
+
+ for ( size_t i = 1 ; i < m_owns_node_count ; ++i ) {
+ s << " P[" << m_owns_node[i][0] << "]"
+ << " recv node_box {"
+ << " [" << m_owns_node_box[i][0][0] << "," << m_owns_node_box[i][0][1] << ")"
+ << " [" << m_owns_node_box[i][1][0] << "," << m_owns_node_box[i][1][1] << ")"
+ << " [" << m_owns_node_box[i][2][0] << "," << m_owns_node_box[i][2][1] << ")"
+ << " }"
+ << std::endl ;
+ }
+
+ for ( size_t i = 0 ; i < m_send_node_count ; ++i ) {
+ s << " P[" << m_send_node[i][0] << "]"
+ << " send node_box {"
+ << " [" << m_send_node_box[i][0][0] << "," << m_send_node_box[i][0][1] << ")"
+ << " [" << m_send_node_box[i][1][0] << "," << m_send_node_box[i][1][1] << ")"
+ << " [" << m_send_node_box[i][2][0] << "," << m_send_node_box[i][2][1] << ")"
+ << " }"
+ << std::endl ;
+ }
+}
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+//----------------------------------------------------------------------------
+
+
diff --git a/lib/kokkos/example/fixture/BoxElemPart.hpp b/lib/kokkos/example/fixture/BoxElemPart.hpp
new file mode 100644
index 000000000..98f44e7d9
--- /dev/null
+++ b/lib/kokkos/example/fixture/BoxElemPart.hpp
@@ -0,0 +1,320 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_BOXELEMPART_HPP
+#define KOKKOS_BOXELEMPART_HPP
+
+#include <utility>
+#include <ostream>
+#include <Kokkos_Macros.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+KOKKOS_INLINE_FUNCTION
+void box_intersect( size_t box[][2] ,
+ const size_t boxA[][2] ,
+ const size_t boxB[][2] )
+{
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ box[i][0] = boxA[i][0] > boxB[i][0] ? boxA[i][0] : boxB[i][0] ;
+ box[i][1] = boxA[i][1] < boxB[i][1] ? boxA[i][1] : boxB[i][1] ;
+ if ( box[i][0] > box[i][1] ) box[i][1] = box[i][0] ;
+ }
+}
+
+KOKKOS_INLINE_FUNCTION
+size_t box_count( const size_t box[][2] )
+{
+ return size_t( box[0][1] - box[0][0] ) *
+ size_t( box[1][1] - box[1][0] ) *
+ size_t( box[2][1] - box[2][0] );
+}
+
+KOKKOS_INLINE_FUNCTION
+void box_ghost_layer( const size_t global_box[][2] ,
+ const size_t local_box[][2] ,
+ const size_t ghost_layer ,
+ size_t ghost_box[][2] )
+{
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ ghost_box[i][0] = global_box[i][0] + ghost_layer > local_box[i][0] ? global_box[i][0] : local_box[i][0] - ghost_layer ;
+ ghost_box[i][1] = global_box[i][1] < local_box[i][1] + ghost_layer ? global_box[i][1] : local_box[i][1] + ghost_layer ;
+ }
+}
+
+void box_partition( const size_t global_size ,
+ const size_t global_rank ,
+ const size_t global_box[][2] ,
+ size_t box[][2] );
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Example {
+
+/** \brief Partition a box of hexahedral elements among subdomains.
+ *
+ * Nodes are ordered locally as follows:
+ * { owned_by[ this_process ] ,
+ * owned_by[ neighbor_process[0] ] ,
+ * owned_by[ neighbor_process[1] ] ,
+ * owned_by[ neighbor_process[2] ] ,
+ * ... };
+ */
+class BoxElemPart {
+public:
+
+ enum Decompose { DecomposeNode , DecomposeElem };
+ enum ElemOrder { ElemLinear , ElemQuadratic };
+
+ bool ok() const { return m_ok ; }
+
+ BoxElemPart( const ElemOrder elem_order ,
+ const Decompose decompose ,
+ const size_t global_size ,
+ const size_t global_rank ,
+ const size_t elem_nx ,
+ const size_t elem_ny ,
+ const size_t elem_nz );
+
+ KOKKOS_INLINE_FUNCTION
+ size_t global_elem_count() const
+ { return Kokkos::Example::box_count( m_global_elem_box ); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t global_node_count() const
+ { return Kokkos::Example::box_count( m_global_node_box ); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t uses_elem_count() const
+ { return Kokkos::Example::box_count( m_uses_elem_box ); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t owns_node_count() const
+ { return Kokkos::Example::box_count( m_owns_node_box[0] ); }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t uses_node_count() const
+ { return Kokkos::Example::box_count( m_uses_node_box ); }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ size_t uses_elem_offset( const size_t ix ,
+ const size_t iy ,
+ const size_t iz ) const
+ {
+ return size_t( ix - m_uses_elem_box[0][0] ) + size_t( m_uses_elem_box[0][1] - m_uses_elem_box[0][0] ) * (
+ size_t( iy - m_uses_elem_box[1][0] ) + size_t( m_uses_elem_box[1][1] - m_uses_elem_box[1][0] ) * (
+ size_t( iz - m_uses_elem_box[2][0] ) ) );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void uses_elem_coord( size_t lid , size_t c[] ) const
+ {
+ const size_t nx = m_uses_elem_box[0][1] - m_uses_elem_box[0][0] ;
+ const size_t ny = m_uses_elem_box[1][1] - m_uses_elem_box[1][0] ;
+
+ c[0] = m_uses_elem_box[0][0] + lid % nx ; lid /= nx ;
+ c[1] = m_uses_elem_box[1][0] + lid % ny ; lid /= ny ;
+ c[2] = m_uses_elem_box[2][0] + lid ;
+ }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ size_t global_coord_max( size_t axis ) const
+ { return m_global_node_box[axis][1] - 1 ; }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void local_node_coord( size_t lid , size_t coord[] ) const
+ {
+ // Local id within an 'owns' block (has sentinal)
+ size_t j = 0 ;
+ while ( m_owns_node[j][1] <= lid ) { lid -= m_owns_node[j][1] ; ++j ; }
+
+ // Map to global coordinates:
+ const size_t nx = m_owns_node_box[j][0][1] - m_owns_node_box[j][0][0] ;
+ const size_t ny = m_owns_node_box[j][1][1] - m_owns_node_box[j][1][0] ;
+
+ coord[0] = m_owns_node_box[j][0][0] + lid % nx ; lid /= nx ;
+ coord[1] = m_owns_node_box[j][1][0] + lid % ny ; lid /= ny ;
+ coord[2] = m_owns_node_box[j][2][0] + lid ;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t local_node_id( const size_t c[] ) const
+ {
+ // Find which 'owns' block and accumulate the offset of this block:
+ size_t lid = 0 ;
+ size_t j = 0 ;
+ while ( ! ( m_owns_node_box[j][0][0] <= c[0] && c[0] < m_owns_node_box[j][0][1] &&
+ m_owns_node_box[j][1][0] <= c[1] && c[1] < m_owns_node_box[j][1][1] &&
+ m_owns_node_box[j][2][0] <= c[2] && c[2] < m_owns_node_box[j][2][1] ) ) {
+
+ lid += m_owns_node[j][1] ;
+ ++j ;
+ }
+
+ // Map offset to the block plus offset within the block:
+ return lid +
+ size_t( c[0] - m_owns_node_box[j][0][0] ) + size_t( m_owns_node_box[j][0][1] - m_owns_node_box[j][0][0] ) * (
+ size_t( c[1] - m_owns_node_box[j][1][0] ) + size_t( m_owns_node_box[j][1][1] - m_owns_node_box[j][1][0] ) * (
+ size_t( c[2] - m_owns_node_box[j][2][0] ) ) );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t global_node_id( const size_t c[] ) const
+ {
+ return size_t( c[0] - m_global_node_box[0][0] ) + size_t( m_global_node_box[0][1] - m_global_node_box[0][0] ) * (
+ size_t( c[1] - m_global_node_box[1][0] ) + size_t( m_global_node_box[1][1] - m_global_node_box[1][0] ) * (
+ size_t( c[2] - m_global_node_box[2][0] ) ) );
+ }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ size_t recv_node_msg_count() const { return m_owns_node_count - 1 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t recv_node_rank( size_t msg ) const { return m_owns_node[msg+1][0] ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t recv_node_count( size_t msg ) const { return m_owns_node[msg+1][1] ; }
+
+ //----------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ size_t send_node_msg_count() const { return m_send_node_count ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t send_node_rank( size_t msg ) const { return m_send_node[msg][0] ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t send_node_count( size_t msg ) const { return m_send_node[msg][1] ; }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t send_node_id_count() const
+ {
+ size_t count = 0 ;
+ for ( size_t i = 0 ; i < m_send_node_count ; ++i ) {
+ count += m_send_node[i][1] ;
+ }
+ return count ;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ size_t send_node_id( size_t item ) const
+ {
+ // Find which send list this send item is in:
+ size_t j = 0 ;
+ while ( m_send_node[j][1] <= item ) { item -= m_send_node[j][1] ; ++j ; }
+
+ // Map to global coordinate:
+ const size_t nx = m_send_node_box[j][0][1] - m_send_node_box[j][0][0] ;
+ const size_t ny = m_send_node_box[j][1][1] - m_send_node_box[j][1][0] ;
+
+ size_t c[3] ;
+
+ c[0] = m_send_node_box[j][0][0] + item % nx ; item /= nx ;
+ c[1] = m_send_node_box[j][1][0] + item % ny ; item /= ny ;
+ c[2] = m_send_node_box[j][2][0] + item ;
+
+ // Map to local id:
+ return size_t( c[0] - m_owns_node_box[0][0][0] ) + size_t( m_owns_node_box[0][0][1] - m_owns_node_box[0][0][0] ) * (
+ size_t( c[1] - m_owns_node_box[0][1][0] ) + size_t( m_owns_node_box[0][1][1] - m_owns_node_box[0][1][0] ) * (
+ size_t( c[2] - m_owns_node_box[0][2][0] ) ) );
+ }
+
+ //----------------------------------------
+
+ void print( std::ostream & s ) const ;
+
+private:
+
+ // Maximum number of processes in a neighborhood, including this process
+ enum { PROC_NEIGH_MAX = 64 };
+
+ void local( const size_t rank ,
+ size_t uses_elem[][2] ,
+ size_t owns_node[][2] ,
+ size_t uses_node[][2] ) const ;
+
+ size_t m_global_size ;
+ size_t m_global_rank ;
+
+ Decompose m_decompose ;
+ ElemOrder m_elem_order ;
+
+ size_t m_global_elem_box[3][2] ;
+ size_t m_global_node_box[3][2] ;
+ size_t m_uses_elem_box[3][2] ;
+ size_t m_uses_node_box[3][2] ;
+
+ // [ processor rank , count ]
+ size_t m_owns_node_box[ PROC_NEIGH_MAX ][3][2] ;
+ size_t m_owns_node[ PROC_NEIGH_MAX ][2] ;
+ size_t m_owns_node_count ;
+
+ size_t m_send_node_box[ PROC_NEIGH_MAX ][3][2] ;
+ size_t m_send_node[ PROC_NEIGH_MAX ][2] ;
+ size_t m_send_node_count ;
+
+ bool m_ok ;
+};
+
+} // namespace Example
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_BOXELEMPART_HPP */
+
diff --git a/lib/kokkos/example/fixture/HexElement.hpp b/lib/kokkos/example/fixture/HexElement.hpp
new file mode 100644
index 000000000..cb39358f9
--- /dev/null
+++ b/lib/kokkos/example/fixture/HexElement.hpp
@@ -0,0 +1,270 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HEXELEMENT_HPP
+#define KOKKOS_HEXELEMENT_HPP
+
+namespace Kokkos {
+namespace Example {
+
+template< unsigned NodeCount >
+class HexElement_TensorData ;
+
+template< unsigned NodeCount , class Device >
+class HexElement_TensorEval ;
+
+//----------------------------------------------------------------------------
+/** \brief Evaluate Hex element on interval [-1,1]^3 */
+template<>
+class HexElement_TensorData< 8 > {
+public:
+
+ static const unsigned element_node_count = 8 ;
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned integration_count_1d = 2 ;
+ static const unsigned function_count_1d = 2 ;
+
+ float values_1d [ function_count_1d ][ integration_count_1d ];
+ float derivs_1d [ function_count_1d ][ integration_count_1d ];
+ float weights_1d[ integration_count_1d ];
+
+ unsigned char eval_map[ element_node_count ][4] ;
+
+ static float eval_value_1d( const unsigned jf , const float x )
+ {
+ return 0 == jf ? 0.5 * ( 1.0 - x ) : (
+ 1 == jf ? 0.5 * ( 1.0 + x ) : 0 );
+ }
+
+ static float eval_deriv_1d( const unsigned jf , const float )
+ {
+ return 0 == jf ? -0.5 : (
+ 1 == jf ? 0.5 : 0 );
+ }
+
+ HexElement_TensorData()
+ {
+ const unsigned char tmp_map[ element_node_count ][ spatial_dimension ] =
+ { { 0 , 0 , 0 },
+ { 1 , 0 , 0 },
+ { 1 , 1 , 0 },
+ { 0 , 1 , 0 },
+ { 0 , 0 , 1 },
+ { 1 , 0 , 1 },
+ { 1 , 1 , 1 },
+ { 0 , 1 , 1 } };
+
+ weights_1d[0] = 1 ;
+ weights_1d[1] = 1 ;
+
+ const float points_1d[ integration_count_1d ] =
+ { -0.577350269 , 0.577350269 };
+
+ for ( unsigned i = 0 ; i < element_node_count ; ++i ) {
+ eval_map[i][0] = tmp_map[i][0];
+ eval_map[i][1] = tmp_map[i][1];
+ eval_map[i][2] = tmp_map[i][2];
+ }
+
+ for ( unsigned xp = 0 ; xp < integration_count_1d ; ++xp ) {
+ for ( unsigned xf = 0 ; xf < function_count_1d ; ++xf ) {
+ values_1d[xp][xf] = eval_value_1d( xf , points_1d[xp] );
+ derivs_1d[xp][xf] = eval_deriv_1d( xf , points_1d[xp] );
+ }}
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template<>
+class HexElement_TensorData< 27 > {
+public:
+
+ static const unsigned element_node_count = 27 ;
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned integration_count_1d = 3 ;
+ static const unsigned function_count_1d = 3 ;
+
+ float values_1d [ function_count_1d ][ integration_count_1d ];
+ float derivs_1d [ function_count_1d ][ integration_count_1d ];
+ float weights_1d[ integration_count_1d ];
+
+ unsigned char eval_map[ element_node_count ][4] ;
+
+ // sizeof(EvaluateElementHex) = 111 bytes =
+ // sizeof(float) * 9 +
+ // sizeof(float) * 9 +
+ // sizeof(float) * 3 +
+ // sizeof(char) * 27
+
+ static float eval_value_1d( const unsigned jf , const float p )
+ {
+ return 0 == jf ? 0.5 * p * ( p - 1 ) : (
+ 1 == jf ? 1.0 - p * p : (
+ 2 == jf ? 0.5 * p * ( p + 1 ) : 0 ));
+ }
+
+ static float eval_deriv_1d( const unsigned jf , const float p )
+ {
+ return 0 == jf ? p - 0.5 : (
+ 1 == jf ? -2.0 * p : (
+ 2 == jf ? p + 0.5 : 0 ));
+ }
+
+ HexElement_TensorData()
+ {
+ const unsigned char tmp_map[ element_node_count ][ spatial_dimension ] =
+ { { 0 , 0 , 0 },
+ { 2 , 0 , 0 },
+ { 2 , 2 , 0 },
+ { 0 , 2 , 0 },
+ { 0 , 0 , 2 },
+ { 2 , 0 , 2 },
+ { 2 , 2 , 2 },
+ { 0 , 2 , 2 },
+ { 1 , 0 , 0 },
+ { 2 , 1 , 0 },
+ { 1 , 2 , 0 },
+ { 0 , 1 , 0 },
+ { 0 , 0 , 1 },
+ { 2 , 0 , 1 },
+ { 2 , 2 , 1 },
+ { 0 , 2 , 1 },
+ { 1 , 0 , 2 },
+ { 2 , 1 , 2 },
+ { 1 , 2 , 2 },
+ { 0 , 1 , 2 },
+ { 1 , 1 , 1 },
+ { 1 , 1 , 0 },
+ { 1 , 1 , 2 },
+ { 0 , 1 , 1 },
+ { 2 , 1 , 1 },
+ { 1 , 0 , 1 },
+ { 1 , 2 , 1 } };
+
+ // Interval [-1,1]
+
+ weights_1d[0] = 0.555555556 ;
+ weights_1d[1] = 0.888888889 ;
+ weights_1d[2] = 0.555555556 ;
+
+ const float points_1d[3] = { -0.774596669 ,
+ 0.000000000 ,
+ 0.774596669 };
+
+ for ( unsigned i = 0 ; i < element_node_count ; ++i ) {
+ eval_map[i][0] = tmp_map[i][0];
+ eval_map[i][1] = tmp_map[i][1];
+ eval_map[i][2] = tmp_map[i][2];
+ }
+
+ for ( unsigned xp = 0 ; xp < integration_count_1d ; ++xp ) {
+ for ( unsigned xf = 0 ; xf < function_count_1d ; ++xf ) {
+ values_1d[xp][xf] = eval_value_1d( xf , points_1d[xp] );
+ derivs_1d[xp][xf] = eval_deriv_1d( xf , points_1d[xp] );
+ }}
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< unsigned NodeCount >
+class HexElement_Data {
+public:
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned element_node_count = NodeCount ;
+ static const unsigned integration_count = NodeCount ;
+ static const unsigned function_count = NodeCount ;
+
+ float weights[ integration_count ] ;
+ float values[ integration_count ][ function_count ];
+ float gradients[ integration_count ][ spatial_dimension ][ function_count ];
+
+ HexElement_Data()
+ {
+ HexElement_TensorData< NodeCount > tensor_data ;
+
+ for ( unsigned ip = 0 ; ip < integration_count ; ++ip ) {
+
+ const unsigned ipx = tensor_data.eval_map[ip][0] ;
+ const unsigned ipy = tensor_data.eval_map[ip][1] ;
+ const unsigned ipz = tensor_data.eval_map[ip][2] ;
+
+ weights[ip] = tensor_data.weights_1d[ ipx ] *
+ tensor_data.weights_1d[ ipy ] *
+ tensor_data.weights_1d[ ipz ] ;
+
+ for ( unsigned jf = 0 ; jf < function_count ; ++jf ) {
+
+ const unsigned jfx = tensor_data.eval_map[jf][0] ;
+ const unsigned jfy = tensor_data.eval_map[jf][1] ;
+ const unsigned jfz = tensor_data.eval_map[jf][2] ;
+
+ values[ip][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][0][jf] = tensor_data.derivs_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][1][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.derivs_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][2][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.derivs_1d[ ipz ][ jfz ] ;
+ }
+ }
+ }
+};
+
+//----------------------------------------------------------------------------
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #ifndef KOKKOS_HEXELEMENT_HPP */
+
+
diff --git a/lib/kokkos/example/fixture/Main.cpp b/lib/kokkos/example/fixture/Main.cpp
new file mode 100644
index 000000000..d80828ca5
--- /dev/null
+++ b/lib/kokkos/example/fixture/Main.cpp
@@ -0,0 +1,304 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+#include <utility>
+#include <iostream>
+
+#include <Kokkos_Core.hpp>
+
+#include <BoxElemPart.hpp>
+
+namespace Kokkos {
+namespace Example {
+template< class > void test_fixture();
+}
+}
+
+int test_box( const size_t global_size
+ , const size_t global_box[][2]
+ , const bool print_verbose )
+{
+ size_t global_count = 0 ;
+ size_t global_max = 0 ;
+ size_t global_min = Kokkos::Example::box_count( global_box );
+ size_t global_box_max[3][2] = { { 0 , 0 } , { 0 , 0 } , { 0 , 0 } };
+ size_t global_box_min[3][2] = { { 0 , global_box[0][1] } , { 0 , global_box[1][1] } , { 0 , global_box[2][1] } };
+ size_t intersect_error = 0 ;
+ size_t neighbor_max = 0 ;
+
+ for ( size_t global_rank = 0 ; global_rank < global_size ; ++global_rank ) {
+ size_t box[3][2] = { { 0 , global_box[0][1] } , { 0 , global_box[1][1] } , { 0 , global_box[2][1] } };
+ size_t ghost_box[3][2] ;
+ size_t neighbor_count = 0 ;
+
+ Kokkos::Example::box_partition( global_size , global_rank , global_box , box );
+
+ Kokkos::Example::box_ghost_layer( global_box , box , 1 , ghost_box );
+
+ {
+ const size_t n = Kokkos::Example::box_count( box );
+
+ for ( int i = 0 ; i < 3 ; ++i ) {
+ if ( ( box[i][1] - box[i][0] ) < ( global_box_min[i][1] - global_box_min[i][0] ) ) {
+ global_box_min[i][0] = box[i][0] ;
+ global_box_min[i][1] = box[i][1] ;
+ }
+ if ( ( box[i][1] - box[i][0] ) > ( global_box_max[i][1] - global_box_max[i][0] ) ) {
+ global_box_max[i][0] = box[i][0] ;
+ global_box_max[i][1] = box[i][1] ;
+ }
+ }
+
+ global_max = std::max( global_max , n );
+ global_min = std::min( global_min , n );
+ global_count += n ;
+ }
+
+ for ( size_t other_rank = 0 ; other_rank < global_size ; ++other_rank ) {
+
+ if ( other_rank == global_rank ) continue ;
+
+ size_t other_box[3][2] = { { 0 , global_box[0][1] } , { 0 , global_box[1][1] } , { 0 , global_box[2][1] } };
+ size_t intersect_box[3][2] ;
+
+ Kokkos::Example::box_partition( global_size , other_rank , global_box , other_box );
+
+ Kokkos::Example::box_intersect( intersect_box , box , other_box );
+
+ const size_t n = Kokkos::Example::box_count( intersect_box );
+
+ intersect_error += n ;
+
+ Kokkos::Example::box_intersect( intersect_box , ghost_box , other_box );
+
+ neighbor_count += Kokkos::Example::box_count( intersect_box ) ? 1 : 0 ;
+
+ if ( n ) {
+ std::cout << "box partition intersection error" << std::endl ;
+ std::cout << "box = {"
+ << " [ " << box[0][0] << " , " << box[0][1] << " )"
+ << " [ " << box[1][0] << " , " << box[1][1] << " )"
+ << " [ " << box[2][0] << " , " << box[2][1] << " )"
+ << " }" << std::endl ;
+ std::cout << "other_box = {"
+ << " [ " << other_box[0][0] << " , " << other_box[0][1] << " )"
+ << " [ " << other_box[1][0] << " , " << other_box[1][1] << " )"
+ << " [ " << other_box[2][0] << " , " << other_box[2][1] << " )"
+ << " }" << std::endl ;
+ return 0 ;
+ }
+ }
+
+ neighbor_max = std::max( neighbor_max , neighbor_count );
+ }
+
+ if ( print_verbose ) {
+
+ std::cout << "global_part = " << global_size << std::endl ;
+ std::cout << "global_box = { "
+ << " [ " << global_box[0][0] << " .. " << global_box[0][1] << " ) X"
+ << " [ " << global_box[1][0] << " .. " << global_box[1][1] << " ) X"
+ << " [ " << global_box[2][0] << " .. " << global_box[2][1] << " )"
+ << " }" << std::endl ;
+ std::cout << "count( global_box ) = " << Kokkos::Example::box_count( global_box ) << std::endl ;
+ std::cout << "sum partition( global_box ) = " << global_count << std::endl ;
+ std::cout << "avg partition( global_box ) = " << size_t( double(global_count) / double(global_size)) << std::endl ;
+ std::cout << "min partition( global_box ) = " << global_min << std::endl ;
+ std::cout << "min part X ( global_box ) = [ " << global_box_min[0][0] << " .. " << global_box_min[0][1] << " )" << std::endl ;
+ std::cout << "min part Y ( global_box ) = [ " << global_box_min[1][0] << " .. " << global_box_min[1][1] << " )" << std::endl ;
+ std::cout << "min part Z ( global_box ) = [ " << global_box_min[2][0] << " .. " << global_box_min[2][1] << " )" << std::endl ;
+ std::cout << "max partition( global_box ) = " << global_max << std::endl ;
+ std::cout << "max part X ( global_box ) = [ " << global_box_max[0][0] << " .. " << global_box_max[0][1] << " )" << std::endl ;
+ std::cout << "max part Y ( global_box ) = [ " << global_box_max[1][0] << " .. " << global_box_max[1][1] << " )" << std::endl ;
+ std::cout << "max part Z ( global_box ) = [ " << global_box_max[2][0] << " .. " << global_box_max[2][1] << " )" << std::endl ;
+ std::cout << "sum intersect( global_box ) = " << intersect_error << std::endl ;
+ std::cout << "max neighbor = " << neighbor_max << std::endl ;
+ }
+
+ return neighbor_max ;
+}
+
+void test_elem()
+{
+ const Kokkos::Example::BoxElemPart::Decompose
+ decompose = Kokkos::Example::BoxElemPart:: DecomposeElem ; // DecomposeElem | DecomposeNode ;
+ const size_t global_size = 256 ;
+ const size_t global_nx = 100 ;
+ const size_t global_ny = 120 ;
+ const size_t global_nz = 140 ;
+
+ double node_count_avg = 0 ;
+ size_t node_count_max = 0 ;
+ size_t node_count_min = ( global_nx + 1 ) * ( global_ny + 1 ) * ( global_nz + 1 );
+ double elem_count_avg = 0 ;
+ size_t elem_count_max = 0 ;
+ size_t elem_count_min = global_nx * global_ny * global_nz ;
+ double recv_count_avg = 0 ;
+ size_t recv_count_max = 0 ;
+ size_t recv_count_min = global_size ;
+ double send_count_avg = 0 ;
+ size_t send_count_max = 0 ;
+ size_t send_count_min = global_size ;
+
+ for ( size_t r = 0 ; r < global_size ; ++r ) {
+ const Kokkos::Example::BoxElemPart
+ fixture( Kokkos::Example::BoxElemPart::ElemLinear ,
+ decompose , global_size , r , global_nx , global_ny , global_nz );
+
+ // Print a sample:
+
+ // if ( r == global_size * 2 / 3 ) fixture.print( std::cout );
+
+ // Verify recv/send alignment:
+
+ {
+ size_t recv_lid = fixture.owns_node_count();
+
+ for ( size_t i = 0 ; i < fixture.recv_node_msg_count() ; ++i ) {
+ const size_t recv_rank = fixture.recv_node_rank( i );
+ const size_t recv_count = fixture.recv_node_count( i );
+
+ const Kokkos::Example::BoxElemPart other_fixture(
+ Kokkos::Example::BoxElemPart::ElemLinear ,
+ decompose , global_size , recv_rank , global_nx , global_ny , global_nz );
+
+ size_t send_item = 0 ;
+
+ size_t j = 0 ;
+ while ( j < other_fixture.send_node_msg_count() && other_fixture.send_node_rank(j) != r ) {
+ send_item += other_fixture.send_node_count( j );
+ ++j ;
+ }
+
+ if ( recv_count != other_fixture.send_node_count(j) ) {
+ std::cout << "Error P[" << r << "].recv(" << recv_count << ") != "
+ << "P[" << recv_rank << "].send(" << other_fixture.send_node_count(j) << ")"
+ << std::endl ;
+ }
+ else {
+
+ for ( size_t k = 0 ; k < recv_count ; ++k , ++send_item , ++recv_lid ) {
+
+ const size_t send_lid = other_fixture.send_node_id( send_item );
+
+ size_t recv_coord[3] , send_coord[3] ;
+
+ fixture.local_node_coord( recv_lid , recv_coord );
+
+ other_fixture.local_node_coord( send_lid , send_coord );
+
+ if ( recv_coord[0] != send_coord[0] ||
+ recv_coord[1] != send_coord[1] ||
+ recv_coord[2] != send_coord[2] ) {
+ std::cout << "Error P[" << r << "].recv[" << recv_lid << "]{ "
+ << recv_coord[0] << " , "
+ << recv_coord[1] << " , "
+ << recv_coord[2] << " } != "
+ << "P[" << recv_rank << "].send[" << send_lid << "]{ "
+ << send_coord[0] << " , "
+ << send_coord[1] << " , "
+ << send_coord[2] << " }"
+ << std::endl ;
+ }
+ }
+ }
+ }
+ }
+
+ node_count_avg += fixture.owns_node_count();
+ elem_count_avg += fixture.uses_elem_count();
+ recv_count_avg += fixture.recv_node_msg_count();
+ send_count_avg += fixture.send_node_msg_count();
+
+ elem_count_min = std::min( (size_t) fixture.uses_elem_count() , elem_count_min );
+ elem_count_max = std::max( (size_t) fixture.uses_elem_count() , elem_count_max );
+ node_count_min = std::min( (size_t) fixture.owns_node_count() , node_count_min );
+ node_count_max = std::max( (size_t) fixture.owns_node_count() , node_count_max );
+
+ recv_count_max = std::max( (size_t) fixture.recv_node_msg_count() , recv_count_max );
+ recv_count_min = std::min( (size_t) fixture.recv_node_msg_count() , recv_count_min );
+ send_count_max = std::max( (size_t) fixture.send_node_msg_count() , send_count_max );
+ send_count_min = std::min( (size_t) fixture.send_node_msg_count() , send_count_min );
+ }
+
+ node_count_avg /= double(global_size);
+ elem_count_avg /= double(global_size);
+ recv_count_avg /= double(global_size);
+ send_count_avg /= double(global_size);
+
+ std::cout << "Elem min(" << elem_count_min << ") avg(" << elem_count_avg << ") max(" << elem_count_max << ") " << std::endl
+ << "Node min(" << node_count_min << ") avg(" << node_count_avg << ") max(" << node_count_max << ") " << std::endl
+ << "Recv min(" << recv_count_min << ") avg(" << recv_count_avg << ") max(" << recv_count_max << ") " << std::endl
+ << "Send min(" << send_count_min << ") avg(" << send_count_avg << ") max(" << send_count_max << ") " << std::endl
+ ;
+}
+
+int main()
+{
+ for ( int i = 1 ; i <= 32 ; ++i ) {
+ const size_t global_size = 16 * i ;
+ const size_t global_box[3][2] = { { 0 , 65 } , { 0 , 65 } , { 0 , 65 } };
+ if ( 30 < test_box( global_size , global_box , false ) ) {
+ test_box( global_size , global_box , true );
+ }
+ }
+
+// test_elem();
+
+ {
+ std::cout << "test_fixture< Host >" << std::endl ;
+ Kokkos::HostSpace::execution_space::initialize( 1 );
+ Kokkos::Example::test_fixture< Kokkos::HostSpace::execution_space >();
+ Kokkos::HostSpace::execution_space::finalize();
+ }
+
+#if defined( KOKKOS_HAVE_CUDA )
+ {
+ std::cout << "test_fixture< Cuda >" << std::endl ;
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
+ Kokkos::Example::test_fixture< Kokkos::Cuda >();
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+ }
+#endif
+}
+
diff --git a/lib/kokkos/example/fixture/Makefile b/lib/kokkos/example/fixture/Makefile
new file mode 100644
index 000000000..1e3770cf7
--- /dev/null
+++ b/lib/kokkos/example/fixture/Makefile
@@ -0,0 +1,49 @@
+KOKKOS_PATH = ../..
+
+vpath %.cpp ${KOKKOS_PATH}/example/fixture
+
+EXAMPLE_HEADERS = $(wildcard $(KOKKOS_PATH)/example/common/*.hpp ${KOKKOS_PATH}/example/fixture/*.hpp )
+
+default: build_all
+ echo "End Build"
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
+ CXX = nvcc_wrapper
+ CXXFLAGS ?= -O3
+ LINK = $(CXX)
+ LDFLAGS ?= -lpthread
+else
+ CXX ?= g++
+ CXXFLAGS ?= -O3
+ LINK ?= $(CXX)
+ LDFLAGS ?= -lpthread
+endif
+
+KOKKOS_CXXFLAGS += \
+ -I${KOKKOS_PATH}/example/common \
+ -I${KOKKOS_PATH}/example/fixture
+
+OBJ_EXAMPLE_FIXTURE = Main.o TestFixture.o BoxElemPart.o
+EXE_EXAMPLE_FIXTURE = KokkosExample_Fixture
+
+TARGETS = $(EXE_EXAMPLE_FIXTURE)
+
+#TEST_TARGETS =
+
+$(EXE_EXAMPLE_FIXTURE) : $(OBJ_EXAMPLE_FIXTURE) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LDFLAGS) $(EXTRA_PATH) $(OBJ_EXAMPLE_FIXTURE) $(KOKKOS_LIBS) $(LIB) -o $(EXE_EXAMPLE_FIXTURE)
+
+
+build_all : $(TARGETS)
+
+
+test : build_all
+
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS) $(EXAMPLE_HEADERS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
+
diff --git a/lib/kokkos/core/src/Kokkos_Vectorization.hpp b/lib/kokkos/example/fixture/TestFixture.cpp
old mode 100755
new mode 100644
similarity index 88%
copy from lib/kokkos/core/src/Kokkos_Vectorization.hpp
copy to lib/kokkos/example/fixture/TestFixture.cpp
index a60c0ecaa..9cf2f0732
--- a/lib/kokkos/core/src/Kokkos_Vectorization.hpp
+++ b/lib/kokkos/example/fixture/TestFixture.cpp
@@ -1,53 +1,58 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-/// \file Kokkos_Vectorization.hpp
-/// \brief Declaration and definition of Kokkos::Vectorization interface.
-#ifndef KOKKOS_VECTORIZATION_HPP
-#define KOKKOS_VECTORIZATION_HPP
+#include <Kokkos_Core.hpp>
+#include <TestFixture.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+template void test_fixture< Kokkos::HostSpace::execution_space >();
#if defined( KOKKOS_HAVE_CUDA )
-#include <Cuda/Kokkos_Cuda_Vectorization.hpp>
+template void test_fixture<Kokkos::Cuda>();
#endif
-#endif
+} /* namespace Example */
+} /* namespace Kokkos */
+
diff --git a/lib/kokkos/example/fixture/TestFixture.hpp b/lib/kokkos/example/fixture/TestFixture.hpp
new file mode 100644
index 000000000..dbf5ca56f
--- /dev/null
+++ b/lib/kokkos/example/fixture/TestFixture.hpp
@@ -0,0 +1,156 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXAMPLE_TESTFIXTURE_HPP
+#define KOKKOS_EXAMPLE_TESTFIXTURE_HPP
+
+#include <utility>
+#include <iostream>
+
+#include <Kokkos_Core.hpp>
+
+#include <BoxElemPart.hpp>
+#include <BoxElemFixture.hpp>
+
+namespace Kokkos {
+namespace Example {
+
+template< class Device >
+struct FixtureVerifyElemNodeCoord
+{
+ typedef Device execution_space ;
+
+ typedef struct { size_t success , error ; } value_type ;
+
+ typedef Kokkos::Example::BoxElemFixture< Device , Kokkos::Example::BoxElemPart::ElemLinear > FixtureType ;
+
+ FixtureType m_fixture ;
+
+ KOKKOS_INLINE_FUNCTION
+ void init( value_type & update ) const { update.success = update.error = 0 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ void join( volatile value_type & update ,
+ volatile const value_type & input ) const
+ {
+ update.success += input.success ;
+ update.error += input.error ;
+ }
+
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( size_t ielem , value_type & update ) const
+ {
+ unsigned node_coord[ FixtureType::ElemNode ][3] ;
+
+ for ( unsigned i = 0 ; i < FixtureType::ElemNode ; ++i ) {
+ const unsigned node_id = m_fixture.elem_node(ielem,i);
+ node_coord[i][0] = m_fixture.node_grid(node_id,0);
+ node_coord[i][1] = m_fixture.node_grid(node_id,1);
+ node_coord[i][2] = m_fixture.node_grid(node_id,2);
+ }
+
+ int error = 0 ;
+ for ( unsigned i = 1 ; i < FixtureType::ElemNode ; ++i ) {
+ if ( node_coord[0][0] + m_fixture.elem_node_local(i,0) != node_coord[i][0] ||
+ node_coord[0][1] + m_fixture.elem_node_local(i,1) != node_coord[i][1] ||
+ node_coord[0][2] + m_fixture.elem_node_local(i,2) != node_coord[i][2] ) {
+ error = 1 ;
+ }
+ }
+
+ if ( error ) {
+ ++update.error ;
+ }
+ else {
+ ++update.success ;
+ }
+ }
+
+ FixtureVerifyElemNodeCoord( const FixtureType & f ) : m_fixture(f) {}
+};
+
+
+template< class Device >
+void test_fixture()
+{
+ typedef Kokkos::Example::BoxElemFixture< Device , Kokkos::Example::BoxElemPart::ElemLinear > FixtureType ;
+
+ const Kokkos::Example::BoxElemPart::Decompose
+ decompose = Kokkos::Example::BoxElemPart:: DecomposeElem ; // DecomposeElem | DecomposeNode ;
+
+ const unsigned global_size = 256 ;
+ const unsigned global_nx = 400 ;
+ const unsigned global_ny = 400 ;
+ const unsigned global_nz = 400 ;
+
+ for ( unsigned my_rank = 0 ; my_rank < global_size ; ++my_rank ) {
+
+ const FixtureType fixture( decompose , global_size , my_rank , global_nx , global_ny , global_nz );
+
+ // Verify grid coordinates of element's nodes
+
+ typename FixtureVerifyElemNodeCoord<Device>::value_type result = { 0 , 0 };
+
+ Kokkos::parallel_reduce( fixture.elem_node().dimension_0() , FixtureVerifyElemNodeCoord<Device>( fixture ) , result );
+
+ if ( result.error ) {
+ std::cout << "P[" << my_rank << ":" << global_size
+ << "] Fixture elem_node_coord"
+ << " success(" << result.success << ")"
+ << " error(" << result.error << ")"
+ << std::endl ;
+ }
+
+ // Check send/recv alignment
+
+
+ }
+}
+
+
+} /* namespace Example */
+} /* namespace Kokkos */
+
+#endif /* #ifndef KOKKOS_EXAMPLE_TESTFIXTURE_HPP */
+
diff --git a/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp b/lib/kokkos/example/global_2_local_ids/G2L.hpp
old mode 100755
new mode 100644
similarity index 69%
copy from lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
copy to lib/kokkos/example/global_2_local_ids/G2L.hpp
index fb70b8fe2..d4198c61a
--- a/lib/kokkos/containers/performance_tests/TestGlobal2LocalIds.hpp
+++ b/lib/kokkos/example/global_2_local_ids/G2L.hpp
@@ -1,231 +1,266 @@
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
-#ifndef KOKKOS_TEST_GLOBAL_TO_LOCAL_IDS_HPP
-#define KOKKOS_TEST_GLOBAL_TO_LOCAL_IDS_HPP
+#ifndef KOKKOS_GLOBAL_TO_LOCAL_IDS_HPP
+#define KOKKOS_GLOBAL_TO_LOCAL_IDS_HPP
#include <Kokkos_Core.hpp>
+
#include <Kokkos_UnorderedMap.hpp>
+
#include <vector>
#include <algorithm>
+#include <iomanip>
#include <impl/Kokkos_Timer.hpp>
// This test will simulate global ids
-namespace Performance {
+namespace G2L {
static const unsigned begin_id_size = 256u;
-static const unsigned end_id_size = 1u << 22;
+static const unsigned end_id_size = 1u << 25;
static const unsigned id_step = 2u;
+//use to help generate global ids
union helper
{
uint32_t word;
uint8_t byte[4];
};
+//generate a unique global id from the local id
template <typename Device>
struct generate_ids
{
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
typedef Kokkos::View<uint32_t*,execution_space> local_id_view;
local_id_view local_2_global;
generate_ids( local_id_view & ids)
: local_2_global(ids)
{
- Kokkos::parallel_for(local_2_global.dimension_0(), *this);
+ Kokkos::parallel_for(local_2_global.size(), *this);
}
KOKKOS_INLINE_FUNCTION
void operator()(size_type i) const
{
helper x = {static_cast<uint32_t>(i)};
// shuffle the bytes of i to create a unique, semi-random global_id
x.word = ~x.word;
uint8_t tmp = x.byte[3];
x.byte[3] = x.byte[1];
x.byte[1] = tmp;
tmp = x.byte[2];
x.byte[2] = x.byte[0];
x.byte[0] = tmp;
local_2_global[i] = x.word;
}
};
+// fill a map of global_id -> local_id
template <typename Device>
struct fill_map
{
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
typedef Kokkos::View<const uint32_t*,execution_space, Kokkos::MemoryRandomAccess> local_id_view;
typedef Kokkos::UnorderedMap<uint32_t,size_type,execution_space> global_id_view;
global_id_view global_2_local;
local_id_view local_2_global;
fill_map( global_id_view gIds, local_id_view lIds)
: global_2_local(gIds) , local_2_global(lIds)
{
- Kokkos::parallel_for(local_2_global.dimension_0(), *this);
+ Kokkos::parallel_for(local_2_global.size(), *this);
}
KOKKOS_INLINE_FUNCTION
void operator()(size_type i) const
{
global_2_local.insert( local_2_global[i], i);
}
};
+// check that the global id is found and that it maps to the local id
template <typename Device>
struct find_test
{
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
typedef Kokkos::View<const uint32_t*,execution_space, Kokkos::MemoryRandomAccess> local_id_view;
typedef Kokkos::UnorderedMap<const uint32_t, const size_type,execution_space> global_id_view;
global_id_view global_2_local;
local_id_view local_2_global;
typedef size_t value_type;
find_test( global_id_view gIds, local_id_view lIds, value_type & num_errors)
: global_2_local(gIds) , local_2_global(lIds)
{
- Kokkos::parallel_reduce(local_2_global.dimension_0(), *this, num_errors);
+ Kokkos::parallel_reduce(local_2_global.size(), *this, num_errors);
}
KOKKOS_INLINE_FUNCTION
void init(value_type & v) const
{ v = 0; }
KOKKOS_INLINE_FUNCTION
void join(volatile value_type & dst, volatile value_type const & src) const
{ dst += src; }
KOKKOS_INLINE_FUNCTION
void operator()(size_type i, value_type & num_errors) const
{
uint32_t index = global_2_local.find( local_2_global[i] );
- if ( global_2_local.value_at(index) != i) ++num_errors;
+ if ( !global_2_local.valid_at(index)
+ || global_2_local.key_at(index) != local_2_global[i]
+ || global_2_local.value_at(index) != i)
+ ++num_errors;
}
};
+// run test
template <typename Device>
-void test_global_to_local_ids(unsigned num_ids)
+size_t test_global_to_local_ids(unsigned num_ids, unsigned capacity, unsigned num_find_iterations)
{
typedef Device execution_space;
typedef typename execution_space::size_type size_type;
typedef Kokkos::View<uint32_t*,execution_space> local_id_view;
typedef Kokkos::UnorderedMap<uint32_t,size_type,execution_space> global_id_view;
- //size
- std::cout << num_ids << ", ";
-
double elasped_time = 0;
Kokkos::Impl::Timer timer;
local_id_view local_2_global("local_ids", num_ids);
- global_id_view global_2_local((3u*num_ids)/2u);
+ global_id_view global_2_local(capacity);
+
+ int shiftw = 15;
//create
elasped_time = timer.seconds();
- std::cout << elasped_time << ", ";
+ std::cout << std::setw(shiftw) << "allocate: " << elasped_time << std::endl;
timer.reset();
// generate unique ids
{
generate_ids<Device> gen(local_2_global);
}
- Device::fence();
+
// generate
elasped_time = timer.seconds();
- std::cout << elasped_time << ", ";
+ std::cout << std::setw(shiftw) << "generate: " << elasped_time << std::endl;
timer.reset();
{
fill_map<Device> fill(global_2_local, local_2_global);
}
- Device::fence();
// fill
elasped_time = timer.seconds();
- std::cout << elasped_time << ", ";
+ std::cout << std::setw(shiftw) << "fill: " << elasped_time << std::endl;
timer.reset();
- size_t num_errors = 0;
- for (int i=0; i<100; ++i)
- {
- find_test<Device> find(global_2_local, local_2_global,num_errors);
+ size_t num_errors = global_2_local.failed_insert();
+
+ if (num_errors == 0u) {
+ for (unsigned i=0; i<num_find_iterations; ++i)
+ {
+ find_test<Device> find(global_2_local, local_2_global,num_errors);
+ }
+
+ // find
+ elasped_time = timer.seconds();
+ std::cout << std::setw(shiftw) << "lookup: " << elasped_time << std::endl;
+ }
+ else {
+ std::cout << " !!! Fill Failed !!!" << std::endl;
}
- Device::fence();
- // find
- elasped_time = timer.seconds();
- std::cout << elasped_time << std::endl;
+ return num_errors;
+}
- ASSERT_EQ( num_errors, 0u);
+template <typename Device>
+size_t run_test(unsigned num_ids, unsigned num_find_iterations)
+{
+ // expect to fail
+ unsigned capacity = (num_ids*2u)/3u;
+ std::cout << " 66% of needed capacity (should fail)" << std::endl;
+ test_global_to_local_ids<Device>(num_ids, capacity, num_find_iterations);
+
+ //should not fail
+ std::cout << " 100% of needed capacity" << std::endl;
+ capacity = num_ids;
+ size_t num_errors = test_global_to_local_ids<Device>(num_ids, capacity, num_find_iterations);
+
+ //should not fail
+ std::cout << " 150% of needed capacity" << std::endl;
+ capacity = (num_ids*3u)/2u;
+ num_errors += test_global_to_local_ids<Device>(num_ids, capacity, num_find_iterations);
+
+ return num_errors;
}
-} // namespace Performance
+} // namespace G2L
-#endif //KOKKOS_TEST_GLOBAL_TO_LOCAL_IDS_HPP
+#endif //KOKKOS_GLOBAL_TO_LOCAL_IDS_HPP
diff --git a/lib/kokkos/example/global_2_local_ids/G2L_Main.cpp b/lib/kokkos/example/global_2_local_ids/G2L_Main.cpp
new file mode 100644
index 000000000..171ed4b5f
--- /dev/null
+++ b/lib/kokkos/example/global_2_local_ids/G2L_Main.cpp
@@ -0,0 +1,149 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+
+#include <G2L.hpp>
+
+namespace G2L {
+
+size_t run_serial(unsigned num_ids, unsigned num_find_iterations)
+{
+#ifdef KOKKOS_HAVE_SERIAL
+ std::cout << "Serial" << std::endl;
+ return run_test<Kokkos::Serial>(num_ids,num_find_iterations);
+#else
+ return 0;
+#endif // KOKKOS_HAVE_SERIAL
+}
+
+size_t run_threads(unsigned num_ids, unsigned num_find_iterations)
+{
+#ifdef KOKKOS_HAVE_PTHREAD
+ std::cout << "Threads" << std::endl;
+ return run_test<Kokkos::Threads>(num_ids,num_find_iterations);
+#else
+ return 0;
+#endif
+}
+
+size_t run_openmp(unsigned num_ids, unsigned num_find_iterations)
+{
+#ifdef KOKKOS_HAVE_OPENMP
+ std::cout << "OpenMP" << std::endl;
+ return run_test<Kokkos::OpenMP>(num_ids,num_find_iterations);
+#else
+ return 0;
+#endif
+}
+
+size_t run_cuda(unsigned num_ids, unsigned num_find_iterations)
+{
+#ifdef KOKKOS_HAVE_CUDA
+ std::cout << "Cuda" << std::endl;
+ return run_test<Kokkos::Cuda>(num_ids,num_find_iterations);
+#else
+ return 0;
+#endif
+}
+
+} // namespace G2L
+
+
+int main(int argc, char *argv[])
+{
+ unsigned num_ids = 100000;
+ unsigned num_find_iterations = 1000;
+
+ if (argc == 3) {
+ num_ids = atoi(argv[1]);
+ num_find_iterations = atoi(argv[2]);
+ }
+ else if (argc != 1) {
+ std::cout << argv[0] << " num_ids num_find_iterations" << std::endl;
+ return 0;
+ }
+
+
+ // query the topology of the host
+ unsigned threads_count = 4 ;
+
+ if (Kokkos::hwloc::available()) {
+ threads_count = Kokkos::hwloc::get_available_numa_count() *
+ Kokkos::hwloc::get_available_cores_per_numa() *
+ Kokkos::hwloc::get_available_threads_per_core();
+
+ }
+
+ std::cout << "Threads: " << threads_count << std::endl;
+ std::cout << "Number of ids: " << num_ids << std::endl;
+ std::cout << "Number of find iterations: " << num_find_iterations << std::endl;
+
+ size_t num_errors = 0;
+
+ num_errors += G2L::run_serial(num_ids,num_find_iterations);
+
+#ifdef KOKKOS_HAVE_CUDA
+ Kokkos::HostSpace::execution_space::initialize(threads_count);
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
+ num_errors += G2L::run_cuda(num_ids,num_find_iterations);
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+#endif
+
+#ifdef KOKKOS_HAVE_PTHREAD
+ Kokkos::Threads::initialize( threads_count );
+ num_errors += G2L::run_threads(num_ids,num_find_iterations);
+ Kokkos::Threads::finalize();
+#endif
+
+#ifdef KOKKOS_HAVE_OPENMP
+ Kokkos::OpenMP::initialize( threads_count );
+ num_errors += G2L::run_openmp(num_ids,num_find_iterations);
+ Kokkos::OpenMP::finalize();
+#endif
+
+
+ return num_errors;
+}
+
diff --git a/lib/kokkos/example/grow_array/grow_array.hpp b/lib/kokkos/example/grow_array/grow_array.hpp
new file mode 100644
index 000000000..9daef1a4b
--- /dev/null
+++ b/lib/kokkos/example/grow_array/grow_array.hpp
@@ -0,0 +1,257 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef EXAMPLE_GROW_ARRAY
+#define EXAMPLE_GROW_ARRAY
+
+#include <stdlib.h>
+
+#include <Kokkos_Core.hpp>
+
+#include <algorithm>
+
+#if defined(KOKKOS_HAVE_CUDA)
+#include <thrust/device_ptr.h>
+#include <thrust/sort.h>
+#endif
+
+namespace Example {
+
+//----------------------------------------------------------------------------
+
+template< class ExecSpace >
+struct SortView {
+
+ template< typename ValueType >
+ SortView( const Kokkos::View<ValueType*,ExecSpace> v , int begin , int end )
+ {
+ std::sort( v.ptr_on_device() + begin , v.ptr_on_device() + end );
+ }
+};
+
+#if defined(KOKKOS_HAVE_CUDA)
+template<>
+struct SortView< Kokkos::Cuda > {
+ template< typename ValueType >
+ SortView( const Kokkos::View<ValueType*,Kokkos::Cuda> v , int begin , int end )
+ {
+ thrust::sort( thrust::device_ptr<ValueType>( v.ptr_on_device() + begin )
+ , thrust::device_ptr<ValueType>( v.ptr_on_device() + end ) );
+ }
+};
+#endif
+
+
+
+//----------------------------------------------------------------------------
+
+template< class ExecSpace >
+struct GrowArrayFunctor {
+
+ typedef ExecSpace execution_space ;
+
+ enum { SHIFT = sizeof(int) == 8 ? 6 : 5 }; // 8 or 4 byte int
+ enum { MASK = ( 1 << SHIFT ) - 1 };
+
+ const Kokkos::View<int*,ExecSpace> m_search_flags ; // bit flags for values to append
+ const Kokkos::View<int*,ExecSpace> m_search_array ; // array to append values
+ const Kokkos::View<int,ExecSpace> m_search_count ; // offset
+ const int m_search_total ;
+ const int m_search_team_chunk ;
+
+ GrowArrayFunctor( int array_length , int search_length , int print = 1 )
+ : m_search_flags( "flags" , ( search_length + MASK ) >> SHIFT ) // One bit per search entry
+ , m_search_array( "array" , array_length )
+ , m_search_count( "count" )
+ , m_search_total( search_length )
+ , m_search_team_chunk( 2048 )
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ bool flag_is_set( const int index ) const
+ {
+ // 64 or 32 bit integer:
+
+ const int j = index >> SHIFT ; // which integer flag
+ const int k = 1 << ( index & MASK ); // which bit in that integer
+ const int s = ( j < int(m_search_flags.dimension_0()) ) && ( 0 != ( m_search_flags(j) & k ) );
+
+ return s ;
+ }
+
+ typedef typename Kokkos::TeamPolicy<ExecSpace>::member_type team_member ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const team_member & member ) const
+ {
+ enum { LOCAL_BUFFER_LENGTH = 16 };
+
+ int local_buffer[ LOCAL_BUFFER_LENGTH ] ;
+ int local_count = 0 ;
+
+ // Each team searches 'm_search_team_chunk' indices.
+ // The threads of a team must iterate together because all
+ // threads in the team must call 'team_scan' to prevent deadlock in the team.
+
+ int search_team_begin = member.league_rank() * m_search_team_chunk ;
+ const int search_team_end = search_team_begin + m_search_team_chunk ;
+
+ int k = 0 ;
+
+ while ( search_team_begin < search_team_end ) {
+
+ // This iteration searches [ search_team_begin .. search_team_begin + member.team_size() ]
+ const int thread_search_index = search_team_begin + member.team_rank();
+
+ // If this thread's search index is in the range
+ // and the flag is set, push into this thread's local buffer.
+ if ( thread_search_index < m_search_total && flag_is_set(thread_search_index) ) {
+ local_buffer[ local_count ] = thread_search_index ;
+ ++local_count ;
+ }
+
+ // Move the team's search range forward
+ search_team_begin += member.team_size(); // Striding team by team size
+
+ // Count number of times a thread's buffer might have grown:
+ ++k ;
+
+ // Write buffer if end of search or a thread might have filled its buffer.
+ if ( k == LOCAL_BUFFER_LENGTH /* A thread in my team might have filled its buffer */ ||
+ ! ( search_team_begin < search_team_end ) /* Team is at the end of its search */ ) {
+
+ // Team's exclusive scan of threads' contributions, with global offset.
+ // This thread writes its buffer into [ team_offset .. team_offset + local_count )
+ const int team_offset = member.team_scan( local_count , & *m_search_count );
+
+ // Copy locally buffered entries into global array:
+ for ( int i = 0 ; i < local_count ; ++i ) {
+ m_search_array( team_offset + i ) = local_buffer[i] ;
+ }
+
+ k = 0 ;
+ local_count = 0 ;
+ }
+ }
+ }
+};
+
+
+template< class ExecSpace >
+void grow_array( int array_length , int search_length , int print = 1 )
+{
+ typedef GrowArrayFunctor< ExecSpace > FunctorType ;
+
+ FunctorType functor( array_length , search_length , print );
+
+ typename Kokkos::View<int,ExecSpace>::HostMirror count = Kokkos::create_mirror_view( functor.m_search_count );
+ typename Kokkos::View<int*,ExecSpace>::HostMirror flags = Kokkos::create_mirror_view( functor.m_search_flags );
+
+ // Set at most 'array_length' random bits over the search length.
+ for ( int i = 0 ; i < array_length ; ++i ) {
+ // 'lrand48()' generates random number between [0..2^31]
+ // index = ( lrand48() * search_length ) / ( 2^31 )
+ const long int index = ( lrand48() * search_length ) >> 31 ;
+ // set the bit within the flags:
+ flags( index >> FunctorType::SHIFT ) |= ( 1 << ( index & FunctorType::MASK ) );
+ }
+
+ Kokkos::deep_copy( functor.m_search_flags , flags );
+
+ // Each team works on 'functor.m_search_team_chunk' span of the search_length
+ Kokkos::TeamPolicy< ExecSpace >
+ work( /* #teams */ ( search_length + functor.m_search_team_chunk - 1 ) / functor.m_search_team_chunk
+ , /* threads/team */ Kokkos::TeamPolicy< ExecSpace >::team_size_max( functor ) );
+
+ // Fill array:
+ Kokkos::parallel_for( work , functor );
+
+ // How much was filled:
+ Kokkos::deep_copy( count , functor.m_search_count );
+
+ // Sort array:
+ SortView< ExecSpace >( functor.m_search_array , 0 , *count );
+
+ // Mirror the results:
+ typename Kokkos::View<int*,ExecSpace>::HostMirror results = Kokkos::create_mirror_view( functor.m_search_array );
+ Kokkos::deep_copy( results , functor.m_search_array );
+
+ // Verify results:
+ int result_error_count = 0 ;
+ int flags_error_count = 0 ;
+ for ( int i = 0 ; i < *count ; ++i ) {
+ const int index = results(i);
+ const int entry = index >> FunctorType::SHIFT ;
+ const int bit = 1 << ( index & FunctorType::MASK );
+ const bool flag = 0 != ( flags( entry ) & bit );
+ if ( ! flag ) {
+ if ( print ) std::cerr << "result( " << i << " : " << index << " )";
+ ++result_error_count ;
+ }
+ flags( entry ) &= ~bit ; // Clear that verified bit
+ }
+
+ for ( int i = 0 ; i < int(flags.dimension_0()) ; ++i ) {
+ // If any uncleared bits then an error
+ if ( flags(i) ) {
+ if ( print ) std::cerr << "flags( " << i << " : " << flags(i) << " )" ;
+ ++flags_error_count ;
+ }
+ }
+
+ if ( result_error_count || flags_error_count ) {
+ std::cerr << std::endl << "Example::GrowArrayFunctor( " << array_length
+ << " , " << search_length
+ << " ) result_error_count( " << result_error_count << " )"
+ << " ) flags_error_count( " << flags_error_count << " )"
+ << std::endl ;
+ }
+}
+
+
+} // namespace Example
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef EXAMPLE_GROW_ARRAY */
+
diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/example/grow_array/main.cpp
old mode 100755
new mode 100644
similarity index 55%
copy from lib/kokkos/containers/performance_tests/TestCuda.cpp
copy to lib/kokkos/example/grow_array/main.cpp
index aee262de9..4693aa3af
--- a/lib/kokkos/containers/performance_tests/TestCuda.cpp
+++ b/lib/kokkos/example/grow_array/main.cpp
@@ -1,100 +1,110 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#include <stdint.h>
-#include <string>
#include <iostream>
-#include <iomanip>
#include <sstream>
-#include <fstream>
-
-#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
-#if defined( KOKKOS_HAVE_CUDA )
+#include <grow_array.hpp>
-#include <Kokkos_UnorderedMap.hpp>
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
-#include <TestGlobal2LocalIds.hpp>
+int main( int argc , char ** argv )
+{
+ int num_threads = 4 ;
+ int use_numa = 1 ;
+ int use_core = 1 ;
+ int length_array = 1000000 ;
+ int span_values = 100000000 ;
-#include <TestUnorderedMapPerformance.hpp>
-namespace Performance {
+ if ( Kokkos::hwloc::available() ) {
+ use_numa = Kokkos::hwloc::get_available_numa_count();
+ use_core = Kokkos::hwloc::get_available_cores_per_numa() - 1 ;
+ num_threads = use_numa * use_core * Kokkos::hwloc::get_available_threads_per_core();
+ }
-class cuda : public ::testing::Test {
-protected:
- static void SetUpTestCase()
+#if defined( KOKKOS_HAVE_SERIAL )
{
- std::cout << std::setprecision(5) << std::scientific;
- Kokkos::HostSpace::execution_space::initialize();
- Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
+ std::cout << "Kokkos::Serial" << std::endl ;
+ // The Serial device accepts these arguments, though it may ignore them.
+ Kokkos::Serial::initialize( num_threads , use_numa , use_core );
+ Example::grow_array< Kokkos::Serial >( length_array , span_values );
+ Kokkos::Serial::finalize ();
}
- static void TearDownTestCase()
+#endif // defined( KOKKOS_HAVE_SERIAL )
+
+#if defined( KOKKOS_HAVE_PTHREAD )
{
- Kokkos::Cuda::finalize();
- Kokkos::HostSpace::execution_space::finalize();
+ std::cout << "Kokkos::Threads" << std::endl ;
+ Kokkos::Threads::initialize( num_threads , use_numa , use_core );
+ Example::grow_array< Kokkos::Threads >( length_array , span_values );
+ Kokkos::Threads::finalize();
}
-};
+#endif
-TEST_F( cuda, global_2_local)
-{
- std::cout << "Cuda" << std::endl;
- std::cout << "size, create, generate, fill, find" << std::endl;
- for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step)
- test_global_to_local_ids<Kokkos::Cuda>(i);
-}
-
-TEST_F( cuda, unordered_map_performance_near)
-{
- Perf::run_performance_tests<Kokkos::Cuda,true>("cuda-near");
-}
+#if defined( KOKKOS_HAVE_OPENMP )
+ {
+ std::cout << "Kokkos::OpenMP" << std::endl ;
+ Kokkos::OpenMP::initialize( num_threads , use_numa , use_core );
+ Example::grow_array< Kokkos::OpenMP >( length_array , span_values );
+ Kokkos::OpenMP::finalize();
+ }
+#endif
-TEST_F( cuda, unordered_map_performance_far)
-{
- Perf::run_performance_tests<Kokkos::Cuda,false>("cuda-far");
-}
+#if defined( KOKKOS_HAVE_CUDA )
+ {
+ std::cout << "Kokkos::Cuda" << std::endl ;
+ Kokkos::HostSpace::execution_space::initialize(1);
+ Kokkos::Cuda::initialize();
+ Example::grow_array< Kokkos::Cuda >( length_array , span_values );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+ }
+#endif
+ return 0 ;
}
-#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
diff --git a/lib/kokkos/example/md_skeleton/README b/lib/kokkos/example/md_skeleton/README
new file mode 100644
index 000000000..1ce682b0a
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/README
@@ -0,0 +1,3 @@
+To build this example on a 2012-model Macbook Pro with NVIDIA Kepler GPU:
+
+./build.cuda_std g++_osx cuda_osx 30 opt
diff --git a/lib/kokkos/example/md_skeleton/force.cpp b/lib/kokkos/example/md_skeleton/force.cpp
new file mode 100644
index 000000000..a31944f85
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/force.cpp
@@ -0,0 +1,192 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+/* Define values which set the max number of registers used for the Force Kernel
+ * Its 32 * 2048 / (KOKKOS_CUDA_MAX_THREADS * KOKKOS_CUDA_MIN_BLOCKS)
+ * Have to be set before including Kokkos header files.
+ */
+
+#define KOKKOS_CUDA_MAX_THREADS 512
+#define KOKKOS_CUDA_MIN_BLOCKS 3
+
+#include <system.h>
+#include <cstdio>
+
+
+/* Simple Lennard Jones Force Kernel using neighborlists
+ * Calculates for every pair of atoms (i,j) with distance smaller r_cut
+ * f_ij = 4*epsilon * ( (sigma/r_ij)^12 - (sigma/r_ij)^6 )
+ * where r_ij is the distance of atoms (i,j).
+ * The force on atom i is the sum over f_ij:
+ * f_i = sum_j (f_ij)
+ * Neighborlists are used in order to pre calculate which atoms j are
+ * close enough to i to be able to contribute. By choosing a larger neighbor
+ * cutoff then the force cutoff, the neighbor list can be reused several times
+ * (typically 10 - 100).
+ */
+
+struct ForceFunctor {
+
+ typedef t_x_array::execution_space execution_space; //Device Type for running the kernel
+ typedef double2 value_type; // When energy calculation is requested return energy, and virial
+
+ t_x_array_randomread x; //atom positions
+ t_f_array f; //atom forces
+ t_int_1d_const numneigh; //number of neighbors per atom
+ t_neighbors_const neighbors; //neighborlist
+ double cutforcesq; //force cutoff
+ double epsilon; //Potential parameter
+ double sigma6; //Potential parameter
+
+
+ ForceFunctor(System s) {
+ x = s.d_x;
+ f = s.f;
+ numneigh = s.numneigh;
+ neighbors = s.neighbors;
+ cutforcesq = s.force_cutsq;
+ epsilon = 1.0;
+ sigma6 = 1.0;
+ }
+
+ /* Operator for not calculating energy and virial */
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int &i) const {
+ force<0>(i);
+ }
+
+ /* Operator for calculating energy and virial */
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int &i, double2 &energy_virial) const {
+ double2 ev = force<1>(i);
+ energy_virial.x += ev.x;
+ energy_virial.y += ev.y;
+ }
+
+ template<int EVFLAG>
+ KOKKOS_INLINE_FUNCTION
+ double2 force(const int &i) const
+ {
+ const int numneighs = numneigh[i];
+ const double xtmp = x(i, 0);
+ const double ytmp = x(i, 1);
+ const double ztmp = x(i, 2);
+ double fix = 0;
+ double fiy = 0;
+ double fiz = 0;
+ double energy = 0;
+ double virial = 0;
+
+ //pragma simd forces vectorization (ignoring the performance objections of the compiler)
+ //give hint to compiler that fix, fiy and fiz are used for reduction only
+
+ #ifdef USE_SIMD
+ #pragma simd reduction (+: fix,fiy,fiz,energy,virial)
+ #endif
+ for(int k = 0; k < numneighs; k++) {
+ const int j = neighbors(i, k);
+ const double delx = xtmp - x(j, 0);
+ const double dely = ytmp - x(j, 1);
+ const double delz = ztmp - x(j, 2);
+ const double rsq = delx * delx + dely * dely + delz * delz;
+
+ //if(i==0) printf("%i %i %lf %lf\n",i,j,rsq,cutforcesq);
+ if(rsq < cutforcesq) {
+ const double sr2 = 1.0 / rsq;
+ const double sr6 = sr2 * sr2 * sr2 * sigma6;
+ const double force = 48.0 * sr6 * (sr6 - 0.5) * sr2 * epsilon;
+ fix += delx * force;
+ fiy += dely * force;
+ fiz += delz * force;
+
+ if(EVFLAG) {
+ energy += sr6 * (sr6 - 1.0) * epsilon;
+ virial += delx * delx * force + dely * dely * force + delz * delz * force;
+ }
+ }
+ }
+
+ f(i, 0) += fix;
+ f(i, 1) += fiy;
+ f(i, 2) += fiz;
+
+ double2 energy_virial ;
+ energy_virial.x = 4.0 * energy ;
+ energy_virial.y = 0.5 * virial ;
+ return energy_virial;
+ }
+
+ /* init and join functions when doing the reduction to obtain energy and virial */
+
+ KOKKOS_FUNCTION
+ static void init(volatile value_type &update) {
+ update.x = update.y = 0;
+ }
+ KOKKOS_FUNCTION
+ static void join(volatile value_type &update ,
+ const volatile value_type &source) {
+ update.x += source.x ;
+ update.y += source.y ;
+ }
+
+};
+
+
+/* Calling function */
+
+double2 force(System &s,int evflag) {
+
+ ForceFunctor f(s);
+
+ double2 ev ; ev.x = 0 ; ev.y = 0 ;
+ if(!evflag)
+ Kokkos::parallel_for(s.nlocal,f);
+ else
+ Kokkos::parallel_reduce(s.nlocal,f,ev);
+
+ execution_space::fence();
+ return ev;
+}
+
diff --git a/lib/kokkos/example/md_skeleton/main.cpp b/lib/kokkos/example/md_skeleton/main.cpp
new file mode 100644
index 000000000..06287bc60
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/main.cpp
@@ -0,0 +1,205 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <cstdio>
+#include <cstring>
+#include <cstdlib>
+#include "system.h"
+
+int create_system(System &system, int nx, int ny, int nz, double rho);
+int neigh_setup(System &system);
+int neigh_build(System &system);
+double2 force(System &system,int evflag);
+
+/* simple MD Skeleton which
+ * - constructs a simple FCC lattice,
+ * - computes a neighborlist
+ * - compute LJ-Force kernel a number of times
+ */
+
+int main(int argc, char** argv) {
+
+ printf("Running MD Skeleton\n");
+ /* Thread numbers for Host */
+
+ int num_threads = 1;
+ int teams = 1;
+ int device = 0; // Default device for GPU runs
+
+ /* avoid unused variable warnings */
+ (void)num_threads;
+ (void)teams;
+ (void)device;
+
+ /* Default value for number of force calculations */
+
+ int iter = 100;
+
+ /* Default value for system size (4*nx*ny*nz atoms)
+ * nx, ny and nz are set to system_size if not specififed on commandline */
+
+ int system_size = 20;
+ int nx = -1;
+ int ny = -1;
+ int nz = -1;
+
+ int neighbor_size = 1; // Default bin size for neighbor list construction
+
+ double rho = 0.8442; // Number density of the system
+ double delta = 0; // Scaling factor for random offsets of atom positions
+
+
+ /* read in command-line arguments */
+
+ for(int i = 0; i < argc; i++) {
+ if((strcmp(argv[i], "-t") == 0) || (strcmp(argv[i], "--num_threads") == 0)) {
+ num_threads = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "--teams") == 0)) {
+ teams = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-d") == 0) || (strcmp(argv[i], "--device") == 0)) {
+ device = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "--delta") == 0)) {
+ delta = atof(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-i") == 0) || (strcmp(argv[i], "--iter") == 0)) {
+ iter = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-rho") == 0)) {
+ rho = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-s") == 0) || (strcmp(argv[i], "--size") == 0)) {
+ system_size = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-nx") == 0)) {
+ nx = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-ny") == 0)) {
+ ny = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-nz") == 0)) {
+ nz = atoi(argv[++i]);
+ continue;
+ }
+
+ if((strcmp(argv[i], "-b") == 0) || (strcmp(argv[i], "--neigh_bins") == 0)) {
+ neighbor_size = atoi(argv[++i]);
+ continue;
+ }
+ }
+
+ if( nx < 0 ) nx = system_size;
+ if( ny < 0 ) ny = system_size;
+ if( nz < 0 ) nz = system_size;
+
+ printf("-> Init Device\n");
+
+#if defined( KOKKOS_HAVE_CUDA )
+ Kokkos::HostSpace::execution_space::initialize(teams*num_threads);
+ Kokkos::Cuda::SelectDevice select_device(device);
+ Kokkos::Cuda::initialize(select_device);
+#elif defined( KOKKOS_HAVE_OPENMP )
+ Kokkos::OpenMP::initialize(teams*num_threads);
+#elif defined( KOKKOS_HAVE_PTHREAD )
+ Kokkos::Threads::initialize(teams*num_threads);
+#endif
+
+ System system;
+ system.neigh_cut = 2.8;
+ system.force_cut = 2.5;
+ system.force_cutsq = system.force_cut*system.force_cut;
+ system.delta = delta;
+
+ printf("-> Build system\n");
+ create_system(system,nx,ny,nz,rho);
+
+ printf("-> Created %i atoms and %i ghost atoms\n",system.nlocal,system.nghost);
+
+ system.nbinx = system.box.xprd/neighbor_size+1;
+ system.nbiny = system.box.yprd/neighbor_size+1;
+ system.nbinz = system.box.zprd/neighbor_size+1;
+
+
+ printf("-> Building Neighborlist\n");
+
+ neigh_setup(system);
+ neigh_build(system);
+
+ double2 ev = force(system,1);
+
+ printf("-> Calculate Energy: %f Virial: %f\n",ev.x,ev.y);
+
+ printf("-> Running %i force calculations\n",iter);
+
+ Kokkos::Impl::Timer timer;
+
+ for(int i=0;i<iter;i++) {
+ force(system,0);
+ }
+
+
+ double time = timer.seconds();
+ printf("Time: %e s for %i iterations with %i atoms\n",time,iter,system.nlocal);
+
+ execution_space::finalize();
+}
diff --git a/lib/kokkos/example/md_skeleton/neighbor.cpp b/lib/kokkos/example/md_skeleton/neighbor.cpp
new file mode 100644
index 000000000..2a7793294
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/neighbor.cpp
@@ -0,0 +1,430 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <system.h>
+#include <cstdio>
+#include <Kokkos_Core.hpp>
+
+#define SMALL 1.0e-6
+#define FACTOR 0.999
+
+/* BinningFunctor puts atoms into bins of the simulation box
+ * Neighborlists are then created by checking only distances of atoms
+ * in adjacent bins. That makes neighborlist construction a O(N) operation.
+ */
+
+struct BinningFunctor {
+ typedef t_int_2d::execution_space execution_space;
+
+ System s;
+
+ int atoms_per_bin;
+
+ BinningFunctor(System _s): s(_s) {
+ atoms_per_bin = s.bins.dimension_1();
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int &i) const
+ {
+ const int ibin = coord2bin(s.d_x(i, 0), s.d_x(i, 1), s.d_x(i, 2));
+
+ const int ac = Kokkos::atomic_fetch_add(&s.bincount[ibin], 1);
+
+ if(ac < atoms_per_bin) {
+ s.bins(ibin, ac) = i;
+ } else if(s.d_resize(0) < ac) {
+ s.d_resize(0) = ac;
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ int coord2bin(double x, double y, double z) const
+ {
+ int ix, iy, iz;
+
+ if(x >= s.box.xprd)
+ ix = (int)((x - s.box.xprd) * s.bininvx) + s.nbinx - s.mbinxlo;
+ else if(x >= 0.0)
+ ix = (int)(x * s.bininvx) - s.mbinxlo;
+ else
+ ix = (int)(x * s.bininvx) - s.mbinxlo - 1;
+
+ if(y >= s.box.yprd)
+ iy = (int)((y - s.box.yprd) * s.bininvy) + s.nbiny - s.mbinylo;
+ else if(y >= 0.0)
+ iy = (int)(y * s.bininvy) - s.mbinylo;
+ else
+ iy = (int)(y * s.bininvy) - s.mbinylo - 1;
+
+ if(z >= s.box.zprd)
+ iz = (int)((z - s.box.zprd) * s.bininvz) + s.nbinz - s.mbinzlo;
+ else if(z >= 0.0)
+ iz = (int)(z * s.bininvz) - s.mbinzlo;
+ else
+ iz = (int)(z * s.bininvz) - s.mbinzlo - 1;
+
+ return (iz * s.mbiny * s.mbinx + iy * s.mbinx + ix + 1);
+ }
+};
+
+/* Build the actual neighborlist*/
+
+struct BuildFunctor {
+
+ typedef t_int_2d::execution_space execution_space;
+
+ System s;
+
+ int maxneighs;
+ BuildFunctor(System _s): s(_s) {
+ maxneighs = s.neighbors.dimension_1();
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int &i) const
+ {
+ int n = 0;
+
+ const t_int_1d_const_um bincount_c = s.bincount;
+
+ const double xtmp = s.d_x(i, 0);
+ const double ytmp = s.d_x(i, 1);
+ const double ztmp = s.d_x(i, 2);
+
+ const int ibin = coord2bin(xtmp, ytmp, ztmp);
+
+ // loop over all bins in neighborhood (includes ibin)
+ for(int k = 0; k < s.nstencil; k++) {
+ const int jbin = ibin + s.d_stencil[k];
+
+ // get subview of jbin
+ const t_int_1d_const_um loc_bin =
+ Kokkos::subview(s.bins,jbin,Kokkos::ALL());
+
+ if(ibin == jbin)
+ for(int m = 0; m < bincount_c[jbin]; m++) {
+ const int j = loc_bin[m];
+
+ //for same bin as atom i skip j if i==j
+ if (j == i) continue;
+
+ const double delx = xtmp - s.d_x(j, 0);
+ const double dely = ytmp - s.d_x(j, 1);
+ const double delz = ztmp - s.d_x(j, 2);
+ const double rsq = delx * delx + dely * dely + delz * delz;
+
+ if(rsq <= s.neigh_cutsq && n<maxneighs) s.neighbors(i,n++) = j;
+ }
+ else {
+ for(int m = 0; m < bincount_c[jbin]; m++) {
+ const int j = loc_bin[m];
+
+ const double delx = xtmp - s.d_x(j, 0);
+ const double dely = ytmp - s.d_x(j, 1);
+ const double delz = ztmp - s.d_x(j, 2);
+ const double rsq = delx * delx + dely * dely + delz * delz;
+
+ if(rsq <= s.neigh_cutsq && n<maxneighs) s.neighbors(i,n++) = j;
+ }
+ }
+ }
+
+ s.numneigh[i] = n;
+
+ if(n >= maxneighs) {
+ if(n >= s.d_resize(0)) s.d_resize(0) = n;
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ int coord2bin(double x, double y, double z) const
+ {
+ int ix, iy, iz;
+
+ if(x >= s.box.xprd)
+ ix = (int)((x - s.box.xprd) * s.bininvx) + s.nbinx - s.mbinxlo;
+ else if(x >= 0.0)
+ ix = (int)(x * s.bininvx) - s.mbinxlo;
+ else
+ ix = (int)(x * s.bininvx) - s.mbinxlo - 1;
+
+ if(y >= s.box.yprd)
+ iy = (int)((y - s.box.yprd) * s.bininvy) + s.nbiny - s.mbinylo;
+ else if(y >= 0.0)
+ iy = (int)(y * s.bininvy) - s.mbinylo;
+ else
+ iy = (int)(y * s.bininvy) - s.mbinylo - 1;
+
+ if(z >= s.box.zprd)
+ iz = (int)((z - s.box.zprd) * s.bininvz) + s.nbinz - s.mbinzlo;
+ else if(z >= 0.0)
+ iz = (int)(z * s.bininvz) - s.mbinzlo;
+ else
+ iz = (int)(z * s.bininvz) - s.mbinzlo - 1;
+
+ return (iz * s.mbiny * s.mbinx + iy * s.mbinx + ix + 1);
+ }
+};
+
+/* Reset an array to zero */
+
+struct MemsetZeroFunctor {
+ typedef t_x_array::execution_space execution_space ;
+ void* ptr;
+ KOKKOS_INLINE_FUNCTION void operator()(const int i) const {
+ ((int*)ptr)[i] = 0;
+ }
+};
+
+/* Calculate distance of two bins */
+
+double bindist(System &s, int i, int j, int k)
+{
+ double delx, dely, delz;
+
+ if(i > 0)
+ delx = (i - 1) * s.binsizex;
+ else if(i == 0)
+ delx = 0.0;
+ else
+ delx = (i + 1) * s.binsizex;
+
+ if(j > 0)
+ dely = (j - 1) * s.binsizey;
+ else if(j == 0)
+ dely = 0.0;
+ else
+ dely = (j + 1) * s.binsizey;
+
+ if(k > 0)
+ delz = (k - 1) * s.binsizez;
+ else if(k == 0)
+ delz = 0.0;
+ else
+ delz = (k + 1) * s.binsizez;
+
+ return (delx * delx + dely * dely + delz * delz);
+}
+
+/* Setup the neighborlist construction
+ * Determine binsizes, a stencil for defining adjacency, etc.
+ */
+
+void neigh_setup(System &s) {
+
+ s.neigh_cutsq = s.neigh_cut * s.neigh_cut;
+
+ /*
+ c bins must evenly divide into box size,
+ c becoming larger than cutneigh if necessary
+ c binsize = 1/2 of cutoff is near optimal
+
+ if (flag == 0) {
+ nbinx = 2.0 * xprd / cutneigh;
+ nbiny = 2.0 * yprd / cutneigh;
+ nbinz = 2.0 * zprd / cutneigh;
+ if (nbinx == 0) nbinx = 1;
+ if (nbiny == 0) nbiny = 1;
+ if (nbinz == 0) nbinz = 1;
+ }
+ */
+
+ s.binsizex = s.box.xprd / s.nbinx;
+ s.binsizey = s.box.yprd / s.nbiny;
+ s.binsizez = s.box.zprd / s.nbinz;
+ s.bininvx = 1.0 / s.binsizex;
+ s.bininvy = 1.0 / s.binsizey;
+ s.bininvz = 1.0 / s.binsizez;
+
+ double coord = s.box.xlo - s.neigh_cut - SMALL * s.box.xprd;
+ s.mbinxlo = static_cast<int>(coord * s.bininvx);
+
+ if(coord < 0.0) s.mbinxlo = s.mbinxlo - 1;
+
+ coord = s.box.xhi + s.neigh_cut + SMALL * s.box.xprd;
+ int mbinxhi = static_cast<int>(coord * s.bininvx);
+
+ coord = s.box.ylo - s.neigh_cut - SMALL * s.box.yprd;
+ s.mbinylo = static_cast<int>(coord * s.bininvy);
+
+ if(coord < 0.0) s.mbinylo = s.mbinylo - 1;
+
+ coord = s.box.yhi + s.neigh_cut + SMALL * s.box.yprd;
+ int mbinyhi = static_cast<int>(coord * s.bininvy);
+
+ coord = s.box.zlo - s.neigh_cut - SMALL * s.box.zprd;
+ s.mbinzlo = static_cast<int>(coord * s.bininvz);
+
+ if(coord < 0.0) s.mbinzlo = s.mbinzlo - 1;
+
+ coord = s.box.zhi + s.neigh_cut + SMALL * s.box.zprd;
+ int mbinzhi = static_cast<int>(coord * s.bininvz);
+
+ /* extend bins by 1 in each direction to insure stencil coverage */
+
+ s.mbinxlo = s.mbinxlo - 1;
+ mbinxhi = mbinxhi + 1;
+ s.mbinx = mbinxhi - s.mbinxlo + 1;
+
+ s.mbinylo = s.mbinylo - 1;
+ mbinyhi = mbinyhi + 1;
+ s.mbiny = mbinyhi - s.mbinylo + 1;
+
+ s.mbinzlo = s.mbinzlo - 1;
+ mbinzhi = mbinzhi + 1;
+ s.mbinz = mbinzhi - s.mbinzlo + 1;
+
+ /*
+ compute bin stencil of all bins whose closest corner to central bin
+ is within neighbor cutoff
+ for partial Newton (newton = 0),
+ stencil is all surrounding bins including self
+ for full Newton (newton = 1),
+ stencil is bins to the "upper right" of central bin, does NOT include self
+ next(xyz) = how far the stencil could possibly extend
+ factor < 1.0 for special case of LJ benchmark so code will create
+ correct-size stencil when there are 3 bins for every 5 lattice spacings
+ */
+
+ int nextx = static_cast<int>(s.neigh_cut * s.bininvx);
+
+ if(nextx * s.binsizex < FACTOR * s.neigh_cut) nextx++;
+
+ int nexty = static_cast<int>(s.neigh_cut * s.bininvy);
+
+ if(nexty * s.binsizey < FACTOR * s.neigh_cut) nexty++;
+
+ int nextz = static_cast<int>(s.neigh_cut * s.bininvz);
+
+ if(nextz * s.binsizez < FACTOR * s.neigh_cut) nextz++;
+
+ int nmax = (2 * nextz + 1) * (2 * nexty + 1) * (2 * nextx + 1);
+ s.d_stencil = t_int_1d("stencil", nmax);
+ s.h_stencil = Kokkos::create_mirror_view(s.d_stencil);
+ s.nstencil = 0;
+ int kstart = -nextz;
+
+ for(int k = kstart; k <= nextz; k++) {
+ for(int j = -nexty; j <= nexty; j++) {
+ for(int i = -nextx; i <= nextx; i++) {
+ if(bindist(s,i, j, k) < s.neigh_cutsq) {
+ s.h_stencil(s.nstencil++) = k * s.mbiny * s.mbinx + j * s.mbinx + i;
+ }
+ }
+ }
+ }
+
+ /* Allocate neighbor arrays */
+
+ Kokkos::deep_copy(s.d_stencil, s.h_stencil);
+ s.mbins = s.mbinx * s.mbiny * s.mbinz;
+ s.bincount = t_int_1d("bincount", s.mbins);
+ s.bins = t_int_2d("bins", s.mbins, 8);
+
+ s.neighbors = t_neighbors("neighbors",s.natoms,80);
+ s.numneigh = t_int_1d("numneigh",s.natoms);
+ s.d_resize = t_int_scalar("resize");
+ s.h_resize = Kokkos::create_mirror_view(s.d_resize);
+}
+
+
+/* Build the neighborlist
+ * This is a try and rerun algorithm for handling the case where the bins array
+ * and the neighbors array are not big enough. So if one is too small, it will
+ * reallocate and rerun the binnind algorithm or the neighborlist construction.
+ */
+
+void neigh_build(System &s) {
+
+ /* Binning of atoms */
+
+ s.h_resize(0) = 1;
+
+ while(s.h_resize(0) > 0) {
+ s.h_resize(0) = 0;
+ Kokkos::deep_copy(s.d_resize, s.h_resize);
+
+ MemsetZeroFunctor f_zero;
+ f_zero.ptr = (void*) s.bincount.ptr_on_device();
+ Kokkos::parallel_for(s.mbins, f_zero);
+ execution_space::fence();
+
+ BinningFunctor f(s);
+ Kokkos::parallel_for(s.natoms, f);
+ execution_space::fence();
+
+ /* Check if bins was large enough, if nor reallocated and rerun */
+
+ deep_copy(s.h_resize, s.d_resize);
+
+ if(s.h_resize(0)) {
+ int atoms_per_bin = s.h_resize(0)+2;
+ s.bins = t_int_2d("bins", s.mbins, atoms_per_bin);
+ }
+ }
+
+ /* Neighborlist construction */
+
+ s.h_resize(0) = 1;
+
+ while(s.h_resize(0)) {
+ s.h_resize(0) = 0;
+
+ Kokkos::deep_copy(s.d_resize, s.h_resize);
+
+ BuildFunctor f(s);
+ Kokkos::parallel_for(s.nlocal, f);
+
+ execution_space::fence();
+
+ /* Check if neighbors was large enough, if nor reallocated and rerun */
+
+ deep_copy(s.h_resize, s.d_resize);
+
+ if(s.h_resize(0)) {
+ int maxneighs = s.h_resize(0) * 1.2;
+ s.neighbors = t_neighbors("neighbors", s.natoms, maxneighs);
+ }
+ }
+}
diff --git a/lib/kokkos/example/md_skeleton/setup.cpp b/lib/kokkos/example/md_skeleton/setup.cpp
new file mode 100644
index 000000000..7815a8910
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/setup.cpp
@@ -0,0 +1,271 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <system.h>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+/* initialize atoms on fcc lattice in parallel fashion */
+
+#define MAX(a,b) (a>b?a:b)
+#define MIN(a,b) (a<b?a:b)
+
+
+int create_system(System &system, int nx, int ny, int nz, double rho)
+{
+ /* Box Setup */
+
+ double lattice = pow((4.0 / rho), (1.0 / 3.0));
+ system.box.xprd = nx * lattice;
+ system.box.yprd = ny * lattice;
+ system.box.zprd = nz * lattice;
+ system.box.xlo = 0;
+ system.box.ylo = 0;
+ system.box.zlo = 0;
+ system.box.xhi = system.box.xprd;
+ system.box.yhi = system.box.yprd;
+ system.box.zhi = system.box.zprd;
+
+
+ int ghost_dist = int(system.neigh_cut/lattice) + 1;
+
+ /* total # of atoms */
+
+ system.nlocal = 4 * nx * ny * nz;
+ system.nghost = 4 * (nx + 2 * ghost_dist) *
+ (ny + 2 * ghost_dist) *
+ (nz + 2 * ghost_dist) -
+ system.nlocal;
+ system.natoms = system.nlocal + system.nghost;
+
+ system.d_x = t_x_array("X",system.natoms);
+ system.h_x = Kokkos::create_mirror_view(system.d_x);
+ system.f = t_f_array("F",system.natoms);
+
+ /* determine loop bounds of lattice subsection that overlaps my sub-box
+ insure loop bounds do not exceed nx,ny,nz */
+
+ double alat = pow((4.0 / rho), (1.0 / 3.0));
+ int ilo = static_cast<int>(system.box.xlo / (0.5 * alat) - 1);
+ int ihi = static_cast<int>(system.box.xhi / (0.5 * alat) + 1);
+ int jlo = static_cast<int>(system.box.ylo / (0.5 * alat) - 1);
+ int jhi = static_cast<int>(system.box.yhi / (0.5 * alat) + 1);
+ int klo = static_cast<int>(system.box.zlo / (0.5 * alat) - 1);
+ int khi = static_cast<int>(system.box.zhi / (0.5 * alat) + 1);
+
+ ilo = MAX(ilo, 0);
+ ihi = MIN(ihi, 2 * nx - 1);
+ jlo = MAX(jlo, 0);
+ jhi = MIN(jhi, 2 * ny - 1);
+ klo = MAX(klo, 0);
+ khi = MIN(khi, 2 * nz - 1);
+
+
+
+ /* generates positions of atoms on fcc sublattice*/
+
+ srand(3718273);
+ /* create non-ghost atoms */
+ {
+ double xtmp, ytmp, ztmp;
+ int sx = 0;
+ int sy = 0;
+ int sz = 0;
+ int ox = 0;
+ int oy = 0;
+ int oz = 0;
+ int subboxdim = 8;
+
+ int n = 0;
+ int iflag = 0;
+
+ while(oz * subboxdim <= khi) {
+ const int k = oz * subboxdim + sz;
+ const int j = oy * subboxdim + sy;
+ const int i = ox * subboxdim + sx;
+
+ if(iflag) continue;
+
+ if(((i + j + k) % 2 == 0) &&
+ (i >= ilo) && (i <= ihi) &&
+ (j >= jlo) && (j <= jhi) &&
+ (k >= klo) && (k <= khi)) {
+
+ const int nold = n;
+ while(nold == n) {
+ xtmp = 0.5 * alat * i + system.delta/1000*(rand()%1000-500);
+ ytmp = 0.5 * alat * j + system.delta/1000*(rand()%1000-500);
+ ztmp = 0.5 * alat * k + system.delta/1000*(rand()%1000-500);
+
+ if(xtmp >= system.box.xlo && xtmp < system.box.xhi &&
+ ytmp >= system.box.ylo && ytmp < system.box.yhi &&
+ ztmp >= system.box.zlo && ztmp < system.box.zhi) {
+ system.h_x(n,0) = xtmp;
+ system.h_x(n,1) = ytmp;
+ system.h_x(n,2) = ztmp;
+ n++;
+ }
+ }
+ }
+
+ sx++;
+
+ if(sx == subboxdim) {
+ sx = 0;
+ sy++;
+ }
+
+ if(sy == subboxdim) {
+ sy = 0;
+ sz++;
+ }
+
+ if(sz == subboxdim) {
+ sz = 0;
+ ox++;
+ }
+
+ if(ox * subboxdim > ihi) {
+ ox = 0;
+ oy++;
+ }
+
+ if(oy * subboxdim > jhi) {
+ oy = 0;
+ oz++;
+ }
+ }
+
+ /* check that correct # of atoms were created */
+
+ if(system.nlocal != n) {
+ printf("Created incorrect # of atoms\n");
+
+ return 1;
+ }
+ }
+
+ /* create ghost atoms */
+
+ {
+ double xtmp, ytmp, ztmp;
+
+ int ilo_g = ilo - 2 * ghost_dist;
+ int jlo_g = jlo - 2 * ghost_dist;
+ int klo_g = klo - 2 * ghost_dist;
+ int ihi_g = ihi + 2 * ghost_dist;
+ int jhi_g = jhi + 2 * ghost_dist;
+ int khi_g = khi + 2 * ghost_dist;
+
+ int subboxdim = 8;
+ int sx = 0;
+ int sy = 0;
+ int sz = 0;
+ int ox = subboxdim * ilo_g;
+ int oy = subboxdim * jlo_g;
+ int oz = subboxdim * klo_g;
+
+ int n = system.nlocal;
+ int iflag = 0;
+
+
+ while(oz * subboxdim <= khi_g) {
+ const int k = oz * subboxdim + sz;
+ const int j = oy * subboxdim + sy;
+ const int i = ox * subboxdim + sx;
+
+ if(iflag) continue;
+
+ if(((i + j + k) % 2 == 0) &&
+ (i >= ilo_g) && (i <= ihi_g) &&
+ (j >= jlo_g) && (j <= jhi_g) &&
+ (k >= klo_g) && (k <= khi_g) &&
+ ((i < ilo) || (i > ihi) ||
+ (j < jlo) || (j > jhi) ||
+ (k < klo) || (k > khi))
+ ) {
+
+ xtmp = 0.5 * alat * i;
+ ytmp = 0.5 * alat * j;
+ ztmp = 0.5 * alat * k;
+
+ system.h_x(n,0) = xtmp + system.delta/1000*(rand()%1000-500);;
+ system.h_x(n,1) = ytmp + system.delta/1000*(rand()%1000-500);;
+ system.h_x(n,2) = ztmp + system.delta/1000*(rand()%1000-500);;
+ n++;
+ }
+
+ sx++;
+
+ if(sx == subboxdim) {
+ sx = 0;
+ sy++;
+ }
+
+ if(sy == subboxdim) {
+ sy = 0;
+ sz++;
+ }
+
+ if(sz == subboxdim) {
+ sz = 0;
+ ox++;
+ //printf("%i %i %i // %i %i %i\n",ox,oy,oz,i,j,k);
+ }
+
+ if(ox * subboxdim > ihi_g) {
+ ox = subboxdim * ilo_g;
+ oy++;
+ }
+
+ if(oy * subboxdim > jhi_g) {
+ oy = subboxdim * jlo_g;
+ oz++;
+ }
+ }
+ }
+
+ Kokkos::deep_copy(system.d_x,system.h_x);
+ return 0;
+}
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_StaticAssert.hpp b/lib/kokkos/example/md_skeleton/system.h
old mode 100755
new mode 100644
similarity index 72%
copy from lib/kokkos/core/src/impl/Kokkos_StaticAssert.hpp
copy to lib/kokkos/example/md_skeleton/system.h
index 25e2ec9dc..0184a119f
--- a/lib/kokkos/core/src/impl/Kokkos_StaticAssert.hpp
+++ b/lib/kokkos/example/md_skeleton/system.h
@@ -1,79 +1,92 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#ifndef KOKKOS_STATICASSERT_HPP
-#define KOKKOS_STATICASSERT_HPP
+#ifndef SYSTEM_H_
+#define SYSTEM_H_
-namespace Kokkos {
-namespace Impl {
+#include <types.h>
-template < bool , class T = void >
-struct StaticAssert ;
-
-template< class T >
-struct StaticAssert< true , T > {
- typedef T type ;
- static const bool value = true ;
+struct Box {
+ double xprd, yprd, zprd;
+ double xlo, xhi;
+ double ylo, yhi;
+ double zlo, zhi;
};
-template < class A , class B >
-struct StaticAssertSame ;
+struct System {
+ Box box;
+
+ int natoms;
+ int nlocal;
+ int nghost;
-template < class A >
-struct StaticAssertSame<A,A> { typedef A type ; };
+ t_x_array d_x;
+ t_x_array_host h_x;
-template < class A , class B >
-struct StaticAssertAssignable ;
+ t_f_array f;
-template < class A >
-struct StaticAssertAssignable<A,A> { typedef A type ; };
+ t_neighbors neighbors;
+ t_int_1d numneigh;
-template < class A >
-struct StaticAssertAssignable< const A , A > { typedef const A type ; };
+ double delta;
-} // namespace Impl
-} // namespace Kokkos
+ double neigh_cut,neigh_cutsq;
-#endif /* KOKKOS_STATICASSERT_HPP */
+ int mbins;
+ int nbinx,nbiny,nbinz;
+ int mbinx,mbiny,mbinz;
+ int mbinxlo,mbinylo,mbinzlo;
+ double binsizex,binsizey,binsizez;
+ double bininvx,bininvy,bininvz;
+ t_int_1d bincount;
+ t_int_2d bins;
+ t_int_scalar d_resize;
+ t_int_scalar_host h_resize;
+ t_int_1d d_stencil;
+ t_int_1d_host h_stencil;
+ int nstencil;
+ double force_cut,force_cutsq;
+};
+#endif
diff --git a/lib/kokkos/example/md_skeleton/types.h b/lib/kokkos/example/md_skeleton/types.h
new file mode 100644
index 000000000..7f92b7cd0
--- /dev/null
+++ b/lib/kokkos/example/md_skeleton/types.h
@@ -0,0 +1,118 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef TYPES_H_
+#define TYPES_H_
+
+/* Determine default device type and necessary includes */
+
+#include <Kokkos_Core.hpp>
+
+typedef Kokkos::DefaultExecutionSpace execution_space ;
+
+#if ! defined( KOKKOS_HAVE_CUDA )
+ struct double2 {
+ double x, y;
+ KOKKOS_INLINE_FUNCTION
+ double2(double xinit, double yinit) {
+ x = xinit;
+ y = yinit;
+ }
+ KOKKOS_INLINE_FUNCTION
+ double2() {
+ x = 0.0;
+ y = 0.0;
+ }
+ KOKKOS_INLINE_FUNCTION
+ double2& operator += (const double2& src) {
+ x+=src.x;
+ y+=src.y;
+ return *this;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ volatile double2& operator += (const volatile double2& src) volatile {
+ x+=src.x;
+ y+=src.y;
+ return *this;
+ }
+
+ };
+#endif
+
+#include <impl/Kokkos_Timer.hpp>
+
+/* Define types used throughout the code */
+
+//Position arrays
+typedef Kokkos::View<double*[3], Kokkos::LayoutRight, execution_space> t_x_array ;
+typedef t_x_array::HostMirror t_x_array_host ;
+typedef Kokkos::View<const double*[3], Kokkos::LayoutRight, execution_space> t_x_array_const ;
+typedef Kokkos::View<const double*[3], Kokkos::LayoutRight, execution_space, Kokkos::MemoryRandomAccess > t_x_array_randomread ;
+
+//Force array
+typedef Kokkos::View<double*[3], execution_space> t_f_array ;
+
+
+//Neighborlist
+typedef Kokkos::View<int**, execution_space > t_neighbors ;
+typedef Kokkos::View<const int**, execution_space > t_neighbors_const ;
+typedef Kokkos::View<int*, execution_space, Kokkos::MemoryUnmanaged > t_neighbors_sub ;
+typedef Kokkos::View<const int*, execution_space, Kokkos::MemoryUnmanaged > t_neighbors_const_sub ;
+
+//1d int array
+typedef Kokkos::View<int*, execution_space > t_int_1d ;
+typedef t_int_1d::HostMirror t_int_1d_host ;
+typedef Kokkos::View<const int*, execution_space > t_int_1d_const ;
+typedef Kokkos::View<int*, execution_space , Kokkos::MemoryUnmanaged> t_int_1d_um ;
+typedef Kokkos::View<const int* , execution_space , Kokkos::MemoryUnmanaged> t_int_1d_const_um ;
+
+//2d int array
+typedef Kokkos::View<int**, Kokkos::LayoutRight, execution_space > t_int_2d ;
+typedef t_int_2d::HostMirror t_int_2d_host ;
+
+//Scalar ints
+typedef Kokkos::View<int[1], Kokkos::LayoutLeft, execution_space> t_int_scalar ;
+typedef t_int_scalar::HostMirror t_int_scalar_host ;
+
+#endif /* TYPES_H_ */
diff --git a/lib/kokkos/example/multi_fem/BoxMeshFixture.hpp b/lib/kokkos/example/multi_fem/BoxMeshFixture.hpp
new file mode 100644
index 000000000..195bb4a6a
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/BoxMeshFixture.hpp
@@ -0,0 +1,610 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_BOXMESHFIXTURE_HPP
+#define KOKKOS_BOXMESHFIXTURE_HPP
+
+#include <cmath>
+#include <stdexcept>
+#include <sstream>
+
+#include <Kokkos_Core.hpp>
+#include <BoxMeshPartition.hpp>
+#include <FEMesh.hpp>
+#include <HexElement.hpp>
+
+//----------------------------------------------------------------------------
+
+struct FixtureElementHex8 {
+
+ static const unsigned element_node_count = 8 ;
+
+ HybridFEM::HexElement_TensorData< element_node_count > elem_data ;
+ BoxBoundsLinear box_bounds ;
+
+ FixtureElementHex8() : elem_data(), box_bounds() {}
+
+ static void create_node_boxes_from_vertex_boxes(
+ const BoxType & vertex_box_global ,
+ const std::vector< BoxType > & vertex_box_parts ,
+ BoxType & node_box_global ,
+ std::vector< BoxType > & node_box_parts )
+ {
+ node_box_global = vertex_box_global ;
+ node_box_parts = vertex_box_parts ;
+ }
+
+ void elem_to_node( const unsigned node_local , unsigned coord[] ) const
+ {
+ coord[0] += elem_data.eval_map[ node_local ][0] ;
+ coord[1] += elem_data.eval_map[ node_local ][1] ;
+ coord[2] += elem_data.eval_map[ node_local ][2] ;
+ }
+};
+
+struct FixtureElementHex27 {
+ static const unsigned element_node_count = 27 ;
+
+ HybridFEM::HexElement_TensorData< element_node_count > elem_data ;
+ BoxBoundsQuadratic box_bounds ;
+
+ FixtureElementHex27() : elem_data(), box_bounds() {}
+
+ static void create_node_boxes_from_vertex_boxes(
+ const BoxType & vertex_box_global ,
+ const std::vector< BoxType > & vertex_box_parts ,
+ BoxType & node_box_global ,
+ std::vector< BoxType > & node_box_parts )
+ {
+ node_box_global = vertex_box_global ;
+ node_box_parts = vertex_box_parts ;
+
+ node_box_global[0][1] = 2 * node_box_global[0][1] - 1 ;
+ node_box_global[1][1] = 2 * node_box_global[1][1] - 1 ;
+ node_box_global[2][1] = 2 * node_box_global[2][1] - 1 ;
+
+ for ( unsigned i = 0 ; i < vertex_box_parts.size() ; ++i ) {
+ node_box_parts[i][0][0] = 2 * node_box_parts[i][0][0] ;
+ node_box_parts[i][1][0] = 2 * node_box_parts[i][1][0] ;
+ node_box_parts[i][2][0] = 2 * node_box_parts[i][2][0] ;
+
+ node_box_parts[i][0][1] =
+ std::min( node_box_global[0][1] , 2 * node_box_parts[i][0][1] );
+ node_box_parts[i][1][1] =
+ std::min( node_box_global[1][1] , 2 * node_box_parts[i][1][1] );
+ node_box_parts[i][2][1] =
+ std::min( node_box_global[2][1] , 2 * node_box_parts[i][2][1] );
+ }
+ }
+
+ void elem_to_node( const unsigned node_local , unsigned coord[] ) const
+ {
+ coord[0] = 2 * coord[0] + elem_data.eval_map[ node_local ][0] ;
+ coord[1] = 2 * coord[1] + elem_data.eval_map[ node_local ][1] ;
+ coord[2] = 2 * coord[2] + elem_data.eval_map[ node_local ][2] ;
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class Device , class ElementSpec >
+struct BoxMeshFixture {
+
+ typedef Scalar coordinate_scalar_type ;
+ typedef Device execution_space ;
+
+ static const unsigned element_node_count = ElementSpec::element_node_count ;
+
+ typedef HybridFEM::FEMesh< coordinate_scalar_type ,
+ element_node_count ,
+ execution_space > FEMeshType ;
+
+ typedef typename FEMeshType::node_coords_type node_coords_type ;
+ typedef typename FEMeshType::elem_node_ids_type elem_node_ids_type ;
+ typedef typename FEMeshType::node_elem_ids_type node_elem_ids_type ;
+
+
+ static void verify(
+ const typename FEMeshType::node_coords_type::HostMirror & node_coords ,
+ const typename FEMeshType::elem_node_ids_type::HostMirror & elem_node_ids ,
+ const typename FEMeshType::node_elem_ids_type::HostMirror & node_elem_ids )
+ {
+ typedef typename FEMeshType::size_type size_type ;
+ //typedef typename node_coords_type::value_type coords_type ; // unused
+
+ const size_type node_count_total = node_coords.dimension_0();
+ const size_type elem_count_total = elem_node_ids.dimension_0();
+
+ const ElementSpec element ;
+
+ for ( size_type node_index = 0 ;
+ node_index < node_count_total ; ++node_index ) {
+
+ for ( size_type
+ j = node_elem_ids.row_map[ node_index ] ;
+ j < node_elem_ids.row_map[ node_index + 1 ] ; ++j ) {
+
+ const size_type elem_index = node_elem_ids.entries(j,0);
+ const size_type node_local = node_elem_ids.entries(j,1);
+ const size_type en_id = elem_node_ids(elem_index,node_local);
+
+ if ( node_index != en_id ) {
+ std::ostringstream msg ;
+ msg << "BoxMeshFixture node_elem_ids error"
+ << " : node_index(" << node_index
+ << ") entry(" << j
+ << ") elem_index(" << elem_index
+ << ") node_local(" << node_local
+ << ") elem_node_id(" << en_id
+ << ")" ;
+ throw std::runtime_error( msg.str() );
+ }
+ }
+ }
+
+ for ( size_type elem_index = 0 ;
+ elem_index < elem_count_total; ++elem_index ) {
+
+ coordinate_scalar_type elem_node_coord[ element_node_count ][3] ;
+
+ for ( size_type nn = 0 ; nn < element_node_count ; ++nn ) {
+ const size_type node_index = elem_node_ids( elem_index , nn );
+
+ for ( size_type nc = 0 ; nc < 3 ; ++nc ) {
+ elem_node_coord[nn][nc] = node_coords( node_index , nc );
+ }
+ }
+
+
+ for ( size_type nn = 0 ; nn < element_node_count ; ++nn ) {
+
+ const unsigned ix = element.elem_data.eval_map[nn][0] ;
+ const unsigned iy = element.elem_data.eval_map[nn][1] ;
+ const unsigned iz = element.elem_data.eval_map[nn][2] ;
+
+ if ( elem_node_coord[nn][0] != elem_node_coord[0][0] + ix ||
+ elem_node_coord[nn][1] != elem_node_coord[0][1] + iy ||
+ elem_node_coord[nn][2] != elem_node_coord[0][2] + iz ) {
+
+ std::ostringstream msg ;
+ msg << "BoxMeshFixture elem_node_coord mapping failure { "
+ << elem_node_coord[nn][0] << " "
+ << elem_node_coord[nn][1] << " "
+ << elem_node_coord[nn][2] << " } != { "
+ << elem_node_coord[ 0][0] + ix << " "
+ << elem_node_coord[ 0][1] + iy << " "
+ << elem_node_coord[ 0][2] + iz
+ << " }" ;
+ throw std::runtime_error( msg.str() );
+ }
+ }
+ }
+ }
+
+ //------------------------------------
+ // Initialize element-node connectivity:
+ // Order elements that only depend on owned nodes first.
+ // These elements could be computed while waiting for
+ // received node data.
+
+ static void layout_elements_interior_exterior(
+ const BoxType vertex_box_local_used ,
+ const BoxType vertex_box_local_owned ,
+ const BoxType node_box_local_used ,
+ const std::vector<size_t> & node_used_id_map ,
+ const ElementSpec element_fixture ,
+ const size_t elem_count_interior ,
+ const typename elem_node_ids_type::HostMirror elem_node_ids )
+ {
+ size_t elem_index_interior = 0 ;
+ size_t elem_index_boundary = elem_count_interior ;
+
+ for ( size_t iz = vertex_box_local_used[2][0] ;
+ iz < vertex_box_local_used[2][1] - 1 ; ++iz ) {
+ for ( size_t iy = vertex_box_local_used[1][0] ;
+ iy < vertex_box_local_used[1][1] - 1 ; ++iy ) {
+ for ( size_t ix = vertex_box_local_used[0][0] ;
+ ix < vertex_box_local_used[0][1] - 1 ; ++ix ) {
+
+ size_t elem_index ;
+
+ // If lower and upper vertices are owned then element is interior
+ if ( contain( vertex_box_local_owned, ix, iy, iz ) &&
+ contain( vertex_box_local_owned, ix+1, iy+1, iz+1 ) ) {
+ elem_index = elem_index_interior++ ;
+ }
+ else {
+ elem_index = elem_index_boundary++ ;
+ }
+
+ for ( size_t nn = 0 ; nn < element_node_count ; ++nn ) {
+ unsigned coord[3] = { static_cast<unsigned>(ix) , static_cast<unsigned>(iy) , static_cast<unsigned>(iz) };
+
+ element_fixture.elem_to_node( nn , coord );
+
+ const size_t node_local_id =
+ box_map_id( node_box_local_used ,
+ node_used_id_map ,
+ coord[0] , coord[1] , coord[2] );
+
+ elem_node_ids( elem_index , nn ) = node_local_id ;
+ }
+ }}}
+ }
+
+ //------------------------------------
+ // Nested partitioning of elements by number of thread 'gangs'
+
+ static void layout_elements_partitioned(
+ const BoxType vertex_box_local_used ,
+ const BoxType /*vertex_box_local_owned*/ ,
+ const BoxType node_box_local_used ,
+ const std::vector<size_t> & node_used_id_map ,
+ const ElementSpec element_fixture ,
+ const size_t thread_gang_count ,
+ const typename elem_node_ids_type::HostMirror elem_node_ids )
+ {
+ std::vector< BoxType > element_box_gangs( thread_gang_count );
+
+ BoxType element_box_local_used = vertex_box_local_used ;
+
+ element_box_local_used[0][1] -= 1 ;
+ element_box_local_used[1][1] -= 1 ;
+ element_box_local_used[2][1] -= 1 ;
+
+ box_partition_rcb( element_box_local_used , element_box_gangs );
+
+ size_t elem_index = 0 ;
+
+ for ( size_t ig = 0 ; ig < thread_gang_count ; ++ig ) {
+
+ const BoxType box = element_box_gangs[ig] ;
+
+ for ( size_t iz = box[2][0] ; iz < box[2][1] ; ++iz ) {
+ for ( size_t iy = box[1][0] ; iy < box[1][1] ; ++iy ) {
+ for ( size_t ix = box[0][0] ; ix < box[0][1] ; ++ix , ++elem_index ) {
+
+ for ( size_t nn = 0 ; nn < element_node_count ; ++nn ) {
+ unsigned coord[3] = { static_cast<unsigned>(ix) , static_cast<unsigned>(iy) , static_cast<unsigned>(iz) };
+
+ element_fixture.elem_to_node( nn , coord );
+
+ const size_t node_local_id =
+ box_map_id( node_box_local_used ,
+ node_used_id_map ,
+ coord[0] , coord[1] , coord[2] );
+
+ elem_node_ids( elem_index , nn ) = node_local_id ;
+ }
+ }}}
+ }
+ }
+
+ //------------------------------------
+
+ static FEMeshType create( const size_t proc_count ,
+ const size_t proc_local ,
+ const size_t gang_count ,
+ const size_t elems_x ,
+ const size_t elems_y ,
+ const size_t elems_z ,
+ const double x_coord_curve = 1 ,
+ const double y_coord_curve = 1 ,
+ const double z_coord_curve = 1 )
+ {
+ const size_t vertices_x = elems_x + 1 ;
+ const size_t vertices_y = elems_y + 1 ;
+ const size_t vertices_z = elems_z + 1 ;
+
+ const BoxBoundsLinear vertex_box_bounds ;
+ const ElementSpec element ;
+
+ // Partition based upon vertices:
+
+ BoxType vertex_box_global ;
+ std::vector< BoxType > vertex_box_parts( proc_count );
+
+ vertex_box_global[0][0] = 0 ; vertex_box_global[0][1] = vertices_x ;
+ vertex_box_global[1][0] = 0 ; vertex_box_global[1][1] = vertices_y ;
+ vertex_box_global[2][0] = 0 ; vertex_box_global[2][1] = vertices_z ;
+
+ box_partition_rcb( vertex_box_global , vertex_box_parts );
+
+ const BoxType vertex_box_local_owned = vertex_box_parts[ proc_local ];
+
+ // Determine interior and used vertices:
+
+ BoxType vertex_box_local_interior ;
+ BoxType vertex_box_local_used ;
+
+ vertex_box_bounds.apply( vertex_box_global ,
+ vertex_box_local_owned ,
+ vertex_box_local_interior ,
+ vertex_box_local_used );
+
+ // Element counts:
+
+ const long local_elems_x =
+ ( vertex_box_local_used[0][1] - vertex_box_local_used[0][0] ) - 1 ;
+ const long local_elems_y =
+ ( vertex_box_local_used[1][1] - vertex_box_local_used[1][0] ) - 1 ;
+ const long local_elems_z =
+ ( vertex_box_local_used[2][1] - vertex_box_local_used[2][0] ) - 1 ;
+
+ const size_t elem_count_total = std::max( long(0) , local_elems_x ) *
+ std::max( long(0) , local_elems_y ) *
+ std::max( long(0) , local_elems_z );
+
+ const long interior_elems_x =
+ ( vertex_box_local_owned[0][1] - vertex_box_local_owned[0][0] ) - 1 ;
+ const long interior_elems_y =
+ ( vertex_box_local_owned[1][1] - vertex_box_local_owned[1][0] ) - 1 ;
+ const long interior_elems_z =
+ ( vertex_box_local_owned[2][1] - vertex_box_local_owned[2][0] ) - 1 ;
+
+ const size_t elem_count_interior = std::max( long(0) , interior_elems_x ) *
+ std::max( long(0) , interior_elems_y ) *
+ std::max( long(0) , interior_elems_z );
+
+ // Expand vertex boxes to node boxes:
+
+ BoxType node_box_global ;
+ BoxType node_box_local_used ;
+ std::vector< BoxType > node_box_parts ;
+
+ element.create_node_boxes_from_vertex_boxes(
+ vertex_box_global , vertex_box_parts ,
+ node_box_global , node_box_parts );
+
+ // Node communication maps:
+
+ size_t node_count_interior = 0 ;
+ size_t node_count_owned = 0 ;
+ size_t node_count_total = 0 ;
+ std::vector<size_t> node_used_id_map ;
+ std::vector<size_t> node_part_counts ;
+ std::vector< std::vector<size_t> > node_send_map ;
+
+ box_partition_maps( node_box_global ,
+ node_box_parts ,
+ element.box_bounds ,
+ proc_local ,
+ node_box_local_used ,
+ node_used_id_map ,
+ node_count_interior ,
+ node_count_owned ,
+ node_count_total ,
+ node_part_counts ,
+ node_send_map );
+
+ size_t node_count_send = 0 ;
+ for ( size_t i = 0 ; i < node_send_map.size() ; ++i ) {
+ node_count_send += node_send_map[i].size();
+ }
+
+ size_t recv_msg_count = 0 ;
+ size_t send_msg_count = 0 ;
+ size_t send_count = 0 ;
+
+ for ( size_t i = 1 ; i < proc_count ; ++i ) {
+ if ( node_part_counts[i] ) ++recv_msg_count ;
+ if ( node_send_map[i].size() ) {
+ ++send_msg_count ;
+ send_count += node_send_map[i].size();
+ }
+ }
+
+ // Finite element mesh:
+
+ FEMeshType mesh ;
+
+ if ( node_count_total ) {
+ mesh.node_coords = node_coords_type( "node_coords", node_count_total );
+ }
+
+ if ( elem_count_total ) {
+ mesh.elem_node_ids =
+ elem_node_ids_type( "elem_node_ids", elem_count_total );
+ }
+
+ mesh.parallel_data_map.assign( node_count_interior ,
+ node_count_owned ,
+ node_count_total ,
+ recv_msg_count ,
+ send_msg_count ,
+ send_count );
+
+ typename node_coords_type::HostMirror node_coords =
+ Kokkos::create_mirror( mesh.node_coords );
+
+ typename elem_node_ids_type::HostMirror elem_node_ids =
+ Kokkos::create_mirror( mesh.elem_node_ids );
+
+ //------------------------------------
+ // set node coordinates to grid location for subsequent verification
+
+ for ( size_t iz = node_box_local_used[2][0] ;
+ iz < node_box_local_used[2][1] ; ++iz ) {
+
+ for ( size_t iy = node_box_local_used[1][0] ;
+ iy < node_box_local_used[1][1] ; ++iy ) {
+
+ for ( size_t ix = node_box_local_used[0][0] ;
+ ix < node_box_local_used[0][1] ; ++ix ) {
+
+ const size_t node_local_id =
+ box_map_id( node_box_local_used , node_used_id_map , ix , iy , iz );
+
+ node_coords( node_local_id , 0 ) = ix ;
+ node_coords( node_local_id , 1 ) = iy ;
+ node_coords( node_local_id , 2 ) = iz ;
+ }}}
+
+ //------------------------------------
+ // Initialize element-node connectivity:
+
+ if ( 1 < gang_count ) {
+ layout_elements_partitioned( vertex_box_local_used ,
+ vertex_box_local_owned ,
+ node_box_local_used ,
+ node_used_id_map ,
+ element ,
+ gang_count ,
+ elem_node_ids );
+ }
+ else {
+ layout_elements_interior_exterior( vertex_box_local_used ,
+ vertex_box_local_owned ,
+ node_box_local_used ,
+ node_used_id_map ,
+ element ,
+ elem_count_interior ,
+ elem_node_ids );
+ }
+
+ //------------------------------------
+ // Populate node->element connectivity:
+
+ std::vector<size_t> node_elem_work( node_count_total , (size_t) 0 );
+
+ for ( size_t i = 0 ; i < elem_count_total ; ++i ) {
+ for ( size_t n = 0 ; n < element_node_count ; ++n ) {
+ ++node_elem_work[ elem_node_ids(i,n) ];
+ }
+ }
+
+ mesh.node_elem_ids =
+ Kokkos::create_staticcrsgraph< node_elem_ids_type >( "node_elem_ids" , node_elem_work );
+
+ typename node_elem_ids_type::HostMirror
+ node_elem_ids = Kokkos::create_mirror( mesh.node_elem_ids );
+
+ for ( size_t i = 0 ; i < node_count_total ; ++i ) {
+ node_elem_work[i] = node_elem_ids.row_map[i];
+ }
+
+ // Looping in element order insures the list of elements
+ // is sorted by element index.
+
+ for ( size_t i = 0 ; i < elem_count_total ; ++i ) {
+ for ( size_t n = 0 ; n < element_node_count ; ++n ) {
+ const unsigned nid = elem_node_ids(i, n);
+ const unsigned j = node_elem_work[nid] ; ++node_elem_work[nid] ;
+
+ node_elem_ids.entries( j , 0 ) = i ;
+ node_elem_ids.entries( j , 1 ) = n ;
+ }
+ }
+ //------------------------------------
+ // Verify setup with node coordinates matching grid indices.
+ verify( node_coords , elem_node_ids , node_elem_ids );
+
+ //------------------------------------
+ // Scale node coordinates to problem extent with
+ // nonlinear mapping.
+ {
+ const double problem_extent[3] =
+ { static_cast<double>( vertex_box_global[0][1] - 1 ) ,
+ static_cast<double>( vertex_box_global[1][1] - 1 ) ,
+ static_cast<double>( vertex_box_global[2][1] - 1 ) };
+
+ const double grid_extent[3] =
+ { static_cast<double>( node_box_global[0][1] - 1 ) ,
+ static_cast<double>( node_box_global[1][1] - 1 ) ,
+ static_cast<double>( node_box_global[2][1] - 1 ) };
+
+ for ( size_t i = 0 ; i < node_count_total ; ++i ) {
+ const double x_unit = node_coords(i,0) / grid_extent[0] ;
+ const double y_unit = node_coords(i,1) / grid_extent[1] ;
+ const double z_unit = node_coords(i,2) / grid_extent[2] ;
+
+ node_coords(i,0) = coordinate_scalar_type( problem_extent[0] * std::pow( x_unit , x_coord_curve ) );
+ node_coords(i,1) = coordinate_scalar_type( problem_extent[1] * std::pow( y_unit , y_coord_curve ) );
+ node_coords(i,2) = coordinate_scalar_type( problem_extent[2] * std::pow( z_unit , z_coord_curve ) );
+ }
+ }
+
+ Kokkos::deep_copy( mesh.node_coords , node_coords );
+ Kokkos::deep_copy( mesh.elem_node_ids , elem_node_ids );
+ Kokkos::deep_copy( mesh.node_elem_ids.entries , node_elem_ids.entries );
+
+ //------------------------------------
+ // Communication lists:
+ {
+ recv_msg_count = 0 ;
+ send_msg_count = 0 ;
+ send_count = 0 ;
+
+ for ( size_t i = 1 ; i < proc_count ; ++i ) {
+
+ // Order sending starting with the local processor rank
+ // to try to smooth out the amount of messages simultaneously
+ // send to a particular processor.
+
+ const int proc = ( proc_local + i ) % proc_count ;
+ if ( node_part_counts[i] ) {
+ mesh.parallel_data_map.host_recv(recv_msg_count,0) = proc ;
+ mesh.parallel_data_map.host_recv(recv_msg_count,1) = node_part_counts[i] ;
+ ++recv_msg_count ;
+ }
+ if ( node_send_map[i].size() ) {
+ mesh.parallel_data_map.host_send(send_msg_count,0) = proc ;
+ mesh.parallel_data_map.host_send(send_msg_count,1) = node_send_map[i].size() ;
+ for ( size_t j = 0 ; j < node_send_map[i].size() ; ++j , ++send_count ) {
+ mesh.parallel_data_map.host_send_item(send_count) = node_send_map[i][j] - node_count_interior ;
+ }
+ ++send_msg_count ;
+ }
+ }
+ }
+
+ return mesh ;
+ }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_BOXMESHFIXTURE_HPP */
+
+
diff --git a/lib/kokkos/example/multi_fem/BoxMeshPartition.cpp b/lib/kokkos/example/multi_fem/BoxMeshPartition.cpp
new file mode 100644
index 000000000..17a6696fb
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/BoxMeshPartition.cpp
@@ -0,0 +1,381 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+#include <limits>
+#include <BoxMeshPartition.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace {
+
+void box_partition( size_t ip , size_t up ,
+ const BoxType & box ,
+ BoxType * const p_box )
+{
+ const size_t np = up - ip ;
+
+ if ( 1 == np ) {
+ p_box[ip] = box ;
+ }
+ else {
+ // Choose axis with largest count:
+
+ const size_t n0 = box[0][1] - box[0][0] ;
+ const size_t n1 = box[1][1] - box[1][0] ;
+ const size_t n2 = box[2][1] - box[2][0] ;
+
+ const size_t axis = n2 > n1 ? ( n2 > n0 ? 2 : ( n1 > n0 ? 1 : 0 ) ) :
+ ( n1 > n0 ? 1 : 0 );
+
+ const size_t n = box[ axis ][1] - box[ axis ][0] ;
+
+ if ( 0 == np % 3 ) {
+ const size_t np_part = np / 3 ; // exact
+
+ const size_t nbox_low = (size_t)(( (double) n ) * ( 1.0 / 3.0 ));
+ const size_t nbox_mid = (size_t)(( (double) n ) * ( 2.0 / 3.0 ));
+
+ BoxType dbox_low = box ; // P = [ip,ip+np/3)
+ BoxType dbox_mid = box ; // P = [ip+np/3,ip+2*np/3)
+ BoxType dbox_upp = box ; // P = [ip+2*np/3,ip+np)
+
+ dbox_low[ axis ][1] = box[ axis ][0] + nbox_low ;
+ dbox_mid[ axis ][1] = box[ axis ][0] + nbox_mid ;
+
+ dbox_mid[ axis ][0] = dbox_low[ axis ][1];
+ dbox_upp[ axis ][0] = dbox_mid[ axis ][1];
+
+ box_partition( ip, ip + np_part, dbox_low , p_box );
+ box_partition( ip+ np_part, ip + 2*np_part, dbox_mid , p_box );
+ box_partition( ip+2*np_part, up, dbox_upp , p_box );
+ }
+ else {
+ const size_t np_low = np / 2 ; /* Rounded down */
+ const size_t nbox_low = (size_t)
+ (((double)n) * ( ((double) np_low ) / ((double) np ) ));
+
+ BoxType dbox_low = box ;
+ BoxType dbox_upp = box ;
+
+ dbox_low[ axis ][1] = dbox_low[ axis ][0] + nbox_low ;
+ dbox_upp[ axis ][0] = dbox_low[ axis ][1];
+
+ box_partition( ip, ip + np_low, dbox_low , p_box );
+ box_partition( ip + np_low, up, dbox_upp , p_box );
+ }
+ }
+}
+
+size_t box_map_offset( const BoxType & local_use ,
+ const size_t global_i ,
+ const size_t global_j ,
+ const size_t global_k )
+
+{
+ const size_t max = std::numeric_limits<size_t>::max();
+
+ const size_t n[3] =
+ { local_use[0][1] - local_use[0][0] ,
+ local_use[1][1] - local_use[1][0] ,
+ local_use[2][1] - local_use[2][0] };
+
+ const size_t use[3] = {
+ ( global_i >= local_use[0][0] ? global_i - local_use[0][0] : max ) ,
+ ( global_j >= local_use[1][0] ? global_j - local_use[1][0] : max ) ,
+ ( global_k >= local_use[2][0] ? global_k - local_use[2][0] : max ) };
+
+ const size_t offset =
+ ( use[0] < n[0] && use[1] < n[1] && use[2] < n[2] ) ?
+ ( use[0] + n[0] * ( use[1] + n[1] * use[2] ) ) : max ;
+
+ if ( offset == max ) {
+ std::ostringstream msg ;
+ msg << "box_map_offset ERROR: "
+ << " use " << local_use
+ << " ( " << global_i
+ << " , " << global_j
+ << " , " << global_k
+ << " )" ;
+ throw std::runtime_error( msg.str() );
+ }
+
+ return offset ;
+}
+
+} // namespace
+
+//----------------------------------------------------------------------------
+
+void BoxBoundsLinear::apply( const BoxType & box_global ,
+ const BoxType & box_part ,
+ BoxType & box_interior ,
+ BoxType & box_use ) const
+{
+ const unsigned ghost = 1 ;
+
+ if ( 0 == count( box_part ) ) {
+ box_interior = box_part ;
+ box_use = box_part ;
+ }
+ else {
+ for ( size_t i = 0 ; i < 3 ; ++i ) {
+
+ box_interior[i][0] =
+ ( box_part[i][0] == box_global[i][0] ) ? box_part[i][0] : (
+ ( box_part[i][0] + ghost < box_part[i][1] ) ? box_part[i][0] + ghost :
+ box_part[i][1] );
+
+ box_interior[i][1] =
+ ( box_part[i][1] == box_global[i][1] ) ? box_part[i][1] : (
+ ( box_part[i][0] + ghost < box_part[i][1] ) ? box_part[i][1] - ghost :
+ box_part[i][0] );
+
+ box_use[i][0] =
+ ( box_part[i][0] > ghost + box_global[i][0] ) ? box_part[i][0] - ghost :
+ box_global[i][0] ;
+ box_use[i][1] =
+ ( box_part[i][1] + ghost < box_global[i][1] ) ? box_part[i][1] + ghost :
+ box_global[i][1] ;
+ }
+ }
+}
+
+void BoxBoundsQuadratic::apply( const BoxType & box_global ,
+ const BoxType & box_part ,
+ BoxType & box_interior ,
+ BoxType & box_use ) const
+{
+ if ( 0 == count( box_part ) ) {
+ box_interior = box_part ;
+ box_use = box_part ;
+ }
+ else {
+ for ( size_t i = 0 ; i < 3 ; ++i ) {
+ const bool odd = ( box_part[i][0] - box_global[i][0] ) & 01 ;
+
+ const unsigned ghost = odd ? 1 : 2 ;
+
+ box_interior[i][0] =
+ ( box_part[i][0] == box_global[i][0] ) ? box_part[i][0] : (
+ ( box_part[i][0] + ghost < box_part[i][1] ) ? box_part[i][0] + ghost :
+ box_part[i][1] );
+
+ box_interior[i][1] =
+ ( box_part[i][1] == box_global[i][1] ) ? box_part[i][1] : (
+ ( box_part[i][0] + ghost < box_part[i][1] ) ? box_part[i][1] - ghost :
+ box_part[i][0] );
+
+ box_use[i][0] =
+ ( box_part[i][0] > ghost + box_global[i][0] ) ? box_part[i][0] - ghost :
+ box_global[i][0] ;
+ box_use[i][1] =
+ ( box_part[i][1] + ghost < box_global[i][1] ) ? box_part[i][1] + ghost :
+ box_global[i][1] ;
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+
+void box_partition_rcb( const BoxType & root_box ,
+ std::vector<BoxType> & part_boxes )
+{
+ const BoxBoundsLinear use_boxes ;
+
+ const size_t part_count = part_boxes.size();
+
+ box_partition( 0 , part_count , root_box , & part_boxes[0] );
+
+ // Verify partitioning
+
+ size_t total_cell = 0 ;
+
+ for ( size_t i = 0 ; i < part_count ; ++i ) {
+
+ total_cell += count( part_boxes[i] );
+
+ BoxType box_interior , box_use ;
+
+ use_boxes.apply( root_box , part_boxes[i] , box_interior , box_use );
+
+ if ( count( box_use ) < count( part_boxes[i] ) ||
+ count( part_boxes[i] ) < count( box_interior ) ||
+ part_boxes[i] != intersect( part_boxes[i] , box_use ) ||
+ box_interior != intersect( part_boxes[i] , box_interior )) {
+
+ std::ostringstream msg ;
+
+ msg << "box_partition_rcb ERROR : "
+ << "part_boxes[" << i << "] = "
+ << part_boxes[i]
+ << " use " << box_use
+ << " interior " << box_interior
+ << std::endl
+ << " part ^ use " << intersect( part_boxes[i] , box_use )
+ << " part ^ interior " << intersect( part_boxes[i] , box_interior );
+
+ throw std::runtime_error( msg.str() );
+ }
+
+ for ( size_t j = i + 1 ; j < part_count ; ++j ) {
+ const BoxType tmp = intersect( part_boxes[i] , part_boxes[j] );
+
+ if ( count( tmp ) ) {
+ throw std::runtime_error( std::string("box partition intersection") );
+ }
+ }
+ }
+
+ if ( total_cell != count( root_box ) ) {
+ throw std::runtime_error( std::string("box partition count") );
+ }
+}
+
+//----------------------------------------------------------------------------
+
+size_t box_map_id( const BoxType & local_use ,
+ const std::vector<size_t> & local_use_id_map ,
+ const size_t global_i ,
+ const size_t global_j ,
+ const size_t global_k )
+
+{
+ const size_t offset =
+ box_map_offset( local_use , global_i , global_j , global_k );
+ return local_use_id_map[ offset ];
+}
+
+//----------------------------------------------------------------------------
+
+void box_partition_maps( const BoxType & root_box ,
+ const std::vector<BoxType> & part_boxes ,
+ const BoxBounds & use_boxes ,
+ const size_t my_part ,
+ BoxType & my_use_box ,
+ std::vector<size_t> & my_use_id_map ,
+ size_t & my_count_interior ,
+ size_t & my_count_owned ,
+ size_t & my_count_uses ,
+ std::vector<size_t> & my_part_counts ,
+ std::vector<std::vector<size_t> > & my_send_map )
+{
+ const size_t np = part_boxes.size();
+
+ if ( np <= my_part ) {
+ std::ostringstream msg ;
+ msg << "box_partition_maps ERROR : "
+ << " np(" << np << ") <= my_part(" << my_part << ")" ;
+ throw std::runtime_error( msg.str() );
+ }
+
+ const BoxType my_owned_box = part_boxes[my_part];
+ BoxType my_interior_box ;
+
+
+ use_boxes.apply( root_box, my_owned_box, my_interior_box, my_use_box );
+
+ my_count_interior = count( my_interior_box );
+ my_count_owned = count( my_owned_box );
+ my_count_uses = count( my_use_box );
+
+ my_use_id_map.assign( my_count_uses , std::numeric_limits<size_t>::max() );
+
+ // Order ids as { owned-interior , owned-parallel , received_{(p+i)%np} }
+
+ size_t offset_interior = 0 ;
+ size_t offset_parallel = my_count_interior ;
+
+ for ( size_t iz = my_owned_box[2][0] ; iz < my_owned_box[2][1] ; ++iz ) {
+ for ( size_t iy = my_owned_box[1][0] ; iy < my_owned_box[1][1] ; ++iy ) {
+ for ( size_t ix = my_owned_box[0][0] ; ix < my_owned_box[0][1] ; ++ix ) {
+ const size_t offset = box_map_offset( my_use_box , ix , iy , iz );
+ if ( contain( my_interior_box , ix , iy , iz ) ) {
+ my_use_id_map[ offset ] = offset_interior++ ;
+ }
+ else {
+ my_use_id_map[ offset ] = offset_parallel++ ;
+ }
+ }}}
+
+
+ my_part_counts.assign( np , (size_t) 0 );
+ my_send_map.assign( np , std::vector<size_t>() );
+
+ my_part_counts[0] = my_count_owned ;
+
+ for ( size_t i = 1 ; i < np ; ++i ) {
+
+ const size_t ip = ( my_part + i ) % np ;
+
+ const BoxType p_owned_box = part_boxes[ip];
+ BoxType p_use_box , p_interior_box ;
+ use_boxes.apply( root_box, p_owned_box, p_interior_box, p_use_box );
+
+ const BoxType recv_box = intersect( my_use_box , p_owned_box );
+ const BoxType send_box = intersect( my_owned_box , p_use_box );
+
+ if ( 0 != ( my_part_counts[i] = count( recv_box ) ) ) {
+ for ( size_t iz = recv_box[2][0] ; iz < recv_box[2][1] ; ++iz ) {
+ for ( size_t iy = recv_box[1][0] ; iy < recv_box[1][1] ; ++iy ) {
+ for ( size_t ix = recv_box[0][0] ; ix < recv_box[0][1] ; ++ix ) {
+ const size_t offset = box_map_offset( my_use_box , ix , iy , iz );
+ my_use_id_map[ offset ] = offset_parallel++ ;
+ }}}
+ }
+
+ if ( 0 != count( send_box ) ) {
+ for ( size_t iz = send_box[2][0] ; iz < send_box[2][1] ; ++iz ) {
+ for ( size_t iy = send_box[1][0] ; iy < send_box[1][1] ; ++iy ) {
+ for ( size_t ix = send_box[0][0] ; ix < send_box[0][1] ; ++ix ) {
+ const size_t offset = box_map_offset( my_use_box , ix , iy , iz );
+
+ my_send_map[ i ].push_back( my_use_id_map[ offset ] );
+ }}}
+ }
+ }
+}
+
+
diff --git a/lib/kokkos/example/multi_fem/BoxMeshPartition.hpp b/lib/kokkos/example/multi_fem/BoxMeshPartition.hpp
new file mode 100644
index 000000000..f2aa6f57c
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/BoxMeshPartition.hpp
@@ -0,0 +1,210 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef BOXMESHPARTITION_HPP
+#define BOXMESHPARTITION_HPP
+
+#include <cstddef>
+#include <utility>
+#include <vector>
+#include <iostream>
+
+//----------------------------------------------------------------------------
+
+struct BoxType {
+ size_t data[3][2] ;
+
+ typedef size_t range_type[2] ;
+
+ inline
+ const range_type & operator[]( size_t i ) const { return data[i]; }
+
+ inline
+ range_type & operator[]( size_t i ) { return data[i]; }
+
+ inline
+ bool operator == ( const BoxType & rhs ) const
+ {
+ return data[0][0] == rhs.data[0][0] && data[0][1] == rhs.data[0][1] &&
+ data[1][0] == rhs.data[1][0] && data[1][1] == rhs.data[2][1] &&
+ data[2][0] == rhs.data[2][0] && data[2][1] == rhs.data[2][1] ;
+ }
+
+ inline
+ bool operator != ( const BoxType & rhs ) const
+ {
+ return data[0][0] != rhs.data[0][0] || data[0][1] != rhs.data[0][1] ||
+ data[1][0] != rhs.data[1][0] || data[1][1] != rhs.data[1][1] ||
+ data[2][0] != rhs.data[2][0] || data[2][1] != rhs.data[2][1] ;
+ }
+};
+
+inline
+size_t count( const BoxType & b )
+{
+ size_t n = 1 ;
+ for ( size_t i = 0 ; i < 3 ; ++i ) {
+ n *= b[i][1] > b[i][0] ? b[i][1] - b[i][0] : 0 ;
+ }
+ return n ;
+}
+
+inline
+bool contain( const BoxType & b , size_t i , size_t j , size_t k )
+{
+ return b[0][0] <= i && i < b[0][1] &&
+ b[1][0] <= j && j < b[1][1] &&
+ b[2][0] <= k && k < b[2][1] ;
+}
+
+inline
+BoxType intersect( const BoxType & x , const BoxType & y )
+{
+ BoxType z ;
+ for ( size_t i = 0 ; i < 3 ; ++i ) {
+ z[i][0] = std::max( x[i][0] , y[i][0] );
+ z[i][1] = std::min( x[i][1] , y[i][1] );
+ }
+
+ return z ;
+}
+
+inline
+std::ostream & operator << ( std::ostream & s , const BoxType & box )
+{
+ s << "{ "
+ << box[0][0] << " " << box[0][1] << " , "
+ << box[1][0] << " " << box[1][1] << " , "
+ << box[2][0] << " " << box[2][1] << " }" ;
+ return s ;
+}
+
+//----------------------------------------------------------------------------
+
+class BoxBounds {
+public:
+ /** \brief Default bounds to one layer of ghosting */
+ virtual
+ void apply( const BoxType & box_global ,
+ const BoxType & box_part ,
+ BoxType & box_interior ,
+ BoxType & box_use ) const = 0 ;
+
+ virtual ~BoxBounds() {}
+ BoxBounds() {}
+};
+
+class BoxBoundsLinear : public BoxBounds
+{
+public:
+ /** \brief Default bounds to one layer of ghosting */
+ virtual
+ void apply( const BoxType & box_global ,
+ const BoxType & box_part ,
+ BoxType & box_interior ,
+ BoxType & box_use ) const ;
+
+ virtual ~BoxBoundsLinear() {}
+ BoxBoundsLinear() {}
+};
+
+class BoxBoundsQuadratic : public BoxBounds {
+public:
+ /** \brief Quadratic mesh: even ordinates have two layers,
+ * odd ordinates have one layer.
+ */
+ virtual
+ void apply( const BoxType & box_global ,
+ const BoxType & box_part ,
+ BoxType & box_interior ,
+ BoxType & box_use ) const ;
+
+ virtual ~BoxBoundsQuadratic() {}
+ BoxBoundsQuadratic() {}
+};
+
+//----------------------------------------------------------------------------
+/* Partition box into part_boxes.size() sub-boxes */
+
+void box_partition_rcb( const BoxType & root_box ,
+ std::vector<BoxType> & part_boxes );
+
+//----------------------------------------------------------------------------
+/* Determine local id layout and communication maps for partitioned boxes.
+ *
+ * Local ids are layed out as follows:
+ * { [ owned-interior ids not sent ] ,
+ * [ owned-boundary ids to be sent to other processes ] ,
+ * [ received ids from processor ( my_part + 1 ) % part_count ]
+ * [ received ids from processor ( my_part + 2 ) % part_count ]
+ * [ received ids from processor ( my_part + 3 ) % part_count ]
+ * ... };
+ *
+ * This layout allows
+ * (1) received data to be copied into a contiguous block of memory
+ * (2) send data to be extracted from a contiguous block of memory.
+ */
+void box_partition_maps(
+ const BoxType & root_box , // [in] Global box
+ const std::vector<BoxType> & part_boxes , // [in] Partitioned boxes
+ const BoxBounds & use_boxes , // [in] Ghost boundaries
+ const size_t my_part , // [in] My local part
+ BoxType & my_use_box , // [out] My used box with ghost
+ std::vector<size_t> & my_use_id_map , // [out] Local ordering map
+ size_t & my_count_interior , // [out] How many interior
+ size_t & my_count_owned , // [out] How many owned
+ size_t & my_count_uses , // [out] How may used
+ std::vector<size_t> & my_part_counts , // [out] Partitioning of my_use_id_map
+ std::vector<std::vector<size_t> > & my_send_map ); // [out] Send id map
+
+/* Mapping of cartesian coordinate to local id */
+size_t box_map_id( const BoxType & my_use_box ,
+ const std::vector<size_t> & my_use_id_map ,
+ const size_t global_i ,
+ const size_t global_j ,
+ const size_t global_k );
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef BOXMESHPARTITION_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/Explicit.hpp b/lib/kokkos/example/multi_fem/Explicit.hpp
new file mode 100644
index 000000000..ddeb53ae6
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/Explicit.hpp
@@ -0,0 +1,452 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef EXPLICIT_DRIVER_HPP
+#define EXPLICIT_DRIVER_HPP
+
+#include <sys/time.h>
+#include <iostream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
+
+#include <impl/Kokkos_Timer.hpp>
+
+#include <ExplicitFunctors.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace Explicit {
+
+struct PerformanceData {
+ double mesh_time ;
+ double init_time ;
+ double internal_force_time ;
+ double central_diff ;
+ double comm_time ;
+ size_t number_of_steps ;
+
+ PerformanceData()
+ : mesh_time(0)
+ , init_time(0)
+ , internal_force_time(0)
+ , central_diff(0)
+ , comm_time(0)
+ , number_of_steps(0)
+ {}
+
+ void best( const PerformanceData & rhs )
+ {
+ if ( rhs.mesh_time < mesh_time ) mesh_time = rhs.mesh_time ;
+ if ( rhs.init_time < init_time ) init_time = rhs.init_time ;
+ if ( rhs.internal_force_time < internal_force_time ) internal_force_time = rhs.internal_force_time ;
+ if ( rhs.central_diff < central_diff ) central_diff = rhs.central_diff ;
+ if ( rhs.comm_time < comm_time ) comm_time = rhs.comm_time ;
+ }
+};
+
+template< typename Scalar , class FixtureType >
+PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
+ const int global_max_x ,
+ const int global_max_y ,
+ const int global_max_z ,
+ const int steps ,
+ const int print_sample )
+{
+ typedef Scalar scalar_type ;
+ typedef FixtureType fixture_type ;
+ typedef typename fixture_type::execution_space execution_space ;
+ //typedef typename fixture_type::FEMeshType mesh_type ; // unused
+
+ enum { ElementNodeCount = fixture_type::element_node_count };
+
+ const int NumStates = 2;
+
+ const int total_num_steps = steps ;
+
+ const Scalar user_dt = 5.0e-6;
+ //const Scalar end_time = 0.0050;
+
+ // element block parameters
+ const Scalar lin_bulk_visc = 0.0;
+ const Scalar quad_bulk_visc = 0.0;
+
+ // const Scalar lin_bulk_visc = 0.06;
+ // const Scalar quad_bulk_visc = 1.2;
+ // const Scalar hg_stiffness = 0.0;
+ // const Scalar hg_viscosity = 0.0;
+ // const Scalar hg_stiffness = 0.03;
+ // const Scalar hg_viscosity = 0.001;
+
+ // material properties
+ const Scalar youngs_modulus=1.0e6;
+ const Scalar poissons_ratio=0.0;
+ const Scalar density = 8.0e-4;
+
+ const comm::Machine machine = mesh.parallel_data_map.machine ;
+
+ PerformanceData perf_data ;
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ //------------------------------------
+ // Generate fields
+
+ typedef Fields< scalar_type , execution_space > fields_type ;
+
+ fields_type mesh_fields( mesh ,
+ lin_bulk_visc ,
+ quad_bulk_visc ,
+ youngs_modulus ,
+ poissons_ratio ,
+ density );
+
+ typename fields_type::node_coords_type::HostMirror
+ model_coords_h = Kokkos::create_mirror( mesh_fields.model_coords );
+
+ typename fields_type::geom_state_array_type::HostMirror
+ displacement_h = Kokkos::create_mirror( mesh_fields.displacement );
+
+ typename fields_type::geom_state_array_type::HostMirror
+ velocity_h = Kokkos::create_mirror( mesh_fields.velocity );
+
+ Kokkos::deep_copy( model_coords_h , mesh_fields.model_coords );
+
+ //------------------------------------
+ // Initialization
+
+ initialize_element<Scalar,execution_space>::apply( mesh_fields );
+ initialize_node< Scalar,execution_space>::apply( mesh_fields );
+
+ const Scalar x_bc = global_max_x ;
+
+ // Initial condition on velocity to initiate a pulse along the X axis
+ {
+ const unsigned X = 0;
+ for (int inode = 0; inode< mesh_fields.num_nodes; ++inode) {
+ if ( model_coords_h(inode,X) == 0) {
+ velocity_h(inode,X,0) = 1.0e3;
+ velocity_h(inode,X,1) = 1.0e3;
+ }
+ }
+ }
+
+ Kokkos::deep_copy( mesh_fields.velocity , velocity_h );
+
+ //--------------------------------------------------------------------------
+ // We will call a sequence of functions. These functions have been
+ // grouped into several functors to balance the number of global memory
+ // accesses versus requiring too many registers or too much L1 cache.
+ // Global memory accees have read/write cost and memory subsystem contention cost.
+ //--------------------------------------------------------------------------
+
+ perf_data.init_time = comm::max( machine , wall_clock.seconds() );
+
+ // Parameters required for the internal force computations.
+
+ int current_state = 0;
+ int previous_state = 0;
+ int next_state = 0;
+
+ perf_data.number_of_steps = total_num_steps ;
+
+#if defined( KOKKOS_HAVE_MPI )
+
+ typedef typename
+ fields_type::geom_state_array_type::value_type comm_value_type ;
+
+ const unsigned comm_value_count = 6 ;
+
+ Kokkos::AsyncExchange< comm_value_type , execution_space ,
+ Kokkos::ParallelDataMap >
+ comm_exchange( mesh.parallel_data_map , comm_value_count );
+
+#endif
+
+ for (int step = 0; step < total_num_steps; ++step) {
+
+ wall_clock.reset();
+
+ //------------------------------------------------------------------------
+#if defined( KOKKOS_HAVE_MPI )
+ {
+ // Communicate "send" nodes' displacement and velocity next_state
+ // to the ghosted nodes.
+ // buffer packages: { { dx , dy , dz , vx , vy , vz }_node }
+
+ pack_state< Scalar , execution_space >
+ ::apply( comm_exchange.buffer() ,
+ mesh.parallel_data_map.count_interior ,
+ mesh.parallel_data_map.count_send ,
+ mesh_fields , next_state );
+
+ comm_exchange.setup();
+
+ comm_exchange.send_receive();
+
+ unpack_state< Scalar , execution_space >
+ ::apply( mesh_fields , next_state ,
+ comm_exchange.buffer() ,
+ mesh.parallel_data_map.count_owned ,
+ mesh.parallel_data_map.count_receive );
+
+ execution_space::fence();
+ }
+#endif
+
+ perf_data.comm_time += comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------------------------------------------
+ // rotate the states
+
+ previous_state = current_state;
+ current_state = next_state;
+ ++next_state;
+ next_state %= NumStates;
+
+ wall_clock.reset();
+
+ // First kernel 'grad_hgop' combines two functions:
+ // gradient, velocity gradient
+ grad< Scalar , execution_space >::apply( mesh_fields ,
+ current_state ,
+ previous_state );
+
+ // Combine tensor decomposition and rotation functions.
+ decomp_rotate< Scalar , execution_space >::apply( mesh_fields ,
+ current_state ,
+ previous_state );
+
+ internal_force< Scalar , execution_space >::apply( mesh_fields ,
+ user_dt ,
+ current_state );
+
+ execution_space::fence();
+
+ perf_data.internal_force_time +=
+ comm::max( machine , wall_clock.seconds() );
+
+ wall_clock.reset();
+
+ // Assembly of elements' contributions to nodal force into
+ // a nodal force vector. Update the accelerations, velocities,
+ // displacements.
+ // The same pattern can be used for matrix-free residual computations.
+ nodal_step< Scalar , execution_space >::apply( mesh_fields ,
+ x_bc ,
+ current_state,
+ next_state );
+ execution_space::fence();
+
+ perf_data.central_diff +=
+ comm::max( machine , wall_clock.seconds() );
+
+ if ( print_sample && 0 == step % 100 ) {
+ Kokkos::deep_copy( displacement_h , mesh_fields.displacement );
+ Kokkos::deep_copy( velocity_h , mesh_fields.velocity );
+
+ if ( 1 == print_sample ) {
+
+ std::cout << "step " << step
+ << " : displacement(*,0,0) =" ;
+ for ( int i = 0 ; i < mesh_fields.num_nodes_owned ; ++i ) {
+ if ( model_coords_h(i,1) == 0 && model_coords_h(i,2) == 0 ) {
+ std::cout << " " << displacement_h(i,0,next_state);
+ }
+ }
+ std::cout << std::endl ;
+
+ const float tol = 1.0e-6 ;
+ const int yb = global_max_y ;
+ const int zb = global_max_z ;
+ std::cout << "step " << step
+ << " : displacement(*," << yb << "," << zb << ") =" ;
+ for ( int i = 0 ; i < mesh_fields.num_nodes_owned ; ++i ) {
+ if ( fabs( model_coords_h(i,1) - yb ) < tol &&
+ fabs( model_coords_h(i,2) - zb ) < tol ) {
+ std::cout << " " << displacement_h(i,0,next_state);
+ }
+ }
+ std::cout << std::endl ;
+ }
+ else if ( 2 == print_sample ) {
+
+ const float tol = 1.0e-6 ;
+ const int xb = global_max_x / 2 ;
+ const int yb = global_max_y / 2 ;
+ const int zb = global_max_z / 2 ;
+
+ for ( int i = 0 ; i < mesh_fields.num_nodes_owned ; ++i ) {
+ if ( fabs( model_coords_h(i,0) - xb ) < tol &&
+ fabs( model_coords_h(i,1) - yb ) < tol &&
+ fabs( model_coords_h(i,2) - zb ) < tol ) {
+ std::cout << "step " << step
+ << " : displacement("
+ << xb << "," << yb << "," << zb << ") = {"
+ << std::setprecision(6)
+ << " " << displacement_h(i,0,next_state)
+ << std::setprecision(2)
+ << " " << displacement_h(i,1,next_state)
+ << std::setprecision(2)
+ << " " << displacement_h(i,2,next_state)
+ << " }" << std::endl ;
+ }
+ }
+ }
+ }
+ }
+
+ return perf_data ;
+}
+
+
+template <typename Scalar, typename Device>
+static void driver( const char * const label ,
+ comm::Machine machine ,
+ const int gang_count ,
+ const int elem_count_beg ,
+ const int elem_count_end ,
+ const int runs )
+{
+ typedef Scalar scalar_type ;
+ typedef Device execution_space ;
+ typedef double coordinate_scalar_type ;
+ typedef FixtureElementHex8 fixture_element_type ;
+
+ typedef BoxMeshFixture< coordinate_scalar_type ,
+ execution_space ,
+ fixture_element_type > fixture_type ;
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+
+ const size_t proc_count = comm::size( machine );
+ const size_t proc_rank = comm::rank( machine );
+
+ const int space = 15 ;
+ const int steps = 1000 ;
+ const int print_sample = 0 ;
+
+ if ( comm::rank( machine ) == 0 ) {
+
+ std::cout << std::endl ;
+ std::cout << "\"MiniExplicitDynamics with Kokkos " << label
+ << " time_steps(" << steps << ")"
+ << "\"" << std::endl;
+ std::cout << std::left << std::setw(space) << "\"Element\" , ";
+ std::cout << std::left << std::setw(space) << "\"Node\" , ";
+ std::cout << std::left << std::setw(space) << "\"Initialize\" , ";
+ std::cout << std::left << std::setw(space) << "\"ElemForce\" , ";
+ std::cout << std::left << std::setw(space) << "\"NodeUpdate\" , ";
+ std::cout << std::left << std::setw(space) << "\"NodeComm\" , ";
+ std::cout << std::left << std::setw(space) << "\"Time/Elem\" , ";
+ std::cout << std::left << std::setw(space) << "\"Time/Node\"";
+
+ std::cout << std::endl;
+
+ std::cout << std::left << std::setw(space) << "\"count\" , ";
+ std::cout << std::left << std::setw(space) << "\"count\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\" , ";
+ std::cout << std::left << std::setw(space) << "\"microsec\"";
+
+ std::cout << std::endl;
+ }
+
+ for(int i = elem_count_beg ; i < elem_count_end ; i *= 2 )
+ {
+ const int iz = std::max( 1 , (int) cbrt( ((double) i) / 2.0 ) );
+ const int iy = iz + 1 ;
+ const int ix = 2 * iy ;
+ const int nelem = ix * iy * iz ;
+ const int nnode = ( ix + 1 ) * ( iy + 1 ) * ( iz + 1 );
+
+ mesh_type mesh =
+ fixture_type::create( proc_count , proc_rank , gang_count ,
+ ix , iy , iz );
+
+ mesh.parallel_data_map.machine = machine ;
+
+ PerformanceData perf , best ;
+
+ for(int j = 0; j < runs; j++){
+
+ perf = run<scalar_type,fixture_type>(mesh,ix,iy,iz,steps,print_sample);
+
+ if( j == 0 ) {
+ best = perf ;
+ }
+ else {
+ best.best( perf );
+ }
+ }
+
+ if ( comm::rank( machine ) == 0 ) {
+ double time_per_element =
+ ( best.internal_force_time ) / ( nelem * perf.number_of_steps );
+ double time_per_node =
+ ( best.comm_time + best.central_diff ) / ( nnode * perf.number_of_steps );
+
+ std::cout << std::setw(space-3) << nelem << " , "
+ << std::setw(space-3) << nnode << " , "
+ << std::setw(space-3) << best.number_of_steps << " , "
+ << std::setw(space-3) << best.init_time * 1000000 << " , "
+ << std::setw(space-3)
+ << ( best.internal_force_time * 1000000 ) / best.number_of_steps << " , "
+ << std::setw(space-3)
+ << ( best.central_diff * 1000000 ) / best.number_of_steps << " , "
+ << std::setw(space-3)
+ << ( best.comm_time * 1000000 ) / best.number_of_steps << " , "
+ << std::setw(space-3) << time_per_element * 1000000 << " , "
+ << std::setw(space-3) << time_per_node * 1000000
+ << std::endl ;
+ }
+ }
+}
+
+
+} // namespace Explicit
+
+#endif /* #ifndef EXPLICIT_DRIVER_HPP */
diff --git a/lib/kokkos/example/multi_fem/ExplicitFunctors.hpp b/lib/kokkos/example/multi_fem/ExplicitFunctors.hpp
new file mode 100644
index 000000000..feea82244
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/ExplicitFunctors.hpp
@@ -0,0 +1,1471 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_EXPLICITFUNCTORS_HPP
+#define KOKKOS_EXPLICITFUNCTORS_HPP
+
+#include <math.h>
+#include <Kokkos_Core.hpp>
+#include <FEMesh.hpp>
+
+namespace Explicit {
+
+template<typename Scalar , class Device >
+struct Fields {
+
+ static const int NumStates = 2 ;
+ static const int SpatialDim = 3 ;
+ static const int ElemNodeCount = 8 ;
+
+ // Indices for full 3x3 tensor:
+
+ static const int K_F_XX = 0 ;
+ static const int K_F_YY = 1 ;
+ static const int K_F_ZZ = 2 ;
+ static const int K_F_XY = 3 ;
+ static const int K_F_YZ = 4 ;
+ static const int K_F_ZX = 5 ;
+ static const int K_F_YX = 6 ;
+ static const int K_F_ZY = 7 ;
+ static const int K_F_XZ = 8 ;
+
+ // Indexes into a 3 by 3 symmetric tensor stored as a length 6 vector
+
+ static const int K_S_XX = 0 ;
+ static const int K_S_YY = 1 ;
+ static const int K_S_ZZ = 2 ;
+ static const int K_S_XY = 3 ;
+ static const int K_S_YZ = 4 ;
+ static const int K_S_ZX = 5 ;
+ static const int K_S_YX = 3 ;
+ static const int K_S_ZY = 4 ;
+ static const int K_S_XZ = 5 ;
+
+ // Indexes into a 3 by 3 skew symmetric tensor stored as a length 3 vector
+
+ static const int K_V_XY = 0 ;
+ static const int K_V_YZ = 1 ;
+ static const int K_V_ZX = 2 ;
+
+
+ typedef Device execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ typedef HybridFEM::FEMesh<double,ElemNodeCount,execution_space> FEMesh ;
+
+ typedef typename FEMesh::node_coords_type node_coords_type ;
+ typedef typename FEMesh::elem_node_ids_type elem_node_ids_type ;
+ typedef typename FEMesh::node_elem_ids_type node_elem_ids_type ;
+ typedef typename Kokkos::ParallelDataMap parallel_data_map ;
+
+ typedef Kokkos::View< double[][ SpatialDim ][ NumStates ] , execution_space > geom_state_array_type ;
+ typedef Kokkos::View< Scalar[][ SpatialDim ] , execution_space > geom_array_type ;
+ typedef Kokkos::View< Scalar[] , execution_space > array_type ;
+ typedef Kokkos::View< Scalar , execution_space > scalar_type ;
+
+ typedef Kokkos::View< Scalar[][ 6 ] , execution_space > elem_sym_tensor_type ;
+ typedef Kokkos::View< Scalar[][ 9 ] , execution_space > elem_tensor_type ;
+ typedef Kokkos::View< Scalar[][ 9 ][ NumStates ] , execution_space > elem_tensor_state_type ;
+ typedef Kokkos::View< Scalar[][ SpatialDim ][ ElemNodeCount ] , execution_space > elem_node_geom_type ;
+
+ // Parameters:
+ const int num_nodes ;
+ const int num_nodes_owned ;
+ const int num_elements ;
+
+ const Scalar lin_bulk_visc;
+ const Scalar quad_bulk_visc;
+ const Scalar two_mu;
+ const Scalar bulk_modulus;
+ const Scalar density;
+
+ // Mesh:
+ const elem_node_ids_type elem_node_connectivity ;
+ const node_elem_ids_type node_elem_connectivity ;
+ const node_coords_type model_coords ;
+
+ // Compute:
+ const scalar_type dt ;
+ const scalar_type prev_dt ;
+ const geom_state_array_type displacement ;
+ const geom_state_array_type velocity ;
+ const geom_array_type acceleration ;
+ const geom_array_type internal_force ;
+ const array_type nodal_mass ;
+ const array_type elem_mass ;
+ const array_type internal_energy ;
+ const elem_sym_tensor_type stress_new ;
+ const elem_tensor_state_type rotation ;
+ const elem_node_geom_type element_force ;
+ const elem_tensor_type vel_grad ;
+ const elem_sym_tensor_type stretch ;
+ const elem_sym_tensor_type rot_stretch ;
+
+ Fields(
+ const FEMesh & mesh,
+ Scalar arg_lin_bulk_visc,
+ Scalar arg_quad_bulk_visc,
+ Scalar youngs_modulus,
+ Scalar poissons_ratio,
+ Scalar arg_density )
+ : num_nodes( mesh.parallel_data_map.count_owned +
+ mesh.parallel_data_map.count_receive )
+ , num_nodes_owned( mesh.parallel_data_map.count_owned )
+ , num_elements( mesh.elem_node_ids.dimension_0() )
+ , lin_bulk_visc( arg_lin_bulk_visc )
+ , quad_bulk_visc( arg_quad_bulk_visc )
+ , two_mu(youngs_modulus/(1.0+poissons_ratio))
+ , bulk_modulus(youngs_modulus/(3*(1.0-2.0*poissons_ratio)))
+ , density(arg_density)
+
+ // mesh
+
+ , elem_node_connectivity( mesh.elem_node_ids ) // ( num_elements , ElemNodeCount )
+ , node_elem_connectivity( mesh.node_elem_ids ) // ( num_nodes , ... )
+ , model_coords( mesh.node_coords ) // ( num_nodes , 3 )
+
+ // compute with input/output
+
+ , dt( "dt" )
+ , prev_dt( "prev_dt" )
+ , displacement( "displacement" , num_nodes )
+ , velocity( "velocity" , num_nodes )
+ , acceleration( "acceleration" , num_nodes_owned )
+ , internal_force( "internal_force" , num_nodes_owned )
+ , nodal_mass( "nodal_mass" , num_nodes_owned )
+ , elem_mass( "elem_mass" , num_elements )
+ , internal_energy( "internal_energy" , num_elements )
+ , stress_new( "stress_new" , num_elements )
+
+ // temporary arrays
+
+ , rotation( "rotation" , num_elements )
+ , element_force( "element_force" , num_elements )
+ , vel_grad( "vel_grad" , num_elements )
+ , stretch( "stretch" , num_elements )
+ , rot_stretch( "rot_stretch" , num_elements )
+ { }
+};
+
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class DeviceType >
+KOKKOS_INLINE_FUNCTION
+Scalar dot8( const Scalar * a , const Scalar * b )
+{ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3] +
+ a[4] * b[4] + a[5] * b[5] + a[6] * b[6] + a[7] * b[7] ; }
+
+template< typename Scalar , class DeviceType >
+KOKKOS_INLINE_FUNCTION
+void comp_grad( const Scalar * const x ,
+ const Scalar * const y ,
+ const Scalar * const z,
+ Scalar * const grad_x ,
+ Scalar * const grad_y ,
+ Scalar * const grad_z )
+{
+ // calc X difference vectors
+
+ Scalar R42=(x[3] - x[1]);
+ Scalar R52=(x[4] - x[1]);
+ Scalar R54=(x[4] - x[3]);
+
+ Scalar R63=(x[5] - x[2]);
+ Scalar R83=(x[7] - x[2]);
+ Scalar R86=(x[7] - x[5]);
+
+ Scalar R31=(x[2] - x[0]);
+ Scalar R61=(x[5] - x[0]);
+ Scalar R74=(x[6] - x[3]);
+
+ Scalar R72=(x[6] - x[1]);
+ Scalar R75=(x[6] - x[4]);
+ Scalar R81=(x[7] - x[0]);
+
+ Scalar t1=(R63 + R54);
+ Scalar t2=(R61 + R74);
+ Scalar t3=(R72 + R81);
+
+ Scalar t4 =(R86 + R42);
+ Scalar t5 =(R83 + R52);
+ Scalar t6 =(R75 + R31);
+
+ // Calculate Y gradient from X and Z data
+
+ grad_y[0] = (z[1] * t1) - (z[2] * R42) - (z[3] * t5) + (z[4] * t4) + (z[5] * R52) - (z[7] * R54);
+ grad_y[1] = (z[2] * t2) + (z[3] * R31) - (z[0] * t1) - (z[5] * t6) + (z[6] * R63) - (z[4] * R61);
+ grad_y[2] = (z[3] * t3) + (z[0] * R42) - (z[1] * t2) - (z[6] * t4) + (z[7] * R74) - (z[5] * R72);
+ grad_y[3] = (z[0] * t5) - (z[1] * R31) - (z[2] * t3) + (z[7] * t6) + (z[4] * R81) - (z[6] * R83);
+ grad_y[4] = (z[5] * t3) + (z[6] * R86) - (z[7] * t2) - (z[0] * t4) - (z[3] * R81) + (z[1] * R61);
+ grad_y[5] = (z[6] * t5) - (z[4] * t3) - (z[7] * R75) + (z[1] * t6) - (z[0] * R52) + (z[2] * R72);
+ grad_y[6] = (z[7] * t1) - (z[5] * t5) - (z[4] * R86) + (z[2] * t4) - (z[1] * R63) + (z[3] * R83);
+ grad_y[7] = (z[4] * t2) - (z[6] * t1) + (z[5] * R75) - (z[3] * t6) - (z[2] * R74) + (z[0] * R54);
+
+ // calc Z difference vectors
+
+ R42=(z[3] - z[1]);
+ R52=(z[4] - z[1]);
+ R54=(z[4] - z[3]);
+
+ R63=(z[5] - z[2]);
+ R83=(z[7] - z[2]);
+ R86=(z[7] - z[5]);
+
+ R31=(z[2] - z[0]);
+ R61=(z[5] - z[0]);
+ R74=(z[6] - z[3]);
+
+ R72=(z[6] - z[1]);
+ R75=(z[6] - z[4]);
+ R81=(z[7] - z[0]);
+
+ t1=(R63 + R54);
+ t2=(R61 + R74);
+ t3=(R72 + R81);
+
+ t4 =(R86 + R42);
+ t5 =(R83 + R52);
+ t6 =(R75 + R31);
+
+ // Calculate X gradient from Y and Z data
+
+ grad_x[0] = (y[1] * t1) - (y[2] * R42) - (y[3] * t5) + (y[4] * t4) + (y[5] * R52) - (y[7] * R54);
+ grad_x[1] = (y[2] * t2) + (y[3] * R31) - (y[0] * t1) - (y[5] * t6) + (y[6] * R63) - (y[4] * R61);
+ grad_x[2] = (y[3] * t3) + (y[0] * R42) - (y[1] * t2) - (y[6] * t4) + (y[7] * R74) - (y[5] * R72);
+ grad_x[3] = (y[0] * t5) - (y[1] * R31) - (y[2] * t3) + (y[7] * t6) + (y[4] * R81) - (y[6] * R83);
+ grad_x[4] = (y[5] * t3) + (y[6] * R86) - (y[7] * t2) - (y[0] * t4) - (y[3] * R81) + (y[1] * R61);
+ grad_x[5] = (y[6] * t5) - (y[4] * t3) - (y[7] * R75) + (y[1] * t6) - (y[0] * R52) + (y[2] * R72);
+ grad_x[6] = (y[7] * t1) - (y[5] * t5) - (y[4] * R86) + (y[2] * t4) - (y[1] * R63) + (y[3] * R83);
+ grad_x[7] = (y[4] * t2) - (y[6] * t1) + (y[5] * R75) - (y[3] * t6) - (y[2] * R74) + (y[0] * R54);
+
+ // calc Y difference vectors
+
+ R42=(y[3] - y[1]);
+ R52=(y[4] - y[1]);
+ R54=(y[4] - y[3]);
+
+ R63=(y[5] - y[2]);
+ R83=(y[7] - y[2]);
+ R86=(y[7] - y[5]);
+
+ R31=(y[2] - y[0]);
+ R61=(y[5] - y[0]);
+ R74=(y[6] - y[3]);
+
+ R72=(y[6] - y[1]);
+ R75=(y[6] - y[4]);
+ R81=(y[7] - y[0]);
+
+ t1=(R63 + R54);
+ t2=(R61 + R74);
+ t3=(R72 + R81);
+
+ t4 =(R86 + R42);
+ t5 =(R83 + R52);
+ t6 =(R75 + R31);
+
+ // Calculate Z gradient from X and Y data
+
+ grad_z[0] = (x[1] * t1) - (x[2] * R42) - (x[3] * t5) + (x[4] * t4) + (x[5] * R52) - (x[7] * R54);
+ grad_z[1] = (x[2] * t2) + (x[3] * R31) - (x[0] * t1) - (x[5] * t6) + (x[6] * R63) - (x[4] * R61);
+ grad_z[2] = (x[3] * t3) + (x[0] * R42) - (x[1] * t2) - (x[6] * t4) + (x[7] * R74) - (x[5] * R72);
+ grad_z[3] = (x[0] * t5) - (x[1] * R31) - (x[2] * t3) + (x[7] * t6) + (x[4] * R81) - (x[6] * R83);
+ grad_z[4] = (x[5] * t3) + (x[6] * R86) - (x[7] * t2) - (x[0] * t4) - (x[3] * R81) + (x[1] * R61);
+ grad_z[5] = (x[6] * t5) - (x[4] * t3) - (x[7] * R75) + (x[1] * t6) - (x[0] * R52) + (x[2] * R72);
+ grad_z[6] = (x[7] * t1) - (x[5] * t5) - (x[4] * R86) + (x[2] * t4) - (x[1] * R63) + (x[3] * R83);
+ grad_z[7] = (x[4] * t2) - (x[6] * t1) + (x[5] * R75) - (x[3] * t6) - (x[2] * R74) + (x[0] * R54);
+}
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class DeviceType >
+struct initialize_element
+{
+ typedef DeviceType execution_space ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ typename Fields::elem_node_ids_type elem_node_connectivity ;
+ typename Fields::node_coords_type model_coords ;
+ typename Fields::elem_sym_tensor_type stretch ;
+ typename Fields::elem_tensor_state_type rotation ;
+ typename Fields::array_type elem_mass ;
+
+ const Scalar density ;
+
+ initialize_element( const Fields & mesh_fields )
+ : elem_node_connectivity( mesh_fields.elem_node_connectivity )
+ , model_coords( mesh_fields.model_coords )
+ , stretch( mesh_fields.stretch )
+ , rotation( mesh_fields.rotation )
+ , elem_mass( mesh_fields.elem_mass )
+ , density( mesh_fields.density )
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int ielem )const
+ {
+ const int K_XX = 0 ;
+ const int K_YY = 1 ;
+ const int K_ZZ = 2 ;
+ const Scalar ONE12TH = 1.0 / 12.0 ;
+
+ Scalar x[ Fields::ElemNodeCount ];
+ Scalar y[ Fields::ElemNodeCount ];
+ Scalar z[ Fields::ElemNodeCount ];
+ Scalar grad_x[ Fields::ElemNodeCount ];
+ Scalar grad_y[ Fields::ElemNodeCount ];
+ Scalar grad_z[ Fields::ElemNodeCount ];
+
+ for ( int i = 0 ; i < Fields::ElemNodeCount ; ++i ) {
+ const int n = elem_node_connectivity( ielem , i );
+
+ x[i] = model_coords( n , 0 );
+ y[i] = model_coords( n , 1 );
+ z[i] = model_coords( n , 2 );
+ }
+
+ comp_grad<Scalar,execution_space>( x, y, z, grad_x, grad_y, grad_z);
+
+ stretch(ielem,K_XX) = 1 ;
+ stretch(ielem,K_YY) = 1 ;
+ stretch(ielem,K_ZZ) = 1 ;
+
+ rotation(ielem,K_XX,0) = 1 ;
+ rotation(ielem,K_YY,0) = 1 ;
+ rotation(ielem,K_ZZ,0) = 1 ;
+
+ rotation(ielem,K_XX,1) = 1 ;
+ rotation(ielem,K_YY,1) = 1 ;
+ rotation(ielem,K_ZZ,1) = 1 ;
+
+ elem_mass(ielem) = ONE12TH * density *
+ dot8<Scalar,execution_space>( x , grad_x );
+ }
+
+ static void apply( const Fields & mesh_fields )
+ {
+ initialize_element op( mesh_fields );
+ Kokkos::parallel_for( mesh_fields.num_elements , op );
+ }
+};
+
+
+template<typename Scalar , class DeviceType >
+struct initialize_node
+{
+ typedef DeviceType execution_space ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ typename Fields::node_elem_ids_type node_elem_connectivity ;
+ typename Fields::array_type nodal_mass ;
+ typename Fields::array_type elem_mass ;
+
+ static const int ElemNodeCount = Fields::ElemNodeCount ;
+
+ initialize_node( const Fields & mesh_fields )
+ : node_elem_connectivity( mesh_fields.node_elem_connectivity )
+ , nodal_mass( mesh_fields.nodal_mass )
+ , elem_mass( mesh_fields.elem_mass )
+ {}
+
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int inode )const
+ {
+ const int begin = node_elem_connectivity.row_map[inode];
+ const int end = node_elem_connectivity.row_map[inode+1];
+
+ Scalar node_mass = 0;
+
+ for(int i = begin; i != end; ++i) {
+ const int elem_id = node_elem_connectivity.entries( i , 0 );
+ node_mass += elem_mass(elem_id);
+ }
+
+ nodal_mass(inode) = node_mass / ElemNodeCount ;
+ }
+
+ static void apply( const Fields & mesh_fields )
+ {
+ initialize_node op( mesh_fields );
+ Kokkos::parallel_for( mesh_fields.num_nodes_owned , op );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+
+template<typename Scalar, class DeviceType >
+struct grad
+{
+ typedef DeviceType execution_space ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ static const int ElemNodeCount = Fields::ElemNodeCount ;
+
+ static const int K_F_XX = Fields::K_F_XX ;
+ static const int K_F_YY = Fields::K_F_YY ;
+ static const int K_F_ZZ = Fields::K_F_ZZ ;
+ static const int K_F_XY = Fields::K_F_XY ;
+ static const int K_F_YZ = Fields::K_F_YZ ;
+ static const int K_F_ZX = Fields::K_F_ZX ;
+ static const int K_F_YX = Fields::K_F_YX ;
+ static const int K_F_ZY = Fields::K_F_ZY ;
+ static const int K_F_XZ = Fields::K_F_XZ ;
+
+ // Global arrays used by this functor.
+
+ const typename Fields::elem_node_ids_type elem_node_connectivity ;
+ const typename Fields::node_coords_type model_coords ;
+ const typename Fields::geom_state_array_type displacement ;
+ const typename Fields::geom_state_array_type velocity ;
+ const typename Fields::elem_tensor_type vel_grad ;
+ const typename Fields::scalar_type dt ;
+
+ const int current_state;
+ const int previous_state;
+
+ // Constructor on the Host to populate this device functor.
+ // All array view copies are shallow.
+ grad( const Fields & fields,
+ const int arg_current_state,
+ const int arg_previous_state)
+ : elem_node_connectivity( fields.elem_node_connectivity)
+ , model_coords( fields.model_coords)
+ , displacement( fields.displacement)
+ , velocity( fields.velocity)
+ , vel_grad( fields.vel_grad)
+ , dt( fields.dt)
+ , current_state(arg_current_state)
+ , previous_state(arg_previous_state)
+ { }
+
+ //--------------------------------------------------------------------------
+
+ // Calculate Velocity Gradients
+ KOKKOS_INLINE_FUNCTION
+ void v_grad( int ielem,
+ Scalar * vx, Scalar * vy, Scalar * vz,
+ Scalar * grad_x, Scalar * grad_y, Scalar * grad_z,
+ Scalar inv_vol) const
+ {
+ const int K_F_XX = Fields::K_F_XX ;
+ const int K_F_YY = Fields::K_F_YY ;
+ const int K_F_ZZ = Fields::K_F_ZZ ;
+ const int K_F_XY = Fields::K_F_XY ;
+ const int K_F_YZ = Fields::K_F_YZ ;
+ const int K_F_ZX = Fields::K_F_ZX ;
+ const int K_F_YX = Fields::K_F_YX ;
+ const int K_F_ZY = Fields::K_F_ZY ;
+ const int K_F_XZ = Fields::K_F_XZ ;
+
+ vel_grad(ielem, K_F_XX) = inv_vol * dot8<Scalar,execution_space>( vx , grad_x );
+ vel_grad(ielem, K_F_YX) = inv_vol * dot8<Scalar,execution_space>( vy , grad_x );
+ vel_grad(ielem, K_F_ZX) = inv_vol * dot8<Scalar,execution_space>( vz , grad_x );
+
+ vel_grad(ielem, K_F_XY) = inv_vol * dot8<Scalar,execution_space>( vx , grad_y );
+ vel_grad(ielem, K_F_YY) = inv_vol * dot8<Scalar,execution_space>( vy , grad_y );
+ vel_grad(ielem, K_F_ZY) = inv_vol * dot8<Scalar,execution_space>( vz , grad_y );
+
+ vel_grad(ielem, K_F_XZ) = inv_vol * dot8<Scalar,execution_space>( vx , grad_z );
+ vel_grad(ielem, K_F_YZ) = inv_vol * dot8<Scalar,execution_space>( vy , grad_z );
+ vel_grad(ielem, K_F_ZZ) = inv_vol * dot8<Scalar,execution_space>( vz , grad_z );
+ }
+
+ //--------------------------------------------------------------------------
+ // Functor operator() which calls the three member functions.
+
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int ielem )const
+ {
+ const int X = 0 ;
+ const int Y = 1 ;
+ const int Z = 2 ;
+ const Scalar dt_scale = -0.5 * *dt;
+
+ // declare and reuse local data for frequently accessed data to
+ // reduce global memory reads and writes.
+
+ Scalar x[8], y[8], z[8];
+ Scalar vx[8], vy[8], vz[8];
+ Scalar grad_x[8], grad_y[8], grad_z[8];
+
+ // Read global velocity once and use many times
+ // via local registers / L1 cache.
+ // store the velocity information in local memory before using,
+ // so it can be returned for other functions to use
+
+ // Read global coordinates and velocity once and use many times
+ // via local registers / L1 cache.
+ // load X coordinate information and move by half time step
+
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ const int n = elem_node_connectivity( ielem , i );
+
+ vx[i] = velocity( n , X , current_state );
+ vy[i] = velocity( n , Y , current_state );
+ vz[i] = velocity( n , Z , current_state );
+
+ x[i] = model_coords( n , X ) +
+ displacement( n , X , current_state ) +
+ dt_scale * vx[i];
+
+ y[i] = model_coords( n , Y ) +
+ displacement( n , Y , current_state ) +
+ dt_scale * vy[i];
+
+ z[i] = model_coords( n , Z ) +
+ displacement( n , Z , current_state ) +
+ dt_scale * vz[i];
+ }
+
+ comp_grad<Scalar,execution_space>( x, y, z, grad_x, grad_y, grad_z);
+
+ // Calculate hexahedral volume from x model_coords and gradient information
+
+ const Scalar inv_vol = 1.0 / dot8<Scalar,execution_space>( x , grad_x );
+
+ v_grad(ielem, vx, vy, vz, grad_x, grad_y, grad_z, inv_vol);
+ }
+
+ static void apply( const Fields & fields ,
+ const int arg_current_state ,
+ const int arg_previous_state )
+ {
+ grad op( fields, arg_current_state , arg_previous_state );
+ Kokkos::parallel_for( fields.num_elements , op );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template<typename Scalar, class DeviceType >
+struct decomp_rotate
+{
+ typedef DeviceType execution_space ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ static const int ElemNodeCount = Fields::ElemNodeCount ;
+
+ static const int K_F_XX = Fields::K_F_XX ;
+ static const int K_F_YY = Fields::K_F_YY ;
+ static const int K_F_ZZ = Fields::K_F_ZZ ;
+ static const int K_F_XY = Fields::K_F_XY ;
+ static const int K_F_YZ = Fields::K_F_YZ ;
+ static const int K_F_ZX = Fields::K_F_ZX ;
+ static const int K_F_YX = Fields::K_F_YX ;
+ static const int K_F_ZY = Fields::K_F_ZY ;
+ static const int K_F_XZ = Fields::K_F_XZ ;
+
+ static const int K_S_XX = Fields::K_S_XX ;
+ static const int K_S_YY = Fields::K_S_YY ;
+ static const int K_S_ZZ = Fields::K_S_ZZ ;
+ static const int K_S_XY = Fields::K_S_XY ;
+ static const int K_S_YZ = Fields::K_S_YZ ;
+ static const int K_S_ZX = Fields::K_S_ZX ;
+ static const int K_S_YX = Fields::K_S_YX ;
+ static const int K_S_ZY = Fields::K_S_ZY ;
+ static const int K_S_XZ = Fields::K_S_XZ ;
+
+ static const int K_V_XY = Fields::K_V_XY ;
+ static const int K_V_YZ = Fields::K_V_YZ ;
+ static const int K_V_ZX = Fields::K_V_ZX ;
+
+ // Global arrays used by this functor.
+
+ const typename Fields::elem_tensor_state_type rotation ;
+ const typename Fields::elem_tensor_type vel_grad ;
+ const typename Fields::elem_sym_tensor_type stretch ;
+ const typename Fields::elem_sym_tensor_type rot_stretch ;
+ const typename Fields::scalar_type dt_value ;
+
+ const int current_state;
+ const int previous_state;
+
+ decomp_rotate( const Fields & mesh_fields ,
+ const int arg_current_state,
+ const int arg_previous_state)
+ : rotation( mesh_fields.rotation )
+ , vel_grad( mesh_fields.vel_grad )
+ , stretch( mesh_fields.stretch )
+ , rot_stretch( mesh_fields.rot_stretch )
+ , dt_value( mesh_fields.dt)
+ , current_state( arg_current_state)
+ , previous_state(arg_previous_state)
+ {}
+
+ static void apply( const Fields & mesh_fields ,
+ const int arg_current_state ,
+ const int arg_previous_state )
+ {
+ decomp_rotate op( mesh_fields , arg_current_state , arg_previous_state );
+ Kokkos::parallel_for( mesh_fields.num_elements , op );
+ }
+
+
+ KOKKOS_INLINE_FUNCTION
+ void additive_decomp(int ielem, Scalar * v_gr, Scalar * str_ten) const
+ {
+ // In addition to calculating stretching_tensor,
+ // use this as an opportunity to load global
+ // variables into a local space
+
+ for ( int i = 0 ; i < 9 ; ++i ) {
+ v_gr[i] = vel_grad( ielem , i );
+ }
+
+ //
+ // Symmetric part
+ //
+ str_ten[K_S_XX] = v_gr[K_F_XX];
+ str_ten[K_S_YY] = v_gr[K_F_YY];
+ str_ten[K_S_ZZ] = v_gr[K_F_ZZ];
+ str_ten[K_S_XY] = 0.5*(v_gr[K_F_XY] + v_gr[K_F_YX]);
+ str_ten[K_S_YZ] = 0.5*(v_gr[K_F_YZ] + v_gr[K_F_ZY]);
+ str_ten[K_S_ZX] = 0.5*(v_gr[K_F_ZX] + v_gr[K_F_XZ]);
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void polar_decomp(int ielem, Scalar * v_gr, Scalar * str_ten, Scalar * str, Scalar * vort, Scalar * rot_old, Scalar * rot_new)const
+ {
+ const Scalar dt = *dt_value;
+ const Scalar dt_half = 0.5 * dt;
+
+ // Skew Symmetric part
+ vort[K_V_XY] = 0.5*(v_gr[K_F_XY] - v_gr[K_F_YX]);
+ vort[K_V_YZ] = 0.5*(v_gr[K_F_YZ] - v_gr[K_F_ZY]);
+ vort[K_V_ZX] = 0.5*(v_gr[K_F_ZX] - v_gr[K_F_XZ]);
+
+ // calculate the rates of rotation via gauss elimination.
+ for ( int i = 0 ; i < 6 ; ++i ) {
+ str[i] = stretch(ielem, i);
+ }
+
+ Scalar z1 = str_ten[K_S_XY] * str[K_S_ZX] -
+ str_ten[K_S_ZX] * str[K_S_XY] +
+ str_ten[K_S_YY] * str[K_S_YZ] -
+ str_ten[K_S_YZ] * str[K_S_YY] +
+ str_ten[K_S_YZ] * str[K_S_ZZ] -
+ str_ten[K_S_ZZ] * str[K_S_YZ];
+
+ Scalar z2 = str_ten[K_S_ZX] * str[K_S_XX] -
+ str_ten[K_S_XX] * str[K_S_ZX] +
+ str_ten[K_S_YZ] * str[K_S_XY] -
+ str_ten[K_S_XY] * str[K_S_YZ] +
+ str_ten[K_S_ZZ] * str[K_S_ZX] -
+ str_ten[K_S_ZX] * str[K_S_ZZ];
+
+ Scalar z3 = str_ten[K_S_XX] * str[K_S_XY] -
+ str_ten[K_S_XY] * str[K_S_XX] +
+ str_ten[K_S_XY] * str[K_S_YY] -
+ str_ten[K_S_YY] * str[K_S_XY] +
+ str_ten[K_S_ZX] * str[K_S_YZ] -
+ str_ten[K_S_YZ] * str[K_S_ZX];
+
+ // forward elimination
+ const Scalar a1inv = 1.0 / (str[K_S_YY] + str[K_S_ZZ]);
+
+ const Scalar a4BYa1 = -1 * str[K_S_XY] * a1inv;
+
+ const Scalar a2inv = 1.0 / (str[K_S_ZZ] + str[K_S_XX] + str[K_S_XY] * a4BYa1);
+
+ const Scalar a5 = -str[K_S_YZ] + str[K_S_ZX] * a4BYa1;
+
+ z2 -= z1 * a4BYa1;
+ Scalar a6BYa1 = -1 * str[K_S_ZX] * a1inv;
+ const Scalar a5BYa2 = a5 * a2inv;
+ z3 -= z1 * a6BYa1 - z2 * a5BYa2;
+
+ // backward substitution -
+ z3 /= (str[K_S_XX] + str[K_S_YY] + str[K_S_ZX] * a6BYa1 + a5 * a5BYa2);
+ z2 = (z2 - a5 * z3) * a2inv;
+ z1 = (z1*a1inv - a6BYa1 * z3 -a4BYa1 * z2);
+
+ // calculate rotation rates - recall that spin_rate is an asymmetric tensor,
+ // so compute spin rate vector as dual of spin rate tensor,
+ // i.e w_i = e_ijk * spin_rate_jk
+ z1 += vort[K_V_YZ];
+ z2 += vort[K_V_ZX];
+ z3 += vort[K_V_XY];
+
+ // update rotation tensor:
+ // 1) premultiply old rotation tensor to get right-hand side.
+
+ for ( int i = 0 ; i < 9 ; ++i ) {
+ rot_old[i] = rotation(ielem, i, previous_state);
+ }
+
+ Scalar r_XX = rot_old[K_F_XX] + dt_half*( z3 * rot_old[K_F_YX] - z2 * rot_old[K_F_ZX] );
+ Scalar r_YX = rot_old[K_F_YX] + dt_half*( z1 * rot_old[K_F_ZX] - z3 * rot_old[K_F_XX] );
+ Scalar r_ZX = rot_old[K_F_ZX] + dt_half*( z2 * rot_old[K_F_XX] - z1 * rot_old[K_F_YX] );
+ Scalar r_XY = rot_old[K_F_XY] + dt_half*( z3 * rot_old[K_F_YY] - z2 * rot_old[K_F_ZY] );
+ Scalar r_YY = rot_old[K_F_YY] + dt_half*( z1 * rot_old[K_F_ZY] - z3 * rot_old[K_F_XY] );
+ Scalar r_ZY = rot_old[K_F_ZY] + dt_half*( z2 * rot_old[K_F_XY] - z1 * rot_old[K_F_YY] );
+ Scalar r_XZ = rot_old[K_F_XZ] + dt_half*( z3 * rot_old[K_F_YZ] - z2 * rot_old[K_F_ZZ] );
+ Scalar r_YZ = rot_old[K_F_YZ] + dt_half*( z1 * rot_old[K_F_ZZ] - z3 * rot_old[K_F_XZ] );
+ Scalar r_ZZ = rot_old[K_F_ZZ] + dt_half*( z2 * rot_old[K_F_XZ] - z1 * rot_old[K_F_YZ] );
+
+
+ // 2) solve for new rotation tensor via gauss elimination.
+ // forward elimination -
+ Scalar a12 = - dt_half * z3;
+ Scalar a13 = dt_half * z2;
+ Scalar b32 = - dt_half * z1;
+ Scalar a22inv = 1.0 / (1.0 + a12 * a12);
+
+ Scalar a13a12 = a13*a12;
+ Scalar a23 = b32 + a13a12;
+ r_YX += r_XX * a12;
+ r_YY += r_XY * a12;
+ r_YZ += r_XZ * a12;
+
+
+ b32 = (b32 - a13a12) * a22inv;
+ r_ZX += r_XX * a13 + r_YX * b32;
+ r_ZY += r_XY * a13 + r_YY * b32;
+ r_ZZ += r_XZ * a13 + r_YZ * b32;
+
+
+ // backward substitution -
+ const Scalar a33inv = 1.0 / (1.0 + a13 * a13 + a23 * b32);
+
+ rot_new[K_F_ZX] = r_ZX * a33inv;
+ rot_new[K_F_ZY] = r_ZY * a33inv;
+ rot_new[K_F_ZZ] = r_ZZ * a33inv;
+ rot_new[K_F_YX] = ( r_YX - rot_new[K_F_ZX] * a23 ) * a22inv;
+ rot_new[K_F_YY] = ( r_YY - rot_new[K_F_ZY] * a23 ) * a22inv;
+ rot_new[K_F_YZ] = ( r_YZ - rot_new[K_F_ZZ] * a23 ) * a22inv;
+ rot_new[K_F_XX] = r_XX - rot_new[K_F_ZX] * a13 - rot_new[K_F_YX] * a12;
+ rot_new[K_F_XY] = r_XY - rot_new[K_F_ZY] * a13 - rot_new[K_F_YY] * a12;
+ rot_new[K_F_XZ] = r_XZ - rot_new[K_F_ZZ] * a13 - rot_new[K_F_YZ] * a12;
+
+ for ( int i = 0 ; i < 9 ; ++i ) {
+ rotation(ielem, i, current_state) = rot_new[i] ;
+ }
+
+ // update stretch tensor in the new configuration -
+ const Scalar a1 = str_ten[K_S_XY] + vort[K_V_XY];
+ const Scalar a2 = str_ten[K_S_YZ] + vort[K_V_YZ];
+ const Scalar a3 = str_ten[K_S_ZX] + vort[K_V_ZX];
+ const Scalar b1 = str_ten[K_S_ZX] - vort[K_V_ZX];
+ const Scalar b2 = str_ten[K_S_XY] - vort[K_V_XY];
+ const Scalar b3 = str_ten[K_S_YZ] - vort[K_V_YZ];
+
+ const Scalar s_XX = str[K_S_XX];
+ const Scalar s_YY = str[K_S_YY];
+ const Scalar s_ZZ = str[K_S_ZZ];
+ const Scalar s_XY = str[K_S_XY];
+ const Scalar s_YZ = str[K_S_YZ];
+ const Scalar s_ZX = str[K_S_ZX];
+
+ str[K_S_XX] += dt * (str_ten[K_S_XX] * s_XX + ( a1 + z3 ) * s_XY + ( b1 - z2 ) * s_ZX);
+ str[K_S_YY] += dt * (str_ten[K_S_YY] * s_YY + ( a2 + z1 ) * s_YZ + ( b2 - z3 ) * s_XY);
+ str[K_S_ZZ] += dt * (str_ten[K_S_ZZ] * s_ZZ + ( a3 + z2 ) * s_ZX + ( b3 - z1 ) * s_YZ);
+ str[K_S_XY] += dt * (str_ten[K_S_XX] * s_XY + ( a1 ) * s_YY + ( b1 ) * s_YZ - z3 * s_XX + z1 * s_ZX);
+ str[K_S_YZ] += dt * (str_ten[K_S_YY] * s_YZ + ( a2 ) * s_ZZ + ( b2 ) * s_ZX - z1 * s_YY + z2 * s_XY);
+ str[K_S_ZX] += dt * (str_ten[K_S_ZZ] * s_ZX + ( a3 ) * s_XX + ( b3 ) * s_XY - z2 * s_ZZ + z3 * s_YZ);
+
+ }
+
+
+ KOKKOS_INLINE_FUNCTION
+ void rotate_tensor(int ielem, Scalar * str_ten, Scalar * str, Scalar * rot_new)const {
+
+ Scalar t[9];
+ Scalar rot_str[6]; // Rotated stretch
+
+ t[0] = str_ten[K_S_XX]*rot_new[K_F_XX] +
+ str_ten[K_S_XY]*rot_new[K_F_YX] +
+ str_ten[K_S_XZ]*rot_new[K_F_ZX];
+
+ t[1] = str_ten[K_S_YX]*rot_new[K_F_XX] +
+ str_ten[K_S_YY]*rot_new[K_F_YX] +
+ str_ten[K_S_YZ]*rot_new[K_F_ZX];
+
+ t[2] = str_ten[K_S_ZX]*rot_new[K_F_XX] +
+ str_ten[K_S_ZY]*rot_new[K_F_YX] +
+ str_ten[K_S_ZZ]*rot_new[K_F_ZX];
+
+ t[3] = str_ten[K_S_XX]*rot_new[K_F_XY] +
+ str_ten[K_S_XY]*rot_new[K_F_YY] +
+ str_ten[K_S_XZ]*rot_new[K_F_ZY];
+
+ t[4] = str_ten[K_S_YX]*rot_new[K_F_XY] +
+ str_ten[K_S_YY]*rot_new[K_F_YY] +
+ str_ten[K_S_YZ]*rot_new[K_F_ZY];
+
+ t[5] = str_ten[K_S_ZX]*rot_new[K_F_XY] +
+ str_ten[K_S_ZY]*rot_new[K_F_YY] +
+ str_ten[K_S_ZZ]*rot_new[K_F_ZY];
+
+ t[6] = str_ten[K_S_XX]*rot_new[K_F_XZ] +
+ str_ten[K_S_XY]*rot_new[K_F_YZ] +
+ str_ten[K_S_XZ]*rot_new[K_F_ZZ];
+
+ t[7] = str_ten[K_S_YX]*rot_new[K_F_XZ] +
+ str_ten[K_S_YY]*rot_new[K_F_YZ] +
+ str_ten[K_S_YZ]*rot_new[K_F_ZZ];
+
+ t[8] = str_ten[K_S_ZX]*rot_new[K_F_XZ] +
+ str_ten[K_S_ZY]*rot_new[K_F_YZ] +
+ str_ten[K_S_ZZ]*rot_new[K_F_ZZ];
+
+
+ rot_str[ K_S_XX ] = rot_new[K_F_XX] * t[0] +
+ rot_new[K_F_YX] * t[1] +
+ rot_new[K_F_ZX] * t[2];
+ rot_str[ K_S_YY ] = rot_new[K_F_XY] * t[3] +
+ rot_new[K_F_YY] * t[4] +
+ rot_new[K_F_ZY] * t[5];
+ rot_str[ K_S_ZZ ] = rot_new[K_F_XZ] * t[6] +
+ rot_new[K_F_YZ] * t[7] +
+ rot_new[K_F_ZZ] * t[8];
+
+ rot_str[ K_S_XY ] = rot_new[K_F_XX] * t[3] +
+ rot_new[K_F_YX] * t[4] +
+ rot_new[K_F_ZX] * t[5];
+ rot_str[ K_S_YZ ] = rot_new[K_F_XY] * t[6] +
+ rot_new[K_F_YY] * t[7] +
+ rot_new[K_F_ZY] * t[8];
+ rot_str[ K_S_ZX ] = rot_new[K_F_XZ] * t[0] +
+ rot_new[K_F_YZ] * t[1] +
+ rot_new[K_F_ZZ] * t[2];
+
+ for ( int i = 0 ; i < 6 ; ++i ) {
+ rot_stretch(ielem, i) = rot_str[i] ;
+ }
+
+ for ( int i = 0 ; i < 6 ; ++i ) {
+ stretch(ielem, i) = str[i] ;
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int ielem )const {
+
+ // Local scratch space to avoid multiple
+ // accesses to global memory.
+ Scalar str_ten[6]; // Stretching tensor
+ Scalar str[6]; // Stretch
+ Scalar rot_old[9]; // Rotation old
+ Scalar rot_new[9]; // Rotation new
+ Scalar vort[3]; // Vorticity
+ Scalar v_gr[9]; // Velocity gradient
+
+ additive_decomp(ielem, v_gr, str_ten);
+
+ polar_decomp(ielem, v_gr, str_ten, str, vort, rot_old, rot_new);
+
+ rotate_tensor(ielem, str_ten, str, rot_new);
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template<typename Scalar, class DeviceType >
+struct internal_force
+{
+ typedef DeviceType execution_space ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ static const int ElemNodeCount = Fields::ElemNodeCount ;
+
+ static const int K_F_XX = Fields::K_F_XX ;
+ static const int K_F_YY = Fields::K_F_YY ;
+ static const int K_F_ZZ = Fields::K_F_ZZ ;
+ static const int K_F_XY = Fields::K_F_XY ;
+ static const int K_F_YZ = Fields::K_F_YZ ;
+ static const int K_F_ZX = Fields::K_F_ZX ;
+ static const int K_F_YX = Fields::K_F_YX ;
+ static const int K_F_ZY = Fields::K_F_ZY ;
+ static const int K_F_XZ = Fields::K_F_XZ ;
+
+ static const int K_S_XX = Fields::K_S_XX ;
+ static const int K_S_YY = Fields::K_S_YY ;
+ static const int K_S_ZZ = Fields::K_S_ZZ ;
+ static const int K_S_XY = Fields::K_S_XY ;
+ static const int K_S_YZ = Fields::K_S_YZ ;
+ static const int K_S_ZX = Fields::K_S_ZX ;
+ static const int K_S_YX = Fields::K_S_YX ;
+ static const int K_S_ZY = Fields::K_S_ZY ;
+ static const int K_S_XZ = Fields::K_S_XZ ;
+
+ //--------------------------------------------------------------------------
+ // Reduction:
+
+ typedef Scalar value_type;
+
+ KOKKOS_INLINE_FUNCTION
+ static void init(value_type &update) {
+ update = 1.0e32;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ static void join( volatile value_type & update,
+ const volatile value_type & source )
+ {
+ update = update < source ? update : source;
+ }
+
+ // Final serial processing of reduction value:
+ KOKKOS_INLINE_FUNCTION
+ void final( value_type & result ) const
+ {
+ *prev_dt = *dt ;
+ *dt = result ;
+ };
+
+ //--------------------------------------------------------------------------
+
+ // Global arrays used by this functor.
+
+ const typename Fields::elem_node_ids_type elem_node_connectivity ;
+ const typename Fields::node_coords_type model_coords ;
+ const typename Fields::scalar_type dt ;
+ const typename Fields::scalar_type prev_dt ;
+ const typename Fields::geom_state_array_type displacement ;
+ const typename Fields::geom_state_array_type velocity ;
+ const typename Fields::array_type elem_mass ;
+ const typename Fields::array_type internal_energy ;
+ const typename Fields::elem_sym_tensor_type stress_new ;
+ const typename Fields::elem_node_geom_type element_force ;
+ const typename Fields::elem_tensor_state_type rotation ;
+ const typename Fields::elem_sym_tensor_type rot_stretch ;
+
+ const Scalar two_mu;
+ const Scalar bulk_modulus;
+ const Scalar lin_bulk_visc;
+ const Scalar quad_bulk_visc;
+ const Scalar user_dt;
+ const int current_state;
+
+ internal_force( const Fields & mesh_fields,
+ const Scalar arg_user_dt,
+ const int arg_current_state )
+ : elem_node_connectivity( mesh_fields.elem_node_connectivity )
+ , model_coords( mesh_fields.model_coords )
+ , dt( mesh_fields.dt )
+ , prev_dt( mesh_fields.prev_dt )
+ , displacement( mesh_fields.displacement )
+ , velocity( mesh_fields.velocity )
+ , elem_mass( mesh_fields.elem_mass )
+ , internal_energy( mesh_fields.internal_energy )
+ , stress_new( mesh_fields.stress_new )
+ , element_force( mesh_fields.element_force )
+ , rotation( mesh_fields.rotation )
+ , rot_stretch( mesh_fields.rot_stretch )
+ , two_mu( mesh_fields.two_mu )
+ , bulk_modulus( mesh_fields.bulk_modulus )
+ , lin_bulk_visc( mesh_fields.lin_bulk_visc )
+ , quad_bulk_visc( mesh_fields.quad_bulk_visc )
+ , user_dt( arg_user_dt )
+ , current_state( arg_current_state )
+ {}
+
+ static void apply( const Fields & mesh_fields ,
+ const Scalar arg_user_dt,
+ const int arg_current_state )
+ {
+ internal_force op_force( mesh_fields , arg_user_dt , arg_current_state );
+
+ Kokkos::parallel_reduce( mesh_fields.num_elements, op_force );
+ }
+
+ //--------------------------------------------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void rotate_tensor_backward(int ielem ,
+ const Scalar * const s_n ,
+ Scalar * const rot_stress )const
+ {
+ const int rot_state = current_state ; // 1 ;
+
+ // t : temporary variables
+ // s_n : stress_new in local memory space
+ // r_n : rotation_new in local memory space
+ Scalar t[9], r_n[9];
+
+ r_n[0] = rotation(ielem, 0, rot_state );
+ r_n[1] = rotation(ielem, 1, rot_state );
+ r_n[2] = rotation(ielem, 2, rot_state );
+ r_n[3] = rotation(ielem, 3, rot_state );
+ r_n[4] = rotation(ielem, 4, rot_state );
+ r_n[5] = rotation(ielem, 5, rot_state );
+ r_n[6] = rotation(ielem, 6, rot_state );
+ r_n[7] = rotation(ielem, 7, rot_state );
+ r_n[8] = rotation(ielem, 8, rot_state );
+
+ t[0] = s_n[K_S_XX]*r_n[K_F_XX]+ s_n[K_S_XY]*r_n[K_F_XY]+ s_n[K_S_XZ]*r_n[K_F_XZ];
+ t[1] = s_n[K_S_YX]*r_n[K_F_XX]+ s_n[K_S_YY]*r_n[K_F_XY]+ s_n[K_S_YZ]*r_n[K_F_XZ];
+ t[2] = s_n[K_S_ZX]*r_n[K_F_XX]+ s_n[K_S_ZY]*r_n[K_F_XY]+ s_n[K_S_ZZ]*r_n[K_F_XZ];
+ t[3] = s_n[K_S_XX]*r_n[K_F_YX]+ s_n[K_S_XY]*r_n[K_F_YY]+ s_n[K_S_XZ]*r_n[K_F_YZ];
+ t[4] = s_n[K_S_YX]*r_n[K_F_YX]+ s_n[K_S_YY]*r_n[K_F_YY]+ s_n[K_S_YZ]*r_n[K_F_YZ];
+ t[5] = s_n[K_S_ZX]*r_n[K_F_YX]+ s_n[K_S_ZY]*r_n[K_F_YY]+ s_n[K_S_ZZ]*r_n[K_F_YZ];
+ t[6] = s_n[K_S_XX]*r_n[K_F_ZX]+ s_n[K_S_XY]*r_n[K_F_ZY]+ s_n[K_S_XZ]*r_n[K_F_ZZ];
+ t[7] = s_n[K_S_YX]*r_n[K_F_ZX]+ s_n[K_S_YY]*r_n[K_F_ZY]+ s_n[K_S_YZ]*r_n[K_F_ZZ];
+ t[8] = s_n[K_S_ZX]*r_n[K_F_ZX]+ s_n[K_S_ZY]*r_n[K_F_ZY]+ s_n[K_S_ZZ]*r_n[K_F_ZZ];
+
+ rot_stress[ K_S_XX ] = r_n[K_F_XX]*t[0] + r_n[K_F_XY]*t[1] + r_n[K_F_XZ]*t[2];
+ rot_stress[ K_S_YY ] = r_n[K_F_YX]*t[3] + r_n[K_F_YY]*t[4] + r_n[K_F_YZ]*t[5];
+ rot_stress[ K_S_ZZ ] = r_n[K_F_ZX]*t[6] + r_n[K_F_ZY]*t[7] + r_n[K_F_ZZ]*t[8];
+
+ rot_stress[ K_S_XY ] = r_n[K_F_XX]*t[3] + r_n[K_F_XY]*t[4] + r_n[K_F_XZ]*t[5];
+ rot_stress[ K_S_YZ ] = r_n[K_F_YX]*t[6] + r_n[K_F_YY]*t[7] + r_n[K_F_YZ]*t[8];
+ rot_stress[ K_S_ZX ] = r_n[K_F_ZX]*t[0] + r_n[K_F_ZY]*t[1] + r_n[K_F_ZZ]*t[2];
+ }
+
+ //--------------------------------------------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void comp_force(int ielem,
+ const Scalar * const vx ,
+ const Scalar * const vy ,
+ const Scalar * const vz ,
+ const Scalar * const grad_x ,
+ const Scalar * const grad_y ,
+ const Scalar * const grad_z ,
+ Scalar * total_stress12th ) const
+ {
+ Scalar internal_energy_inc = 0 ;
+
+ for(int inode = 0; inode < 8; ++inode) {
+
+ const Scalar fx =
+ total_stress12th[K_S_XX] * grad_x[inode] +
+ total_stress12th[K_S_XY] * grad_y[inode] +
+ total_stress12th[K_S_XZ] * grad_z[inode] ;
+
+ element_force(ielem, 0, inode) = fx ;
+
+ const Scalar fy =
+ total_stress12th[K_S_YX] * grad_x[inode] +
+ total_stress12th[K_S_YY] * grad_y[inode] +
+ total_stress12th[K_S_YZ] * grad_z[inode] ;
+
+ element_force(ielem, 1, inode) = fy ;
+
+ const Scalar fz =
+ total_stress12th[K_S_ZX] * grad_x[inode] +
+ total_stress12th[K_S_ZY] * grad_y[inode] +
+ total_stress12th[K_S_ZZ] * grad_z[inode] ;
+
+ element_force(ielem, 2, inode) = fz ;
+
+ internal_energy_inc +=
+ fx * vx[inode] +
+ fy * vy[inode] +
+ fz * vz[inode] ;
+ }
+
+ internal_energy(ielem) = internal_energy_inc ;
+ }
+
+ //----------------------------------------------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void get_stress(int ielem , Scalar * const s_n ) const
+ {
+ const int kxx = 0;
+ const int kyy = 1;
+ const int kzz = 2;
+ const int kxy = 3;
+ const int kyz = 4;
+ const int kzx = 5;
+
+ const Scalar e = (rot_stretch(ielem,kxx)+rot_stretch(ielem,kyy)+rot_stretch(ielem,kzz))/3.0;
+
+ s_n[kxx] = stress_new(ielem,kxx) += *dt * (two_mu * (rot_stretch(ielem,kxx)-e)+3*bulk_modulus*e);
+ s_n[kyy] = stress_new(ielem,kyy) += *dt * (two_mu * (rot_stretch(ielem,kyy)-e)+3*bulk_modulus*e);
+ s_n[kzz] = stress_new(ielem,kzz) += *dt * (two_mu * (rot_stretch(ielem,kzz)-e)+3*bulk_modulus*e);
+
+ s_n[kxy] = stress_new(ielem,kxy) += *dt * two_mu * rot_stretch(ielem,kxy);
+ s_n[kyz] = stress_new(ielem,kyz) += *dt * two_mu * rot_stretch(ielem,kyz);
+ s_n[kzx] = stress_new(ielem,kzx) += *dt * two_mu * rot_stretch(ielem,kzx);
+ }
+
+ //----------------------------------------------------------------------------
+
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int ielem, value_type & update )const
+ {
+ const Scalar ONE12TH = 1.0 / 12.0 ;
+
+ Scalar x[8], y[8], z[8] ;
+ Scalar vx[8], vy[8], vz[8];
+ Scalar grad_x[8], grad_y[8], grad_z[8];
+
+ // Position and velocity:
+
+ for ( int i = 0 ; i < ElemNodeCount ; ++i ) {
+ const int n = elem_node_connectivity(ielem,i);
+
+ x[i] = model_coords(n, 0) + displacement(n, 0, current_state) ;
+ y[i] = model_coords(n, 1) + displacement(n, 1, current_state) ;
+ z[i] = model_coords(n, 2) + displacement(n, 2, current_state) ;
+
+ vx[i] = velocity(n, 0, current_state);
+ vy[i] = velocity(n, 1, current_state);
+ vz[i] = velocity(n, 2, current_state);
+ }
+
+ // Gradient:
+
+ comp_grad<Scalar,execution_space>( x , y , z , grad_x , grad_y , grad_z );
+
+
+ const Scalar mid_vol = dot8<Scalar,execution_space>( x , grad_x );
+
+ const Scalar shr = two_mu ;
+ const Scalar dil = bulk_modulus + ((2.0*shr)/3.0);
+
+ const Scalar aspect = 6.0 * mid_vol /
+ ( dot8<Scalar,execution_space>( grad_x , grad_x ) +
+ dot8<Scalar,execution_space>( grad_y , grad_y ) +
+ dot8<Scalar,execution_space>( grad_z , grad_z ) );
+
+ const Scalar dtrial = sqrt(elem_mass(ielem) * aspect / dil);
+ const Scalar traced = (rot_stretch(ielem, 0) + rot_stretch(ielem, 1) + rot_stretch(ielem, 2));
+
+ const Scalar eps = traced < 0 ? (lin_bulk_visc - quad_bulk_visc * traced * dtrial) : lin_bulk_visc ;
+
+ const Scalar bulkq = eps * dil * dtrial * traced;
+
+ Scalar cur_time_step = dtrial * ( sqrt( 1.0 + eps * eps) - eps);
+
+ // force fixed time step if input
+
+ cur_time_step = user_dt > 0 ? user_dt : cur_time_step;
+
+ update = update < cur_time_step ? update : cur_time_step;
+
+
+ Scalar s_n[ 6 ];
+
+ get_stress( ielem, s_n );
+
+ Scalar total_stress12th[6];
+
+ // Get rotated stress:
+
+ rotate_tensor_backward(ielem, s_n , total_stress12th );
+
+ total_stress12th[0] = ONE12TH*( total_stress12th[ 0 ] + bulkq );
+ total_stress12th[1] = ONE12TH*( total_stress12th[ 1 ] + bulkq );
+ total_stress12th[2] = ONE12TH*( total_stress12th[ 2 ] + bulkq );
+ total_stress12th[3] = ONE12TH*( total_stress12th[ 3 ] );
+ total_stress12th[4] = ONE12TH*( total_stress12th[ 4 ] );
+ total_stress12th[5] = ONE12TH*( total_stress12th[ 5 ] );
+
+ comp_force(ielem, vx, vy, vz,
+ grad_x, grad_y, grad_z, total_stress12th);
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template<typename Scalar, class DeviceType >
+struct nodal_step
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ const typename Fields::scalar_type dt ;
+ const typename Fields::scalar_type prev_dt ;
+ const typename Fields::node_elem_ids_type node_elem_connectivity ;
+ const typename Fields::node_coords_type model_coords ;
+ const typename Fields::array_type nodal_mass ;
+ const typename Fields::geom_state_array_type displacement ;
+ const typename Fields::geom_state_array_type velocity ;
+ const typename Fields::geom_array_type acceleration ;
+ const typename Fields::geom_array_type internal_force ;
+ const typename Fields::elem_node_geom_type element_force ;
+
+ const Scalar x_bc;
+ const int current_state;
+ const int next_state;
+
+
+ nodal_step( const Fields & mesh_fields ,
+ const Scalar arg_x_bc,
+ const int arg_current_state,
+ const int arg_next_state)
+ : dt( mesh_fields.dt )
+ , prev_dt( mesh_fields.prev_dt )
+ , node_elem_connectivity( mesh_fields.node_elem_connectivity )
+ , model_coords( mesh_fields.model_coords )
+ , nodal_mass( mesh_fields.nodal_mass )
+ , displacement( mesh_fields.displacement )
+ , velocity( mesh_fields.velocity )
+ , acceleration( mesh_fields.acceleration )
+ , internal_force( mesh_fields.internal_force )
+ , element_force( mesh_fields.element_force )
+ , x_bc( arg_x_bc )
+ , current_state( arg_current_state )
+ , next_state( arg_next_state )
+ {
+ //std::cout << "finish_step dt: " << dt << std::endl;
+ //std::cout << "finish_step prev_dt: " << prev_dt << std::endl;
+ }
+
+ static void apply( const Fields & mesh_fields ,
+ const Scalar arg_x_bc ,
+ const int arg_current_state ,
+ const int arg_next_state )
+ {
+ nodal_step op( mesh_fields, arg_x_bc, arg_current_state, arg_next_state );
+
+ // Only update the owned nodes:
+
+ Kokkos::parallel_for( mesh_fields.num_nodes_owned , op );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()(int inode) const
+ {
+ // Getting count as per 'CSR-like' data structure
+ const int begin = node_elem_connectivity.row_map[inode];
+ const int end = node_elem_connectivity.row_map[inode+1];
+
+ double local_force[] = {0.0, 0.0, 0.0};
+
+ // Gather-sum internal force from
+ // each element that a node is attached to.
+
+ for ( int i = begin; i < end ; ++i ){
+
+ // node_elem_offset is a cumulative structure, so
+ // node_elem_offset(inode) should be the index where
+ // a particular row's elem_IDs begin
+ const int nelem = node_elem_connectivity.entries( i, 0);
+
+ // find the row in an element's stiffness matrix
+ // that corresponds to inode
+ const int elem_node_index = node_elem_connectivity.entries( i, 1);
+
+ local_force[0] += element_force(nelem, 0, elem_node_index);
+ local_force[1] += element_force(nelem, 1, elem_node_index);
+ local_force[2] += element_force(nelem, 2, elem_node_index);
+ }
+
+ internal_force(inode, 0) = local_force[0];
+ internal_force(inode, 1) = local_force[1];
+ internal_force(inode, 2) = local_force[2];
+
+ // Acceleration:
+
+ Scalar v_new[3];
+ Scalar a_current[3];
+
+ const Scalar tol = 1.0e-7;
+
+ // If not on the boundary then: a = F / m
+ if ( tol < fabs(model_coords(inode,0)-x_bc) ) {
+
+ const Scalar m = nodal_mass( inode );
+
+ acceleration(inode,0) = a_current[0] = -local_force[0] / m ;
+ acceleration(inode,1) = a_current[1] = -local_force[1] / m ;
+ acceleration(inode,2) = a_current[2] = -local_force[2] / m ;
+ }
+ else { //enforce fixed BC
+ acceleration(inode,0) = a_current[0] = 0;
+ acceleration(inode,1) = a_current[1] = 0;
+ acceleration(inode,2) = a_current[2] = 0;
+ }
+
+ // Central difference time integration:
+
+ const Scalar dt_disp = *dt ;
+ const Scalar dt_vel = ( *dt + *prev_dt ) / 2.0 ;
+
+ velocity(inode,0,next_state) = v_new[0] =
+ velocity(inode,0,current_state) + dt_vel * a_current[0];
+
+ velocity(inode,1,next_state) = v_new[1] =
+ velocity(inode,1,current_state) + dt_vel * a_current[1];
+
+ velocity(inode,2,next_state) = v_new[2] =
+ velocity(inode,2,current_state) + dt_vel * a_current[2];
+
+ displacement(inode,0,next_state) =
+ displacement(inode,0,current_state) + dt_disp * v_new[0];
+
+ displacement(inode,1,next_state) =
+ displacement(inode,1,current_state) + dt_disp * v_new[1];
+
+ displacement(inode,2,next_state) =
+ displacement(inode,2,current_state) + dt_disp * v_new[2];
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class DeviceType >
+struct pack_state
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ typedef typename Fields::geom_state_array_type::value_type value_type ;
+ typedef Kokkos::View< value_type* , execution_space > buffer_type ;
+
+ static const unsigned value_count = 6 ;
+
+ const typename Fields::geom_state_array_type displacement ;
+ const typename Fields::geom_state_array_type velocity ;
+ const buffer_type output ;
+ const size_type inode_base ;
+ const size_type state_next ;
+
+ pack_state( const buffer_type & arg_output ,
+ const Fields & mesh_fields ,
+ const size_type arg_begin ,
+ const size_type arg_state )
+ : displacement( mesh_fields.displacement )
+ , velocity( mesh_fields.velocity )
+ , output( arg_output )
+ , inode_base( arg_begin )
+ , state_next( arg_state )
+ {}
+
+ static void apply( const buffer_type & arg_output ,
+ const size_type arg_begin ,
+ const size_type arg_count ,
+ const Fields & mesh_fields ,
+ const size_type arg_state )
+ {
+ pack_state op( arg_output , mesh_fields , arg_begin , arg_state );
+
+ Kokkos::parallel_for( arg_count , op );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ {
+ const size_type inode = inode_base + i ;
+
+ size_type j = i * value_count ;
+
+ output[j++] = displacement( inode , 0 , state_next );
+ output[j++] = displacement( inode , 1 , state_next );
+ output[j++] = displacement( inode , 2 , state_next );
+ output[j++] = velocity( inode , 0 , state_next );
+ output[j++] = velocity( inode , 1 , state_next );
+ output[j++] = velocity( inode , 2 , state_next );
+ }
+};
+
+template< typename Scalar , class DeviceType >
+struct unpack_state
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ typedef Explicit::Fields< Scalar , execution_space > Fields ;
+
+ typedef typename Fields::geom_state_array_type::value_type value_type ;
+ typedef Kokkos::View< value_type* , execution_space > buffer_type ;
+
+ static const unsigned value_count = 6 ;
+
+ const typename Fields::geom_state_array_type displacement ;
+ const typename Fields::geom_state_array_type velocity ;
+ const buffer_type input ;
+ const size_type inode_base ;
+ const size_type state_next ;
+
+ unpack_state( const buffer_type & arg_input ,
+ const Fields & mesh_fields ,
+ const size_type arg_begin ,
+ const size_type arg_state )
+ : displacement( mesh_fields.displacement )
+ , velocity( mesh_fields.velocity )
+ , input( arg_input )
+ , inode_base( arg_begin )
+ , state_next( arg_state )
+ {}
+
+ static void apply( const Fields & mesh_fields ,
+ const size_type arg_state ,
+ const buffer_type & arg_input ,
+ const size_type arg_begin ,
+ const size_type arg_count )
+ {
+ unpack_state op( arg_input , mesh_fields , arg_begin , arg_state );
+
+ Kokkos::parallel_for( arg_count , op );
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ {
+ const size_type inode = inode_base + i ;
+
+ size_type j = i * value_count ;
+
+ displacement( inode , 0 , state_next ) = input[j++] ;
+ displacement( inode , 1 , state_next ) = input[j++] ;
+ displacement( inode , 2 , state_next ) = input[j++] ;
+ velocity( inode , 0 , state_next ) = input[j++] ;
+ velocity( inode , 1 , state_next ) = input[j++] ;
+ velocity( inode , 2 , state_next ) = input[j++] ;
+ }
+};
+
+} /* namespace Explicit */
+
+#endif /* #ifndef KOKKOS_EXPLICITFUNCTORS_HPP */
+
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_Error.hpp b/lib/kokkos/example/multi_fem/FEMesh.hpp
old mode 100755
new mode 100644
similarity index 66%
copy from lib/kokkos/core/src/impl/Kokkos_Error.hpp
copy to lib/kokkos/example/multi_fem/FEMesh.hpp
index 33e203c94..33468e2fb
--- a/lib/kokkos/core/src/impl/Kokkos_Error.hpp
+++ b/lib/kokkos/example/multi_fem/FEMesh.hpp
@@ -1,78 +1,86 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#ifndef KOKKOS_IMPL_ERROR_HPP
-#define KOKKOS_IMPL_ERROR_HPP
+#ifndef KOKKOS_FEMESH_HPP
+#define KOKKOS_FEMESH_HPP
-#include <string>
-#include <iosfwd>
+#include <utility>
+#include <limits>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
-namespace Kokkos {
-namespace Impl {
+#include <Kokkos_Core.hpp>
+#include <Kokkos_StaticCrsGraph.hpp>
-void host_abort( const char * const );
+#include <ParallelComm.hpp>
+#include <ParallelDataMap.hpp>
-void throw_runtime_exception( const std::string & );
+namespace HybridFEM {
-void traceback_callstack( std::ostream & );
+//----------------------------------------------------------------------------
+/** \brief Finite element mesh fixture for hybrid parallel performance tests.
+ */
+template< typename CoordScalarType , unsigned ElemNodeCount , class Device >
+struct FEMesh {
-std::string human_memory_size(size_t arg_bytes);
+ typedef typename Device::size_type size_type ;
-}
-}
+ static const size_type element_node_count = ElemNodeCount ;
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+ typedef Kokkos::View< CoordScalarType*[3] , Device > node_coords_type ;
+ typedef Kokkos::View< size_type*[ElemNodeCount], Device > elem_node_ids_type ;
+ typedef Kokkos::StaticCrsGraph< size_type[2] , Device > node_elem_ids_type ;
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-namespace Kokkos {
-inline
-void abort( const char * const message ) { Kokkos::Impl::host_abort(message); }
-}
-#endif /* defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) */
+ node_coords_type node_coords ;
+ elem_node_ids_type elem_node_ids ;
+ node_elem_ids_type node_elem_ids ;
+ Kokkos::ParallelDataMap parallel_data_map ;
+};
//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-#endif /* #ifndef KOKKOS_IMPL_ERROR_HPP */
+} /* namespace HybridFEM */
+
+#endif /* #ifndef KOKKOS_FEMESH_HPP */
diff --git a/lib/kokkos/example/multi_fem/HexElement.hpp b/lib/kokkos/example/multi_fem/HexElement.hpp
new file mode 100644
index 000000000..7dec087cb
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/HexElement.hpp
@@ -0,0 +1,268 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef ELEMENTHEX_HPP
+#define ELEMENTHEX_HPP
+
+namespace HybridFEM {
+
+template< unsigned NodeCount >
+class HexElement_TensorData ;
+
+template< unsigned NodeCount , class Device >
+class HexElement_TensorEval ;
+
+//----------------------------------------------------------------------------
+/** \brief Evaluate Hex element on interval [-1,1]^3 */
+template<>
+class HexElement_TensorData< 8 > {
+public:
+
+ static const unsigned element_node_count = 8 ;
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned integration_count_1d = 2 ;
+ static const unsigned function_count_1d = 2 ;
+
+ float values_1d [ function_count_1d ][ integration_count_1d ];
+ float derivs_1d [ function_count_1d ][ integration_count_1d ];
+ float weights_1d[ integration_count_1d ];
+
+ unsigned char eval_map[ element_node_count ][4] ;
+
+ static float eval_value_1d( const unsigned jf , const float x )
+ {
+ return 0 == jf ? 0.5 * ( 1.0 - x ) : (
+ 1 == jf ? 0.5 * ( 1.0 + x ) : 0 );
+ }
+
+ static float eval_deriv_1d( const unsigned jf , const float )
+ {
+ return 0 == jf ? -0.5 : (
+ 1 == jf ? 0.5 : 0 );
+ }
+
+ HexElement_TensorData()
+ {
+ const unsigned char tmp_map[ element_node_count ][ spatial_dimension ] =
+ { { 0 , 0 , 0 },
+ { 1 , 0 , 0 },
+ { 1 , 1 , 0 },
+ { 0 , 1 , 0 },
+ { 0 , 0 , 1 },
+ { 1 , 0 , 1 },
+ { 1 , 1 , 1 },
+ { 0 , 1 , 1 } };
+
+ weights_1d[0] = 1 ;
+ weights_1d[1] = 1 ;
+
+ const float points_1d[ integration_count_1d ] =
+ { -0.577350269 , 0.577350269 };
+
+ for ( unsigned i = 0 ; i < element_node_count ; ++i ) {
+ eval_map[i][0] = tmp_map[i][0];
+ eval_map[i][1] = tmp_map[i][1];
+ eval_map[i][2] = tmp_map[i][2];
+ }
+
+ for ( unsigned xp = 0 ; xp < integration_count_1d ; ++xp ) {
+ for ( unsigned xf = 0 ; xf < function_count_1d ; ++xf ) {
+ values_1d[xp][xf] = eval_value_1d( xf , points_1d[xp] );
+ derivs_1d[xp][xf] = eval_deriv_1d( xf , points_1d[xp] );
+ }}
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template<>
+class HexElement_TensorData< 27 > {
+public:
+
+ static const unsigned element_node_count = 27 ;
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned integration_count_1d = 3 ;
+ static const unsigned function_count_1d = 3 ;
+
+ float values_1d [ function_count_1d ][ integration_count_1d ];
+ float derivs_1d [ function_count_1d ][ integration_count_1d ];
+ float weights_1d[ integration_count_1d ];
+
+ unsigned char eval_map[ element_node_count ][4] ;
+
+ // sizeof(EvaluateElementHex) = 111 bytes =
+ // sizeof(float) * 9 +
+ // sizeof(float) * 9 +
+ // sizeof(float) * 3 +
+ // sizeof(char) * 27
+
+ static float eval_value_1d( const unsigned jf , const float p )
+ {
+ return 0 == jf ? 0.5 * p * ( p - 1 ) : (
+ 1 == jf ? 1.0 - p * p : (
+ 2 == jf ? 0.5 * p * ( p + 1 ) : 0 ));
+ }
+
+ static float eval_deriv_1d( const unsigned jf , const float p )
+ {
+ return 0 == jf ? p - 0.5 : (
+ 1 == jf ? -2.0 * p : (
+ 2 == jf ? p + 0.5 : 0 ));
+ }
+
+ HexElement_TensorData()
+ {
+ const unsigned char tmp_map[ element_node_count ][ spatial_dimension ] =
+ { { 0 , 0 , 0 },
+ { 2 , 0 , 0 },
+ { 2 , 2 , 0 },
+ { 0 , 2 , 0 },
+ { 0 , 0 , 2 },
+ { 2 , 0 , 2 },
+ { 2 , 2 , 2 },
+ { 0 , 2 , 2 },
+ { 1 , 0 , 0 },
+ { 2 , 1 , 0 },
+ { 1 , 2 , 0 },
+ { 0 , 1 , 0 },
+ { 0 , 0 , 1 },
+ { 2 , 0 , 1 },
+ { 2 , 2 , 1 },
+ { 0 , 2 , 1 },
+ { 1 , 0 , 2 },
+ { 2 , 1 , 2 },
+ { 1 , 2 , 2 },
+ { 0 , 1 , 2 },
+ { 1 , 1 , 1 },
+ { 1 , 1 , 0 },
+ { 1 , 1 , 2 },
+ { 0 , 1 , 1 },
+ { 2 , 1 , 1 },
+ { 1 , 0 , 1 },
+ { 1 , 2 , 1 } };
+
+ // Interval [-1,1]
+
+ weights_1d[0] = 0.555555556 ;
+ weights_1d[1] = 0.888888889 ;
+ weights_1d[2] = 0.555555556 ;
+
+ const float points_1d[3] = { -0.774596669 ,
+ 0.000000000 ,
+ 0.774596669 };
+
+ for ( unsigned i = 0 ; i < element_node_count ; ++i ) {
+ eval_map[i][0] = tmp_map[i][0];
+ eval_map[i][1] = tmp_map[i][1];
+ eval_map[i][2] = tmp_map[i][2];
+ }
+
+ for ( unsigned xp = 0 ; xp < integration_count_1d ; ++xp ) {
+ for ( unsigned xf = 0 ; xf < function_count_1d ; ++xf ) {
+ values_1d[xp][xf] = eval_value_1d( xf , points_1d[xp] );
+ derivs_1d[xp][xf] = eval_deriv_1d( xf , points_1d[xp] );
+ }}
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< unsigned NodeCount >
+class HexElement_Data {
+public:
+ static const unsigned spatial_dimension = 3 ;
+ static const unsigned element_node_count = NodeCount ;
+ static const unsigned integration_count = NodeCount ;
+ static const unsigned function_count = NodeCount ;
+
+ float weights[ integration_count ] ;
+ float values[ integration_count ][ function_count ];
+ float gradients[ integration_count ][ spatial_dimension ][ function_count ];
+
+ HexElement_Data()
+ {
+ HexElement_TensorData< NodeCount > tensor_data ;
+
+ for ( unsigned ip = 0 ; ip < integration_count ; ++ip ) {
+
+ const unsigned ipx = tensor_data.eval_map[ip][0] ;
+ const unsigned ipy = tensor_data.eval_map[ip][1] ;
+ const unsigned ipz = tensor_data.eval_map[ip][2] ;
+
+ weights[ip] = tensor_data.weights_1d[ ipx ] *
+ tensor_data.weights_1d[ ipy ] *
+ tensor_data.weights_1d[ ipz ] ;
+
+ for ( unsigned jf = 0 ; jf < function_count ; ++jf ) {
+
+ const unsigned jfx = tensor_data.eval_map[jf][0] ;
+ const unsigned jfy = tensor_data.eval_map[jf][1] ;
+ const unsigned jfz = tensor_data.eval_map[jf][2] ;
+
+ values[ip][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][0][jf] = tensor_data.derivs_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][1][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.derivs_1d[ ipy ][ jfy ] *
+ tensor_data.values_1d[ ipz ][ jfz ] ;
+
+ gradients[ip][2][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
+ tensor_data.values_1d[ ipy ][ jfy ] *
+ tensor_data.derivs_1d[ ipz ][ jfz ] ;
+ }
+ }
+ }
+};
+
+//----------------------------------------------------------------------------
+
+} /* namespace HybridFEM */
+
+#endif /* #ifndef ELEMENTHEX_HPP */
+
+
diff --git a/lib/kokkos/example/multi_fem/HexExplicitFunctions.hpp b/lib/kokkos/example/multi_fem/HexExplicitFunctions.hpp
new file mode 100644
index 000000000..3c4ca5822
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/HexExplicitFunctions.hpp
@@ -0,0 +1,443 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_HEXEXPLICITFUNCTIONS_HPP
+#define KOKKOS_HEXEXPLICITFUNCTIONS_HPP
+
+#include <math.h>
+
+namespace Explicit {
+
+struct Hex8Functions
+{
+ static const unsigned SpatialDim = 3 ;
+ static const unsigned ElemNodeCount = 8 ;
+
+ // Indices for full 3x3 tensor:
+
+ static const unsigned K_F_XX = 0 ;
+ static const unsigned K_F_YY = 1 ;
+ static const unsigned K_F_ZZ = 2 ;
+ static const unsigned K_F_XY = 3 ;
+ static const unsigned K_F_YZ = 4 ;
+ static const unsigned K_F_ZX = 5 ;
+ static const unsigned K_F_YX = 6 ;
+ static const unsigned K_F_ZY = 7 ;
+ static const unsigned K_F_XZ = 8 ;
+ static const unsigned K_F_SIZE = 9 ;
+
+ // Indexes into a 3 by 3 symmetric tensor stored as a length 6 vector
+
+ static const unsigned K_S_XX = 0 ;
+ static const unsigned K_S_YY = 1 ;
+ static const unsigned K_S_ZZ = 2 ;
+ static const unsigned K_S_XY = 3 ;
+ static const unsigned K_S_YZ = 4 ;
+ static const unsigned K_S_ZX = 5 ;
+ static const unsigned K_S_YX = 3 ;
+ static const unsigned K_S_ZY = 4 ;
+ static const unsigned K_S_XZ = 5 ;
+ static const unsigned K_S_SIZE = 6 ;
+
+ // Indexes into a 3 by 3 skew symmetric tensor stored as a length 3 vector
+
+ static const unsigned K_V_XY = 0 ;
+ static const unsigned K_V_YZ = 1 ;
+ static const unsigned K_V_ZX = 2 ;
+ static const unsigned K_V_SIZE = 3 ;
+
+ //--------------------------------------------------------------------------
+
+ template< typename ScalarA , typename ScalarB >
+ KOKKOS_INLINE_FUNCTION static
+ double dot8( const ScalarA * const a , const ScalarB * const b )
+ { return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3] +
+ a[4] * b[4] + a[5] * b[5] + a[6] * b[6] + a[7] * b[7] ; }
+
+ //--------------------------------------------------------------------------
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ KOKKOS_INLINE_FUNCTION static
+ void grad( const ScalarPrecise x[] ,
+ const ScalarPrecise z[] ,
+ ScalarCompact grad_y[] )
+ {
+ const ScalarCompact R42=(x[3] - x[1]);
+ const ScalarCompact R52=(x[4] - x[1]);
+ const ScalarCompact R54=(x[4] - x[3]);
+
+ const ScalarCompact R63=(x[5] - x[2]);
+ const ScalarCompact R83=(x[7] - x[2]);
+ const ScalarCompact R86=(x[7] - x[5]);
+
+ const ScalarCompact R31=(x[2] - x[0]);
+ const ScalarCompact R61=(x[5] - x[0]);
+ const ScalarCompact R74=(x[6] - x[3]);
+
+ const ScalarCompact R72=(x[6] - x[1]);
+ const ScalarCompact R75=(x[6] - x[4]);
+ const ScalarCompact R81=(x[7] - x[0]);
+
+ const ScalarCompact t1=(R63 + R54);
+ const ScalarCompact t2=(R61 + R74);
+ const ScalarCompact t3=(R72 + R81);
+
+ const ScalarCompact t4 =(R86 + R42);
+ const ScalarCompact t5 =(R83 + R52);
+ const ScalarCompact t6 =(R75 + R31);
+
+ // Calculate Y gradient from X and Z data
+
+ grad_y[0] = (z[1] * t1) - (z[2] * R42) - (z[3] * t5) + (z[4] * t4) + (z[5] * R52) - (z[7] * R54);
+ grad_y[1] = (z[2] * t2) + (z[3] * R31) - (z[0] * t1) - (z[5] * t6) + (z[6] * R63) - (z[4] * R61);
+ grad_y[2] = (z[3] * t3) + (z[0] * R42) - (z[1] * t2) - (z[6] * t4) + (z[7] * R74) - (z[5] * R72);
+ grad_y[3] = (z[0] * t5) - (z[1] * R31) - (z[2] * t3) + (z[7] * t6) + (z[4] * R81) - (z[6] * R83);
+ grad_y[4] = (z[5] * t3) + (z[6] * R86) - (z[7] * t2) - (z[0] * t4) - (z[3] * R81) + (z[1] * R61);
+ grad_y[5] = (z[6] * t5) - (z[4] * t3) - (z[7] * R75) + (z[1] * t6) - (z[0] * R52) + (z[2] * R72);
+ grad_y[6] = (z[7] * t1) - (z[5] * t5) - (z[4] * R86) + (z[2] * t4) - (z[1] * R63) + (z[3] * R83);
+ grad_y[7] = (z[4] * t2) - (z[6] * t1) + (z[5] * R75) - (z[3] * t6) - (z[2] * R74) + (z[0] * R54);
+ }
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ static KOKKOS_INLINE_FUNCTION
+ void grad( const ScalarPrecise x[] ,
+ const ScalarPrecise y[] ,
+ const ScalarPrecise z[] ,
+ ScalarCompact grad_x[] ,
+ ScalarCompact grad_y[] ,
+ ScalarCompact grad_z[] )
+ {
+ grad( x , z , grad_y );
+ grad( z , y , grad_x );
+ grad( y , x , grad_z );
+ }
+
+ //--------------------------------------------------------------------------
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ KOKKOS_INLINE_FUNCTION static
+ void polar_decomp( const float dt ,
+ const ScalarCompact v_gr[] ,
+ ScalarPrecise stretch[] /* INOUT */ ,
+ ScalarCompact str_ten[] /* OUT */ ,
+ ScalarCompact rot[] /* OUT */ )
+ {
+ const float dt_half = 0.5 * dt;
+
+ ScalarCompact vort[ K_V_SIZE ]; // Vorticity
+
+ // Symmetric part
+ str_ten[K_S_XX] = v_gr[K_F_XX];
+ str_ten[K_S_YY] = v_gr[K_F_YY];
+ str_ten[K_S_ZZ] = v_gr[K_F_ZZ];
+ str_ten[K_S_XY] = 0.5 * ( v_gr[K_F_XY] + v_gr[K_F_YX] );
+ str_ten[K_S_YZ] = 0.5 * ( v_gr[K_F_YZ] + v_gr[K_F_ZY] );
+ str_ten[K_S_ZX] = 0.5 * ( v_gr[K_F_ZX] + v_gr[K_F_XZ] );
+
+ // Skew Symmetric part
+ vort[K_V_XY] = 0.5 * ( v_gr[K_F_XY] - v_gr[K_F_YX] );
+ vort[K_V_YZ] = 0.5 * ( v_gr[K_F_YZ] - v_gr[K_F_ZY] );
+ vort[K_V_ZX] = 0.5 * ( v_gr[K_F_ZX] - v_gr[K_F_XZ] );
+
+ // calculate the rates of rotation via gauss elimination.
+
+ ScalarCompact z1 = str_ten[K_S_XY] * stretch[K_S_ZX] -
+ str_ten[K_S_ZX] * stretch[K_S_XY] +
+ str_ten[K_S_YY] * stretch[K_S_YZ] -
+ str_ten[K_S_YZ] * stretch[K_S_YY] +
+ str_ten[K_S_YZ] * stretch[K_S_ZZ] -
+ str_ten[K_S_ZZ] * stretch[K_S_YZ];
+
+ ScalarCompact z2 = str_ten[K_S_ZX] * stretch[K_S_XX] -
+ str_ten[K_S_XX] * stretch[K_S_ZX] +
+ str_ten[K_S_YZ] * stretch[K_S_XY] -
+ str_ten[K_S_XY] * stretch[K_S_YZ] +
+ str_ten[K_S_ZZ] * stretch[K_S_ZX] -
+ str_ten[K_S_ZX] * stretch[K_S_ZZ];
+
+ ScalarCompact z3 = str_ten[K_S_XX] * stretch[K_S_XY] -
+ str_ten[K_S_XY] * stretch[K_S_XX] +
+ str_ten[K_S_XY] * stretch[K_S_YY] -
+ str_ten[K_S_YY] * stretch[K_S_XY] +
+ str_ten[K_S_ZX] * stretch[K_S_YZ] -
+ str_ten[K_S_YZ] * stretch[K_S_ZX];
+
+ {
+ // forward elimination
+
+ const ScalarCompact a1inv = 1.0 / (stretch[K_S_YY] + stretch[K_S_ZZ]);
+ const ScalarCompact a4BYa1 = -1 * stretch[K_S_XY] * a1inv;
+ const ScalarCompact a2inv = 1.0 / (stretch[K_S_ZZ] + stretch[K_S_XX] + stretch[K_S_XY] * a4BYa1);
+
+ const ScalarCompact a5 = -stretch[K_S_YZ] + stretch[K_S_ZX] * a4BYa1;
+
+ z2 -= z1 * a4BYa1;
+ const ScalarCompact a6BYa1 = -1 * stretch[K_S_ZX] * a1inv;
+ const ScalarCompact a5BYa2 = a5 * a2inv;
+ z3 -= z1 * a6BYa1 - z2 * a5BYa2;
+
+ // backward substitution -
+
+ z3 /= (stretch[K_S_XX] + stretch[K_S_YY] + stretch[K_S_ZX] * a6BYa1 + a5 * a5BYa2);
+ z2 = (z2 - a5 * z3) * a2inv;
+ z1 = (z1*a1inv - a6BYa1 * z3 -a4BYa1 * z2);
+ }
+
+ // calculate rotation rates - recall that spin_rate is an asymmetric tensor,
+ // so compute spin rate vector as dual of spin rate tensor,
+ // i.e w_i = e_ijk * spin_rate_jk
+
+ z1 += vort[K_V_YZ];
+ z2 += vort[K_V_ZX];
+ z3 += vort[K_V_XY];
+
+ {
+ // update rotation tensor:
+ // 1) premultiply old rotation tensor to get right-hand side.
+
+ ScalarCompact r_XX = rot[K_F_XX] + dt_half*( z3 * rot[K_F_YX] - z2 * rot[K_F_ZX] );
+ ScalarCompact r_YX = rot[K_F_YX] + dt_half*( z1 * rot[K_F_ZX] - z3 * rot[K_F_XX] );
+ ScalarCompact r_ZX = rot[K_F_ZX] + dt_half*( z2 * rot[K_F_XX] - z1 * rot[K_F_YX] );
+ ScalarCompact r_XY = rot[K_F_XY] + dt_half*( z3 * rot[K_F_YY] - z2 * rot[K_F_ZY] );
+ ScalarCompact r_YY = rot[K_F_YY] + dt_half*( z1 * rot[K_F_ZY] - z3 * rot[K_F_XY] );
+ ScalarCompact r_ZY = rot[K_F_ZY] + dt_half*( z2 * rot[K_F_XY] - z1 * rot[K_F_YY] );
+ ScalarCompact r_XZ = rot[K_F_XZ] + dt_half*( z3 * rot[K_F_YZ] - z2 * rot[K_F_ZZ] );
+ ScalarCompact r_YZ = rot[K_F_YZ] + dt_half*( z1 * rot[K_F_ZZ] - z3 * rot[K_F_XZ] );
+ ScalarCompact r_ZZ = rot[K_F_ZZ] + dt_half*( z2 * rot[K_F_XZ] - z1 * rot[K_F_YZ] );
+
+
+ // 2) solve for new rotation tensor via gauss elimination.
+ // forward elimination -
+
+ const ScalarCompact a12 = - dt_half * z3;
+ const ScalarCompact a13 = dt_half * z2;
+ ScalarCompact b32 = - dt_half * z1;
+ const ScalarCompact a22inv = 1.0 / (1.0 + a12 * a12);
+
+ const ScalarCompact a13a12 = a13*a12;
+ const ScalarCompact a23 = b32 + a13a12;
+
+ r_YX += r_XX * a12;
+ r_YY += r_XY * a12;
+ r_YZ += r_XZ * a12;
+
+ b32 = (b32 - a13a12) * a22inv;
+
+ r_ZX += r_XX * a13 + r_YX * b32;
+ r_ZY += r_XY * a13 + r_YY * b32;
+ r_ZZ += r_XZ * a13 + r_YZ * b32;
+
+ // backward substitution -
+
+ const ScalarCompact a33inv = 1.0 / (1.0 + a13 * a13 + a23 * b32);
+
+ rot[K_F_ZX] = r_ZX * a33inv;
+ rot[K_F_ZY] = r_ZY * a33inv;
+ rot[K_F_ZZ] = r_ZZ * a33inv;
+ rot[K_F_YX] = ( r_YX - rot[K_F_ZX] * a23 ) * a22inv;
+ rot[K_F_YY] = ( r_YY - rot[K_F_ZY] * a23 ) * a22inv;
+ rot[K_F_YZ] = ( r_YZ - rot[K_F_ZZ] * a23 ) * a22inv;
+ rot[K_F_XX] = r_XX - rot[K_F_ZX] * a13 - rot[K_F_YX] * a12;
+ rot[K_F_XY] = r_XY - rot[K_F_ZY] * a13 - rot[K_F_YY] * a12;
+ rot[K_F_XZ] = r_XZ - rot[K_F_ZZ] * a13 - rot[K_F_YZ] * a12;
+ }
+
+ // update stretch tensor in the new configuration -
+
+ const ScalarCompact a1 = str_ten[K_S_XY] + vort[K_V_XY];
+ const ScalarCompact a2 = str_ten[K_S_YZ] + vort[K_V_YZ];
+ const ScalarCompact a3 = str_ten[K_S_ZX] + vort[K_V_ZX];
+ const ScalarCompact b1 = str_ten[K_S_ZX] - vort[K_V_ZX];
+ const ScalarCompact b2 = str_ten[K_S_XY] - vort[K_V_XY];
+ const ScalarCompact b3 = str_ten[K_S_YZ] - vort[K_V_YZ];
+
+ const ScalarCompact s_XX = stretch[K_S_XX];
+ const ScalarCompact s_YY = stretch[K_S_YY];
+ const ScalarCompact s_ZZ = stretch[K_S_ZZ];
+ const ScalarCompact s_XY = stretch[K_S_XY];
+ const ScalarCompact s_YZ = stretch[K_S_YZ];
+ const ScalarCompact s_ZX = stretch[K_S_ZX];
+
+ stretch[K_S_XX] += dt * (str_ten[K_S_XX] * s_XX + ( a1 + z3 ) * s_XY + ( b1 - z2 ) * s_ZX);
+ stretch[K_S_YY] += dt * (str_ten[K_S_YY] * s_YY + ( a2 + z1 ) * s_YZ + ( b2 - z3 ) * s_XY);
+ stretch[K_S_ZZ] += dt * (str_ten[K_S_ZZ] * s_ZZ + ( a3 + z2 ) * s_ZX + ( b3 - z1 ) * s_YZ);
+ stretch[K_S_XY] += dt * (str_ten[K_S_XX] * s_XY + ( a1 ) * s_YY + ( b1 ) * s_YZ - z3 * s_XX + z1 * s_ZX);
+ stretch[K_S_YZ] += dt * (str_ten[K_S_YY] * s_YZ + ( a2 ) * s_ZZ + ( b2 ) * s_ZX - z1 * s_YY + z2 * s_XY);
+ stretch[K_S_ZX] += dt * (str_ten[K_S_ZZ] * s_ZX + ( a3 ) * s_XX + ( b3 ) * s_XY - z2 * s_ZZ + z3 * s_YZ);
+ }
+
+ //--------------------------------------------------------------------------
+
+ template< typename ScalarCompact >
+ static KOKKOS_INLINE_FUNCTION
+ void rotate_tensor( const ScalarCompact str_ten[] ,
+ const ScalarCompact rot[] ,
+ ScalarCompact rot_str[] )
+ {
+ ScalarCompact t[9];
+
+ t[0] = str_ten[K_S_XX]*rot[K_F_XX] + str_ten[K_S_XY]*rot[K_F_YX] + str_ten[K_S_XZ]*rot[K_F_ZX];
+ t[1] = str_ten[K_S_YX]*rot[K_F_XX] + str_ten[K_S_YY]*rot[K_F_YX] + str_ten[K_S_YZ]*rot[K_F_ZX];
+ t[2] = str_ten[K_S_ZX]*rot[K_F_XX] + str_ten[K_S_ZY]*rot[K_F_YX] + str_ten[K_S_ZZ]*rot[K_F_ZX];
+
+ t[3] = str_ten[K_S_XX]*rot[K_F_XY] + str_ten[K_S_XY]*rot[K_F_YY] + str_ten[K_S_XZ]*rot[K_F_ZY];
+ t[4] = str_ten[K_S_YX]*rot[K_F_XY] + str_ten[K_S_YY]*rot[K_F_YY] + str_ten[K_S_YZ]*rot[K_F_ZY];
+ t[5] = str_ten[K_S_ZX]*rot[K_F_XY] + str_ten[K_S_ZY]*rot[K_F_YY] + str_ten[K_S_ZZ]*rot[K_F_ZY];
+
+ t[6] = str_ten[K_S_XX]*rot[K_F_XZ] + str_ten[K_S_XY]*rot[K_F_YZ] + str_ten[K_S_XZ]*rot[K_F_ZZ];
+ t[7] = str_ten[K_S_YX]*rot[K_F_XZ] + str_ten[K_S_YY]*rot[K_F_YZ] + str_ten[K_S_YZ]*rot[K_F_ZZ];
+ t[8] = str_ten[K_S_ZX]*rot[K_F_XZ] + str_ten[K_S_ZY]*rot[K_F_YZ] + str_ten[K_S_ZZ]*rot[K_F_ZZ];
+
+
+ rot_str[ K_S_XX ] = rot[K_F_XX] * t[0] + rot[K_F_YX] * t[1] + rot[K_F_ZX] * t[2];
+ rot_str[ K_S_YY ] = rot[K_F_XY] * t[3] + rot[K_F_YY] * t[4] + rot[K_F_ZY] * t[5];
+ rot_str[ K_S_ZZ ] = rot[K_F_XZ] * t[6] + rot[K_F_YZ] * t[7] + rot[K_F_ZZ] * t[8];
+
+ rot_str[ K_S_XY ] = rot[K_F_XX] * t[3] + rot[K_F_YX] * t[4] + rot[K_F_ZX] * t[5];
+ rot_str[ K_S_YZ ] = rot[K_F_XY] * t[6] + rot[K_F_YY] * t[7] + rot[K_F_ZY] * t[8];
+ rot_str[ K_S_ZX ] = rot[K_F_XZ] * t[0] + rot[K_F_YZ] * t[1] + rot[K_F_ZZ] * t[2];
+ }
+
+ //--------------------------------------------------------------------------
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ static KOKKOS_INLINE_FUNCTION
+ void rotate_tensor_backward( const ScalarPrecise stress[] ,
+ const ScalarCompact rot[] ,
+ ScalarCompact rot_stress[] )
+ {
+ ScalarCompact t[9] ;
+
+ t[0] = stress[K_S_XX]*rot[K_F_XX]+ stress[K_S_XY]*rot[K_F_XY]+ stress[K_S_XZ]*rot[K_F_XZ];
+ t[1] = stress[K_S_YX]*rot[K_F_XX]+ stress[K_S_YY]*rot[K_F_XY]+ stress[K_S_YZ]*rot[K_F_XZ];
+ t[2] = stress[K_S_ZX]*rot[K_F_XX]+ stress[K_S_ZY]*rot[K_F_XY]+ stress[K_S_ZZ]*rot[K_F_XZ];
+ t[3] = stress[K_S_XX]*rot[K_F_YX]+ stress[K_S_XY]*rot[K_F_YY]+ stress[K_S_XZ]*rot[K_F_YZ];
+ t[4] = stress[K_S_YX]*rot[K_F_YX]+ stress[K_S_YY]*rot[K_F_YY]+ stress[K_S_YZ]*rot[K_F_YZ];
+ t[5] = stress[K_S_ZX]*rot[K_F_YX]+ stress[K_S_ZY]*rot[K_F_YY]+ stress[K_S_ZZ]*rot[K_F_YZ];
+ t[6] = stress[K_S_XX]*rot[K_F_ZX]+ stress[K_S_XY]*rot[K_F_ZY]+ stress[K_S_XZ]*rot[K_F_ZZ];
+ t[7] = stress[K_S_YX]*rot[K_F_ZX]+ stress[K_S_YY]*rot[K_F_ZY]+ stress[K_S_YZ]*rot[K_F_ZZ];
+ t[8] = stress[K_S_ZX]*rot[K_F_ZX]+ stress[K_S_ZY]*rot[K_F_ZY]+ stress[K_S_ZZ]*rot[K_F_ZZ];
+
+ rot_stress[ K_S_XX ] = rot[K_F_XX]*t[0] + rot[K_F_XY]*t[1] + rot[K_F_XZ]*t[2];
+ rot_stress[ K_S_YY ] = rot[K_F_YX]*t[3] + rot[K_F_YY]*t[4] + rot[K_F_YZ]*t[5];
+ rot_stress[ K_S_ZZ ] = rot[K_F_ZX]*t[6] + rot[K_F_ZY]*t[7] + rot[K_F_ZZ]*t[8];
+
+ rot_stress[ K_S_XY ] = rot[K_F_XX]*t[3] + rot[K_F_XY]*t[4] + rot[K_F_XZ]*t[5];
+ rot_stress[ K_S_YZ ] = rot[K_F_YX]*t[6] + rot[K_F_YY]*t[7] + rot[K_F_YZ]*t[8];
+ rot_stress[ K_S_ZX ] = rot[K_F_ZX]*t[0] + rot[K_F_ZY]*t[1] + rot[K_F_ZZ]*t[2];
+ }
+
+ //--------------------------------------------------------------------------
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ KOKKOS_INLINE_FUNCTION static
+ void update_stress( const float dt ,
+ const float two_mu ,
+ const float bulk_modulus ,
+ const ScalarCompact rot_str[] ,
+ ScalarPrecise stress[] )
+ {
+ const ScalarCompact e = rot_str[ K_S_XX ] + rot_str[ K_S_YY ] + rot_str[ K_S_ZZ ] ;
+ const ScalarCompact eb = e * bulk_modulus ;
+ const ScalarCompact e3 = e / 3.0 ;
+
+ stress[K_S_XX] += dt * ( two_mu * ( rot_str[K_S_XX] - e3 ) + eb );
+ stress[K_S_YY] += dt * ( two_mu * ( rot_str[K_S_YY] - e3 ) + eb );
+ stress[K_S_ZZ] += dt * ( two_mu * ( rot_str[K_S_ZZ] - e3 ) + eb );
+
+ stress[K_S_XY] += dt * two_mu * rot_str[K_S_XY];
+ stress[K_S_YZ] += dt * two_mu * rot_str[K_S_YZ];
+ stress[K_S_ZX] += dt * two_mu * rot_str[K_S_ZX];
+ }
+
+ //--------------------------------------------------------------------------
+
+ template< class ScalarPrecise ,
+ class ScalarCompact >
+ static KOKKOS_INLINE_FUNCTION
+ void comp_force( const ScalarPrecise vx[] ,
+ const ScalarPrecise vy[] ,
+ const ScalarPrecise vz[] ,
+ const ScalarCompact grad_x[] ,
+ const ScalarCompact grad_y[] ,
+ const ScalarCompact grad_z[] ,
+ const ScalarCompact total_stress12th[] ,
+ ScalarCompact force[][ SpatialDim ] ,
+ ScalarCompact & energy )
+ {
+ ScalarPrecise internal_energy = 0 ;
+
+ for ( unsigned inode = 0; inode < ElemNodeCount ; ++inode ) {
+
+ force[inode][0] = total_stress12th[K_S_XX] * grad_x[inode] +
+ total_stress12th[K_S_XY] * grad_y[inode] +
+ total_stress12th[K_S_XZ] * grad_z[inode] ;
+
+ force[inode][1] = total_stress12th[K_S_YX] * grad_x[inode] +
+ total_stress12th[K_S_YY] * grad_y[inode] +
+ total_stress12th[K_S_YZ] * grad_z[inode] ;
+
+ force[inode][2] = total_stress12th[K_S_ZX] * grad_x[inode] +
+ total_stress12th[K_S_ZY] * grad_y[inode] +
+ total_stress12th[K_S_ZZ] * grad_z[inode] ;
+
+ internal_energy += force[inode][0] * vx[inode] +
+ force[inode][1] * vy[inode] +
+ force[inode][2] * vz[inode] ;
+ }
+
+ energy = internal_energy ;
+ }
+
+ //--------------------------------------------------------------------------
+};
+
+} // namespace Explicit
+
+#endif /* #ifndef KOKKOS_HEXEXPLICITFUNCTIONS_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/Implicit.hpp b/lib/kokkos/example/multi_fem/Implicit.hpp
new file mode 100644
index 000000000..0017cb8e8
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/Implicit.hpp
@@ -0,0 +1,341 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef HYBRIDFEM_IMPLICIT_HPP
+#define HYBRIDFEM_IMPLICIT_HPP
+
+#include <utility>
+#include <iostream>
+#include <iomanip>
+
+#include <Kokkos_Core.hpp>
+#include <SparseLinearSystem.hpp>
+#include <SparseLinearSystemFill.hpp>
+#include <ImplicitFunctors.hpp>
+#include <FEMesh.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace HybridFEM {
+namespace Implicit {
+
+struct PerformanceData {
+ double mesh_time ;
+ double graph_time ;
+ double elem_time ;
+ double matrix_gather_fill_time ;
+ double matrix_boundary_condition_time ;
+ double cg_iteration_time ;
+
+ PerformanceData()
+ : mesh_time(0)
+ , graph_time(0)
+ , elem_time(0)
+ , matrix_gather_fill_time(0)
+ , matrix_boundary_condition_time(0)
+ , cg_iteration_time(0)
+ {}
+
+ void best( const PerformanceData & rhs )
+ {
+ mesh_time = std::min( mesh_time , rhs.mesh_time );
+ graph_time = std::min( graph_time , rhs.graph_time );
+ elem_time = std::min( elem_time , rhs.elem_time );
+ matrix_gather_fill_time = std::min( matrix_gather_fill_time , rhs.matrix_gather_fill_time );
+ matrix_boundary_condition_time = std::min( matrix_boundary_condition_time , rhs.matrix_boundary_condition_time );
+ cg_iteration_time = std::min( cg_iteration_time , rhs.cg_iteration_time );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class FixtureType >
+PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
+ const int , // global_max_x ,
+ const int , // global_max_y ,
+ const int global_max_z ,
+ const bool print_sample )
+{
+ typedef Scalar scalar_type ;
+ typedef FixtureType fixture_type ;
+ typedef typename fixture_type::execution_space execution_space;
+ //typedef typename execution_space::size_type size_type ; // unused
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+ typedef typename fixture_type::coordinate_scalar_type coordinate_scalar_type ;
+
+ enum { ElementNodeCount = fixture_type::element_node_count };
+
+ const comm::Machine machine = mesh.parallel_data_map.machine ;
+
+ const size_t element_count = mesh.elem_node_ids.dimension_0();
+
+ const size_t iteration_limit = 200 ;
+ const double residual_tolerance = 1e-14 ;
+
+ size_t iteration_count = 0 ;
+ double residual_norm = 0 ;
+
+ PerformanceData perf_data ;
+
+ //------------------------------------
+ // Sparse linear system types:
+
+ typedef Kokkos::View< scalar_type* , execution_space > vector_type ;
+ typedef Kokkos::CrsMatrix< scalar_type , execution_space > matrix_type ;
+ typedef typename matrix_type::graph_type matrix_graph_type ;
+ typedef typename matrix_type::coefficients_type matrix_coefficients_type ;
+
+ typedef GraphFactory< matrix_graph_type , mesh_type > graph_factory ;
+
+ //------------------------------------
+ // Problem setup types:
+
+ typedef ElementComputation< scalar_type , scalar_type , execution_space > ElementFunctor ;
+ typedef DirichletBoundary< scalar_type , scalar_type , execution_space > BoundaryFunctor ;
+
+ typedef typename ElementFunctor::elem_matrices_type elem_matrices_type ;
+ typedef typename ElementFunctor::elem_vectors_type elem_vectors_type ;
+
+ typedef GatherFill< matrix_type ,
+ mesh_type ,
+ elem_matrices_type ,
+ elem_vectors_type > GatherFillFunctor ;
+
+ //------------------------------------
+
+ const scalar_type elem_coeff_K = 2 ;
+ const scalar_type elem_load_Q = 1 ;
+
+ matrix_type linsys_matrix ;
+ vector_type linsys_rhs ;
+ vector_type linsys_solution ;
+
+ typename graph_factory::element_map_type element_map ;
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ //------------------------------------
+ // Generate sparse matrix graph and element->graph map.
+
+ graph_factory::create( mesh , linsys_matrix.graph , element_map );
+
+ execution_space::fence();
+ perf_data.graph_time = comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------
+ // Allocate linear system coefficients and rhs:
+
+ const size_t local_owned_length =
+ linsys_matrix.graph.row_map.dimension_0() - 1 ;
+
+ linsys_matrix.coefficients =
+ matrix_coefficients_type( "coeff" , linsys_matrix.graph.entries.dimension_0() );
+
+ linsys_rhs = vector_type( "rhs" , local_owned_length );
+ linsys_solution = vector_type( "solution" , local_owned_length );
+
+ //------------------------------------
+ // Fill linear system
+ {
+ elem_matrices_type elem_matrices ;
+ elem_vectors_type elem_vectors ;
+
+ if ( element_count ) {
+ elem_matrices = elem_matrices_type( std::string("elem_matrices"), element_count );
+ elem_vectors = elem_vectors_type ( std::string("elem_vectors"), element_count );
+ }
+
+ //------------------------------------
+ // Compute element matrices and vectors:
+
+ wall_clock.reset();
+
+ ElementFunctor::apply( mesh ,
+ elem_matrices , elem_vectors ,
+ elem_coeff_K , elem_load_Q );
+
+ execution_space::fence();
+ perf_data.elem_time = comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------
+ // Fill linear system coefficients:
+
+ wall_clock.reset();
+
+ GatherFillFunctor::apply( linsys_matrix , linsys_rhs ,
+ mesh , element_map , elem_matrices , elem_vectors );
+
+ execution_space::fence();
+ perf_data.matrix_gather_fill_time = comm::max( machine , wall_clock.seconds() );
+
+ // Apply boundary conditions:
+
+ wall_clock.reset();
+
+ BoundaryFunctor::apply( linsys_matrix , linsys_rhs , mesh ,
+ 0 , global_max_z , 0 , global_max_z );
+
+ execution_space::fence();
+ perf_data.matrix_boundary_condition_time = comm::max( machine , wall_clock.seconds() );
+ }
+
+ //------------------------------------
+ // Solve linear sytem
+
+ cgsolve( mesh.parallel_data_map ,
+ linsys_matrix , linsys_rhs , linsys_solution ,
+ iteration_count , residual_norm ,
+ perf_data.cg_iteration_time ,
+ iteration_limit , residual_tolerance );
+
+ //------------------------------------
+
+ if ( print_sample ) {
+
+ typename mesh_type::node_coords_type::HostMirror coords_h =
+ Kokkos::create_mirror( mesh.node_coords );
+
+ typename vector_type::HostMirror X_h =
+ Kokkos::create_mirror( linsys_solution );
+
+ Kokkos::deep_copy( coords_h , mesh.node_coords );
+ Kokkos::deep_copy( X_h , linsys_solution );
+
+ for ( size_t i = 0 ; i < mesh.parallel_data_map.count_owned ; ++i ) {
+ const coordinate_scalar_type x = coords_h(i,0);
+ const coordinate_scalar_type y = coords_h(i,1);
+ const coordinate_scalar_type z = coords_h(i,2);
+
+ if ( x <= 0 && y <= 0 ) {
+ std::cout << " node( " << x << " " << y << " " << z << " ) = "
+ << X_h(i) << std::endl ;
+ }
+ }
+ }
+
+ return perf_data ;
+}
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class Device >
+void driver( const char * const label ,
+ comm::Machine machine ,
+ const int gang_count ,
+ const int elem_count_beg ,
+ const int elem_count_end ,
+ const int runs )
+{
+ typedef Scalar scalar_type ;
+ typedef Device execution_space ;
+ typedef double coordinate_scalar_type ;
+ typedef FixtureElementHex8 fixture_element_type ;
+
+ typedef BoxMeshFixture< coordinate_scalar_type ,
+ execution_space ,
+ fixture_element_type > fixture_type ;
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+
+ const size_t proc_count = comm::size( machine );
+ const size_t proc_rank = comm::rank( machine );
+
+ if ( elem_count_beg == 0 || elem_count_end == 0 || runs == 0 ) return ;
+
+ if ( comm::rank( machine ) == 0 ) {
+ std::cout << std::endl ;
+ std::cout << "\"Kokkos::HybridFE::Implicit " << label << "\"" << std::endl;
+ std::cout << "\"Size\" , \"Graphing\" , \"Element\" , \"Fill\" , \"Boundary\" , \"CG-Iter\"" << std::endl
+ << "\"elems\" , \"millisec\" , \"millisec\" , \"millisec\" , \"millisec\" , \"millisec\"" << std::endl ;
+ }
+
+ for(int i = elem_count_beg ; i < elem_count_end ; i *= 2 )
+ {
+ const int ix = std::max( 1 , (int) cbrt( ((double) i) / 2.0 ) );
+ const int iy = ix + 1 ;
+ const int iz = 2 * iy ;
+ const int n = ix * iy * iz ;
+
+ mesh_type mesh =
+ fixture_type::create( proc_count , proc_rank , gang_count ,
+ ix , iy , iz );
+
+ mesh.parallel_data_map.machine = machine ;
+
+ PerformanceData perf_data , perf_best ;
+
+ for(int j = 0; j < runs; j++){
+
+ perf_data = run<scalar_type,fixture_type>(mesh,ix,iy,iz, false );
+
+ if( j == 0 ) {
+ perf_best = perf_data ;
+ }
+ else {
+ perf_best.best( perf_data );
+ }
+ }
+
+ if ( comm::rank( machine ) == 0 ) {
+
+ std::cout << std::setw(8) << n << " , "
+ << std::setw(10) << perf_best.graph_time * 1000 << " , "
+ << std::setw(10) << perf_best.elem_time * 1000 << " , "
+ << std::setw(10) << perf_best.matrix_gather_fill_time * 1000 << " , "
+ << std::setw(10) << perf_best.matrix_boundary_condition_time * 1000 << " , "
+ << std::setw(10) << perf_best.cg_iteration_time * 1000
+ << std::endl ;
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+
+} /* namespace Implicit */
+} /* namespace HybridFEM */
+
+
+#endif /* #ifndef HYBRIDFEM_IMPLICIT_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/ImplicitFunctors.hpp b/lib/kokkos/example/multi_fem/ImplicitFunctors.hpp
new file mode 100644
index 000000000..9d9aa7716
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/ImplicitFunctors.hpp
@@ -0,0 +1,585 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
+
+namespace HybridFEM {
+namespace Implicit {
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , unsigned Dim , unsigned N >
+struct TensorIntegration ;
+
+template<typename Scalar >
+struct TensorIntegration<Scalar,1,1> {
+ Scalar pts[1] ;
+ Scalar wts[1] ;
+
+ TensorIntegration() { pts[0] = 0 ; wts[0] = 2 ; }
+};
+
+template<typename Scalar >
+struct TensorIntegration<Scalar,1,2>
+{
+ Scalar pts[2] ;
+ Scalar wts[2] ;
+
+ TensorIntegration()
+ {
+ const Scalar x2 = 0.577350269 ;
+ pts[0] = -x2; wts[0] = 1.0;
+ pts[1] = x2; wts[1] = 1.0;
+ }
+};
+
+template<typename Scalar >
+struct TensorIntegration<Scalar,1,3>
+{
+ Scalar pts[3] ;
+ Scalar wts[3] ;
+
+ TensorIntegration()
+ {
+ const Scalar x3 = 0.774596669 ;
+ const Scalar w1 = 0.555555556 ;
+ const Scalar w2 = 0.888888889 ;
+ pts[0] = -x3 ; wts[0] = w1 ;
+ pts[1] = 0 ; wts[1] = w2 ;
+ pts[2] = x3 ; wts[2] = w1 ;
+ }
+};
+
+template< typename Scalar , unsigned Order >
+struct TensorIntegration<Scalar,3,Order>
+{
+ static const unsigned N = Order * Order * Order ;
+
+ Scalar pts[N][3] ;
+ Scalar wts[N];
+
+ TensorIntegration()
+ {
+ TensorIntegration<Scalar,1,Order> oneD ;
+
+ unsigned n = 0 ;
+ for ( unsigned k = 0 ; k < Order ; ++k ) {
+ for ( unsigned j = 0 ; j < Order ; ++j ) {
+ for ( unsigned i = 0 ; i < Order ; ++i , ++n ) {
+ pts[n][0] = oneD.pts[i] ;
+ pts[n][1] = oneD.pts[j] ;
+ pts[n][2] = oneD.pts[k] ;
+ wts[n] = oneD.wts[i] * oneD.wts[j] * oneD.wts[k] ;
+ }}}
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar >
+struct ShapeFunctionEvaluation {
+
+ static const unsigned FunctionCount = 8 ;
+ static const unsigned SpatialDimension = 3 ;
+ static const unsigned IntegrationOrder = 2 ;
+
+ typedef TensorIntegration< Scalar , SpatialDimension , IntegrationOrder >
+ TensorIntegrationType ;
+
+ static const unsigned PointCount = TensorIntegrationType::N ;
+
+ Scalar value [ PointCount ][ FunctionCount ] ;
+ Scalar gradient[ PointCount ][ FunctionCount * SpatialDimension ];
+ Scalar weight [ PointCount ];
+
+ ShapeFunctionEvaluation()
+ {
+ const TensorIntegration< Scalar , SpatialDimension , IntegrationOrder >
+ integration ;
+
+ const Scalar ONE8TH = 0.125 ;
+
+ for ( unsigned i = 0 ; i < PointCount ; ++i ) {
+
+ const Scalar u = 1.0 - integration.pts[i][0];
+ const Scalar v = 1.0 - integration.pts[i][1];
+ const Scalar w = 1.0 - integration.pts[i][2];
+
+ const Scalar up1 = 1.0 + integration.pts[i][0];
+ const Scalar vp1 = 1.0 + integration.pts[i][1];
+ const Scalar wp1 = 1.0 + integration.pts[i][2];
+
+ weight[i] = integration.wts[i] ;
+
+ // Vaues:
+ value[i][0] = ONE8TH * u * v * w ;
+ value[i][1] = ONE8TH * up1 * v * w ;
+ value[i][2] = ONE8TH * up1 * vp1 * w ;
+ value[i][3] = ONE8TH * u * vp1 * w ;
+
+ value[i][4] = ONE8TH * u * v * wp1 ;
+ value[i][5] = ONE8TH * up1 * v * wp1 ;
+ value[i][6] = ONE8TH * up1 * vp1 * wp1 ;
+ value[i][7] = ONE8TH * u * vp1 * wp1 ;
+
+ //fn 0 = u * v * w
+ gradient[i][ 0] = ONE8TH * -1 * v * w ;
+ gradient[i][ 1] = ONE8TH * u * -1 * w ;
+ gradient[i][ 2] = ONE8TH * u * v * -1 ;
+
+ //fn 1 = up1 * v * w
+ gradient[i][ 3] = ONE8TH * 1 * v * w ;
+ gradient[i][ 4] = ONE8TH * up1 * -1 * w ;
+ gradient[i][ 5] = ONE8TH * up1 * v * -1 ;
+
+ //fn 2 = up1 * vp1 * w
+ gradient[i][ 6] = ONE8TH * 1 * vp1 * w ;
+ gradient[i][ 7] = ONE8TH * up1 * 1 * w ;
+ gradient[i][ 8] = ONE8TH * up1 * vp1 * -1 ;
+
+ //fn 3 = u * vp1 * w
+ gradient[i][ 9] = ONE8TH * -1 * vp1 * w ;
+ gradient[i][10] = ONE8TH * u * 1 * w ;
+ gradient[i][11] = ONE8TH * u * vp1 * -1 ;
+
+ //fn 4 = u * v * wp1
+ gradient[i][12] = ONE8TH * -1 * v * wp1 ;
+ gradient[i][13] = ONE8TH * u * -1 * wp1 ;
+ gradient[i][14] = ONE8TH * u * v * 1 ;
+
+ //fn 5 = up1 * v * wp1
+ gradient[i][15] = ONE8TH * 1 * v * wp1 ;
+ gradient[i][16] = ONE8TH * up1 * -1 * wp1 ;
+ gradient[i][17] = ONE8TH * up1 * v * 1 ;
+
+ //fn 6 = up1 * vp1 * wp1
+ gradient[i][18] = ONE8TH * 1 * vp1 * wp1 ;
+ gradient[i][19] = ONE8TH * up1 * 1 * wp1 ;
+ gradient[i][20] = ONE8TH * up1 * vp1 * 1 ;
+
+ //fn 7 = u * vp1 * wp1
+ gradient[i][21] = ONE8TH * -1 * vp1 * wp1 ;
+ gradient[i][22] = ONE8TH * u * 1 * wp1 ;
+ gradient[i][23] = ONE8TH * u * vp1 * 1 ;
+ }
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarType , typename ScalarCoordType , class DeviceType >
+struct ElementComputation
+{
+ typedef DeviceType execution_space;
+ typedef ScalarType scalar_type ;
+ typedef typename execution_space::size_type size_type ;
+
+ static const size_type ElementNodeCount = 8 ;
+
+ typedef FEMesh< ScalarCoordType , ElementNodeCount , execution_space > mesh_type ;
+ typedef Kokkos::View< scalar_type[][ElementNodeCount][ElementNodeCount] , execution_space > elem_matrices_type ;
+ typedef Kokkos::View< scalar_type[][ElementNodeCount] , execution_space > elem_vectors_type ;
+
+ typedef ShapeFunctionEvaluation< scalar_type > shape_function_data ;
+
+ static const unsigned SpatialDim = shape_function_data::SpatialDimension ;
+ static const unsigned FunctionCount = shape_function_data::FunctionCount ;
+
+private:
+
+ const shape_function_data shape_eval ;
+ typename mesh_type::elem_node_ids_type elem_node_ids ;
+ typename mesh_type::node_coords_type node_coords ;
+ elem_matrices_type element_matrices ;
+ elem_vectors_type element_vectors ;
+ scalar_type coeff_K ;
+ scalar_type coeff_Q ;
+
+ ElementComputation( const mesh_type & arg_mesh ,
+ const elem_matrices_type & arg_element_matrices ,
+ const elem_vectors_type & arg_element_vectors ,
+ const scalar_type arg_coeff_K ,
+ const scalar_type arg_coeff_Q )
+ : shape_eval()
+ , elem_node_ids( arg_mesh.elem_node_ids )
+ , node_coords( arg_mesh.node_coords )
+ , element_matrices( arg_element_matrices )
+ , element_vectors( arg_element_vectors )
+ , coeff_K( arg_coeff_K )
+ , coeff_Q( arg_coeff_Q )
+ {}
+
+public:
+
+ static void apply( const mesh_type & mesh ,
+ const elem_matrices_type & elem_matrices ,
+ const elem_vectors_type & elem_vectors ,
+ const scalar_type elem_coeff_K ,
+ const scalar_type elem_coeff_Q )
+ {
+ ElementComputation comp( mesh , elem_matrices , elem_vectors , elem_coeff_K , elem_coeff_Q );
+ const size_t elem_count = mesh.elem_node_ids.dimension_0();
+
+ parallel_for( elem_count , comp );
+ }
+
+ //------------------------------------
+
+ static const unsigned FLOPS_jacobian =
+ FunctionCount * SpatialDim * SpatialDim * 2 ;
+
+ KOKKOS_INLINE_FUNCTION
+ void jacobian( const ScalarCoordType * x,
+ const ScalarCoordType * y,
+ const ScalarCoordType * z,
+ const scalar_type * grad_vals,
+ scalar_type * J) const
+ {
+ int i_grad = 0 ;
+
+ for( unsigned i = 0; i < ElementNodeCount ; ++i , i_grad += SpatialDim ) {
+ const scalar_type g0 = grad_vals[ i_grad ];
+ const scalar_type g1 = grad_vals[ i_grad + 1 ];
+ const scalar_type g2 = grad_vals[ i_grad + 2 ];
+ const scalar_type x0 = x[i] ;
+ const scalar_type x1 = y[i] ;
+ const scalar_type x2 = z[i] ;
+
+ J[0] += g0 * x0 ;
+ J[1] += g0 * x1 ;
+ J[2] += g0 * x2 ;
+
+ J[3] += g1 * x0 ;
+ J[4] += g1 * x1 ;
+ J[5] += g1 * x2 ;
+
+ J[6] += g2 * x0 ;
+ J[7] += g2 * x1 ;
+ J[8] += g2 * x2 ;
+ }
+ }
+
+ //------------------------------------
+
+ static const unsigned FLOPS_inverse_and_det = 46 ;
+
+ KOKKOS_INLINE_FUNCTION
+ scalar_type inverse_and_determinant3x3( scalar_type * const J ) const
+ {
+ const scalar_type J00 = J[0];
+ const scalar_type J01 = J[1];
+ const scalar_type J02 = J[2];
+
+ const scalar_type J10 = J[3];
+ const scalar_type J11 = J[4];
+ const scalar_type J12 = J[5];
+
+ const scalar_type J20 = J[6];
+ const scalar_type J21 = J[7];
+ const scalar_type J22 = J[8];
+
+ const scalar_type term0 = J22*J11 - J21*J12;
+ const scalar_type term1 = J22*J01 - J21*J02;
+ const scalar_type term2 = J12*J01 - J11*J02;
+
+ const scalar_type detJ = J00*term0 - J10*term1 + J20*term2;
+ const scalar_type inv_detJ = 1.0/detJ;
+
+ J[0] = term0*inv_detJ;
+ J[1] = -term1*inv_detJ;
+ J[2] = term2*inv_detJ;
+
+ J[3] = -(J22*J10 - J20*J12)*inv_detJ;
+ J[4] = (J22*J00 - J20*J02)*inv_detJ;
+ J[5] = -(J12*J00 - J10*J02)*inv_detJ;
+
+ J[6] = (J21*J10 - J20*J11)*inv_detJ;
+ J[7] = -(J21*J00 - J20*J01)*inv_detJ;
+ J[8] = (J11*J00 - J10*J01)*inv_detJ;
+
+ return detJ ;
+ }
+
+ //------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void matTransMat3x3_X_3xn( const scalar_type * A, int n,
+ const scalar_type * B,
+ scalar_type * C ) const
+ {
+ //A is 3x3, B is 3xn. So C is also 3xn.
+ //A,B,C are all assumed to be ordered such that columns are contiguous.
+
+ scalar_type * Cj = C;
+ const scalar_type * Bj = B;
+
+ for(int j=0; j<n; ++j) {
+ Cj[0] = A[0]*Bj[0] + A[1]*Bj[1] + A[2]*Bj[2];
+ Cj[1] = A[3]*Bj[0] + A[4]*Bj[1] + A[5]*Bj[2];
+ Cj[2] = A[6]*Bj[0] + A[7]*Bj[1] + A[8]*Bj[2];
+ Bj += 3;
+ Cj += 3;
+ }
+
+ }
+ //------------------------------------
+
+ static const unsigned FLOPS_contributeDiffusionMatrix = FunctionCount * ( 3 * 5 + FunctionCount * 7 ) ;
+
+ KOKKOS_INLINE_FUNCTION
+ void contributeDiffusionMatrix(
+ const scalar_type weight ,
+ const scalar_type grad_vals[] ,
+ const scalar_type invJ[] ,
+ scalar_type elem_mat[][8] ) const
+ {
+ scalar_type dpsidx[8], dpsidy[8], dpsidz[8];
+
+ int i_grad = 0 ;
+ for( unsigned i = 0; i < FunctionCount ; ++i , i_grad += 3 ) {
+ const scalar_type g0 = grad_vals[i_grad+0];
+ const scalar_type g1 = grad_vals[i_grad+1];
+ const scalar_type g2 = grad_vals[i_grad+2];
+
+ dpsidx[i] = g0 * invJ[0] + g1 * invJ[1] + g2 * invJ[2];
+ dpsidy[i] = g0 * invJ[3] + g1 * invJ[4] + g2 * invJ[5];
+ dpsidz[i] = g0 * invJ[6] + g1 * invJ[7] + g2 * invJ[8];
+ }
+
+ for( unsigned m = 0; m < FunctionCount; m++) {
+ for( unsigned n = 0; n < FunctionCount; n++) {
+
+ elem_mat[m][n] += weight *
+ ((dpsidx[m] * dpsidx[n]) +
+ (dpsidy[m] * dpsidy[n]) +
+ (dpsidz[m] * dpsidz[n]));
+ }
+ }
+ }
+
+ //------------------------------------
+
+ static const unsigned FLOPS_contributeSourceVector = FunctionCount * 2 ;
+
+ KOKKOS_INLINE_FUNCTION
+ void contributeSourceVector( const scalar_type term ,
+ const scalar_type psi[] ,
+ scalar_type elem_vec[] ) const
+ {
+ for( unsigned i=0; i< FunctionCount ; ++i) {
+ elem_vec[i] += psi[i] * term ;
+ }
+ }
+
+
+ static const unsigned FLOPS_operator =
+ shape_function_data::PointCount * ( 3
+ + FLOPS_jacobian
+ + FLOPS_inverse_and_det
+ + FLOPS_contributeDiffusionMatrix
+ + FLOPS_contributeSourceVector ) ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( int ielem )const {
+
+ scalar_type elem_vec[8] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
+ scalar_type elem_mat[8][8] =
+ { { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } ,
+ { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 } };
+
+ ScalarCoordType x[8], y[8], z[8];
+
+ for ( int i = 0 ; i < 8 ; ++i ) {
+ const int node_index = elem_node_ids( ielem , i );
+ x[i] = node_coords( node_index , 0 );
+ y[i] = node_coords( node_index , 1 );
+ z[i] = node_coords( node_index , 2 );
+ }
+
+ // This loop could be parallelized; however,
+ // it would require additional per-thread temporaries
+ // of 'elem_vec' and 'elem_mat' which would
+ // consume more local memory and have to be reduced.
+
+ for ( unsigned i = 0 ; i < shape_function_data::PointCount ; ++i ) {
+
+ scalar_type J[SpatialDim*SpatialDim] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ jacobian( x, y, z, shape_eval.gradient[i] , J );
+
+ // Overwrite J with its inverse to save scratch memory space.
+ const scalar_type detJ_w = shape_eval.weight[i] * inverse_and_determinant3x3(J);
+ const scalar_type k_detJ_w = coeff_K * detJ_w ;
+ const scalar_type Q_detJ_w = coeff_Q * detJ_w ;
+
+ contributeDiffusionMatrix( k_detJ_w , shape_eval.gradient[i] , J , elem_mat );
+
+ contributeSourceVector( Q_detJ_w , shape_eval.value[i] , elem_vec );
+ }
+
+ for( size_type i=0; i< ElementNodeCount ; ++i) {
+ element_vectors(ielem, i) = elem_vec[i] ;
+ }
+
+ for( size_type i = 0; i < ElementNodeCount ; i++){
+ for( size_type j = 0; j < ElementNodeCount ; j++){
+ element_matrices(ielem, i, j) = elem_mat[i][j] ;
+ }
+ }
+ }
+}; /* ElementComputation */
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarType , typename ScalarCoordType , class DeviceType >
+struct DirichletBoundary
+{
+ typedef DeviceType execution_space;
+ typedef typename execution_space::size_type size_type ;
+
+ static const size_type ElementNodeCount = 8 ;
+
+ typedef Kokkos::CrsMatrix< ScalarType , execution_space > matrix_type ;
+ typedef Kokkos::View< ScalarType[] , execution_space > vector_type ;
+
+ typedef FEMesh< ScalarCoordType , ElementNodeCount , execution_space > mesh_type ;
+
+ typename mesh_type::node_coords_type node_coords ;
+ matrix_type matrix ;
+ vector_type rhs ;
+ ScalarCoordType bc_lower_z ;
+ ScalarCoordType bc_upper_z ;
+ ScalarType bc_lower_value ;
+ ScalarType bc_upper_value ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( size_type inode ) const
+ {
+ // Apply a dirichlet boundary condition to 'irow'
+ // to maintain the symmetry of the original
+ // global stiffness matrix, zero out the columns
+ // that correspond to boundary conditions, and
+ // adjust the load vector accordingly
+
+ const size_type iBeg = matrix.graph.row_map[inode];
+ const size_type iEnd = matrix.graph.row_map[inode+1];
+
+ const ScalarCoordType z = node_coords(inode,2);
+ const bool bc_lower = z <= bc_lower_z ;
+ const bool bc_upper = bc_upper_z <= z ;
+
+ if ( bc_lower || bc_upper ) {
+ const ScalarType bc_value = bc_lower ? bc_lower_value
+ : bc_upper_value ;
+
+ rhs(inode) = bc_value ; // set the rhs vector
+
+ // zero each value on the row, and leave a one
+ // on the diagonal
+
+ for( size_type i = iBeg ; i < iEnd ; i++) {
+ matrix.coefficients(i) =
+ (int) inode == matrix.graph.entries(i) ? 1 : 0 ;
+ }
+ }
+ else {
+ // Find any columns that are boundary conditions.
+ // Clear them and adjust the load vector
+
+ for( size_type i = iBeg ; i < iEnd ; i++ ) {
+ const size_type cnode = matrix.graph.entries(i) ;
+
+ const ScalarCoordType zc = node_coords(cnode,2);
+ const bool c_bc_lower = zc <= bc_lower_z ;
+ const bool c_bc_upper = bc_upper_z <= zc ;
+
+ if ( c_bc_lower || c_bc_upper ) {
+
+ const ScalarType c_bc_value = c_bc_lower ? bc_lower_value
+ : bc_upper_value ;
+
+ rhs( inode ) -= c_bc_value * matrix.coefficients(i);
+
+ matrix.coefficients(i) = 0 ;
+ }
+ }
+ }
+ }
+
+
+ static void apply( const matrix_type & linsys_matrix ,
+ const vector_type & linsys_rhs ,
+ const mesh_type & mesh ,
+ const ScalarCoordType bc_lower_z ,
+ const ScalarCoordType bc_upper_z ,
+ const ScalarType bc_lower_value ,
+ const ScalarType bc_upper_value )
+ {
+ const size_t row_count = linsys_matrix.graph.row_map.dimension_0() - 1 ;
+ DirichletBoundary op ;
+ op.node_coords = mesh.node_coords ;
+ op.matrix = linsys_matrix ;
+ op.rhs = linsys_rhs ;
+ op.bc_lower_z = bc_lower_z ;
+ op.bc_upper_z = bc_upper_z ;
+ op.bc_lower_value = bc_lower_value ;
+ op.bc_upper_value = bc_upper_value ;
+ parallel_for( row_count , op );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+} /* namespace Implicit */
+} /* namespace HybridFEM */
+
diff --git a/lib/kokkos/example/multi_fem/LinAlgBLAS.hpp b/lib/kokkos/example/multi_fem/LinAlgBLAS.hpp
new file mode 100644
index 000000000..2478fa9ae
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/LinAlgBLAS.hpp
@@ -0,0 +1,567 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef USESCASES_LINALG_BLAS_HPP
+#define USESCASES_LINALG_BLAS_HPP
+
+#include <cmath>
+#include <utility>
+#include <ParallelComm.hpp>
+#include <Kokkos_Core.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< class Scalar , class Layout , class DeviceType > struct Dot ;
+
+template< class Scalar , class Layout , class DeviceType > struct Dot1 ;
+
+template< typename ScalarA ,
+ typename ScalarY ,
+ class Layout , class Device >
+struct Scale ;
+
+template< typename ScalarA ,
+ typename ScalarY ,
+ class Layout , class Device >
+struct Fill ;
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarY ,
+ class Layout , class Device >
+struct AXPY ;
+
+template< typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarY ,
+ class Layout , class Device >
+struct XPBY ;
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarY ,
+ typename ScalarW ,
+ class Layout , class Device >
+struct WAXPBY ;
+
+}
+}
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+//----------------------------------------------------------------------------
+
+#if defined( KOKKOS_HAVE_MPI )
+
+template< typename ScalarX /* Allow mix of const and non-const */ ,
+ typename ScalarY /* Allow mix of const and non-const */ ,
+ class L , class D ,
+ class MX /* Allow any management type */ ,
+ class MY /* Allow any management type */ >
+inline
+double dot( const size_t n ,
+ const View< ScalarX * , L , D , MX > & x ,
+ const View< ScalarY * , L , D , MY > & y ,
+ comm::Machine machine )
+{
+ double global_result = 0 ;
+ double local_result = 0 ;
+
+ Impl::Dot< ScalarX , L , D >( n , x , y , local_result );
+
+ MPI_Allreduce( & local_result , & global_result , 1 ,
+ MPI_DOUBLE , MPI_SUM , machine.mpi_comm );
+
+ return global_result ;
+}
+
+#else
+
+template< typename ScalarX /* Allow mix of const and non-const */ ,
+ typename ScalarY /* Allow mix of const and non-const */ ,
+ class L , class D ,
+ class MX /* Allow any management type */ ,
+ class MY /* Allow any management type */ >
+inline
+double dot( const size_t n ,
+ const View< ScalarX * , L , D , MX > & x ,
+ const View< ScalarY * , L , D , MY > & y ,
+ comm::Machine )
+{
+ double global_result = 0 ;
+
+ Impl::Dot< ScalarX , L , D >( n , x , y , global_result );
+
+ return global_result ;
+}
+
+#endif
+
+//----------------------------------------------------------------------------
+
+#if defined( KOKKOS_HAVE_MPI )
+
+template< typename ScalarX /* Allow mix of const and non-const */ ,
+ class L , class D ,
+ class MX /* Allow any management type */ >
+inline
+double dot( const size_t n ,
+ const View< ScalarX * , L , D , MX > & x ,
+ comm::Machine machine )
+{
+ double global_result = 0 ;
+ double local_result = 0 ;
+
+ Impl::Dot1< ScalarX , L , D >( n , x , local_result );
+
+ MPI_Allreduce( & local_result , & global_result , 1 ,
+ MPI_DOUBLE , MPI_SUM , machine.mpi_comm );
+
+ return global_result ;
+}
+
+#else
+
+template< typename ScalarX /* Allow mix of const and non-const */ ,
+ class L , class D ,
+ class MX /* Allow any management type */ >
+inline
+double dot( const size_t n ,
+ const View< ScalarX * , L , D , MX > & x ,
+ comm::Machine )
+{
+ double global_result = 0 ;
+
+ Impl::Dot1< ScalarX , L , D >( n , x , global_result );
+
+ return global_result ;
+}
+
+#endif
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarX /* Allow mix of const and non-const */ ,
+ class L , class D ,
+ class MX /* Allow any management type */ >
+inline
+double norm2( const size_t n ,
+ const View< ScalarX * , L , D , MX > & x ,
+ comm::Machine machine )
+{
+ return std::sqrt( dot( n , x , machine ) );
+}
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ class L ,
+ class D ,
+ class MX >
+void scale( const size_t n ,
+ const ScalarA & alpha ,
+ const View< ScalarX * , L , D , MX > & x )
+{
+ Impl::Scale< ScalarA , ScalarX , L , D >( n , alpha , x );
+}
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ class L ,
+ class D ,
+ class MX >
+void fill( const size_t n ,
+ const ScalarA & alpha ,
+ const View< ScalarX * , L , D , MX > & x )
+{
+ Impl::Fill< ScalarA , ScalarX , L , D >( n , alpha , x );
+}
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarY ,
+ class L ,
+ class D ,
+ class MX ,
+ class MY >
+void axpy( const size_t n ,
+ const ScalarA & alpha ,
+ const View< ScalarX *, L , D , MX > & x ,
+ const View< ScalarY *, L , D , MY > & y )
+{
+ Impl::AXPY< ScalarA, ScalarX, ScalarY , L , D >( n, alpha, x, y );
+}
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarY ,
+ class L ,
+ class D ,
+ class MX ,
+ class MY >
+void xpby( const size_t n ,
+ const View< ScalarX *, L , D , MX > & x ,
+ const ScalarB & beta ,
+ const View< ScalarY *, L , D , MY > & y )
+{
+ Impl::XPBY< ScalarX, ScalarB, ScalarY , L , D >( n, x, beta, y );
+}
+
+//----------------------------------------------------------------------------
+// w = alpha * x + beta * y
+
+template< typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarY ,
+ typename ScalarW ,
+ class L , class D ,
+ class MX , class MY , class MW >
+void waxpby( const size_t n ,
+ const ScalarA & alpha ,
+ const View< ScalarX * , L , D , MX > & x ,
+ const ScalarB & beta ,
+ const View< ScalarY * , L , D , MY > & y ,
+ const View< ScalarW * , L , D , MW > & w )
+{
+ Impl::WAXPBY<ScalarA,ScalarX,ScalarB,ScalarY,ScalarW,L,D>
+ ( n , alpha , x , beta , y , w );
+}
+
+}
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< typename Scalar , class L , class D >
+struct Dot
+{
+private:
+
+ typedef View< const Scalar*, L, D, MemoryUnmanaged > vector_const_type ;
+
+ const vector_const_type x ;
+ const vector_const_type y ;
+
+public:
+
+ typedef typename vector_const_type::execution_space execution_space ; // Manycore device
+ typedef double value_type ; // Reduction value
+
+ template< class ArgX , class ArgY >
+ inline
+ Dot( const size_t n , const ArgX & arg_x , const ArgY & arg_y , double & result )
+ : x( arg_x ), y( arg_y )
+ {
+ parallel_reduce( n , *this , result );
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i , value_type & update ) const
+ { update += x(i) * y(i); }
+
+ KOKKOS_INLINE_FUNCTION
+ static void join( volatile value_type & update ,
+ const volatile value_type & source )
+ { update += source; }
+
+ KOKKOS_INLINE_FUNCTION
+ static void init( value_type & update )
+ { update = 0 ; }
+}; // Dot
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class L , class D >
+struct Dot1
+{
+private:
+
+ typedef View< const Scalar*, L, D , MemoryUnmanaged > vector_const_type ;
+
+ const vector_const_type x ;
+
+public:
+
+ typedef typename vector_const_type::execution_space execution_space ; // Manycore device
+ typedef double value_type ; // Reduction value
+
+ template< class ArgX >
+ inline
+ Dot1( const size_t n , const ArgX & arg_x , double & result )
+ : x( arg_x )
+ {
+ parallel_reduce( n , *this , result );
+ }
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i , value_type & update ) const
+ { update += x(i) * x(i) ; }
+
+ KOKKOS_INLINE_FUNCTION
+ static void join( volatile value_type & update ,
+ const volatile value_type & source )
+ { update += source ; }
+
+ KOKKOS_INLINE_FUNCTION
+ static void init( value_type & update )
+ { update = 0 ; }
+}; // Dot
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template < typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarY ,
+ typename ScalarW ,
+ class L , class D >
+struct WAXPBY
+{
+private:
+
+ typedef View< ScalarW *, L , D , MemoryUnmanaged > ViewW ;
+ typedef View< const ScalarX *, L , D , MemoryUnmanaged > ViewX ;
+ typedef View< const ScalarY *, L , D , MemoryUnmanaged > ViewY ;
+
+ const ViewW w ;
+ const ViewX x ;
+ const ViewY y ;
+ const ScalarA alpha ;
+ const ScalarB beta ;
+
+public:
+
+ typedef typename ViewW::execution_space execution_space ;
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType inode ) const
+ {
+ w(inode) = alpha * x(inode) + beta * y(inode);
+ }
+
+ template< class ArgX , class ArgY , class ArgW >
+ inline
+ WAXPBY( const size_t n ,
+ const ScalarA & arg_alpha ,
+ const ArgX & arg_x ,
+ const ScalarB & arg_beta ,
+ const ArgY & arg_y ,
+ const ArgW & arg_w )
+ : w( arg_w ), x( arg_x ), y( arg_y )
+ , alpha( arg_alpha ), beta( arg_beta )
+ {
+ parallel_for( n , *this );
+ }
+}; // WAXPBY
+
+//----------------------------------------------------------------------------
+
+template < typename ScalarB ,
+ typename ScalarW ,
+ class L , class D >
+struct Scale
+{
+private:
+
+ typedef View< ScalarW *, L , D , MemoryUnmanaged > ViewW ;
+ const ViewW w ;
+ const ScalarB beta ;
+
+public:
+
+ typedef typename ViewW::execution_space execution_space ;
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i ) const
+ { w(i) *= beta ; }
+
+ template< class ArgW >
+ inline
+ Scale( const size_t n , const ScalarB & arg_beta , const ArgW & arg_w )
+ : w( arg_w )
+ , beta( arg_beta )
+ {
+ parallel_for( n , *this );
+ }
+};
+
+template < typename ScalarB ,
+ typename ScalarW ,
+ class L , class D >
+struct Fill
+{
+private:
+
+ typedef View< ScalarW *, L , D , MemoryUnmanaged > ViewW ;
+ const ViewW w ;
+ const ScalarB beta ;
+
+public:
+
+ typedef typename ViewW::execution_space execution_space ;
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i ) const
+ { w(i) = beta ; }
+
+ template< class ArgW >
+ inline
+ Fill( const size_t n , const ScalarB & arg_beta , const ArgW & arg_w )
+ : w( arg_w )
+ , beta( arg_beta )
+ {
+ parallel_for( n , *this );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template < typename ScalarA ,
+ typename ScalarX ,
+ typename ScalarW ,
+ class L , class D >
+struct AXPY
+{
+private:
+
+ typedef View< ScalarW *, L , D , MemoryUnmanaged > ViewW ;
+ typedef View< const ScalarX *, L , D , MemoryUnmanaged > ViewX ;
+
+ const ViewW w ;
+ const ViewX x ;
+ const ScalarA alpha ;
+
+public:
+
+ typedef typename ViewW::execution_space execution_space ;
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i ) const
+ { w(i) += alpha * x(i); }
+
+ template< class ArgX , class ArgW >
+ inline
+ AXPY( const size_t n ,
+ const ScalarA & arg_alpha ,
+ const ArgX & arg_x ,
+ const ArgW & arg_w )
+ : w( arg_w ), x( arg_x )
+ , alpha( arg_alpha )
+ {
+ parallel_for( n , *this );
+ }
+}; // AXPY
+
+template< typename ScalarX ,
+ typename ScalarB ,
+ typename ScalarW ,
+ class L , class D >
+struct XPBY
+{
+private:
+
+ typedef View< ScalarW *, L , D , MemoryUnmanaged > ViewW ;
+ typedef View< const ScalarX *, L , D , MemoryUnmanaged > ViewX ;
+
+ const ViewW w ;
+ const ViewX x ;
+ const ScalarB beta ;
+
+public:
+
+ typedef typename ViewW::execution_space execution_space ;
+
+ template< typename iType >
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const iType & i ) const
+ { w(i) = x(i) + beta * w(i); }
+
+ template< class ArgX , class ArgW >
+ inline
+ XPBY( const size_t n ,
+ const ArgX & arg_x ,
+ const ScalarB & arg_beta ,
+ const ArgW & arg_w )
+ : w( arg_w ), x( arg_x )
+ , beta( arg_beta )
+ {
+ parallel_for( n , *this );
+ }
+}; // XPBY
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef USESCASES_LINALG_BLAS_HPP */
+
+
diff --git a/lib/kokkos/example/multi_fem/Nonlinear.hpp b/lib/kokkos/example/multi_fem/Nonlinear.hpp
new file mode 100644
index 000000000..96a05b97a
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/Nonlinear.hpp
@@ -0,0 +1,573 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef HYBRIDFEM_NONLINEAR_HPP
+#define HYBRIDFEM_NONLINEAR_HPP
+
+#include <utility>
+#include <iostream>
+#include <iomanip>
+
+#include <Kokkos_Core.hpp>
+#include <SparseLinearSystem.hpp>
+#include <SparseLinearSystemFill.hpp>
+#include <NonlinearFunctors.hpp>
+
+#include <FEMesh.hpp>
+#include <HexElement.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace HybridFEM {
+namespace Nonlinear {
+
+struct PerformanceData {
+ double mesh_time ;
+ double graph_time ;
+ double elem_time ;
+ double matrix_gather_fill_time ;
+ double matrix_boundary_condition_time ;
+ double cg_iteration_time ;
+ size_t cg_iteration_count ;
+ size_t newton_iteration_count ;
+ double error_max ;
+
+ PerformanceData()
+ : mesh_time(0)
+ , graph_time(0)
+ , elem_time(0)
+ , matrix_gather_fill_time(0)
+ , matrix_boundary_condition_time(0)
+ , cg_iteration_time(0)
+ , cg_iteration_count(0)
+ , newton_iteration_count(0)
+ , error_max(0)
+ {}
+
+ void best( const PerformanceData & rhs )
+ {
+ mesh_time = std::min( mesh_time , rhs.mesh_time );
+ graph_time = std::min( graph_time , rhs.graph_time );
+ elem_time = std::min( elem_time , rhs.elem_time );
+ matrix_gather_fill_time = std::min( matrix_gather_fill_time , rhs.matrix_gather_fill_time );
+ matrix_boundary_condition_time = std::min( matrix_boundary_condition_time , rhs.matrix_boundary_condition_time );
+ cg_iteration_time = std::min( cg_iteration_time , rhs.cg_iteration_time );
+ cg_iteration_count = std::min( cg_iteration_count , rhs.cg_iteration_count );
+ newton_iteration_count = std::min( newton_iteration_count , rhs.newton_iteration_count );
+ error_max = std::min( error_max , rhs.error_max );
+ }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+class ManufacturedSolution {
+public:
+
+ // Manufactured solution for one dimensional nonlinear PDE
+ //
+ // -K T_zz + T^2 = 0 ; T(zmin) = T_zmin ; T(zmax) = T_zmax
+ //
+ // Has an analytic solution of the form:
+ //
+ // T(z) = ( a ( z - zmin ) + b )^(-2) where K = 1 / ( 6 a^2 )
+ //
+ // Given T_0 and T_L compute K for this analytic solution.
+ //
+ // Two analytic solutions:
+ //
+ // Solution with singularity:
+ // , a( ( 1.0 / sqrt(T_zmax) + 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ // , b( -1.0 / sqrt(T_zmin) )
+ //
+ // Solution without singularity:
+ // , a( ( 1.0 / sqrt(T_zmax) - 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ // , b( 1.0 / sqrt(T_zmin) )
+
+ const double zmin ;
+ const double zmax ;
+ const double T_zmin ;
+ const double T_zmax ;
+ const double a ;
+ const double b ;
+ const double K ;
+
+ ManufacturedSolution( const double arg_zmin ,
+ const double arg_zmax ,
+ const double arg_T_zmin ,
+ const double arg_T_zmax )
+ : zmin( arg_zmin )
+ , zmax( arg_zmax )
+ , T_zmin( arg_T_zmin )
+ , T_zmax( arg_T_zmax )
+ , a( ( 1.0 / sqrt(T_zmax) - 1.0 / sqrt(T_zmin) ) / ( zmax - zmin ) )
+ , b( 1.0 / sqrt(T_zmin) )
+ , K( 1.0 / ( 6.0 * a * a ) )
+ {}
+
+ double operator()( const double z ) const
+ {
+ const double tmp = a * ( z - zmin ) + b ;
+ return 1.0 / ( tmp * tmp );
+ }
+};
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class FixtureType >
+PerformanceData run( const typename FixtureType::FEMeshType & mesh ,
+ const int , // global_max_x ,
+ const int , // global_max_y ,
+ const int global_max_z ,
+ const bool print_error )
+{
+ typedef Scalar scalar_type ;
+ typedef FixtureType fixture_type ;
+ typedef typename fixture_type::execution_space execution_space;
+ //typedef typename execution_space::size_type size_type ; // unused
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+ typedef typename fixture_type::coordinate_scalar_type coordinate_scalar_type ;
+
+ enum { ElementNodeCount = fixture_type::element_node_count };
+
+ const comm::Machine machine = mesh.parallel_data_map.machine ;
+
+ const size_t element_count = mesh.elem_node_ids.dimension_0();
+
+ //------------------------------------
+ // The amount of nonlinearity is proportional to the ratio
+ // between T(zmax) and T(zmin). For the manufactured solution
+ // 0 < T(zmin) and 0 < T(zmax)
+
+ const ManufacturedSolution
+ exact_solution( /* zmin */ 0 ,
+ /* zmax */ global_max_z ,
+ /* T(zmin) */ 1 ,
+ /* T(zmax) */ 20 );
+
+ //-----------------------------------
+ // Convergence Criteria and perf data:
+
+ const size_t cg_iteration_limit = 200 ;
+ const double cg_tolerance = 1e-14 ;
+
+ const size_t newton_iteration_limit = 150 ;
+ const double newton_tolerance = 1e-14 ;
+
+ size_t cg_iteration_count_total = 0 ;
+ double cg_iteration_time = 0 ;
+
+ size_t newton_iteration_count = 0 ;
+ double residual_norm_init = 0 ;
+ double residual_norm = 0 ;
+
+ PerformanceData perf_data ;
+
+ //------------------------------------
+ // Sparse linear system types:
+
+ typedef Kokkos::View< scalar_type* , execution_space > vector_type ;
+ typedef Kokkos::CrsMatrix< scalar_type , execution_space > matrix_type ;
+ typedef typename matrix_type::graph_type matrix_graph_type ;
+ typedef typename matrix_type::coefficients_type matrix_coefficients_type ;
+
+ typedef GraphFactory< matrix_graph_type , mesh_type > graph_factory ;
+
+ //------------------------------------
+ // Problem setup types:
+
+ typedef ElementComputation < mesh_type , scalar_type > ElementFunctor ;
+ typedef DirichletSolution < mesh_type , scalar_type > DirichletSolutionFunctor ;
+ typedef DirichletResidual < mesh_type , scalar_type > DirichletResidualFunctor ;
+
+ typedef typename ElementFunctor::elem_matrices_type elem_matrices_type ;
+ typedef typename ElementFunctor::elem_vectors_type elem_vectors_type ;
+
+ typedef GatherFill< matrix_type ,
+ mesh_type ,
+ elem_matrices_type ,
+ elem_vectors_type > GatherFillFunctor ;
+
+ //------------------------------------
+
+ matrix_type jacobian ;
+ vector_type residual ;
+ vector_type delta ;
+ vector_type nodal_solution ;
+
+ typename graph_factory::element_map_type element_map ;
+
+ //------------------------------------
+ // Generate mesh and corresponding sparse matrix graph
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ //------------------------------------
+ // Generate sparse matrix graph and element->graph map.
+
+ wall_clock.reset();
+
+ graph_factory::create( mesh , jacobian.graph , element_map );
+
+ execution_space::fence();
+
+ perf_data.graph_time = comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------
+ // Allocate linear system coefficients and rhs:
+
+ const size_t local_owned_length = jacobian.graph.row_map.dimension_0() - 1 ;
+ const size_t local_total_length = mesh.node_coords.dimension_0();
+
+ jacobian.coefficients =
+ matrix_coefficients_type( "jacobian_coeff" , jacobian.graph.entries.dimension_0() );
+
+ // Nonlinear residual for owned nodes:
+ residual = vector_type( "residual" , local_owned_length );
+
+ // Nonlinear solution for owned and ghosted nodes:
+ nodal_solution = vector_type( "solution" , local_total_length );
+
+ // Nonlinear solution update for owned nodes:
+ delta = vector_type( "delta" , local_owned_length );
+
+ //------------------------------------
+ // Allocation of arrays to fill the linear system
+
+ elem_matrices_type elem_matrices ; // Jacobian matrices
+ elem_vectors_type elem_vectors ; // Residual vectors
+
+ if ( element_count ) {
+ elem_matrices = elem_matrices_type( std::string("elem_matrices"), element_count );
+ elem_vectors = elem_vectors_type( std::string("elem_vectors"), element_count );
+ }
+
+ //------------------------------------
+ // For boundary condition set the correct values in the solution vector
+ // The 'zmin' face is assigned to 'T_zmin'.
+ // The 'zmax' face is assigned to 'T_zmax'.
+ // The resulting solution is one dimensional along the 'Z' axis.
+
+ DirichletSolutionFunctor::apply( nodal_solution , mesh ,
+ exact_solution.zmin ,
+ exact_solution.zmax ,
+ exact_solution.T_zmin ,
+ exact_solution.T_zmax );
+
+ for(;;) { // Nonlinear loop
+
+#if defined( KOKKOS_HAVE_MPI )
+
+ { //------------------------------------
+ // Import off-processor nodal solution values
+ // for residual and jacobian computations
+
+ Kokkos::AsyncExchange< typename vector_type::value_type , execution_space ,
+ Kokkos::ParallelDataMap >
+ exchange( mesh.parallel_data_map , 1 );
+
+ Kokkos::PackArray< vector_type >
+ ::pack( exchange.buffer() ,
+ mesh.parallel_data_map.count_interior ,
+ mesh.parallel_data_map.count_send ,
+ nodal_solution );
+
+ exchange.setup();
+
+ exchange.send_receive();
+
+ Kokkos::UnpackArray< vector_type >
+ ::unpack( nodal_solution , exchange.buffer() ,
+ mesh.parallel_data_map.count_owned ,
+ mesh.parallel_data_map.count_receive );
+ }
+
+#endif
+
+ //------------------------------------
+ // Compute element matrices and vectors:
+
+ wall_clock.reset();
+
+ ElementFunctor( mesh ,
+ elem_matrices ,
+ elem_vectors ,
+ nodal_solution ,
+ exact_solution.K );
+
+ execution_space::fence();
+ perf_data.elem_time += comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------
+ // Fill linear system coefficients:
+
+ wall_clock.reset();
+
+ fill( jacobian.coefficients.dimension_0(), 0 , jacobian.coefficients );
+ fill( residual.dimension_0() , 0 , residual );
+
+ GatherFillFunctor::apply( jacobian ,
+ residual ,
+ mesh ,
+ element_map ,
+ elem_matrices ,
+ elem_vectors );
+
+ execution_space::fence();
+ perf_data.matrix_gather_fill_time += comm::max( machine , wall_clock.seconds() );
+
+ // Apply boundary conditions:
+
+ wall_clock.reset();
+
+ // Updates jacobian matrix to 1 on the diagonal, zero elsewhere,
+ // and 0 in the residual due to the solution vector having the correct value
+ DirichletResidualFunctor::apply( jacobian, residual, mesh ,
+ exact_solution.zmin ,
+ exact_solution.zmax );
+
+ execution_space::fence();
+ perf_data.matrix_boundary_condition_time +=
+ comm::max( machine , wall_clock.seconds() );
+
+ //------------------------------------
+ // Has the residual converged?
+
+ residual_norm = norm2( mesh.parallel_data_map.count_owned,
+ residual,
+ mesh.parallel_data_map.machine );
+
+ if ( 0 == newton_iteration_count ) {
+ residual_norm_init = residual_norm ;
+ }
+
+ if ( residual_norm / residual_norm_init < newton_tolerance ) {
+ break ;
+ }
+
+ //------------------------------------
+ // Solve linear sytem
+
+ size_t cg_iteration_count = 0 ;
+ double cg_residual_norm = 0 ;
+
+ cgsolve( mesh.parallel_data_map ,
+ jacobian , residual , delta ,
+ cg_iteration_count ,
+ cg_residual_norm ,
+ cg_iteration_time ,
+ cg_iteration_limit , cg_tolerance ) ;
+
+ perf_data.cg_iteration_time += cg_iteration_time ;
+ cg_iteration_count_total += cg_iteration_count ;
+
+ // Update non-linear solution with delta...
+ // delta is : - Dx = [Jacobian]^1 * Residual which is the negative update
+ // LaTeX:
+ // \vec {x}_{n+1} = \vec {x}_{n} - ( - \Delta \vec{x}_{n} )
+ // text:
+ // x[n+1] = x[n] + Dx
+
+ axpy( mesh.parallel_data_map.count_owned ,
+ -1.0, delta, nodal_solution);
+
+ ++newton_iteration_count ;
+
+ if ( newton_iteration_limit < newton_iteration_count ) {
+ break ;
+ }
+ };
+
+ if ( newton_iteration_count ) {
+ perf_data.elem_time /= newton_iteration_count ;
+ perf_data.matrix_gather_fill_time /= newton_iteration_count ;
+ perf_data.matrix_boundary_condition_time /= newton_iteration_count ;
+ }
+
+ if ( cg_iteration_count_total ) {
+ perf_data.cg_iteration_time /= cg_iteration_count_total ;
+ }
+
+ perf_data.newton_iteration_count = newton_iteration_count ;
+ perf_data.cg_iteration_count = cg_iteration_count_total ;
+
+ //------------------------------------
+
+ {
+ // For extracting the nodal solution and its coordinates:
+
+ typename mesh_type::node_coords_type::HostMirror node_coords_host =
+ Kokkos::create_mirror( mesh.node_coords );
+
+ typename vector_type::HostMirror nodal_solution_host =
+ Kokkos::create_mirror( nodal_solution );
+
+ Kokkos::deep_copy( node_coords_host , mesh.node_coords );
+ Kokkos::deep_copy( nodal_solution_host , nodal_solution );
+
+ double tmp = 0 ;
+
+ for ( size_t i = 0 ; i < mesh.parallel_data_map.count_owned ; ++i ) {
+ const coordinate_scalar_type x = node_coords_host(i,0);
+ const coordinate_scalar_type y = node_coords_host(i,1);
+ const coordinate_scalar_type z = node_coords_host(i,2);
+
+ const double Tx = exact_solution(z);
+ const double Ts = nodal_solution_host(i);
+ const double Te = std::abs( Tx - Ts ) / std::abs( Tx );
+
+ tmp = std::max( tmp , Te );
+
+ if ( print_error && 0.02 < Te ) {
+ std::cout << " node( " << x << " " << y << " " << z << " ) = "
+ << Ts << " != exact_solution " << Tx
+ << std::endl ;
+ }
+ }
+ perf_data.error_max = comm::max( machine , tmp );
+ }
+
+ return perf_data ;
+}
+
+//----------------------------------------------------------------------------
+
+template< typename Scalar , class Device , class FixtureElement >
+void driver( const char * const label ,
+ comm::Machine machine ,
+ const int gang_count ,
+ const int elem_count_beg ,
+ const int elem_count_end ,
+ const int runs )
+{
+ typedef Scalar scalar_type ;
+ typedef Device execution_space ;
+ typedef double coordinate_scalar_type ;
+ typedef FixtureElement fixture_element_type ;
+
+ typedef BoxMeshFixture< coordinate_scalar_type ,
+ execution_space ,
+ fixture_element_type > fixture_type ;
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+
+ const size_t proc_count = comm::size( machine );
+ const size_t proc_rank = comm::rank( machine );
+
+ if ( elem_count_beg == 0 || elem_count_end == 0 || runs == 0 ) return ;
+
+ if ( comm::rank( machine ) == 0 ) {
+ std::cout << std::endl ;
+ std::cout << "\"Kokkos::HybridFE::Nonlinear " << label << "\"" << std::endl;
+ std::cout
+ << "\"Size\" , \"Size\" , \"Graphing\" , \"Element\" , \"Fill\" , \"Boundary\" , \"CG-Iter\" , \"CG-Iter\" , \"Newton-Iter\" , \"Max-node-error\""
+ << std::endl
+ << "\"elems\" , \"nodes\" , \"millisec\" , \"millisec\" , \"millisec\" , \"millisec\" , \"millisec\" , \"total-count\" , \"total-count\" , \"ratio\""
+ << std::endl ;
+ }
+
+ const bool print_sample = 0 ;
+ const double x_curve = 1.0 ;
+ const double y_curve = 1.0 ;
+ const double z_curve = 0.8 ;
+
+ for(int i = elem_count_beg ; i < elem_count_end ; i *= 2 )
+ {
+ const int ix = std::max( 1 , (int) cbrt( ((double) i) / 2.0 ) );
+ const int iy = 1 + ix ;
+ const int iz = 2 * iy ;
+ const int global_elem_count = ix * iy * iz ;
+ const int global_node_count = ( 2 * ix + 1 ) *
+ ( 2 * iy + 1 ) *
+ ( 2 * iz + 1 );
+
+ mesh_type mesh =
+ fixture_type::create( proc_count , proc_rank , gang_count ,
+ ix , iy , iz ,
+ x_curve , y_curve , z_curve );
+
+ mesh.parallel_data_map.machine = machine ;
+
+
+ PerformanceData perf_data , perf_best ;
+
+ for(int j = 0; j < runs; j++){
+
+ perf_data = run<scalar_type,fixture_type>(mesh,ix,iy,iz, print_sample );
+
+ if( j == 0 ) {
+ perf_best = perf_data ;
+ }
+ else {
+ perf_best.best( perf_data );
+ }
+ }
+
+ if ( comm::rank( machine ) == 0 ) {
+
+ std::cout << std::setw(8) << global_elem_count << " , "
+ << std::setw(8) << global_node_count << " , "
+ << std::setw(10) << perf_best.graph_time * 1000 << " , "
+ << std::setw(10) << perf_best.elem_time * 1000 << " , "
+ << std::setw(10) << perf_best.matrix_gather_fill_time * 1000 << " , "
+ << std::setw(10) << perf_best.matrix_boundary_condition_time * 1000 << " , "
+ << std::setw(10) << perf_best.cg_iteration_time * 1000 << " , "
+ << std::setw(7) << perf_best.cg_iteration_count << " , "
+ << std::setw(3) << perf_best.newton_iteration_count << " , "
+ << std::setw(10) << perf_best.error_max
+ << std::endl ;
+ }
+ }
+}
+
+//----------------------------------------------------------------------------
+
+} /* namespace Nonlinear */
+} /* namespace HybridFEM */
+
+
+#endif /* #ifndef HYBRIDFEM_IMPLICIT_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/NonlinearElement_Cuda.hpp b/lib/kokkos/example/multi_fem/NonlinearElement_Cuda.hpp
new file mode 100644
index 000000000..b2adc2ada
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/NonlinearElement_Cuda.hpp
@@ -0,0 +1,390 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+#include <stdio.h>
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
+
+#include <Kokkos_Core.hpp>
+#include <HexElement.hpp>
+#include <FEMesh.hpp>
+
+namespace HybridFEM {
+namespace Nonlinear {
+
+template< class MeshType , typename ScalarType > struct ElementComputation ;
+
+//----------------------------------------------------------------------------
+
+template<>
+struct ElementComputation< FEMesh< double , 27 , Kokkos::Cuda > , double >
+{
+ typedef Kokkos::Cuda execution_space ;
+
+ static const unsigned ElementNodeCount = 27 ;
+
+ typedef HexElement_Data< ElementNodeCount > element_data_type ;
+ typedef FEMesh< double , ElementNodeCount , execution_space > mesh_type ;
+
+ static const unsigned SpatialDim = element_data_type::spatial_dimension ;
+ static const unsigned FunctionCount = element_data_type::function_count ;
+ static const unsigned IntegrationCount = element_data_type::integration_count ;
+ static const unsigned TensorDim = SpatialDim * SpatialDim ;
+
+ typedef Kokkos::View< double[][FunctionCount][FunctionCount] , execution_space > elem_matrices_type ;
+ typedef Kokkos::View< double[][FunctionCount] , execution_space > elem_vectors_type ;
+ typedef Kokkos::View< double[] , execution_space > value_vector_type ;
+
+private:
+
+ const element_data_type elem_data ;
+ const typename mesh_type::elem_node_ids_type elem_node_ids ;
+ const typename mesh_type::node_coords_type node_coords ;
+ const value_vector_type nodal_values ;
+ const elem_matrices_type element_matrices ;
+ const elem_vectors_type element_vectors ;
+ const float coeff_K ;
+ const unsigned elem_count ;
+ unsigned invJacIndex[9][4] ;
+
+ static const unsigned j11 = 0 , j12 = 1 , j13 = 2 ,
+ j21 = 3 , j22 = 4 , j23 = 5 ,
+ j31 = 6 , j32 = 7 , j33 = 8 ;
+
+ // Can only handle up to 16 warps:
+ static const unsigned BlockDimX = 32 ;
+ static const unsigned BlockDimY = 7 ;
+
+ struct WorkSpace {
+ double sum[ BlockDimY ][ BlockDimX ];
+
+ double value_at_integ[ IntegrationCount ];
+ double gradx_at_integ[ IntegrationCount ];
+ double grady_at_integ[ IntegrationCount ];
+ double gradz_at_integ[ IntegrationCount ];
+
+ float spaceJac[ BlockDimY ][ 9 ];
+ float spaceInvJac[ BlockDimY ][ 9 ];
+
+ float detJweight[ IntegrationCount ];
+
+ float dpsidx[ FunctionCount ][ IntegrationCount ];
+ float dpsidy[ FunctionCount ][ IntegrationCount ];
+ float dpsidz[ FunctionCount ][ IntegrationCount ];
+ };
+
+public:
+
+ ElementComputation ( const mesh_type & arg_mesh ,
+ const elem_matrices_type & arg_element_matrices ,
+ const elem_vectors_type & arg_element_vectors ,
+ const value_vector_type & arg_nodal_values ,
+ const float arg_coeff_K )
+ : elem_data()
+ , elem_node_ids( arg_mesh.elem_node_ids )
+ , node_coords( arg_mesh.node_coords )
+ , nodal_values( arg_nodal_values )
+ , element_matrices( arg_element_matrices )
+ , element_vectors( arg_element_vectors )
+ , coeff_K( arg_coeff_K )
+ , elem_count( arg_mesh.elem_node_ids.dimension_0() )
+ {
+ const unsigned jInvJ[9][4] =
+ { { j22 , j33 , j23 , j32 } ,
+ { j13 , j32 , j12 , j33 } ,
+ { j12 , j23 , j13 , j22 } ,
+
+ { j23 , j31 , j21 , j33 } ,
+ { j11 , j33 , j13 , j31 } ,
+ { j13 , j21 , j11 , j23 } ,
+
+ { j21 , j32 , j22 , j31 } ,
+ { j12 , j31 , j11 , j32 } ,
+ { j11 , j22 , j12 , j21 } };
+
+ for ( unsigned i = 0 ; i < 9 ; ++i ) {
+ for ( unsigned j = 0 ; j < 4 ; ++j ) {
+ invJacIndex[i][j] = jInvJ[i][j] ;
+ }
+ }
+
+ const unsigned shmem = sizeof(WorkSpace);
+ const unsigned grid_max = 65535 ;
+ const unsigned grid_count = std::min( grid_max , elem_count );
+
+ // For compute capability 2.x up to 1024 threads per block
+ const dim3 block( BlockDimX , BlockDimY , 1 );
+ const dim3 grid( grid_count , 1 , 1 );
+
+ Kokkos::Impl::CudaParallelLaunch< ElementComputation >( *this , grid , block , shmem );
+ }
+
+public:
+
+ //------------------------------------
+ // Sum among the threadIdx.x
+
+ template< typename Type >
+ __device__ inline static
+ void sum_x( Type & result , const double value )
+ {
+ extern __shared__ WorkSpace work_data[] ;
+
+ volatile double * const base_sum =
+ & work_data->sum[ threadIdx.y ][ threadIdx.x ] ;
+
+ base_sum[ 0] = value ;
+
+ if ( threadIdx.x < 16 ) {
+ base_sum[0] += base_sum[16];
+ base_sum[0] += base_sum[ 8];
+ base_sum[0] += base_sum[ 4];
+ base_sum[0] += base_sum[ 2];
+ base_sum[0] += base_sum[ 1];
+ }
+
+ if ( 0 == threadIdx.x ) {
+ result = base_sum[0] ;
+ }
+ }
+
+ __device__ inline static
+ void sum_x_clear()
+ {
+ extern __shared__ WorkSpace work_data[] ;
+
+ work_data->sum[ threadIdx.y ][ threadIdx.x ] = 0 ;
+ }
+
+ //------------------------------------
+ //------------------------------------
+
+ __device__ inline
+ void evaluateFunctions( const unsigned ielem ) const
+ {
+ extern __shared__ WorkSpace work_data[] ;
+
+ // Each warp (threadIdx.y) computes an integration point
+ // Each thread is responsible for a node / function.
+
+ const unsigned iFunc = threadIdx.x ;
+ const bool hasFunc = iFunc < FunctionCount ;
+
+ //------------------------------------
+ // Each warp gathers a different variable into 'elem_mat' shared memory.
+
+ if ( hasFunc ) {
+
+ const unsigned node = elem_node_ids( ielem , iFunc );
+
+ for ( unsigned iy = threadIdx.y ; iy < 4 ; iy += blockDim.y ) {
+ switch( iy ) {
+ case 0 : work_data->sum[0][iFunc] = node_coords(node,0); break ;
+ case 1 : work_data->sum[1][iFunc] = node_coords(node,1); break ;
+ case 2 : work_data->sum[2][iFunc] = node_coords(node,2); break ;
+ case 3 : work_data->sum[3][iFunc] = nodal_values(node); break ;
+ default: break ;
+ }
+ }
+ }
+
+ __syncthreads(); // Wait for all warps to finish gathering
+
+ // now get local 'const' copies in register space:
+
+ const double x = work_data->sum[0][ iFunc ];
+ const double y = work_data->sum[1][ iFunc ];
+ const double z = work_data->sum[2][ iFunc ];
+ const double dof_val = work_data->sum[3][ iFunc ];
+
+ __syncthreads(); // Wait for all warps to finish extracting
+
+ sum_x_clear(); // Make sure summation scratch is zero
+
+ //------------------------------------
+ // Each warp is now on its own computing an integration point
+ // so no further explicit synchronizations are required.
+
+ if ( hasFunc ) {
+
+ float * const J = work_data->spaceJac[ threadIdx.y ];
+ float * const invJ = work_data->spaceInvJac[ threadIdx.y ];
+
+ for ( unsigned iInt = threadIdx.y ;
+ iInt < IntegrationCount ; iInt += blockDim.y ) {
+
+ const float val = elem_data.values[iInt][iFunc] ;
+ const float gx = elem_data.gradients[iInt][0][iFunc] ;
+ const float gy = elem_data.gradients[iInt][1][iFunc] ;
+ const float gz = elem_data.gradients[iInt][2][iFunc] ;
+
+ sum_x( J[j11], gx * x );
+ sum_x( J[j12], gx * y );
+ sum_x( J[j13], gx * z );
+
+ sum_x( J[j21], gy * x );
+ sum_x( J[j22], gy * y );
+ sum_x( J[j23], gy * z );
+
+ sum_x( J[j31], gz * x );
+ sum_x( J[j32], gz * y );
+ sum_x( J[j33], gz * z );
+
+ // Inverse jacobian, only enough parallel work for 9 threads in the warp
+
+ if ( iFunc < TensorDim ) {
+
+ invJ[ iFunc ] =
+ J[ invJacIndex[iFunc][0] ] * J[ invJacIndex[iFunc][1] ] -
+ J[ invJacIndex[iFunc][2] ] * J[ invJacIndex[iFunc][3] ] ;
+
+ // Let all threads in the warp compute determinant into a register
+
+ const float detJ = J[j11] * invJ[j11] +
+ J[j21] * invJ[j12] +
+ J[j31] * invJ[j13] ;
+
+ invJ[ iFunc ] /= detJ ;
+
+ if ( 0 == iFunc ) {
+ work_data->detJweight[ iInt ] = detJ * elem_data.weights[ iInt ] ;
+ }
+ }
+
+ // Transform bases gradients and compute value and gradient
+
+ const float dx = gx * invJ[j11] + gy * invJ[j12] + gz * invJ[j13];
+ const float dy = gx * invJ[j21] + gy * invJ[j22] + gz * invJ[j23];
+ const float dz = gx * invJ[j31] + gy * invJ[j32] + gz * invJ[j33];
+
+ work_data->dpsidx[iFunc][iInt] = dx ;
+ work_data->dpsidy[iFunc][iInt] = dy ;
+ work_data->dpsidz[iFunc][iInt] = dz ;
+
+ sum_x( work_data->gradx_at_integ[iInt] , dof_val * dx );
+ sum_x( work_data->grady_at_integ[iInt] , dof_val * dy );
+ sum_x( work_data->gradz_at_integ[iInt] , dof_val * dz );
+ sum_x( work_data->value_at_integ[iInt] , dof_val * val );
+ }
+ }
+
+ __syncthreads(); // All shared data must be populated at return.
+ }
+
+ __device__ inline
+ void contributeResidualJacobian( const unsigned ielem ) const
+ {
+ extern __shared__ WorkSpace work_data[] ;
+
+ sum_x_clear(); // Make sure summation scratch is zero
+
+ // $$ R_i = \int_{\Omega} \nabla \phi_i \cdot (k \nabla T) + \phi_i T^2 d \Omega $$
+ // $$ J_{i,j} = \frac{\partial R_i}{\partial T_j} = \int_{\Omega} k \nabla \phi_i \cdot \nabla \phi_j + 2 \phi_i \phi_j T d \Omega $$
+
+ const unsigned iInt = threadIdx.x ;
+
+ if ( iInt < IntegrationCount ) {
+
+ const double value_at_integ = work_data->value_at_integ[ iInt ] ;
+ const double gradx_at_integ = work_data->gradx_at_integ[ iInt ] ;
+ const double grady_at_integ = work_data->grady_at_integ[ iInt ] ;
+ const double gradz_at_integ = work_data->gradz_at_integ[ iInt ] ;
+
+ const float detJweight = work_data->detJweight[ iInt ] ;
+ const float coeff_K_detJweight = coeff_K * detJweight ;
+
+ for ( unsigned iRow = threadIdx.y ;
+ iRow < FunctionCount ; iRow += blockDim.y ) {
+
+ const float value_row = elem_data.values[ iInt ][ iRow ] * detJweight ;
+ const float dpsidx_row = work_data->dpsidx[ iRow ][ iInt ] * coeff_K_detJweight ;
+ const float dpsidy_row = work_data->dpsidy[ iRow ][ iInt ] * coeff_K_detJweight ;
+ const float dpsidz_row = work_data->dpsidz[ iRow ][ iInt ] * coeff_K_detJweight ;
+
+ const double res_del = dpsidx_row * gradx_at_integ +
+ dpsidy_row * grady_at_integ +
+ dpsidz_row * gradz_at_integ ;
+
+ const double res_val = value_at_integ * value_at_integ * value_row ;
+ const double jac_val_row = 2 * value_at_integ * value_row ;
+
+ sum_x( element_vectors( ielem , iRow ) , res_del + res_val );
+
+ for ( unsigned iCol = 0 ; iCol < FunctionCount ; ++iCol ) {
+
+ const float jac_del =
+ dpsidx_row * work_data->dpsidx[iCol][iInt] +
+ dpsidy_row * work_data->dpsidy[iCol][iInt] +
+ dpsidz_row * work_data->dpsidz[iCol][iInt] ;
+
+ const double jac_val =
+ jac_val_row * elem_data.values[ iInt ][ iCol ] ;
+
+ sum_x( element_matrices( ielem , iRow , iCol ) , jac_del + jac_val );
+ }
+ }
+ }
+
+ __syncthreads(); // All warps finish before refilling shared data
+ }
+
+ __device__ inline
+ void operator()(void) const
+ {
+ extern __shared__ WorkSpace work_data[] ;
+
+ for ( unsigned ielem = blockIdx.x ; ielem < elem_count ; ielem += gridDim.x ) {
+
+ evaluateFunctions( ielem );
+
+ contributeResidualJacobian( ielem );
+ }
+ }
+
+}; /* ElementComputation */
+
+} /* namespace Nonlinear */
+} /* namespace HybridFEM */
+
diff --git a/lib/kokkos/example/multi_fem/NonlinearFunctors.hpp b/lib/kokkos/example/multi_fem/NonlinearFunctors.hpp
new file mode 100644
index 000000000..962823618
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/NonlinearFunctors.hpp
@@ -0,0 +1,482 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_NONLINEARFUNCTORS_HPP
+#define KOKKOS_NONLINEARFUNCTORS_HPP
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
+
+namespace HybridFEM {
+namespace Nonlinear {
+
+template< class MeshType , typename ScalarType > struct ElementComputation ;
+template< class MeshType , typename ScalarType > struct DirichletSolution ;
+template< class MeshType , typename ScalarType > struct DirichletResidual ;
+
+}
+}
+
+/* A Cuda-specific specialization for the element computation functor. */
+#if defined( __CUDACC__ )
+#include <NonlinearElement_Cuda.hpp>
+#endif
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace HybridFEM {
+namespace Nonlinear {
+
+template< typename ScalarCoordType , unsigned ElemNode , class DeviceType ,
+ typename ScalarType >
+struct ElementComputation<
+ FEMesh< ScalarCoordType , ElemNode , DeviceType > , ScalarType >
+{
+ typedef DeviceType execution_space;
+ typedef ScalarType scalar_type ;
+
+ static const unsigned ElementNodeCount = ElemNode ;
+
+ typedef FEMesh< ScalarCoordType , ElementNodeCount , execution_space > mesh_type ;
+
+ typedef HexElement_Data< ElementNodeCount > element_data_type ;
+
+ static const unsigned SpatialDim = element_data_type::spatial_dimension ;
+ static const unsigned FunctionCount = element_data_type::function_count ;
+ static const unsigned IntegrationCount = element_data_type::integration_count ;
+ static const unsigned TensorDim = SpatialDim * SpatialDim ;
+
+ typedef Kokkos::View< scalar_type[][FunctionCount][FunctionCount] , execution_space > elem_matrices_type ;
+ typedef Kokkos::View< scalar_type[][FunctionCount] , execution_space > elem_vectors_type ;
+ typedef Kokkos::View< scalar_type[] , execution_space > value_vector_type ;
+
+
+private:
+
+ const element_data_type elem_data ;
+ typename mesh_type::elem_node_ids_type elem_node_ids ;
+ typename mesh_type::node_coords_type node_coords ;
+ value_vector_type nodal_values ;
+ elem_matrices_type element_matrices ;
+ elem_vectors_type element_vectors ;
+ scalar_type coeff_K ;
+
+public:
+
+ ElementComputation( const mesh_type & arg_mesh ,
+ const elem_matrices_type & arg_element_matrices ,
+ const elem_vectors_type & arg_element_vectors ,
+ const value_vector_type & arg_nodal_values ,
+ const scalar_type arg_coeff_K )
+ : elem_data()
+ , elem_node_ids( arg_mesh.elem_node_ids )
+ , node_coords( arg_mesh.node_coords )
+ , nodal_values( arg_nodal_values )
+ , element_matrices( arg_element_matrices )
+ , element_vectors( arg_element_vectors )
+ , coeff_K( arg_coeff_K )
+ {
+ const size_t elem_count = arg_mesh.elem_node_ids.dimension_0();
+
+ parallel_for( elem_count , *this );
+ }
+
+ //------------------------------------
+
+ static const unsigned FLOPS_transform_gradients =
+ /* Jacobian */ FunctionCount * TensorDim * 2 +
+ /* Inverse jacobian */ TensorDim * 6 + 6 +
+ /* Gradient transform */ FunctionCount * 15 ;
+
+ KOKKOS_INLINE_FUNCTION
+ float transform_gradients(
+ const float grad[][ FunctionCount ] , // Gradient of bases master element
+ const double x[] ,
+ const double y[] ,
+ const double z[] ,
+ float dpsidx[] ,
+ float dpsidy[] ,
+ float dpsidz[] ) const
+ {
+ enum { j11 = 0 , j12 = 1 , j13 = 2 ,
+ j21 = 3 , j22 = 4 , j23 = 5 ,
+ j31 = 6 , j32 = 7 , j33 = 8 };
+
+ // Jacobian accumulation:
+
+ double J[ TensorDim ] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ for( unsigned i = 0; i < FunctionCount ; ++i ) {
+ const double x1 = x[i] ;
+ const double x2 = y[i] ;
+ const double x3 = z[i] ;
+
+ const float g1 = grad[0][i] ;
+ const float g2 = grad[1][i] ;
+ const float g3 = grad[2][i] ;
+
+ J[j11] += g1 * x1 ;
+ J[j12] += g1 * x2 ;
+ J[j13] += g1 * x3 ;
+
+ J[j21] += g2 * x1 ;
+ J[j22] += g2 * x2 ;
+ J[j23] += g2 * x3 ;
+
+ J[j31] += g3 * x1 ;
+ J[j32] += g3 * x2 ;
+ J[j33] += g3 * x3 ;
+ }
+
+ // Inverse jacobian:
+
+ float invJ[ TensorDim ] = {
+ static_cast<float>( J[j22] * J[j33] - J[j23] * J[j32] ) ,
+ static_cast<float>( J[j13] * J[j32] - J[j12] * J[j33] ) ,
+ static_cast<float>( J[j12] * J[j23] - J[j13] * J[j22] ) ,
+
+ static_cast<float>( J[j23] * J[j31] - J[j21] * J[j33] ) ,
+ static_cast<float>( J[j11] * J[j33] - J[j13] * J[j31] ) ,
+ static_cast<float>( J[j13] * J[j21] - J[j11] * J[j23] ) ,
+
+ static_cast<float>( J[j21] * J[j32] - J[j22] * J[j31] ) ,
+ static_cast<float>( J[j12] * J[j31] - J[j11] * J[j32] ) ,
+ static_cast<float>( J[j11] * J[j22] - J[j12] * J[j21] ) };
+
+ const float detJ = J[j11] * invJ[j11] +
+ J[j21] * invJ[j12] +
+ J[j31] * invJ[j13] ;
+
+ const float detJinv = 1.0 / detJ ;
+
+ for ( unsigned i = 0 ; i < TensorDim ; ++i ) { invJ[i] *= detJinv ; }
+
+ // Transform gradients:
+
+ for( unsigned i = 0; i < FunctionCount ; ++i ) {
+ const float g0 = grad[0][i];
+ const float g1 = grad[1][i];
+ const float g2 = grad[2][i];
+
+ dpsidx[i] = g0 * invJ[j11] + g1 * invJ[j12] + g2 * invJ[j13];
+ dpsidy[i] = g0 * invJ[j21] + g1 * invJ[j22] + g2 * invJ[j23];
+ dpsidz[i] = g0 * invJ[j31] + g1 * invJ[j32] + g2 * invJ[j33];
+ }
+
+ return detJ ;
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void contributeResidualJacobian(
+ const float coeff_k ,
+ const double dof_values[] ,
+ const float dpsidx[] ,
+ const float dpsidy[] ,
+ const float dpsidz[] ,
+ const float detJ ,
+ const float integ_weight ,
+ const float bases_vals[] ,
+ double elem_res[] ,
+ double elem_mat[][ FunctionCount ] ) const
+ {
+ double value_at_pt = 0 ;
+ double gradx_at_pt = 0 ;
+ double grady_at_pt = 0 ;
+ double gradz_at_pt = 0 ;
+
+ for ( unsigned m = 0 ; m < FunctionCount ; m++ ) {
+ value_at_pt += dof_values[m] * bases_vals[m] ;
+ gradx_at_pt += dof_values[m] * dpsidx[m] ;
+ grady_at_pt += dof_values[m] * dpsidy[m] ;
+ gradz_at_pt += dof_values[m] * dpsidz[m] ;
+ }
+
+ const scalar_type k_detJ_weight = coeff_k * detJ * integ_weight ;
+ const double res_val = value_at_pt * value_at_pt * detJ * integ_weight ;
+ const double mat_val = 2.0 * value_at_pt * detJ * integ_weight ;
+
+ // $$ R_i = \int_{\Omega} \nabla \phi_i \cdot (k \nabla T) + \phi_i T^2 d \Omega $$
+ // $$ J_{i,j} = \frac{\partial R_i}{\partial T_j} = \int_{\Omega} k \nabla \phi_i \cdot \nabla \phi_j + 2 \phi_i \phi_j T d \Omega $$
+
+ for ( unsigned m = 0; m < FunctionCount; m++) {
+ double * const mat = elem_mat[m] ;
+ const float bases_val_m = bases_vals[m];
+ const float dpsidx_m = dpsidx[m] ;
+ const float dpsidy_m = dpsidy[m] ;
+ const float dpsidz_m = dpsidz[m] ;
+
+ elem_res[m] += k_detJ_weight * ( dpsidx_m * gradx_at_pt +
+ dpsidy_m * grady_at_pt +
+ dpsidz_m * gradz_at_pt ) +
+ res_val * bases_val_m ;
+
+ for( unsigned n = 0; n < FunctionCount; n++) {
+
+ mat[n] += k_detJ_weight * ( dpsidx_m * dpsidx[n] +
+ dpsidy_m * dpsidy[n] +
+ dpsidz_m * dpsidz[n] ) +
+ mat_val * bases_val_m * bases_vals[n];
+ }
+ }
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned ielem ) const
+ {
+ // Gather nodal coordinates and solution vector:
+
+ double x[ FunctionCount ] ;
+ double y[ FunctionCount ] ;
+ double z[ FunctionCount ] ;
+ double val[ FunctionCount ] ;
+
+ for ( unsigned i = 0 ; i < ElementNodeCount ; ++i ) {
+ const unsigned node_index = elem_node_ids( ielem , i );
+
+ x[i] = node_coords( node_index , 0 );
+ y[i] = node_coords( node_index , 1 );
+ z[i] = node_coords( node_index , 2 );
+
+ val[i] = nodal_values( node_index );
+ }
+
+ double elem_vec[ FunctionCount ] ;
+ double elem_mat[ FunctionCount ][ FunctionCount ] ;
+
+ for( unsigned i = 0; i < FunctionCount ; i++ ) {
+ elem_vec[i] = 0 ;
+ for( unsigned j = 0; j < FunctionCount ; j++){
+ elem_mat[i][j] = 0 ;
+ }
+ }
+
+ for ( unsigned i = 0 ; i < IntegrationCount ; ++i ) {
+ float dpsidx[ FunctionCount ] ;
+ float dpsidy[ FunctionCount ] ;
+ float dpsidz[ FunctionCount ] ;
+
+ const float detJ =
+ transform_gradients( elem_data.gradients[i] , x , y , z ,
+ dpsidx , dpsidy , dpsidz );
+
+ contributeResidualJacobian( coeff_K ,
+ val , dpsidx , dpsidy , dpsidz ,
+ detJ ,
+ elem_data.weights[i] ,
+ elem_data.values[i] ,
+ elem_vec , elem_mat );
+ }
+
+ for( unsigned i = 0; i < FunctionCount ; i++){
+ element_vectors(ielem, i) = elem_vec[i] ;
+ for( unsigned j = 0; j < FunctionCount ; j++){
+ element_matrices(ielem, i, j) = elem_mat[i][j] ;
+ }
+ }
+ }
+
+}; /* ElementComputation */
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarCoordType , unsigned ElemNode , class DeviceType ,
+ typename ScalarType >
+struct DirichletSolution<
+ FEMesh< ScalarCoordType , ElemNode , DeviceType > ,
+ ScalarType >
+{
+ typedef DeviceType execution_space;
+
+ static const unsigned ElementNodeCount = ElemNode ;
+
+ typedef Kokkos::View< ScalarType[] , execution_space > vector_type ;
+
+ typedef FEMesh< ScalarCoordType , ElementNodeCount , execution_space > mesh_type ;
+
+ typename mesh_type::node_coords_type node_coords ;
+
+ vector_type solution ;
+ ScalarCoordType bc_lower_z ;
+ ScalarCoordType bc_upper_z ;
+ ScalarType bc_lower_value ;
+ ScalarType bc_upper_value ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned inode ) const
+ {
+
+ // Apply dirichlet boundary condition on the Solution vector.
+ // Define boundary node values to be either bc_lower_value or
+ // bc_upper_value, depending on which boundary face they lie on.
+ // Non-boundary terms will be left at their previous value.
+
+ const ScalarCoordType z = node_coords(inode,2);
+ const bool bc_lower = z <= bc_lower_z ;
+ const bool bc_upper = bc_upper_z <= z ;
+
+ if ( bc_lower || bc_upper ) {
+ const ScalarType bc_value = bc_lower ? bc_lower_value
+ : bc_upper_value ;
+
+ solution(inode) = bc_value ; // set the solution vector
+ }
+ }
+
+ static void apply( const vector_type & solution ,
+ const mesh_type & mesh ,
+ const ScalarCoordType bc_lower_z ,
+ const ScalarCoordType bc_upper_z ,
+ const ScalarType bc_lower_value ,
+ const ScalarType bc_upper_value )
+ {
+ DirichletSolution op ;
+ op.node_coords = mesh.node_coords ;
+ op.solution = solution ;
+ op.bc_lower_z = bc_lower_z ;
+ op.bc_upper_z = bc_upper_z ;
+ op.bc_lower_value = bc_lower_value ;
+ op.bc_upper_value = bc_upper_value ;
+ parallel_for( solution.dimension_0() , op );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename ScalarCoordType , unsigned ElemNode , class DeviceType ,
+ typename ScalarType >
+struct DirichletResidual<
+ FEMesh< ScalarCoordType , ElemNode , DeviceType > , ScalarType >
+{
+ typedef DeviceType execution_space;
+ typedef typename execution_space::size_type size_type ;
+
+ static const unsigned ElementNodeCount = ElemNode ;
+
+ typedef Kokkos::CrsMatrix< ScalarType , execution_space > matrix_type ;
+ typedef Kokkos::View< ScalarType[] , execution_space > vector_type ;
+
+ typedef FEMesh< ScalarCoordType , ElementNodeCount , execution_space > mesh_type ;
+
+ typename mesh_type::node_coords_type node_coords ;
+ matrix_type matrix ;
+ vector_type rhs ;
+ ScalarCoordType bc_lower_z ;
+ ScalarCoordType bc_upper_z ;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const unsigned inode ) const
+ {
+ // Apply a dirichlet boundary condition to 'irow'
+ // to maintain the symmetry of the original
+ // global stiffness matrix, zero out the columns
+ // that correspond to boundary conditions, and
+ // adjust the load vector accordingly
+
+ const size_type iBeg = matrix.graph.row_map[inode];
+ const size_type iEnd = matrix.graph.row_map[inode+1];
+
+ const ScalarCoordType z = node_coords(inode,2);
+ const bool bc_lower = z <= bc_lower_z ;
+ const bool bc_upper = bc_upper_z <= z ;
+
+ if ( bc_lower || bc_upper ) {
+ rhs(inode) = 0 ; // set the residual vector
+
+ // zero each value on the row, and leave a one
+ // on the diagonal
+
+ for( size_type i = iBeg ; i < iEnd ; i++) {
+ matrix.coefficients(i) =
+ (int) inode == matrix.graph.entries(i) ? 1 : 0 ;
+ }
+ }
+ else {
+
+ // Find any columns that are boundary conditions.
+ // Clear them and adjust the load vector
+
+ for( size_type i = iBeg ; i < iEnd ; i++ ) {
+ const size_type cnode = matrix.graph.entries(i) ;
+
+ const ScalarCoordType zc = node_coords(cnode,2);
+ const bool c_bc_lower = zc <= bc_lower_z ;
+ const bool c_bc_upper = bc_upper_z <= zc ;
+
+ if ( c_bc_lower || c_bc_upper ) {
+
+ matrix.coefficients(i) = 0 ;
+ }
+ }
+ }
+ }
+
+
+ static void apply( const matrix_type & linsys_matrix ,
+ const vector_type & linsys_rhs ,
+ const mesh_type & mesh ,
+ const ScalarCoordType bc_lower_z ,
+ const ScalarCoordType bc_upper_z)
+ {
+ const size_t row_count = linsys_matrix.graph.row_map.dimension_0() - 1 ;
+
+ DirichletResidual op ;
+ op.node_coords = mesh.node_coords ;
+ op.matrix = linsys_matrix ;
+ op.rhs = linsys_rhs ;
+ op.bc_lower_z = bc_lower_z ;
+ op.bc_upper_z = bc_upper_z ;
+ parallel_for( row_count , op );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+} /* namespace Nonlinear */
+} /* namespace HybridFEM */
+
+#endif /* #ifndef KOKKOS_NONLINEARFUNCTORS_HPP */
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Or.hpp b/lib/kokkos/example/multi_fem/ParallelComm.hpp
old mode 100755
new mode 100644
similarity index 51%
copy from lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Or.hpp
copy to lib/kokkos/example/multi_fem/ParallelComm.hpp
index f15e61a3a..163e84a95
--- a/lib/kokkos/core/src/impl/Kokkos_Atomic_Fetch_Or.hpp
+++ b/lib/kokkos/example/multi_fem/ParallelComm.hpp
@@ -1,125 +1,167 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#if defined( KOKKOS_ATOMIC_HPP ) && ! defined( KOKKOS_ATOMIC_FETCH_OR_HPP )
-#define KOKKOS_ATOMIC_FETCH_OR_HPP
+#ifndef PARALLELCOMM_HPP
+#define PARALLELCOMM_HPP
-namespace Kokkos {
+//------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+#include <Kokkos_Macros.hpp>
-#if defined( KOKKOS_ATOMICS_USE_CUDA )
+//------------------------------------------------------------------------
-// Support for int, unsigned int, unsigned long long int, and float
+#if defined( KOKKOS_HAVE_MPI )
-__inline__ __device__
-int atomic_fetch_or( volatile int * const dest , const int val )
-{ return atomicOr((int*)dest,val); }
+#include <mpi.h>
+#include <string>
-__inline__ __device__
-unsigned int atomic_fetch_or( volatile unsigned int * const dest , const unsigned int val )
-{ return atomicOr((unsigned int*)dest,val); }
+namespace comm {
-#if defined( __CUDA_ARCH__ ) && ( 350 <= __CUDA_ARCH__ )
-__inline__ __device__
-unsigned long long int atomic_fetch_or( volatile unsigned long long int * const dest ,
- const unsigned long long int val )
-{ return atomicOr((unsigned long long int*)dest,val); }
-#endif
+struct Machine {
+ MPI_Comm mpi_comm ;
-//----------------------------------------------------------------------------
+ Machine() : mpi_comm( MPI_COMM_NULL ) {}
-#elif defined(KOKKOS_ATOMICS_USE_GCC) || defined(KOKKOS_ATOMICS_USE_INTEL)
+ Machine( const Machine & rhs )
+ : mpi_comm( rhs.mpi_comm ) {}
-KOKKOS_INLINE_FUNCTION
-int atomic_fetch_or( volatile int * const dest , const int val )
-{ return __sync_fetch_and_or(dest,val); }
+ Machine( MPI_Comm c ) : mpi_comm( c ) {}
-KOKKOS_INLINE_FUNCTION
-long int atomic_fetch_or( volatile long int * const dest , const long int val )
-{ return __sync_fetch_and_or(dest,val); }
-
-#if defined( KOKKOS_ATOMICS_USE_GCC )
-
-KOKKOS_INLINE_FUNCTION
-unsigned int atomic_fetch_or( volatile unsigned int * const dest , const unsigned int val )
-{ return __sync_fetch_and_or(dest,val); }
+ static Machine init( int * argc , char *** argv )
+ {
+ MPI_Init( argc , argv );
+ return Machine( MPI_COMM_WORLD );
+ }
-KOKKOS_INLINE_FUNCTION
-unsigned long int atomic_fetch_or( volatile unsigned long int * const dest , const unsigned long int val )
-{ return __sync_fetch_and_or(dest,val); }
+ static void finalize() { MPI_Finalize(); }
+};
-#endif
+inline
+unsigned size( Machine machine )
+{
+ int np ; MPI_Comm_size( machine.mpi_comm , & np ); return np ;
+}
-//----------------------------------------------------------------------------
+inline
+unsigned rank( Machine machine )
+{
+ int ip ; MPI_Comm_rank( machine.mpi_comm , & ip ); return ip ;
+}
-#elif defined( KOKKOS_ATOMICS_USE_OMP31 )
+inline
+double max( Machine machine , double local )
+{
+ double global = 0;
+ MPI_Allreduce( & local , & global , 1 , MPI_DOUBLE , MPI_MAX , machine.mpi_comm );
+ return global ;
+}
-template< typename T >
-T atomic_fetch_or( volatile T * const dest , const T val )
+inline
+std::string command_line( Machine machine , const int argc , const char * const * const argv )
{
- T retval;
-#pragma omp atomic capture
- {
- retval = dest[0];
- dest[0] |= val;
+ std::string argline ;
+
+ if ( 0 == rank( machine ) ) {
+ for ( int i = 1 ; i < argc ; ++i ) {
+ argline.append(" ").append( argv[i] );
+ }
}
- return retval;
+
+ int length = argline.length();
+ MPI_Bcast( & length , 1 , MPI_INT , 0 , machine.mpi_comm );
+ argline.resize( length , ' ' );
+ MPI_Bcast( (void*) argline.data() , length , MPI_CHAR , 0 , machine.mpi_comm );
+
+ return argline ;
}
-#endif
+}
-//----------------------------------------------------------------------------
+#else /* ! defined( KOKKOS_HAVE_MPI ) */
-// Simpler version of atomic_fetch_or without the fetch
-template <typename T>
-KOKKOS_INLINE_FUNCTION
-void atomic_or(volatile T * const dest, const T src) {
- (void)atomic_fetch_or(dest,src);
+#include <string>
+
+namespace comm {
+
+// Stub for non-parallel
+
+struct Machine {
+ static Machine init( int * , char *** )
+ { return Machine(); }
+
+ static void finalize() {}
+};
+
+inline
+unsigned size( Machine ) { return 1 ; }
+
+inline
+unsigned rank( Machine ) { return 0 ; }
+
+inline
+double max( Machine , double local )
+{ return local ; }
+
+inline
+std::string command_line( Machine machine , const int argc , const char * const * const argv )
+{
+ std::string argline ;
+
+ if ( 0 == rank( machine ) ) {
+ for ( int i = 1 ; i < argc ; ++i ) {
+ argline.append(" ").append( argv[i] );
+ }
+ }
+
+ return argline ;
}
}
-#endif
+#endif /* ! defined( KOKKOS_HAVE_MPI ) */
+
+//------------------------------------------------------------------------
+
+#endif /* #ifndef PARALLELCOMM_HPP */
diff --git a/lib/kokkos/example/multi_fem/ParallelDataMap.hpp b/lib/kokkos/example/multi_fem/ParallelDataMap.hpp
new file mode 100644
index 000000000..22a1cfefa
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/ParallelDataMap.hpp
@@ -0,0 +1,517 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef KOKKOS_PARALLELDATAMAP_HPP
+#define KOKKOS_PARALLELDATAMAP_HPP
+
+#include <utility>
+#include <limits>
+#include <iostream>
+#include <sstream>
+#include <stdexcept>
+
+#include <Kokkos_Core.hpp>
+#include <ParallelComm.hpp>
+
+namespace Kokkos {
+
+//----------------------------------------------------------------------------
+/** \brief Parallel distributed data mapping
+ *
+ * ordering { interior : { owned items not sent elsewhere }
+ * send : { owned items sent }
+ * receive : { not-owned items received } }
+ *
+ * recv { { N ghosted items from process P : ( P , N ) } }
+ *
+ * send { { N send items to process P : ( P , N ) } }
+ *
+ * send_item { send item offsets within 'send' range }
+ */
+struct ParallelDataMap {
+ typedef View< unsigned*[2], HostSpace > host_recv_type ;
+ typedef View< unsigned*[2], HostSpace > host_send_type ;
+ typedef View< unsigned* , HostSpace > host_send_item_type ;
+
+ comm::Machine machine ;
+ host_recv_type host_recv ;
+ host_send_type host_send ;
+ host_send_item_type host_send_item ;
+ unsigned count_interior ;
+ unsigned count_send ;
+ unsigned count_owned ; // = count_interior + count_send
+ unsigned count_receive ;
+
+ void assign( const unsigned arg_count_interior ,
+ const unsigned arg_count_owned ,
+ const unsigned arg_count_total ,
+ const unsigned arg_recv_msg ,
+ const unsigned arg_send_msg ,
+ const unsigned arg_send_count )
+ {
+ const std::string label("Kokkos::ParallelDataMap buffer");
+
+ count_interior = arg_count_interior ;
+ count_owned = arg_count_owned ;
+ count_send = arg_count_owned - arg_count_interior ;
+ count_receive = arg_count_total - arg_count_owned ;
+
+ host_recv = host_recv_type( label , arg_recv_msg );
+ host_send = host_send_type( label , arg_send_msg );
+ host_send_item = host_send_item_type( label , arg_send_count );
+ }
+};
+
+//----------------------------------------------------------------------------
+//PackArray
+//----------------------------------------------------------------------------
+template< class ArrayType , class Rank = void >
+struct PackArray ;
+
+template< typename DeviceType, typename ValueType >
+struct PackArray< View< ValueType* , DeviceType > , void >
+{
+ typedef DeviceType execution_space ;
+ typedef typename DeviceType::size_type size_type ;
+ typedef View< ValueType* , execution_space > array_type ;
+ typedef View< ValueType* , execution_space > buffer_type ;
+
+private:
+
+ buffer_type output ;
+ array_type input ;
+ size_type base ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ { output[i] = input(base+i); }
+
+ inline
+ static
+ void pack( const buffer_type & arg_output ,
+ const size_type arg_begin ,
+ const size_type arg_count ,
+ const array_type & arg_input )
+ {
+ PackArray op ;
+ op.output = arg_output ;
+ op.input = arg_input ;
+ op.base = arg_begin ;
+ parallel_for( arg_count , op );
+ }
+};
+
+template< typename DeviceType, typename ValueType , unsigned N1 >
+struct PackArray< View< ValueType*[N1] , DeviceType > , void >
+{
+ typedef DeviceType execution_space ;
+ typedef typename DeviceType::size_type size_type ;
+ typedef View< ValueType*[N1] , execution_space > array_type ;
+ typedef View< ValueType* , execution_space > buffer_type ;
+
+private:
+
+ buffer_type output ;
+ array_type input ;
+ size_type base ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ {
+ for ( size_type j = 0 , k = i * N1 ; j < N1 ; ++j , ++k ) {
+ output[k] = input(base+i,j);
+ }
+ }
+
+ inline static
+ void pack( const buffer_type & arg_output ,
+ const size_type arg_begin ,
+ const size_type arg_count ,
+ const array_type & arg_input )
+ {
+ if ( arg_count ) {
+ PackArray op ;
+ op.output = arg_output ;
+ op.input = arg_input ;
+ op.base = arg_begin ;
+ parallel_for( arg_count , op );
+ }
+ }
+};
+
+//----------------------------------------------------------------------------
+//UnpackArray
+//----------------------------------------------------------------------------
+template< class ArrayType , class Rank = void > struct UnpackArray ;
+
+template< typename DeviceType, typename ValueType >
+struct UnpackArray< View< ValueType* , DeviceType > , void >
+{
+ typedef DeviceType execution_space ;
+ typedef typename DeviceType::size_type size_type ;
+ typedef View< ValueType* , execution_space > array_type ;
+ typedef View< ValueType* , execution_space > buffer_type ;
+
+private:
+
+ array_type output ;
+ buffer_type input ;
+ size_type base ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ { output(base+i) = input[i]; }
+
+ inline
+ static
+ void unpack( const array_type & arg_output ,
+ const buffer_type & arg_input ,
+ const size_type arg_begin ,
+ const size_type arg_count )
+ {
+ UnpackArray op ;
+ op.output = arg_output ;
+ op.input = arg_input ;
+ op.base = arg_begin ;
+ parallel_for( arg_count , op );
+ }
+};
+
+template< typename DeviceType, typename ValueType , unsigned N1 >
+struct UnpackArray< View< ValueType*[N1] , DeviceType > , void >
+{
+ typedef DeviceType execution_space ;
+ typedef typename DeviceType::size_type size_type ;
+ typedef View< ValueType* , execution_space > buffer_type ;
+ typedef View< ValueType*[N1] , execution_space > array_type ;
+
+private:
+
+ array_type output ;
+ buffer_type input ;
+ size_type base ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i ) const
+ {
+ for ( size_type j = 0 , k = i * N1 ; j < N1 ; ++j , ++k ) {
+ output(base+i,j) = input(k);
+ }
+ }
+
+ inline
+ static
+ void unpack( const array_type & arg_output ,
+ const buffer_type & arg_input ,
+ const size_type arg_begin ,
+ const size_type arg_count )
+ {
+ if ( arg_count ) {
+ UnpackArray op ;
+ op.output = arg_output ;
+ op.input = arg_input ;
+ op.base = arg_begin ;
+ parallel_for( arg_count , op );
+ }
+ }
+};
+//----------------------------------------------------------------------------
+template< class ValueType , class Device , class DataMap >
+class AsyncExchange ;
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+// Application call procedure:
+//
+// construct: AsyncExchange object
+// * pack send buffer on device
+// initiate: copy send buffer from device to host
+// * dispatch asynchronous local work
+// complete: send/receive on host, copy receive buffer to device
+// * unpack receive buffer on device
+// destroy: AsyncExchange object
+//
+//----------------------------------------------------------------------------
+
+#ifdef KOKKOS_HAVE_MPI
+
+namespace Kokkos {
+
+template< class ValueType , class Device >
+class AsyncExchange< ValueType, Device , Kokkos::ParallelDataMap > {
+public:
+
+ typedef Device execution_space ;
+ typedef Kokkos::ParallelDataMap data_map_type ;
+ typedef Kokkos::View< ValueType* , execution_space > buffer_dev_type ;
+ typedef typename buffer_dev_type::HostMirror buffer_host_type ;
+
+private:
+
+ static const int mpi_tag = 11 ;
+
+ const data_map_type data_map ;
+ unsigned chunk_size ;
+ unsigned send_count_max ;
+ buffer_host_type host_recv_buffer ;
+ buffer_host_type host_send_buffer ;
+ buffer_host_type send_msg_buffer ;
+ buffer_dev_type dev_buffer ;
+ buffer_dev_type dev_send_buffer ; // Subview for send
+ buffer_dev_type dev_recv_buffer ; // Subview for receive
+ std::vector< MPI_Request > recv_request ;
+
+public:
+
+ const buffer_dev_type & buffer() const { return dev_buffer ; }
+
+ AsyncExchange( const data_map_type & arg_data_map ,
+ const size_t arg_chunk )
+ : data_map( arg_data_map )
+ , chunk_size( arg_chunk )
+ , send_count_max( 0 )
+ , host_recv_buffer()
+ , host_send_buffer()
+ , send_msg_buffer()
+ , dev_buffer()
+ , dev_send_buffer()
+ , dev_recv_buffer()
+ , recv_request()
+ {
+ const size_t send_msg_count = arg_data_map.host_send.dimension_0();
+ const size_t recv_msg_count = arg_data_map.host_recv.dimension_0();
+
+ const size_t send_msg_length = arg_chunk * arg_data_map.count_send ;
+ const size_t recv_msg_length = arg_chunk * arg_data_map.count_receive ;
+
+ for ( size_t i = 0 ; i < send_msg_count ; ++i ) {
+ send_count_max = std::max( send_count_max ,
+ (unsigned) arg_data_map.host_send(i,1) );
+ }
+
+ // A single shared buffer on the device can be used for
+ // send and receive message buffers.
+ dev_buffer = buffer_dev_type(
+ std::string("AsyncExchange dev_buffer") ,
+ std::max( send_msg_length , recv_msg_length ) );
+
+ // Total send subview of the device buffer
+ dev_send_buffer =
+ Kokkos::subview( dev_buffer , std::pair<size_t,size_t>( 0 , send_msg_length ) );
+
+ // Total receive subview of the device buffer
+ dev_recv_buffer =
+ Kokkos::subview( dev_buffer , std::pair<size_t,size_t>( 0 , recv_msg_length ) );
+
+ // Total receive message buffer on the host:
+ host_recv_buffer = buffer_host_type(
+ std::string("AsyncExchange host_recv_buffer") ,
+ recv_msg_length );
+
+ // Total send message buffer on the host:
+ host_send_buffer = buffer_host_type(
+ std::string("AsyncExchange host_send_buffer") ,
+ send_msg_length );
+
+ // Individual send message buffer on the host:
+ send_msg_buffer = buffer_host_type(
+ std::string("AsyncExchange send_msg_buffer") ,
+ arg_chunk * send_count_max );
+
+ // MPI asynchronous receive request handles:
+ recv_request.assign( recv_msg_count , MPI_REQUEST_NULL );
+ }
+
+ //------------------------------------------------------------------------
+
+ void setup()
+ {
+ { // Post receives:
+ const size_t recv_msg_count = data_map.host_recv.dimension_0();
+
+ ValueType * ptr = host_recv_buffer.ptr_on_device();
+
+ for ( size_t i = 0 ; i < recv_msg_count ; ++i ) {
+ const int proc = data_map.host_recv(i,0);
+ const int count = data_map.host_recv(i,1) * chunk_size ;
+
+ MPI_Irecv( ptr , count * sizeof(ValueType) , MPI_BYTE ,
+ proc , mpi_tag , data_map.machine.mpi_comm ,
+ & recv_request[i] );
+
+ ptr += count ;
+ }
+ }
+
+ // Copy send buffer from the device to host memory for sending
+
+ Kokkos::deep_copy( host_send_buffer , dev_send_buffer );
+
+ // Done with the device until communication is complete.
+ // Application can dispatch asynchronous work on the device.
+ }
+
+ // Application can dispatch local work to device ...
+ // No communication progress until main thread calls 'send_receive'
+
+ void send_receive()
+ {
+ const size_t recv_msg_count = data_map.host_recv.dimension_0();
+ const size_t send_msg_count = data_map.host_send.dimension_0();
+
+ // Pack and send:
+
+ for ( size_t i = 0 , j = 0 ; i < send_msg_count ; ++i ) {
+ const int proc = data_map.host_send(i,0);
+ const int count = data_map.host_send(i,1);
+
+ for ( int k = 0 , km = 0 ; k < count ; ++k , ++j ) {
+ const int km_end = km + chunk_size ;
+ int ki = chunk_size * data_map.host_send_item(j);
+
+ for ( ; km < km_end ; ++km , ++ki ) {
+ send_msg_buffer[km] = host_send_buffer[ki];
+ }
+ }
+
+ // MPI_Ssend blocks until
+ // (1) a receive is matched for the message and
+ // (2) the send buffer can be re-used.
+ //
+ // It is suggested that MPI_Ssend will have the best performance:
+ // http://www.mcs.anl.gov/research/projects/mpi/sendmode.html .
+
+ MPI_Ssend( send_msg_buffer.ptr_on_device(),
+ count * chunk_size * sizeof(ValueType) , MPI_BYTE ,
+ proc , mpi_tag , data_map.machine.mpi_comm );
+ }
+
+ // Wait for receives and verify:
+
+ for ( size_t i = 0 ; i < recv_msg_count ; ++i ) {
+ MPI_Status recv_status ;
+ int recv_which = 0 ;
+ int recv_size = 0 ;
+
+ MPI_Waitany( recv_msg_count , & recv_request[0] ,
+ & recv_which , & recv_status );
+
+ const int recv_proc = recv_status.MPI_SOURCE ;
+
+ MPI_Get_count( & recv_status , MPI_BYTE , & recv_size );
+
+ // Verify message properly received:
+
+ const int expected_proc = data_map.host_recv(recv_which,0);
+ const int expected_size = data_map.host_recv(recv_which,1) *
+ chunk_size * sizeof(ValueType);
+
+ if ( ( expected_proc != recv_proc ) ||
+ ( expected_size != recv_size ) ) {
+ std::ostringstream msg ;
+ msg << "AsyncExchange error:"
+ << " P" << comm::rank( data_map.machine )
+ << " received from P" << recv_proc
+ << " size " << recv_size
+ << " expected " << expected_size
+ << " from P" << expected_proc ;
+ throw std::runtime_error( msg.str() );
+ }
+ }
+
+ // Copy received data to device memory.
+
+ Kokkos::deep_copy( dev_recv_buffer , host_recv_buffer );
+ }
+};
+
+} // namespace Kokkos
+
+#else /* ! #ifdef KOKKOS_HAVE_MPI */
+
+namespace Kokkos {
+
+template< class ValueType , class Device >
+class AsyncExchange< ValueType, Device , Kokkos::ParallelDataMap > {
+public:
+
+ typedef Device execution_space ;
+ typedef Kokkos::ParallelDataMap data_map_type ;
+ typedef Kokkos::View< ValueType* , execution_space > buffer_dev_type ;
+ typedef typename buffer_dev_type::HostMirror buffer_host_type ;
+
+ buffer_dev_type dev_buffer ;
+
+public:
+
+ const buffer_dev_type & buffer() const { return dev_buffer ; }
+
+ AsyncExchange( const data_map_type & , const size_t )
+ : dev_buffer()
+ { }
+
+ //------------------------------------------------------------------------
+
+ void setup() { }
+
+ void send_receive() { }
+};
+
+} // namespace Kokkos
+
+#endif /* ! #ifdef KOKKOS_HAVE_MPI */
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef KOKKOS_PARALLELDATAMAP_HPP */
+
+
diff --git a/lib/kokkos/example/multi_fem/ParallelMachine.cpp b/lib/kokkos/example/multi_fem/ParallelMachine.cpp
new file mode 100644
index 000000000..0953cab76
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/ParallelMachine.cpp
@@ -0,0 +1,178 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#if 0
+
+#include <stdlib.h>
+#include <string.h>
+
+#include <ParallelMachine.hpp>
+
+#include <Kokkos_Core.hpp>
+
+#if ! defined( KOKKOS_HAVE_MPI )
+#define MPI_COMM_NULL 0
+#endif
+
+//------------------------------------------------------------------------
+
+namespace Parallel {
+
+Machine::Machine( int * argc , char *** argv )
+ : m_mpi_comm( MPI_COMM_NULL )
+ , m_mpi_size(0)
+ , m_mpi_rank(0)
+ , m_mpi_gpu(0)
+{
+
+#if defined( KOKKOS_HAVE_CUDA )
+ //------------------------------------
+ // Might be using a Cuda aware version of MPI.
+ // Must select Cuda device before initializing MPI.
+ {
+ int i = 1 ;
+ for ( ; i < *argc && strcmp((*argv)[i],"mpi_cuda") ; ++i );
+
+ if ( i < *argc ) {
+ // Determine, if possible, what will be the node-local
+ // rank of the MPI process once MPI has been initialized.
+ // This rank is needed to set the Cuda device before 'mvapich'
+ // is initialized.
+
+ const char * const mvapich_local_rank = getenv("MV2_COMM_WORLD_LOCAL_RANK");
+ const char * const slurm_local_rank = getenv("SLURM_LOCALID");
+
+ const int pre_mpi_local_rank =
+ 0 != mvapich_local_rank ? atoi( mvapich_local_rank ) : (
+ 0 != slurm_local_rank ? atoi( slurm_local_rank ) : (
+ -1 ) );
+
+ if ( 0 <= pre_mpi_local_rank ) {
+
+ const int ngpu = Kokkos::Cuda::detect_device_count();
+
+ const int cuda_device_rank = pre_mpi_local_rank % ngpu ;
+
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice( cuda_device_rank ) );
+
+ m_mpi_gpu = 1 ;
+ }
+ }
+ }
+#endif
+
+ //------------------------------------
+
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Init( argc , argv );
+ m_mpi_comm = MPI_COMM_WORLD ;
+ MPI_Comm_size( m_mpi_comm , & m_mpi_size );
+ MPI_Comm_rank( m_mpi_comm , & m_mpi_rank );
+#endif
+
+ // Query hwloc after MPI initialization to allow MPI binding:
+ //------------------------------------
+ // Request to use host device:
+ {
+ int i = 1 ;
+ for ( ; i < *argc && strcmp((*argv)[i],"host") ; ++i );
+
+ if ( i < *argc ) {
+
+ unsigned team_count = Kokkos::hwloc::get_available_numa_count();
+ unsigned threads_per_team = Kokkos::hwloc::get_available_cores_per_numa() *
+ Kokkos::hwloc::get_available_threads_per_core();
+
+ if ( i + 2 < *argc ) {
+ team_count = atoi( (*argv)[i+1] );
+ threads_per_team = atoi( (*argv)[i+2] );
+ }
+
+ Kokkos::Threads::initialize( team_count * threads_per_team );
+ }
+ }
+
+#if defined( KOKKOS_HAVE_CUDA )
+ //------------------------------------
+ // Request to use Cuda device and not already initialized.
+ if ( ! m_mpi_gpu ) {
+ int i = 1 ;
+ for ( ; i < *argc && strcmp((*argv)[i],"mpi_cuda") && strcmp((*argv)[i],"cuda") ; ++i );
+
+ if ( i < *argc ) {
+
+ const int ngpu = Kokkos::Cuda::detect_device_count();
+
+ const int cuda_device_rank = m_mpi_rank % ngpu ;
+
+ Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice( cuda_device_rank ) );
+ }
+ }
+#endif
+
+}
+
+Machine::~Machine()
+{
+ Kokkos::Threads::finalize();
+#if defined( KOKKOS_HAVE_CUDA )
+ Kokkos::Cuda::finalize();
+#endif
+#if defined( KOKKOS_HAVE_MPI )
+ MPI_Finalize();
+#endif
+}
+
+void Machine::print_configuration( std::ostream & msg ) const
+{
+ msg << "MPI [ " << m_mpi_rank << " / " << m_mpi_size << " ]" << std::endl ;
+ Kokkos::Threads::print_configuration( msg );
+#if defined( KOKKOS_HAVE_CUDA )
+ Kokkos::Cuda::print_configuration( msg );
+#endif
+}
+
+}
+
+#endif /* #if 0 */
+
diff --git a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp b/lib/kokkos/example/multi_fem/ParallelMachine.hpp
old mode 100755
new mode 100644
similarity index 58%
copy from lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp
copy to lib/kokkos/example/multi_fem/ParallelMachine.hpp
index deb955ccd..1ddf50ab3
--- a/lib/kokkos/core/src/Cuda/Kokkos_Cuda_abort.hpp
+++ b/lib/kokkos/example/multi_fem/ParallelMachine.hpp
@@ -1,119 +1,118 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#ifndef KOKKOS_CUDA_ABORT_HPP
-#define KOKKOS_CUDA_ABORT_HPP
+#error "ParallelMachine"
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
-#include "Kokkos_Macros.hpp"
-#if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) && defined( KOKKOS_HAVE_CUDA )
+#ifndef PARALLELMACHINE_HPP
+#define PARALLELMACHINE_HPP
-#include <cuda.h>
+//------------------------------------------------------------------------
-#if ! defined( CUDA_VERSION ) || ( CUDA_VERSION < 4010 )
-#error "Cuda version 4.1 or greater required"
-#endif
+#include <iosfwd>
+
+#include <Kokkos_Core.hpp>
-#if ( __CUDA_ARCH__ < 200 )
-#error "Cuda device capability 2.0 or greater required"
+//------------------------------------------------------------------------
+
+#if defined( KOKKOS_HAVE_MPI )
+#include <mpi.h>
+#else
+ typedef int MPI_Comm ;
#endif
-extern "C" {
-/* Cuda runtime function, declared in <crt/device_runtime.h>
- * Requires capability 2.x or better.
+//------------------------------------------------------------------------
+//------------------------------------------------------------------------
+
+namespace Parallel {
+
+/** \brief Hybrid parallel machine with MPI+Kokkos::Threads or MPI+Kokkos::Cuda.
+ *
+ * Initialization of MPI and Kokkos device has interdependencies which this
+ * class manages. The command line and environment variables are queried to initialize
+ * the Threads or Cuda device:
+ *
+ * 1) cuda : initializes Cuda device
+ * 2) host : initializes Threads device with all hwloc detected cores.
+ * 3) host #gang #worker : initializes Threads with specified
*/
-extern __device__ void __assertfail(
- const void *message,
- const void *file,
- unsigned int line,
- const void *function,
- size_t charsize);
-}
+class Machine {
+private:
-namespace Kokkos {
-namespace Impl {
+ MPI_Comm m_mpi_comm ;
+ int m_mpi_size ;
+ int m_mpi_rank ;
+ unsigned m_mpi_gpu ;
+ unsigned m_gpu_arch ;
-__device__ inline
-void cuda_abort( const char * const message )
-{
-#ifndef __APPLE__
- const char empty[] = "" ;
+ Machine();
+ Machine( const Machine & );
+ Machine & operator = ( const Machine & );
- __assertfail( (const void *) message ,
- (const void *) empty ,
- (unsigned int) 0 ,
- (const void *) empty ,
- sizeof(char) );
-#endif
-}
+public:
-} // namespace Impl
-} // namespace Kokkos
+ /** \brief Coordinated initialize MPI, Cuda, or Threads devices from 'main'. */
+ Machine( int * argc , char *** argv );
-#else
+ ~Machine();
-namespace Kokkos {
-namespace Impl {
-KOKKOS_INLINE_FUNCTION
-void cuda_abort( const char * const ) {}
-}
-}
+ MPI_Comm mpi_comm() const { return m_mpi_comm ; }
-#endif /* #if defined( __CUDACC__ ) && defined( __CUDA_ARCH__ ) */
+ int mpi_size() const { return m_mpi_size ; }
+ int mpi_rank() const { return m_mpi_rank ; }
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+ /** \brief If using MPI that can directly operate on GPU memory */
+ bool mpi_gpu() const { return m_mpi_gpu ; }
+
+ /** \brief If using GPU then what architecture */
+ unsigned gpu_arch() const { return m_gpu_arch ; }
+
+ void print_configuration( std::ostream & ) const ;
+};
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA )
-namespace Kokkos {
-__device__ inline
-void abort( const char * const message ) { Kokkos::Impl::cuda_abort(message); }
}
-#endif /* defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) */
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+//------------------------------------------------------------------------
+
+#endif /* #ifndef PARALLELMACHINE_HPP */
-#endif /* #ifndef KOKKOS_CUDA_ABORT_HPP */
diff --git a/lib/kokkos/example/multi_fem/SparseLinearSystem.hpp b/lib/kokkos/example/multi_fem/SparseLinearSystem.hpp
new file mode 100644
index 000000000..6ab42da50
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/SparseLinearSystem.hpp
@@ -0,0 +1,400 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef SPARSELINEARSYSTEM_HPP
+#define SPARSELINEARSYSTEM_HPP
+
+#include <cmath>
+#include <impl/Kokkos_Timer.hpp>
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_StaticCrsGraph.hpp>
+
+#include <LinAlgBLAS.hpp>
+
+namespace Kokkos {
+
+template< typename ScalarType , class Device >
+struct CrsMatrix {
+ typedef Device execution_space ;
+ typedef ScalarType value_type ;
+
+ typedef StaticCrsGraph< int , execution_space , void , int > graph_type ;
+ typedef View< value_type* , execution_space > coefficients_type ;
+
+ graph_type graph ;
+ coefficients_type coefficients ;
+};
+
+//----------------------------------------------------------------------------
+
+namespace Impl {
+
+template< class Matrix , class OutputVector , class InputVector >
+struct Multiply ;
+
+}
+}
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+template< typename AScalarType ,
+ typename VScalarType ,
+ class DeviceType >
+struct Multiply< CrsMatrix<AScalarType,DeviceType> ,
+ View<VScalarType*,DeviceType > ,
+ View<VScalarType*,DeviceType > >
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ typedef View< VScalarType*, execution_space, MemoryUnmanaged > vector_type ;
+ typedef View< const VScalarType*, execution_space, MemoryUnmanaged > vector_const_type ;
+
+ typedef CrsMatrix< AScalarType , execution_space > matrix_type ;
+
+private:
+
+ matrix_type m_A ;
+ vector_const_type m_x ;
+ vector_type m_y ;
+
+public:
+
+ //--------------------------------------------------------------------------
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type iRow ) const
+ {
+ const size_type iEntryBegin = m_A.graph.row_map[iRow];
+ const size_type iEntryEnd = m_A.graph.row_map[iRow+1];
+
+ double sum = 0 ;
+
+#if defined( __INTEL_COMPILER )
+#pragma simd reduction(+:sum)
+#pragma ivdep
+ for ( size_type iEntry = iEntryBegin ; iEntry < iEntryEnd ; ++iEntry ) {
+ sum += m_A.coefficients(iEntry) * m_x( m_A.graph.entries(iEntry) );
+ }
+#else
+ for ( size_type iEntry = iEntryBegin ; iEntry < iEntryEnd ; ++iEntry ) {
+ sum += m_A.coefficients(iEntry) * m_x( m_A.graph.entries(iEntry) );
+ }
+#endif
+
+ m_y(iRow) = sum ;
+ }
+
+ Multiply( const matrix_type & A ,
+ const size_type nrow ,
+ const size_type , // ncol ,
+ const vector_type & x ,
+ const vector_type & y )
+ : m_A( A ), m_x( x ), m_y( y )
+ {
+ parallel_for( nrow , *this );
+ }
+};
+
+//----------------------------------------------------------------------------
+
+} // namespace Impl
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+
+//----------------------------------------------------------------------------
+
+template< typename AScalarType ,
+ typename VScalarType ,
+ class Device >
+class Operator {
+ typedef CrsMatrix<AScalarType,Device> matrix_type ;
+ typedef View<VScalarType*,Device> vector_type ;
+
+private:
+ const CrsMatrix<AScalarType,Device> A ;
+
+ ParallelDataMap data_map ;
+ AsyncExchange< VScalarType , Device , ParallelDataMap > exchange ;
+
+public:
+
+ Operator( const ParallelDataMap & arg_data_map ,
+ const CrsMatrix<AScalarType,Device> & arg_A )
+ : A( arg_A )
+ , data_map( arg_data_map )
+ , exchange( arg_data_map , 1 )
+ {}
+
+ void apply( const View<VScalarType*,Device> & x ,
+ const View<VScalarType*,Device> & y )
+ {
+ // Gather off-processor data for 'x'
+
+ PackArray< vector_type >::pack( exchange.buffer() ,
+ data_map.count_interior ,
+ data_map.count_send , x );
+
+ exchange.setup();
+
+ // If interior & boundary matrices then could launch interior multiply
+
+ exchange.send_receive();
+
+ UnpackArray< vector_type >::unpack( x , exchange.buffer() ,
+ data_map.count_owned ,
+ data_map.count_receive );
+
+ const typename Device::size_type nrow = data_map.count_owned ;
+ const typename Device::size_type ncol = data_map.count_owned +
+ data_map.count_receive ;
+
+ Impl::Multiply<matrix_type,vector_type,vector_type>( A, nrow, ncol, x, y);
+ }
+};
+
+//----------------------------------------------------------------------------
+
+template< typename AScalarType , typename VScalarType , class Device >
+void cgsolve(
+ const ParallelDataMap data_map ,
+ const CrsMatrix<AScalarType,Device> A ,
+ const View<VScalarType*,Device> b ,
+ const View<VScalarType*,Device> x ,
+ size_t & iteration ,
+ double & normr ,
+ double & iter_time ,
+ const size_t maximum_iteration = 200 ,
+ const double tolerance = std::numeric_limits<VScalarType>::epsilon() )
+{
+ typedef View<VScalarType*,Device> vector_type ;
+ //typedef View<VScalarType, Device> value_type ; // unused
+
+ const size_t count_owned = data_map.count_owned ;
+ const size_t count_total = data_map.count_owned + data_map.count_receive ;
+
+ Operator<AScalarType,VScalarType,Device> matrix_operator( data_map , A );
+
+ // Need input vector to matvec to be owned + received
+ vector_type pAll ( "cg::p" , count_total );
+
+ vector_type p = Kokkos::subview( pAll , std::pair<size_t,size_t>(0,count_owned) );
+ vector_type r ( "cg::r" , count_owned );
+ vector_type Ap( "cg::Ap", count_owned );
+
+ /* r = b - A * x ; */
+
+ /* p = x */ deep_copy( p , x );
+ /* Ap = A * p */ matrix_operator.apply( pAll , Ap );
+ /* r = b - Ap */ waxpby( count_owned , 1.0 , b , -1.0 , Ap , r );
+ /* p = r */ deep_copy( p , r );
+
+ double old_rdot = dot( count_owned , r , data_map.machine );
+
+ normr = sqrt( old_rdot );
+ iteration = 0 ;
+
+ Kokkos::Impl::Timer wall_clock ;
+
+ while ( tolerance < normr && iteration < maximum_iteration ) {
+
+ /* pAp_dot = dot( p , Ap = A * p ) */
+
+ /* Ap = A * p */ matrix_operator.apply( pAll , Ap );
+
+ const double pAp_dot = dot( count_owned , p , Ap , data_map.machine );
+ const double alpha = old_rdot / pAp_dot ;
+
+ /* x += alpha * p ; */ axpy( count_owned, alpha, p , x );
+ /* r -= alpha * Ap ; */ axpy( count_owned, -alpha, Ap, r );
+
+ const double r_dot = dot( count_owned , r , data_map.machine );
+ const double beta = r_dot / old_rdot ;
+
+ /* p = r + beta * p ; */ xpby( count_owned , r , beta , p );
+
+ normr = sqrt( old_rdot = r_dot );
+ ++iteration ;
+ }
+
+ iter_time = wall_clock.seconds();
+}
+
+//----------------------------------------------------------------------------
+
+} // namespace Kokkos
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#if defined( KOKKOS_HAVE_CUDA )
+
+#if ( CUDA_VERSION < 6000 )
+#pragma message "cusparse_v2.h"
+#include <cusparse_v2.h>
+#else
+#pragma message "cusparse.h"
+#include <cusparse.h>
+#endif
+
+namespace Kokkos {
+namespace Impl {
+
+struct CudaSparseSingleton {
+ cusparseHandle_t handle;
+ cusparseMatDescr_t descra;
+
+ CudaSparseSingleton()
+ {
+ cusparseCreate( & handle );
+ cusparseCreateMatDescr( & descra );
+ cusparseSetMatType( descra , CUSPARSE_MATRIX_TYPE_GENERAL );
+ cusparseSetMatIndexBase( descra , CUSPARSE_INDEX_BASE_ZERO );
+ }
+
+ static CudaSparseSingleton & singleton();
+
+};
+
+template<>
+struct Multiply< CrsMatrix<double,Cuda> ,
+ View<double*,Cuda > ,
+ View<double*,Cuda > >
+{
+ typedef Cuda execution_space ;
+ typedef execution_space::size_type size_type ;
+ typedef double scalar_type ;
+ typedef View< scalar_type* , execution_space > vector_type ;
+ typedef CrsMatrix< scalar_type , execution_space > matrix_type ;
+
+public:
+
+ Multiply( const matrix_type & A ,
+ const size_type nrow ,
+ const size_type ncol ,
+ const vector_type & x ,
+ const vector_type & y )
+ {
+ CudaSparseSingleton & s = CudaSparseSingleton::singleton();
+ const scalar_type alpha = 1 , beta = 0 ;
+
+ cusparseStatus_t status =
+ cusparseDcsrmv( s.handle ,
+ CUSPARSE_OPERATION_NON_TRANSPOSE ,
+ nrow , ncol , A.coefficients.dimension_0() ,
+ &alpha ,
+ s.descra ,
+ A.coefficients.ptr_on_device() ,
+ A.graph.row_map.ptr_on_device() ,
+ A.graph.entries.ptr_on_device() ,
+ x.ptr_on_device() ,
+ &beta ,
+ y.ptr_on_device() );
+
+ if ( CUSPARSE_STATUS_SUCCESS != status ) {
+ throw std::runtime_error( std::string("ERROR - cusparseDcsrmv " ) );
+ }
+ }
+};
+
+
+template<>
+struct Multiply< CrsMatrix<float,Cuda> ,
+ View<float*,Cuda > ,
+ View<float*,Cuda > >
+{
+ typedef Cuda execution_space ;
+ typedef execution_space::size_type size_type ;
+ typedef float scalar_type ;
+ typedef View< scalar_type* , execution_space > vector_type ;
+ typedef CrsMatrix< scalar_type , execution_space > matrix_type ;
+
+public:
+
+ Multiply( const matrix_type & A ,
+ const size_type nrow ,
+ const size_type ncol ,
+ const vector_type & x ,
+ const vector_type & y )
+ {
+ CudaSparseSingleton & s = CudaSparseSingleton::singleton();
+ const scalar_type alpha = 1 , beta = 0 ;
+
+ cusparseStatus_t status =
+ cusparseScsrmv( s.handle ,
+ CUSPARSE_OPERATION_NON_TRANSPOSE ,
+ nrow , ncol , A.coefficients.dimension_0() ,
+ &alpha ,
+ s.descra ,
+ A.coefficients.ptr_on_device() ,
+ A.graph.row_map.ptr_on_device() ,
+ A.graph.entries.ptr_on_device() ,
+ x.ptr_on_device() ,
+ &beta ,
+ y.ptr_on_device() );
+
+ if ( CUSPARSE_STATUS_SUCCESS != status ) {
+ throw std::runtime_error( std::string("ERROR - cusparseDcsrmv " ) );
+ }
+ }
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef SPARSELINEARSYSTEM_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/SparseLinearSystemFill.hpp b/lib/kokkos/example/multi_fem/SparseLinearSystemFill.hpp
new file mode 100644
index 000000000..78680cfb6
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/SparseLinearSystemFill.hpp
@@ -0,0 +1,276 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef SPARSELINEARSYSTEMFILL_HPP
+#define SPARSELINEARSYSTEMFILL_HPP
+
+#include <vector>
+#include <algorithm>
+#include <limits>
+
+#include <FEMesh.hpp>
+#include <SparseLinearSystem.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace HybridFEM {
+
+template< class MatrixType , class MeshType ,
+ class elem_matrices_type ,
+ class elem_vectors_type > struct GatherFill ;
+
+
+template< typename ScalarType ,
+ class DeviceType ,
+ unsigned ElemNode ,
+ typename CoordScalarType ,
+ class elem_matrices_type ,
+ class elem_vectors_type >
+struct GatherFill<
+ Kokkos::CrsMatrix< ScalarType , DeviceType > ,
+ FEMesh< CoordScalarType , ElemNode , DeviceType > ,
+ elem_matrices_type , elem_vectors_type >
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ static const size_type ElemNodeCount = ElemNode ;
+
+ typedef Kokkos::CrsMatrix< ScalarType , execution_space > matrix_type ;
+ typedef typename matrix_type::coefficients_type coefficients_type ;
+ typedef Kokkos::View< ScalarType[] , execution_space > vector_type ;
+ typedef Kokkos::View< size_type[][ElemNodeCount][ElemNodeCount] , execution_space > elem_graph_type ;
+
+ typedef FEMesh< CoordScalarType , ElemNodeCount , execution_space > mesh_type ;
+ typedef typename mesh_type::node_elem_ids_type node_elem_ids_type ;
+
+private:
+
+ node_elem_ids_type node_elem_ids ;
+ elem_graph_type elem_graph ;
+ elem_matrices_type elem_matrices ;
+ elem_vectors_type elem_vectors ;
+ coefficients_type system_coeff ;
+ vector_type system_rhs ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( size_type irow ) const
+ {
+ const size_type node_elem_begin = node_elem_ids.row_map[irow];
+ const size_type node_elem_end = node_elem_ids.row_map[irow+1];
+
+ // for each element that a node belongs to
+
+ for ( size_type i = node_elem_begin ; i < node_elem_end ; i++ ) {
+
+ const size_type elem_id = node_elem_ids.entries( i, 0);
+ const size_type row_index = node_elem_ids.entries( i, 1);
+
+ system_rhs(irow) += elem_vectors(elem_id, row_index);
+
+ // for each node in a particular related element
+ // gather the contents of the element stiffness
+ // matrix that belong in irow
+
+ for ( size_type j = 0 ; j < ElemNodeCount ; ++j ){
+ const size_type A_index = elem_graph( elem_id , row_index , j );
+
+ system_coeff( A_index ) += elem_matrices( elem_id, row_index, j );
+ }
+ }
+ }
+
+
+ static void apply( const matrix_type & matrix ,
+ const vector_type & rhs ,
+ const mesh_type & mesh ,
+ const elem_graph_type & elem_graph ,
+ const elem_matrices_type & elem_matrices ,
+ const elem_vectors_type & elem_vectors )
+ {
+ const size_t row_count = matrix.graph.row_map.dimension_0() - 1 ;
+ GatherFill op ;
+ op.node_elem_ids = mesh.node_elem_ids ;
+ op.elem_graph = elem_graph ;
+ op.elem_matrices = elem_matrices ;
+ op.elem_vectors = elem_vectors ;
+ op.system_coeff = matrix.coefficients ;
+ op.system_rhs = rhs ;
+
+ parallel_for( row_count , op );
+ }
+};
+
+} /* namespace HybridFEM */
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace HybridFEM {
+
+template< class GraphType , class MeshType >
+struct GraphFactory {
+ typedef GraphType graph_type ;
+ typedef MeshType mesh_type ;
+ typedef typename graph_type::execution_space execution_space ;
+ typedef typename execution_space::size_type size_type ;
+
+ static const unsigned ElemNodeCount = mesh_type::element_node_count ;
+
+ typedef Kokkos::View< size_type[][ElemNodeCount][ElemNodeCount] , execution_space > element_map_type ;
+
+ static
+ void
+ create( const mesh_type & mesh ,
+ graph_type & graph ,
+ element_map_type & elem_map )
+ {
+ typename mesh_type::node_elem_ids_type::HostMirror
+ node_elem_ids = create_mirror( mesh.node_elem_ids );
+
+ typename mesh_type::elem_node_ids_type::HostMirror
+ elem_node_ids = create_mirror( mesh.elem_node_ids );
+
+ typedef typename element_map_type::HostMirror element_map_host_type ;
+
+ deep_copy( elem_node_ids , mesh.elem_node_ids );
+ deep_copy( node_elem_ids.entries , mesh.node_elem_ids.entries );
+
+ const size_t owned_node = mesh.parallel_data_map.count_owned ;
+ const size_t total_elem = mesh.elem_node_ids.dimension_0();
+
+ if ( total_elem ) {
+ elem_map = element_map_type( std::string("element_map"), total_elem );
+ }
+
+ element_map_host_type elem_map_host = create_mirror( elem_map );
+
+ //------------------------------------
+ // Node->node mapping for the CrsMatrix graph
+
+ std::vector< std::vector< unsigned > > node_node_ids( owned_node );
+ std::vector< unsigned > node_node_begin( owned_node );
+
+ size_t offset = 0 ;
+ for ( size_t i = 0 ; i < owned_node ; ++i ) {
+ const size_t j_end = node_elem_ids.row_map[i+1];
+ size_t j = node_elem_ids.row_map[i];
+
+ node_node_begin[i] = offset ;
+
+ std::vector< unsigned > & work = node_node_ids[i] ;
+
+ for ( ; j < j_end ; ++j ) {
+ const size_t elem_id = node_elem_ids.entries(j,0);
+ for ( size_t k = 0 ; k < ElemNodeCount ; ++k ) {
+ work.push_back( elem_node_ids( elem_id , k ) );
+ }
+ }
+
+ std::sort( work.begin() , work.end() );
+
+ work.erase( std::unique( work.begin() , work.end() ) , work.end() );
+
+ offset += work.size();
+ }
+
+ graph = Kokkos::create_staticcrsgraph< graph_type >( "node_node_ids" , node_node_ids );
+
+ //------------------------------------
+ // ( element , node_row , node_column ) -> matrix_crs_column
+
+ for ( size_t elem_id = 0 ; elem_id < total_elem ; ++elem_id ) {
+ for ( size_t i = 0 ; i < ElemNodeCount ; ++i ) {
+
+ const size_t node_row = elem_node_ids( elem_id , i );
+ const size_t node_row_begin = node_node_begin[ node_row ];
+ const std::vector< unsigned > & column = node_node_ids[ node_row ] ;
+
+ if ( owned_node <= node_row ) {
+ for ( unsigned j = 0 ; j < ElemNodeCount ; ++j ) {
+ elem_map_host( elem_id , i , j ) = std::numeric_limits<size_type>::max();
+ }
+ }
+ else {
+
+ for ( unsigned j = 0 ; j < ElemNodeCount ; ++j ) {
+ const size_type node_col = elem_node_ids( elem_id , j );
+
+ int col_search = 0 ;
+
+ for ( int len = column.size() ; 0 < len ; ) {
+
+ const int half = len >> 1;
+ const int middle = col_search + half ;
+
+ if ( column[middle] < node_col ){
+ col_search = middle + 1 ;
+ len -= half + 1 ;
+ }
+ else {
+ len = half ;
+ }
+ }
+if ( node_col != column[col_search] ) {
+ throw std::runtime_error(std::string("Failed"));
+}
+ elem_map_host( elem_id , i , j ) = col_search + node_row_begin ;
+ }
+ }
+ }
+ }
+
+ deep_copy( elem_map , elem_map_host );
+ }
+};
+
+} // namespace HybridFEM
+
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef SPARSELINEARSYSTEMFILL_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/SparseLinearSystem_Cuda.hpp b/lib/kokkos/example/multi_fem/SparseLinearSystem_Cuda.hpp
new file mode 100644
index 000000000..3b22d4c5d
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/SparseLinearSystem_Cuda.hpp
@@ -0,0 +1,164 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef SPARSELINEARSYSTEM_CUDA_HPP
+#define SPARSELINEARSYSTEM_CUDA_HPP
+
+#if defined( BUILD_FROM_CU_FILE )
+
+#include <cusparse_v2.h>
+#include <Kokkos_Core.hpp>
+
+namespace Kokkos {
+namespace Impl {
+
+
+struct CudaSparseSingleton {
+ cusparseHandle_t handle;
+ cusparseMatDescr_t descra;
+
+ CudaSparseSingleton()
+ {
+ cusparseCreate( & handle );
+ cusparseCreateMatDescr( & descra );
+ cusparseSetMatType( descra , CUSPARSE_MATRIX_TYPE_GENERAL );
+ cusparseSetMatIndexBase( descra , CUSPARSE_INDEX_BASE_ZERO );
+ }
+
+ static CudaSparseSingleton & singleton();
+
+};
+
+CudaSparseSingleton & CudaSparseSingleton::singleton()
+{ static CudaSparseSingleton s ; return s ; }
+
+
+template<>
+struct Multiply< CrsMatrix<double,Cuda> ,
+ View<double*,Cuda > ,
+ View<double*,Cuda > >
+{
+ typedef Cuda execution_space ;
+ typedef execution_space::size_type size_type ;
+ typedef double scalar_type ;
+ typedef View< scalar_type* , execution_space > vector_type ;
+ typedef CrsMatrix< scalar_type , execution_space > matrix_type ;
+
+public:
+
+ Multiply( const matrix_type & A ,
+ const size_type nrow ,
+ const size_type ncol ,
+ const vector_type & x ,
+ const vector_type & y )
+ {
+ CudaSparseSingleton & s = CudaSparseSingleton::singleton();
+ const scalar_type alpha = 1 , beta = 0 ;
+
+ cusparseStatus_t status =
+ cusparseDcsrmv( s.handle ,
+ CUSPARSE_OPERATION_NON_TRANSPOSE ,
+ nrow , ncol , A.coefficients.dimension_0() ,
+ &alpha ,
+ s.descra ,
+ A.coefficients.ptr_on_device() ,
+ A.graph.row_map.ptr_on_device() ,
+ A.graph.entries.ptr_on_device() ,
+ x.ptr_on_device() ,
+ &beta ,
+ y.ptr_on_device() );
+
+ if ( CUSPARSE_STATUS_SUCCESS != status ) {
+ throw std::runtime_error( std::string("ERROR - cusparseDcsrmv " ) );
+ }
+ }
+};
+
+
+template<>
+struct Multiply< CrsMatrix<float,Cuda> ,
+ View<float*,Cuda > ,
+ View<float*,Cuda > >
+{
+ typedef Cuda execution_space ;
+ typedef execution_space::size_type size_type ;
+ typedef float scalar_type ;
+ typedef View< scalar_type* , execution_space > vector_type ;
+ typedef CrsMatrix< scalar_type , execution_space > matrix_type ;
+
+public:
+
+ Multiply( const matrix_type & A ,
+ const size_type nrow ,
+ const size_type ncol ,
+ const vector_type & x ,
+ const vector_type & y )
+ {
+ CudaSparseSingleton & s = CudaSparseSingleton::singleton();
+ const scalar_type alpha = 1 , beta = 0 ;
+
+ cusparseStatus_t status =
+ cusparseScsrmv( s.handle ,
+ CUSPARSE_OPERATION_NON_TRANSPOSE ,
+ nrow , ncol , A.coefficients.dimension_0() ,
+ &alpha ,
+ s.descra ,
+ A.coefficients.ptr_on_device() ,
+ A.graph.row_map.ptr_on_device() ,
+ A.graph.entries.ptr_on_device() ,
+ x.ptr_on_device() ,
+ &beta ,
+ y.ptr_on_device() );
+
+ if ( CUSPARSE_STATUS_SUCCESS != status ) {
+ throw std::runtime_error( std::string("ERROR - cusparseDcsrmv " ) );
+ }
+ }
+};
+
+} /* namespace Impl */
+} /* namespace Kokkos */
+
+#endif /* #if defined( __CUDACC__ ) */
+#endif /* #ifndef SPARSELINEARSYSTEM_CUDA_HPP */
+
diff --git a/lib/kokkos/example/multi_fem/TestBoxMeshFixture.hpp b/lib/kokkos/example/multi_fem/TestBoxMeshFixture.hpp
new file mode 100644
index 000000000..9cc32b6b1
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/TestBoxMeshFixture.hpp
@@ -0,0 +1,242 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef TESTFEMESHBOXFIXTURE_HPP
+#define TESTFEMESHBOXFIXTURE_HPP
+
+#include <stdio.h>
+#include <iostream>
+#include <stdexcept>
+#include <limits>
+#include <utility>
+#include <BoxMeshFixture.hpp>
+
+#include <ParallelComm.hpp>
+
+//----------------------------------------------------------------------------
+
+namespace TestFEMesh {
+
+template< class ViewType >
+struct VerifyUnpack ;
+
+template< typename DeviceType, typename T >
+struct VerifyUnpack< Kokkos::View< T*[3] , DeviceType > >
+{
+ typedef DeviceType execution_space ;
+ typedef typename execution_space::size_type size_type ;
+ typedef size_type value_type ;
+
+ typedef Kokkos::View< T* , execution_space > buffer_type ;
+ typedef Kokkos::View< T*[3] , execution_space > array_type ;
+
+private:
+
+ array_type node_coords ;
+ buffer_type buffer ;
+ size_type node_begin ;
+
+public:
+
+ KOKKOS_INLINE_FUNCTION
+ static void init( value_type & update )
+ { update = 0 ; }
+
+ KOKKOS_INLINE_FUNCTION
+ static void join( volatile value_type & update ,
+ const volatile value_type & source )
+ { update += source ; }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator()( const size_type i , value_type & update ) const
+ {
+ const size_type node_id = i + node_begin ;
+ const size_type k = i * 3 ;
+
+ const long xb = buffer[k];
+ const long yb = buffer[k+1];
+ const long zb = buffer[k+2];
+ const long xn = node_coords(node_id,0);
+ const long yn = node_coords(node_id,1);
+ const long zn = node_coords(node_id,2);
+
+ if ( xb != xn || yb != yn || zb != zn ) {
+ printf("TestFEMesh::VerifyUnpack failed at %d : node %d : { %ld %ld %ld } != { %ld %ld %ld }\n",
+ (int)i,(int)node_id, xb,yb,zb, xn, yn, zn );
+ ++update ;
+ }
+ }
+
+ static inline
+ size_type unpack( const array_type & arg_node_coords ,
+ const size_type arg_node_begin ,
+ const size_type arg_node_count ,
+ const buffer_type & arg_buffer )
+ {
+ VerifyUnpack op ;
+ op.node_coords = arg_node_coords ;
+ op.buffer = arg_buffer ;
+ op.node_begin = arg_node_begin ;
+ size_type count = 0 ;
+ Kokkos::parallel_reduce( arg_node_count , op , count );
+ return count ;
+ }
+};
+
+}
+
+//----------------------------------------------------------------------------
+
+#ifdef KOKKOS_HAVE_MPI
+
+namespace TestFEMesh {
+
+template< typename coordinate_scalar_type ,
+ unsigned ElemNodeCount ,
+ class Device >
+void verify_parallel(
+ const HybridFEM::FEMesh< coordinate_scalar_type ,
+ ElemNodeCount ,
+ Device > & mesh )
+{
+ typedef HybridFEM::FEMesh< coordinate_scalar_type, ElemNodeCount, Device > femesh_type ;
+ typedef typename femesh_type::node_coords_type node_coords_type ;
+
+ comm::Machine machine = mesh.parallel_data_map.machine ;
+
+ // Communicate node coordinates to verify communication and setup.
+
+ const size_t chunk_size = 3 ;
+
+ Kokkos::AsyncExchange< coordinate_scalar_type, Device, Kokkos::ParallelDataMap >
+ exchange( mesh.parallel_data_map , chunk_size );
+
+ const size_t send_begin = mesh.parallel_data_map.count_interior ;
+ const size_t send_count = mesh.parallel_data_map.count_send ;
+
+ const size_t recv_begin = mesh.parallel_data_map.count_owned ;
+ const size_t recv_count = mesh.parallel_data_map.count_receive ;
+
+ typedef Kokkos::PackArray< node_coords_type > pack_type ;
+
+ pack_type::pack( exchange.buffer(), send_begin, send_count, mesh.node_coords );
+
+ exchange.setup();
+
+ // Launch local-action device kernels
+
+ exchange.send_receive();
+
+ unsigned long local[3] ;
+ local[0] = mesh.parallel_data_map.count_owned ;
+ local[1] = mesh.parallel_data_map.count_receive ;
+ local[2] = TestFEMesh::VerifyUnpack< node_coords_type >::unpack( mesh.node_coords, recv_begin, recv_count, exchange.buffer() );
+
+ unsigned long global[3] = { 0 , 0 , 0 };
+
+ MPI_Allreduce( local , global ,
+ 3 , MPI_UNSIGNED_LONG , MPI_SUM , machine.mpi_comm );
+
+ if ( 0 == comm::rank( machine ) ) {
+ std::cout << ( global[2] ? "FAILED" : "PASSED" )
+ << ": TestFEMesh::verify_parallel "
+ << "NP(" << comm::size( machine )
+ << ") total_node(" << global[0]
+ << ") verified_nodes(" << global[1]
+ << ") failed_nodes(" << global[2]
+ << ")" << std::endl ;
+ }
+}
+
+} // namespace TestFEMesh
+
+#else /* ! #ifdef KOKKOS_HAVE_MPI */
+
+namespace TestFEMesh {
+
+template< typename coordinate_scalar_type ,
+ unsigned ElemNodeCount ,
+ class Device >
+void verify_parallel(
+ const HybridFEM::FEMesh< coordinate_scalar_type ,
+ ElemNodeCount ,
+ Device > & )
+{}
+
+} // namespace TestFEMesh
+
+#endif /* ! #ifdef KOKKOS_HAVE_MPI */
+
+//----------------------------------------------------------------------------
+
+template< class Device >
+void test_box_fixture( comm::Machine machine ,
+ const size_t gang_count ,
+ const size_t nodes_nx ,
+ const size_t nodes_ny ,
+ const size_t nodes_nz )
+{
+ typedef long coordinate_scalar_type ;
+ typedef FixtureElementHex8 fixture_element_type ;
+
+ typedef BoxMeshFixture< coordinate_scalar_type ,
+ Device ,
+ fixture_element_type > fixture_type ;
+
+ typedef typename fixture_type::FEMeshType mesh_type ;
+
+ const size_t proc_count = comm::size( machine );
+ const size_t proc_local = comm::rank( machine ) ;
+
+ mesh_type mesh =
+ fixture_type::create( proc_count , proc_local , gang_count ,
+ nodes_nx - 1 , nodes_ny - 1 , nodes_nz - 1 );
+
+ mesh.parallel_data_map.machine = machine ;
+
+ TestFEMesh::verify_parallel( mesh );
+}
+
+#endif /* #ifndef TESTFEMESHBOXFIXTURE_HPP */
+
+
diff --git a/lib/kokkos/example/multi_fem/TestBoxMeshPartition.cpp b/lib/kokkos/example/multi_fem/TestBoxMeshPartition.cpp
new file mode 100644
index 000000000..ffaeeb6af
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/TestBoxMeshPartition.cpp
@@ -0,0 +1,172 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+#include <iostream>
+#include <stdexcept>
+#include <limits>
+#include <utility>
+#include <BoxMeshPartition.hpp>
+
+//----------------------------------------------------------------------------
+
+void test_box_partition( bool print )
+{
+ const size_t np_max = 10000 ;
+
+ const BoxBoundsLinear use_box ;
+
+ BoxType root_box ;
+
+ root_box[0][0] = 0 ; root_box[0][1] = 100 ;
+ root_box[1][0] = 0 ; root_box[1][1] = 200 ;
+ root_box[2][0] = 0 ; root_box[2][1] = 300 ;
+
+ const size_t cell_total =
+ ( root_box[0][1] - root_box[0][0] ) *
+ ( root_box[1][1] - root_box[1][0] ) *
+ ( root_box[2][1] - root_box[2][0] );
+
+ for ( size_t np = 2 ; np < np_max ; np = 2 * ( np + 1 ) ) {
+
+ std::vector<BoxType> part_boxes( np );
+
+ box_partition_rcb( root_box , part_boxes );
+
+ size_t cell_goal = ( cell_total + np - 1 ) / np ;
+ size_t cell_max = 0 ;
+
+ for ( size_t i = 0 ; i < np ; ++i ) {
+ cell_max = std::max( cell_max , count( part_boxes[i] ) );
+ }
+
+ if ( print ) {
+ std::cout << std::endl
+ << "box_part( " << np
+ << " ) max( " << cell_max
+ << " ) goal( " << cell_goal
+ << " ) ratio( " << double(cell_max) / double(cell_goal)
+ << " )" << std::endl ;
+ }
+
+ const size_t nsample = std::min(np,(size_t)4);
+ const size_t stride = ( np + nsample - 1 ) / nsample ;
+
+ for ( size_t my_part = 0 ; my_part < np ; my_part += stride ) {
+ BoxType my_use_box ;
+ std::vector<size_t> my_use_id_map ;
+ size_t my_count_interior ;
+ size_t my_count_owned ;
+ size_t my_count_uses ;
+ std::vector<size_t> my_recv_counts ;
+ std::vector<std::vector<size_t> > my_send_map ;
+
+ size_t count_verify = 0 ;
+
+ box_partition_maps( root_box , part_boxes ,
+ use_box , my_part ,
+ my_use_box , my_use_id_map ,
+ my_count_interior ,
+ my_count_owned ,
+ my_count_uses ,
+ my_recv_counts ,
+ my_send_map );
+
+ count_verify = my_count_owned ;
+
+ if ( print ) {
+ std::cout << " my_part(" << my_part << ") layout { "
+ << "P" << my_part
+ << "(" << my_count_interior
+ << "," << ( my_count_owned - my_count_interior )
+ << ")" ;
+ }
+
+ for ( size_t i = 1 ; i < np ; ++i ) {
+ if ( my_recv_counts[i] ) {
+ count_verify += my_recv_counts[i] ;
+ const size_t ip = ( my_part + i ) % np ;
+
+ if ( print ) {
+ std::cout << " P" << ip << "(" << my_recv_counts[i] << ")" ;
+ }
+
+ // Compare recv & send lists
+
+ BoxType ip_use_box ;
+ std::vector<size_t> ip_use_id_map ;
+ size_t ip_count_interior ;
+ size_t ip_count_owned ;
+ size_t ip_count_uses ;
+ std::vector<size_t> ip_recv_counts ;
+ std::vector<std::vector<size_t> > ip_send_map ;
+
+ box_partition_maps( root_box , part_boxes ,
+ use_box , ip ,
+ ip_use_box , ip_use_id_map ,
+ ip_count_interior ,
+ ip_count_owned ,
+ ip_count_uses ,
+ ip_recv_counts ,
+ ip_send_map );
+
+ // Sent by ip, received by my_part:
+
+ const BoxType recv_send = intersect( part_boxes[ip] , my_use_box );
+ const size_t recv_send_count = count( recv_send );
+
+ const size_t j = ( my_part + np - ip ) % np ;
+
+ if ( recv_send_count != my_recv_counts[i] ||
+ recv_send_count != ip_send_map[j].size() ) {
+ throw std::runtime_error( std::string("bad recv/send map") );
+ }
+ }
+ }
+ if ( print ) { std::cout << " }" << std::endl ; }
+
+ if ( count_verify != my_count_uses ) {
+ throw std::runtime_error( std::string("bad partition map") );
+ }
+ }
+ }
+}
+
+
diff --git a/lib/kokkos/example/multi_fem/TestCuda.cpp b/lib/kokkos/example/multi_fem/TestCuda.cpp
new file mode 100644
index 000000000..11370a535
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/TestCuda.cpp
@@ -0,0 +1,192 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+
+#include <TestBoxMeshFixture.hpp>
+#include <Implicit.hpp>
+#include <Nonlinear.hpp>
+#include <Explicit.hpp>
+
+#include <SparseLinearSystem.hpp>
+
+#if defined( KOKKOS_HAVE_CUDA )
+
+//----------------------------------------------------------------------------
+
+namespace Kokkos {
+namespace Impl {
+
+CudaSparseSingleton & CudaSparseSingleton::singleton()
+{ static CudaSparseSingleton s ; return s ; }
+
+}
+}
+
+//----------------------------------------------------------------------------
+
+void test_cuda_query( comm::Machine machine )
+{
+ const size_t comm_rank = comm::rank( machine );
+ std::cout << "P" << comm_rank
+ << ": Cuda device_count = "
+ << Kokkos::Cuda::detect_device_count()
+ << std::endl ;
+}
+
+//----------------------------------------------------------------------------
+
+void test_cuda_fixture( comm::Machine machine ,
+ size_t nx , size_t ny , size_t nz )
+{
+ const size_t comm_rank = comm::rank( machine );
+ const size_t comm_size = comm::size( machine );
+ const size_t dev_count = Kokkos::Cuda::detect_device_count();
+ const size_t dev_rank =
+ dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
+ const size_t gang_count = 0 ;
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::SelectDevice select_device( dev_rank );
+ Kokkos::Cuda::initialize( select_device );
+ test_box_fixture<Kokkos::Cuda>( machine , gang_count , nx , ny , nz );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+void test_cuda_implicit( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ const size_t comm_rank = comm::rank( machine );
+ const size_t comm_size = comm::size( machine );
+ const size_t dev_count = Kokkos::Cuda::detect_device_count();
+ const size_t dev_rank =
+ dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
+ const size_t gang_count = 0 ;
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::SelectDevice select_device( dev_rank );
+ Kokkos::Cuda::initialize( select_device );
+ HybridFEM::Implicit::driver<double,Kokkos::Cuda>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+void test_cuda_explicit( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ const size_t comm_rank = comm::rank( machine );
+ const size_t comm_size = comm::size( machine );
+ const size_t dev_count = Kokkos::Cuda::detect_device_count();
+ const size_t dev_rank =
+ dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
+ const size_t gang_count = 0 ;
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::SelectDevice select_device( dev_rank );
+ Kokkos::Cuda::initialize( select_device );
+ Explicit::driver<double,Kokkos::Cuda>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+void test_cuda_nonlinear( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ const size_t comm_rank = comm::rank( machine );
+ const size_t comm_size = comm::size( machine );
+ const size_t dev_count = Kokkos::Cuda::detect_device_count();
+ const size_t dev_rank =
+ dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
+ const size_t gang_count = 0 ;
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::SelectDevice select_device( dev_rank );
+ Kokkos::Cuda::initialize( select_device );
+
+ typedef Kokkos::Cuda device ;
+ typedef FixtureElementHex8 hex8 ;
+ HybridFEM::Nonlinear::driver<double,device,hex8>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+void test_cuda_nonlinear_quadratic( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ const size_t comm_rank = comm::rank( machine );
+ const size_t comm_size = comm::size( machine );
+ const size_t dev_count = Kokkos::Cuda::detect_device_count();
+ const size_t dev_rank =
+ dev_count && dev_count <= comm_size ? comm_rank % dev_count : 0 ;
+ const size_t gang_count = 0 ;
+
+ Kokkos::HostSpace::execution_space::initialize();
+ Kokkos::Cuda::SelectDevice select_device( dev_rank );
+ Kokkos::Cuda::initialize( select_device );
+
+ typedef Kokkos::Cuda device ;
+ typedef FixtureElementHex27 hex27 ;
+ HybridFEM::Nonlinear::driver<double,device,hex27>( "Cuda" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::Cuda::finalize();
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
+
diff --git a/lib/kokkos/example/multi_fem/TestHost.cpp b/lib/kokkos/example/multi_fem/TestHost.cpp
new file mode 100644
index 000000000..facdd0f28
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/TestHost.cpp
@@ -0,0 +1,137 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+// Must be included first on Intel-Phi systems due to
+// redefinition of SEEK_SET in <mpi.h>.
+
+#include <ParallelComm.hpp>
+
+#include <iostream>
+#include <stdexcept>
+#include <limits>
+#include <utility>
+
+//----------------------------------------------------------------------------
+
+#include <Kokkos_Core.hpp>
+
+#include <BoxMeshFixture.hpp>
+#include <TestBoxMeshFixture.hpp>
+#include <Implicit.hpp>
+#include <Nonlinear.hpp>
+#include <Explicit.hpp>
+#include <SparseLinearSystem.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+void test_host_fixture( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t nx , size_t ny , size_t nz )
+{
+ Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+ test_box_fixture<Kokkos::HostSpace::execution_space>( machine , gang_count , nx , ny , nz );
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+void test_host_implicit( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+ HybridFEM::Implicit::driver<double,Kokkos::HostSpace::execution_space>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+void test_host_explicit( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+ Explicit::driver<double,Kokkos::HostSpace::execution_space>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+void test_host_nonlinear( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+ typedef FixtureElementHex8 hex8 ;
+ typedef Kokkos::HostSpace::execution_space device ;
+ HybridFEM::Nonlinear::driver<double,device,hex8>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+void test_host_nonlinear_quadratic( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run )
+{
+ Kokkos::HostSpace::execution_space::initialize( gang_count * gang_worker_count );
+ typedef FixtureElementHex27 hex27 ;
+ typedef Kokkos::HostSpace::execution_space device ;
+ HybridFEM::Nonlinear::driver<double,device,hex27>( "Threads" , machine , gang_count , elem_count_begin , elem_count_end , count_run );
+ Kokkos::HostSpace::execution_space::finalize();
+}
+
+//----------------------------------------------------------------------------
+
+
diff --git a/lib/kokkos/example/multi_fem/TestHybridFEM.cpp b/lib/kokkos/example/multi_fem/TestHybridFEM.cpp
new file mode 100644
index 000000000..1bbd74e4d
--- /dev/null
+++ b/lib/kokkos/example/multi_fem/TestHybridFEM.cpp
@@ -0,0 +1,348 @@
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+
+// Must be included first on Intel-Phi systems due to
+// redefinition of SEEK_SET in <mpi.h>.
+
+#include <ParallelComm.hpp>
+
+#include <string>
+#include <sstream>
+#include <iostream>
+#include <Kokkos_hwloc.hpp>
+
+//----------------------------------------------------------------------------
+
+void test_box_partition( bool print );
+
+//----------------------------------------------------------------------------
+
+void test_host_fixture( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t nx , size_t ny , size_t nz );
+
+void test_host_implicit( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_host_explicit( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_host_nonlinear( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_host_nonlinear_quadratic( comm::Machine machine ,
+ size_t gang_count ,
+ size_t gang_worker_count ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+
+//----------------------------------------------------------------------------
+
+void test_cuda_query( comm::Machine );
+
+void test_cuda_fixture( comm::Machine machine ,
+ size_t nx , size_t ny , size_t nz );
+
+void test_cuda_implicit( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_cuda_explicit( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_cuda_nonlinear( comm:: Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+void test_cuda_nonlinear_quadratic( comm::Machine machine ,
+ size_t elem_count_begin ,
+ size_t elem_count_end ,
+ size_t count_run );
+
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace {
+
+bool run_host( std::istream & input ,
+ comm::Machine machine ,
+ const size_t host_gang_count ,
+ const size_t host_gang_worker_count )
+{
+ bool cmd_error = false ;
+
+ std::string which ; input >> which ;
+
+ if ( which == std::string("fixture") ) {
+
+ size_t nx = 0 , ny = 0 , nz = 0 ;
+ input >> nx >> ny >> nz ;
+ test_host_fixture( machine , host_gang_count , host_gang_worker_count , nx , ny , nz );
+
+ }
+ else if ( which == std::string("explicit") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_host_explicit( machine , host_gang_count , host_gang_worker_count , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("implicit") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_host_implicit( machine , host_gang_count , host_gang_worker_count , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("nonlinear") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_host_nonlinear( machine , host_gang_count , host_gang_worker_count , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("nonlinear_quadratic") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_host_nonlinear_quadratic( machine , host_gang_count , host_gang_worker_count , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else {
+ cmd_error = true ;
+ }
+
+ return cmd_error ;
+}
+
+#if defined( KOKKOS_HAVE_CUDA )
+bool run_cuda( std::istream & input , comm::Machine machine )
+{
+ bool cmd_error = false ;
+
+ std::string which ; input >> which ;
+
+ if ( which == std::string("fixture") ) {
+
+ size_t nx = 0 , ny = 0 , nz = 0 ;
+ input >> nx >> ny >> nz ;
+ test_cuda_fixture( machine , nx , ny , nz );
+
+ }
+ else if ( which == std::string("explicit") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_cuda_explicit( machine , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("implicit") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_cuda_implicit( machine , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("nonlinear") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_cuda_nonlinear( machine , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else if ( which == std::string("nonlinear_quadratic") ) {
+
+ size_t mesh_node_begin = 100 ;
+ size_t mesh_node_end = 300 ;
+ size_t run = 1 ;
+ input >> mesh_node_begin >> mesh_node_end >> run ;
+ test_cuda_nonlinear_quadratic( machine , mesh_node_begin , mesh_node_end , run );
+
+ }
+ else {
+ cmd_error = true ;
+ }
+
+ return cmd_error ;
+}
+#endif
+
+void run( const std::string & argline , comm::Machine machine )
+{
+ const unsigned numa_count = Kokkos::hwloc::get_available_numa_count();
+ const unsigned cores_per_numa = Kokkos::hwloc::get_available_cores_per_numa();
+ const unsigned threads_per_core = Kokkos::hwloc::get_available_threads_per_core();
+
+ std::istringstream input( argline );
+
+ bool cmd_error = false ;
+
+ std::string which ; input >> which ;
+
+ if ( which == std::string("query") ) {
+ std::cout << "P" << comm::rank( machine )
+ << ": hwloc { NUMA[" << numa_count << "]"
+ << " CORE[" << cores_per_numa << "]"
+ << " PU[" << threads_per_core << "] }"
+ << std::endl ;
+#if defined( KOKKOS_HAVE_CUDA )
+ test_cuda_query( machine );
+#endif
+ }
+ else if ( which == std::string("partition") ) {
+ if ( 0 == comm::rank( machine ) ) {
+ test_box_partition( false /* print flag */ );
+ }
+ }
+ else {
+ if ( which == std::string("host") ) {
+ size_t host_gang_count = 0 ;
+ size_t host_gang_worker_count = 1 ;
+
+ input >> host_gang_count ;
+ input >> host_gang_worker_count ;
+
+ cmd_error = run_host( input , machine , host_gang_count , host_gang_worker_count );
+ }
+ else if ( which == std::string("host-all") ) {
+ size_t host_gang_count = numa_count ;
+ size_t host_gang_worker_count = cores_per_numa * threads_per_core ;
+
+ cmd_error = run_host( input , machine , host_gang_count , host_gang_worker_count );
+ }
+ else if ( which == std::string("host-most") ) {
+ size_t host_gang_count = numa_count ;
+ size_t host_gang_worker_count = ( cores_per_numa - 1 ) * threads_per_core ;
+
+ cmd_error = run_host( input , machine , host_gang_count , host_gang_worker_count );
+ }
+#if defined( KOKKOS_HAVE_CUDA )
+ else if ( which == std::string("cuda") ) {
+ cmd_error = run_cuda( input , machine );
+ }
+#endif
+ else {
+ cmd_error = true ;
+ }
+ }
+
+ if ( cmd_error && 0 == comm::rank( machine ) ) {
+ std::cout << "Expecting command line with" << std::endl
+ << " query" << std::endl
+ << " partition" << std::endl
+ << " host NumNumaNode NumThreadPerNode <test>" << std::endl
+ << " host-all <test>" << std::endl
+ << " host-most <test>" << std::endl
+ << " cuda <test>" << std::endl
+ << "where <test> is" << std::endl
+ << " fixture NumElemX NumElemY NumElemZ" << std::endl
+ << " implicit NumElemBegin NumElemEnd NumRun" << std::endl
+ << " explicit NumElemBegin NumElemEnd NumRun" << std::endl
+ << " nonlinear NumElemBegin NumElemEnd NumRun" << std::endl
+ << " nonlinear_quadratic NumElemBegin NumElemEnd NumRun" << std::endl ;
+
+ }
+}
+
+} // namespace
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+int main( int argc , char ** argv )
+{
+ comm::Machine machine = comm::Machine::init( & argc , & argv );
+
+ const unsigned comm_rank = comm::rank( machine );
+
+ const std::string argline = comm::command_line( machine , argc , argv );
+
+ try {
+ run( argline , machine );
+ }
+ catch( const std::exception & x ) {
+ std::cerr << "P" << comm_rank << " throw: " << x.what() << std::endl ;
+ }
+ catch( ... ) {
+ std::cerr << "P" << comm_rank << " throw: unknown exception" << std::endl ;
+ }
+
+ comm::Machine::finalize();
+
+ return 0 ;
+}
+
diff --git a/lib/kokkos/core/src/impl/Kokkos_Error.hpp b/lib/kokkos/example/query_device/query_device.cpp
old mode 100755
new mode 100644
similarity index 69%
copy from lib/kokkos/core/src/impl/Kokkos_Error.hpp
copy to lib/kokkos/example/query_device/query_device.cpp
index 33e203c94..ced8cc4e9
--- a/lib/kokkos/core/src/impl/Kokkos_Error.hpp
+++ b/lib/kokkos/example/query_device/query_device.cpp
@@ -1,78 +1,100 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#ifndef KOKKOS_IMPL_ERROR_HPP
-#define KOKKOS_IMPL_ERROR_HPP
+#include <iostream>
+#include <sstream>
-#include <string>
-#include <iosfwd>
+#include <Kokkos_Macros.hpp>
-namespace Kokkos {
-namespace Impl {
+#if defined( KOKKOS_HAVE_MPI )
+#include <mpi.h>
+#endif
-void host_abort( const char * const );
+#include <Kokkos_Core.hpp>
-void throw_runtime_exception( const std::string & );
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
-void traceback_callstack( std::ostream & );
+int main( int argc , char ** argv )
+{
+ std::ostringstream msg ;
-std::string human_memory_size(size_t arg_bytes);
+#if defined( KOKKOS_HAVE_MPI )
-}
-}
+ MPI_Init( & argc , & argv );
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+ int mpi_rank = 0 ;
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
-namespace Kokkos {
-inline
-void abort( const char * const message ) { Kokkos::Impl::host_abort(message); }
-}
-#endif /* defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_CUDA ) */
+ MPI_Comm_rank( MPI_COMM_WORLD , & mpi_rank );
-//----------------------------------------------------------------------------
-//----------------------------------------------------------------------------
+ msg << "MPI rank(" << mpi_rank << ") " ;
+
+#endif
-#endif /* #ifndef KOKKOS_IMPL_ERROR_HPP */
+ msg << "{" << std::endl ;
+
+ if ( Kokkos::hwloc::available() ) {
+ msg << "hwloc( NUMA[" << Kokkos::hwloc::get_available_numa_count()
+ << "] x CORE[" << Kokkos::hwloc::get_available_cores_per_numa()
+ << "] x HT[" << Kokkos::hwloc::get_available_threads_per_core()
+ << "] )"
+ << std::endl ;
+ }
+
+#if defined( KOKKOS_HAVE_CUDA )
+ Kokkos::Cuda::print_configuration( msg );
+#endif
+
+ msg << "}" << std::endl ;
+
+ std::cout << msg.str();
+
+#if defined( KOKKOS_HAVE_MPI )
+
+ MPI_Finalize();
+
+#endif
+
+ return 0 ;
+}
diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/example/sort_array/main.cpp
old mode 100755
new mode 100644
similarity index 64%
copy from lib/kokkos/containers/performance_tests/TestCuda.cpp
copy to lib/kokkos/example/sort_array/main.cpp
index aee262de9..74c4ab154
--- a/lib/kokkos/containers/performance_tests/TestCuda.cpp
+++ b/lib/kokkos/example/sort_array/main.cpp
@@ -1,100 +1,95 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#include <stdint.h>
-#include <string>
+#include <string.h>
+#include <stdlib.h>
#include <iostream>
-#include <iomanip>
#include <sstream>
-#include <fstream>
-
-#include <gtest/gtest.h>
#include <Kokkos_Core.hpp>
-#if defined( KOKKOS_HAVE_CUDA )
-
-#include <Kokkos_UnorderedMap.hpp>
+#include <sort_array.hpp>
-#include <TestGlobal2LocalIds.hpp>
-#include <TestUnorderedMapPerformance.hpp>
+int main( int argc , char ** argv )
+{
+#if defined( KOKKOS_HAVE_CUDA ) || defined( KOKKOS_HAVE_PTHREAD ) || defined( KOKKOS_HAVE_OPENMP )
+ Kokkos::initialize( argc , argv );
-namespace Performance {
+ int length_array = 100000 ;
-class cuda : public ::testing::Test {
-protected:
- static void SetUpTestCase()
- {
- std::cout << std::setprecision(5) << std::scientific;
- Kokkos::HostSpace::execution_space::initialize();
- Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
+ for ( int i = 0 ; i < argc ; ++i ) {
+ if ( 0 == strcmp( argv[i] , "length_array" ) ) {
+ length_array = atoi( argv[i+1] );
+ }
}
- static void TearDownTestCase()
- {
- Kokkos::Cuda::finalize();
- Kokkos::HostSpace::execution_space::finalize();
+
+ int length_total_array = length_array * 100;
+
+#if defined( KOKKOS_HAVE_CUDA )
+ if ( Kokkos::Cuda::is_initialized() ) {
+ std::cout << "Kokkos::Cuda" << std::endl ;
+ Example::sort_array< Kokkos::Cuda >( length_array , length_total_array );
}
-};
+#endif
-TEST_F( cuda, global_2_local)
-{
- std::cout << "Cuda" << std::endl;
- std::cout << "size, create, generate, fill, find" << std::endl;
- for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step)
- test_global_to_local_ids<Kokkos::Cuda>(i);
-}
+#if defined( KOKKOS_HAVE_PTHREAD )
+ if ( Kokkos::Threads::is_initialized() ) {
+ std::cout << "Kokkos::Threads" << std::endl ;
+ Example::sort_array< Kokkos::Threads >( length_array , length_total_array );
+ }
+#endif
-TEST_F( cuda, unordered_map_performance_near)
-{
- Perf::run_performance_tests<Kokkos::Cuda,true>("cuda-near");
-}
+#if defined( KOKKOS_HAVE_OPENMP )
+ if ( Kokkos::OpenMP::is_initialized() ) {
+ std::cout << "Kokkos::OpenMP" << std::endl ;
+ Example::sort_array< Kokkos::OpenMP >( length_array , length_total_array );
+ }
+#endif
-TEST_F( cuda, unordered_map_performance_far)
-{
- Perf::run_performance_tests<Kokkos::Cuda,false>("cuda-far");
-}
+ Kokkos::finalize();
+#endif
+ return 0 ;
}
-#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
diff --git a/lib/kokkos/example/sort_array/sort_array.hpp b/lib/kokkos/example/sort_array/sort_array.hpp
new file mode 100644
index 000000000..018b1ee8e
--- /dev/null
+++ b/lib/kokkos/example/sort_array/sort_array.hpp
@@ -0,0 +1,190 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#ifndef EXAMPLE_SORT_ARRAY
+#define EXAMPLE_SORT_ARRAY
+
+#include <stdlib.h>
+#include <algorithm>
+
+#include <Kokkos_Core.hpp>
+
+#include <impl/Kokkos_Timer.hpp>
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Example {
+
+template< class Device >
+struct SortView {
+
+ template< typename ValueType >
+ SortView( const Kokkos::View<ValueType*,Device> v , int begin , int end )
+ {
+ std::sort( v.ptr_on_device() + begin , v.ptr_on_device() + end );
+ }
+};
+
+}
+
+#if defined(KOKKOS_HAVE_CUDA)
+
+#include <thrust/device_ptr.h>
+#include <thrust/sort.h>
+
+namespace Example {
+
+template<>
+struct SortView< Kokkos::Cuda > {
+ template< typename ValueType >
+ SortView( const Kokkos::View<ValueType*,Kokkos::Cuda> v , int begin , int end )
+ {
+ thrust::sort( thrust::device_ptr<ValueType>( v.ptr_on_device() + begin )
+ , thrust::device_ptr<ValueType>( v.ptr_on_device() + end ) );
+ }
+};
+
+}
+
+#endif
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+namespace Example {
+
+template< class Device >
+void sort_array( const size_t array_length /* length of spans of array to sort */
+ , const size_t total_length /* total length of array */
+ , const int print = 1 )
+{
+ typedef Device execution_space ;
+ typedef Kokkos::View<int*,Device> device_array_type ;
+
+#if defined( KOKKOS_HAVE_CUDA )
+
+ typedef typename
+ Kokkos::Impl::if_c< Kokkos::Impl::is_same< Device , Kokkos::Cuda >::value
+ , Kokkos::View<int*,Kokkos::Cuda::array_layout,Kokkos::CudaHostPinnedSpace>
+ , typename device_array_type::HostMirror
+ >::type host_array_type ;
+
+#else
+
+ typedef typename device_array_type::HostMirror host_array_type ;
+
+#endif
+
+ Kokkos::Impl::Timer timer;
+
+ const device_array_type work_array("work_array" , array_length );
+ const host_array_type host_array("host_array" , total_length );
+
+ std::cout << "sort_array length( " << total_length << " )"
+ << " in chunks( " << array_length << " )"
+ << std::endl ;
+
+ double sec = timer.seconds();
+ std::cout << "declaring Views took "
+ << sec << " seconds" << std::endl;
+ timer.reset();
+
+ for ( size_t i = 0 ; i < total_length ; ++i ) {
+ host_array(i) = ( lrand48() * total_length ) >> 31 ;
+ }
+
+ sec = timer.seconds();
+ std::cout << "initializing " << total_length << " elements on host took "
+ << sec << " seconds" << std::endl;
+ timer.reset();
+
+ double sec_copy_in = 0 ;
+ double sec_sort = 0 ;
+ double sec_copy_out = 0 ;
+ double sec_error = 0 ;
+ size_t error_count = 0 ;
+
+ for ( size_t begin = 0 ; begin < total_length ; begin += array_length ) {
+
+ const size_t end = begin + array_length < total_length
+ ? begin + array_length : total_length ;
+
+ const std::pair<size_t,size_t> host_range(begin,end);
+
+ const host_array_type host_subarray = Kokkos::subview( host_array , host_range );
+
+ timer.reset();
+
+ Kokkos::deep_copy( work_array , host_subarray );
+
+ sec_copy_in += timer.seconds(); timer.reset();
+
+ SortView< execution_space >( work_array , 0 , end - begin );
+
+ sec_sort += timer.seconds(); timer.reset();
+
+ Kokkos::deep_copy( host_subarray , work_array );
+
+ sec_copy_out += timer.seconds(); timer.reset();
+
+ for ( size_t i = begin + 1 ; i < end ; ++i ) {
+ if ( host_array(i) < host_array(i-1) ) ++error_count ;
+ }
+
+ sec_error += timer.seconds(); timer.reset();
+ }
+
+ std::cout << "copy to device " << sec_copy_in << " seconds" << std::endl
+ << "sort on device " << sec_sort << " seconds" << std::endl
+ << "copy from device " << sec_copy_out << " seconds" << std::endl
+ << "errors " << error_count << " took " << sec_error << " seconds" << std::endl
+ ;
+}
+
+} // namespace Example
+
+//----------------------------------------------------------------------------
+
+#endif /* #ifndef EXAMPLE_SORT_ARRAY */
+
diff --git a/lib/kokkos/example/tutorial/01_hello_world/Makefile b/lib/kokkos/example/tutorial/01_hello_world/Makefile
new file mode 100644
index 000000000..38fb1b8f8
--- /dev/null
+++ b/lib/kokkos/example/tutorial/01_hello_world/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/01_hello_world/hello_world.cpp b/lib/kokkos/example/tutorial/01_hello_world/hello_world.cpp
new file mode 100644
index 000000000..459b9b094
--- /dev/null
+++ b/lib/kokkos/example/tutorial/01_hello_world/hello_world.cpp
@@ -0,0 +1,130 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+#include <typeinfo>
+
+//
+// "Hello world" parallel_for example:
+// 1. Start up Kokkos
+// 2. Execute a parallel for loop in the default execution space,
+// using a functor to define the loop body
+// 3. Shut down Kokkos
+//
+// If Kokkos was built with C++11 enabled, try comparing this example
+// to 01_hello_world_lambda. The latter uses C++11 lambdas (anonymous
+// functions) to define the loop body of the parallel_for. That makes
+// the code much more concise and readable. On the other hand,
+// breaking out the loop body into an explicit functor makes it easier
+// to test the loop independently of the parallel pattern.
+//
+
+// Functor that defines the parallel_for's loop body.
+//
+// A "functor" is just a class or struct with a public operator()
+// instance method.
+struct hello_world {
+ // If a functor has an "execution_space" (or "execution_space", for
+ // backwards compatibility) public typedef, parallel_* will only run
+ // the functor in that execution space. That's a good way to mark a
+ // functor as specific to an execution space. If the functor lacks
+ // this typedef, parallel_for will run it in the default execution
+ // space, unless you tell it otherwise (that's an advanced topic;
+ // see "execution policies").
+
+ // The functor's operator() defines the loop body. It takes an
+ // integer argument which is the parallel for loop index. Other
+ // arguments are possible; see the "hierarchical parallelism" part
+ // of the tutorial.
+ //
+ // The operator() method must be const, and must be marked with the
+ // KOKKOS_INLINE_FUNCTION macro. If building with CUDA, this macro
+ // will mark your method as suitable for running on the CUDA device
+ // (as well as on the host). If not building with CUDA, the macro
+ // is unnecessary but harmless.
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int i) const {
+ printf ("Hello from i = %i\n", i);
+ }
+};
+
+int main (int argc, char* argv[]) {
+ // You must call initialize() before you may call Kokkos.
+ //
+ // With no arguments, this initializes the default execution space
+ // (and potentially its host execution space) with default
+ // parameters. You may also pass in argc and argv, analogously to
+ // MPI_Init(). It reads and removes command-line arguments that
+ // start with "--kokkos-".
+ Kokkos::initialize (argc, argv);
+
+ // Print the name of Kokkos' default execution space. We're using
+ // typeid here, so the name might get a bit mangled by the linker,
+ // but you should still be able to figure out what it is.
+ printf ("Hello World on Kokkos execution space %s\n",
+ typeid (Kokkos::DefaultExecutionSpace).name ());
+
+ // Run the above functor on the default Kokkos execution space in
+ // parallel, with a parallel for loop count of 15.
+ //
+ // The Kokkos::DefaultExecutionSpace typedef gives the default
+ // execution space. Depending on how Kokkos was configured, this
+ // could be OpenMP, Threads, Cuda, Serial, or even some other
+ // execution space.
+ //
+ // The following line of code would look like this in OpenMP:
+ //
+ // #pragma omp parallel for
+ // for (int i = 0; i < 15; ++i) {
+ // printf ("Hello from i = %i\n", i);
+ // }
+ //
+ // You may notice that the printed numbers do not print out in
+ // order. Parallel for loops may execute in any order.
+ Kokkos::parallel_for ("HelloWorld",15, hello_world ());
+
+ // You must call finalize() after you are done using Kokkos.
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/01_hello_world_lambda/Makefile b/lib/kokkos/example/tutorial/01_hello_world_lambda/Makefile
new file mode 100644
index 000000000..bd2371382
--- /dev/null
+++ b/lib/kokkos/example/tutorial/01_hello_world_lambda/Makefile
@@ -0,0 +1,44 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+KOKKOS_CUDA_OPTIONS = "enable_lambda"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp b/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp
new file mode 100644
index 000000000..b6c9cc5e4
--- /dev/null
+++ b/lib/kokkos/example/tutorial/01_hello_world_lambda/hello_world_lambda.cpp
@@ -0,0 +1,109 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+#include <typeinfo>
+
+//
+// "Hello world" parallel_for example:
+// 1. Start up Kokkos
+// 2. Execute a parallel for loop in the default execution space,
+// using a C++11 lambda to define the loop body
+// 3. Shut down Kokkos
+//
+// This example only builds if C++11 is enabled. Compare this example
+// to 01_hello_world, which uses functors (explicitly defined classes)
+// to define the loop body of the parallel_for. Both functors and
+// lambdas have their places.
+//
+
+int main (int argc, char* argv[]) {
+ // You must call initialize() before you may call Kokkos.
+ //
+ // With no arguments, this initializes the default execution space
+ // (and potentially its host execution space) with default
+ // parameters. You may also pass in argc and argv, analogously to
+ // MPI_Init(). It reads and removes command-line arguments that
+ // start with "--kokkos-".
+ Kokkos::initialize (argc, argv);
+
+ // Print the name of Kokkos' default execution space. We're using
+ // typeid here, so the name might get a bit mangled by the linker,
+ // but you should still be able to figure out what it is.
+ printf ("Hello World on Kokkos execution space %s\n",
+ typeid (Kokkos::DefaultExecutionSpace).name ());
+
+ // Run lambda on the default Kokkos execution space in parallel,
+ // with a parallel for loop count of 15. The lambda's argument is
+ // an integer which is the parallel for's loop index. As you learn
+ // about different kinds of parallelism, you will find out that
+ // there are other valid argument types as well.
+ //
+ // For a single level of parallelism, we prefer that you use the
+ // KOKKOS_LAMBDA macro. If CUDA is disabled, this just turns into
+ // [=]. That captures variables from the surrounding scope by
+ // value. Do NOT capture them by reference! If CUDA is enabled,
+ // this macro may have a special definition that makes the lambda
+ // work correctly with CUDA. Compare to the KOKKOS_INLINE_FUNCTION
+ // macro, which has a special meaning if CUDA is enabled.
+ //
+ // The following parallel_for would look like this if we were using
+ // OpenMP by itself, instead of Kokkos:
+ //
+ // #pragma omp parallel for
+ // for (int i = 0; i < 15; ++i) {
+ // printf ("Hello from i = %i\n", i);
+ // }
+ //
+ // You may notice that the printed numbers do not print out in
+ // order. Parallel for loops may execute in any order.
+ Kokkos::parallel_for (15, KOKKOS_LAMBDA (const int i) {
+ // printf works in a CUDA parallel kernel; std::ostream does not.
+ printf ("Hello from i = %i\n", i);
+ });
+
+ // You must call finalize() after you are done using Kokkos.
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/02_simple_reduce/Makefile b/lib/kokkos/example/tutorial/02_simple_reduce/Makefile
new file mode 100644
index 000000000..38fb1b8f8
--- /dev/null
+++ b/lib/kokkos/example/tutorial/02_simple_reduce/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/core/unit_test/TestViewOfClass.hpp b/lib/kokkos/example/tutorial/02_simple_reduce/simple_reduce.cpp
old mode 100755
new mode 100644
similarity index 51%
copy from lib/kokkos/core/unit_test/TestViewOfClass.hpp
copy to lib/kokkos/example/tutorial/02_simple_reduce/simple_reduce.cpp
index 09abacd80..236618f7b
--- a/lib/kokkos/core/unit_test/TestViewOfClass.hpp
+++ b/lib/kokkos/example/tutorial/02_simple_reduce/simple_reduce.cpp
@@ -1,126 +1,101 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#include <gtest/gtest.h>
-
#include <Kokkos_Core.hpp>
-#include <stdexcept>
-#include <sstream>
-#include <iostream>
-
-/*--------------------------------------------------------------------------*/
-
-namespace Test {
-
-namespace {
-volatile int nested_view_count ;
-}
-
-template< class Space >
-class NestedView {
-private:
- Kokkos::View<int*,Space> member ;
+#include <cstdio>
-public:
+//
+// First reduction (parallel_reduce) example:
+// 1. Start up Kokkos
+// 2. Execute a parallel_reduce loop in the default execution space,
+// using a functor to define the loop body
+// 3. Shut down Kokkos
+//
+// Compare this example to 02_simple_reduce_lambda, which uses a C++11
+// lambda to define the loop body of the parallel_reduce.
+//
+// Reduction functor for computing the sum of squares.
+//
+// More advanced reduction examples will show how to control the
+// reduction's "join" operator. If the join operator is not provided,
+// it defaults to binary operator+ (adding numbers together).
+struct squaresum {
+ // Specify the type of the reduction value with a "value_type"
+ // typedef. In this case, the reduction value has type int.
+ typedef int value_type;
+
+ // The reduction functor's operator() looks a little different than
+ // the parallel_for functor's operator(). For the reduction, we
+ // pass in both the loop index i, and the intermediate reduction
+ // value lsum. The latter MUST be passed in by nonconst reference.
+ // (If the reduction type is an array like int[], indicating an
+ // array reduction result, then the second argument is just int[].)
KOKKOS_INLINE_FUNCTION
- NestedView()
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
- : member("member",2)
- { Kokkos::atomic_increment( & nested_view_count ); }
-#else
- : member(){}
-#endif
-
- ~NestedView()
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
- { Kokkos::atomic_decrement( & nested_view_count ); }
-#else
- {}
-#endif
-
+ void operator () (const int i, int& lsum) const {
+ lsum += i*i; // compute the sum of squares
+ }
};
-
-template< class Space >
-void view_nested_view()
-{
- ASSERT_EQ( 0 , nested_view_count );
- {
- Kokkos::View< NestedView<Space> * , Space > a("a_nested_view",2);
- ASSERT_EQ( 2 , nested_view_count );
- Kokkos::View< NestedView<Space> * , Space > b("b_nested_view",2);
- ASSERT_EQ( 4 , nested_view_count );
+int main (int argc, char* argv[]) {
+ Kokkos::initialize (argc, argv);
+ const int n = 10;
+
+ // Compute the sum of squares of integers from 0 to n-1, in
+ // parallel, using Kokkos.
+ int sum = 0;
+ Kokkos::parallel_reduce (n, squaresum (), sum);
+ printf ("Sum of squares of integers from 0 to %i, "
+ "computed in parallel, is %i\n", n - 1, sum);
+
+ // Compare to a sequential loop.
+ int seqSum = 0;
+ for (int i = 0; i < n; ++i) {
+ seqSum += i*i;
}
- // ASSERT_EQ( 0 , nested_view_count );
-}
-
+ printf ("Sum of squares of integers from 0 to %i, "
+ "computed sequentially, is %i\n", n - 1, seqSum);
+ Kokkos::finalize ();
+ return (sum == seqSum) ? 0 : -1;
}
-namespace Kokkos {
-namespace Impl {
-
-template< class ExecSpace , class S >
-struct ViewDefaultConstruct< ExecSpace , Test::NestedView<S> , true >
-{
- typedef Test::NestedView<S> type ;
- type * const m_ptr ;
-
- KOKKOS_FORCEINLINE_FUNCTION
- void operator()( const typename ExecSpace::size_type& i ) const
- { new(m_ptr+i) type(); }
-
- ViewDefaultConstruct( type * pointer , size_t capacity )
- : m_ptr( pointer )
- {
- Kokkos::RangePolicy< ExecSpace > range( 0 , capacity );
- parallel_for( range , *this );
- ExecSpace::fence();
- }
-};
-
-} // namespace Impl
-} // namespace Kokkos
-
-/*--------------------------------------------------------------------------*/
-
diff --git a/lib/kokkos/example/tutorial/02_simple_reduce_lambda/Makefile b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/Makefile
new file mode 100644
index 000000000..bd2371382
--- /dev/null
+++ b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/Makefile
@@ -0,0 +1,44 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+KOKKOS_CUDA_OPTIONS = "enable_lambda"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/containers/performance_tests/TestCuda.cpp b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp
old mode 100755
new mode 100644
similarity index 59%
copy from lib/kokkos/containers/performance_tests/TestCuda.cpp
copy to lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp
index aee262de9..a403633a8
--- a/lib/kokkos/containers/performance_tests/TestCuda.cpp
+++ b/lib/kokkos/example/tutorial/02_simple_reduce_lambda/simple_reduce_lambda.cpp
@@ -1,100 +1,86 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#include <stdint.h>
-#include <string>
-#include <iostream>
-#include <iomanip>
-#include <sstream>
-#include <fstream>
-
-#include <gtest/gtest.h>
-
#include <Kokkos_Core.hpp>
+#include <cstdio>
-#if defined( KOKKOS_HAVE_CUDA )
-
-#include <Kokkos_UnorderedMap.hpp>
-
-#include <TestGlobal2LocalIds.hpp>
+//
+// First reduction (parallel_reduce) example:
+// 1. Start up Kokkos
+// 2. Execute a parallel_reduce loop in the default execution space,
+// using a C++11 lambda to define the loop body
+// 3. Shut down Kokkos
+//
+// This example only builds if C++11 is enabled. Compare this example
+// to 02_simple_reduce, which uses a functor to define the loop body
+// of the parallel_reduce.
+//
-#include <TestUnorderedMapPerformance.hpp>
+int main (int argc, char* argv[]) {
+ Kokkos::initialize (argc, argv);
+ const int n = 10;
-namespace Performance {
+ // Compute the sum of squares of integers from 0 to n-1, in
+ // parallel, using Kokkos. This time, use a lambda instead of a
+ // functor. The lambda takes the same arguments as the functor's
+ // operator().
+ int sum = 0;
+ // The KOKKOS_LAMBDA macro replaces the capture-by-value clause [=].
+ // It also handles any other syntax needed for CUDA.
+ Kokkos::parallel_reduce (n, KOKKOS_LAMBDA (const int i, int& lsum) {
+ lsum += i*i;
+ }, sum);
+ printf ("Sum of squares of integers from 0 to %i, "
+ "computed in parallel, is %i\n", n - 1, sum);
-class cuda : public ::testing::Test {
-protected:
- static void SetUpTestCase()
- {
- std::cout << std::setprecision(5) << std::scientific;
- Kokkos::HostSpace::execution_space::initialize();
- Kokkos::Cuda::initialize( Kokkos::Cuda::SelectDevice(0) );
- }
- static void TearDownTestCase()
- {
- Kokkos::Cuda::finalize();
- Kokkos::HostSpace::execution_space::finalize();
+ // Compare to a sequential loop.
+ int seqSum = 0;
+ for (int i = 0; i < n; ++i) {
+ seqSum += i*i;
}
-};
-
-TEST_F( cuda, global_2_local)
-{
- std::cout << "Cuda" << std::endl;
- std::cout << "size, create, generate, fill, find" << std::endl;
- for (unsigned i=Performance::begin_id_size; i<=Performance::end_id_size; i *= Performance::id_step)
- test_global_to_local_ids<Kokkos::Cuda>(i);
-}
-
-TEST_F( cuda, unordered_map_performance_near)
-{
- Perf::run_performance_tests<Kokkos::Cuda,true>("cuda-near");
-}
-
-TEST_F( cuda, unordered_map_performance_far)
-{
- Perf::run_performance_tests<Kokkos::Cuda,false>("cuda-far");
-}
-
+ printf ("Sum of squares of integers from 0 to %i, "
+ "computed sequentially, is %i\n", n - 1, seqSum);
+ Kokkos::finalize ();
+ return (sum == seqSum) ? 0 : -1;
}
-#endif /* #if defined( KOKKOS_HAVE_CUDA ) */
diff --git a/lib/kokkos/example/tutorial/03_simple_view/Makefile b/lib/kokkos/example/tutorial/03_simple_view/Makefile
new file mode 100644
index 000000000..38fb1b8f8
--- /dev/null
+++ b/lib/kokkos/example/tutorial/03_simple_view/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/03_simple_view/simple_view.cpp b/lib/kokkos/example/tutorial/03_simple_view/simple_view.cpp
new file mode 100644
index 000000000..dbbb9d867
--- /dev/null
+++ b/lib/kokkos/example/tutorial/03_simple_view/simple_view.cpp
@@ -0,0 +1,142 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+//
+// First Kokkos::View (multidimensional array) example:
+// 1. Start up Kokkos
+// 2. Allocate a Kokkos::View
+// 3. Execute a parallel_for and a parallel_reduce over that View's data
+// 4. Shut down Kokkos
+//
+// Compare this example to 03_simple_view_lambda, which uses C++11
+// lambdas to define the loop bodies of the parallel_for and
+// parallel_reduce.
+//
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+
+// A Kokkos::View is an array of zero or more dimensions. The number
+// of dimensions is specified at compile time, as part of the type of
+// the View. This array has two dimensions. The first one
+// (represented by the asterisk) is a run-time dimension, and the
+// second (represented by [3]) is a compile-time dimension. Thus,
+// this View type is an N x 3 array of type double, where N is
+// specified at run time in the View's constructor.
+//
+// The first dimension of the View is the dimension over which it is
+// efficient for Kokkos to parallelize.
+typedef Kokkos::View<double*[3]> view_type;
+
+// parallel_for functor that fills the View given to its constructor.
+// The View must already have been allocated.
+struct InitView {
+ view_type a;
+
+ // Views have "view semantics." This means that they behave like
+ // pointers, not like std::vector. Their copy constructor and
+ // operator= only do shallow copies. Thus, you can pass View
+ // objects around by "value"; they won't do a deep copy unless you
+ // explicitly ask for a deep copy.
+ InitView (view_type a_) :
+ a (a_)
+ {}
+
+ // Fill the View with some data. The parallel_for loop will iterate
+ // over the View's first dimension N.
+ KOKKOS_INLINE_FUNCTION
+ void operator () (const int i) const {
+ // Acesss the View just like a Fortran array. The layout depends
+ // on the View's memory space, so don't rely on the View's
+ // physical memory layout unless you know what you're doing.
+ a(i,0) = 1.0*i;
+ a(i,1) = 1.0*i*i;
+ a(i,2) = 1.0*i*i*i;
+ }
+};
+
+// Reduction functor that reads the View given to its constructor.
+struct ReduceFunctor {
+ view_type a;
+
+ // Constructor takes View by "value"; this does a shallow copy.
+ ReduceFunctor (view_type a_) : a (a_) {}
+
+ // If you write a functor to do a reduction, you must specify the
+ // type of the reduction result via a public 'value_type' typedef.
+ typedef double value_type;
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (int i, double &lsum) const {
+ lsum += a(i,0)*a(i,1)/(a(i,2)+0.1);
+ }
+};
+
+int main (int argc, char* argv[]) {
+ Kokkos::initialize (argc, argv);
+ const int N = 10;
+
+ // Allocate the View. The first dimension is a run-time parameter
+ // N. We set N = 10 here. The second dimension is a compile-time
+ // parameter, 3. We don't specify it here because we already set it
+ // by declaring the type of the View.
+ //
+ // Views get initialized to zero by default. This happens in
+ // parallel, using the View's memory space's default execution
+ // space. Parallel initialization ensures first-touch allocation.
+ // There is a way to shut off default initialization.
+ //
+ // You may NOT allocate a View inside of a parallel_{for, reduce,
+ // scan}. Treat View allocation as a "thread collective."
+ //
+ // The string "A" is just the label; it only matters for debugging.
+ // Different Views may have the same label.
+ view_type a ("A", N);
+
+ Kokkos::parallel_for (N, InitView (a));
+ double sum = 0;
+ Kokkos::parallel_reduce (N, ReduceFunctor (a), sum);
+ printf ("Result: %f\n", sum);
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/03_simple_view_lambda/Makefile b/lib/kokkos/example/tutorial/03_simple_view_lambda/Makefile
new file mode 100644
index 000000000..bd2371382
--- /dev/null
+++ b/lib/kokkos/example/tutorial/03_simple_view_lambda/Makefile
@@ -0,0 +1,44 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+KOKKOS_CUDA_OPTIONS = "enable_lambda"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp b/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp
new file mode 100644
index 000000000..974af7477
--- /dev/null
+++ b/lib/kokkos/example/tutorial/03_simple_view_lambda/simple_view_lambda.cpp
@@ -0,0 +1,116 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+//
+// First Kokkos::View (multidimensional array) example:
+// 1. Start up Kokkos
+// 2. Allocate a Kokkos::View
+// 3. Execute a parallel_for and a parallel_reduce over that View's data
+// 4. Shut down Kokkos
+//
+// Compare this example to 03_simple_view, which uses functors to
+// define the loop bodies of the parallel_for and parallel_reduce.
+//
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+
+// A Kokkos::View is an array of zero or more dimensions. The number
+// of dimensions is specified at compile time, as part of the type of
+// the View. This array has two dimensions. The first one
+// (represented by the asterisk) is a run-time dimension, and the
+// second (represented by [3]) is a compile-time dimension. Thus,
+// this View type is an N x 3 array of type double, where N is
+// specified at run time in the View's constructor.
+//
+// The first dimension of the View is the dimension over which it is
+// efficient for Kokkos to parallelize.
+typedef Kokkos::View<double*[3]> view_type;
+
+int main (int argc, char* argv[]) {
+ Kokkos::initialize (argc, argv);
+
+ // Allocate the View. The first dimension is a run-time parameter
+ // N. We set N = 10 here. The second dimension is a compile-time
+ // parameter, 3. We don't specify it here because we already set it
+ // by declaring the type of the View.
+ //
+ // Views get initialized to zero by default. This happens in
+ // parallel, using the View's memory space's default execution
+ // space. Parallel initialization ensures first-touch allocation.
+ // There is a way to shut off default initialization.
+ //
+ // You may NOT allocate a View inside of a parallel_{for, reduce,
+ // scan}. Treat View allocation as a "thread collective."
+ //
+ // The string "A" is just the label; it only matters for debugging.
+ // Different Views may have the same label.
+ view_type a ("A", 10);
+
+ // Fill the View with some data. The parallel_for loop will iterate
+ // over the View's first dimension N.
+ //
+ // Note that the View is passed by value into the lambda. The macro
+ // KOKKOS_LAMBDA includes the "capture by value" clause [=]. This
+ // tells the lambda to "capture all variables in the enclosing scope
+ // by value." Views have "view semantics"; they behave like
+ // pointers, not like std::vector. Passing them by value does a
+ // shallow copy. A deep copy never happens unless you explicitly
+ // ask for one.
+ Kokkos::parallel_for (10, KOKKOS_LAMBDA (const int i) {
+ // Acesss the View just like a Fortran array. The layout depends
+ // on the View's memory space, so don't rely on the View's
+ // physical memory layout unless you know what you're doing.
+ a(i,0) = 1.0*i;
+ a(i,1) = 1.0*i*i;
+ a(i,2) = 1.0*i*i*i;
+ });
+ // Reduction functor that reads the View given to its constructor.
+ double sum = 0;
+ Kokkos::parallel_reduce (10, KOKKOS_LAMBDA (const int i, double& lsum) {
+ lsum += a(i,0)*a(i,1)/(a(i,2)+0.1);
+ }, sum);
+ printf ("Result: %f\n", sum);
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/04_simple_memoryspaces/Makefile b/lib/kokkos/example/tutorial/04_simple_memoryspaces/Makefile
new file mode 100644
index 000000000..38fb1b8f8
--- /dev/null
+++ b/lib/kokkos/example/tutorial/04_simple_memoryspaces/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/core/unit_test/TestViewOfClass.hpp b/lib/kokkos/example/tutorial/04_simple_memoryspaces/simple_memoryspaces.cpp
old mode 100755
new mode 100644
similarity index 51%
copy from lib/kokkos/core/unit_test/TestViewOfClass.hpp
copy to lib/kokkos/example/tutorial/04_simple_memoryspaces/simple_memoryspaces.cpp
index 09abacd80..c6a4bebfa
--- a/lib/kokkos/core/unit_test/TestViewOfClass.hpp
+++ b/lib/kokkos/example/tutorial/04_simple_memoryspaces/simple_memoryspaces.cpp
@@ -1,126 +1,101 @@
/*
//@HEADER
// ************************************************************************
//
// Kokkos v. 2.0
// Copyright (2014) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. Neither the name of the Corporation nor the names of the
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
//
// ************************************************************************
//@HEADER
*/
-#include <gtest/gtest.h>
-
#include <Kokkos_Core.hpp>
-#include <stdexcept>
-#include <sstream>
-#include <iostream>
-
-/*--------------------------------------------------------------------------*/
-
-namespace Test {
-
-namespace {
-volatile int nested_view_count ;
-}
-
-template< class Space >
-class NestedView {
-private:
- Kokkos::View<int*,Space> member ;
-
-public:
+#include <cstdio>
+
+// The type of a two-dimensional N x 3 array of double.
+// It lives in Kokkos' default memory space.
+typedef Kokkos::View<double*[3]> view_type;
+
+// The "HostMirror" type corresponding to view_type above is also a
+// two-dimensional N x 3 array of double. However, it lives in the
+// host memory space corresponding to view_type's memory space. For
+// example, if view_type lives in CUDA device memory, host_view_type
+// lives in host (CPU) memory. Furthermore, declaring host_view_type
+// as the host mirror of view_type means that host_view_type has the
+// same layout as view_type. This makes it easier to copy between the
+// two Views.
+// Advanced issues: If a memory space is accessible from the host without
+// performance penalties then it is its own host_mirror_space. This is
+// the case for HostSpace, CudaUVMSpace and CudaHostPinnedSpace.
+
+typedef view_type::HostMirror host_view_type;
+
+struct ReduceFunctor {
+ view_type a;
+ ReduceFunctor (view_type a_) : a (a_) {}
+ typedef int value_type; //Specify type for reduction value, lsum
KOKKOS_INLINE_FUNCTION
- NestedView()
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
- : member("member",2)
- { Kokkos::atomic_increment( & nested_view_count ); }
-#else
- : member(){}
-#endif
-
- ~NestedView()
-#if defined( KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST )
- { Kokkos::atomic_decrement( & nested_view_count ); }
-#else
- {}
-#endif
-
-};
-
-
-template< class Space >
-void view_nested_view()
-{
- ASSERT_EQ( 0 , nested_view_count );
- {
- Kokkos::View< NestedView<Space> * , Space > a("a_nested_view",2);
- ASSERT_EQ( 2 , nested_view_count );
- Kokkos::View< NestedView<Space> * , Space > b("b_nested_view",2);
- ASSERT_EQ( 4 , nested_view_count );
+ void operator() (int i, int &lsum) const {
+ lsum += a(i,0)-a(i,1)+a(i,2);
}
- // ASSERT_EQ( 0 , nested_view_count );
-}
-
-}
-
-namespace Kokkos {
-namespace Impl {
-
-template< class ExecSpace , class S >
-struct ViewDefaultConstruct< ExecSpace , Test::NestedView<S> , true >
-{
- typedef Test::NestedView<S> type ;
- type * const m_ptr ;
-
- KOKKOS_FORCEINLINE_FUNCTION
- void operator()( const typename ExecSpace::size_type& i ) const
- { new(m_ptr+i) type(); }
+};
- ViewDefaultConstruct( type * pointer , size_t capacity )
- : m_ptr( pointer )
- {
- Kokkos::RangePolicy< ExecSpace > range( 0 , capacity );
- parallel_for( range , *this );
- ExecSpace::fence();
+int main() {
+ Kokkos::initialize();
+
+ view_type a ("A", 10);
+ // If view_type and host_mirror_type live in the same memory space,
+ // a "mirror view" is just an alias, and deep_copy does nothing.
+ // Otherwise, a mirror view of a device View lives in host memory,
+ // and deep_copy does a deep copy.
+ host_view_type h_a = Kokkos::create_mirror_view (a);
+
+ // The View h_a lives in host (CPU) memory, so it's legal to fill
+ // the view sequentially using ordinary code, like this.
+ for (int i = 0; i < 10; i++) {
+ for (int j = 0; j < 3; j++) {
+ h_a(i,j) = i*10 + j;
}
-};
+ }
+ Kokkos::deep_copy (a, h_a); // Copy from host to device.
-} // namespace Impl
-} // namespace Kokkos
+ int sum = 0;
+ Kokkos::parallel_reduce (10, ReduceFunctor (a), sum);
+ printf ("Result is %i\n",sum);
-/*--------------------------------------------------------------------------*/
+ Kokkos::finalize ();
+}
diff --git a/lib/kokkos/example/tutorial/05_simple_atomics/Makefile b/lib/kokkos/example/tutorial/05_simple_atomics/Makefile
new file mode 100644
index 000000000..38fb1b8f8
--- /dev/null
+++ b/lib/kokkos/example/tutorial/05_simple_atomics/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/05_simple_atomics/simple_atomics.cpp b/lib/kokkos/example/tutorial/05_simple_atomics/simple_atomics.cpp
new file mode 100644
index 000000000..de9c219d5
--- /dev/null
+++ b/lib/kokkos/example/tutorial/05_simple_atomics/simple_atomics.cpp
@@ -0,0 +1,137 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+#include <cstdlib>
+#include <cmath>
+
+// Type of a one-dimensional length-N array of int.
+typedef Kokkos::View<int*> view_type;
+typedef view_type::HostMirror host_view_type;
+// This is a "zero-dimensional" View, that is, a View of a single
+// value (an int, in this case). Access the value using operator()
+// with no arguments: e.g., 'count()'.
+//
+// Zero-dimensional Views are useful for reduction results that stay
+// resident in device memory, as well as for irregularly updated
+// shared state. We use it for the latter in this example.
+typedef Kokkos::View<int> count_type;
+typedef count_type::HostMirror host_count_type;
+
+
+// Functor for finding a list of primes in a given set of numbers. If
+// run in parallel, the order of results is nondeterministic, because
+// hardware atomic updates do not guarantee an order of execution.
+struct findprimes {
+ view_type data;
+ view_type result;
+ count_type count;
+
+ findprimes (view_type data_, view_type result_, count_type count_) :
+ data (data_), result (result_), count (count_)
+ {}
+
+ // Test if data(i) is prime. If it is, increment the count of
+ // primes (stored in the zero-dimensional View 'count') and add the
+ // value to the current list of primes 'result'.
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int i) const {
+ const int number = data(i); // the current number
+
+ // Test all numbers from 3 to ceiling(sqrt(data(i))), to see if
+ // they are factors of data(i). It's not the most efficient prime
+ // test, but it works.
+ const int upper_bound = sqrt(1.0*number)+1;
+ bool is_prime = !(number%2 == 0);
+ int k = 3;
+ while (k < upper_bound && is_prime) {
+ is_prime = !(number%k == 0);
+ k += 2; // don't have to test even numbers
+ }
+
+ if (is_prime) {
+ // Use an atomic update both to update the current count of
+ // primes, and to find a place in the current list of primes for
+ // the new result.
+ //
+ // atomic_fetch_add results the _current_ count, but increments
+ // it (by 1 in this case). The current count of primes indexes
+ // into the first unoccupied position of the 'result' array.
+ const int idx = Kokkos::atomic_fetch_add (&count(), 1);
+ result(idx) = number;
+ }
+ }
+
+};
+
+int main () {
+ Kokkos::initialize ();
+
+ srand (61391); // Set the random seed
+
+ int nnumbers = 100000;
+ view_type data ("RND", nnumbers);
+ view_type result ("Prime", nnumbers);
+ count_type count ("Count");
+
+ host_view_type h_data = Kokkos::create_mirror_view (data);
+ host_view_type h_result = Kokkos::create_mirror_view (result);
+ host_count_type h_count = Kokkos::create_mirror_view (count);
+
+ typedef view_type::size_type size_type;
+ // Fill the 'data' array on the host with random numbers. We assume
+ // that they come from some process which is only implemented on the
+ // host, via some library. (That's true in this case.)
+ for (size_type i = 0; i < data.dimension_0 (); ++i) {
+ h_data(i) = rand () % nnumbers;
+ }
+ Kokkos::deep_copy (data, h_data); // copy from host to device
+
+ Kokkos::parallel_for (data.dimension_0 (), findprimes (data, result, count));
+ Kokkos::deep_copy (h_count, count); // copy from device to host
+
+ printf ("Found %i prime numbers in %i random numbers\n", h_count(), nnumbers);
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/data_layouts.cpp b/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/data_layouts.cpp
new file mode 100644
index 000000000..e61e8af59
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/01_data_layouts/data_layouts.cpp
@@ -0,0 +1,171 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+
+// These two View types are both 2-D arrays of double. However, they
+// have different layouts in memory. left_type has "layout left,"
+// which means "column major," the same as in Fortran, the BLAS, or
+// LAPACK. right_type has "layout right," which means "row major,"
+// the same as in C, C++, or Java.
+typedef Kokkos::View<double**, Kokkos::LayoutLeft> left_type;
+typedef Kokkos::View<double**, Kokkos::LayoutRight> right_type;
+// This is a one-dimensional View, so the layout matters less.
+// However, it still has a layout! Since its layout is not specified
+// explicitly in the type, its layout is a function of the memory
+// space. For example, the default Cuda layout is LayoutLeft, and the
+// default Host layout is LayoutRight.
+typedef Kokkos::View<double*> view_type;
+
+// parallel_for functor that fills the given View with some data. It
+// expects to access the View by rows in parallel: each call i of
+// operator() accesses a row.
+template<class ViewType>
+struct init_view {
+ ViewType a;
+ init_view (ViewType a_) : a (a_) {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const typename ViewType::size_type i) const {
+ // On CPUs this loop could be vectorized so j should do stride 1
+ // access on a for optimal performance. I.e. a should be LayoutRight.
+ // On GPUs threads should do coalesced loads and stores. That means
+ // that i should be the stride one access for optimal performance.
+ for (typename ViewType::size_type j = 0; j < a.dimension_1 (); ++j) {
+ a(i,j) = 1.0*a.dimension_0()*i + 1.0*j;
+ }
+ }
+};
+
+// Compute a contraction of v1 and v2 into a:
+//
+// a(i) := sum_j (v1(i,j) * v2(j,i))
+//
+// Since the functor is templated on the ViewTypes itself it doesn't matter what
+// there layouts are. That means you can use different layouts on different
+// architectures.
+template<class ViewType1, class ViewType2>
+struct contraction {
+ view_type a;
+ typename ViewType1::const_type v1;
+ typename ViewType2::const_type v2;
+ contraction (view_type a_, ViewType1 v1_, ViewType2 v2_) :
+ a (a_), v1 (v1_), v2 (v2_)
+ {}
+
+ // As with the initialization functor the performance of this operator
+ // depends on the architecture and the chosen data layouts.
+ // On CPUs optimal would be to vectorize the inner loop, so j should be the
+ // stride 1 access. That means v1 should be LayoutRight and v2 LayoutLeft.
+ // In order to get coalesced access on GPUs where i corresponds closely to
+ // the thread Index, i must be the stride 1 dimension. That means v1 should be
+ // LayoutLeft and v2 LayoutRight.
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const view_type::size_type i) const {
+ for (view_type::size_type j = 0; j < v1.dimension_1 (); ++j) {
+ a(i) = v1(i,j)*v2(j,i);
+ }
+ }
+};
+
+// Compute a dot product. This is used for result verification.
+struct dot {
+ view_type a;
+ dot (view_type a_) : a (a_) {}
+ typedef double value_type; //Specify type for reduction target, lsum
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const view_type::size_type i, double &lsum) const {
+ lsum += a(i)*a(i);
+ }
+};
+
+int main (int narg, char* arg[]) {
+ // When initializing Kokkos, you may pass in command-line arguments,
+ // just like with MPI_Init(). Kokkos reserves the right to remove
+ // arguments from the list that start with '--kokkos-'.
+ Kokkos::initialize (narg, arg);
+
+ int size = 10000;
+ view_type a("A",size);
+
+ // Define two views with LayoutLeft and LayoutRight.
+ left_type l("L",size,10000);
+ right_type r("R",size,10000);
+
+ // Initialize the data in the views.
+ Kokkos::parallel_for(size,init_view<left_type>(l));
+ Kokkos::parallel_for(size,init_view<right_type>(r));
+ Kokkos::fence();
+
+ // Measure time to execute the contraction kernel when giving it a
+ // LayoutLeft view for v1 and a LayoutRight view for v2. This should be
+ // fast on GPUs and slow on CPUs
+ Kokkos::Impl::Timer time1;
+ Kokkos::parallel_for(size,contraction<left_type,right_type>(a,l,r));
+ Kokkos::fence();
+ double sec1 = time1.seconds();
+
+ double sum1 = 0;
+ Kokkos::parallel_reduce(size,dot(a),sum1);
+ Kokkos::fence();
+
+ // Measure time to execute the contraction kernel when giving it a
+ // LayoutRight view for v1 and a LayoutLeft view for v2. This should be
+ // fast on CPUs and slow on GPUs
+ Kokkos::Impl::Timer time2;
+ Kokkos::parallel_for(size,contraction<right_type,left_type>(a,r,l));
+ Kokkos::fence();
+ double sec2 = time2.seconds();
+
+ double sum2 = 0;
+ Kokkos::parallel_reduce(size,dot(a),sum2);
+
+ // Kokkos' reductions are deterministic.
+ // The results should always be equal.
+ printf("Result Left/Right %f Right/Left %f (equal result: %i)\n",sec1,sec2,sum2==sum1);
+
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/memory_traits.cpp b/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/memory_traits.cpp
new file mode 100644
index 000000000..8317c78bc
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/02_memory_traits/memory_traits.cpp
@@ -0,0 +1,141 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+#include <cstdlib>
+
+typedef Kokkos::View<double*> view_type;
+// Kokkos::Views have an MemoryTraits template parameter which
+// allows users to specify usage scenarios of a View.
+// Some of those act simply as hints, which can be used to insert
+// optimal load and store paths, others change the symantics of the
+// access. The trait Kokkos::Atomic is one of the latter. A view with
+// that MemoryTrait will perform any access atomicly (read, write, update).
+//
+// In this example we use a view with a usage hint for RandomAccess.
+// Kokkos::RandomAccess means that we expect to use this view
+// with indirect indexing.
+//
+// In CUDA, RandomAccess allows accesses through the texture
+// cache. This only works if the View is read-only, which we enforce
+// through the first template parameter.
+//
+// Note that we are still talking about views of the data, its not a new allocation.
+// For example you can have an atomic view of a default view. While you even
+// could use both in the same kernel, this could lead to undefined behaviour because
+// one of your access paths is not atomic. Think of it in the same way as you think of
+// pointers to const data and pointers to non-const data (i.e. const double* and double*).
+// While these pointers can point to the same data you should not use them together if that
+// brakes the const guarantee of the first pointer.
+typedef Kokkos::View<const double*, Kokkos::MemoryTraits<Kokkos::RandomAccess> > view_type_rnd;
+typedef Kokkos::View<int**> idx_type;
+typedef idx_type::HostMirror idx_type_host;
+
+// We template this functor on the ViewTypes to show the effect of the RandomAccess trait.
+template<class DestType, class SrcType>
+struct localsum {
+ idx_type::const_type idx;
+ DestType dest;
+ SrcType src;
+ localsum (idx_type idx_, DestType dest_, SrcType src_) :
+ idx (idx_), dest (dest_), src (src_)
+ {}
+
+ // Calculate a local sum of values
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int i) const {
+ double tmp = 0.0;
+ for (int j = 0; j < (int) idx.dimension_1 (); ++j) {
+ // This is an indirect access on src
+ const double val = src(idx(i,j));
+ tmp += val*val + 0.5*(idx.dimension_0()*val -idx.dimension_1()*val);
+ }
+ dest(i) = tmp;
+ }
+};
+
+int main(int narg, char* arg[]) {
+ Kokkos::initialize (narg, arg);
+
+ int size = 1000000;
+
+ idx_type idx("Idx",size,64);
+ idx_type_host h_idx = Kokkos::create_mirror_view (idx);
+
+ view_type dest ("Dest", size);
+ view_type src ("Src", size);
+
+ srand(134231);
+
+ for (int i = 0; i < size; i++) {
+ for (view_type::size_type j = 0; j < h_idx.dimension_1 (); ++j) {
+ h_idx(i,j) = (size + i + (rand () % 500 - 250)) % size;
+ }
+ }
+
+ // Deep copy the initial data to the device
+ Kokkos::deep_copy(idx,h_idx);
+ // Run the first kernel to warmup caches
+ Kokkos::parallel_for(size,localsum<view_type,view_type_rnd>(idx,dest,src));
+ Kokkos::fence();
+
+ // Run the localsum functor using the RandomAccess trait. On CPUs there should
+ // not be any different in performance to not using the RandomAccess trait.
+ // On GPUs where can be a dramatic difference
+ Kokkos::Impl::Timer time1;
+ Kokkos::parallel_for(size,localsum<view_type,view_type_rnd>(idx,dest,src));
+ Kokkos::fence();
+ double sec1 = time1.seconds();
+
+ Kokkos::Impl::Timer time2;
+ Kokkos::parallel_for(size,localsum<view_type,view_type>(idx,dest,src));
+ Kokkos::fence();
+ double sec2 = time2.seconds();
+
+ printf("Time with Trait RandomAccess: %f with Plain: %f \n",sec1,sec2);
+
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp b/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp
new file mode 100644
index 000000000..c8001ebaa
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/03_subviews/subviews.cpp
@@ -0,0 +1,190 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+// This example simulates one timestep of an explicit
+// finite-difference discretization of a time-dependent partial
+// differential equation (PDE). It shows how to take subviews of the
+// mesh in order to represent particular boundaries or the interior of
+// the mesh.
+
+#include <Kokkos_Core.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+
+typedef Kokkos::View<double***, Kokkos::LayoutRight> mesh_type;
+
+// These View types represent subviews of the mesh. Some of the Views
+// have layout LayoutStride, meaning that they have run-time "strides"
+// in each dimension which may differ from that dimension. For
+// example, inner_mesh_type (which represents the interior of the
+// mesh) has to skip over the boundaries when computing its stride;
+// the dimensions of the interior mesh differ from these strides. You
+// may safely always use a LayoutStride layout when taking a subview
+// of a LayoutRight or LayoutLeft subview, but strided accesses may
+// cost a bit more, especially for 1-D Views.
+typedef Kokkos::View<double**, Kokkos::LayoutStride> xz_plane_type;
+typedef Kokkos::View<double**, Kokkos::LayoutRight> yz_plane_type;
+typedef Kokkos::View<double**, Kokkos::LayoutStride> xy_plane_type;
+typedef Kokkos::View<double***, Kokkos::LayoutStride> inner_mesh_type;
+
+// Functor to set all entries of a boundary of the mesh to a constant
+// value. The functor is templated on ViewType because different
+// boundaries may have different layouts.
+template<class ViewType>
+struct set_boundary {
+ ViewType a;
+ double value;
+
+ set_boundary (ViewType a_, double value_) :
+ a (a_), value (value_)
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const typename ViewType::size_type i) const {
+ for (typename ViewType::size_type j = 0; j < a.dimension_1 (); ++j) {
+ a(i,j) = value;
+ }
+ }
+};
+
+// Functor to set all entries of a boundary of the mesh to a constant
+// value. The functor is templated on ViewType because different
+// boundaries may have different layouts.
+template<class ViewType>
+struct set_inner {
+ ViewType a;
+ double value;
+
+ set_inner (ViewType a_, double value_) :
+ a (a_), value (value_)
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator () (const typename ViewType::size_type i) const {
+ typedef typename ViewType::size_type size_type;
+ for (size_type j = 0; j < a.dimension_1 (); ++j) {
+ for (size_type k = 0; k < a.dimension_2 (); ++k) {
+ a(i,j,k) = value;
+ }
+ }
+ }
+};
+
+// Update the interior of the mesh. This simulates one timestep of a
+// finite-difference method.
+template<class ViewType>
+struct update {
+ ViewType a;
+ const double dt;
+
+ update (ViewType a_, const double dt_) :
+ a (a_), dt (dt_)
+ {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (typename ViewType::size_type i) const {
+ typedef typename ViewType::size_type size_type;
+ i++;
+ for (size_type j = 1; j < a.dimension_1()-1; j++) {
+ for (size_type k = 1; k < a.dimension_2()-1; k++) {
+ a(i,j,k) += dt* (a(i,j,k+1) - a(i,j,k-1) +
+ a(i,j+1,k) - a(i,j-1,k) +
+ a(i+1,j,k) - a(i-1,j,k));
+ }
+ }
+ }
+};
+
+
+int main (int narg, char* arg[]) {
+ using Kokkos::ALL;
+ using Kokkos::pair;
+ using Kokkos::parallel_for;
+ using Kokkos::subview;
+ typedef mesh_type::size_type size_type;
+
+ Kokkos::initialize (narg, arg);
+
+ // The number of mesh points along each dimension of the mesh, not
+ // including boundaries.
+ const size_type size = 100;
+
+ // A is the full cubic 3-D mesh, including the boundaries.
+ mesh_type A ("A", size+2, size+2, size+2);
+ // Ai is the "inner" part of A, _not_ including the boundaries.
+ //
+ // A pair of indices in a particular dimension means the contiguous
+ // zero-based index range in that dimension, including the first
+ // entry of the pair but _not_ including the second entry.
+ inner_mesh_type Ai = subview(A, pair<size_type, size_type> (1, size+1),
+ pair<size_type, size_type> (1, size+1),
+ pair<size_type, size_type> (1, size+1));
+ // A has six boundaries, one for each face of the cube.
+ // Create a View of each of these boundaries.
+ // ALL() means "select all indices in that dimension."
+ xy_plane_type Zneg_halo = subview(A, ALL (), ALL (), 0);
+ xy_plane_type Zpos_halo = subview(A, ALL (), ALL (), 101);
+ xz_plane_type Yneg_halo = subview(A, ALL (), 0, ALL ());
+ xz_plane_type Ypos_halo = subview(A, ALL (), 101, ALL ());
+ yz_plane_type Xneg_halo = subview(A, 0, ALL (), ALL ());
+ yz_plane_type Xpos_halo = subview(A, 101, ALL (), ALL ());
+
+ // Set the boundaries to their initial conditions.
+ parallel_for (Zneg_halo.dimension_0 (), set_boundary<xy_plane_type> (Zneg_halo, 1));
+ parallel_for (Zpos_halo.dimension_0 (), set_boundary<xy_plane_type> (Zpos_halo, -1));
+ parallel_for (Yneg_halo.dimension_0 (), set_boundary<xz_plane_type> (Yneg_halo, 2));
+ parallel_for (Ypos_halo.dimension_0 (), set_boundary<xz_plane_type> (Ypos_halo, -2));
+ parallel_for (Xneg_halo.dimension_0 (), set_boundary<yz_plane_type> (Xneg_halo, 3));
+ parallel_for (Xpos_halo.dimension_0 (), set_boundary<yz_plane_type> (Xpos_halo, -3));
+
+ // Set the interior of the mesh to its initial condition.
+ parallel_for (Ai.dimension_0 (), set_inner<inner_mesh_type> (Ai, 0));
+
+ // Update the interior of the mesh.
+ // This simulates one timestep with dt = 0.1.
+ parallel_for (Ai.dimension_0 (), update<mesh_type> (A, 0.1));
+
+ printf ("Done\n");
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/dual_view.cpp b/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/dual_view.cpp
new file mode 100644
index 000000000..62ddb9c18
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/04_dualviews/dual_view.cpp
@@ -0,0 +1,214 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_DualView.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+#include <cstdlib>
+
+// DualView helps you manage data and computations that take place on
+// two different memory spaces. Examples include CUDA device memory
+// and (CPU) host memory (currently implemented), or Intel Knights
+// Landing MCDRAM and DRAM (not yet implemented). For example, if you
+// have ported only some parts of you application to run in CUDA,
+// DualView can help manage moving data between the parts of your
+// application that work best with CUDA, and the parts that work
+// better on the CPU.
+//
+// A DualView takes the same template parameters as a View, but
+// contains two Views: One that lives in the DualView's memory space,
+// and one that lives in that memory space's host mirror space. If
+// both memory spaces are the same, then the two Views just alias one
+// another. This means that you can use DualView all the time, even
+// when not running in a memory space like CUDA. DualView's
+// operations to help you manage memory take almost no time in that
+// case. This makes your code even more performance portable.
+
+typedef Kokkos::DualView<double*> view_type;
+typedef Kokkos::DualView<int**> idx_type;
+
+
+template<class ExecutionSpace>
+struct localsum {
+ // If the functor has a public 'execution_space' typedef, that defines
+ // the functor's execution space (where it runs in parallel). This
+ // overrides Kokkos' default execution space.
+ typedef ExecutionSpace execution_space;
+
+ typedef typename Kokkos::Impl::if_c<Kokkos::Impl::is_same<ExecutionSpace,Kokkos::DefaultExecutionSpace>::value ,
+ idx_type::memory_space, idx_type::host_mirror_space>::type memory_space;
+
+ // Get the view types on the particular device for which the functor
+ // is instantiated.
+ //
+ // "const_data_type" is a typedef in View (and DualView) which is
+ // the const version of the first template parameter of the View.
+ // For example, the const_data_type version of double** is const
+ // double**.
+ Kokkos::View<idx_type::const_data_type, idx_type::array_layout, memory_space> idx;
+ // "array_intrinsic_type" is a typedef in ViewTraits (and DualView) which is the
+ // array version of the value(s) stored in the View.
+ Kokkos::View<view_type::array_intrinsic_type, view_type::array_layout, memory_space> dest;
+ Kokkos::View<view_type::const_data_type, view_type::array_layout,
+ memory_space, Kokkos::MemoryRandomAccess> src;
+
+ // Constructor takes DualViews, synchronizes them to the device,
+ // then marks them as modified on the device.
+ localsum (idx_type dv_idx, view_type dv_dest, view_type dv_src)
+ {
+ // Extract the view on the correct Device (i.e., the correct
+ // memory space) from the DualView. DualView has a template
+ // method, view(), which is templated on the memory space. If the
+ // DualView has a View from that memory space, view() returns the
+ // View in that space.
+ idx = dv_idx.view<memory_space> ();
+ dest = dv_dest.template view<memory_space> ();
+ src = dv_src.template view<memory_space> ();
+
+ // Synchronize the DualView to the correct Device.
+ //
+ // DualView's sync() method is templated on a memory space, and
+ // synchronizes the DualView in a one-way fashion to that memory
+ // space. "Synchronizing" means copying, from the other memory
+ // space to the Device memory space. sync() does _nothing_ if the
+ // Views on the two memory spaces are in sync. DualView
+ // determines this by the user manually marking one side or the
+ // other as modified; see the modify() call below.
+
+ dv_idx.sync<memory_space> ();
+ dv_dest.template sync<memory_space> ();
+ dv_src.template sync<memory_space> ();
+
+ // Mark dest as modified on Device.
+ dv_dest.template modify<memory_space> ();
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int i) const {
+ double tmp = 0.0;
+ for (int j = 0; j < (int) idx.dimension_1(); ++j) {
+ const double val = src(idx(i,j));
+ tmp += val*val + 0.5*(idx.dimension_0()*val -idx.dimension_1()*val);
+ }
+ dest(i) += tmp;
+ }
+};
+
+class ParticleType {
+ public:
+ double q;
+ double m;
+ double q_over_m;
+ KOKKOS_INLINE_FUNCTION
+ ParticleType(double q_ = -1, double m_ = 1):
+ q(q_), m(m_), q_over_m(q/m) {}
+protected:
+};
+
+ typedef Kokkos::DualView<ParticleType[10]> ParticleTypes;
+int main (int narg, char* arg[]) {
+ Kokkos::initialize (narg, arg);
+
+ ParticleTypes test("Test");
+ Kokkos::fence();
+ test.h_view(0) = ParticleType(-1e4,1);
+ Kokkos::fence();
+
+ int size = 1000000;
+
+ // Create DualViews. This will allocate on both the device and its
+ // host_mirror_device.
+ idx_type idx ("Idx",size,64);
+ view_type dest ("Dest",size);
+ view_type src ("Src",size);
+
+
+ srand (134231);
+
+ // Get a reference to the host view of idx directly (equivalent to
+ // idx.view<idx_type::host_mirror_space>() )
+ idx_type::t_host h_idx = idx.h_view;
+ for (int i = 0; i < size; ++i) {
+ for (view_type::size_type j = 0; j < h_idx.dimension_1 (); ++j) {
+ h_idx(i,j) = (size + i + (rand () % 500 - 250)) % size;
+ }
+ }
+
+ // Mark idx as modified on the host_mirror_space so that a
+ // sync to the device will actually move data. The sync happens in
+ // the functor's constructor.
+ idx.modify<idx_type::host_mirror_space> ();
+
+ // Run on the device. This will cause a sync of idx to the device,
+ // since it was marked as modified on the host.
+ Kokkos::Impl::Timer timer;
+ Kokkos::parallel_for(size,localsum<view_type::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec1_dev = timer.seconds();
+
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<view_type::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec2_dev = timer.seconds();
+
+ // Run on the host's default execution space (could be the same as device).
+ // This will cause a sync back to the host of dest. Note that if the Device is CUDA,
+ // the data layout will not be optimal on host, so performance is
+ // lower than what it would be for a pure host compilation.
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<Kokkos::HostSpace::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec1_host = timer.seconds();
+
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<Kokkos::HostSpace::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec2_host = timer.seconds();
+
+ printf("Device Time with Sync: %f without Sync: %f \n",sec1_dev,sec2_dev);
+ printf("Host Time with Sync: %f without Sync: %f \n",sec1_host,sec2_host);
+
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/uvm_example.cpp b/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/uvm_example.cpp
new file mode 100644
index 000000000..a7d460a1c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/05_NVIDIA_UVM/uvm_example.cpp
@@ -0,0 +1,134 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_DualView.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+#include <cstdlib>
+
+typedef Kokkos::View<double*> view_type;
+typedef Kokkos::View<int**> idx_type;
+
+
+template<class Device>
+struct localsum {
+ // Define the execution space for the functor (overrides the DefaultExecutionSpace)
+ typedef Device execution_space;
+
+ // Get the view types on the particular device the functor is instantiated for
+ idx_type::const_type idx;
+ view_type dest;
+ Kokkos::View<view_type::const_data_type, view_type::array_layout, view_type::execution_space, Kokkos::MemoryRandomAccess > src;
+
+ localsum(idx_type idx_, view_type dest_,
+ view_type src_):idx(idx_),dest(dest_),src(src_) {
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (int i) const {
+ double tmp = 0.0;
+ for(int j = 0; j < idx.dimension_1(); j++) {
+ const double val = src(idx(i,j));
+ tmp += val*val + 0.5*(idx.dimension_0()*val -idx.dimension_1()*val);
+ }
+ dest(i) += tmp;
+ }
+};
+
+int main(int narg, char* arg[]) {
+ Kokkos::initialize(narg,arg);
+
+ int size = 1000000;
+
+ // Create Views
+ idx_type idx("Idx",size,64);
+ view_type dest("Dest",size);
+ view_type src("Src",size);
+
+ srand(134231);
+
+ // When using UVM Cuda views can be accessed on the Host directly
+ for(int i=0; i<size; i++) {
+ for(int j=0; j<idx.dimension_1(); j++)
+ idx(i,j) = (size + i + (rand()%500 - 250))%size;
+ }
+
+ Kokkos::fence();
+ // Run on the device
+ // This will cause a sync of idx to the device since it was modified on the host
+ Kokkos::Impl::Timer timer;
+ Kokkos::parallel_for(size,localsum<view_type::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec1_dev = timer.seconds();
+
+ // No data transfer will happen now, since nothing is accessed on the host
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<view_type::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec2_dev = timer.seconds();
+
+ // Run on the host
+ // This will cause a sync back to the host of dest which was changed on the device
+ // Compare runtime here with the dual_view example: dest will be copied back in 4k blocks
+ // when they are accessed the first time during the parallel_for. Due to the latency of a memcpy
+ // this gives lower effective bandwidth when doing a manual copy via dual views
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<Kokkos::HostSpace::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec1_host = timer.seconds();
+
+ // No data transfers will happen now
+ timer.reset();
+ Kokkos::parallel_for(size,localsum<Kokkos::HostSpace::execution_space>(idx,dest,src));
+ Kokkos::fence();
+ double sec2_host = timer.seconds();
+
+
+
+ printf("Device Time with Sync: %lf without Sync: %lf \n",sec1_dev,sec2_dev);
+ printf("Host Time with Sync: %lf without Sync: %lf \n",sec1_host,sec2_host);
+
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/06_AtomicViews/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/06_AtomicViews/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/06_AtomicViews/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/Makefile
new file mode 100644
index 000000000..06955b364
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3 --default-stream per-thread
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp b/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp
new file mode 100644
index 000000000..8c7e26c85
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/07_Overlapping_DeepCopy/overlapping_deepcopy.cpp
@@ -0,0 +1,148 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+#include <typeinfo>
+#include <cmath>
+#include <impl/Kokkos_Timer.hpp>
+
+struct FillDevice {
+ double value;
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> a;
+ FillDevice(const double& val, const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace>& d_a):
+ value(val),a(d_a){}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int& i) const {
+ a(i) = value;
+ }
+};
+
+struct ComputeADevice {
+ int iter;
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> a;
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> b;
+ ComputeADevice(const int& iter_,
+ const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace>& d_a,
+ const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace>& d_b):
+ iter(iter_),a(d_a),b(d_b){}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int& i) const {
+ for(int j=1;j<iter;j++) {
+ a(i) += std::pow(b(i),1.0+1.0/iter);
+ }
+ }
+};
+
+struct ComputeAHost {
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace> a;
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace> b;
+ ComputeAHost( const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace>& d_a,
+ const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace>& d_b):
+ a(d_a),b(d_b){}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int& i) const {
+ a(i) += b(i);
+ }
+};
+
+struct MergeDevice {
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> a;
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> b;
+ MergeDevice(
+ const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace>& d_a,
+ const Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace>& d_b):
+ a(d_a),b(d_b){}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (const int& i) const {
+ a(i) += b(i);
+ }
+};
+
+int main(int argc, char * argv[]) {
+ int size = 100000000;
+ Kokkos::initialize();
+ int synch = atoi(argv[1]);
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> d_a("Device A",size);
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> d_b("Device B",size);
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaSpace> d_tmp("Device tmp",size);
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace> h_a("Host A",size);
+ Kokkos::View<double*,Kokkos::LayoutLeft,Kokkos::CudaHostPinnedSpace> h_b("Host B",size);
+
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::Cuda>(0,size),FillDevice(0.0,d_a));
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::Cuda>(0,size),FillDevice(1.3513,d_b));
+ Kokkos::fence();
+ Kokkos::Impl::Timer timer;
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::Cuda>(0,size),ComputeADevice(20,d_a,d_b));
+
+ if(synch==1)
+ Kokkos::deep_copy(Kokkos::OpenMP(),h_b,d_b);
+ if(synch==2)
+ Kokkos::deep_copy(h_b,d_b);
+
+
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::OpenMP>(0,size),[=] (const int& i) {
+ h_a(i) = 0.0;
+ });
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::OpenMP>(0,size),ComputeAHost(h_a,h_b));
+ Kokkos::OpenMP::fence();
+ if(synch==1)
+ Kokkos::deep_copy(Kokkos::OpenMP(), d_tmp,h_a);
+ if(synch==2)
+ Kokkos::deep_copy(d_tmp,h_a);
+ Kokkos::fence();
+
+ std::cout << "Time " << timer.seconds() << std::endl;
+ Kokkos::parallel_for(Kokkos::RangePolicy<Kokkos::Cuda>(0,size),MergeDevice(d_a,d_tmp));
+
+ Kokkos::deep_copy(h_a,d_a);
+ std::cout << "h_a(0): " << h_a(0) << " ( Correct: 27.4154 )" << std::endl;
+ Kokkos::finalize();
+}
+
+
+
diff --git a/lib/kokkos/example/tutorial/Advanced_Views/Makefile b/lib/kokkos/example/tutorial/Advanced_Views/Makefile
new file mode 100644
index 000000000..19053b61b
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Advanced_Views/Makefile
@@ -0,0 +1,84 @@
+default:
+ cd ./01_data_layouts; \
+ make -j 4
+ cd ./02_memory_traits; \
+ make -j 4
+ cd ./03_subviews; \
+ make -j 4
+ cd ./04_dualviews; \
+ make -j 4
+ cd ./05_NVIDIA_UVM; \
+ make -j 4
+ cd ./06_AtomicViews; \
+ make -j 4
+
+openmp:
+ cd ./01_data_layouts; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./02_memory_traits; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./03_subviews; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./04_dualviews; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./05_NVIDIA_UVM; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./06_AtomicViews; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+
+pthreads:
+ cd ./01_data_layouts; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./02_memory_traits; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./03_subviews; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./04_dualviews; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./05_NVIDIA_UVM; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./06_AtomicViews; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+
+serial:
+ cd ./01_data_layouts; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./02_memory_traits; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./03_subviews; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./04_dualviews; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./05_NVIDIA_UVM; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./06_AtomicViews; \
+ make -j 4 KOKKOS_DEVICES=Serial
+
+cuda:
+ cd ./01_data_layouts; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./02_memory_traits; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./03_subviews; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./04_dualviews; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./05_NVIDIA_UVM; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./06_AtomicViews; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+
+clean:
+ cd ./01_data_layouts; \
+ make clean
+ cd ./02_memory_traits; \
+ make clean
+ cd ./03_subviews; \
+ make clean
+ cd ./04_dualviews; \
+ make clean
+ cd ./05_NVIDIA_UVM; \
+ make clean
+ cd ./06_AtomicViews; \
+ make clean
+
diff --git a/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/Makefile b/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/random_numbers.cpp b/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/random_numbers.cpp
new file mode 100644
index 000000000..52816333c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Algorithms/01_random_numbers/random_numbers.cpp
@@ -0,0 +1,152 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_Random.hpp>
+#include <Kokkos_DualView.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdlib>
+
+typedef Kokkos::HostSpace::execution_space DefaultHostType;
+
+// Kokkos provides two different random number generators with a 64 bit and a 1024 bit state.
+// These generators are based on Vigna, Sebastiano (2014). "An experimental exploration of Marsaglia's xorshift generators, scrambled"
+// See: http://arxiv.org/abs/1402.6246
+// The generators can be used fully independently on each thread and have been tested to
+// produce good statistics for both inter and intra thread numbers.
+// Note that within a kernel NO random number operations are (team) collective operations.
+// Everything can be called within branches. This is a difference to the curand library where
+// certain operations are required to be called by all threads in a block.
+//
+// In Kokkos you are required to create a pool of generator states, so that threads can
+// grep their own. On CPU architectures the pool size is equal to the thread number,
+// on CUDA about 128k states are generated (enough to give every potentially simultaneously
+// running thread its own state). With a kernel a thread is required to aquire a state from the
+// pool and later return it.
+// On CPUs the Random number generator is deterministic if using the same number of threads.
+// On GPUs (i.e. using the CUDA backend it is not deterministic because threads aquire states via
+// atomics.
+
+// A Functor for generating uint64_t random numbers templated on the GeneratorPool type
+template<class GeneratorPool>
+struct generate_random {
+
+ // The GeneratorPool
+ GeneratorPool rand_pool;
+
+ // Output View for the random numbers
+ Kokkos::View<uint64_t*> vals;
+ int samples;
+
+ // Initialize all members
+ generate_random(Kokkos::View<uint64_t*> vals_,
+ GeneratorPool rand_pool_,
+ int samples_):
+ vals(vals_),rand_pool(rand_pool_),samples(samples_) {}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() (int i) const {
+ // Get a random number state from the pool for the active thread
+ typename GeneratorPool::generator_type rand_gen = rand_pool.get_state();
+
+ // Draw samples numbers from the pool as urand64 between 0 and rand_pool.MAX_URAND64
+ // Note there are function calls to get other type of scalars, and also to specify
+ // Ranges or get a normal distributed float.
+ for(int k = 0;k<samples;k++)
+ vals(i*samples+k) = rand_gen.urand64();
+
+ // Give the state back, which will allow another thread to aquire it
+ rand_pool.free_state(rand_gen);
+ }
+};
+
+
+
+
+int main(int argc, char* args[]) {
+ if (argc != 3){
+ printf("Please pass two integers on the command line\n");
+ }
+ else {
+
+ // Initialize Kokkos
+ Kokkos::initialize(argc,args);
+ int size = atoi(args[1]);
+ int samples = atoi(args[2]);
+
+ // Create two random number generator pools one for 64bit states and one for 1024 bit states
+ // Both take an 64 bit unsigned integer seed to initialize a Random_XorShift64 generator which
+ // is used to fill the generators of the pool.
+ Kokkos::Random_XorShift64_Pool<> rand_pool64(5374857);
+ Kokkos::Random_XorShift1024_Pool<> rand_pool1024(5374857);
+ Kokkos::DualView<uint64_t*> vals("Vals",size*samples);
+
+ // Run some performance comparisons
+ Kokkos::Impl::Timer timer;
+ Kokkos::parallel_for(size,generate_random<Kokkos::Random_XorShift64_Pool<> >(vals.d_view,rand_pool64,samples));
+ Kokkos::fence();
+
+ timer.reset();
+ Kokkos::parallel_for(size,generate_random<Kokkos::Random_XorShift64_Pool<> >(vals.d_view,rand_pool64,samples));
+ Kokkos::fence();
+ double time_64 = timer.seconds();
+
+ Kokkos::parallel_for(size,generate_random<Kokkos::Random_XorShift1024_Pool<> >(vals.d_view,rand_pool1024,samples));
+ Kokkos::fence();
+
+ timer.reset();
+ Kokkos::parallel_for(size,generate_random<Kokkos::Random_XorShift1024_Pool<> >(vals.d_view,rand_pool1024,samples));
+ Kokkos::fence();
+ double time_1024 = timer.seconds();
+
+ printf("#Time XorShift64*: %lf %lf\n",time_64,1.0e-9*samples*size/time_64 );
+ printf("#Time XorShift1024*: %lf %lf\n",time_1024,1.0e-9*samples*size/time_1024 );
+
+ Kokkos::deep_copy(vals.h_view,vals.d_view);
+
+ Kokkos::finalize();
+ }
+ return 0;
+}
+
+
diff --git a/lib/kokkos/example/tutorial/Algorithms/Makefile b/lib/kokkos/example/tutorial/Algorithms/Makefile
new file mode 100644
index 000000000..edc2a3602
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Algorithms/Makefile
@@ -0,0 +1,24 @@
+default:
+ cd ./01_random_numbers; \
+ make -j 4
+
+openmp:
+ cd ./01_random_numbers; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+
+pthreads:
+ cd ./01_random_numbers; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+
+serial:
+ cd ./01_random_numbers; \
+ make -j 4 KOKKOS_DEVICES=Serial
+
+cuda:
+ cd ./01_random_numbers; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+
+clean:
+ cd ./01_random_numbers; \
+ make clean
+
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/thread_teams.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/thread_teams.cpp
new file mode 100644
index 000000000..f2de0809a
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams/thread_teams.cpp
@@ -0,0 +1,94 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+
+// Using default execution space define a TeamPolicy and its member_type
+// The member_type is what the operator of a functor or Lambda gets, for
+// a simple RangePolicy the member_type is simply an integer
+// For a TeamPolicy its a much richer object, since it provides all information
+// to identify a thread uniquely and some team related function calls such as a
+// barrier (which will be used in a subsequent example).
+// A ThreadTeam consists of 1 to n threads where the maxmimum value of n is
+// determined by the hardware. On a dual socket CPU machine with 8 cores per socket
+// the maximum size of a team is 8. The number of teams (i.e. the league_size) is
+// not limited by physical constraints. Its a pure logical number.
+
+typedef Kokkos::TeamPolicy<> team_policy ;
+typedef team_policy::member_type team_member ;
+
+// Define a functor which can be launched using the TeamPolicy
+struct hello_world {
+ typedef int value_type; //Specify value type for reduction target, sum
+
+ // This is a reduction operator which now takes as first argument the
+ // TeamPolicy member_type. Every member of the team contributes to the
+ // total sum.
+ // It is helpful to think of this operator as a parallel region for a team
+ // (i.e. every team member is active and will execute the code).
+ KOKKOS_INLINE_FUNCTION
+ void operator() ( const team_member & thread, int& sum) const {
+ sum+=1;
+ // The TeamPolicy<>::member_type provides functions to query the multi
+ // dimensional index of a thread as well as the number of thread-teams and the size
+ // of each team.
+ printf("Hello World: %i %i // %i %i\n",thread.league_rank(),thread.team_rank(),thread.league_size(),thread.team_size());
+ }
+};
+
+int main(int narg, char* args[]) {
+ Kokkos::initialize(narg,args);
+
+ // Launch 12 teams of the maximum number of threads per team
+ const team_policy policy( 12 , team_policy::team_size_max( hello_world() ) );
+
+ int sum = 0;
+ Kokkos::parallel_reduce( policy , hello_world() , sum );
+
+ // The result will be 12*team_policy::team_size_max( hello_world())
+ printf("Result %i\n",sum);
+
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp
new file mode 100644
index 000000000..5d081bf62
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/01_thread_teams_lambda/thread_teams_lambda.cpp
@@ -0,0 +1,93 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+
+// Demonstrate a parallel reduction using thread teams (TeamPolicy).
+//
+// A thread team consists of 1 to n threads. The hardware determines
+// the maxmimum value of n. On a dual-socket CPU machine with 8 cores
+// per socket, the maximum size of a team is 8. The number of teams
+// (the league_size) is not limited by physical constraints (up to
+// some reasonable bound, which eventually depends upon the hardware
+// and programming model implementation).
+
+int main (int narg, char* args[]) {
+ using Kokkos::parallel_reduce;
+ typedef Kokkos::TeamPolicy<> team_policy;
+ typedef typename team_policy::member_type team_member;
+
+ Kokkos::initialize (narg, args);
+
+ // Set up a policy that launches 12 teams, with the maximum number
+ // of threads per team.
+ const team_policy policy (12, team_policy::team_size_max ( [=]{} ));
+
+ // This is a reduction with a team policy. The team policy changes
+ // the first argument of the lambda. Rather than an integer index
+ // (as with RangePolicy), it's now TeamPolicy::member_type. This
+ // object provides all information to identify a thread uniquely.
+ // It also provides some team-related function calls such as a team
+ // barrier (which a subsequent example will use).
+ //
+ // Every member of the team contributes to the total sum. It is
+ // helpful to think of the lambda's body as a "team parallel
+ // region." That is, every team member is active and will execute
+ // the body of the lambda.
+ int sum = 0;
+ parallel_reduce (policy, KOKKOS_LAMBDA (const team_member& thread, int& lsum) {
+ lsum += 1;
+ // TeamPolicy<>::member_type provides functions to query the
+ // multidimensional index of a thread, as well as the number of
+ // thread teams and the size of each team.
+ printf ("Hello World: %i %i // %i %i\n", thread.league_rank (),
+ thread.team_rank (), thread.league_size (), thread.team_size ());
+ }, sum);
+
+ // The result will be 12*team_policy::team_size_max([=]{})
+ printf ("Result %i\n",sum);
+
+ Kokkos::finalize ();
+}
+
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/nested_parallel_for.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/nested_parallel_for.cpp
new file mode 100644
index 000000000..4357b4fa1
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/02_nested_parallel_for/nested_parallel_for.cpp
@@ -0,0 +1,89 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <cstdio>
+
+// See 01_thread_teams for an explanation of a basic TeamPolicy
+typedef Kokkos::TeamPolicy<> team_policy ;
+typedef typename team_policy::member_type team_member ;
+
+struct hello_world {
+ typedef int value_type; //Specify value type for reduction target, sum
+ KOKKOS_INLINE_FUNCTION
+ void operator() ( const team_member & thread, int& sum) const {
+ sum+=1;
+ // When using the TeamPolicy Kokkos allows for nested parallel loops.
+ // All three Kokkos parallel patterns are allowed (for, reduce, scan) and they
+ // largely follow the same syntax as on the global level.
+ // The execution policy for the Thread level nesting (the Vector level is in the next
+ // tutorial example) is Kokkos::TeamThreadRange. This means the loop will be executed
+ // by all members of the team and the loop count will be split between threads of the
+ // team. Its arguments are the team_member, and a loop count.
+ // Not every thread will do the same amount of iterations. On a GPU for example with
+ // a team_size() larger than 31 only the first 31 threads would actually do anything.
+ // On a CPU with 8 threads 7 would execute 4 loop iterations, and 1 thread would do
+ // 3. Note also that the mode of splitting the count is architecture dependent similar
+ // to what the RangePolicy on a global level does.
+ // The call itself is not guaranteed to be synchronous. Also keep in mind that the
+ // operator using a team_policy acts like a parallel region for the team. That means
+ // that everything outside of the nested parallel_for is also executed by all threads
+ // of the team.
+ Kokkos::parallel_for(Kokkos::TeamThreadRange(thread,31), [&] (const int& i) {
+ printf("Hello World: (%i , %i) executed loop %i \n",thread.league_rank(),thread.team_rank(),i);
+ });
+ }
+};
+
+int main(int narg, char* args[]) {
+ Kokkos::initialize(narg,args);
+
+ // Launch 3 teams of the maximum number of threads per team
+ const team_policy policy( 3 , team_policy::team_size_max( hello_world() ) );
+
+ int sum = 0;
+ Kokkos::parallel_reduce( policy , hello_world() , sum );
+ printf("Result %i\n",sum);
+
+ Kokkos::finalize();
+}
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/vectorization.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/vectorization.cpp
new file mode 100644
index 000000000..0eac4309a
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/03_vectorization/vectorization.cpp
@@ -0,0 +1,162 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_Random.hpp>
+#include <cstdio>
+
+#ifdef KOKKOS_HAVE_CXX11
+
+// The TeamPolicy actually supports 3D parallelism: Teams, Threads, Vector
+// Kokkos::parallel_{for/reduce/scan} calls can be completely free nested.
+// The execution policies for the nested layers are TeamThreadRange and
+// ThreadVectorRange.
+// The only restriction on nesting is that a given level can only be nested in a
+// higher one. e.g. a ThreadVectorRange can be nested inside a TeamPolicy operator
+// and inside a TeamThreadRange, but you can not nest a ThreadVectorRange or a
+// TeamThreadRange inside another ThreadVectorRange.
+// As with the 2D execution of TeamPolicy the operator has to be considered as
+// a parallel region even with respect to VectorLanes. That means even outside
+// a TeamThread or VectorThread loop all threads of a team and all vector lanes
+// of a thread execute every line of the operator as long as there are no restricitons
+// on them.
+// Code lines can be restricted using Kokkos::single to either execute once PerThread
+// or execute once PerTeam.
+typedef typename Kokkos::TeamPolicy<>::member_type team_member ;
+
+struct SomeCorrelation {
+ typedef int value_type; //Specify value type for reduction target, sum
+ typedef Kokkos::DefaultExecutionSpace::scratch_memory_space shared_space;
+ typedef Kokkos::View<int*,shared_space,Kokkos::MemoryUnmanaged> shared_1d_int;
+
+ Kokkos::View<const int***,Kokkos::LayoutRight> data;
+ Kokkos::View<int> gsum;
+
+ SomeCorrelation(Kokkos::View<int***,Kokkos::LayoutRight> data_in,
+ Kokkos::View<int> sum):data(data_in),gsum(sum){}
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() ( const team_member & thread) const {
+ int i = thread.league_rank();
+
+ // Allocate a shared array for the team.
+ shared_1d_int count(thread.team_shmem(),data.dimension_1());
+
+ // With each team run a parallel_for with its threads
+ Kokkos::parallel_for(Kokkos::TeamThreadRange(thread,data.dimension_1()), [=] (const int& j) {
+ int tsum;
+ // Run a vector loop reduction over the inner dimension of data
+ // Count how many values are multiples of 4
+ // Every vector lane gets the same reduction value (tsum) back, it is broadcast to all vector lanes
+ Kokkos::parallel_reduce(Kokkos::ThreadVectorRange(thread,data.dimension_2()), [=] (const int& k, int & vsum) {
+ vsum+= (data(i,j,k) % 4 == 0)?1:0;
+ },tsum);
+
+ // Make sure only one vector lane adds the reduction value to the shared array, i.e. execute
+ // the next line only once PerThread
+ Kokkos::single(Kokkos::PerThread(thread),[=] () {
+ count(j) = tsum;
+ });
+ });
+
+ // Wait for all threads to finish the parallel_for so that all shared memory writes are done
+ thread.team_barrier();
+
+ // Check with one vector lane from each thread how many consecutive
+ // data segments have the same number of values divisible by 4
+ // The team reduction value is again broadcast to every team member (and every vector lane)
+ int team_sum = 0;
+ Kokkos::parallel_reduce(Kokkos::TeamThreadRange(thread, data.dimension_1()-1), [=] (const int& j, int& thread_sum) {
+ // It is not valid to directly add to thread_sum
+ // Use a single function with broadcast instead
+ // team_sum will be used as input to the operator (i.e. it is used to initialize sum)
+ // the end value of sum will be broadcast to all vector lanes in the thread.
+ Kokkos::single(Kokkos::PerThread(thread),[=] (int& sum) {
+ if(count(j)==count(j+1)) sum++;
+ },thread_sum);
+ },team_sum);
+
+ // Add with one thread and vectorlane of the team the team_sum to the global value
+ Kokkos::single(Kokkos::PerTeam(thread),[=] () {
+ Kokkos::atomic_add(&gsum(),team_sum);
+ });
+ }
+
+ // The functor needs to define how much shared memory it requests given a team_size.
+ size_t team_shmem_size( int team_size ) const {
+ return shared_1d_int::shmem_size(data.dimension_1());
+ }
+};
+
+int main(int narg, char* args[]) {
+ Kokkos::initialize(narg,args);
+
+ // Produce some 3D random data (see Algorithms/01_random_numbers for more info)
+ Kokkos::View<int***,Kokkos::LayoutRight> data("Data",512,512,32);
+ Kokkos::Random_XorShift64_Pool<> rand_pool64(5374857);
+ Kokkos::fill_random(data,rand_pool64,100);
+
+ // A global value to put the result in
+ Kokkos::View<int> gsum("Sum");
+
+ // Each team handles a slice of the data
+ // Set up TeamPolicy with 512 teams with maximum number of threads per team and 16 vector lanes.
+ // The team_size_max function will determine the maximum number of threads taking into account
+ // shared memory requirements of the Functor.
+ // The maximum vector length is hardware dependent but can always be smaller than the hardware allows.
+ // The vector length must be a power of 2.
+ const Kokkos::TeamPolicy<> policy( 512 , Kokkos::TeamPolicy<>::team_size_max(SomeCorrelation(data,gsum)) , 16);
+
+ Kokkos::parallel_for( policy , SomeCorrelation(data,gsum) );
+
+ Kokkos::fence();
+
+ // Copy result value back
+ int sum = 0;
+ Kokkos::deep_copy(sum,gsum);
+ printf("Result %i\n",sum);
+
+ Kokkos::finalize();
+}
+
+#endif //KOKKOS_HAVE_CXX11
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/Makefile
new file mode 100644
index 000000000..3d056537c
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/Makefile
@@ -0,0 +1,43 @@
+KOKKOS_PATH = ../../../..
+SRC = $(wildcard *.cpp)
+
+default: build
+ echo "Start Build"
+
+ifneq (,$(findstring Cuda,$(KOKKOS_DEVICES)))
+CXX = nvcc_wrapper
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.cuda)
+KOKKOS_DEVICES = "Cuda,OpenMP"
+KOKKOS_ARCH = "SNB,Kepler35"
+else
+CXX = g++
+CXXFLAGS = -O3
+LINK = ${CXX}
+LINKFLAGS =
+EXE = $(SRC:.cpp=.host)
+KOKKOS_DEVICES = "OpenMP"
+KOKKOS_ARCH = "SNB"
+endif
+
+DEPFLAGS = -M
+
+OBJ = $(SRC:.cpp=.o)
+LIB =
+
+include $(KOKKOS_PATH)/Makefile.kokkos
+
+build: $(EXE)
+
+$(EXE): $(OBJ) $(KOKKOS_LINK_DEPENDS)
+ $(LINK) $(KOKKOS_LDFLAGS) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(KOKKOS_LIBS) $(LIB) -o $(EXE)
+
+clean: kokkos-clean
+ rm -f *.o *.cuda *.host
+
+# Compilation rules
+
+%.o:%.cpp $(KOKKOS_CPP_DEPENDS)
+ $(CXX) $(KOKKOS_CPPFLAGS) $(KOKKOS_CXXFLAGS) $(CXXFLAGS) $(EXTRA_INC) -c $<
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/team_scan.cpp b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/team_scan.cpp
new file mode 100644
index 000000000..a9b20da1a
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/04_team_scan/team_scan.cpp
@@ -0,0 +1,141 @@
+/*
+//@HEADER
+// ************************************************************************
+//
+// Kokkos v. 2.0
+// Copyright (2014) Sandia Corporation
+//
+// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+// the U.S. Government retains certain rights in this software.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// 3. Neither the name of the Corporation nor the names of the
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+//
+// Questions? Contact H. Carter Edwards (hcedwar@sandia.gov)
+//
+// ************************************************************************
+//@HEADER
+*/
+
+#include <Kokkos_Core.hpp>
+#include <Kokkos_DualView.hpp>
+#include <impl/Kokkos_Timer.hpp>
+#include <cstdio>
+#include <cstdlib>
+
+typedef Kokkos::DefaultExecutionSpace Device ;
+typedef Kokkos::HostSpace::execution_space Host ;
+
+typedef Kokkos::TeamPolicy< Device > team_policy ;
+typedef team_policy::member_type team_member ;
+
+static const int TEAM_SIZE = 16 ;
+
+struct find_2_tuples {
+ int chunk_size;
+ Kokkos::View<const int*> data;
+ Kokkos::View<int**> histogram;
+
+ find_2_tuples(int chunk_size_, Kokkos::DualView<int*> data_,
+ Kokkos::DualView<int**> histogram_):chunk_size(chunk_size_),
+ data(data_.d_view),histogram(histogram_.d_view) {
+ data_.sync<Device>();
+ histogram_.sync<Device>();
+ histogram_.modify<Device>();
+ }
+
+ KOKKOS_INLINE_FUNCTION
+ void operator() ( const team_member & dev) const {
+ Kokkos::View<int**,Kokkos::MemoryUnmanaged> l_histogram(dev.team_shmem(),TEAM_SIZE,TEAM_SIZE);
+ Kokkos::View<int*,Kokkos::MemoryUnmanaged> l_data(dev.team_shmem(),chunk_size+1);
+
+ const int i = dev.league_rank() * chunk_size;
+ for(int j = dev.team_rank(); j<chunk_size+1; j+=dev.team_size())
+ l_data(j) = data(i+j);
+
+ for(int k = dev.team_rank(); k < TEAM_SIZE; k+=dev.team_size())
+ for(int l = 0; l < TEAM_SIZE; l++)
+ l_histogram(k,l) = 0;
+ dev.team_barrier();
+
+ for(int j = 0; j<chunk_size; j++) {
+ for(int k = dev.team_rank(); k < TEAM_SIZE; k+=dev.team_size())
+ for(int l = 0; l < TEAM_SIZE; l++) {
+ if((l_data(j) == k) && (l_data(j+1)==l))
+ l_histogram(k,l)++;
+ }
+ }
+
+ for(int k = dev.team_rank(); k < TEAM_SIZE; k+=dev.team_size())
+ for(int l = 0; l < TEAM_SIZE; l++) {
+ Kokkos::atomic_fetch_add(&histogram(k,l),l_histogram(k,l));
+ }
+ dev.team_barrier();
+ }
+ size_t team_shmem_size( int team_size ) const { return sizeof(int)*(chunk_size+2 + team_size * team_size ); }
+};
+
+int main(int narg, char* args[]) {
+ Kokkos::initialize(narg,args);
+
+ int chunk_size = 1024;
+ int nchunks = 100000; //1024*1024;
+ Kokkos::DualView<int*> data("data",nchunks*chunk_size+1);
+
+ srand(1231093);
+
+ for(int i = 0; i < (int) data.dimension_0(); i++) {
+ data.h_view(i) = rand()%TEAM_SIZE;
+ }
+ data.modify<Host>();
+ data.sync<Device>();
+
+ Kokkos::DualView<int**> histogram("histogram",TEAM_SIZE,TEAM_SIZE);
+
+
+ Kokkos::Impl::Timer timer;
+ // threads/team is automatically limited to maximum supported by the device.
+ Kokkos::parallel_for( team_policy( nchunks , TEAM_SIZE )
+ , find_2_tuples(chunk_size,data,histogram) );
+ Kokkos::fence();
+ double time = timer.seconds();
+
+ histogram.sync<Host>();
+
+ printf("Time: %f \n\n",time);
+ int sum = 0;
+ for(int k=0; k<TEAM_SIZE; k++) {
+ for(int l=0; l<TEAM_SIZE; l++) {
+ printf("%i ",histogram.h_view(k,l));
+ sum += histogram.h_view(k,l);
+ }
+ printf("\n");
+ }
+ printf("Result: %i %i\n",sum,chunk_size*nchunks);
+ Kokkos::finalize();
+}
+
diff --git a/lib/kokkos/example/tutorial/Hierarchical_Parallelism/Makefile b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/Makefile
new file mode 100644
index 000000000..9d6fff798
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Hierarchical_Parallelism/Makefile
@@ -0,0 +1,72 @@
+default:
+ cd ./01_thread_teams; \
+ make -j 4
+ cd ./01_thread_teams_lambda; \
+ make -j 4
+ cd ./02_nested_parallel_for; \
+ make -j 4
+ cd ./03_vectorization; \
+ make -j 4
+ cd ./04_team_scan; \
+ make -j 4
+
+openmp:
+ cd ./01_thread_teams; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./01_thread_teams_lambda; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./02_nested_parallel_for; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./03_vectorization; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./04_team_scan; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+
+pthreads:
+ cd ./01_thread_teams; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./01_thread_teams_lambda; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./02_nested_parallel_for; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./03_vectorization; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./04_team_scan; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+
+serial:
+ cd ./01_thread_teams; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./01_thread_teams_lambda; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./02_nested_parallel_for; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./03_vectorization; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./04_team_scan; \
+ make -j 4 KOKKOS_DEVICES=Serial
+
+cuda:
+ cd ./01_thread_teams; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./01_thread_teams_lambda; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./02_nested_parallel_for; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./03_vectorization; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./04_team_scan; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+
+clean:
+ cd ./01_thread_teams; \
+ make clean
+ cd ./01_thread_teams_lambda; \
+ make clean
+ cd ./02_nested_parallel_for; \
+ make clean
+ cd ./03_vectorization; \
+ make clean
+ cd ./04_team_scan; \
+ make clean
+
diff --git a/lib/kokkos/example/tutorial/Makefile b/lib/kokkos/example/tutorial/Makefile
new file mode 100644
index 000000000..300d98ab4
--- /dev/null
+++ b/lib/kokkos/example/tutorial/Makefile
@@ -0,0 +1,144 @@
+default:
+ cd ./01_hello_world; \
+ make -j 4
+ cd ./01_hello_world_lambda; \
+ make -j 4
+ cd ./02_simple_reduce; \
+ make -j 4
+ cd ./02_simple_reduce_lambda; \
+ make -j 4
+ cd ./03_simple_view; \
+ make -j 4
+ cd ./03_simple_view_lambda; \
+ make -j 4
+ cd ./04_simple_memoryspaces; \
+ make -j 4
+ cd ./05_simple_atomics; \
+ make -j 4
+ cd ./Advanced_Views; \
+ make -j 4
+ cd ./Algorithms; \
+ make -j 4
+ cd ./Hierarchical_Parallelism; \
+ make -j 4
+
+openmp:
+ cd ./01_hello_world; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./01_hello_world_lambda; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./02_simple_reduce; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./02_simple_reduce_lambda; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./03_simple_view; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./03_simple_view_lambda; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./04_simple_memoryspaces; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./05_simple_atomics; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./Advanced_Views; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./Algorithms; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+ cd ./Hierarchical_Parallelism; \
+ make -j 4 KOKKOS_DEVICES=OpenMP
+
+pthreads:
+ cd ./01_hello_world; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./01_hello_world_lambda; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./02_simple_reduce; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./02_simple_reduce_lambda; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./03_simple_view; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./03_simple_view_lambda; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./04_simple_memoryspaces; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./05_simple_atomics; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./Advanced_Views; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./Algorithms; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+ cd ./Hierarchical_Parallelism; \
+ make -j 4 KOKKOS_DEVICES=Pthreads
+
+serial:
+ cd ./01_hello_world; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./01_hello_world_lambda; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./02_simple_reduce; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./02_simple_reduce_lambda; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./03_simple_view; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./03_simple_view_lambda; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./04_simple_memoryspaces; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./05_simple_atomics; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./Advanced_Views; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./Algorithms; \
+ make -j 4 KOKKOS_DEVICES=Serial
+ cd ./Hierarchical_Parallelism; \
+ make -j 4 KOKKOS_DEVICES=Serial
+
+cuda:
+ cd ./01_hello_world; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./01_hello_world_lambda; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./02_simple_reduce; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./02_simple_reduce_lambda; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./03_simple_view; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./03_simple_view_lambda; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./04_simple_memoryspaces; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./05_simple_atomics; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./Advanced_Views; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./Algorithms; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+ cd ./Hierarchical_Parallelism; \
+ make -j 4 KOKKOS_DEVICES=Cuda,Serial
+
+clean:
+ cd ./01_hello_world; \
+ make clean
+ cd ./01_hello_world_lambda; \
+ make clean
+ cd ./02_simple_reduce; \
+ make clean
+ cd ./02_simple_reduce_lambda; \
+ make clean
+ cd ./03_simple_view; \
+ make clean
+ cd ./03_simple_view_lambda; \
+ make clean
+ cd ./04_simple_memoryspaces; \
+ make clean
+ cd ./05_simple_atomics; \
+ make clean
+ cd ./Advanced_Views; \
+ make clean
+ cd ./Algorithms; \
+ make clean
+ cd ./Hierarchical_Parallelism; \
+ make clean
+
diff --git a/lib/kokkos/example/tutorial/README b/lib/kokkos/example/tutorial/README
new file mode 100644
index 000000000..4ba0b3a5d
--- /dev/null
+++ b/lib/kokkos/example/tutorial/README
@@ -0,0 +1,17 @@
+Build the examples by typing in each directory:
+make -j 16
+
+To specify a target device:
+make openmp -j 16
+make pthreads -j 16
+make serial -j 16
+make cuda -j 16
+
+The lambda variants can not be build with CUDA=yes at the moment, since
+CUDA does not support lambdas from the host.
+Some of the advanced topics try to highlight performance impacts by timing
+different variants of doing the same thing.
+Also some of the advanced topics (in particular hierarchical parallelism)
+require C++11 even with out using host side lambdas. CUDA 6.5 can be used
+to compile those.
+
diff --git a/lib/kokkos/generate_makefile.bash b/lib/kokkos/generate_makefile.bash
index 2e595dcc1..e9e103e74 100755
--- a/lib/kokkos/generate_makefile.bash
+++ b/lib/kokkos/generate_makefile.bash
@@ -1,204 +1,212 @@
#!/bin/bash
KOKKOS_DEVICES=""
while [[ $# > 0 ]]
do
key="$1"
case $key in
--kokkos-path*)
KOKKOS_PATH="${key#*=}"
;;
--prefix*)
PREFIX="${key#*=}"
;;
--with-cuda)
KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda"
CUDA_PATH_NVCC=`which nvcc`
CUDA_PATH=${CUDA_PATH_NVCC%/bin/nvcc}
;;
--with-cuda*)
KOKKOS_DEVICES="${KOKKOS_DEVICES},Cuda"
CUDA_PATH="${key#*=}"
;;
--with-openmp)
KOKKOS_DEVICES="${KOKKOS_DEVICES},OpenMP"
;;
--with-pthread)
KOKKOS_DEVICES="${KOKKOS_DEVICES},Pthread"
;;
--with-serial)
KOKKOS_DEVICES="${KOKKOS_DEVICES},Serial"
;;
+ --with-qthread*)
+ KOKKOS_DEVICES="${KOKKOS_DEVICES},Qthread"
+ QTHREAD_PATH="${key#*=}"
+ ;;
--with-devices*)
DEVICES="${key#*=}"
KOKKOS_DEVICES="${KOKKOS_DEVICES},${DEVICES}"
;;
--with-gtest*)
GTEST_PATH="${key#*=}"
;;
--with-hwloc*)
HWLOC_PATH="${key#*=}"
;;
--arch*)
KOKKOS_ARCH="${key#*=}"
;;
--cxxflags*)
CXXFLAGS="${key#*=}"
;;
--ldflags*)
LDFLAGS="${key#*=}"
;;
--debug|-dbg)
KOKKOS_DEBUG=yes
;;
--compiler*)
COMPILER="${key#*=}"
;;
--help)
echo "Kokkos configure options:"
echo "--kokkos-path=/Path/To/Kokkos: Path to the Kokkos root directory"
echo ""
- echo "--with-cuda[=/Path/To/Cuda]: enable Cuda and set path to Cuda Toolkit"
- echo "--with-openmp: enable OpenMP backend"
- echo "--with-pthread: enable Pthreads backend"
- echo "--with-serial: enable Serial backend"
- echo "--with-devices: explicitly add a set of backends"
+ echo "--with-cuda[=/Path/To/Cuda]: enable Cuda and set path to Cuda Toolkit"
+ echo "--with-openmp: enable OpenMP backend"
+ echo "--with-pthread: enable Pthreads backend"
+ echo "--with-serial: enable Serial backend"
+ echo "--with-qthread=/Path/To/Qthread: enable Qthread backend"
+ echo "--with-devices: explicitly add a set of backends"
echo ""
echo "--arch=[OPTIONS]: set target architectures. Options are:"
echo " SNB = Intel Sandy/Ivy Bridge CPUs"
echo " HSW = Intel Haswell CPUs"
echo " KNC = Intel Knights Corner Xeon Phi"
echo " Kepler30 = NVIDIA Kepler generation CC 3.0"
echo " Kepler35 = NVIDIA Kepler generation CC 3.5"
echo " Kepler37 = NVIDIA Kepler generation CC 3.7"
echo " Maxwell50 = NVIDIA Maxwell generation CC 5.0"
echo " Power8 = IBM Power 8 CPUs"
echo ""
echo "--compiler=/Path/To/Compiler set the compiler"
echo "--debug,-dbg: enable Debugging"
echo "--cxxflags=[FLAGS] overwrite CXXFLAGS for library build and test build"
echo " This will still set certain required flags via"
echo " KOKKOS_CXXFLAGS (such as -fopenmp, --std=c++11, etc.)"
echo "--ldflags=[FLAGS] overwrite LDFLAGS for library build and test build"
echo " This will still set certain required flags via"
echo " KOKKOS_LDFLAGS (such as -fopenmp, -lpthread, etc.)"
echo "--with-gtest=/Path/To/Gtest: set path to gtest (used in unit and performance tests"
echo "--with-hwloc=/Path/To/Hwloc: set path to hwloc"
exit 0
;;
*)
# unknown option
;;
esac
shift
done
# If KOKKOS_PATH undefined, assume parent dir of this
# script is the KOKKOS_PATH
if [ -z "$KOKKOS_PATH" ]; then
KOKKOS_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
else
# Ensure KOKKOS_PATH is abs path
KOKKOS_PATH=$( cd $KOKKOS_PATH && pwd )
fi
KOKKOS_OPTIONS="KOKKOS_PATH=${KOKKOS_PATH}"
if [ ${#COMPILER} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} CXX=${COMPILER}"
fi
if [ ${#PREFIX} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} PREFIX=${PREFIX}"
fi
if [ ${#KOKKOS_DEVICES} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} KOKKOS_DEVICES=${KOKKOS_DEVICES}"
fi
if [ ${#KOKKOS_ARCH} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} KOKKOS_ARCH=${KOKKOS_ARCH}"
fi
if [ ${#KOKKOS_DEBUG} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} KOKKOS_DEBUG=${KOKKOS_DEBUG}"
fi
if [ ${#CUDA_PATH} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} CUDA_PATH=${CUDA_PATH}"
fi
if [ ${#CXXFLAGS} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} CXXFLAGS=\"${CXXFLAGS}\""
fi
if [ ${#LDFLAGS} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} LDFLAGS=\"${LDFLAGS}\""
fi
if [ ${#GTEST_PATH} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} GTEST_PATH=${GTEST_PATH}"
else
GTEST_PATH=${KOKKOS_PATH}/tpls/gtest
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} GTEST_PATH=${GTEST_PATH}"
fi
if [ ${#HWLOC_PATH} -gt 0 ]; then
KOKKOS_OPTIONS="${KOKKOS_OPTIONS} HWLOC_PATH=${HWLOC_PATH} KOKKOS_USE_TPLS=hwloc"
fi
+if [ ${#QTHREAD_PATH} -gt 0 ]; then
+KOKKOS_OPTIONS="${KOKKOS_OPTIONS} QTHREAD_PATH=${QTHREAD_PATH}"
+fi
mkdir core
mkdir core/unit_test
mkdir core/perf_test
mkdir containers
mkdir containers/unit_tests
mkdir containers/performance_tests
mkdir algorithms
mkdir algorithms/unit_tests
mkdir algorithms/performance_tests
mkdir example
mkdir example/fixture
mkdir example/feint
mkdir example/fenl
echo "Generating Makefile with options " ${KOKKOS_OPTIONS}
echo "KOKKOS_OPTIONS=${KOKKOS_OPTIONS}" > Makefile
echo "" >> Makefile
echo "lib:" >> Makefile
echo -e "\tcd core; \\" >> Makefile
echo -e "\tmake -j -j -f ${KOKKOS_PATH}/core/src/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo "" >> Makefile
echo "install: lib" >> Makefile
echo -e "\tcd core; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/core/src/Makefile ${KOKKOS_OPTIONS} install" >> Makefile
echo "" >> Makefile
echo "build-test:" >> Makefile
echo -e "\tcd core/unit_test; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/core/unit_test/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd core/perf_test; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/core/perf_test/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd containers/unit_tests; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/containers/unit_tests/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd containers/performance_tests; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/containers/performance_tests/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd algorithms/unit_tests; \\" >> Makefile
echo -e "\tmake -j -f ${KOKKOS_PATH}/algorithms/unit_tests/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd example/fixture; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/fixture/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd example/feint; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/feint/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo -e "\tcd example/fenl; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/fenl/Makefile ${KOKKOS_OPTIONS}" >> Makefile
echo "" >> Makefile
echo "test: build-test" >> Makefile
echo -e "\tcd core/unit_test; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/core/unit_test/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd core/perf_test; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/core/perf_test/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd containers/unit_tests; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/containers/unit_tests/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd containers/performance_tests; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/containers/performance_tests/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd algorithms/unit_tests; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/algorithms/unit_tests/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd example/fixture; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/fixture/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd example/feint; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/feint/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
echo -e "\tcd example/fenl; \\" >> Makefile
echo -e "\tmake -f ${KOKKOS_PATH}/example/fenl/Makefile ${KOKKOS_OPTIONS} test" >> Makefile
diff --git a/src/COMPRESS/dump_atom_gz.cpp b/src/COMPRESS/dump_atom_gz.cpp
index e85deb186..dfd23e2b4 100644
--- a/src/COMPRESS/dump_atom_gz.cpp
+++ b/src/COMPRESS/dump_atom_gz.cpp
@@ -1,144 +1,144 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "dump_atom_gz.h"
#include "domain.h"
#include "error.h"
#include "update.h"
#include <string.h>
using namespace LAMMPS_NS;
DumpAtomGZ::DumpAtomGZ(LAMMPS *lmp, int narg, char **arg) :
DumpAtom(lmp, narg, arg)
{
gzFp = NULL;
if (!compressed)
error->all(FLERR,"Dump atom/gz only writes compressed files");
}
-
/* ---------------------------------------------------------------------- */
DumpAtomGZ::~DumpAtomGZ()
{
if (gzFp) gzclose(gzFp);
gzFp = NULL;
fp = NULL;
}
-
/* ----------------------------------------------------------------------
generic opening of a dump file
ASCII or binary or gzipped
some derived classes override this function
------------------------------------------------------------------------- */
void DumpAtomGZ::openfile()
{
// single file, already opened, so just return
if (singlefile_opened) return;
if (multifile == 0) singlefile_opened = 1;
// if one file per timestep, replace '*' with current timestep
char *filecurrent = filename;
if (multiproc) filecurrent = multiname;
if (multifile) {
char *filestar = filecurrent;
filecurrent = new char[strlen(filestar) + 16];
char *ptr = strchr(filestar,'*');
*ptr = '\0';
if (padflag == 0)
sprintf(filecurrent,"%s" BIGINT_FORMAT "%s",
filestar,update->ntimestep,ptr+1);
else {
char bif[8],pad[16];
strcpy(bif,BIGINT_FORMAT);
sprintf(pad,"%%s%%0%d%s%%s",padflag,&bif[1]);
sprintf(filecurrent,pad,filestar,update->ntimestep,ptr+1);
}
*ptr = '*';
}
// each proc with filewriter = 1 opens a file
if (filewriter) {
if (append_flag) {
gzFp = gzopen(filecurrent,"ab9");
} else {
gzFp = gzopen(filecurrent,"wb9");
}
if (gzFp == NULL) error->one(FLERR,"Cannot open dump file");
} else gzFp = NULL;
// delete string with timestep replaced
if (multifile) delete [] filecurrent;
}
+/* ---------------------------------------------------------------------- */
+
void DumpAtomGZ::write_header(bigint ndump)
{
if ((multiproc) || (!multiproc && me == 0)) {
if (domain->triclinic == 0) {
gzprintf(gzFp,"ITEM: TIMESTEP\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",update->ntimestep);
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",ndump);
gzprintf(gzFp,"ITEM: BOX BOUNDS %s\n",boundstr);
gzprintf(gzFp,"%g %g\n",boxxlo,boxxhi);
gzprintf(gzFp,"%g %g\n",boxylo,boxyhi);
gzprintf(gzFp,"%g %g\n",boxzlo,boxzhi);
gzprintf(gzFp,"ITEM: ATOMS %s\n",columns);
} else {
gzprintf(gzFp,"ITEM: TIMESTEP\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",update->ntimestep);
gzprintf(gzFp,"ITEM: NUMBER OF ATOMS\n");
gzprintf(gzFp,BIGINT_FORMAT "\n",ndump);
gzprintf(gzFp,"ITEM: BOX BOUNDS xy xz yz %s\n",boundstr);
gzprintf(gzFp,"%g %g %g\n",boxxlo,boxxhi,boxxy);
gzprintf(gzFp,"%g %g %g\n",boxylo,boxyhi,boxxz);
gzprintf(gzFp,"%g %g %g\n",boxzlo,boxzhi,boxyz);
gzprintf(gzFp,"ITEM: ATOMS %s\n",columns);
}
}
}
/* ---------------------------------------------------------------------- */
void DumpAtomGZ::write_data(int n, double *mybuf)
{
gzwrite(gzFp,mybuf,sizeof(char)*n);
}
/* ---------------------------------------------------------------------- */
void DumpAtomGZ::write()
{
DumpAtom::write();
if (filewriter) {
if (multifile) {
gzclose(gzFp);
gzFp = NULL;
} else {
if (flush_flag)
gzflush(gzFp,Z_SYNC_FLUSH);
}
}
}
diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp
index bcea86b1c..14cd2ab8c 100755
--- a/src/KOKKOS/pair_eam_kokkos.cpp
+++ b/src/KOKKOS/pair_eam_kokkos.cpp
@@ -1,880 +1,955 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Stan Moore (SNL), Christian Trott (SNL)
------------------------------------------------------------------------- */
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "kokkos.h"
#include "pair_kokkos.h"
#include "pair_eam_kokkos.h"
#include "atom_kokkos.h"
#include "force.h"
#include "comm.h"
#include "neighbor.h"
#include "neigh_list_kokkos.h"
#include "neigh_request.h"
#include "memory.h"
#include "error.h"
#include "atom_masks.h"
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
template<class DeviceType>
PairEAMKokkos<DeviceType>::PairEAMKokkos(LAMMPS *lmp) : PairEAM(lmp)
{
respa_enable = 0;
atomKK = (AtomKokkos *) atom;
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
PairEAMKokkos<DeviceType>::~PairEAMKokkos()
{
if (!copymode) {
memory->destroy_kokkos(k_eatom,eatom);
memory->destroy_kokkos(k_vatom,vatom);
}
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
{
eflag = eflag_in;
vflag = vflag_in;
if (neighflag == FULL) no_virial_fdotr_compute = 1;
if (eflag || vflag) ev_setup(eflag,vflag);
else evflag = vflag_fdotr = 0;
// reallocate per-atom arrays if necessary
if (eflag_atom) {
memory->destroy_kokkos(k_eatom,eatom);
memory->create_kokkos(k_eatom,eatom,maxeatom,"pair:eatom");
d_eatom = k_eatom.d_view;
}
if (vflag_atom) {
memory->destroy_kokkos(k_vatom,vatom);
memory->create_kokkos(k_vatom,vatom,maxvatom,6,"pair:vatom");
d_vatom = k_vatom.d_view;
}
atomKK->sync(execution_space,datamask_read);
if (eflag || vflag) atomKK->modified(execution_space,datamask_modify);
else atomKK->modified(execution_space,F_MASK);
// grow energy and fp arrays if necessary
// need to be atom->nmax in length
if (atom->nmax > nmax) {
nmax = atom->nmax;
k_rho = DAT::tdual_ffloat_1d("pair:rho",nmax);
k_fp = DAT::tdual_ffloat_1d("pair:fp",nmax);
d_rho = k_rho.d_view;
d_fp = k_fp.d_view;
h_rho = k_rho.h_view;
h_fp = k_fp.h_view;
}
x = atomKK->k_x.view<DeviceType>();
f = atomKK->k_f.view<DeviceType>();
v_rho = k_rho.view<DeviceType>();
type = atomKK->k_type.view<DeviceType>();
tag = atomKK->k_tag.view<DeviceType>();
nlocal = atom->nlocal;
nall = atom->nlocal + atom->nghost;
newton_pair = force->newton_pair;
NeighListKokkos<DeviceType>* k_list = static_cast<NeighListKokkos<DeviceType>*>(list);
d_numneigh = k_list->d_numneigh;
d_neighbors = k_list->d_neighbors;
d_ilist = k_list->d_ilist;
int inum = list->inum;
// Call cleanup_copy which sets allocations NULL which are destructed by the PairStyle
k_list->clean_copy();
copymode = 1;
// zero out density
if (newton_pair)
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMInitialize>(0,nall),*this);
else
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMInitialize>(0,nlocal),*this);
DeviceType::fence();
// loop over neighbors of my atoms
EV_FLOAT ev;
// compute kernel A
if (neighflag == HALF || neighflag == HALFTHREAD) {
if (neighflag == HALF) {
if (newton_pair) {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelA<HALF,1> >(0,inum),*this);
} else {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelA<HALF,0> >(0,inum),*this);
}
} else if (neighflag == HALFTHREAD) {
if (newton_pair) {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelA<HALFTHREAD,1> >(0,inum),*this);
} else {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelA<HALFTHREAD,0> >(0,inum),*this);
}
}
DeviceType::fence();
// communicate and sum densities (on the host)
if (newton_pair) {
k_rho.template modify<DeviceType>();
k_rho.template sync<LMPHostType>();
comm->reverse_comm_pair(this);
k_rho.template modify<LMPHostType>();
k_rho.template sync<DeviceType>();
}
// compute kernel B
if (eflag)
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelB<1> >(0,inum),*this,ev);
else
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelB<0> >(0,inum),*this);
DeviceType::fence();
} else if (neighflag == FULL) {
// compute kernel AB
if (eflag)
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelAB<1> >(0,inum),*this,ev);
else
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelAB<0> >(0,inum),*this);
DeviceType::fence();
}
if (eflag) {
eng_vdwl += ev.evdwl;
ev.evdwl = 0.0;
}
// communicate derivative of embedding function (on the device)
comm->forward_comm_pair(this);
// compute kernel C
if (evflag) {
if (neighflag == HALF) {
if (newton_pair) {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALF,1,1> >(0,inum),*this,ev);
} else {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALF,0,1> >(0,inum),*this,ev);
}
} else if (neighflag == HALFTHREAD) {
if (newton_pair) {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALFTHREAD,1,1> >(0,inum),*this,ev);
} else {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALFTHREAD,0,1> >(0,inum),*this,ev);
}
} else if (neighflag == FULL) {
if (newton_pair) {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<FULL,1,1> >(0,inum),*this,ev);
} else {
Kokkos::parallel_reduce(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<FULL,0,1> >(0,inum),*this,ev);
}
}
} else {
if (neighflag == HALF) {
if (newton_pair) {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALF,1,0> >(0,inum),*this);
} else {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALF,0,0> >(0,inum),*this);
}
} else if (neighflag == HALFTHREAD) {
if (newton_pair) {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALFTHREAD,1,0> >(0,inum),*this);
} else {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<HALFTHREAD,0,0> >(0,inum),*this);
}
} else if (neighflag == FULL) {
if (newton_pair) {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<FULL,1,0> >(0,inum),*this);
} else {
Kokkos::parallel_for(Kokkos::RangePolicy<DeviceType, TagPairEAMKernelC<FULL,0,0> >(0,inum),*this);
}
}
}
DeviceType::fence();
if (eflag_global) eng_vdwl += ev.evdwl;
if (vflag_global) {
virial[0] += ev.v[0];
virial[1] += ev.v[1];
virial[2] += ev.v[2];
virial[3] += ev.v[3];
virial[4] += ev.v[4];
virial[5] += ev.v[5];
}
if (vflag_fdotr) pair_virial_fdotr_compute(this);
if (eflag_atom) {
k_eatom.template modify<DeviceType>();
k_eatom.template sync<LMPHostType>();
}
if (vflag_atom) {
k_vatom.template modify<DeviceType>();
k_vatom.template sync<LMPHostType>();
}
copymode = 0;
}
/* ----------------------------------------------------------------------
init specific to this pair style
------------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::init_style()
{
// convert read-in file(s) to arrays and spline them
PairEAM::init_style();
// irequest = neigh request made by parent class
neighflag = lmp->kokkos->neighflag;
int irequest = neighbor->nrequest - 1;
neighbor->requests[irequest]->
kokkos_host = Kokkos::Impl::is_same<DeviceType,LMPHostType>::value &&
!Kokkos::Impl::is_same<DeviceType,LMPDeviceType>::value;
neighbor->requests[irequest]->
kokkos_device = Kokkos::Impl::is_same<DeviceType,LMPDeviceType>::value;
if (neighflag == FULL) {
neighbor->requests[irequest]->full = 1;
neighbor->requests[irequest]->half = 0;
neighbor->requests[irequest]->full_cluster = 0;
} else if (neighflag == HALF || neighflag == HALFTHREAD) {
neighbor->requests[irequest]->full = 0;
neighbor->requests[irequest]->half = 1;
neighbor->requests[irequest]->full_cluster = 0;
} else {
error->all(FLERR,"Cannot use chosen neighbor list style with pair eam/kk");
}
}
/* ----------------------------------------------------------------------
convert read-in funcfl potential(s) to standard array format
interpolate all file values to a single grid and cutoff
------------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::file2array()
{
PairEAM::file2array();
int i,j;
int n = atom->ntypes;
DAT::tdual_int_1d k_type2frho = DAT::tdual_int_1d("pair:type2frho",n+1);
DAT::tdual_int_2d k_type2rhor = DAT::tdual_int_2d("pair:type2rhor",n+1,n+1);
DAT::tdual_int_2d k_type2z2r = DAT::tdual_int_2d("pair:type2z2r",n+1,n+1);
HAT::t_int_1d h_type2frho = k_type2frho.h_view;
HAT::t_int_2d h_type2rhor = k_type2rhor.h_view;
HAT::t_int_2d h_type2z2r = k_type2z2r.h_view;
for (i = 1; i <= n; i++) {
h_type2frho[i] = type2frho[i];
for (j = 1; j <= n; j++) {
h_type2rhor(i,j) = type2rhor[i][j];
h_type2z2r(i,j)= type2z2r[i][j];
}
}
k_type2frho.template modify<LMPHostType>();
k_type2frho.template sync<DeviceType>();
k_type2rhor.template modify<LMPHostType>();
k_type2rhor.template sync<DeviceType>();
k_type2z2r.template modify<LMPHostType>();
k_type2z2r.template sync<DeviceType>();
d_type2frho = k_type2frho.d_view;
d_type2rhor = k_type2rhor.d_view;
d_type2z2r = k_type2z2r.d_view;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::array2spline()
{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
rdr = 1.0/dr;
rdrho = 1.0/drho;
- tdual_ffloat_2d_n7 k_frho_spline = tdual_ffloat_2d_n7("pair:frho",nfrho,nrho+1);
- tdual_ffloat_2d_n7 k_rhor_spline = tdual_ffloat_2d_n7("pair:rhor",nrhor,nr+1);
- tdual_ffloat_2d_n7 k_z2r_spline = tdual_ffloat_2d_n7("pair:z2r",nz2r,nr+1);
+ tdual_ffloat4 k_frho_spline_a = tdual_ffloat4("pair:frho_a",nfrho,nrho+1);
+ tdual_ffloat4 k_rhor_spline_a = tdual_ffloat4("pair:rhor_a",nrhor,nr+1);
+ tdual_ffloat4 k_z2r_spline_a = tdual_ffloat4("pair:z2r_a",nz2r,nr+1);
+ tdual_ffloat4 k_frho_spline_b = tdual_ffloat4("pair:frho_b",nfrho,nrho+1);
+ tdual_ffloat4 k_rhor_spline_b = tdual_ffloat4("pair:rhor_b",nrhor,nr+1);
+ tdual_ffloat4 k_z2r_spline_b = tdual_ffloat4("pair:z2r_b",nz2r,nr+1);
- t_host_ffloat_2d_n7 h_frho_spline = k_frho_spline.h_view;
- t_host_ffloat_2d_n7 h_rhor_spline = k_rhor_spline.h_view;
- t_host_ffloat_2d_n7 h_z2r_spline = k_z2r_spline.h_view;
+ t_host_ffloat4 h_frho_spline_a = k_frho_spline_a.h_view;
+ t_host_ffloat4 h_rhor_spline_a = k_rhor_spline_a.h_view;
+ t_host_ffloat4 h_z2r_spline_a = k_z2r_spline_a.h_view;
+ t_host_ffloat4 h_frho_spline_b = k_frho_spline_b.h_view;
+ t_host_ffloat4 h_rhor_spline_b = k_rhor_spline_b.h_view;
+ t_host_ffloat4 h_z2r_spline_b = k_z2r_spline_b.h_view;
for (int i = 0; i < nfrho; i++)
- interpolate(nrho,drho,frho[i],h_frho_spline,i);
- k_frho_spline.template modify<LMPHostType>();
- k_frho_spline.template sync<DeviceType>();
+ interpolate(nrho,drho,frho[i],h_frho_spline_a,h_frho_spline_b,i);
+ k_frho_spline_a.template modify<LMPHostType>();
+ k_frho_spline_a.template sync<DeviceType>();
+ k_frho_spline_b.template modify<LMPHostType>();
+ k_frho_spline_b.template sync<DeviceType>();
for (int i = 0; i < nrhor; i++)
- interpolate(nr,dr,rhor[i],h_rhor_spline,i);
- k_rhor_spline.template modify<LMPHostType>();
- k_rhor_spline.template sync<DeviceType>();
+ interpolate(nr,dr,rhor[i],h_rhor_spline_a,h_rhor_spline_b,i);
+ k_rhor_spline_a.template modify<LMPHostType>();
+ k_rhor_spline_a.template sync<DeviceType>();
+ k_rhor_spline_b.template modify<LMPHostType>();
+ k_rhor_spline_b.template sync<DeviceType>();
for (int i = 0; i < nz2r; i++)
- interpolate(nr,dr,z2r[i],h_z2r_spline,i);
- k_z2r_spline.template modify<LMPHostType>();
- k_z2r_spline.template sync<DeviceType>();
+ interpolate(nr,dr,z2r[i],h_z2r_spline_a,h_z2r_spline_b,i);
+ k_z2r_spline_a.template modify<LMPHostType>();
+ k_z2r_spline_a.template sync<DeviceType>();
+ k_z2r_spline_b.template modify<LMPHostType>();
+ k_z2r_spline_b.template sync<DeviceType>();
+
+ d_frho_spline_a = k_frho_spline_a.d_view;
+ d_rhor_spline_a = k_rhor_spline_a.d_view;
+ d_z2r_spline_a = k_z2r_spline_a.d_view;
+ d_frho_spline_b = k_frho_spline_b.d_view;
+ d_rhor_spline_b = k_rhor_spline_b.d_view;
+ d_z2r_spline_b = k_z2r_spline_b.d_view;
+
- d_frho_spline = k_frho_spline.d_view;
- d_rhor_spline = k_rhor_spline.d_view;
- d_z2r_spline = k_z2r_spline.d_view;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
-void PairEAMKokkos<DeviceType>::interpolate(int n, double delta, double *f, t_host_ffloat_2d_n7 h_spline, int i)
+void PairEAMKokkos<DeviceType>::interpolate(int n, double delta, double *f, t_host_ffloat4 h_spline_a, t_host_ffloat4 h_spline_b, int i)
{
- for (int m = 1; m <= n; m++) h_spline(i,m,6) = f[m];
+ for (int m = 1; m <= n; m++) h_spline_b(i,m).w = f[m];
- h_spline(i,1,5) = h_spline(i,2,6) - h_spline(i,1,6);
- h_spline(i,2,5) = 0.5 * (h_spline(i,3,6)-h_spline(i,1,6));
- h_spline(i,n-1,5) = 0.5 * (h_spline(i,n,6)-h_spline(i,n-2,6));
- h_spline(i,n,5) = h_spline(i,n,6) - h_spline(i,n-1,6);
+ h_spline_b(i,1).z = h_spline_b(i,2).w - h_spline_b(i,1).w;
+ h_spline_b(i,2).z = 0.5 * (h_spline_b(i,3).w-h_spline_b(i,1).w);
+ h_spline_b(i,n-1).z = 0.5 * (h_spline_b(i,n).w-h_spline_b(i,n-2).w);
+ h_spline_b(i,n).z = h_spline_b(i,n).w - h_spline_b(i,n-1).w;
for (int m = 3; m <= n-2; m++)
- h_spline(i,m,5) = ((h_spline(i,m-2,6)-h_spline(i,m+2,6)) +
- 8.0*(h_spline(i,m+1,6)-h_spline(i,m-1,6))) / 12.0;
+ h_spline_b(i,m).z = ((h_spline_b(i,m-2).w-h_spline_b(i,m+2).w) +
+ 8.0*(h_spline_b(i,m+1).w-h_spline_b(i,m-1).w)) / 12.0;
for (int m = 1; m <= n-1; m++) {
- h_spline(i,m,4) = 3.0*(h_spline(i,m+1,6)-h_spline(i,m,6)) -
- 2.0*h_spline(i,m,5) - h_spline(i,m+1,5);
- h_spline(i,m,3) = h_spline(i,m,5) + h_spline(i,m+1,5) -
- 2.0*(h_spline(i,m+1,6)-h_spline(i,m,6));
+ h_spline_b(i,m).y = 3.0*(h_spline_b(i,m+1).w-h_spline_b(i,m).w) -
+ 2.0*h_spline_b(i,m).z - h_spline_b(i,m+1).z;
+ h_spline_b(i,m).x = h_spline_b(i,m).z + h_spline_b(i,m+1).z -
+ 2.0*(h_spline_b(i,m+1).w-h_spline_b(i,m).w);
}
- h_spline(i,n,4) = 0.0;
- h_spline(i,n,3) = 0.0;
+ h_spline_b(i,n).y = 0.0;
+ h_spline_b(i,n).x = 0.0;
for (int m = 1; m <= n; m++) {
- h_spline(i,m,2) = h_spline(i,m,5)/delta;
- h_spline(i,m,1) = 2.0*h_spline(i,m,4)/delta;
- h_spline(i,m,0) = 3.0*h_spline(i,m,3)/delta;
+ h_spline_a(i,m).z = h_spline_b(i,m).z/delta;
+ h_spline_a(i,m).y = 2.0*h_spline_b(i,m).y/delta;
+ h_spline_a(i,m).x = 3.0*h_spline_b(i,m).x/delta;
}
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
int PairEAMKokkos<DeviceType>::pack_forward_comm_kokkos(int n, DAT::tdual_int_2d k_sendlist, int iswap_in, DAT::tdual_xfloat_1d &buf,
int pbc_flag, int *pbc)
{
d_sendlist = k_sendlist.view<DeviceType>();
iswap = iswap_in;
v_buf = buf.view<DeviceType>();
Kokkos::parallel_for(Kokkos::RangePolicy<LMPDeviceType, TagPairEAMPackForwardComm>(0,n),*this);
DeviceType::fence();
return n;
}
template<class DeviceType>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMPackForwardComm, const int &i) const {
int j = d_sendlist(iswap, i);
v_buf[i] = d_fp[j];
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::unpack_forward_comm_kokkos(int n, int first_in, DAT::tdual_xfloat_1d &buf)
{
first = first_in;
v_buf = buf.view<DeviceType>();
Kokkos::parallel_for(Kokkos::RangePolicy<LMPDeviceType, TagPairEAMUnpackForwardComm>(0,n),*this);
DeviceType::fence();
}
template<class DeviceType>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMUnpackForwardComm, const int &i) const {
d_fp[i + first] = v_buf[i];
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
int PairEAMKokkos<DeviceType>::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
{
int i,j;
for (i = 0; i < n; i++) {
j = list[i];
buf[i] = h_fp[j];
}
return n;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::unpack_forward_comm(int n, int first, double *buf)
{
for (int i = 0; i < n; i++) {
h_fp[i + first] = buf[i];
}
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
int PairEAMKokkos<DeviceType>::pack_reverse_comm(int n, int first, double *buf)
{
int i,m,last;
m = 0;
last = first + n;
for (i = first; i < last; i++) buf[m++] = h_rho[i];
return m;
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
void PairEAMKokkos<DeviceType>::unpack_reverse_comm(int n, int *list, double *buf)
{
int i,j,m;
m = 0;
for (i = 0; i < n; i++) {
j = list[i];
h_rho[j] += buf[m++];
}
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMInitialize, const int &i) const {
d_rho[i] = 0.0;
}
/* ---------------------------------------------------------------------- */
////Specialisation for Neighborlist types Half, HalfThread, Full
template<class DeviceType>
template<int NEIGHFLAG, int NEWTON_PAIR>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelA<NEIGHFLAG,NEWTON_PAIR>, const int &ii) const {
// rho = density at each atom
// loop over neighbors of my atoms
// The rho array is atomic for Half/Thread neighbor style
Kokkos::View<F_FLOAT*, typename DAT::t_f_array::array_layout,DeviceType,Kokkos::MemoryTraits<AtomicF<NEIGHFLAG>::value> > rho = v_rho;
const int i = d_ilist[ii];
const X_FLOAT xtmp = x(i,0);
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
//const AtomNeighborsConst d_neighbors_i = k_list.get_neighbors_const(i);
const int jnum = d_numneigh[i];
F_FLOAT rhotmp = 0.0;
for (int jj = 0; jj < jnum; jj++) {
//int j = d_neighbors_i[jj];
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const X_FLOAT delx = xtmp - x(j,0);
const X_FLOAT dely = ytmp - x(j,1);
const X_FLOAT delz = ztmp - x(j,2);
const int jtype = type(j);
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
if (rsq < cutforcesq) {
F_FLOAT p = sqrt(rsq)*rdr + 1.0;
int m = static_cast<int> (p);
m = MIN(m,nr-1);
p -= m;
p = MIN(p,1.0);
const int d_type2rhor_ji = d_type2rhor(jtype,itype);
- rhotmp += ((d_rhor_spline(d_type2rhor_ji,m,3)*p + d_rhor_spline(d_type2rhor_ji,m,4))*p +
- d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
+ const F_FLOAT4 rhor = d_rhor_spline_b(d_type2rhor_ji,m);
+ rhotmp += ((rhor.x*p + rhor.y)*p + rhor.z)*p + rhor.w;
+
if (NEWTON_PAIR || j < nlocal) {
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
- rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
- d_rhor_spline(d_type2rhor_ij,m,5))*p + d_rhor_spline(d_type2rhor_ij,m,6);
+ const F_FLOAT4 rhor = d_rhor_spline_b(d_type2rhor_ij,m);
+ rho[j] += ((rhor.x*p + rhor.y)*p + rhor.z)*p + rhor.w;
}
}
}
rho[i] += rhotmp;
}
/* ---------------------------------------------------------------------- */
////Specialisation for Neighborlist types Half, HalfThread, Full
template<class DeviceType>
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelB<EFLAG>, const int &ii, EV_FLOAT& ev) const {
// fp = derivative of embedding energy at each atom
// phi = embedding energy at each atom
// if rho > rhomax (e.g. due to close approach of two atoms),
// will exceed table, so add linear term to conserve energy
const int i = d_ilist[ii];
const int itype = type(i);
F_FLOAT p = d_rho[i]*rdrho + 1.0;
int m = static_cast<int> (p);
m = MAX(1,MIN(m,nrho-1));
p -= m;
p = MIN(p,1.0);
const int d_type2frho_i = d_type2frho[itype];
- d_fp[i] = (d_frho_spline(d_type2frho_i,m,0)*p + d_frho_spline(d_type2frho_i,m,1))*p + d_frho_spline(d_type2frho_i,m,2);
+ const F_FLOAT4 frho = d_frho_spline_a(d_type2frho_i,m);
+ d_fp[i] = (frho.x*p + frho.y)*p + frho.z;
if (EFLAG) {
- F_FLOAT phi = ((d_frho_spline(d_type2frho_i,m,3)*p + d_frho_spline(d_type2frho_i,m,4))*p +
- d_frho_spline(d_type2frho_i,m,5))*p + d_frho_spline(d_type2frho_i,m,6);
+ const F_FLOAT4 frho_b = d_frho_spline_b(d_type2frho_i,m);
+ F_FLOAT phi = ((frho_b.x*p + frho_b.y)*p + frho_b.z)*p + frho_b.w;
if (d_rho[i] > rhomax) phi += d_fp[i] * (d_rho[i]-rhomax);
if (eflag_global) ev.evdwl += phi;
if (eflag_atom) d_eatom[i] += phi;
}
-
}
template<class DeviceType>
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelB<EFLAG>, const int &ii) const {
EV_FLOAT ev;
this->template operator()<EFLAG>(TagPairEAMKernelB<EFLAG>(), ii, ev);
}
/* ---------------------------------------------------------------------- */
////Specialisation for Neighborlist types Half, HalfThread, Full
template<class DeviceType>
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelAB<EFLAG>, const int &ii, EV_FLOAT& ev) const {
// rho = density at each atom
// loop over neighbors of my atoms
const int i = d_ilist[ii];
const X_FLOAT xtmp = x(i,0);
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
//const AtomNeighborsConst d_neighbors_i = k_list.get_neighbors_const(i);
const int jnum = d_numneigh[i];
F_FLOAT rhotmp = 0.0;
for (int jj = 0; jj < jnum; jj++) {
//int j = d_neighbors_i[jj];
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const X_FLOAT delx = xtmp - x(j,0);
const X_FLOAT dely = ytmp - x(j,1);
const X_FLOAT delz = ztmp - x(j,2);
const int jtype = type(j);
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
if (rsq < cutforcesq) {
F_FLOAT p = sqrt(rsq)*rdr + 1.0;
int m = static_cast<int> (p);
m = MIN(m,nr-1);
p -= m;
p = MIN(p,1.0);
const int d_type2rhor_ji = d_type2rhor(jtype,itype);
- rhotmp += ((d_rhor_spline(d_type2rhor_ji,m,3)*p + d_rhor_spline(d_type2rhor_ji,m,4))*p +
- d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
+ const F_FLOAT4 rhor = d_rhor_spline_b(d_type2rhor_ji,m);
+ rhotmp += ((rhor.x*p + rhor.y)*p + rhor.z)*p + rhor.w;
}
}
d_rho[i] += rhotmp;
// fp = derivative of embedding energy at each atom
// phi = embedding energy at each atom
// if rho > rhomax (e.g. due to close approach of two atoms),
// will exceed table, so add linear term to conserve energy
F_FLOAT p = d_rho[i]*rdrho + 1.0;
int m = static_cast<int> (p);
m = MAX(1,MIN(m,nrho-1));
p -= m;
p = MIN(p,1.0);
const int d_type2frho_i = d_type2frho[itype];
- d_fp[i] = (d_frho_spline(d_type2frho_i,m,0)*p + d_frho_spline(d_type2frho_i,m,1))*p + d_frho_spline(d_type2frho_i,m,2);
+ const F_FLOAT4 frho = d_frho_spline_a(d_type2frho_i,m);
+ d_fp[i] = (frho.x*p + frho.y)*p + frho.z;
if (EFLAG) {
- F_FLOAT phi = ((d_frho_spline(d_type2frho_i,m,3)*p + d_frho_spline(d_type2frho_i,m,4))*p +
- d_frho_spline(d_type2frho_i,m,5))*p + d_frho_spline(d_type2frho_i,m,6);
+ const F_FLOAT4 frho_b = d_frho_spline_b(d_type2frho_i,m);
+ F_FLOAT phi = ((frho_b.x*p + frho_b.y)*p + frho_b.z)*p + frho_b.w;
if (d_rho[i] > rhomax) phi += d_fp[i] * (d_rho[i]-rhomax);
if (eflag_global) ev.evdwl += phi;
if (eflag_atom) d_eatom[i] += phi;
}
}
template<class DeviceType>
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelAB<EFLAG>, const int &ii) const {
EV_FLOAT ev;
this->template operator()<EFLAG>(TagPairEAMKernelAB<EFLAG>(), ii, ev);
}
/* ---------------------------------------------------------------------- */
////Specialisation for Neighborlist types Half, HalfThread, Full
template<class DeviceType>
template<int NEIGHFLAG, int NEWTON_PAIR, int EVFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelC<NEIGHFLAG,NEWTON_PAIR,EVFLAG>, const int &ii, EV_FLOAT& ev) const {
// The f array is atomic for Half/Thread neighbor style
Kokkos::View<F_FLOAT*[3], typename DAT::t_f_array::array_layout,DeviceType,Kokkos::MemoryTraits<AtomicF<NEIGHFLAG>::value> > a_f = f;
const int i = d_ilist[ii];
const X_FLOAT xtmp = x(i,0);
const X_FLOAT ytmp = x(i,1);
const X_FLOAT ztmp = x(i,2);
const int itype = type(i);
//const AtomNeighborsConst d_neighbors_i = k_list.get_neighbors_const(i);
const int jnum = d_numneigh[i];
F_FLOAT fxtmp = 0.0;
F_FLOAT fytmp = 0.0;
F_FLOAT fztmp = 0.0;
for (int jj = 0; jj < jnum; jj++) {
//int j = d_neighbors_i[jj];
int j = d_neighbors(i,jj);
j &= NEIGHMASK;
const X_FLOAT delx = xtmp - x(j,0);
const X_FLOAT dely = ytmp - x(j,1);
const X_FLOAT delz = ztmp - x(j,2);
const int jtype = type(j);
const F_FLOAT rsq = delx*delx + dely*dely + delz*delz;
if(rsq < cutforcesq) {
const F_FLOAT r = sqrt(rsq);
F_FLOAT p = r*rdr + 1.0;
int m = static_cast<int> (p);
m = MIN(m,nr-1);
p -= m;
p = MIN(p,1.0);
// rhoip = derivative of (density at atom j due to atom i)
// rhojp = derivative of (density at atom i due to atom j)
// phi = pair potential energy
// phip = phi'
// z2 = phi * r
// z2p = (phi * r)' = (phi' r) + phi
// psip needs both fp[i] and fp[j] terms since r_ij appears in two
// terms of embed eng: Fi(sum rho_ij) and Fj(sum rho_ji)
// hence embed' = Fi(sum rho_ij) rhojp + Fj(sum rho_ji) rhoip
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
- const F_FLOAT rhoip = (d_rhor_spline(d_type2rhor_ij,m,0)*p + d_rhor_spline(d_type2rhor_ij,m,1))*p +
- d_rhor_spline(d_type2rhor_ij,m,2);
+ const F_FLOAT4 rhor_ij = d_rhor_spline_a(d_type2rhor_ij,m);
+ const F_FLOAT rhoip = (rhor_ij.x*p + rhor_ij.y)*p + rhor_ij.z;
+
const int d_type2rhor_ji = d_type2rhor(jtype,itype);
- const F_FLOAT rhojp = (d_rhor_spline(d_type2rhor_ji,m,0)*p + d_rhor_spline(d_type2rhor_ji,m,1))*p +
- d_rhor_spline(d_type2rhor_ji,m,2);
+ const F_FLOAT4 rhor_ji = d_rhor_spline_a(d_type2rhor_ji,m);
+ const F_FLOAT rhojp = (rhor_ji.x*p + rhor_ji.y)*p + rhor_ji.z;
+
const int d_type2z2r_ij = d_type2z2r(itype,jtype);
- const F_FLOAT z2p = (d_z2r_spline(d_type2z2r_ij,m,0)*p + d_z2r_spline(d_type2z2r_ij,m,1))*p +
- d_z2r_spline(d_type2z2r_ij,m,2);
- const F_FLOAT z2 = ((d_z2r_spline(d_type2z2r_ij,m,3)*p + d_z2r_spline(d_type2z2r_ij,m,4))*p +
- d_z2r_spline(d_type2z2r_ij,m,5))*p + d_z2r_spline(d_type2z2r_ij,m,6);
+ const F_FLOAT4 z2r_a = d_z2r_spline_a(d_type2z2r_ij,m);
+ const F_FLOAT z2p = (z2r_a.x*p + z2r_a.y)*p + z2r_a.z;
+ const F_FLOAT4 z2r_b = d_z2r_spline_b(d_type2z2r_ij,m);
+ const F_FLOAT z2 = ((z2r_b.x*p + z2r_b.y)*p + z2r_b.z)*p + z2r_b.w;
const F_FLOAT recip = 1.0/r;
const F_FLOAT phi = z2*recip;
const F_FLOAT phip = z2p*recip - phi*recip;
const F_FLOAT psip = d_fp[i]*rhojp + d_fp[j]*rhoip + phip;
const F_FLOAT fpair = -psip*recip;
fxtmp += delx*fpair;
fytmp += dely*fpair;
fztmp += delz*fpair;
if ((NEIGHFLAG==HALF || NEIGHFLAG==HALFTHREAD) && (NEWTON_PAIR || j < nlocal)) {
a_f(j,0) -= delx*fpair;
a_f(j,1) -= dely*fpair;
a_f(j,2) -= delz*fpair;
}
if (EVFLAG) {
if (eflag) {
ev.evdwl += (((NEIGHFLAG==HALF || NEIGHFLAG==HALFTHREAD)&&(NEWTON_PAIR||(j<nlocal)))?1.0:0.5)*phi;
}
if (vflag_either || eflag_atom) this->template ev_tally<NEIGHFLAG,NEWTON_PAIR>(ev,i,j,phi,fpair,delx,dely,delz);
}
}
}
a_f(i,0) += fxtmp;
a_f(i,1) += fytmp;
a_f(i,2) += fztmp;
}
template<class DeviceType>
template<int NEIGHFLAG, int NEWTON_PAIR, int EVFLAG>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::operator()(TagPairEAMKernelC<NEIGHFLAG,NEWTON_PAIR,EVFLAG>, const int &ii) const {
EV_FLOAT ev;
this->template operator()<NEIGHFLAG,NEWTON_PAIR,EVFLAG>(TagPairEAMKernelC<NEIGHFLAG,NEWTON_PAIR,EVFLAG>(), ii, ev);
}
/* ---------------------------------------------------------------------- */
template<class DeviceType>
template<int NEIGHFLAG, int NEWTON_PAIR>
KOKKOS_INLINE_FUNCTION
void PairEAMKokkos<DeviceType>::ev_tally(EV_FLOAT &ev, const int &i, const int &j,
const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx,
const F_FLOAT &dely, const F_FLOAT &delz) const
{
const int EFLAG = eflag;
const int VFLAG = vflag_either;
// The eatom and vatom arrays are atomic for Half/Thread neighbor style
Kokkos::View<E_FLOAT*, typename DAT::t_efloat_1d::array_layout,DeviceType,Kokkos::MemoryTraits<AtomicF<NEIGHFLAG>::value> > v_eatom = k_eatom.view<DeviceType>();
Kokkos::View<F_FLOAT*[6], typename DAT::t_virial_array::array_layout,DeviceType,Kokkos::MemoryTraits<AtomicF<NEIGHFLAG>::value> > v_vatom = k_vatom.view<DeviceType>();
if (EFLAG) {
if (eflag_atom) {
const E_FLOAT epairhalf = 0.5 * epair;
if (NEIGHFLAG!=FULL) {
if (NEWTON_PAIR || i < nlocal) v_eatom[i] += epairhalf;
if (NEWTON_PAIR || j < nlocal) v_eatom[j] += epairhalf;
} else {
v_eatom[i] += epairhalf;
}
}
}
if (VFLAG) {
const E_FLOAT v0 = delx*delx*fpair;
const E_FLOAT v1 = dely*dely*fpair;
const E_FLOAT v2 = delz*delz*fpair;
const E_FLOAT v3 = delx*dely*fpair;
const E_FLOAT v4 = delx*delz*fpair;
const E_FLOAT v5 = dely*delz*fpair;
if (vflag_global) {
if (NEIGHFLAG!=FULL) {
if (NEWTON_PAIR || i < nlocal) {
ev.v[0] += 0.5*v0;
ev.v[1] += 0.5*v1;
ev.v[2] += 0.5*v2;
ev.v[3] += 0.5*v3;
ev.v[4] += 0.5*v4;
ev.v[5] += 0.5*v5;
}
if (NEWTON_PAIR || j < nlocal) {
ev.v[0] += 0.5*v0;
ev.v[1] += 0.5*v1;
ev.v[2] += 0.5*v2;
ev.v[3] += 0.5*v3;
ev.v[4] += 0.5*v4;
ev.v[5] += 0.5*v5;
}
} else {
ev.v[0] += 0.5*v0;
ev.v[1] += 0.5*v1;
ev.v[2] += 0.5*v2;
ev.v[3] += 0.5*v3;
ev.v[4] += 0.5*v4;
ev.v[5] += 0.5*v5;
}
}
if (vflag_atom) {
if (NEIGHFLAG!=FULL) {
if (NEWTON_PAIR || i < nlocal) {
v_vatom(i,0) += 0.5*v0;
v_vatom(i,1) += 0.5*v1;
v_vatom(i,2) += 0.5*v2;
v_vatom(i,3) += 0.5*v3;
v_vatom(i,4) += 0.5*v4;
v_vatom(i,5) += 0.5*v5;
}
if (NEWTON_PAIR || j < nlocal) {
v_vatom(j,0) += 0.5*v0;
v_vatom(j,1) += 0.5*v1;
v_vatom(j,2) += 0.5*v2;
v_vatom(j,3) += 0.5*v3;
v_vatom(j,4) += 0.5*v4;
v_vatom(j,5) += 0.5*v5;
}
} else {
v_vatom(i,0) += 0.5*v0;
v_vatom(i,1) += 0.5*v1;
v_vatom(i,2) += 0.5*v2;
v_vatom(i,3) += 0.5*v3;
v_vatom(i,4) += 0.5*v4;
v_vatom(i,5) += 0.5*v5;
}
}
}
}
template class PairEAMKokkos<LMPDeviceType>;
#ifdef KOKKOS_HAVE_CUDA
template class PairEAMKokkos<LMPHostType>;
#endif
\ No newline at end of file
diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h
index 98d0fc35c..4bd43cd38 100644
--- a/src/KOKKOS/pair_eam_kokkos.h
+++ b/src/KOKKOS/pair_eam_kokkos.h
@@ -1,179 +1,179 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
PairStyle(eam/kk,PairEAMKokkos<LMPDeviceType>)
PairStyle(eam/kk/device,PairEAMKokkos<LMPDeviceType>)
PairStyle(eam/kk/host,PairEAMKokkos<LMPHostType>)
#else
#ifndef LMP_PAIR_EAM_KOKKOS_H
#define LMP_PAIR_EAM_KOKKOS_H
#include "stdio.h"
#include "pair_kokkos.h"
#include "pair_eam.h"
#include "neigh_list_kokkos.h"
namespace LAMMPS_NS {
struct TagPairEAMPackForwardComm{};
struct TagPairEAMUnpackForwardComm{};
struct TagPairEAMInitialize{};
template<int NEIGHFLAG, int NEWTON_PAIR>
struct TagPairEAMKernelA{};
template<int EFLAG>
struct TagPairEAMKernelB{};
template<int EFLAG>
struct TagPairEAMKernelAB{};
template<int NEIGHFLAG, int NEWTON_PAIR, int EVFLAG>
struct TagPairEAMKernelC{};
template<class DeviceType>
class PairEAMKokkos : public PairEAM {
public:
enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF};
enum {COUL_FLAG=0};
typedef DeviceType device_type;
typedef ArrayTypes<DeviceType> AT;
typedef EV_FLOAT value_type;
PairEAMKokkos(class LAMMPS *);
virtual ~PairEAMKokkos();
virtual void compute(int, int);
void init_style();
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMPackForwardComm, const int&) const;
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMUnpackForwardComm, const int&) const;
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMInitialize, const int&) const;
template<int NEIGHFLAG, int NEWTON_PAIR>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelA<NEIGHFLAG,NEWTON_PAIR>, const int&) const;
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelB<EFLAG>, const int&, EV_FLOAT&) const;
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelB<EFLAG>, const int&) const;
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelAB<EFLAG>, const int&, EV_FLOAT&) const;
template<int EFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelAB<EFLAG>, const int&) const;
template<int NEIGHFLAG, int NEWTON_PAIR, int EVFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelC<NEIGHFLAG,NEWTON_PAIR,EVFLAG>, const int&, EV_FLOAT&) const;
template<int NEIGHFLAG, int NEWTON_PAIR, int EVFLAG>
KOKKOS_INLINE_FUNCTION
void operator()(TagPairEAMKernelC<NEIGHFLAG,NEWTON_PAIR,EVFLAG>, const int&) const;
template<int NEIGHFLAG, int NEWTON_PAIR>
KOKKOS_INLINE_FUNCTION
void ev_tally(EV_FLOAT &ev, const int &i, const int &j,
const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx,
const F_FLOAT &dely, const F_FLOAT &delz) const;
virtual int pack_forward_comm_kokkos(int, DAT::tdual_int_2d, int, DAT::tdual_xfloat_1d&,
int, int *);
virtual void unpack_forward_comm_kokkos(int, int, DAT::tdual_xfloat_1d&);
virtual int pack_forward_comm(int, int *, double *, int, int *);
virtual void unpack_forward_comm(int, int, double *);
int pack_reverse_comm(int, int, double *);
void unpack_reverse_comm(int, int *, double *);
protected:
void cleanup_copy();
typename AT::t_x_array_randomread x;
typename AT::t_f_array f;
typename AT::t_int_1d_randomread type;
typename AT::t_tagint_1d tag;
DAT::tdual_efloat_1d k_eatom;
DAT::tdual_virial_array k_vatom;
DAT::t_efloat_1d d_eatom;
DAT::t_virial_array d_vatom;
DAT::tdual_ffloat_1d k_rho;
DAT::tdual_ffloat_1d k_fp;
DAT::t_ffloat_1d d_rho;
typename AT::t_ffloat_1d v_rho;
DAT::t_ffloat_1d d_fp;
HAT::t_ffloat_1d h_rho;
HAT::t_ffloat_1d h_fp;
DAT::t_int_1d_randomread d_type2frho;
DAT::t_int_2d_randomread d_type2rhor;
DAT::t_int_2d_randomread d_type2z2r;
- typedef Kokkos::DualView<F_FLOAT**[7],Kokkos::LayoutRight,DeviceType> tdual_ffloat_2d_n7;
- typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread;
- typedef typename tdual_ffloat_2d_n7::t_host t_host_ffloat_2d_n7;
+ typedef Kokkos::DualView<F_FLOAT4**,Kokkos::LayoutLeft,DeviceType> tdual_ffloat4;
+ typedef typename tdual_ffloat4::t_dev_const_randomread t_ffloat4_randomread;
+ typedef typename tdual_ffloat4::t_host t_host_ffloat4;
- t_ffloat_2d_n7_randomread d_frho_spline;
- t_ffloat_2d_n7_randomread d_rhor_spline;
- t_ffloat_2d_n7_randomread d_z2r_spline;
+ t_ffloat4_randomread d_frho_spline_a, d_frho_spline_b;
+ t_ffloat4_randomread d_rhor_spline_a, d_rhor_spline_b;
+ t_ffloat4_randomread d_z2r_spline_a, d_z2r_spline_b;
+ void interpolate(int, double, double *, t_host_ffloat4, t_host_ffloat4, int);
virtual void file2array();
void array2spline();
- void interpolate(int, double, double *, t_host_ffloat_2d_n7, int);
typename ArrayTypes<DeviceType>::t_neighbors_2d d_neighbors;
typename ArrayTypes<DeviceType>::t_int_1d_randomread d_ilist;
typename ArrayTypes<DeviceType>::t_int_1d_randomread d_numneigh;
//NeighListKokkos<DeviceType> k_list;
int iswap;
int first;
typename AT::t_int_2d d_sendlist;
typename AT::t_xfloat_1d_um v_buf;
int neighflag,newton_pair;
int nlocal,nall,eflag,vflag;
friend void pair_virial_fdotr_compute<PairEAMKokkos>(PairEAMKokkos*);
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Cannot use chosen neighbor list style with pair eam/kk
That style is not supported by Kokkos.
*/
diff --git a/src/Makefile b/src/Makefile
index f4a6eddc8..6c95cf08b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,321 +1,322 @@
# LAMMPS multiple-machine -*- Makefile -*-
SHELL = /bin/bash
#.IGNORE:
# Definitions
ROOT = lmp
EXE = lmp_$@
ARLIB = liblammps_$@.a
SHLIB = liblammps_$@.so
ARLINK = liblammps.a
SHLINK = liblammps.so
OBJDIR = Obj_$@
OBJSHDIR = Obj_shared_$@
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
OBJ = $(SRC:.cpp=.o)
SRCLIB = $(filter-out main.cpp,$(SRC))
OBJLIB = $(filter-out main.o,$(OBJ))
# Command-line options for mode: exe (default), shexe, lib, shlib
mode = exe
objdir = $(OBJDIR)
ifeq ($(mode),shexe)
objdir = $(OBJSHDIR)
endif
ifeq ($(mode),lib)
objdir = $(OBJDIR)
endif
ifeq ($(mode),shlib)
objdir = $(OBJSHDIR)
endif
# Package variables
-PACKAGE = asphere body class2 colloid compress coreshell dipole fld gpu granular \
- kim kokkos kspace manybody mc meam misc molecule mpiio opt peri poems \
- python qeq reax replica rigid shock snap srd voronoi xtc
+PACKAGE = asphere body class2 colloid compress coreshell dipole fld gpu \
+ granular kim kokkos kspace manybody mc meam misc molecule mpiio \
+ opt peri poems python qeq reax replica rigid shock snap srd \
+ voronoi xtc
PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars user-cuda \
- user-diffraction user-drude user-eff user-fep user-intel user-h5md \
- user-lb user-misc user-molfile user-omp user-phonon user-qmmm \
- user-qtb user-quip user-reaxc user-smd user-sph
+ user-diffraction user-drude user-eff user-fep user-h5md \
+ user-intel user-lb user-misc user-molfile user-omp user-phonon \
+ user-qmmm user-qtb user-quip user-reaxc user-smd user-sph
PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \
user-atc user-awpmd user-colvars user-cuda user-h5md user-intel \
user-lb user-molfile user-qmmm user-quip user-smd
PACKALL = $(PACKAGE) $(PACKUSER)
PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z)
PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z)
YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z)
NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z)
# List of all targets
help:
@echo ''
@echo 'make clean-all delete all object files'
@echo 'make clean-machine delete object files for one machine'
@echo 'make mpi-stubs build dummy MPI library in STUBS'
@echo 'make install-python install LAMMPS wrapper in Python'
@echo 'make tar create lmp_src.tar.gz of src dir and packages'
@echo ''
@echo 'make package list available packages'
@echo 'make package-status (ps) status of all packages'
@echo 'make yes-package install a single pgk in src dir'
@echo 'make no-package remove a single pkg from src dir'
@echo 'make yes-all install all pgks in src dir'
@echo 'make no-all remove all pkgs from src dir'
@echo 'make yes-standard (yes-std) install all standard pkgs'
@echo 'make no-standard (no-std) remove all standard pkgs'
@echo 'make yes-user install all user pkgs'
@echo 'make no-user remove all user pkgs'
@echo 'make no-lib remove all pkgs with external libs'
@echo ''
@echo 'make package-update (pu) replace src files with updated package files'
@echo 'make package-overwrite replace package files with src files'
@echo 'make package-diff (pd) diff src files against package files'
@echo 'make package-purge purge obsolete copies of package sources'
@echo ''
@echo 'make machine build LAMMPS for machine'
@echo 'make mode=lib machine build LAMMPS as static lib for machine'
@echo 'make mode=shlib machine build LAMMPS as shared lib for machine'
@echo 'make mode=shexe machine build LAMMPS as shared exe for machine'
@echo 'make makelist create Makefile.list used by old makes'
@echo 'make -f Makefile.list machine build LAMMPS for machine (old)'
@echo ''
@echo 'machine is one of these from src/MAKE:'
@echo ''
@files="`ls MAKE/Makefile.*`"; \
for file in $$files; do head -1 $$file; done
@echo ''
@echo '... or one of these from src/MAKE/OPTIONS:'
@echo ''
@files="`ls MAKE/OPTIONS/Makefile.*`"; \
for file in $$files; do head -1 $$file; done
@echo ''
@echo '... or one of these from src/MAKE/MACHINES:'
@echo ''
@files="`ls MAKE/MACHINES/Makefile.*`"; \
for file in $$files; do head -1 $$file; done
@echo ''
@echo '... or one of these from src/MAKE/MINE:'
@echo ''
@files="`ls MAKE/MINE/Makefile.* 2>/dev/null`"; \
for file in $$files; do head -1 $$file; done
@echo ''
# Build LAMMPS in one of 4 modes
# exe = exe with static compile in Obj_machine (default)
# shexe = exe with shared compile in Obj_shared_machine
# lib = static lib in Obj_machine
# shlib = shared lib in Obj_shared_machine
.DEFAULT:
@if [ $@ = "serial" -a ! -f STUBS/libmpi_stubs.a ]; \
then $(MAKE) mpi-stubs; fi
@test -f MAKE/Makefile.$@ -o -f MAKE/OPTIONS/Makefile.$@ -o \
-f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@
@if [ ! -d $(objdir) ]; then mkdir $(objdir); fi
@$(SHELL) Make.sh style
@if [ -f MAKE/MACHINES/Makefile.$@ ]; \
then cp MAKE/MACHINES/Makefile.$@ $(objdir)/Makefile; fi
@if [ -f MAKE/OPTIONS/Makefile.$@ ]; \
then cp MAKE/OPTIONS/Makefile.$@ $(objdir)/Makefile; fi
@if [ -f MAKE/Makefile.$@ ]; \
then cp MAKE/Makefile.$@ $(objdir)/Makefile; fi
@if [ -f MAKE/MINE/Makefile.$@ ]; \
then cp MAKE/MINE/Makefile.$@ $(objdir)/Makefile; fi
@if [ ! -e Makefile.package ]; \
then cp Makefile.package.empty Makefile.package; fi
@if [ ! -e Makefile.package.settings ]; \
then cp Makefile.package.settings.empty Makefile.package.settings; fi
@cp Makefile.package Makefile.package.settings $(objdir)
ifeq ($(mode),exe)
@cd $(objdir); \
$(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "SHFLAGS =" \
"EXE = ../$(EXE)" ../$(EXE)
endif
ifeq ($(mode),shexe)
@cd $(objdir); \
$(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" \
"EXE = ../$(EXE)" ../$(EXE)
endif
ifeq ($(mode),lib)
@cd $(objdir); \
$(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" "SHFLAGS =" \
"EXE = ../$(ARLIB)" lib
@rm -f $(ARLINK)
@ln -s $(ARLIB) $(ARLINK)
endif
ifeq ($(mode),shlib)
@cd $(objdir); \
$(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \
"EXE = ../$(SHLIB)" shlib
@rm -f $(SHLINK)
@ln -s $(SHLIB) $(SHLINK)
endif
# Remove machine-specific object files
clean:
@echo 'make clean-all delete all object files'
@echo 'make clean-machine delete object files for one machine'
clean-all:
rm -rf Obj_*
clean-%:
rm -rf Obj_$(@:clean-%=%) Obj_shared_$(@:clean-%=%)
test-clean:
@cd ../test/; $(MAKE) $(MFLAGS) clean; cd ..
test-%:
$(MAKE) $(MFLAGS) $(@:test-%=%)
@cd ../test/; $(MAKE) $(MFLAGS) test MACH=$(@:test-%=%) MPICMD="$(MPICMD)" LMPFLAGS="$(LMPFLAGS)" TAG=$(TAG) ; cd ..
# Create Makefile.list
makelist:
@$(SHELL) Make.sh style
@$(SHELL) Make.sh Makefile.list
# Make MPI STUBS library
mpi-stubs:
@cd STUBS; $(MAKE) clean; $(MAKE)
# install LAMMPS shared lib and Python wrapper for Python usage
install-python:
@python ../python/install.py
# Create a tarball of src dir and packages
tar:
@cd STUBS; $(MAKE) clean
@cd ..; tar cvzf src/$(ROOT)_src.tar.gz \
src/Make* src/Package.sh src/MAKE src/*.cpp src/*.h src/STUBS \
$(patsubst %,src/%,$(PACKAGEUC)) $(patsubst %,src/%,$(PACKUSERUC)) \
--exclude=*/.svn
@cd STUBS; $(MAKE)
@echo "Created $(ROOT)_src.tar.gz"
# Package management
package:
@echo 'Standard packages:' $(PACKAGE)
@echo ''
@echo 'User-contributed packages:' $(PACKUSER)
@echo ''
@echo 'make package list available packages'
@echo 'make package-status (ps) status of all packages'
@echo 'make yes-package install a single pgk in src dir'
@echo 'make no-package remove a single pkg from src dir'
@echo 'make yes-all install all pgks in src dir'
@echo 'make no-all remove all pkgs from src dir'
@echo 'make yes-standard (yes-std) install all standard pkgs'
@echo 'make no-standard (no-srd) remove all standard pkgs'
@echo ''
@echo 'make yes-user install all user pkgs'
@echo 'make no-user remove all user pkgs'
@echo 'make no-lib remove all pkgs with external libs'
@echo 'make package-update (pu) replace src files with package files'
@echo 'make package-overwrite replace package files with src files'
@echo 'make package-diff (pd) diff src files against package file'
yes-all:
@for p in $(PACKALL); do $(MAKE) yes-$$p; done
no-all:
@for p in $(PACKALL); do $(MAKE) no-$$p; done
yes-standard yes-std:
@for p in $(PACKAGE); do $(MAKE) yes-$$p; done
no-standard no-std:
@for p in $(PACKAGE); do $(MAKE) no-$$p; done
yes-user:
@for p in $(PACKUSER); do $(MAKE) yes-$$p; done
no-user:
@for p in $(PACKUSER); do $(MAKE) no-$$p; done
no-lib:
@for p in $(PACKLIB); do $(MAKE) no-$$p; done
yes-%:
@if [ ! -e Makefile.package ]; \
then cp Makefile.package.empty Makefile.package; fi
@if [ ! -e Makefile.package.settings ]; \
then cp Makefile.package.settings.empty Makefile.package.settings; fi
@if [ ! -e $(YESDIR) ]; then \
echo "Package $(@:yes-%=%) does not exist"; \
elif [ -e $(YESDIR)/Install.sh ]; then \
echo "Installing package $(@:yes-%=%)"; \
cd $(YESDIR); $(SHELL) Install.sh 1; cd ..; \
$(SHELL) Depend.sh $(YESDIR) 1; \
else \
echo "Installing package $(@:yes-%=%)"; \
cd $(YESDIR); $(SHELL) ../Install.sh 1; cd ..; \
$(SHELL) Depend.sh $(YESDIR) 1; \
fi;
no-%:
@if [ ! -e $(NODIR) ]; then \
echo "Package $(@:no-%=%) does not exist"; \
elif [ -e $(NODIR)/Install.sh ]; then \
echo "Uninstalling package $(@:no-%=%)"; \
cd $(NODIR); $(SHELL) Install.sh 0; cd ..; \
$(SHELL) Depend.sh $(NODIR) 0; \
else \
echo "Uninstalling package $(@:no-%=%)"; \
cd $(NODIR); $(SHELL) ../Install.sh 0; cd ..; \
$(SHELL) Depend.sh $(NODIR) 0; \
fi;
# status = list src files that differ from package files
# update = replace src files with newer package files
# overwrite = overwrite package files with newer src files
# diff = show differences between src and package files
# purge = delete obsolete and auto-generated package files
package-status ps:
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p status; done
@echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p status; done
package-update pu:
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p update; done
@echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p update; done
package-overwrite:
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p overwrite; done
@echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p overwrite; done
package-diff pd:
@for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p diff; done
@echo ''
@for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p diff; done
package-purge: Purge.list
@echo 'Purging obsolete and auto-generated source files'
@for f in `grep -v '#' Purge.list` ; \
do test -f $$f && rm $$f && echo $$f || : ; \
done
diff --git a/src/USER-H5MD/README b/src/USER-H5MD/README
index e67708dbc..71270f503 100644
--- a/src/USER-H5MD/README
+++ b/src/USER-H5MD/README
@@ -1,8 +1,9 @@
This package provides the h5md dump style.
-See the doc page for dump_h5md. This dump style requires building the bundled
-ch5md library and HDF5 (see lib/ch5md/README).
+See the doc page for the dump h5md command. This dump style requires
+building the bundled ch5md library in lib/h5md, and having HDF5 itself
+installed on your system (see lib/h5md/README).
-The person who created this package is Pierre de Buyl (KU Leuven), see
-http://pdebuyl.be/ for contact information. Contact him directly if you have
-questions.
+The person who created this package is Pierre de Buyl (KU Leuven); see
+http://pdebuyl.be for contact information. Please contact him directly
+if you have questions.
diff --git a/src/pair.cpp b/src/pair.cpp
index 64f0f2318..95a46ee44 100644
--- a/src/pair.cpp
+++ b/src/pair.cpp
@@ -1,1717 +1,1717 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing author: Paul Crozier (SNL)
------------------------------------------------------------------------- */
#include "mpi.h"
#include "ctype.h"
#include "float.h"
#include "limits.h"
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "pair.h"
#include "atom.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "domain.h"
#include "comm.h"
#include "force.h"
#include "kspace.h"
#include "update.h"
#include "modify.h"
#include "compute.h"
#include "accelerator_cuda.h"
#include "suffix.h"
#include "atom_masks.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;
#define EWALD_F 1.12837917
enum{NONE,RLINEAR,RSQ,BMP};
// allocate space for static class instance variable and initialize it
int Pair::instance_total = 0;
/* ---------------------------------------------------------------------- */
Pair::Pair(LAMMPS *lmp) : Pointers(lmp)
{
instance_me = instance_total++;
THIRD = 1.0/3.0;
eng_vdwl = eng_coul = 0.0;
comm_forward = comm_reverse = comm_reverse_off = 0;
single_enable = 1;
restartinfo = 1;
respa_enable = 0;
one_coeff = 0;
no_virial_fdotr_compute = 0;
writedata = 0;
ghostneigh = 0;
nextra = 0;
pvector = NULL;
single_extra = 0;
svector = NULL;
ewaldflag = pppmflag = msmflag = dispersionflag = tip4pflag = dipoleflag = 0;
reinitflag = 1;
// pair_modify settingsx
compute_flag = 1;
manybody_flag = 0;
offset_flag = 0;
mix_flag = GEOMETRIC;
tail_flag = 0;
etail = ptail = etail_ij = ptail_ij = 0.0;
ncoultablebits = 12;
ndisptablebits = 12;
tabinner = sqrt(2.0);
tabinner_disp = sqrt(2.0);
allocated = 0;
suffix_flag = Suffix::NONE;
maxeatom = maxvatom = 0;
eatom = NULL;
vatom = NULL;
num_tally_compute = 0;
list_tally_compute = NULL;
// CUDA and KOKKOS per-fix data masks
datamask = ALL_MASK;
datamask_ext = ALL_MASK;
execution_space = Host;
datamask_read = ALL_MASK;
datamask_modify = ALL_MASK;
copymode = 0;
}
/* ---------------------------------------------------------------------- */
Pair::~Pair()
{
num_tally_compute = 0;
memory->sfree((void *)list_tally_compute);
if (copymode) return;
memory->destroy(eatom);
memory->destroy(vatom);
}
/* ----------------------------------------------------------------------
modify parameters of the pair style
pair_hybrid has its own version of this routine
to apply modifications to each of its sub-styles
------------------------------------------------------------------------- */
void Pair::modify_params(int narg, char **arg)
{
if (narg == 0) error->all(FLERR,"Illegal pair_modify command");
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"mix") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
if (strcmp(arg[iarg+1],"geometric") == 0) mix_flag = GEOMETRIC;
else if (strcmp(arg[iarg+1],"arithmetic") == 0) mix_flag = ARITHMETIC;
else if (strcmp(arg[iarg+1],"sixthpower") == 0) mix_flag = SIXTHPOWER;
else error->all(FLERR,"Illegal pair_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"shift") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
if (strcmp(arg[iarg+1],"yes") == 0) offset_flag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) offset_flag = 0;
else error->all(FLERR,"Illegal pair_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"table") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
ncoultablebits = force->inumeric(FLERR,arg[iarg+1]);
if (ncoultablebits > sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
iarg += 2;
} else if (strcmp(arg[iarg],"table/disp") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
ndisptablebits = force->inumeric(FLERR,arg[iarg+1]);
if (ndisptablebits > sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
iarg += 2;
} else if (strcmp(arg[iarg],"tabinner") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
tabinner = force->numeric(FLERR,arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"tabinner/disp") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
tabinner_disp = force->numeric(FLERR,arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"tail") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
if (strcmp(arg[iarg+1],"yes") == 0) tail_flag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) tail_flag = 0;
else error->all(FLERR,"Illegal pair_modify command");
iarg += 2;
} else if (strcmp(arg[iarg],"compute") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command");
if (strcmp(arg[iarg+1],"yes") == 0) compute_flag = 1;
else if (strcmp(arg[iarg+1],"no") == 0) compute_flag = 0;
else error->all(FLERR,"Illegal pair_modify command");
iarg += 2;
} else error->all(FLERR,"Illegal pair_modify command");
}
}
/* ---------------------------------------------------------------------- */
void Pair::init()
{
int i,j;
-
+
if (offset_flag && tail_flag)
error->all(FLERR,"Cannot have both pair_modify shift and tail set to yes");
if (tail_flag && domain->dimension == 2)
error->all(FLERR,"Cannot use pair tail corrections with 2d simulations");
if (tail_flag && domain->nonperiodic && comm->me == 0)
error->warning(FLERR,"Using pair tail corrections with nonperiodic system");
if (!compute_flag && tail_flag)
error->warning(FLERR,"Using pair tail corrections with compute set to no");
if (!compute_flag && offset_flag)
error->warning(FLERR,"Using pair potential shift with compute set to no");
// for manybody potentials
// check if bonded exclusions could invalidate the neighbor list
if (manybody_flag && atom->molecular) {
int flag = 0;
if (atom->nbonds > 0 && force->special_lj[1] == 0.0 &&
force->special_coul[1] == 0.0) flag = 1;
if (atom->nangles > 0 && force->special_lj[2] == 0.0 &&
force->special_coul[2] == 0.0) flag = 1;
if (atom->ndihedrals > 0 && force->special_lj[3] == 0.0 &&
force->special_coul[3] == 0.0) flag = 1;
if (flag && comm->me == 0)
error->warning(FLERR,"Using a manybody potential with "
"bonds/angles/dihedrals and special_bond exclusions");
}
// I,I coeffs must be set
// init_one() will check if I,J is set explicitly or inferred by mixing
if (!allocated) error->all(FLERR,"Not all pair coeffs are set");
for (i = 1; i <= atom->ntypes; i++)
if (setflag[i][i] == 0) error->all(FLERR,"Not all pair coeffs are set");
// style-specific initialization
init_style();
// call init_one() for each I,J
// set cutsq for each I,J, used to neighbor
// cutforce = max of all I,J cutoffs
cutforce = 0.0;
etail = ptail = 0.0;
double cut;
for (i = 1; i <= atom->ntypes; i++)
for (j = i; j <= atom->ntypes; j++) {
cut = init_one(i,j);
cutsq[i][j] = cutsq[j][i] = cut*cut;
cutforce = MAX(cutforce,cut);
if (tail_flag) {
etail += etail_ij;
ptail += ptail_ij;
if (i != j) {
etail += etail_ij;
ptail += ptail_ij;
}
}
}
}
/* ----------------------------------------------------------------------
reset all type-based params by invoking init_one() for each I,J
called by fix adapt after it changes one or more params
------------------------------------------------------------------------- */
void Pair::reinit()
{
// generalize this error message if reinit() is used by more than fix adapt
if (!reinitflag)
error->all(FLERR,"Fix adapt interface to this pair style not supported");
etail = ptail = 0.0;
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++) {
init_one(i,j);
if (tail_flag) {
etail += etail_ij;
ptail += ptail_ij;
if (i != j) {
etail += etail_ij;
ptail += ptail_ij;
}
}
}
}
/* ----------------------------------------------------------------------
init specific to a pair style
specific pair style can override this function
if needs its own error checks
if needs another kind of neighbor list
request default neighbor list = half list
------------------------------------------------------------------------- */
void Pair::init_style()
{
neighbor->request(this,instance_me);
}
/* ----------------------------------------------------------------------
neighbor callback to inform pair style of neighbor list to use
specific pair style can override this function
------------------------------------------------------------------------- */
void Pair::init_list(int which, NeighList *ptr)
{
list = ptr;
}
/* ----------------------------------------------------------------------
setup Coulomb force tables used in compute routines
------------------------------------------------------------------------- */
void Pair::init_tables(double cut_coul, double *cut_respa)
{
int masklo,maskhi;
double r,grij,expm2,derfc,egamma,fgamma,rsw;
double qqrd2e = force->qqrd2e;
if (force->kspace == NULL)
error->all(FLERR,"Pair style requires a KSpace style");
double g_ewald = force->kspace->g_ewald;
double cut_coulsq = cut_coul * cut_coul;
tabinnersq = tabinner*tabinner;
init_bitmap(tabinner,cut_coul,ncoultablebits,
masklo,maskhi,ncoulmask,ncoulshiftbits);
int ntable = 1;
for (int i = 0; i < ncoultablebits; i++) ntable *= 2;
// linear lookup tables of length N = 2^ncoultablebits
// stored value = value at lower edge of bin
// d values = delta from lower edge to upper edge of bin
if (ftable) free_tables();
memory->create(rtable,ntable,"pair:rtable");
memory->create(ftable,ntable,"pair:ftable");
memory->create(ctable,ntable,"pair:ctable");
memory->create(etable,ntable,"pair:etable");
memory->create(drtable,ntable,"pair:drtable");
memory->create(dftable,ntable,"pair:dftable");
memory->create(dctable,ntable,"pair:dctable");
memory->create(detable,ntable,"pair:detable");
if (cut_respa == NULL) {
vtable = ptable = dvtable = dptable = NULL;
} else {
memory->create(vtable,ntable,"pair:vtable");
memory->create(ptable,ntable,"pair:ptable");
memory->create(dvtable,ntable,"pair:dvtable");
memory->create(dptable,ntable,"pair:dptable");
}
union_int_float_t rsq_lookup;
union_int_float_t minrsq_lookup;
int itablemin;
minrsq_lookup.i = 0 << ncoulshiftbits;
minrsq_lookup.i |= maskhi;
for (int i = 0; i < ntable; i++) {
rsq_lookup.i = i << ncoulshiftbits;
rsq_lookup.i |= masklo;
if (rsq_lookup.f < tabinnersq) {
rsq_lookup.i = i << ncoulshiftbits;
rsq_lookup.i |= maskhi;
}
r = sqrtf(rsq_lookup.f);
if (msmflag) {
egamma = 1.0 - (r/cut_coul)*force->kspace->gamma(r/cut_coul);
fgamma = 1.0 + (rsq_lookup.f/cut_coulsq)*
force->kspace->dgamma(r/cut_coul);
} else {
grij = g_ewald * r;
expm2 = exp(-grij*grij);
derfc = erfc(grij);
}
if (cut_respa == NULL) {
rtable[i] = rsq_lookup.f;
ctable[i] = qqrd2e/r;
if (msmflag) {
ftable[i] = qqrd2e/r * fgamma;
etable[i] = qqrd2e/r * egamma;
} else {
ftable[i] = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
etable[i] = qqrd2e/r * derfc;
}
} else {
rtable[i] = rsq_lookup.f;
ctable[i] = 0.0;
ptable[i] = qqrd2e/r;
if (msmflag) {
ftable[i] = qqrd2e/r * (fgamma - 1.0);
etable[i] = qqrd2e/r * egamma;
vtable[i] = qqrd2e/r * fgamma;
} else {
ftable[i] = qqrd2e/r * (derfc + EWALD_F*grij*expm2 - 1.0);
etable[i] = qqrd2e/r * derfc;
vtable[i] = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
}
if (rsq_lookup.f > cut_respa[2]*cut_respa[2]) {
if (rsq_lookup.f < cut_respa[3]*cut_respa[3]) {
rsw = (r - cut_respa[2])/(cut_respa[3] - cut_respa[2]);
ftable[i] += qqrd2e/r * rsw*rsw*(3.0 - 2.0*rsw);
ctable[i] = qqrd2e/r * rsw*rsw*(3.0 - 2.0*rsw);
} else {
if (msmflag) ftable[i] = qqrd2e/r * fgamma;
else ftable[i] = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
ctable[i] = qqrd2e/r;
}
}
}
minrsq_lookup.f = MIN(minrsq_lookup.f,rsq_lookup.f);
}
tabinnersq = minrsq_lookup.f;
int ntablem1 = ntable - 1;
for (int i = 0; i < ntablem1; i++) {
drtable[i] = 1.0/(rtable[i+1] - rtable[i]);
dftable[i] = ftable[i+1] - ftable[i];
dctable[i] = ctable[i+1] - ctable[i];
detable[i] = etable[i+1] - etable[i];
}
if (cut_respa) {
for (int i = 0; i < ntablem1; i++) {
dvtable[i] = vtable[i+1] - vtable[i];
dptable[i] = ptable[i+1] - ptable[i];
}
}
// get the delta values for the last table entries
// tables are connected periodically between 0 and ntablem1
drtable[ntablem1] = 1.0/(rtable[0] - rtable[ntablem1]);
dftable[ntablem1] = ftable[0] - ftable[ntablem1];
dctable[ntablem1] = ctable[0] - ctable[ntablem1];
detable[ntablem1] = etable[0] - etable[ntablem1];
if (cut_respa) {
dvtable[ntablem1] = vtable[0] - vtable[ntablem1];
dptable[ntablem1] = ptable[0] - ptable[ntablem1];
}
// get the correct delta values at itablemax
// smallest r is in bin itablemin
// largest r is in bin itablemax, which is itablemin-1,
// or ntablem1 if itablemin=0
// deltas at itablemax only needed if corresponding rsq < cut*cut
// if so, compute deltas between rsq and cut*cut
double f_tmp,c_tmp,e_tmp,p_tmp,v_tmp;
p_tmp = 0.0;
v_tmp = 0.0;
itablemin = minrsq_lookup.i & ncoulmask;
itablemin >>= ncoulshiftbits;
int itablemax = itablemin - 1;
if (itablemin == 0) itablemax = ntablem1;
rsq_lookup.i = itablemax << ncoulshiftbits;
rsq_lookup.i |= maskhi;
if (rsq_lookup.f < cut_coulsq) {
rsq_lookup.f = cut_coulsq;
r = sqrtf(rsq_lookup.f);
if (msmflag) {
egamma = 1.0 - (r/cut_coul)*force->kspace->gamma(r/cut_coul);
fgamma = 1.0 + (rsq_lookup.f/cut_coulsq)*
force->kspace->dgamma(r/cut_coul);
} else {
grij = g_ewald * r;
expm2 = exp(-grij*grij);
derfc = erfc(grij);
}
if (cut_respa == NULL) {
c_tmp = qqrd2e/r;
if (msmflag) {
f_tmp = qqrd2e/r * fgamma;
e_tmp = qqrd2e/r * egamma;
} else {
f_tmp = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
e_tmp = qqrd2e/r * derfc;
}
} else {
c_tmp = 0.0;
p_tmp = qqrd2e/r;
if (msmflag) {
f_tmp = qqrd2e/r * (fgamma - 1.0);
e_tmp = qqrd2e/r * egamma;
v_tmp = qqrd2e/r * fgamma;
} else {
f_tmp = qqrd2e/r * (derfc + EWALD_F*grij*expm2 - 1.0);
e_tmp = qqrd2e/r * derfc;
v_tmp = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
}
if (rsq_lookup.f > cut_respa[2]*cut_respa[2]) {
if (rsq_lookup.f < cut_respa[3]*cut_respa[3]) {
rsw = (r - cut_respa[2])/(cut_respa[3] - cut_respa[2]);
f_tmp += qqrd2e/r * rsw*rsw*(3.0 - 2.0*rsw);
c_tmp = qqrd2e/r * rsw*rsw*(3.0 - 2.0*rsw);
} else {
if (msmflag) f_tmp = qqrd2e/r * fgamma;
else f_tmp = qqrd2e/r * (derfc + EWALD_F*grij*expm2);
c_tmp = qqrd2e/r;
}
}
}
drtable[itablemax] = 1.0/(rsq_lookup.f - rtable[itablemax]);
dftable[itablemax] = f_tmp - ftable[itablemax];
dctable[itablemax] = c_tmp - ctable[itablemax];
detable[itablemax] = e_tmp - etable[itablemax];
if (cut_respa) {
dvtable[itablemax] = v_tmp - vtable[itablemax];
dptable[itablemax] = p_tmp - ptable[itablemax];
}
}
}
/* ----------------------------------------------------------------------
setup force tables for dispersion used in compute routines
------------------------------------------------------------------------- */
void Pair::init_tables_disp(double cut_lj_global)
{
int masklo,maskhi;
double rsq;
double g_ewald_6 = force->kspace->g_ewald_6;
double g2 = g_ewald_6*g_ewald_6, g6 = g2*g2*g2, g8 = g6*g2;
tabinnerdispsq = tabinner_disp*tabinner_disp;
init_bitmap(tabinner_disp,cut_lj_global,ndisptablebits,
masklo,maskhi,ndispmask,ndispshiftbits);
int ntable = 1;
for (int i = 0; i < ndisptablebits; i++) ntable *= 2;
// linear lookup tables of length N = 2^ndisptablebits
// stored value = value at lower edge of bin
// d values = delta from lower edge to upper edge of bin
if (fdisptable) free_disp_tables();
memory->create(rdisptable,ntable,"pair:rdisptable");
memory->create(fdisptable,ntable,"pair:fdisptable");
memory->create(edisptable,ntable,"pair:edisptable");
memory->create(drdisptable,ntable,"pair:drdisptable");
memory->create(dfdisptable,ntable,"pair:dfdisptable");
memory->create(dedisptable,ntable,"pair:dedisptable");
union_int_float_t rsq_lookup;
union_int_float_t minrsq_lookup;
int itablemin;
minrsq_lookup.i = 0 << ndispshiftbits;
minrsq_lookup.i |= maskhi;
for (int i = 0; i < ntable; i++) {
rsq_lookup.i = i << ndispshiftbits;
rsq_lookup.i |= masklo;
if (rsq_lookup.f < tabinnerdispsq) {
rsq_lookup.i = i << ndispshiftbits;
rsq_lookup.i |= maskhi;
}
rsq = rsq_lookup.f;
register double x2 = g2*rsq, a2 = 1.0/x2;
x2 = a2*exp(-x2);
rdisptable[i] = rsq_lookup.f;
fdisptable[i] = g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq;
edisptable[i] = g6*((a2+1.0)*a2+0.5)*x2;
minrsq_lookup.f = MIN(minrsq_lookup.f,rsq_lookup.f);
}
tabinnerdispsq = minrsq_lookup.f;
int ntablem1 = ntable - 1;
for (int i = 0; i < ntablem1; i++) {
drdisptable[i] = 1.0/(rdisptable[i+1] - rdisptable[i]);
dfdisptable[i] = fdisptable[i+1] - fdisptable[i];
dedisptable[i] = edisptable[i+1] - edisptable[i];
}
// get the delta values for the last table entries
// tables are connected periodically between 0 and ntablem1
drdisptable[ntablem1] = 1.0/(rdisptable[0] - rdisptable[ntablem1]);
dfdisptable[ntablem1] = fdisptable[0] - fdisptable[ntablem1];
dedisptable[ntablem1] = edisptable[0] - edisptable[ntablem1];
// get the correct delta values at itablemax
// smallest r is in bin itablemin
// largest r is in bin itablemax, which is itablemin-1,
// or ntablem1 if itablemin=0
// deltas at itablemax only needed if corresponding rsq < cut*cut
// if so, compute deltas between rsq and cut*cut
double f_tmp,e_tmp;
double cut_lj_globalsq;
itablemin = minrsq_lookup.i & ndispmask;
itablemin >>= ndispshiftbits;
int itablemax = itablemin - 1;
if (itablemin == 0) itablemax = ntablem1;
rsq_lookup.i = itablemax << ndispshiftbits;
rsq_lookup.i |= maskhi;
if (rsq_lookup.f < (cut_lj_globalsq = cut_lj_global * cut_lj_global)) {
rsq_lookup.f = cut_lj_globalsq;
register double x2 = g2*rsq, a2 = 1.0/x2;
x2 = a2*exp(-x2);
f_tmp = g8*(((6.0*a2+6.0)*a2+3.0)*a2+1.0)*x2*rsq;
e_tmp = g6*((a2+1.0)*a2+0.5)*x2;
drdisptable[itablemax] = 1.0/(rsq_lookup.f - rdisptable[itablemax]);
dfdisptable[itablemax] = f_tmp - fdisptable[itablemax];
dedisptable[itablemax] = e_tmp - edisptable[itablemax];
}
}
/* ----------------------------------------------------------------------
free memory for tables used in Coulombic pair computations
------------------------------------------------------------------------- */
void Pair::free_tables()
{
memory->destroy(rtable);
memory->destroy(drtable);
memory->destroy(ftable);
memory->destroy(dftable);
memory->destroy(ctable);
memory->destroy(dctable);
memory->destroy(etable);
memory->destroy(detable);
memory->destroy(vtable);
memory->destroy(dvtable);
memory->destroy(ptable);
memory->destroy(dptable);
}
/* ----------------------------------------------------------------------
free memory for tables used in pair computations for dispersion
------------------------------------------------------------------------- */
void Pair::free_disp_tables()
{
memory->destroy(rdisptable);
memory->destroy(drdisptable);
memory->destroy(fdisptable);
memory->destroy(dfdisptable);
memory->destroy(edisptable);
memory->destroy(dedisptable);
}
/* ----------------------------------------------------------------------
mixing of pair potential prefactors (epsilon)
------------------------------------------------------------------------- */
double Pair::mix_energy(double eps1, double eps2, double sig1, double sig2)
{
if (mix_flag == GEOMETRIC)
return sqrt(eps1*eps2);
else if (mix_flag == ARITHMETIC)
return sqrt(eps1*eps2);
else if (mix_flag == SIXTHPOWER)
return (2.0 * sqrt(eps1*eps2) *
pow(sig1,3.0) * pow(sig2,3.0) / (pow(sig1,6.0) + pow(sig2,6.0)));
else return 0.0;
}
/* ----------------------------------------------------------------------
mixing of pair potential distances (sigma, cutoff)
------------------------------------------------------------------------- */
double Pair::mix_distance(double sig1, double sig2)
{
if (mix_flag == GEOMETRIC)
return sqrt(sig1*sig2);
else if (mix_flag == ARITHMETIC)
return (0.5 * (sig1+sig2));
else if (mix_flag == SIXTHPOWER)
return pow((0.5 * (pow(sig1,6.0) + pow(sig2,6.0))),1.0/6.0);
else return 0.0;
}
/* ---------------------------------------------------------------------- */
void Pair::compute_dummy(int eflag, int vflag)
{
if (eflag || vflag) ev_setup(eflag,vflag);
else evflag = 0;
}
/* -------------------------------------------------------------------
register a callback to a compute, so it can compute and accumulate
additional properties during the pair computation from within
Pair::ev_tally(). ensure each compute instance is registered only once
---------------------------------------------------------------------- */
void Pair::add_tally_callback(Compute *ptr)
{
int i,found=-1;
for (i=0; i < num_tally_compute; ++i) {
if (list_tally_compute[i] == ptr)
found = i;
}
if (found < 0) {
found = num_tally_compute;
++num_tally_compute;
void *p = memory->srealloc((void *)list_tally_compute,
sizeof(Compute *) * num_tally_compute,
"pair:list_tally_compute");
list_tally_compute = (Compute **) p;
list_tally_compute[num_tally_compute-1] = ptr;
}
}
/* -------------------------------------------------------------------
unregister a callback to a fix for additional pairwise tallying
---------------------------------------------------------------------- */
void Pair::del_tally_callback(Compute *ptr)
{
int i,found=-1;
for (i=0; i < num_tally_compute; ++i) {
if (list_tally_compute[i] == ptr)
found = i;
}
if (found < 0)
return;
// compact the list of active computes
--num_tally_compute;
for (i=found; i < num_tally_compute; ++i) {
list_tally_compute[i] = list_tally_compute[i+1];
}
}
/* ----------------------------------------------------------------------
setup for energy, virial computation
see integrate::ev_set() for values of eflag (0-3) and vflag (0-6)
------------------------------------------------------------------------- */
void Pair::ev_setup(int eflag, int vflag)
{
int i,n;
evflag = 1;
eflag_either = eflag;
eflag_global = eflag % 2;
eflag_atom = eflag / 2;
vflag_either = vflag;
vflag_global = vflag % 4;
vflag_atom = vflag / 4;
// reallocate per-atom arrays if necessary
if (eflag_atom && atom->nmax > maxeatom) {
maxeatom = atom->nmax;
memory->destroy(eatom);
memory->create(eatom,comm->nthreads*maxeatom,"pair:eatom");
}
if (vflag_atom && atom->nmax > maxvatom) {
maxvatom = atom->nmax;
memory->destroy(vatom);
memory->create(vatom,comm->nthreads*maxvatom,6,"pair:vatom");
}
// zero accumulators
// use force->newton instead of newton_pair
// b/c some bonds/dihedrals call pair::ev_tally with pairwise info
if (eflag_global) eng_vdwl = eng_coul = 0.0;
if (vflag_global) for (i = 0; i < 6; i++) virial[i] = 0.0;
if (eflag_atom) {
n = atom->nlocal;
if (force->newton) n += atom->nghost;
for (i = 0; i < n; i++) eatom[i] = 0.0;
}
if (vflag_atom) {
n = atom->nlocal;
if (force->newton) n += atom->nghost;
for (i = 0; i < n; i++) {
vatom[i][0] = 0.0;
vatom[i][1] = 0.0;
vatom[i][2] = 0.0;
vatom[i][3] = 0.0;
vatom[i][4] = 0.0;
vatom[i][5] = 0.0;
}
}
// if vflag_global = 2 and pair::compute() calls virial_fdotr_compute()
// compute global virial via (F dot r) instead of via pairwise summation
// unset other flags as appropriate
if (vflag_global == 2 && no_virial_fdotr_compute == 0) {
vflag_fdotr = 1;
vflag_global = 0;
if (vflag_atom == 0) vflag_either = 0;
if (vflag_either == 0 && eflag_either == 0) evflag = 0;
} else vflag_fdotr = 0;
if (lmp->cuda) lmp->cuda->evsetup_eatom_vatom(eflag_atom,vflag_atom);
}
/* ----------------------------------------------------------------------
set all flags to zero for energy, virial computation
called by some complicated many-body potentials that use individual flags
to insure no holdover of flags from previous timestep
------------------------------------------------------------------------- */
void Pair::ev_unset()
{
evflag = 0;
eflag_either = 0;
eflag_global = 0;
eflag_atom = 0;
vflag_either = 0;
vflag_global = 0;
vflag_atom = 0;
vflag_fdotr = 0;
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
need i < nlocal test since called by bond_quartic and dihedral_charmm
------------------------------------------------------------------------- */
void Pair::ev_tally(int i, int j, int nlocal, int newton_pair,
double evdwl, double ecoul, double fpair,
double delx, double dely, double delz)
{
double evdwlhalf,ecoulhalf,epairhalf,v[6];
if (eflag_either) {
if (eflag_global) {
if (newton_pair) {
eng_vdwl += evdwl;
eng_coul += ecoul;
} else {
evdwlhalf = 0.5*evdwl;
ecoulhalf = 0.5*ecoul;
if (i < nlocal) {
eng_vdwl += evdwlhalf;
eng_coul += ecoulhalf;
}
if (j < nlocal) {
eng_vdwl += evdwlhalf;
eng_coul += ecoulhalf;
}
}
}
if (eflag_atom) {
epairhalf = 0.5 * (evdwl + ecoul);
if (newton_pair || i < nlocal) eatom[i] += epairhalf;
if (newton_pair || j < nlocal) eatom[j] += epairhalf;
}
}
if (vflag_either) {
v[0] = delx*delx*fpair;
v[1] = dely*dely*fpair;
v[2] = delz*delz*fpair;
v[3] = delx*dely*fpair;
v[4] = delx*delz*fpair;
v[5] = dely*delz*fpair;
if (vflag_global) {
if (newton_pair) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
} else {
if (i < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
if (j < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
}
}
if (vflag_atom) {
if (newton_pair || i < nlocal) {
vatom[i][0] += 0.5*v[0];
vatom[i][1] += 0.5*v[1];
vatom[i][2] += 0.5*v[2];
vatom[i][3] += 0.5*v[3];
vatom[i][4] += 0.5*v[4];
vatom[i][5] += 0.5*v[5];
}
if (newton_pair || j < nlocal) {
vatom[j][0] += 0.5*v[0];
vatom[j][1] += 0.5*v[1];
vatom[j][2] += 0.5*v[2];
vatom[j][3] += 0.5*v[3];
vatom[j][4] += 0.5*v[4];
vatom[j][5] += 0.5*v[5];
}
}
}
if (num_tally_compute > 0) {
for (int k=0; k < num_tally_compute; ++k) {
Compute *c = list_tally_compute[k];
c->pair_tally_callback(i, j, nlocal, newton_pair,
evdwl, ecoul, fpair, delx, dely, delz);
}
}
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
can use this version with full neighbor lists
------------------------------------------------------------------------- */
void Pair::ev_tally_full(int i, double evdwl, double ecoul, double fpair,
double delx, double dely, double delz)
{
double v[6];
if (eflag_either) {
if (eflag_global) {
eng_vdwl += 0.5*evdwl;
eng_coul += 0.5*ecoul;
}
if (eflag_atom) eatom[i] += 0.5 * (evdwl + ecoul);
}
if (vflag_either) {
v[0] = 0.5*delx*delx*fpair;
v[1] = 0.5*dely*dely*fpair;
v[2] = 0.5*delz*delz*fpair;
v[3] = 0.5*delx*dely*fpair;
v[4] = 0.5*delx*delz*fpair;
v[5] = 0.5*dely*delz*fpair;
if (vflag_global) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
}
if (vflag_atom) {
vatom[i][0] += v[0];
vatom[i][1] += v[1];
vatom[i][2] += v[2];
vatom[i][3] += v[3];
vatom[i][4] += v[4];
vatom[i][5] += v[5];
}
}
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
for virial, have delx,dely,delz and fx,fy,fz
------------------------------------------------------------------------- */
void Pair::ev_tally_xyz(int i, int j, int nlocal, int newton_pair,
double evdwl, double ecoul,
double fx, double fy, double fz,
double delx, double dely, double delz)
{
double evdwlhalf,ecoulhalf,epairhalf,v[6];
if (eflag_either) {
if (eflag_global) {
if (newton_pair) {
eng_vdwl += evdwl;
eng_coul += ecoul;
} else {
evdwlhalf = 0.5*evdwl;
ecoulhalf = 0.5*ecoul;
if (i < nlocal) {
eng_vdwl += evdwlhalf;
eng_coul += ecoulhalf;
}
if (j < nlocal) {
eng_vdwl += evdwlhalf;
eng_coul += ecoulhalf;
}
}
}
if (eflag_atom) {
epairhalf = 0.5 * (evdwl + ecoul);
if (newton_pair || i < nlocal) eatom[i] += epairhalf;
if (newton_pair || j < nlocal) eatom[j] += epairhalf;
}
}
if (vflag_either) {
v[0] = delx*fx;
v[1] = dely*fy;
v[2] = delz*fz;
v[3] = delx*fy;
v[4] = delx*fz;
v[5] = dely*fz;
if (vflag_global) {
if (newton_pair) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
} else {
if (i < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
if (j < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
}
}
if (vflag_atom) {
if (newton_pair || i < nlocal) {
vatom[i][0] += 0.5*v[0];
vatom[i][1] += 0.5*v[1];
vatom[i][2] += 0.5*v[2];
vatom[i][3] += 0.5*v[3];
vatom[i][4] += 0.5*v[4];
vatom[i][5] += 0.5*v[5];
}
if (newton_pair || j < nlocal) {
vatom[j][0] += 0.5*v[0];
vatom[j][1] += 0.5*v[1];
vatom[j][2] += 0.5*v[2];
vatom[j][3] += 0.5*v[3];
vatom[j][4] += 0.5*v[4];
vatom[j][5] += 0.5*v[5];
}
}
}
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
for virial, have delx,dely,delz and fx,fy,fz
called when using full neighbor lists
------------------------------------------------------------------------- */
void Pair::ev_tally_xyz_full(int i, double evdwl, double ecoul,
double fx, double fy, double fz,
double delx, double dely, double delz)
{
double evdwlhalf,ecoulhalf,epairhalf,v[6];
if (eflag_either) {
if (eflag_global) {
evdwlhalf = 0.5*evdwl;
ecoulhalf = 0.5*ecoul;
eng_vdwl += evdwlhalf;
eng_coul += ecoulhalf;
}
if (eflag_atom) {
epairhalf = 0.5 * (evdwl + ecoul);
eatom[i] += epairhalf;
}
}
if (vflag_either) {
v[0] = 0.5*delx*fx;
v[1] = 0.5*dely*fy;
v[2] = 0.5*delz*fz;
v[3] = 0.5*delx*fy;
v[4] = 0.5*delx*fz;
v[5] = 0.5*dely*fz;
if (vflag_global) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
}
if (vflag_atom) {
vatom[i][0] += v[0];
vatom[i][1] += v[1];
vatom[i][2] += v[2];
vatom[i][3] += v[3];
vatom[i][4] += v[4];
vatom[i][5] += v[5];
}
}
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
called by SW and hbond potentials, newton_pair is always on
virial = riFi + rjFj + rkFk = (rj-ri) Fj + (rk-ri) Fk = drji*fj + drki*fk
------------------------------------------------------------------------- */
void Pair::ev_tally3(int i, int j, int k, double evdwl, double ecoul,
double *fj, double *fk, double *drji, double *drki)
{
double epairthird,v[6];
if (eflag_either) {
if (eflag_global) {
eng_vdwl += evdwl;
eng_coul += ecoul;
}
if (eflag_atom) {
epairthird = THIRD * (evdwl + ecoul);
eatom[i] += epairthird;
eatom[j] += epairthird;
eatom[k] += epairthird;
}
}
if (vflag_either) {
v[0] = drji[0]*fj[0] + drki[0]*fk[0];
v[1] = drji[1]*fj[1] + drki[1]*fk[1];
v[2] = drji[2]*fj[2] + drki[2]*fk[2];
v[3] = drji[0]*fj[1] + drki[0]*fk[1];
v[4] = drji[0]*fj[2] + drki[0]*fk[2];
v[5] = drji[1]*fj[2] + drki[1]*fk[2];
if (vflag_global) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
}
if (vflag_atom) {
vatom[i][0] += THIRD*v[0]; vatom[i][1] += THIRD*v[1];
vatom[i][2] += THIRD*v[2]; vatom[i][3] += THIRD*v[3];
vatom[i][4] += THIRD*v[4]; vatom[i][5] += THIRD*v[5];
vatom[j][0] += THIRD*v[0]; vatom[j][1] += THIRD*v[1];
vatom[j][2] += THIRD*v[2]; vatom[j][3] += THIRD*v[3];
vatom[j][4] += THIRD*v[4]; vatom[j][5] += THIRD*v[5];
vatom[k][0] += THIRD*v[0]; vatom[k][1] += THIRD*v[1];
vatom[k][2] += THIRD*v[2]; vatom[k][3] += THIRD*v[3];
vatom[k][4] += THIRD*v[4]; vatom[k][5] += THIRD*v[5];
}
}
}
/* ----------------------------------------------------------------------
tally eng_vdwl and virial into global and per-atom accumulators
called by AIREBO potential, newton_pair is always on
------------------------------------------------------------------------- */
void Pair::ev_tally4(int i, int j, int k, int m, double evdwl,
double *fi, double *fj, double *fk,
double *drim, double *drjm, double *drkm)
{
double epairfourth,v[6];
if (eflag_either) {
if (eflag_global) eng_vdwl += evdwl;
if (eflag_atom) {
epairfourth = 0.25 * evdwl;
eatom[i] += epairfourth;
eatom[j] += epairfourth;
eatom[k] += epairfourth;
eatom[m] += epairfourth;
}
}
if (vflag_atom) {
v[0] = 0.25 * (drim[0]*fi[0] + drjm[0]*fj[0] + drkm[0]*fk[0]);
v[1] = 0.25 * (drim[1]*fi[1] + drjm[1]*fj[1] + drkm[1]*fk[1]);
v[2] = 0.25 * (drim[2]*fi[2] + drjm[2]*fj[2] + drkm[2]*fk[2]);
v[3] = 0.25 * (drim[0]*fi[1] + drjm[0]*fj[1] + drkm[0]*fk[1]);
v[4] = 0.25 * (drim[0]*fi[2] + drjm[0]*fj[2] + drkm[0]*fk[2]);
v[5] = 0.25 * (drim[1]*fi[2] + drjm[1]*fj[2] + drkm[1]*fk[2]);
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
vatom[j][0] += v[0]; vatom[j][1] += v[1]; vatom[j][2] += v[2];
vatom[j][3] += v[3]; vatom[j][4] += v[4]; vatom[j][5] += v[5];
vatom[k][0] += v[0]; vatom[k][1] += v[1]; vatom[k][2] += v[2];
vatom[k][3] += v[3]; vatom[k][4] += v[4]; vatom[k][5] += v[5];
vatom[m][0] += v[0]; vatom[m][1] += v[1]; vatom[m][2] += v[2];
vatom[m][3] += v[3]; vatom[m][4] += v[4]; vatom[m][5] += v[5];
}
}
/* ----------------------------------------------------------------------
tally ecoul and virial into each of atoms in list
called by TIP4P potential, newton_pair is always on
weight assignments by alpha, so contribution is all to O atom as alpha -> 0.0
key = 0 if neither atom = water O
key = 1 if first atom = water O
key = 2 if second atom = water O
key = 3 if both atoms = water O
------------------------------------------------------------------------- */
void Pair::ev_tally_tip4p(int key, int *list, double *v,
double ecoul, double alpha)
{
int i;
if (eflag_either) {
if (eflag_global) eng_coul += ecoul;
if (eflag_atom) {
if (key == 0) {
eatom[list[0]] += 0.5*ecoul;
eatom[list[1]] += 0.5*ecoul;
} else if (key == 1) {
eatom[list[0]] += 0.5*ecoul*(1-alpha);
eatom[list[1]] += 0.25*ecoul*alpha;
eatom[list[2]] += 0.25*ecoul*alpha;
eatom[list[3]] += 0.5*ecoul;
} else if (key == 2) {
eatom[list[0]] += 0.5*ecoul;
eatom[list[1]] += 0.5*ecoul*(1-alpha);
eatom[list[2]] += 0.25*ecoul*alpha;
eatom[list[3]] += 0.25*ecoul*alpha;
} else {
eatom[list[0]] += 0.5*ecoul*(1-alpha);
eatom[list[1]] += 0.25*ecoul*alpha;
eatom[list[2]] += 0.25*ecoul*alpha;
eatom[list[3]] += 0.5*ecoul*(1-alpha);
eatom[list[4]] += 0.25*ecoul*alpha;
eatom[list[5]] += 0.25*ecoul*alpha;
}
}
}
if (vflag_either) {
if (vflag_global) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
}
if (vflag_atom) {
if (key == 0) {
for (i = 0; i <= 5; i++) {
vatom[list[0]][i] += 0.5*v[i];
vatom[list[1]][i] += 0.5*v[i];
}
} else if (key == 1) {
for (i = 0; i <= 5; i++) {
vatom[list[0]][i] += 0.5*v[i]*(1-alpha);
vatom[list[1]][i] += 0.25*v[i]*alpha;
vatom[list[2]][i] += 0.25*v[i]*alpha;
vatom[list[3]][i] += 0.5*v[i];
}
} else if (key == 2) {
for (i = 0; i <= 5; i++) {
vatom[list[0]][i] += 0.5*v[i];
vatom[list[1]][i] += 0.5*v[i]*(1-alpha);
vatom[list[2]][i] += 0.25*v[i]*alpha;
vatom[list[3]][i] += 0.25*v[i]*alpha;
}
} else {
for (i = 0; i <= 5; i++) {
vatom[list[0]][i] += 0.5*v[i]*(1-alpha);
vatom[list[1]][i] += 0.25*v[i]*alpha;
vatom[list[2]][i] += 0.25*v[i]*alpha;
vatom[list[3]][i] += 0.5*v[i]*(1-alpha);
vatom[list[4]][i] += 0.25*v[i]*alpha;
vatom[list[5]][i] += 0.25*v[i]*alpha;
}
}
}
}
}
/* ----------------------------------------------------------------------
tally virial into per-atom accumulators
called by REAX/C potential, newton_pair is always on
fi is magnitude of force on atom i
------------------------------------------------------------------------- */
void Pair::v_tally(int i, double *fi, double *deli)
{
double v[6];
v[0] = 0.5*deli[0]*fi[0];
v[1] = 0.5*deli[1]*fi[1];
v[2] = 0.5*deli[2]*fi[2];
v[3] = 0.5*deli[0]*fi[1];
v[4] = 0.5*deli[0]*fi[2];
v[5] = 0.5*deli[1]*fi[2];
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
}
/* ----------------------------------------------------------------------
tally virial into per-atom accumulators
called by AIREBO potential, newton_pair is always on
fpair is magnitude of force on atom I
------------------------------------------------------------------------- */
void Pair::v_tally2(int i, int j, double fpair, double *drij)
{
double v[6];
v[0] = 0.5 * drij[0]*drij[0]*fpair;
v[1] = 0.5 * drij[1]*drij[1]*fpair;
v[2] = 0.5 * drij[2]*drij[2]*fpair;
v[3] = 0.5 * drij[0]*drij[1]*fpair;
v[4] = 0.5 * drij[0]*drij[2]*fpair;
v[5] = 0.5 * drij[1]*drij[2]*fpair;
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
vatom[j][0] += v[0]; vatom[j][1] += v[1]; vatom[j][2] += v[2];
vatom[j][3] += v[3]; vatom[j][4] += v[4]; vatom[j][5] += v[5];
}
/* ----------------------------------------------------------------------
tally virial into per-atom accumulators
called by AIREBO and Tersoff potential, newton_pair is always on
------------------------------------------------------------------------- */
void Pair::v_tally3(int i, int j, int k,
double *fi, double *fj, double *drik, double *drjk)
{
double v[6];
v[0] = THIRD * (drik[0]*fi[0] + drjk[0]*fj[0]);
v[1] = THIRD * (drik[1]*fi[1] + drjk[1]*fj[1]);
v[2] = THIRD * (drik[2]*fi[2] + drjk[2]*fj[2]);
v[3] = THIRD * (drik[0]*fi[1] + drjk[0]*fj[1]);
v[4] = THIRD * (drik[0]*fi[2] + drjk[0]*fj[2]);
v[5] = THIRD * (drik[1]*fi[2] + drjk[1]*fj[2]);
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
vatom[j][0] += v[0]; vatom[j][1] += v[1]; vatom[j][2] += v[2];
vatom[j][3] += v[3]; vatom[j][4] += v[4]; vatom[j][5] += v[5];
vatom[k][0] += v[0]; vatom[k][1] += v[1]; vatom[k][2] += v[2];
vatom[k][3] += v[3]; vatom[k][4] += v[4]; vatom[k][5] += v[5];
}
/* ----------------------------------------------------------------------
tally virial into per-atom accumulators
called by AIREBO potential, newton_pair is always on
------------------------------------------------------------------------- */
void Pair::v_tally4(int i, int j, int k, int m,
double *fi, double *fj, double *fk,
double *drim, double *drjm, double *drkm)
{
double v[6];
v[0] = 0.25 * (drim[0]*fi[0] + drjm[0]*fj[0] + drkm[0]*fk[0]);
v[1] = 0.25 * (drim[1]*fi[1] + drjm[1]*fj[1] + drkm[1]*fk[1]);
v[2] = 0.25 * (drim[2]*fi[2] + drjm[2]*fj[2] + drkm[2]*fk[2]);
v[3] = 0.25 * (drim[0]*fi[1] + drjm[0]*fj[1] + drkm[0]*fk[1]);
v[4] = 0.25 * (drim[0]*fi[2] + drjm[0]*fj[2] + drkm[0]*fk[2]);
v[5] = 0.25 * (drim[1]*fi[2] + drjm[1]*fj[2] + drkm[1]*fk[2]);
vatom[i][0] += v[0]; vatom[i][1] += v[1]; vatom[i][2] += v[2];
vatom[i][3] += v[3]; vatom[i][4] += v[4]; vatom[i][5] += v[5];
vatom[j][0] += v[0]; vatom[j][1] += v[1]; vatom[j][2] += v[2];
vatom[j][3] += v[3]; vatom[j][4] += v[4]; vatom[j][5] += v[5];
vatom[k][0] += v[0]; vatom[k][1] += v[1]; vatom[k][2] += v[2];
vatom[k][3] += v[3]; vatom[k][4] += v[4]; vatom[k][5] += v[5];
vatom[m][0] += v[0]; vatom[m][1] += v[1]; vatom[m][2] += v[2];
vatom[m][3] += v[3]; vatom[m][4] += v[4]; vatom[m][5] += v[5];
}
/* ----------------------------------------------------------------------
tally virial into global and per-atom accumulators
called by pair lubricate potential with 6 tensor components
------------------------------------------------------------------------- */
void Pair::v_tally_tensor(int i, int j, int nlocal, int newton_pair,
double vxx, double vyy, double vzz,
double vxy, double vxz, double vyz)
{
double v[6];
v[0] = vxx;
v[1] = vyy;
v[2] = vzz;
v[3] = vxy;
v[4] = vxz;
v[5] = vyz;
if (vflag_global) {
if (newton_pair) {
virial[0] += v[0];
virial[1] += v[1];
virial[2] += v[2];
virial[3] += v[3];
virial[4] += v[4];
virial[5] += v[5];
} else {
if (i < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
if (j < nlocal) {
virial[0] += 0.5*v[0];
virial[1] += 0.5*v[1];
virial[2] += 0.5*v[2];
virial[3] += 0.5*v[3];
virial[4] += 0.5*v[4];
virial[5] += 0.5*v[5];
}
}
}
if (vflag_atom) {
if (newton_pair || i < nlocal) {
vatom[i][0] += 0.5*v[0];
vatom[i][1] += 0.5*v[1];
vatom[i][2] += 0.5*v[2];
vatom[i][3] += 0.5*v[3];
vatom[i][4] += 0.5*v[4];
vatom[i][5] += 0.5*v[5];
}
if (newton_pair || j < nlocal) {
vatom[j][0] += 0.5*v[0];
vatom[j][1] += 0.5*v[1];
vatom[j][2] += 0.5*v[2];
vatom[j][3] += 0.5*v[3];
vatom[j][4] += 0.5*v[4];
vatom[j][5] += 0.5*v[5];
}
}
}
/* ----------------------------------------------------------------------
compute global pair virial via summing F dot r over own & ghost atoms
at this point, only pairwise forces have been accumulated in atom->f
------------------------------------------------------------------------- */
void Pair::virial_fdotr_compute()
{
double **x = atom->x;
double **f = atom->f;
// sum over force on all particles including ghosts
if (neighbor->includegroup == 0) {
int nall = atom->nlocal + atom->nghost;
for (int i = 0; i < nall; i++) {
virial[0] += f[i][0]*x[i][0];
virial[1] += f[i][1]*x[i][1];
virial[2] += f[i][2]*x[i][2];
virial[3] += f[i][1]*x[i][0];
virial[4] += f[i][2]*x[i][0];
virial[5] += f[i][2]*x[i][1];
}
// neighbor includegroup flag is set
// sum over force on initial nfirst particles and ghosts
} else {
int nall = atom->nfirst;
for (int i = 0; i < nall; i++) {
virial[0] += f[i][0]*x[i][0];
virial[1] += f[i][1]*x[i][1];
virial[2] += f[i][2]*x[i][2];
virial[3] += f[i][1]*x[i][0];
virial[4] += f[i][2]*x[i][0];
virial[5] += f[i][2]*x[i][1];
}
nall = atom->nlocal + atom->nghost;
for (int i = atom->nlocal; i < nall; i++) {
virial[0] += f[i][0]*x[i][0];
virial[1] += f[i][1]*x[i][1];
virial[2] += f[i][2]*x[i][2];
virial[3] += f[i][1]*x[i][0];
virial[4] += f[i][2]*x[i][0];
virial[5] += f[i][2]*x[i][1];
}
}
// prevent multiple calls to update the virial
// when a hybrid pair style uses both a gpu and non-gpu pair style
// or when respa is used with gpu pair styles
vflag_fdotr = 0;
}
/* ----------------------------------------------------------------------
write a table of pair potential energy/force vs distance to a file
------------------------------------------------------------------------- */
void Pair::write_file(int narg, char **arg)
{
if (narg < 8) error->all(FLERR,"Illegal pair_write command");
if (single_enable == 0)
error->all(FLERR,"Pair style does not support pair_write");
// parse arguments
int itype = force->inumeric(FLERR,arg[0]);
int jtype = force->inumeric(FLERR,arg[1]);
if (itype < 1 || itype > atom->ntypes || jtype < 1 || jtype > atom->ntypes)
error->all(FLERR,"Invalid atom types in pair_write command");
int n = force->inumeric(FLERR,arg[2]);
int style = NONE;
if (strcmp(arg[3],"r") == 0) style = RLINEAR;
else if (strcmp(arg[3],"rsq") == 0) style = RSQ;
else if (strcmp(arg[3],"bitmap") == 0) style = BMP;
else error->all(FLERR,"Invalid style in pair_write command");
double inner = force->numeric(FLERR,arg[4]);
double outer = force->numeric(FLERR,arg[5]);
if (inner <= 0.0 || inner >= outer)
error->all(FLERR,"Invalid cutoffs in pair_write command");
// open file in append mode
// print header in format used by pair_style table
int me;
MPI_Comm_rank(world,&me);
FILE *fp;
if (me == 0) {
fp = fopen(arg[6],"a");
if (fp == NULL) error->one(FLERR,"Cannot open pair_write file");
fprintf(fp,"# Pair potential %s for atom types %d %d: i,r,energy,force\n",
force->pair_style,itype,jtype);
if (style == RLINEAR)
fprintf(fp,"\n%s\nN %d R %g %g\n\n",arg[7],n,inner,outer);
if (style == RSQ)
fprintf(fp,"\n%s\nN %d RSQ %g %g\n\n",arg[7],n,inner,outer);
}
// initialize potentials before evaluating pair potential
// insures all pair coeffs are set and force constants
// also initialize neighbor so that neighbor requests are processed
// NOTE: might be safest to just do lmp->init()
force->init();
neighbor->init();
// if pair style = any of EAM, swap in dummy fp vector
double eamfp[2];
eamfp[0] = eamfp[1] = 0.0;
double *eamfp_hold;
Pair *epair = force->pair_match("eam",0);
if (epair) epair->swap_eam(eamfp,&eamfp_hold);
// if atom style defines charge, swap in dummy q vec
double q[2];
q[0] = q[1] = 1.0;
if (narg == 10) {
q[0] = force->numeric(FLERR,arg[8]);
q[1] = force->numeric(FLERR,arg[9]);
}
double *q_hold;
if (atom->q) {
q_hold = atom->q;
atom->q = q;
}
// evaluate energy and force at each of N distances
int masklo,maskhi,nmask,nshiftbits;
if (style == BMP) {
init_bitmap(inner,outer,n,masklo,maskhi,nmask,nshiftbits);
int ntable = 1 << n;
if (me == 0)
fprintf(fp,"\n%s\nN %d BITMAP %g %g\n\n",arg[7],ntable,inner,outer);
n = ntable;
}
double r,e,f,rsq;
union_int_float_t rsq_lookup;
for (int i = 0; i < n; i++) {
if (style == RLINEAR) {
r = inner + (outer-inner) * i/(n-1);
rsq = r*r;
} else if (style == RSQ) {
rsq = inner*inner + (outer*outer - inner*inner) * i/(n-1);
r = sqrt(rsq);
} else if (style == BMP) {
rsq_lookup.i = i << nshiftbits;
rsq_lookup.i |= masklo;
if (rsq_lookup.f < inner*inner) {
rsq_lookup.i = i << nshiftbits;
rsq_lookup.i |= maskhi;
}
rsq = rsq_lookup.f;
r = sqrt(rsq);
}
if (rsq < cutsq[itype][jtype]) {
e = single(0,1,itype,jtype,rsq,1.0,1.0,f);
f *= r;
} else e = f = 0.0;
if (me == 0) fprintf(fp,"%d %g %g %g\n",i+1,r,e,f);
}
// restore original vecs that were swapped in for
double *tmp;
if (epair) epair->swap_eam(eamfp_hold,&tmp);
if (atom->q) atom->q = q_hold;
if (me == 0) fclose(fp);
}
/* ----------------------------------------------------------------------
define bitmap parameters based on inner and outer cutoffs
------------------------------------------------------------------------- */
void Pair::init_bitmap(double inner, double outer, int ntablebits,
int &masklo, int &maskhi, int &nmask, int &nshiftbits)
{
if (sizeof(int) != sizeof(float))
error->all(FLERR,"Bitmapped lookup tables require int/float be same size");
if (ntablebits > sizeof(float)*CHAR_BIT)
error->all(FLERR,"Too many total bits for bitmapped lookup table");
if (inner >= outer)
error->warning(FLERR,"Table inner cutoff >= outer cutoff");
int nlowermin = 1;
while (!((pow(double(2),(double)nlowermin) <= inner*inner) &&
(pow(double(2),(double)nlowermin+1.0) > inner*inner))) {
if (pow(double(2),(double)nlowermin) <= inner*inner) nlowermin++;
else nlowermin--;
}
int nexpbits = 0;
double required_range = outer*outer / pow(double(2),(double)nlowermin);
double available_range = 2.0;
while (available_range < required_range) {
nexpbits++;
available_range = pow(double(2),pow(double(2),(double)nexpbits));
}
int nmantbits = ntablebits - nexpbits;
if (nexpbits > sizeof(float)*CHAR_BIT - FLT_MANT_DIG)
error->all(FLERR,"Too many exponent bits for lookup table");
if (nmantbits+1 > FLT_MANT_DIG)
error->all(FLERR,"Too many mantissa bits for lookup table");
if (nmantbits < 3) error->all(FLERR,"Too few bits for lookup table");
nshiftbits = FLT_MANT_DIG - (nmantbits+1);
nmask = 1;
for (int j = 0; j < ntablebits+nshiftbits; j++) nmask *= 2;
nmask -= 1;
union_int_float_t rsq_lookup;
rsq_lookup.f = outer*outer;
maskhi = rsq_lookup.i & ~(nmask);
rsq_lookup.f = inner*inner;
masklo = rsq_lookup.i & ~(nmask);
}
/* ---------------------------------------------------------------------- */
double Pair::memory_usage()
{
double bytes = comm->nthreads*maxeatom * sizeof(double);
bytes += comm->nthreads*maxvatom*6 * sizeof(double);
return bytes;
}
diff --git a/src/version.h b/src/version.h
index 7f6c97dd2..634ee8b0a 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1 +1 @@
-#define LAMMPS_VERSION "18 Aug 2015"
+#define LAMMPS_VERSION "19 Aug 2015"
diff --git a/tools/moltemplate/common/gaff.lt b/tools/moltemplate/common/gaff.lt
index a4da5f8d5..9506cef9c 100644
--- a/tools/moltemplate/common/gaff.lt
+++ b/tools/moltemplate/common/gaff.lt
@@ -1,11782 +1,11782 @@
-# This is the April 2014 version of GAFF (from AmberTools14).
+# This is the 1.7 version of GAFF (from AmberTools15), downloaded 2015-8-17.
# NOTE: Corrections were made to the amberparm2lt.sh converter on 2014-5-19, so
# this version of gaff.lt differs from earlier versions using the same source
####################################################################
# To use this, LAMMPS currently must be compiled with the USER-MISC package.
# (Type "make yes-user-misc" into the shell before compiling LAMMPS.)
####################################################################
# This moltemplate (LT) file was generated automatically using
# amber/amberparm2lt.sh gaff.dat GAFF > gaff.lt
####################################################################
# Background information and usage explanation:
# This file contanis a list of atom types and rules for generating bonded
# interactions between these atoms (hopefully) according to AMBER conventions.
# By using the atom types shown below in your own molecules, bonds and angular
# interactions will be automatically generated.
# AMBER (GAFF) force-field parameters will also be assigned to each angle
# interaction (according to these atom types).
# One way to apply the GAFF force field to a particular type of molecule, is
# to use the "inherits" keyword when you define that molecule. For example:
# import("gaff.lt")
# MoleculeType inherits GAFF {
# write_once("Data Atoms") {
# $atom:C1 $mol:... @atom:cx 0.0 4.183 3.194 13.285
# $atom:C2 $mol:... @atom:cx 0.0 4.291 4.618 13.382
# : : :
# }
# }
#(See "Inheritance" and "short names vs. full names" in the moltemplate manual.)
####################################################################
# Moltemplate can not assign atom charge. You must assign atomic
# charges yourself. (Moltemplate is only a simple text manipulation tool.)
####################################################################
GAFF {
# ----------------------------------------------------------------------
# The basic atom nomenclature and conventions are explained here:
# http://ambermd.org/antechamber/gaff.pdf
# For reference, the original gaff.dat file and format documenation are here:
# http://ambermd.org/AmberTools-get.html
# http://ambermd.org/formats.html#parm.dat
# ----------------------------------------------------------------------
write_once("Data Masses") {
@atom:c 12.01 # Sp2 C carbonyl group
@atom:c1 12.01 # Sp C
@atom:c2 12.01 # Sp2 C
@atom:c3 12.01 # Sp3 C
@atom:ca 12.01 # Sp2 C in pure aromatic systems
@atom:cp 12.01 # Head Sp2 C that connect two rings in biphenyl sys.
@atom:cq 12.01 # Head Sp2 C that connect two rings in biphenyl sys. identical to cp
@atom:cc 12.01 # Sp2 carbons in non-pure aromatic systems
@atom:cd 12.01 # Sp2 carbons in non-pure aromatic systems, identical to cc
@atom:ce 12.01 # Inner Sp2 carbons in conjugated systems
@atom:cf 12.01 # Inner Sp2 carbons in conjugated systems, identical to ce
@atom:cg 12.01 # Inner Sp carbons in conjugated systems
@atom:ch 12.01 # Inner Sp carbons in conjugated systems, identical to cg
@atom:cx 12.01 # Sp3 carbons in triangle systems
@atom:cy 12.01 # Sp3 carbons in square systems
@atom:cu 12.01 # Sp2 carbons in triangle systems
@atom:cv 12.01 # Sp2 carbons in square systems
@atom:cz 12.01 # Sp2 carbon in guanidine group
@atom:h1 1.008 # H bonded to aliphatic carbon with 1 electrwd. group
@atom:h2 1.008 # H bonded to aliphatic carbon with 2 electrwd. group
@atom:h3 1.008 # H bonded to aliphatic carbon with 3 electrwd. group
@atom:h4 1.008 # H bonded to non-sp3 carbon with 1 electrwd. group
@atom:h5 1.008 # H bonded to non-sp3 carbon with 2 electrwd. group
@atom:ha 1.008 # H bonded to aromatic carbon
@atom:hc 1.008 # H bonded to aliphatic carbon without electrwd. group
@atom:hn 1.008 # H bonded to nitrogen atoms
@atom:ho 1.008 # Hydroxyl group
@atom:hp 1.008 # H bonded to phosphate
@atom:hs 1.008 # Hydrogen bonded to sulphur
@atom:hw 1.008 # Hydrogen in water
@atom:hx 1.008 # H bonded to C next to positively charged group
@atom:f 19.00 # Fluorine
@atom:cl 35.45 # Chlorine
@atom:br 79.90 # Bromine
@atom:i 126.9 # Iodine
@atom:n 14.01 # Sp2 nitrogen in amide groups
@atom:n1 14.01 # Sp N
@atom:n2 14.01 # aliphatic Sp2 N with two connected atoms
@atom:n3 14.01 # Sp3 N with three connected atoms
@atom:n4 14.01 # Sp3 N with four connected atoms
@atom:na 14.01 # Sp2 N with three connected atoms
@atom:nb 14.01 # Sp2 N in pure aromatic systems
@atom:nc 14.01 # Sp2 N in non-pure aromatic systems
@atom:nd 14.01 # Sp2 N in non-pure aromatic systems, identical to nc
@atom:ne 14.01 # Inner Sp2 N in conjugated systems
@atom:nf 14.01 # Inner Sp2 N in conjugated systems, identical to ne
@atom:nh 14.01 # Amine N connected one or more aromatic rings
@atom:no 14.01 # Nitro N
@atom:o 16.00 # Oxygen with one connected atom
@atom:oh 16.00 # Oxygen in hydroxyl group
@atom:os 16.00 # Ether and ester oxygen
@atom:ow 16.00 # Oxygen in water
@atom:p2 30.97 # Phosphate with two connected atoms
@atom:p3 30.97 # Phosphate with three connected atoms, such as PH3
@atom:p4 30.97 # Phosphate with three connected atoms, such as O=P(CH3)2
@atom:p5 30.97 # Phosphate with four connected atoms, such as O=P(OH)3
@atom:pb 30.97 # Sp2 P in pure aromatic systems
@atom:pc 30.97 # Sp2 P in non-pure aromatic systems
@atom:pd 30.97 # Sp2 P in non-pure aromatic systems, identical to pc
@atom:pe 30.97 # Inner Sp2 P in conjugated systems
@atom:pf 30.97 # Inner Sp2 P in conjugated systems, identical to pe
@atom:px 30.97 # Special p4 in conjugated systems
@atom:py 30.97 # Special p5 in conjugated systems
@atom:s 32.06 # S with one connected atom
@atom:s2 32.06 # S with two connected atom, involved at least one double bond
@atom:s4 32.06 # S with three connected atoms
@atom:s6 32.06 # S with four connected atoms
@atom:sh 32.06 # Sp3 S connected with hydrogen
@atom:ss 32.06 # Sp3 S in thio-ester and thio-ether
@atom:sx 32.06 # Special s4 in conjugated systems
@atom:sy 32.06 # Special s6 in conjugated systems
} # (end of masses)
write_once("In Settings") {
pair_coeff @atom:h1 @atom:h1 lj/charmm/coul/long 0.0157 2.47135304412 # Veenstra et al JCC,8,(1992),963
pair_coeff @atom:h2 @atom:h2 lj/charmm/coul/long 0.0157 2.29317330049 # Veenstra et al JCC,8,(1992),963
pair_coeff @atom:h3 @atom:h3 lj/charmm/coul/long 0.0157 2.11499355687 # Veenstra et al JCC,8,(1992),963
pair_coeff @atom:h4 @atom:h4 lj/charmm/coul/long 0.0150 2.51055258772 # Spellmeyer, one electrowithdr. neighbor
pair_coeff @atom:h5 @atom:h5 lj/charmm/coul/long 0.0150 2.42146271591 # Spellmeyer, two electrowithdr. neighbor
pair_coeff @atom:ha @atom:ha lj/charmm/coul/long 0.0150 2.59964245953 # Spellmeyer
pair_coeff @atom:hc @atom:hc lj/charmm/coul/long 0.0157 2.64953278775 # OPLS
pair_coeff @atom:hn @atom:hn lj/charmm/coul/long 0.0157 1.06907846177 # !Ferguson base pair geom.
pair_coeff @atom:ho @atom:ho lj/charmm/coul/long 0.0000 0.0 # OPLS Jorgensen, JACS,110,(1988),1657
pair_coeff @atom:hp @atom:hp lj/charmm/coul/long 0.0157 1.06907846177 # same to hs (be careful !)
pair_coeff @atom:hs @atom:hs lj/charmm/coul/long 0.0157 1.06907846177 # W. Cornell CH3SH --> CH3OH FEP
pair_coeff @atom:hw @atom:hw lj/charmm/coul/long 0.0000 0.0 # OPLS Jorgensen, JACS,110,(1988),1657
pair_coeff @atom:hx @atom:hx lj/charmm/coul/long 0.0157 1.95997717991 # Veenstra et al JCC,8,(1992),963
pair_coeff @atom:o @atom:o lj/charmm/coul/long 0.2100 2.95992190115 # OPLS
pair_coeff @atom:oh @atom:oh lj/charmm/coul/long 0.2104 3.06647338784 # OPLS
pair_coeff @atom:os @atom:os lj/charmm/coul/long 0.1700 3.00001234347 # OPLS ether
pair_coeff @atom:ow @atom:ow lj/charmm/coul/long 0.1520 3.15075240658 # TIP3P water model
pair_coeff @atom:c @atom:c lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:c1 @atom:c1 lj/charmm/coul/long 0.2100 3.39966950842 # cp C DLM 11/2007 well depth from OPLS replacing 0.0860
pair_coeff @atom:c2 @atom:c2 lj/charmm/coul/long 0.0860 3.39966950842 # sp2 atom in the middle of C=CD-CD=C
pair_coeff @atom:c3 @atom:c3 lj/charmm/coul/long 0.1094 3.39966950842 # OPLS
pair_coeff @atom:ca @atom:ca lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cc @atom:cc lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cd @atom:cd lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:ce @atom:ce lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cf @atom:cf lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cg @atom:cg lj/charmm/coul/long 0.2100 3.39966950842 # DLM 12/2007 as c1
pair_coeff @atom:ch @atom:ch lj/charmm/coul/long 0.2100 3.39966950842 # DLM 12/2007 as c1
pair_coeff @atom:cp @atom:cp lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cq @atom:cq lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cu @atom:cu lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cv @atom:cv lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cx @atom:cx lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cy @atom:cy lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:cz @atom:cz lj/charmm/coul/long 0.0860 3.39966950842 # OPLS
pair_coeff @atom:n @atom:n lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:n1 @atom:n1 lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:n2 @atom:n2 lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:n3 @atom:n3 lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:n4 @atom:n4 lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:na @atom:na lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:nb @atom:nb lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:nc @atom:nc lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:nd @atom:nd lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:ne @atom:ne lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:nf @atom:nf lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:nh @atom:nh lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:no @atom:no lj/charmm/coul/long 0.1700 3.24999852378 # OPLS
pair_coeff @atom:s @atom:s lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:s2 @atom:s2 lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:s4 @atom:s4 lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:s6 @atom:s6 lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:sx @atom:sx lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:sy @atom:sy lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:sh @atom:sh lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:ss @atom:ss lj/charmm/coul/long 0.2500 3.56359487256 # W. Cornell CH3SH and CH3SCH3 FEP's
pair_coeff @atom:p2 @atom:p2 lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:p3 @atom:p3 lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:p4 @atom:p4 lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:p5 @atom:p5 lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:pb @atom:pb lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:pc @atom:pc lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:pd @atom:pd lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:pe @atom:pe lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:pf @atom:pf lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:px @atom:px lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:py @atom:py lj/charmm/coul/long 0.2000 3.74177461619 # JCC,7,(1986),230;
pair_coeff @atom:f @atom:f lj/charmm/coul/long 0.061 3.11814551349 # Gough et al. JCC 13,(1992),963.
pair_coeff @atom:cl @atom:cl lj/charmm/coul/long 0.265 3.47094140587 # Fox, JPCB,102,8070,(98),flex.mdl CHCl3
pair_coeff @atom:br @atom:br lj/charmm/coul/long 0.420 3.59923082129 # Junmei, 2010
pair_coeff @atom:i @atom:i lj/charmm/coul/long 0.50 3.830864488 # Junmei, 2010
} # (end of pair_coeffs)
write_once("In Settings") {
bond_coeff @bond:ow-hw harmonic 553.0 0.9572 # TIP3P_Water 1
bond_coeff @bond:hw-hw harmonic 553.0 1.5136 # TIP3P_Water 1
bond_coeff @bond:br-br harmonic 123.2 2.5420 # SOURCE1 4 0.0000
bond_coeff @bond:br-c1 harmonic 352.7 1.7870 # SOURCE2 4 0.0024
bond_coeff @bond:br-c2 harmonic 278.7 1.8830 # SOURCE1 31 0.0000
bond_coeff @bond:br-c harmonic 240.3 1.9460 # SOURCE2 2 0.0285
bond_coeff @bond:br-c3 harmonic 229.5 1.9660 # SOURCE1 100 0.0000
bond_coeff @bond:br-ca harmonic 269.6 1.8970 # SOURCE1 127 0.0058
bond_coeff @bond:br-cc harmonic 277.6 1.8847 # SOURCE4 39 0.0068
bond_coeff @bond:br-cx harmonic 261.4 1.9100 # SOURCE1 8 0.0000
bond_coeff @bond:br-i harmonic 142.4 2.6710 # SOURCE1 2 0.0245
bond_coeff @bond:br-n1 harmonic 330.4 1.8600 # SOUECE3 1
bond_coeff @bond:br-n2 harmonic 219.0 2.0380 # SOURCE3 5 0.1082
bond_coeff @bond:br-n harmonic 320.2 1.8730 # SOURCE3 4 0.0046
bond_coeff @bond:br-n3 harmonic 265.9 1.9520 # SOURCE3 2 0.0000
bond_coeff @bond:br-n4 harmonic 282.4 1.9260 # SOURCE3 3 0.0013
bond_coeff @bond:br-na harmonic 237.3 2.0020 # SOURCE3 7 0.2156
bond_coeff @bond:br-nh harmonic 270.9 1.9440 # SOURCE3 1 0.0000
bond_coeff @bond:br-no harmonic 191.0 2.1010 # SOURCE3 1 0.0000
bond_coeff @bond:br-o harmonic 278.9 1.8000 # SOUECE3 1
bond_coeff @bond:br-oh harmonic 237.2 1.8660 # SOURCE3 1 0.0000
bond_coeff @bond:br-os harmonic 225.6 1.8870 # SOURCE3 2 0.0000
bond_coeff @bond:br-p2 harmonic 174.3 2.2100 # SOURCE3 9 0.0510
bond_coeff @bond:br-p3 harmonic 167.0 2.2310 # SOURCE3 3 0.0101
bond_coeff @bond:br-p4 harmonic 188.8 2.1710 # SOUECE3 1
bond_coeff @bond:br-p5 harmonic 179.3 2.1960 # SOURCE3 3 0.0099
bond_coeff @bond:br-s harmonic 170.6 2.2200 # SOUECE3 1
bond_coeff @bond:br-s4 harmonic 134.3 2.3410 # SOURCE3 1 0.0000
bond_coeff @bond:br-s6 harmonic 172.7 2.2140 # SOURCE3 3 0.0443
bond_coeff @bond:br-sh harmonic 174.4 2.2090 # SOURCE3 1 0.0000
bond_coeff @bond:br-ss harmonic 176.6 2.2030 # SOURCE3 3 0.0035
bond_coeff @bond:c1-c1 harmonic 986.2 1.1810 # SOURCE1 265 0.0031
bond_coeff @bond:c1-c2 harmonic 625.0 1.3070 # SOURCE1 18 0.0000
bond_coeff @bond:c1-c3 harmonic 368.3 1.4700 # SOURCE1 215 0.0017
bond_coeff @bond:c1-ca harmonic 404.1 1.4400 # SOUECE3 1
bond_coeff @bond:c1-ce harmonic 607.4 1.3153 # SOURCE4 6 0.0086
bond_coeff @bond:c1-cg harmonic 845.8 1.2220 # SOURCE3 22 0.0101
bond_coeff @bond:c1-ch harmonic 845.8 1.2220 # SOURCE3 22 same_as_c1-cg
bond_coeff @bond:c1-cl harmonic 419.7 1.6310 # SOURCE2 6 0.0050
bond_coeff @bond:c1-cx harmonic 399.1 1.4440 # SOURCE1 38 0.0000
bond_coeff @bond:c1-f harmonic 469.4 1.2700 # SOURCE2 2 0.0085
bond_coeff @bond:c1-ha harmonic 375.9 1.0660 # SOURCE3 63 0.0035
bond_coeff @bond:c1-hc harmonic 385.6 1.0600 # SOUECE3 1
bond_coeff @bond:c1-i harmonic 318.8 1.9890 # SOURCE2 4 0.0032
bond_coeff @bond:c1-n1 harmonic 1014.5 1.1380 # SOURCE1 170 0.0055
bond_coeff @bond:c1-n2 harmonic 769.8 1.2100 # SOURCE3 5 0.0115
bond_coeff @bond:c1-n3 harmonic 409.8 1.3920 # SOURCE2 1 0.0000
bond_coeff @bond:c1-n4 harmonic 378.2 1.4170 # SOURCE3 3 0.0032
bond_coeff @bond:c1-n harmonic 503.0 1.3300 # SOUECE3 1
bond_coeff @bond:c1-na harmonic 452.0 1.3620 # SOURCE3 8 0.0034
bond_coeff @bond:c1-ne harmonic 803.3 1.1986 # SOURCE4 10 0.0088
bond_coeff @bond:c1-nf harmonic 803.3 1.1986 # SOURCE4 10 same_as_c1-ne
bond_coeff @bond:c1-nh harmonic 485.0 1.3408 # SOURCE4 11 0.0037
bond_coeff @bond:c1-no harmonic 393.0 1.4050 # SOURCE3 3 0.0005
bond_coeff @bond:c1-o harmonic 777.0 1.1660 # SOURCE2 9 0.0052
bond_coeff @bond:c1-oh harmonic 435.6 1.3260 # SOURCE3 1 0.0000
bond_coeff @bond:c1-os harmonic 437.1 1.3250 # SOURCE3 3 0.0148
bond_coeff @bond:c1-p2 harmonic 289.3 1.7700 # SOUECE3 1
bond_coeff @bond:c1-p3 harmonic 275.1 1.7900 # SOUECE3 1
bond_coeff @bond:c1-p4 harmonic 275.1 1.7900 # SOUECE3 1
bond_coeff @bond:c1-p5 harmonic 302.2 1.7530 # SOURCE3 2 0.0000
bond_coeff @bond:c1-s2 harmonic 410.0 1.5950 # SOURCE3 1 0.0000
bond_coeff @bond:c1-s harmonic 371.8 1.6300 # SOURCE1 14 0.0000
bond_coeff @bond:c1-s4 harmonic 272.9 1.7460 # SOURCE3 2 0.0000
bond_coeff @bond:c1-s6 harmonic 290.4 1.7220 # SOURCE3 2 0.0000
bond_coeff @bond:c1-sh harmonic 324.5 1.6800 # SOUECE3 1
bond_coeff @bond:c1-ss harmonic 325.4 1.6790 # SOURCE1 10 0.0000
bond_coeff @bond:c2-c2 harmonic 589.7 1.3240 # SOURCE1 974 0.0096
bond_coeff @bond:c2-c3 harmonic 328.3 1.5080 # SOURCE1 2536 0.0021
bond_coeff @bond:c2-ca harmonic 357.2 1.4800 # SOUECE3 1
bond_coeff @bond:c2-cc harmonic 522.6 1.3600 # SOURCE1 771 0.0185
bond_coeff @bond:c2-cd harmonic 522.6 1.3600 # SOURCE1 771 0.0185
bond_coeff @bond:c2-ce harmonic 560.5 1.3390 # SOURCE3 62 0.0128
bond_coeff @bond:c2-cf harmonic 560.5 1.3390 # SOURCE3 62 same_as_c2-ce
bond_coeff @bond:c2-cl harmonic 328.8 1.7220 # SOURCE1 163 0.0098
bond_coeff @bond:c2-cu harmonic 573.9 1.3320 # SOURCE2 1 0.0000
bond_coeff @bond:c2-cx harmonic 353.3 1.4836 # SOURCE4 26 0.0064
bond_coeff @bond:c2-cy harmonic 331.7 1.5046 # SOURCE4 9 0.0053
bond_coeff @bond:c2-f harmonic 368.7 1.3400 # SOURCE1 34 0.0000
bond_coeff @bond:c2-h4 harmonic 348.6 1.0840 # SOURCE3 40 0.0058
bond_coeff @bond:c2-h5 harmonic 338.0 1.0915 # SOURCE4 42 0.0017
bond_coeff @bond:c2-ha harmonic 344.3 1.0870 # SOURCE3 797 0.0046
bond_coeff @bond:c2-hc harmonic 344.3 1.0870 # SOURCE3 789 0.0046
bond_coeff @bond:c2-hx harmonic 350.1 1.0830 # SOURCE3 3 0.0008
bond_coeff @bond:c2-i harmonic 223.2 2.1530 # SOURCE3 2 0.0000
bond_coeff @bond:c2-n1 harmonic 546.0 1.3060 # SOURCE3 4 0.0161
bond_coeff @bond:c2-n2 harmonic 581.1 1.2880 # SOURCE1 103 0.0100
bond_coeff @bond:c2-n3 harmonic 486.3 1.3400 # SOUECE3 1
bond_coeff @bond:c2-n harmonic 390.5 1.4070 # SOURCE3 9 0.0124
bond_coeff @bond:c2-n4 harmonic 309.1 1.4820 # SOURCE3 5 0.0064
bond_coeff @bond:c2-na harmonic 411.1 1.3910 # SOURCE3 31 0.0289
bond_coeff @bond:c2-nc harmonic 533.0 1.3130 # SOURCE1 99 0.0095
bond_coeff @bond:c2-nd harmonic 533.0 1.3130 # SOURCE1 99 same_as_c2-nc
bond_coeff @bond:c2-ne harmonic 597.7 1.2800 # SOURCE3 37 0.0110
bond_coeff @bond:c2-nf harmonic 597.7 1.2800 # SOURCE3 37 same_as_c2-ne
bond_coeff @bond:c2-nh harmonic 462.6 1.3550 # SOURCE3 38 0.0413
bond_coeff @bond:c2-no harmonic 345.6 1.4457 # SOURCE4 7 0.0087
bond_coeff @bond:c2-o harmonic 623.6 1.2244 # SOURCE4 15 0.0036
bond_coeff @bond:c2-oh harmonic 425.4 1.3330 # SOURCE1 53 0.0000
bond_coeff @bond:c2-os harmonic 392.6 1.3570 # SOURCE1 315 0.0097
bond_coeff @bond:c2-p2 harmonic 375.9 1.6700 # SOURCE3 62 0.0147
bond_coeff @bond:c2-p3 harmonic 246.6 1.8340 # SOURCE3 5 0.0042
bond_coeff @bond:c2-p4 harmonic 254.0 1.8220 # SOUECE3 1
bond_coeff @bond:c2-p5 harmonic 228.2 1.8658 # SOURCE4 5 0.0025
bond_coeff @bond:c2-pe harmonic 355.3 1.6910 # SOURCE3 52 0.0542
bond_coeff @bond:c2-pf harmonic 355.3 1.6910 # SOURCE3 52 same_as_c2-pe
bond_coeff @bond:c2-s2 harmonic 393.1 1.6100 # SOURCE2 1 0.0000
bond_coeff @bond:c2-s harmonic 281.5 1.7340 # SOURCE3 4 0.0034
bond_coeff @bond:c2-s4 harmonic 263.2 1.7600 # SOUECE3 1
bond_coeff @bond:c2-s6 harmonic 263.2 1.7600 # SOUECE3 1
bond_coeff @bond:c2-sh harmonic 252.0 1.7771 # SOURCE4 5 0.0037
bond_coeff @bond:c2-ss harmonic 280.0 1.7360 # SOURCE1 209 0.0155
bond_coeff @bond:c3-c3 harmonic 303.1 1.5350 # SOURCE1 14664 0.0048
bond_coeff @bond:c3-ca harmonic 323.5 1.5130 # SOURCE1 1813 0.0000
bond_coeff @bond:c3-cc harmonic 337.3 1.4990 # SOURCE3 50 0.0096
bond_coeff @bond:c3-cd harmonic 337.3 1.4990 # SOURCE3 50 0.0096
bond_coeff @bond:c3-ce harmonic 331.3 1.5050 # SOURCE3 9 0.0024
bond_coeff @bond:c3-cf harmonic 331.3 1.5050 # SOURCE3 9 same_as_c3-ce
bond_coeff @bond:c3-cl harmonic 279.0 1.7860 # SOURCE1 267 0.0194
bond_coeff @bond:c3-cu harmonic 359.4 1.4780 # SOURCE1 7 0.0000
bond_coeff @bond:c3-cv harmonic 347.6 1.4890 # SOURCE1 11 0.0000
bond_coeff @bond:c3-cx harmonic 322.5 1.5140 # SOURCE1 712 0.0045
bond_coeff @bond:c3-cy harmonic 308.5 1.5290 # SOURCE1 376 0.0000
bond_coeff @bond:c3-f harmonic 363.8 1.3440 # SOURCE1 617 0.0281
bond_coeff @bond:c3-h1 harmonic 335.9 1.0930 # SOURCE3 2175 0.0082
bond_coeff @bond:c3-h2 harmonic 326.4 1.1000 # SOURCE3 66 0.0280
bond_coeff @bond:c3-h3 harmonic 333.4 1.0948 # SOURCE4 25 0.0026
bond_coeff @bond:c3-hc harmonic 337.3 1.0920 # SOURCE3 2815 0.0059
bond_coeff @bond:c3-hx harmonic 338.7 1.0910 # SOURCE3 146 0.0066
bond_coeff @bond:c3-i harmonic 219.1 2.1620 # SOURCE1 15 0.0000
bond_coeff @bond:c3-n1 harmonic 325.1 1.4700 # SOURCE3 0
bond_coeff @bond:c3-n2 harmonic 313.8 1.4770 # SOURCE1 129 0.0138
bond_coeff @bond:c3-n harmonic 330.6 1.4600 # SOURCE1 187 0.0079
bond_coeff @bond:c3-n3 harmonic 320.6 1.4700 # SOURCE1 1678 0.0017
bond_coeff @bond:c3-n4 harmonic 293.6 1.4990 # SOURCE1 1370 0.0000
bond_coeff @bond:c3-na harmonic 334.7 1.4560 # SOURCE3 23 0.0119
bond_coeff @bond:c3-nc harmonic 334.7 1.4560 # SOURCE3 9 0.0109
bond_coeff @bond:c3-nd harmonic 334.7 1.4560 # SOURCE3 9 same_as_c3-nc
bond_coeff @bond:c3-nh harmonic 332.7 1.4580 # SOURCE3 27 0.0085
bond_coeff @bond:c3-no harmonic 265.4 1.5330 # SOURCE1 83 0.0212
bond_coeff @bond:c3-o harmonic 449.9 1.3165 # SOURCE4 8 0.0193
bond_coeff @bond:c3-oh harmonic 314.1 1.4260 # SOURCE1 914 0.0129
bond_coeff @bond:c3-os harmonic 301.5 1.4390 # SOURCE1 3123 0.0126
bond_coeff @bond:c3-p2 harmonic 234.3 1.8550 # SOURCE3 9 0.0125
bond_coeff @bond:c3-p3 harmonic 240.6 1.8440 # SOURCE3 109 0.0107
bond_coeff @bond:c3-p4 harmonic 247.2 1.8330 # SOURCE3 29 0.0138
bond_coeff @bond:c3-p5 harmonic 259.7 1.8130 # SOURCE1 84 0.0000
bond_coeff @bond:c3-px harmonic 252.7 1.8240 # SOURCE3 28 0.0098
bond_coeff @bond:c3-py harmonic 259.7 1.8130 # SOURCE3 13 0.0163
bond_coeff @bond:c3-s harmonic 212.9 1.8450 # SOURCE3 4 0.0185
bond_coeff @bond:c3-s4 harmonic 233.8 1.8070 # SOURCE1 139 0.0023
bond_coeff @bond:c3-s6 harmonic 254.0 1.7740 # SOURCE1 118 0.0103
bond_coeff @bond:c3-sh harmonic 225.3 1.8220 # SOURCE3 12 0.0051
bond_coeff @bond:c3-ss harmonic 225.8 1.8210 # SOURCE1 358 0.0075
bond_coeff @bond:c3-sx harmonic 232.6 1.8090 # SOURCE3 30 0.0067
bond_coeff @bond:c3-sy harmonic 248.9 1.7820 # SOURCE3 31 0.0039
bond_coeff @bond:ca-ca harmonic 478.4 1.3870 # SOURCE1 6228 0.0147
bond_coeff @bond:ca-cc harmonic 411.7 1.4340 # SOURCE1 80 0.0000
bond_coeff @bond:ca-cd harmonic 411.7 1.4340 # SOURCE1 80 0.0000
bond_coeff @bond:ca-ce harmonic 366.0 1.4720 # SOURCE1 71 0.0030
bond_coeff @bond:ca-cf harmonic 366.0 1.4720 # SOURCE1 71 0.0030
bond_coeff @bond:ca-cg harmonic 406.6 1.4380 # SOURCE1 71 0.0045
bond_coeff @bond:ca-ch harmonic 406.6 1.4380 # SOURCE1 71 0.0045
bond_coeff @bond:ca-cl harmonic 322.8 1.7290 # SOURCE1 704 0.0095
bond_coeff @bond:ca-cp harmonic 461.8 1.3980 # CORR 28
bond_coeff @bond:ca-cq harmonic 461.8 1.3980 # CORR 28
bond_coeff @bond:ca-cx harmonic 350.8 1.4860 # SOURCE1 98 0.0118
bond_coeff @bond:ca-cy harmonic 323.0 1.5135 # SOURCE4 8 0.0043
bond_coeff @bond:ca-f harmonic 363.8 1.3440 # SOURCE1 205 0.0089
bond_coeff @bond:ca-h4 harmonic 342.9 1.0880 # SOURCE3 57 0.0026
bond_coeff @bond:ca-h5 harmonic 347.2 1.0850 # SOURCE3 15 0.0048
bond_coeff @bond:ca-ha harmonic 344.3 1.0870 # SOURCE3 1496 0.0045
bond_coeff @bond:ca-i harmonic 252.4 2.0950 # SOURCE1 51 0.0000
bond_coeff @bond:ca-n1 harmonic 398.1 1.4000 # SOURCE3 0
bond_coeff @bond:ca-n2 harmonic 551.6 1.3030 # SOURCE4 7 0.0058
bond_coeff @bond:ca-n harmonic 372.3 1.4220 # SOURCE3 9 0.0098
bond_coeff @bond:ca-n4 harmonic 325.6 1.4650 # SOURCE1 23 0.0000
bond_coeff @bond:ca-na harmonic 470.3 1.3500 # SOURCE1 150 0.0103
bond_coeff @bond:ca-nb harmonic 483.1 1.3420 # SOURCE3 104 0.0076
bond_coeff @bond:ca-nc harmonic 492.9 1.3360 # SOURCE1 1826 0.0020
bond_coeff @bond:ca-nd harmonic 492.9 1.3360 # SOURCE1 1826 0.0020
bond_coeff @bond:ca-ne harmonic 361.8 1.4310 # SOURCE1 52 0.0000
bond_coeff @bond:ca-nf harmonic 361.8 1.4310 # SOURCE1 52 0.0000
bond_coeff @bond:ca-nh harmonic 449.0 1.3640 # SOURCE1 137 0.0085
bond_coeff @bond:ca-no harmonic 322.6 1.4680 # SOURCE1 556 0.0000
bond_coeff @bond:ca-o harmonic 610.0 1.2304 # SOURCE4 5 0.0026
bond_coeff @bond:ca-oh harmonic 386.1 1.3620 # SOURCE1 551 0.0000
bond_coeff @bond:ca-os harmonic 372.4 1.3730 # SOURCE1 1092 0.0071
bond_coeff @bond:ca-p2 harmonic 243.0 1.8400 # SOUECE3 1
bond_coeff @bond:ca-p3 harmonic 252.7 1.8240 # SOURCE1 145 0.0187
bond_coeff @bond:ca-p4 harmonic 264.3 1.8060 # SOUECE3 1
bond_coeff @bond:ca-p5 harmonic 271.6 1.7950 # SOURCE1 571 0.0028
bond_coeff @bond:ca-pe harmonic 249.6 1.8290 # SOURCE3 10 0.0042
bond_coeff @bond:ca-pf harmonic 249.6 1.8290 # SOURCE3 10 0.0042
bond_coeff @bond:ca-px harmonic 252.1 1.8250 # SOURCE3 5 0.0168
bond_coeff @bond:ca-py harmonic 268.3 1.7999 # SOURCE4 5 0.0072
bond_coeff @bond:ca-s harmonic 277.9 1.7390 # SOURCE3 2 0.0000
bond_coeff @bond:ca-s4 harmonic 245.2 1.7880 # SOURCE1 51 0.0048
bond_coeff @bond:ca-s6 harmonic 263.9 1.7590 # SOURCE1 229 0.0036
bond_coeff @bond:ca-sh harmonic 251.3 1.7783 # SOURCE4 12 0.0041
bond_coeff @bond:ca-ss harmonic 256.6 1.7700 # SOURCE1 297 0.0041
bond_coeff @bond:ca-sx harmonic 223.5 1.8252 # SOURCE4 24 0.0032
bond_coeff @bond:ca-sy harmonic 247.7 1.7840 # SOURCE3 13 0.0094
bond_coeff @bond:c-c1 harmonic 379.8 1.4600 # SOUECE3 1
bond_coeff @bond:c-c2 harmonic 449.9 1.4060 # SOURCE3 2 0.0370
bond_coeff @bond:c-c harmonic 290.1 1.5500 # SOURCE1 31 0.0100
bond_coeff @bond:c-c3 harmonic 328.3 1.5080 # SOURCE1 2949 0.0060
bond_coeff @bond:c-ca harmonic 349.7 1.4870 # SOURCE1 480 0.0055
bond_coeff @bond:c-cc harmonic 377.4 1.4620 # SOURCE3 132 0.0210
bond_coeff @bond:cc-cc harmonic 418.3 1.4290 # SOURCE1 740 0.0069
bond_coeff @bond:cc-cd harmonic 504.0 1.3710 # SOURCE3 523 0.0217
bond_coeff @bond:cc-ce harmonic 387.9 1.4532 # CORR 249
bond_coeff @bond:cc-cf harmonic 511.3 1.3666 # CORR 70
bond_coeff @bond:cc-cg harmonic 420.9 1.4270 # SOURCE1 560 0.0000
bond_coeff @bond:cc-ch harmonic 420.9 1.4270 # SOURCE1 560 0.0000
bond_coeff @bond:cc-cl harmonic 317.1 1.7359 # CORR 66
bond_coeff @bond:cc-cx harmonic 366.6 1.4715 # CORR 24
bond_coeff @bond:c-cd harmonic 377.4 1.4620 # SOURCE3 132 0.0210
bond_coeff @bond:c-ce harmonic 363.8 1.4740 # SOURCE1 601 0.0105
bond_coeff @bond:c-cf harmonic 363.8 1.4740 # SOURCE1 601 0.0105
bond_coeff @bond:cc-f harmonic 368.6 1.3401 # SOURCE4 24 0.0034
bond_coeff @bond:c-cg harmonic 389.3 1.4520 # SOURCE3 2 0.0000
bond_coeff @bond:c-ch harmonic 389.3 1.4520 # SOURCE3 2 same_as_c-cg
bond_coeff @bond:cc-h4 harmonic 350.1 1.0830 # SOURCE3 599 0.0037
bond_coeff @bond:cc-h5 harmonic 356.0 1.0790 # SOURCE3 40 0.0051
bond_coeff @bond:cc-ha harmonic 347.2 1.0850 # SOURCE3 740 0.0039
bond_coeff @bond:c-cl harmonic 293.5 1.7660 # SOURCE3 6 0.0250
bond_coeff @bond:cc-n2 harmonic 573.8 1.2917 # CORR 81
bond_coeff @bond:cc-n harmonic 426.0 1.3800 # SOURCE3 56 0.0109
bond_coeff @bond:cc-n4 harmonic 299.0 1.4930 # SOURCE4 7 0.0148
bond_coeff @bond:cc-na harmonic 438.8 1.3710 # SOURCE3 440 0.0144
bond_coeff @bond:cc-nc harmonic 431.6 1.3760 # SOURCE1 88 0.0000
bond_coeff @bond:cc-nd harmonic 494.6 1.3350 # SOURCE3 203 0.0239
bond_coeff @bond:cc-ne harmonic 427.4 1.3790 # SOURCE4 30 0.0126
bond_coeff @bond:cc-nf harmonic 565.4 1.2960 # CORR 23
bond_coeff @bond:cc-nh harmonic 449.0 1.3640 # SOURCE3 6 0.0040
bond_coeff @bond:cc-no harmonic 367.4 1.4262 # SOURCE4 133 0.0061
bond_coeff @bond:cc-oh harmonic 408.5 1.3451 # CORR 121
bond_coeff @bond:cc-os harmonic 376.1 1.3700 # SOURCE3 86 0.0192
bond_coeff @bond:cc-pd harmonic 318.2 1.7330 # SOURCE3 84 0.0161
bond_coeff @bond:cc-sh harmonic 257.9 1.7681 # SOURCE4 8 0.0027
bond_coeff @bond:cc-ss harmonic 279.3 1.7370 # SOURCE3 52 0.0194
bond_coeff @bond:cc-sx harmonic 231.3 1.8113 # SOURCE4 16 0.0050
bond_coeff @bond:cc-sy harmonic 248.1 1.7834 # CORR 55
bond_coeff @bond:c-cu harmonic 441.4 1.4120 # SOURCE2 1 0.0000
bond_coeff @bond:c-cx harmonic 350.8 1.4860 # SOURCE1 105 0.0000
bond_coeff @bond:c-cy harmonic 308.5 1.5290 # SOURCE1 18 0.0000
bond_coeff @bond:cd-cd harmonic 418.3 1.4290 # SOURCE1 740 0.0069
bond_coeff @bond:cd-ce harmonic 511.3 1.3666 # CORR 70
bond_coeff @bond:cd-cf harmonic 387.9 1.4532 # CORR 249
bond_coeff @bond:cd-cg harmonic 420.9 1.4270 # SOURCE1 560 0.0000
bond_coeff @bond:cd-ch harmonic 420.9 1.4270 # SOURCE1 560 0.0000
bond_coeff @bond:cd-cl harmonic 317.1 1.7359 # CORR 66
bond_coeff @bond:cd-cx harmonic 366.6 1.4715 # CORR 24
bond_coeff @bond:cd-cy harmonic 330.9 1.5054 # SOURCE4 10 0.0008
bond_coeff @bond:cd-h4 harmonic 350.1 1.0830 # SOURCE3 599 0.0037
bond_coeff @bond:cd-h5 harmonic 356.0 1.0790 # SOURCE3 40 0.0051
bond_coeff @bond:cd-ha harmonic 347.2 1.0850 # SOURCE3 740 0.0039
bond_coeff @bond:cd-n2 harmonic 573.8 1.2917 # CORR 81
bond_coeff @bond:cd-n harmonic 426.0 1.3800 # SOURCE3 56 0.0109
bond_coeff @bond:cd-na harmonic 438.8 1.3710 # SOURCE3 440 0.0144
bond_coeff @bond:cd-nc harmonic 494.6 1.3350 # SOURCE3 203 0.0239
bond_coeff @bond:cd-nd harmonic 431.6 1.3760 # SOURCE1 88 0.0000
bond_coeff @bond:cd-ne harmonic 565.4 1.2960 # CORR 23
bond_coeff @bond:cd-nh harmonic 449.0 1.3640 # SOURCE3 6 0.0040
bond_coeff @bond:cd-oh harmonic 408.5 1.3451 # CORR 121
bond_coeff @bond:cd-os harmonic 376.1 1.3700 # SOURCE3 86 0.0192
bond_coeff @bond:cd-pc harmonic 318.2 1.7330 # SOURCE3 84 same_as_cc-pd
bond_coeff @bond:cd-ss harmonic 279.3 1.7370 # SOURCE3 52 0.0194
bond_coeff @bond:cd-sy harmonic 248.1 1.7834 # CORR 55
bond_coeff @bond:ce-ce harmonic 390.5 1.4510 # SOURCE1 66 0.0060
bond_coeff @bond:ce-cf harmonic 562.4 1.3380 # SOURCE1 543 0.0045
bond_coeff @bond:ce-cg harmonic 415.6 1.4310 # SOURCE1 22 0.0000
bond_coeff @bond:ce-ch harmonic 415.6 1.4310 # SOURCE1 22 0.0000
bond_coeff @bond:ce-cl harmonic 292.6 1.7671 # SOURCE4 24 0.0062
bond_coeff @bond:ce-cx harmonic 337.0 1.4993 # SOURCE4 5 0.0066
bond_coeff @bond:ce-cy harmonic 323.0 1.5135 # SOURCE4 17 0.0024
bond_coeff @bond:ce-h4 harmonic 337.4 1.0919 # CORR 144
bond_coeff @bond:ce-ha harmonic 341.5 1.0890 # SOURCE3 55 0.0056
bond_coeff @bond:ce-n1 harmonic 536.1 1.3113 # CORR 13
bond_coeff @bond:ce-n2 harmonic 599.8 1.2790 # SOURCE1 75 0.0000
bond_coeff @bond:ce-n harmonic 368.9 1.4249 # CORR 136
bond_coeff @bond:ce-na harmonic 373.8 1.4207 # SOURCE4 5 0.0051
bond_coeff @bond:ce-ne harmonic 381.8 1.4140 # SOURCE3 7 0.0103
bond_coeff @bond:ce-nf harmonic 574.0 1.2916 # CORR 42
bond_coeff @bond:ce-nh harmonic 412.3 1.3901 # CORR 168
bond_coeff @bond:ce-oh harmonic 402.9 1.3493 # CORR 37
bond_coeff @bond:ce-os harmonic 372.8 1.3727 # CORR 45
bond_coeff @bond:ce-p2 harmonic 259.1 1.8140 # SOUECE3 1
bond_coeff @bond:ce-pe harmonic 256.5 1.8180 # SOURCE3 8 0.0108
bond_coeff @bond:ce-px harmonic 254.6 1.8210 # SOURCE3 6 0.0046
bond_coeff @bond:ce-py harmonic 272.3 1.7940 # SOURCE3 5 0.0045
bond_coeff @bond:ce-s harmonic 324.5 1.6800 # SOUECE3 1
bond_coeff @bond:ce-ss harmonic 243.6 1.7906 # SOURCE4 10 0.0064
bond_coeff @bond:ce-sx harmonic 239.7 1.7970 # SOURCE3 5 0.0082
bond_coeff @bond:ce-sy harmonic 248.9 1.7820 # SOURCE3 5 0.0114
bond_coeff @bond:c-f harmonic 387.9 1.3250 # SOURCE2 6 0.0147
bond_coeff @bond:cf-cf harmonic 390.5 1.4510 # SOURCE1 66 0.0060
bond_coeff @bond:cf-cg harmonic 415.6 1.4310 # SOURCE1 22 0.0000
bond_coeff @bond:cf-ch harmonic 415.6 1.4310 # SOURCE1 22 0.0000
bond_coeff @bond:cf-h4 harmonic 337.4 1.0919 # CORR 144
bond_coeff @bond:cf-ha harmonic 341.5 1.0890 # SOURCE3 55 0.0056
bond_coeff @bond:cf-n1 harmonic 536.1 1.3113 # CORR 13
bond_coeff @bond:cf-n2 harmonic 599.8 1.2790 # SOURCE1 75 same_as_ce-n2
bond_coeff @bond:cf-n harmonic 368.9 1.4249 # CORR 136
bond_coeff @bond:cf-ne harmonic 574.0 1.2916 # CORR 42
bond_coeff @bond:cf-nf harmonic 381.8 1.4140 # SOURCE3 7 same_as_ce-ne
bond_coeff @bond:cf-nh harmonic 412.3 1.3901 # CORR 168
bond_coeff @bond:cf-oh harmonic 402.9 1.3493 # CORR 37
bond_coeff @bond:cf-os harmonic 372.8 1.3727 # CORR 45
bond_coeff @bond:cf-p2 harmonic 259.1 1.8140 # SOUECE3 1 same_as_ce-p2
bond_coeff @bond:cf-pf harmonic 256.5 1.8180 # SOURCE3 8 same_as_ce-pe
bond_coeff @bond:cf-px harmonic 254.6 1.8210 # SOURCE3 6 same_as_ce-px
bond_coeff @bond:cf-py harmonic 272.3 1.7940 # SOURCE3 5 same_as_ce-py
bond_coeff @bond:cf-s harmonic 324.5 1.6800 # SOUECE3 1 same_as_ce-s
bond_coeff @bond:cf-sx harmonic 239.7 1.7970 # SOURCE3 5 same_as_ce-sx
bond_coeff @bond:cf-sy harmonic 248.9 1.7820 # SOURCE3 5 same_as_ce-sy
bond_coeff @bond:cg-cg harmonic 494.2 1.3770 # SOURCE1 42 0.0000
bond_coeff @bond:cg-ch harmonic 949.5 1.1910 # SOURCE1 80 0.0015
bond_coeff @bond:cg-n1 harmonic 994.7 1.1430 # SOURCE1 316 0.0018
bond_coeff @bond:cg-ne harmonic 509.5 1.3262 # SOURCE4 17 0.0009
bond_coeff @bond:cg-pe harmonic 429.8 1.6210 # SOURCE3 11 0.2008
bond_coeff @bond:c-h4 harmonic 310.5 1.1123 # SOURCE4 125 0.0023
bond_coeff @bond:c-h5 harmonic 319.4 1.1053 # SOURCE4 42 0.0028
bond_coeff @bond:c-ha harmonic 325.1 1.1010 # SOURCE3 53 0.0102
bond_coeff @bond:ch-ch harmonic 494.2 1.3770 # SOURCE1 42 0.0000
bond_coeff @bond:ch-n1 harmonic 994.7 1.1430 # SOURCE1 316 0.0018
bond_coeff @bond:ch-nf harmonic 509.5 1.3262 # SOURCE4 17 same_as_cg-ne
bond_coeff @bond:ch-pf harmonic 429.8 1.6210 # SOURCE3 11 same_as_cg-pe
bond_coeff @bond:c-i harmonic 198.9 2.2090 # SOURCE3 4 0.0365
bond_coeff @bond:cl-cl harmonic 143.3 2.2670 # SOURCE1 2 0.0395
bond_coeff @bond:cl-cx harmonic 301.8 1.7550 # SOURCE1 64 0.0000
bond_coeff @bond:cl-cy harmonic 292.0 1.7680 # SOURCE2 2 0.0070
bond_coeff @bond:cl-f harmonic 298.6 1.6480 # SOURCE2 2 0.0500
bond_coeff @bond:cl-i harmonic 163.5 2.5500 # SOURCE1 6 0.0893
bond_coeff @bond:cl-n1 harmonic 431.6 1.6300 # SOUECE3 1
bond_coeff @bond:cl-n2 harmonic 263.4 1.8190 # SOURCE3 6 0.1020
bond_coeff @bond:cl-n3 harmonic 290.4 1.7800 # SOURCE4 5 0.0021
bond_coeff @bond:cl-n harmonic 344.2 1.7140 # SOURCE4 5 0.0005
bond_coeff @bond:cl-n4 harmonic 311.1 1.7530 # SOURCE3 4 0.0098
bond_coeff @bond:cl-na harmonic 253.2 1.8350 # SOURCE3 7 0.2083
bond_coeff @bond:cl-nh harmonic 303.2 1.7630 # SOURCE3 1 0.0000
bond_coeff @bond:cl-no harmonic 250.1 1.8400 # SOURCE2 1 0.0000
bond_coeff @bond:cl-o harmonic 557.6 1.4830 # SOURCE3 4 0.0000
bond_coeff @bond:cl-oh harmonic 309.7 1.6900 # SOURCE2 1 0.0000
bond_coeff @bond:cl-os harmonic 278.8 1.7300 # SOURCE3 4 0.0000
bond_coeff @bond:cl-p2 harmonic 217.5 2.0700 # SOURCE3 6 0.0108
bond_coeff @bond:cl-p3 harmonic 249.4 2.0080 # SOURCE1 111 0.0000
bond_coeff @bond:cl-p4 harmonic 249.4 2.0080 # SOURCE1 111 0.0000
bond_coeff @bond:cl-p5 harmonic 249.4 2.0080 # SOURCE1 111 0.0000
bond_coeff @bond:cl-pb harmonic 255.6 1.9970 # SOURCE1 46 0.0000
bond_coeff @bond:cl-s harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-s2 harmonic 172.7 2.1610 # SOURCE2 1 0.0000
bond_coeff @bond:cl-s4 harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-s6 harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-sh harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-ss harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-sx harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:cl-sy harmonic 208.7 2.0720 # SOURCE1 6 0.0000
bond_coeff @bond:c-n2 harmonic 374.6 1.4200 # SOUECE3 1
bond_coeff @bond:c-n4 harmonic 255.5 1.5460 # SOURCE3 4 0.0388
bond_coeff @bond:c-n harmonic 478.2 1.3450 # SOURCE1 1235 0.0215
bond_coeff @bond:c-nc harmonic 412.1 1.3906 # CORR 124
bond_coeff @bond:c-nd harmonic 412.1 1.3906 # CORR 124
bond_coeff @bond:c-ne harmonic 408.2 1.3932 # CORR 52
bond_coeff @bond:c-nf harmonic 408.2 1.3932 # CORR 52
bond_coeff @bond:c-no harmonic 260.1 1.5400 # SOUECE3 1
bond_coeff @bond:c-o harmonic 648.0 1.2140 # SOURCE1 3682 0.0165
bond_coeff @bond:c-oh harmonic 466.4 1.3060 # SOURCE1 271 0.0041
bond_coeff @bond:c-os harmonic 411.3 1.3430 # SOURCE1 1044 0.0171
bond_coeff @bond:c-p2 harmonic 210.3 1.9000 # SOUECE3 1
bond_coeff @bond:c-p3 harmonic 219.0 1.8830 # SOURCE3 6 0.0129
bond_coeff @bond:c-p4 harmonic 220.6 1.8800 # SOUECE3 1
bond_coeff @bond:c-p5 harmonic 219.8 1.8815 # SOURCE4 11 0.0078
bond_coeff @bond:cp-cp harmonic 346.5 1.4900 # SOURCE1 242 0.0010
bond_coeff @bond:cp-cq harmonic 419.3 1.4282 # SOURCE4 7 0.0034
bond_coeff @bond:c-pe harmonic 204.9 1.9110 # SOURCE3 3 0.0025
bond_coeff @bond:c-pf harmonic 204.9 1.9110 # SOURCE3 3 same_as_c-pe
bond_coeff @bond:cp-na harmonic 420.5 1.3840 # SOURCE4 7 0.0181
bond_coeff @bond:cp-nb harmonic 486.7 1.3398 # SOURCE4 70 0.0062
bond_coeff @bond:c-px harmonic 208.3 1.9040 # SOURCE3 1 0.0000
bond_coeff @bond:c-py harmonic 227.6 1.8670 # SOURCE3 6 0.0199
bond_coeff @bond:cq-cq harmonic 346.5 1.4900 # SOURCE1 242 0.0010
bond_coeff @bond:c-s harmonic 328.9 1.6750 # SOURCE1 401 0.0128
bond_coeff @bond:c-s4 harmonic 200.4 1.8700 # SOUECE3 1
bond_coeff @bond:c-s6 harmonic 200.4 1.8700 # SOUECE3 1
bond_coeff @bond:c-sh harmonic 249.6 1.7810 # SOURCE3 6 0.0171
bond_coeff @bond:c-ss harmonic 261.9 1.7620 # SOURCE1 20 0.0000
bond_coeff @bond:c-sx harmonic 193.3 1.8850 # SOURCE3 5 0.0088
bond_coeff @bond:c-sy harmonic 202.8 1.8650 # SOURCE3 5 0.0085
bond_coeff @bond:cu-cu harmonic 653.7 1.2940 # SOURCE1 10 0.0000
bond_coeff @bond:cu-cx harmonic 327.3 1.5090 # SOURCE1 20 0.0000
bond_coeff @bond:cu-ha harmonic 353.0 1.0810 # SOURCE2 3 0.0111
bond_coeff @bond:cv-cv harmonic 568.1 1.3350 # SOURCE1 25 0.0000
bond_coeff @bond:cv-cy harmonic 323.5 1.5130 # SOURCE1 50 0.0000
bond_coeff @bond:cv-ha harmonic 344.3 1.0870 # SOURCE3 2 0.0000
bond_coeff @bond:cx-cv harmonic 328.3 1.5080 # SOURCE1 2536 as
bond_coeff @bond:cx-cx harmonic 337.3 1.4990 # SOURCE1 1204 0.0183
bond_coeff @bond:cx-cy harmonic 321.5 1.5150 # SOURCE3 2 0.0000
bond_coeff @bond:cx-f harmonic 347.2 1.3580 # SOURCE2 3 0.0050
bond_coeff @bond:cx-h1 harmonic 344.3 1.0870 # SOURCE3 10 0.0017
bond_coeff @bond:cx-h2 harmonic 350.1 1.0830 # SOURCE3 2 0.0000
bond_coeff @bond:cx-hc harmonic 345.8 1.0860 # SOURCE3 44 0.0011
bond_coeff @bond:cx-hx harmonic 347.2 1.0850 # SOURCE4 5 0.0002
bond_coeff @bond:cx-n2 harmonic 309.1 1.4820 # SOURCE3 2 0.0000
bond_coeff @bond:cx-n3 harmonic 318.7 1.4720 # SOURCE1 134 0.0000
bond_coeff @bond:cx-n harmonic 350.6 1.4411 # SOURCE4 11 0.0092
bond_coeff @bond:cx-na harmonic 329.0 1.4616 # SOURCE4 11 0.0016
bond_coeff @bond:cx-nh harmonic 336.7 1.4541 # SOURCE4 83 0.0076
bond_coeff @bond:cx-oh harmonic 387.4 1.3610 # SOURCE3 3 0.0018
bond_coeff @bond:cx-os harmonic 320.1 1.4200 # SOURCE3 7 0.0222
bond_coeff @bond:cx-p3 harmonic 227.6 1.8670 # SOURCE2 1 0.0000
bond_coeff @bond:cx-s4 harmonic 225.3 1.8220 # SOURCE2 1 0.0000
bond_coeff @bond:cx-s6 harmonic 283.7 1.7310 # SOURCE2 1 0.0000
bond_coeff @bond:cx-ss harmonic 229.2 1.8150 # SOURCE2 1 0.0000
bond_coeff @bond:cy-cy harmonic 286.8 1.5540 # SOURCE1 742 0.0041
bond_coeff @bond:cy-f harmonic 355.5 1.3509 # SOURCE4 8 0.0047
bond_coeff @bond:cy-h1 harmonic 330.4 1.0970 # SOURCE3 17 0.0058
bond_coeff @bond:cy-h2 harmonic 335.8 1.0931 # SOURCE4 80 0.0019
bond_coeff @bond:cy-hc harmonic 334.5 1.0940 # SOURCE3 63 0.0014
bond_coeff @bond:cy-n harmonic 321.3 1.4693 # SOURCE4 250 0.0102
bond_coeff @bond:cy-n3 harmonic 307.2 1.4840 # SOURCE1 21 0.0000
bond_coeff @bond:cy-oh harmonic 325.2 1.4150 # SOURCE3 2 0.0000
bond_coeff @bond:cy-os harmonic 308.6 1.4316 # SOURCE4 23 0.0136
bond_coeff @bond:cy-s6 harmonic 209.6 1.8514 # SOURCE4 9 0.0166
bond_coeff @bond:cy-ss harmonic 211.3 1.8481 # SOURCE4 78 0.0080
bond_coeff @bond:cz-nh harmonic 487.8 1.3391 # SOURCE4 32 0.0045
bond_coeff @bond:f-n1 harmonic 375.7 1.4100 # SOUECE3 1
bond_coeff @bond:f-n2 harmonic 337.5 1.4440 # SOURCE3 5 0.0377
bond_coeff @bond:f-n3 harmonic 380.6 1.4060 # SOURCE1 9 0.0000
bond_coeff @bond:f-n harmonic 391.7 1.3970 # SOURCE3 3 0.0112
bond_coeff @bond:f-n4 harmonic 526.8 1.3080 # SOURCE3 2 0.0000
bond_coeff @bond:f-na harmonic 374.5 1.4110 # SOURCE3 7 0.0611
bond_coeff @bond:f-nh harmonic 357.1 1.4260 # SOURCE3 3 0.0085
bond_coeff @bond:f-no harmonic 314.4 1.4670 # SOURCE2 1 0.0000
bond_coeff @bond:f-o harmonic 442.2 1.3300 # SOUECE3 1
bond_coeff @bond:f-oh harmonic 305.4 1.4440 # SOURCE3 1 0.0000
bond_coeff @bond:f-os harmonic 326.2 1.4230 # SOURCE3 2 0.0000
bond_coeff @bond:f-p2 harmonic 287.3 1.5360 # SOURCE3 7 0.2054
bond_coeff @bond:f-p3 harmonic 254.5 1.5780 # SOURCE2 8 0.0103
bond_coeff @bond:f-p4 harmonic 246.0 1.5900 # SOUECE3 1
bond_coeff @bond:f-p5 harmonic 253.8 1.5790 # SOURCE1 72 0.0000
bond_coeff @bond:f-s2 harmonic 244.4 1.6430 # SOURCE2 1 0.0000
bond_coeff @bond:f-s harmonic 233.3 1.6600 # SOUECE3 1
bond_coeff @bond:f-s4 harmonic 282.4 1.5910 # SOURCE2 4 0.0065
bond_coeff @bond:f-s6 harmonic 312.1 1.5560 # SOURCE2 5 0.0220
bond_coeff @bond:f-sh harmonic 240.4 1.6490 # SOURCE3 1 0.0000
bond_coeff @bond:f-ss harmonic 250.5 1.6340 # SOURCE3 3 0.0156
bond_coeff @bond:hn-n1 harmonic 455.1 0.9860 # SOURCE2 1 0.0000
bond_coeff @bond:hn-n2 harmonic 375.5 1.0290 # SOURCE3 108 0.0096
bond_coeff @bond:hn-n3 harmonic 394.1 1.0180 # SOURCE3 157 0.0086
bond_coeff @bond:hn-n harmonic 410.2 1.0090 # SOURCE3 149 0.0098
bond_coeff @bond:hn-n4 harmonic 369.0 1.0330 # SOURCE3 264 0.0082
bond_coeff @bond:hn-na harmonic 406.6 1.0110 # SOURCE3 46 0.0107
bond_coeff @bond:hn-nh harmonic 401.2 1.0140 # SOURCE3 209 0.0091
bond_coeff @bond:hn-no harmonic 385.6 1.0230 # SOURCE3 1 0.0000
bond_coeff @bond:ho-o harmonic 357.9 0.9810 # SOURCE3 1 0.0000
bond_coeff @bond:ho-oh harmonic 369.6 0.9740 # SOURCE3 367 0.0105
bond_coeff @bond:hp-p2 harmonic 385.1 1.3360 # SOURCE3 87 0.1706
bond_coeff @bond:hp-p3 harmonic 303.1 1.4090 # SOURCE3 101 0.0617
bond_coeff @bond:hp-p4 harmonic 368.7 1.3490 # SOURCE3 17 0.1577
bond_coeff @bond:hp-p5 harmonic 305.0 1.4070 # SOURCE3 7 0.0062
bond_coeff @bond:hs-s harmonic 286.4 1.3530 # SOURCE3 1 0.0000
bond_coeff @bond:hs-s4 harmonic 266.4 1.3750 # SOURCE3 5 0.0004
bond_coeff @bond:hs-s6 harmonic 280.8 1.3590 # SOURCE3 5 0.0015
bond_coeff @bond:hs-sh harmonic 302.2 1.3370 # SOURCE3 98 0.0486
bond_coeff @bond:i-i harmonic 109.2 2.9170 # SOURCE1 1 0.0000
bond_coeff @bond:i-n1 harmonic 302.1 2.0600 # SOUECE3 1
bond_coeff @bond:i-n2 harmonic 182.6 2.3040 # SOURCE3 6 0.1186
bond_coeff @bond:i-n harmonic 278.3 2.0980 # SOURCE3 5 0.0156
bond_coeff @bond:i-n3 harmonic 231.8 2.1850 # SOURCE3 3 0.0437
bond_coeff @bond:i-n4 harmonic 246.6 2.1550 # SOURCE3 3 0.0168
bond_coeff @bond:i-na harmonic 260.5 2.1290 # SOURCE3 8 0.1276
bond_coeff @bond:i-nh harmonic 249.2 2.1500 # SOURCE3 1 0.0000
bond_coeff @bond:i-no harmonic 211.0 2.2310 # SOURCE3 1 0.0000
bond_coeff @bond:i-o harmonic 323.8 1.9800 # SOUECE3 1
bond_coeff @bond:i-oh harmonic 247.9 2.1010 # SOURCE3 2 0.0000
bond_coeff @bond:i-os harmonic 233.6 2.1290 # SOURCE3 3 0.0146
bond_coeff @bond:i-p2 harmonic 108.2 2.6430 # SOURCE3 6 0.0297
bond_coeff @bond:i-p3 harmonic 123.6 2.5660 # SOURCE3 3 0.0016
bond_coeff @bond:i-p4 harmonic 183.0 2.3520 # SOURCE3 4 0.2600
bond_coeff @bond:i-p5 harmonic 117.3 2.5960 # SOURCE3 3 0.0143
bond_coeff @bond:i-s harmonic 175.1 2.4300 # SOUECE3 1
bond_coeff @bond:i-s4 harmonic 82.8 2.8700 # SOUECE3 1
bond_coeff @bond:i-s6 harmonic 82.8 2.8700 # SOURCE3 1 0.0000
bond_coeff @bond:i-sh harmonic 138.5 2.5600 # SOUECE3 1
bond_coeff @bond:i-ss harmonic 135.9 2.5710 # SOURCE3 3 0.0065
bond_coeff @bond:n1-n1 harmonic 1221.7 1.1240 # SOURCE1 19 0.0000
bond_coeff @bond:n1-n2 harmonic 857.4 1.2160 # SOURCE1 19 0.0000
bond_coeff @bond:n1-n3 harmonic 535.7 1.3500 # SOUECE3 1
bond_coeff @bond:n1-n4 harmonic 518.2 1.3600 # SOUECE3 1
bond_coeff @bond:n1-na harmonic 535.7 1.3500 # SOUECE3 1
bond_coeff @bond:n1-nc harmonic 857.4 1.2160 # SOURCE1 38 0.0000
bond_coeff @bond:n1-nd harmonic 857.4 1.2160 # SOURCE1 38 0.0000
bond_coeff @bond:n1-ne harmonic 751.9 1.2520 # SOURCE2 1 0.0000
bond_coeff @bond:n1-nf harmonic 751.9 1.2520 # SOURCE2 1 same_as_n1-ne
bond_coeff @bond:n1-nh harmonic 553.9 1.3400 # SOUECE3 1
bond_coeff @bond:n1-no harmonic 454.8 1.4000 # SOUECE3 1
bond_coeff @bond:n1-o harmonic 617.5 1.2770 # SOURCE3 5 0.0438
bond_coeff @bond:n1-oh harmonic 569.8 1.3000 # SOUECE3 1
bond_coeff @bond:n1-os harmonic 550.5 1.3100 # SOUECE3 1
bond_coeff @bond:n1-p2 harmonic 358.8 1.6780 # SOURCE3 2 0.0282
bond_coeff @bond:n1-p3 harmonic 376.7 1.6600 # SOUECE3 1
bond_coeff @bond:n1-p4 harmonic 353.0 1.6800 # SOURCE3 0
bond_coeff @bond:n1-p5 harmonic 482.7 1.5710 # SOURCE1 132 0.0000
bond_coeff @bond:n1-s2 harmonic 604.3 1.4490 # SOURCE2 2 0.0010
bond_coeff @bond:n1-s harmonic 328.7 1.6590 # SOURCE3 6 0.0789
bond_coeff @bond:n1-s4 harmonic 336.8 1.6500 # SOUECE3 1
bond_coeff @bond:n1-s6 harmonic 670.3 1.4160 # SOURCE2 2 0.0000
bond_coeff @bond:n1-sh harmonic 376.1 1.6100 # SOUECE3 1
bond_coeff @bond:n1-ss harmonic 376.1 1.6100 # SOUECE3 1
bond_coeff @bond:n2-n2 harmonic 702.7 1.2710 # SOURCE3 27 0.0347
bond_coeff @bond:n2-n3 harmonic 574.8 1.3290 # SOURCE2 1 0.0000
bond_coeff @bond:n2-n4 harmonic 200.8 1.6790 # SOURCE3 7 0.3138
bond_coeff @bond:n2-na harmonic 503.9 1.3685 # SOURCE4 18 0.0066
bond_coeff @bond:n2-nc harmonic 743.9 1.2550 # SOURCE1 13 0.0000
bond_coeff @bond:n2-nd harmonic 743.9 1.2550 # SOURCE1 13 same_as_n2_nc
bond_coeff @bond:n2-ne harmonic 685.5 1.2780 # SOURCE3 30 0.0302
bond_coeff @bond:n2-nf harmonic 685.5 1.2780 # SOURCE3 30 same_as_n2-ne
bond_coeff @bond:n2-nh harmonic 525.1 1.3560 # SOURCE3 22 0.0300
bond_coeff @bond:n2-no harmonic 231.9 1.6260 # SOURCE3 4 0.1933
bond_coeff @bond:n2-o harmonic 789.9 1.2090 # SOURCE3 20 0.0344
bond_coeff @bond:n2-oh harmonic 416.2 1.3940 # SOURCE1 67 0.0000
bond_coeff @bond:n2-os harmonic 400.5 1.4060 # SOURCE3 10 0.0147
bond_coeff @bond:n2-p2 harmonic 438.3 1.6050 # SOURCE3 35 0.0737
bond_coeff @bond:n2-p3 harmonic 286.5 1.7640 # SOURCE3 7 0.0374
bond_coeff @bond:n2-p4 harmonic 317.7 1.7240 # SOUECE3 1
bond_coeff @bond:n2-p5 harmonic 445.8 1.5990 # SOURCE1 7 0.0000
bond_coeff @bond:n2-pe harmonic 527.9 1.5400 # SOURCE3 20 0.1392
bond_coeff @bond:n2-pf harmonic 527.9 1.5400 # SOURCE3 20 same_as_n2-pe
bond_coeff @bond:n2-s2 harmonic 499.0 1.5120 # SOURCE2 1 0.0000
bond_coeff @bond:n2-s4 harmonic 376.1 1.6100 # SOUECE3 1
bond_coeff @bond:n2-s harmonic 458.1 1.5410 # SOURCE1 37 0.0000
bond_coeff @bond:n2-s6 harmonic 444.6 1.5513 # SOURCE4 5 0.0011
bond_coeff @bond:n2-sh harmonic 266.6 1.7380 # SOURCE3 5 0.0511
bond_coeff @bond:n2-ss harmonic 331.4 1.6560 # SOURCE1 36 0.0000
bond_coeff @bond:n3-n3 harmonic 383.6 1.4540 # SOURCE1 44 0.0000
bond_coeff @bond:n3-n4 harmonic 434.9 1.4140 # SOURCE1 13 0.0000
bond_coeff @bond:n3-na harmonic 426.7 1.4200 # SOURCE1 68 0.0000
bond_coeff @bond:n3-nh harmonic 426.7 1.4200 # SOURCE1 68 0.0000
bond_coeff @bond:n3-no harmonic 394.5 1.4450 # SOURCE3 3 0.0208
bond_coeff @bond:n3-o harmonic 564.0 1.3030 # SOURCE3 4 0.1217
bond_coeff @bond:n3-oh harmonic 413.5 1.3960 # SOURCE1 28 0.0000
bond_coeff @bond:n3-os harmonic 359.6 1.4400 # SOURCE1 34 0.0315
bond_coeff @bond:n3-p2 harmonic 366.6 1.6700 # SOUECE3 1
bond_coeff @bond:n3-p3 harmonic 312.8 1.7300 # SOURCE1 40 0.0000
bond_coeff @bond:n3-p4 harmonic 341.1 1.6970 # SOURCE1 88 0.0000
bond_coeff @bond:n3-p5 harmonic 373.6 1.6630 # SOURCE1 501 0.0086
bond_coeff @bond:n3-py harmonic 338.1 1.7003 # SOURCE4 6 0.0044
bond_coeff @bond:n3-s harmonic 232.3 1.7920 # SOURCE3 3 0.0178
bond_coeff @bond:n3-s4 harmonic 251.3 1.7610 # SOURCE3 6 0.0766
bond_coeff @bond:n3-s6 harmonic 353.8 1.6320 # SOURCE1 99 0.0136
bond_coeff @bond:n3-sh harmonic 265.9 1.7390 # SOURCE3 3 0.0154
bond_coeff @bond:n3-ss harmonic 277.9 1.7220 # SOURCE3 5 0.0207
bond_coeff @bond:n3-sy harmonic 297.3 1.6964 # SOURCE4 226 0.0081
bond_coeff @bond:n4-n4 harmonic 349.9 1.4840 # SOURCE3 4 0.0089
bond_coeff @bond:n4-na harmonic 407.0 1.4350 # SOURCE3 9 0.0390
bond_coeff @bond:n4-nh harmonic 369.7 1.4660 # SOURCE3 5 0.0108
bond_coeff @bond:n4-no harmonic 354.2 1.4800 # SOUECE3 1
bond_coeff @bond:n4-o harmonic 463.6 1.3610 # SOURCE3 3 0.0041
bond_coeff @bond:n4-oh harmonic 408.2 1.4000 # SOURCE3 3 0.0115
bond_coeff @bond:n4-os harmonic 381.8 1.4210 # SOURCE3 5 0.0249
bond_coeff @bond:n4-p2 harmonic 185.9 1.9420 # SOURCE3 10 0.0643
bond_coeff @bond:n4-p3 harmonic 215.1 1.8800 # SOURCE3 5 0.0146
bond_coeff @bond:n4-p4 harmonic 187.6 1.9380 # SOURCE3 1 0.0000
bond_coeff @bond:n4-p5 harmonic 242.9 1.8300 # SOURCE3 5 0.0087
bond_coeff @bond:n4-py harmonic 204.2 1.9020 # SOURCE3 4 0.0000
bond_coeff @bond:n4-s harmonic 210.3 1.8320 # SOURCE3 3 0.0004
bond_coeff @bond:n4-s4 harmonic 151.0 1.9720 # SOURCE3 3 0.0198
bond_coeff @bond:n4-s6 harmonic 172.7 1.9140 # SOURCE3 5 0.0432
bond_coeff @bond:n4-sh harmonic 221.5 1.8110 # SOURCE3 3 0.0027
bond_coeff @bond:n4-ss harmonic 221.0 1.8120 # SOURCE3 5 0.0064
bond_coeff @bond:na-na harmonic 453.3 1.4010 # SOURCE1 40 0.0000
bond_coeff @bond:na-nb harmonic 546.5 1.3440 # SOURCE4 5 0.0070
bond_coeff @bond:na-nc harmonic 535.7 1.3500 # SOURCE3 152 0.0180
bond_coeff @bond:na-nd harmonic 535.7 1.3500 # SOURCE3 152 0.0180
bond_coeff @bond:na-nh harmonic 453.3 1.4010 # SOURCE1 40 0.0000
bond_coeff @bond:na-no harmonic 401.9 1.4390 # SOURCE3 9 0.0289
bond_coeff @bond:na-o harmonic 644.3 1.2650 # SOURCE1 25 0.0347
bond_coeff @bond:na-oh harmonic 412.2 1.3970 # SOURCE3 9 0.0217
bond_coeff @bond:na-os harmonic 355.2 1.4440 # SOURCE3 45 0.0423
bond_coeff @bond:na-p2 harmonic 297.8 1.7490 # SOURCE3 11 0.0192
bond_coeff @bond:na-p3 harmonic 288.0 1.7620 # SOURCE3 8 0.0113
bond_coeff @bond:na-p4 harmonic 492.4 1.5640 # SOURCE3 5 0.2161
bond_coeff @bond:na-p5 harmonic 325.3 1.7150 # SOURCE3 11 0.0238
bond_coeff @bond:na-pc harmonic 311.1 1.7320 # SOURCE3 81 0.0207
bond_coeff @bond:na-pd harmonic 311.1 1.7320 # SOURCE3 81 same_as_na-pc
bond_coeff @bond:na-py harmonic 327.8 1.7120 # SOURCE3 2 0.0000
bond_coeff @bond:na-s harmonic 248.7 1.7650 # SOURCE3 8 0.0095
bond_coeff @bond:na-s4 harmonic 231.7 1.7930 # SOURCE3 10 0.0421
bond_coeff @bond:na-s6 harmonic 274.3 1.7270 # SOURCE3 10 0.0201
bond_coeff @bond:na-sh harmonic 278.6 1.7210 # SOURCE3 9 0.0113
bond_coeff @bond:na-ss harmonic 270.1 1.7330 # SOURCE3 38 0.0412
bond_coeff @bond:na-sy harmonic 274.3 1.7270 # SOURCE3 1
bond_coeff @bond:nb-nb harmonic 550.2 1.3420 # SOURCE1 15 0.0314
bond_coeff @bond:nb-pb harmonic 461.1 1.5870 # SOURCE1 162 0.0091
bond_coeff @bond:nc-nc harmonic 486.8 1.3790 # SOURCE3 9 0.0164
bond_coeff @bond:nc-nd harmonic 602.9 1.3150 # SOURCE3 9 0.0221
bond_coeff @bond:nc-os harmonic 414.9 1.3950 # SOURCE1 46 0.0188
bond_coeff @bond:nc-ss harmonic 433.5 1.5600 # SOURCE1 74 0.0000
bond_coeff @bond:nc-sy harmonic 439.8 1.5550 # SOURCE3 2
bond_coeff @bond:nd-nd harmonic 486.8 1.3790 # SOURCE3 9 0.0164
bond_coeff @bond:nd-os harmonic 414.9 1.3950 # SOURCE1 46 0.0188
bond_coeff @bond:nd-ss harmonic 433.5 1.5600 # SOURCE1 74 0.0000
bond_coeff @bond:nd-sy harmonic 439.8 1.5550 # SOURCE3 2
bond_coeff @bond:ne-ne harmonic 355.3 1.4790 # SOURCE3 19 0.1705
bond_coeff @bond:ne-nf harmonic 721.6 1.2635 # SOURCE4 25 0.0034
bond_coeff @bond:ne-o harmonic 736.4 1.2280 # SOURCE3 40 0.0255
bond_coeff @bond:ne-p2 harmonic 493.9 1.5630 # SOURCE3 14 0.1325
bond_coeff @bond:ne-pe harmonic 327.8 1.7120 # SOURCE3 28 0.1076
bond_coeff @bond:ne-px harmonic 336.6 1.7020 # SOURCE3 11 0.0883
bond_coeff @bond:ne-py harmonic 425.4 1.6157 # SOURCE4 10 0.0094
bond_coeff @bond:ne-s harmonic 463.5 1.5370 # SOURCE3 22 0.1708
bond_coeff @bond:ne-sx harmonic 207.3 1.8380 # SOURCE3 7 0.1060
bond_coeff @bond:ne-sy harmonic 257.1 1.7520 # SOURCE3 7 0.0814
bond_coeff @bond:nf-nf harmonic 355.3 1.4790 # SOURCE3 19 same_as_ne-ne
bond_coeff @bond:nf-o harmonic 736.4 1.2280 # SOURCE3 40 same_as_ne-o
bond_coeff @bond:nf-p2 harmonic 493.9 1.5630 # SOURCE3 14 same_as_ne-p2
bond_coeff @bond:nf-pf harmonic 327.8 1.7120 # SOURCE3 28 same_as_ne-pe
bond_coeff @bond:nf-px harmonic 336.6 1.7020 # SOURCE3 11 same_as_ne-px
bond_coeff @bond:nf-py harmonic 425.4 1.6157 # SOURCE4 10 same_as_ne-py
bond_coeff @bond:nf-s harmonic 463.5 1.5370 # SOURCE3 22 same_as_ne-s
bond_coeff @bond:nf-sx harmonic 207.3 1.8380 # SOURCE3 7 same_as_ne-sx
bond_coeff @bond:nf-sy harmonic 257.1 1.7520 # SOURCE3 7 same_as_ne-sy
bond_coeff @bond:nh-nh harmonic 453.3 1.4010 # SOURCE1 40 0.0000
bond_coeff @bond:nh-no harmonic 477.4 1.3850 # SOURCE4 7 0.0036
bond_coeff @bond:nh-o harmonic 596.2 1.2870 # SOURCE3 3 0.0450
bond_coeff @bond:nh-oh harmonic 389.9 1.4144 # SOURCE4 19 0.0064
bond_coeff @bond:nh-os harmonic 387.8 1.4161 # SOURCE4 6 0.0039
bond_coeff @bond:nh-p2 harmonic 357.8 1.6790 # SOURCE3 17 0.0872
bond_coeff @bond:nh-p3 harmonic 312.8 1.7300 # SOURCE3 3 0.0016
bond_coeff @bond:nh-p4 harmonic 333.1 1.7060 # SOURCE3 3 0.0008
bond_coeff @bond:nh-p5 harmonic 365.6 1.6710 # SOURCE3 3 0.0007
bond_coeff @bond:nh-s harmonic 237.0 1.7840 # SOURCE3 3 0.0076
bond_coeff @bond:nh-s4 harmonic 259.1 1.7490 # SOURCE3 3 0.0203
bond_coeff @bond:nh-s6 harmonic 297.2 1.6965 # SOURCE4 33 0.0062
bond_coeff @bond:nh-sh harmonic 288.3 1.7080 # SOURCE3 1 0.0000
bond_coeff @bond:nh-ss harmonic 288.3 1.7080 # SOURCE1 52 0.0015
bond_coeff @bond:nh-sy harmonic 283.5 1.7144 # SOURCE4 80 0.0066
bond_coeff @bond:n-n1 harmonic 553.9 1.3400 # SOUECE3 1
bond_coeff @bond:n-n2 harmonic 499.7 1.3710 # SOURCE3 9 0.0200
bond_coeff @bond:n-n3 harmonic 443.3 1.4080 # SOURCE3 5 0.0087
bond_coeff @bond:n-n4 harmonic 410.8 1.4320 # SOURCE3 5 0.0098
bond_coeff @bond:n-n harmonic 469.7 1.3900 # SOURCE3 5 0.0038
bond_coeff @bond:n-na harmonic 486.8 1.3790 # SOURCE3 11 0.0071
bond_coeff @bond:n-nc harmonic 523.7 1.3568 # CORR 76
bond_coeff @bond:n-nd harmonic 523.7 1.3568 # CORR 76
bond_coeff @bond:n-nh harmonic 451.2 1.4025 # SOURCE4 20 0.0074
bond_coeff @bond:n-no harmonic 381.2 1.4560 # SOURCE3 4 0.0327
bond_coeff @bond:n-o harmonic 646.6 1.2640 # SOURCE3 9 0.0381
bond_coeff @bond:n-oh harmonic 395.4 1.4100 # SOURCE3 6 0.0106
bond_coeff @bond:no-no harmonic 138.3 1.8240 # SOURCE3 1 0.0000
bond_coeff @bond:no-o harmonic 761.2 1.2190 # SOURCE1 1838 0.0049
bond_coeff @bond:no-oh harmonic 400.5 1.4060 # SOURCE2 1 0.0000
bond_coeff @bond:no-os harmonic 379.5 1.4229 # SOURCE4 53 0.0076
bond_coeff @bond:no-p2 harmonic 306.3 1.7380 # SOURCE3 10 0.2231
bond_coeff @bond:no-p3 harmonic 234.7 1.8440 # SOURCE3 3 0.0005
bond_coeff @bond:no-p4 harmonic 220.4 1.8700 # SOURCE3 3 0.0006
bond_coeff @bond:no-p5 harmonic 240.5 1.8340 # SOURCE3 4 0.0020
bond_coeff @bond:no-s harmonic 263.8 1.7420 # SOURCE3 2 0.0000
bond_coeff @bond:n-os harmonic 395.0 1.4103 # SOURCE4 30 0.0112
bond_coeff @bond:no-s4 harmonic 143.0 1.9960 # SOURCE3 3 0.0313
bond_coeff @bond:no-s6 harmonic 149.6 1.9760 # SOURCE3 3 0.0520
bond_coeff @bond:no-sh harmonic 225.4 1.8040 # SOURCE3 1 0.0000
bond_coeff @bond:no-ss harmonic 212.4 1.8280 # SOURCE3 3 0.0244
bond_coeff @bond:n-p2 harmonic 310.3 1.7330 # SOURCE3 8 0.0217
bond_coeff @bond:n-p3 harmonic 282.2 1.7700 # SOURCE3 9 0.0118
bond_coeff @bond:n-p4 harmonic 309.5 1.7340 # SOURCE3 1 0.0000
bond_coeff @bond:n-p5 harmonic 331.3 1.7080 # SOURCE4 6 0.0022
bond_coeff @bond:n-pc harmonic 304.8 1.7400 # SOURCE3 3 0.0010
bond_coeff @bond:n-pd harmonic 304.8 1.7400 # SOURCE3 3 same_as_n-pc
bond_coeff @bond:n-s harmonic 247.5 1.7670 # SOURCE3 3 0.0011
bond_coeff @bond:n-s4 harmonic 238.2 1.7820 # SOURCE3 4 0.0214
bond_coeff @bond:n-s6 harmonic 283.0 1.7151 # SOURCE4 13 0.0138
bond_coeff @bond:n-sh harmonic 273.6 1.7280 # SOURCE3 4 0.0128
bond_coeff @bond:n-ss harmonic 281.6 1.7170 # SOURCE3 7 0.0133
bond_coeff @bond:n-sy harmonic 282.9 1.7152 # SOURCE4 51 0.0079
bond_coeff @bond:oh-oh harmonic 340.5 1.4690 # SOURCE3 1 0.0000
bond_coeff @bond:oh-os harmonic 355.8 1.4547 # SOURCE4 19 0.0050
bond_coeff @bond:oh-p2 harmonic 316.8 1.6300 # SOURCE3 8 0.0916
bond_coeff @bond:oh-p3 harmonic 278.8 1.6770 # SOURCE3 3 0.0148
bond_coeff @bond:oh-p4 harmonic 307.4 1.6410 # SOURCE3 4 0.0092
bond_coeff @bond:oh-p5 harmonic 321.2 1.6250 # SOURCE3 92 0.0451
bond_coeff @bond:oh-py harmonic 332.1 1.6130 # SOURCE3 79 0.0138
bond_coeff @bond:oh-s harmonic 190.0 1.8120 # SOURCE3 2 0.0000
bond_coeff @bond:oh-s4 harmonic 256.3 1.6954 # SOURCE4 10 0.0091
bond_coeff @bond:oh-s6 harmonic 344.1 1.5880 # SOURCE3 13 0.0091
bond_coeff @bond:oh-sh harmonic 258.6 1.6920 # SOURCE3 2 0.0003
bond_coeff @bond:oh-ss harmonic 265.6 1.6820 # SOURCE3 4 0.0131
bond_coeff @bond:oh-sy harmonic 290.4 1.6490 # SOURCE4 33 0.0044
bond_coeff @bond:o-o harmonic 384.3 1.4300 # SOURCE3 2 0.0500
bond_coeff @bond:o-oh harmonic 294.6 1.5170 # SOURCE3 2 0.0000
bond_coeff @bond:o-os harmonic 306.3 1.5040 # SOURCE3 3 0.0117
bond_coeff @bond:o-p2 harmonic 449.7 1.5080 # SOURCE3 17 0.0306
bond_coeff @bond:o-p3 harmonic 440.4 1.5150 # SOURCE3 35 0.0297
bond_coeff @bond:o-p4 harmonic 456.4 1.5030 # SOURCE3 42 0.0749
bond_coeff @bond:o-p5 harmonic 487.7 1.4810 # SOURCE1 263 0.0205
bond_coeff @bond:o-pe harmonic 432.6 1.5210 # SOURCE3 20 0.0171
bond_coeff @bond:o-pf harmonic 432.6 1.5210 # SOURCE3 20 same_as_o-pe
bond_coeff @bond:o-px harmonic 459.2 1.5010 # SOURCE3 37 0.0160
bond_coeff @bond:o-py harmonic 477.5 1.4880 # SOURCE3 63 0.0091
bond_coeff @bond:o-s harmonic 194.8 1.8020 # SOURCE3 2 0.0000
bond_coeff @bond:o-s2 harmonic 333.6 1.5990 # SOURCE3 3 0.0707
bond_coeff @bond:o-s4 harmonic 448.7 1.4970 # SOURCE1 90 0.0000
bond_coeff @bond:o-s6 harmonic 541.1 1.4360 # SOURCE1 1038 0.0128
bond_coeff @bond:o-sh harmonic 328.0 1.6050 # SOURCE3 2 0.0000
bond_coeff @bond:os-os harmonic 343.6 1.4660 # SOURCE1 20 0.0067
bond_coeff @bond:os-p2 harmonic 371.9 1.5730 # SOURCE1 16 0.0000
bond_coeff @bond:os-p3 harmonic 272.2 1.6860 # SOURCE3 6 0.0201
bond_coeff @bond:os-p4 harmonic 311.6 1.6360 # SOURCE3 4 0.0057
bond_coeff @bond:os-p5 harmonic 342.5 1.6020 # SOURCE1 248 0.0400
bond_coeff @bond:os-py harmonic 328.5 1.6170 # SOURCE3 17 0.0139
bond_coeff @bond:os-s harmonic 195.8 1.8000 # SOURCE3 3 0.0052
bond_coeff @bond:o-ss harmonic 398.5 1.5370 # SOURCE3 3 0.0501
bond_coeff @bond:os-s4 harmonic 253.9 1.6990 # SOURCE3 8 0.0223
bond_coeff @bond:os-s6 harmonic 355.0 1.5770 # SOURCE1 75 0.0030
bond_coeff @bond:os-sh harmonic 273.6 1.6710 # SOURCE3 3 0.0106
bond_coeff @bond:os-ss harmonic 250.5 1.7040 # SOURCE3 9 0.0277
bond_coeff @bond:os-sy harmonic 253.9 1.6990 # SOURCE3 1 0.0000
bond_coeff @bond:o-sx harmonic 434.2 1.5080 # SOURCE3 40 0.0130
bond_coeff @bond:o-sy harmonic 493.0 1.4660 # SOURCE3 92 0.0114
bond_coeff @bond:p2-p2 harmonic 490.3 1.7860 # SOURCE3 25 0.3488
bond_coeff @bond:p2-p3 harmonic 211.9 2.1520 # SOURCE3 9 0.1777
bond_coeff @bond:p2-p4 harmonic 200.4 2.1790 # SOUECE3 1
bond_coeff @bond:p2-p5 harmonic 199.9 2.1800 # SOUECE3 1
bond_coeff @bond:p2-pe harmonic 401.6 1.8670 # SOURCE3 16 0.3571
bond_coeff @bond:p2-pf harmonic 401.6 1.8670 # SOURCE3 16 same_as_p2-pe
bond_coeff @bond:p2-s harmonic 361.6 1.7720 # SOURCE3 26 0.3014
bond_coeff @bond:p2-s4 harmonic 139.4 2.1900 # SOUECE3 1
bond_coeff @bond:p2-s6 harmonic 142.3 2.1800 # SOUECE3 1
bond_coeff @bond:p2-sh harmonic 224.0 1.9710 # SOURCE3 10 0.2829
bond_coeff @bond:p2-ss harmonic 226.6 1.9660 # SOURCE3 10 0.2739
bond_coeff @bond:p3-p3 harmonic 186.5 2.2140 # SOURCE1 41 0.0000
bond_coeff @bond:p3-p4 harmonic 185.7 2.2160 # SOURCE3 3 0.0011
bond_coeff @bond:p3-p5 harmonic 186.9 2.2130 # SOURCE3 9 0.0265
bond_coeff @bond:p3-s harmonic 179.7 2.0700 # SOUECE3 1
bond_coeff @bond:p3-s4 harmonic 173.2 2.0870 # SOURCE3 8 0.2235
bond_coeff @bond:p3-s6 harmonic 176.9 2.0770 # SOURCE3 11 0.1420
bond_coeff @bond:p3-sh harmonic 157.3 2.1320 # SOURCE3 3 0.0078
bond_coeff @bond:p3-ss harmonic 161.0 2.1210 # SOURCE3 3 0.0059
bond_coeff @bond:p4-p4 harmonic 273.1 2.0340 # SOURCE1 1 0.0000
bond_coeff @bond:p4-p5 harmonic 178.0 2.2370 # SOUECE3 1
bond_coeff @bond:p4-s harmonic 152.7 2.1460 # SOURCE3 5 0.0601
bond_coeff @bond:p4-s4 harmonic 123.2 2.2510 # SOUECE3 1
bond_coeff @bond:p4-s6 harmonic 118.9 2.2690 # SOUECE3 1
bond_coeff @bond:p4-sh harmonic 163.1 2.1150 # SOURCE3 4 0.0008
bond_coeff @bond:p4-ss harmonic 167.0 2.1040 # SOURCE3 4 0.0044
bond_coeff @bond:p5-p5 harmonic 261.4 2.0540 # SOURCE1 1 0.0000
bond_coeff @bond:p5-s harmonic 250.8 1.9220 # SOURCE1 89 0.0140
bond_coeff @bond:p5-s4 harmonic 191.9 2.0400 # SOUECE3 1
bond_coeff @bond:p5-s6 harmonic 191.9 2.0400 # SOUECE3 1
bond_coeff @bond:p5-sh harmonic 175.0 2.0820 # SOURCE3 3 0.0035
bond_coeff @bond:p5-ss harmonic 163.1 2.1149 # SOURCE4 24 0.0106
bond_coeff @bond:pe-pe harmonic 240.7 2.0920 # SOURCE3 7 0.1369
bond_coeff @bond:pe-pf harmonic 260.8 2.0550 # SOURCE3 1 0.0000
bond_coeff @bond:pe-px harmonic 291.4 2.0050 # SOURCE3 12 0.2609
bond_coeff @bond:pe-py harmonic 278.6 2.0250 # SOURCE3 12 0.2617
bond_coeff @bond:pe-s harmonic 374.7 1.7580 # SOURCE3 31 0.3197
bond_coeff @bond:pe-sx harmonic 145.9 2.1680 # SOURCE3 9 0.1743
bond_coeff @bond:pe-sy harmonic 133.0 2.2130 # SOURCE3 6 0.0127
bond_coeff @bond:pf-pf harmonic 240.7 2.0920 # SOURCE3 7 same_as_pe-pe
bond_coeff @bond:pf-px harmonic 291.4 2.0050 # SOURCE3 12 same_as_pe-px
bond_coeff @bond:pf-py harmonic 278.6 2.0250 # SOURCE3 12 same_as_pe-py
bond_coeff @bond:pf-s harmonic 374.7 1.7580 # SOURCE3 31 same_as_pe-s
bond_coeff @bond:pf-sx harmonic 145.9 2.1680 # SOURCE3 9 same_as_pe-sx
bond_coeff @bond:pf-sy harmonic 133.0 2.2130 # SOURCE3 6 same_as_pe-sy
bond_coeff @bond:px-py harmonic 192.3 2.1990 # SOURCE3 5 0.0238
bond_coeff @bond:px-sx harmonic 125.4 2.2420 # SOURCE3 3 0.0119
bond_coeff @bond:px-sy harmonic 123.7 2.2490 # SOURCE3 3 0.0272
bond_coeff @bond:py-py harmonic 197.5 2.1860 # SOURCE3 8 0.0132
bond_coeff @bond:py-sx harmonic 121.2 2.2590 # SOURCE3 7 0.0603
bond_coeff @bond:py-sy harmonic 141.7 2.1820 # SOURCE3 5 0.0047
bond_coeff @bond:s4-s4 harmonic 151.5 2.0800 # SOUECE3 1
bond_coeff @bond:s4-s6 harmonic 151.5 2.0800 # SOUECE3 1
bond_coeff @bond:s4-sh harmonic 125.7 2.1680 # SOURCE3 3 0.0227
bond_coeff @bond:s4-ss harmonic 126.2 2.1660 # SOURCE3 5 0.0247
bond_coeff @bond:s6-s6 harmonic 151.5 2.0800 # SOUECE3 1
bond_coeff @bond:s6-sh harmonic 142.6 2.1080 # SOURCE3 3 0.0144
bond_coeff @bond:s6-ss harmonic 139.6 2.1180 # SOURCE3 5 0.0209
bond_coeff @bond:sh-sh harmonic 158.9 2.0580 # SOURCE2 1 0.0000
bond_coeff @bond:sh-ss harmonic 155.8 2.0670 # SOURCE3 3 0.0029
bond_coeff @bond:s-s harmonic 169.0 2.0300 # SOURCE3 1 0.0000
bond_coeff @bond:s-s2 harmonic 229.2 1.8970 # SOURCE1 5 0.0000
bond_coeff @bond:s-s4 harmonic 152.8 2.0760 # SOURCE3 4 0.0345
bond_coeff @bond:s-s6 harmonic 166.0 2.0380 # SOURCE3 3 0.0311
bond_coeff @bond:s-sh harmonic 142.0 2.1100 # SOURCE3 2 0.0000
bond_coeff @bond:s-ss harmonic 148.5 2.0890 # SOURCE3 1 0.0000
bond_coeff @bond:ss-ss harmonic 161.7 2.0500 # SOURCE1 225 0.0015
bond_coeff @bond:sx-sx harmonic 80.9 2.3910 # SOURCE3 3 0.0185
bond_coeff @bond:sx-sy harmonic 105.3 2.2550 # SOURCE3 5 0.0737
bond_coeff @bond:sy-sy harmonic 106.4 2.2500 # SOURCE3 3 0.0289
bond_coeff @bond:br-cd harmonic 277.6 1.8847 # NEW 39
bond_coeff @bond:c1-cf harmonic 607.4 1.3153 # NEW 6
bond_coeff @bond:cd-f harmonic 368.6 1.3401 # NEW 24
bond_coeff @bond:cd-n4 harmonic 299.0 1.4930 # NEW 7
bond_coeff @bond:cd-nf harmonic 427.4 1.3790 # NEW 30
bond_coeff @bond:cd-no harmonic 367.4 1.4262 # NEW 133
bond_coeff @bond:cd-sh harmonic 257.9 1.7681 # NEW 8
bond_coeff @bond:cd-sx harmonic 231.3 1.8113 # NEW 16
bond_coeff @bond:cc-cy harmonic 330.9 1.5054 # NEW 10
bond_coeff @bond:cf-cl harmonic 292.6 1.7671 # NEW 24
bond_coeff @bond:cf-cx harmonic 337.0 1.4993 # NEW 5
bond_coeff @bond:cf-cy harmonic 323.0 1.5135 # NEW 17
bond_coeff @bond:cf-na harmonic 373.8 1.4207 # NEW 5
bond_coeff @bond:cf-ss harmonic 243.6 1.7906 # NEW 10
bond_coeff @bond:cq-na harmonic 420.5 1.3840 # NEW 7
bond_coeff @bond:cq-nb harmonic 486.7 1.3398 # NEW 70
} # (end of bond_coeffs)
write_once("Data Bonds By Type") {
@bond:ow-hw @atom:ow @atom:hw
@bond:hw-hw @atom:hw @atom:hw
@bond:br-br @atom:br @atom:br
@bond:br-c1 @atom:br @atom:c1
@bond:br-c2 @atom:br @atom:c2
@bond:br-c @atom:br @atom:c
@bond:br-c3 @atom:br @atom:c3
@bond:br-ca @atom:br @atom:ca
@bond:br-cc @atom:br @atom:cc
@bond:br-cx @atom:br @atom:cx
@bond:br-i @atom:br @atom:i
@bond:br-n1 @atom:br @atom:n1
@bond:br-n2 @atom:br @atom:n2
@bond:br-n @atom:br @atom:n
@bond:br-n3 @atom:br @atom:n3
@bond:br-n4 @atom:br @atom:n4
@bond:br-na @atom:br @atom:na
@bond:br-nh @atom:br @atom:nh
@bond:br-no @atom:br @atom:no
@bond:br-o @atom:br @atom:o
@bond:br-oh @atom:br @atom:oh
@bond:br-os @atom:br @atom:os
@bond:br-p2 @atom:br @atom:p2
@bond:br-p3 @atom:br @atom:p3
@bond:br-p4 @atom:br @atom:p4
@bond:br-p5 @atom:br @atom:p5
@bond:br-s @atom:br @atom:s
@bond:br-s4 @atom:br @atom:s4
@bond:br-s6 @atom:br @atom:s6
@bond:br-sh @atom:br @atom:sh
@bond:br-ss @atom:br @atom:ss
@bond:c1-c1 @atom:c1 @atom:c1
@bond:c1-c2 @atom:c1 @atom:c2
@bond:c1-c3 @atom:c1 @atom:c3
@bond:c1-ca @atom:c1 @atom:ca
@bond:c1-ce @atom:c1 @atom:ce
@bond:c1-cg @atom:c1 @atom:cg
@bond:c1-ch @atom:c1 @atom:ch
@bond:c1-cl @atom:c1 @atom:cl
@bond:c1-cx @atom:c1 @atom:cx
@bond:c1-f @atom:c1 @atom:f
@bond:c1-ha @atom:c1 @atom:ha
@bond:c1-hc @atom:c1 @atom:hc
@bond:c1-i @atom:c1 @atom:i
@bond:c1-n1 @atom:c1 @atom:n1
@bond:c1-n2 @atom:c1 @atom:n2
@bond:c1-n3 @atom:c1 @atom:n3
@bond:c1-n4 @atom:c1 @atom:n4
@bond:c1-n @atom:c1 @atom:n
@bond:c1-na @atom:c1 @atom:na
@bond:c1-ne @atom:c1 @atom:ne
@bond:c1-nf @atom:c1 @atom:nf
@bond:c1-nh @atom:c1 @atom:nh
@bond:c1-no @atom:c1 @atom:no
@bond:c1-o @atom:c1 @atom:o
@bond:c1-oh @atom:c1 @atom:oh
@bond:c1-os @atom:c1 @atom:os
@bond:c1-p2 @atom:c1 @atom:p2
@bond:c1-p3 @atom:c1 @atom:p3
@bond:c1-p4 @atom:c1 @atom:p4
@bond:c1-p5 @atom:c1 @atom:p5
@bond:c1-s2 @atom:c1 @atom:s2
@bond:c1-s @atom:c1 @atom:s
@bond:c1-s4 @atom:c1 @atom:s4
@bond:c1-s6 @atom:c1 @atom:s6
@bond:c1-sh @atom:c1 @atom:sh
@bond:c1-ss @atom:c1 @atom:ss
@bond:c2-c2 @atom:c2 @atom:c2
@bond:c2-c3 @atom:c2 @atom:c3
@bond:c2-ca @atom:c2 @atom:ca
@bond:c2-cc @atom:c2 @atom:cc
@bond:c2-cd @atom:c2 @atom:cd
@bond:c2-ce @atom:c2 @atom:ce
@bond:c2-cf @atom:c2 @atom:cf
@bond:c2-cl @atom:c2 @atom:cl
@bond:c2-cu @atom:c2 @atom:cu
@bond:c2-cx @atom:c2 @atom:cx
@bond:c2-cy @atom:c2 @atom:cy
@bond:c2-f @atom:c2 @atom:f
@bond:c2-h4 @atom:c2 @atom:h4
@bond:c2-h5 @atom:c2 @atom:h5
@bond:c2-ha @atom:c2 @atom:ha
@bond:c2-hc @atom:c2 @atom:hc
@bond:c2-hx @atom:c2 @atom:hx
@bond:c2-i @atom:c2 @atom:i
@bond:c2-n1 @atom:c2 @atom:n1
@bond:c2-n2 @atom:c2 @atom:n2
@bond:c2-n3 @atom:c2 @atom:n3
@bond:c2-n @atom:c2 @atom:n
@bond:c2-n4 @atom:c2 @atom:n4
@bond:c2-na @atom:c2 @atom:na
@bond:c2-nc @atom:c2 @atom:nc
@bond:c2-nd @atom:c2 @atom:nd
@bond:c2-ne @atom:c2 @atom:ne
@bond:c2-nf @atom:c2 @atom:nf
@bond:c2-nh @atom:c2 @atom:nh
@bond:c2-no @atom:c2 @atom:no
@bond:c2-o @atom:c2 @atom:o
@bond:c2-oh @atom:c2 @atom:oh
@bond:c2-os @atom:c2 @atom:os
@bond:c2-p2 @atom:c2 @atom:p2
@bond:c2-p3 @atom:c2 @atom:p3
@bond:c2-p4 @atom:c2 @atom:p4
@bond:c2-p5 @atom:c2 @atom:p5
@bond:c2-pe @atom:c2 @atom:pe
@bond:c2-pf @atom:c2 @atom:pf
@bond:c2-s2 @atom:c2 @atom:s2
@bond:c2-s @atom:c2 @atom:s
@bond:c2-s4 @atom:c2 @atom:s4
@bond:c2-s6 @atom:c2 @atom:s6
@bond:c2-sh @atom:c2 @atom:sh
@bond:c2-ss @atom:c2 @atom:ss
@bond:c3-c3 @atom:c3 @atom:c3
@bond:c3-ca @atom:c3 @atom:ca
@bond:c3-cc @atom:c3 @atom:cc
@bond:c3-cd @atom:c3 @atom:cd
@bond:c3-ce @atom:c3 @atom:ce
@bond:c3-cf @atom:c3 @atom:cf
@bond:c3-cl @atom:c3 @atom:cl
@bond:c3-cu @atom:c3 @atom:cu
@bond:c3-cv @atom:c3 @atom:cv
@bond:c3-cx @atom:c3 @atom:cx
@bond:c3-cy @atom:c3 @atom:cy
@bond:c3-f @atom:c3 @atom:f
@bond:c3-h1 @atom:c3 @atom:h1
@bond:c3-h2 @atom:c3 @atom:h2
@bond:c3-h3 @atom:c3 @atom:h3
@bond:c3-hc @atom:c3 @atom:hc
@bond:c3-hx @atom:c3 @atom:hx
@bond:c3-i @atom:c3 @atom:i
@bond:c3-n1 @atom:c3 @atom:n1
@bond:c3-n2 @atom:c3 @atom:n2
@bond:c3-n @atom:c3 @atom:n
@bond:c3-n3 @atom:c3 @atom:n3
@bond:c3-n4 @atom:c3 @atom:n4
@bond:c3-na @atom:c3 @atom:na
@bond:c3-nc @atom:c3 @atom:nc
@bond:c3-nd @atom:c3 @atom:nd
@bond:c3-nh @atom:c3 @atom:nh
@bond:c3-no @atom:c3 @atom:no
@bond:c3-o @atom:c3 @atom:o
@bond:c3-oh @atom:c3 @atom:oh
@bond:c3-os @atom:c3 @atom:os
@bond:c3-p2 @atom:c3 @atom:p2
@bond:c3-p3 @atom:c3 @atom:p3
@bond:c3-p4 @atom:c3 @atom:p4
@bond:c3-p5 @atom:c3 @atom:p5
@bond:c3-px @atom:c3 @atom:px
@bond:c3-py @atom:c3 @atom:py
@bond:c3-s @atom:c3 @atom:s
@bond:c3-s4 @atom:c3 @atom:s4
@bond:c3-s6 @atom:c3 @atom:s6
@bond:c3-sh @atom:c3 @atom:sh
@bond:c3-ss @atom:c3 @atom:ss
@bond:c3-sx @atom:c3 @atom:sx
@bond:c3-sy @atom:c3 @atom:sy
@bond:ca-ca @atom:ca @atom:ca
@bond:ca-cc @atom:ca @atom:cc
@bond:ca-cd @atom:ca @atom:cd
@bond:ca-ce @atom:ca @atom:ce
@bond:ca-cf @atom:ca @atom:cf
@bond:ca-cg @atom:ca @atom:cg
@bond:ca-ch @atom:ca @atom:ch
@bond:ca-cl @atom:ca @atom:cl
@bond:ca-cp @atom:ca @atom:cp
@bond:ca-cq @atom:ca @atom:cq
@bond:ca-cx @atom:ca @atom:cx
@bond:ca-cy @atom:ca @atom:cy
@bond:ca-f @atom:ca @atom:f
@bond:ca-h4 @atom:ca @atom:h4
@bond:ca-h5 @atom:ca @atom:h5
@bond:ca-ha @atom:ca @atom:ha
@bond:ca-i @atom:ca @atom:i
@bond:ca-n1 @atom:ca @atom:n1
@bond:ca-n2 @atom:ca @atom:n2
@bond:ca-n @atom:ca @atom:n
@bond:ca-n4 @atom:ca @atom:n4
@bond:ca-na @atom:ca @atom:na
@bond:ca-nb @atom:ca @atom:nb
@bond:ca-nc @atom:ca @atom:nc
@bond:ca-nd @atom:ca @atom:nd
@bond:ca-ne @atom:ca @atom:ne
@bond:ca-nf @atom:ca @atom:nf
@bond:ca-nh @atom:ca @atom:nh
@bond:ca-no @atom:ca @atom:no
@bond:ca-o @atom:ca @atom:o
@bond:ca-oh @atom:ca @atom:oh
@bond:ca-os @atom:ca @atom:os
@bond:ca-p2 @atom:ca @atom:p2
@bond:ca-p3 @atom:ca @atom:p3
@bond:ca-p4 @atom:ca @atom:p4
@bond:ca-p5 @atom:ca @atom:p5
@bond:ca-pe @atom:ca @atom:pe
@bond:ca-pf @atom:ca @atom:pf
@bond:ca-px @atom:ca @atom:px
@bond:ca-py @atom:ca @atom:py
@bond:ca-s @atom:ca @atom:s
@bond:ca-s4 @atom:ca @atom:s4
@bond:ca-s6 @atom:ca @atom:s6
@bond:ca-sh @atom:ca @atom:sh
@bond:ca-ss @atom:ca @atom:ss
@bond:ca-sx @atom:ca @atom:sx
@bond:ca-sy @atom:ca @atom:sy
@bond:c-c1 @atom:c @atom:c1
@bond:c-c2 @atom:c @atom:c2
@bond:c-c @atom:c @atom:c
@bond:c-c3 @atom:c @atom:c3
@bond:c-ca @atom:c @atom:ca
@bond:c-cc @atom:c @atom:cc
@bond:cc-cc @atom:cc @atom:cc
@bond:cc-cd @atom:cc @atom:cd
@bond:cc-ce @atom:cc @atom:ce
@bond:cc-cf @atom:cc @atom:cf
@bond:cc-cg @atom:cc @atom:cg
@bond:cc-ch @atom:cc @atom:ch
@bond:cc-cl @atom:cc @atom:cl
@bond:cc-cx @atom:cc @atom:cx
@bond:c-cd @atom:c @atom:cd
@bond:c-ce @atom:c @atom:ce
@bond:c-cf @atom:c @atom:cf
@bond:cc-f @atom:cc @atom:f
@bond:c-cg @atom:c @atom:cg
@bond:c-ch @atom:c @atom:ch
@bond:cc-h4 @atom:cc @atom:h4
@bond:cc-h5 @atom:cc @atom:h5
@bond:cc-ha @atom:cc @atom:ha
@bond:c-cl @atom:c @atom:cl
@bond:cc-n2 @atom:cc @atom:n2
@bond:cc-n @atom:cc @atom:n
@bond:cc-n4 @atom:cc @atom:n4
@bond:cc-na @atom:cc @atom:na
@bond:cc-nc @atom:cc @atom:nc
@bond:cc-nd @atom:cc @atom:nd
@bond:cc-ne @atom:cc @atom:ne
@bond:cc-nf @atom:cc @atom:nf
@bond:cc-nh @atom:cc @atom:nh
@bond:cc-no @atom:cc @atom:no
@bond:cc-oh @atom:cc @atom:oh
@bond:cc-os @atom:cc @atom:os
@bond:cc-pd @atom:cc @atom:pd
@bond:cc-sh @atom:cc @atom:sh
@bond:cc-ss @atom:cc @atom:ss
@bond:cc-sx @atom:cc @atom:sx
@bond:cc-sy @atom:cc @atom:sy
@bond:c-cu @atom:c @atom:cu
@bond:c-cx @atom:c @atom:cx
@bond:c-cy @atom:c @atom:cy
@bond:cd-cd @atom:cd @atom:cd
@bond:cd-ce @atom:cd @atom:ce
@bond:cd-cf @atom:cd @atom:cf
@bond:cd-cg @atom:cd @atom:cg
@bond:cd-ch @atom:cd @atom:ch
@bond:cd-cl @atom:cd @atom:cl
@bond:cd-cx @atom:cd @atom:cx
@bond:cd-cy @atom:cd @atom:cy
@bond:cd-h4 @atom:cd @atom:h4
@bond:cd-h5 @atom:cd @atom:h5
@bond:cd-ha @atom:cd @atom:ha
@bond:cd-n2 @atom:cd @atom:n2
@bond:cd-n @atom:cd @atom:n
@bond:cd-na @atom:cd @atom:na
@bond:cd-nc @atom:cd @atom:nc
@bond:cd-nd @atom:cd @atom:nd
@bond:cd-ne @atom:cd @atom:ne
@bond:cd-nh @atom:cd @atom:nh
@bond:cd-oh @atom:cd @atom:oh
@bond:cd-os @atom:cd @atom:os
@bond:cd-pc @atom:cd @atom:pc
@bond:cd-ss @atom:cd @atom:ss
@bond:cd-sy @atom:cd @atom:sy
@bond:ce-ce @atom:ce @atom:ce
@bond:ce-cf @atom:ce @atom:cf
@bond:ce-cg @atom:ce @atom:cg
@bond:ce-ch @atom:ce @atom:ch
@bond:ce-cl @atom:ce @atom:cl
@bond:ce-cx @atom:ce @atom:cx
@bond:ce-cy @atom:ce @atom:cy
@bond:ce-h4 @atom:ce @atom:h4
@bond:ce-ha @atom:ce @atom:ha
@bond:ce-n1 @atom:ce @atom:n1
@bond:ce-n2 @atom:ce @atom:n2
@bond:ce-n @atom:ce @atom:n
@bond:ce-na @atom:ce @atom:na
@bond:ce-ne @atom:ce @atom:ne
@bond:ce-nf @atom:ce @atom:nf
@bond:ce-nh @atom:ce @atom:nh
@bond:ce-oh @atom:ce @atom:oh
@bond:ce-os @atom:ce @atom:os
@bond:ce-p2 @atom:ce @atom:p2
@bond:ce-pe @atom:ce @atom:pe
@bond:ce-px @atom:ce @atom:px
@bond:ce-py @atom:ce @atom:py
@bond:ce-s @atom:ce @atom:s
@bond:ce-ss @atom:ce @atom:ss
@bond:ce-sx @atom:ce @atom:sx
@bond:ce-sy @atom:ce @atom:sy
@bond:c-f @atom:c @atom:f
@bond:cf-cf @atom:cf @atom:cf
@bond:cf-cg @atom:cf @atom:cg
@bond:cf-ch @atom:cf @atom:ch
@bond:cf-h4 @atom:cf @atom:h4
@bond:cf-ha @atom:cf @atom:ha
@bond:cf-n1 @atom:cf @atom:n1
@bond:cf-n2 @atom:cf @atom:n2
@bond:cf-n @atom:cf @atom:n
@bond:cf-ne @atom:cf @atom:ne
@bond:cf-nf @atom:cf @atom:nf
@bond:cf-nh @atom:cf @atom:nh
@bond:cf-oh @atom:cf @atom:oh
@bond:cf-os @atom:cf @atom:os
@bond:cf-p2 @atom:cf @atom:p2
@bond:cf-pf @atom:cf @atom:pf
@bond:cf-px @atom:cf @atom:px
@bond:cf-py @atom:cf @atom:py
@bond:cf-s @atom:cf @atom:s
@bond:cf-sx @atom:cf @atom:sx
@bond:cf-sy @atom:cf @atom:sy
@bond:cg-cg @atom:cg @atom:cg
@bond:cg-ch @atom:cg @atom:ch
@bond:cg-n1 @atom:cg @atom:n1
@bond:cg-ne @atom:cg @atom:ne
@bond:cg-pe @atom:cg @atom:pe
@bond:c-h4 @atom:c @atom:h4
@bond:c-h5 @atom:c @atom:h5
@bond:c-ha @atom:c @atom:ha
@bond:ch-ch @atom:ch @atom:ch
@bond:ch-n1 @atom:ch @atom:n1
@bond:ch-nf @atom:ch @atom:nf
@bond:ch-pf @atom:ch @atom:pf
@bond:c-i @atom:c @atom:i
@bond:cl-cl @atom:cl @atom:cl
@bond:cl-cx @atom:cl @atom:cx
@bond:cl-cy @atom:cl @atom:cy
@bond:cl-f @atom:cl @atom:f
@bond:cl-i @atom:cl @atom:i
@bond:cl-n1 @atom:cl @atom:n1
@bond:cl-n2 @atom:cl @atom:n2
@bond:cl-n3 @atom:cl @atom:n3
@bond:cl-n @atom:cl @atom:n
@bond:cl-n4 @atom:cl @atom:n4
@bond:cl-na @atom:cl @atom:na
@bond:cl-nh @atom:cl @atom:nh
@bond:cl-no @atom:cl @atom:no
@bond:cl-o @atom:cl @atom:o
@bond:cl-oh @atom:cl @atom:oh
@bond:cl-os @atom:cl @atom:os
@bond:cl-p2 @atom:cl @atom:p2
@bond:cl-p3 @atom:cl @atom:p3
@bond:cl-p4 @atom:cl @atom:p4
@bond:cl-p5 @atom:cl @atom:p5
@bond:cl-pb @atom:cl @atom:pb
@bond:cl-s @atom:cl @atom:s
@bond:cl-s2 @atom:cl @atom:s2
@bond:cl-s4 @atom:cl @atom:s4
@bond:cl-s6 @atom:cl @atom:s6
@bond:cl-sh @atom:cl @atom:sh
@bond:cl-ss @atom:cl @atom:ss
@bond:cl-sx @atom:cl @atom:sx
@bond:cl-sy @atom:cl @atom:sy
@bond:c-n2 @atom:c @atom:n2
@bond:c-n4 @atom:c @atom:n4
@bond:c-n @atom:c @atom:n
@bond:c-nc @atom:c @atom:nc
@bond:c-nd @atom:c @atom:nd
@bond:c-ne @atom:c @atom:ne
@bond:c-nf @atom:c @atom:nf
@bond:c-no @atom:c @atom:no
@bond:c-o @atom:c @atom:o
@bond:c-oh @atom:c @atom:oh
@bond:c-os @atom:c @atom:os
@bond:c-p2 @atom:c @atom:p2
@bond:c-p3 @atom:c @atom:p3
@bond:c-p4 @atom:c @atom:p4
@bond:c-p5 @atom:c @atom:p5
@bond:cp-cp @atom:cp @atom:cp
@bond:cp-cq @atom:cp @atom:cq
@bond:c-pe @atom:c @atom:pe
@bond:c-pf @atom:c @atom:pf
@bond:cp-na @atom:cp @atom:na
@bond:cp-nb @atom:cp @atom:nb
@bond:c-px @atom:c @atom:px
@bond:c-py @atom:c @atom:py
@bond:cq-cq @atom:cq @atom:cq
@bond:c-s @atom:c @atom:s
@bond:c-s4 @atom:c @atom:s4
@bond:c-s6 @atom:c @atom:s6
@bond:c-sh @atom:c @atom:sh
@bond:c-ss @atom:c @atom:ss
@bond:c-sx @atom:c @atom:sx
@bond:c-sy @atom:c @atom:sy
@bond:cu-cu @atom:cu @atom:cu
@bond:cu-cx @atom:cu @atom:cx
@bond:cu-ha @atom:cu @atom:ha
@bond:cv-cv @atom:cv @atom:cv
@bond:cv-cy @atom:cv @atom:cy
@bond:cv-ha @atom:cv @atom:ha
@bond:cx-cv @atom:cx @atom:cv
@bond:cx-cx @atom:cx @atom:cx
@bond:cx-cy @atom:cx @atom:cy
@bond:cx-f @atom:cx @atom:f
@bond:cx-h1 @atom:cx @atom:h1
@bond:cx-h2 @atom:cx @atom:h2
@bond:cx-hc @atom:cx @atom:hc
@bond:cx-hx @atom:cx @atom:hx
@bond:cx-n2 @atom:cx @atom:n2
@bond:cx-n3 @atom:cx @atom:n3
@bond:cx-n @atom:cx @atom:n
@bond:cx-na @atom:cx @atom:na
@bond:cx-nh @atom:cx @atom:nh
@bond:cx-oh @atom:cx @atom:oh
@bond:cx-os @atom:cx @atom:os
@bond:cx-p3 @atom:cx @atom:p3
@bond:cx-s4 @atom:cx @atom:s4
@bond:cx-s6 @atom:cx @atom:s6
@bond:cx-ss @atom:cx @atom:ss
@bond:cy-cy @atom:cy @atom:cy
@bond:cy-f @atom:cy @atom:f
@bond:cy-h1 @atom:cy @atom:h1
@bond:cy-h2 @atom:cy @atom:h2
@bond:cy-hc @atom:cy @atom:hc
@bond:cy-n @atom:cy @atom:n
@bond:cy-n3 @atom:cy @atom:n3
@bond:cy-oh @atom:cy @atom:oh
@bond:cy-os @atom:cy @atom:os
@bond:cy-s6 @atom:cy @atom:s6
@bond:cy-ss @atom:cy @atom:ss
@bond:cz-nh @atom:cz @atom:nh
@bond:f-n1 @atom:f @atom:n1
@bond:f-n2 @atom:f @atom:n2
@bond:f-n3 @atom:f @atom:n3
@bond:f-n @atom:f @atom:n
@bond:f-n4 @atom:f @atom:n4
@bond:f-na @atom:f @atom:na
@bond:f-nh @atom:f @atom:nh
@bond:f-no @atom:f @atom:no
@bond:f-o @atom:f @atom:o
@bond:f-oh @atom:f @atom:oh
@bond:f-os @atom:f @atom:os
@bond:f-p2 @atom:f @atom:p2
@bond:f-p3 @atom:f @atom:p3
@bond:f-p4 @atom:f @atom:p4
@bond:f-p5 @atom:f @atom:p5
@bond:f-s2 @atom:f @atom:s2
@bond:f-s @atom:f @atom:s
@bond:f-s4 @atom:f @atom:s4
@bond:f-s6 @atom:f @atom:s6
@bond:f-sh @atom:f @atom:sh
@bond:f-ss @atom:f @atom:ss
@bond:hn-n1 @atom:hn @atom:n1
@bond:hn-n2 @atom:hn @atom:n2
@bond:hn-n3 @atom:hn @atom:n3
@bond:hn-n @atom:hn @atom:n
@bond:hn-n4 @atom:hn @atom:n4
@bond:hn-na @atom:hn @atom:na
@bond:hn-nh @atom:hn @atom:nh
@bond:hn-no @atom:hn @atom:no
@bond:ho-o @atom:ho @atom:o
@bond:ho-oh @atom:ho @atom:oh
@bond:hp-p2 @atom:hp @atom:p2
@bond:hp-p3 @atom:hp @atom:p3
@bond:hp-p4 @atom:hp @atom:p4
@bond:hp-p5 @atom:hp @atom:p5
@bond:hs-s @atom:hs @atom:s
@bond:hs-s4 @atom:hs @atom:s4
@bond:hs-s6 @atom:hs @atom:s6
@bond:hs-sh @atom:hs @atom:sh
@bond:i-i @atom:i @atom:i
@bond:i-n1 @atom:i @atom:n1
@bond:i-n2 @atom:i @atom:n2
@bond:i-n @atom:i @atom:n
@bond:i-n3 @atom:i @atom:n3
@bond:i-n4 @atom:i @atom:n4
@bond:i-na @atom:i @atom:na
@bond:i-nh @atom:i @atom:nh
@bond:i-no @atom:i @atom:no
@bond:i-o @atom:i @atom:o
@bond:i-oh @atom:i @atom:oh
@bond:i-os @atom:i @atom:os
@bond:i-p2 @atom:i @atom:p2
@bond:i-p3 @atom:i @atom:p3
@bond:i-p4 @atom:i @atom:p4
@bond:i-p5 @atom:i @atom:p5
@bond:i-s @atom:i @atom:s
@bond:i-s4 @atom:i @atom:s4
@bond:i-s6 @atom:i @atom:s6
@bond:i-sh @atom:i @atom:sh
@bond:i-ss @atom:i @atom:ss
@bond:n1-n1 @atom:n1 @atom:n1
@bond:n1-n2 @atom:n1 @atom:n2
@bond:n1-n3 @atom:n1 @atom:n3
@bond:n1-n4 @atom:n1 @atom:n4
@bond:n1-na @atom:n1 @atom:na
@bond:n1-nc @atom:n1 @atom:nc
@bond:n1-nd @atom:n1 @atom:nd
@bond:n1-ne @atom:n1 @atom:ne
@bond:n1-nf @atom:n1 @atom:nf
@bond:n1-nh @atom:n1 @atom:nh
@bond:n1-no @atom:n1 @atom:no
@bond:n1-o @atom:n1 @atom:o
@bond:n1-oh @atom:n1 @atom:oh
@bond:n1-os @atom:n1 @atom:os
@bond:n1-p2 @atom:n1 @atom:p2
@bond:n1-p3 @atom:n1 @atom:p3
@bond:n1-p4 @atom:n1 @atom:p4
@bond:n1-p5 @atom:n1 @atom:p5
@bond:n1-s2 @atom:n1 @atom:s2
@bond:n1-s @atom:n1 @atom:s
@bond:n1-s4 @atom:n1 @atom:s4
@bond:n1-s6 @atom:n1 @atom:s6
@bond:n1-sh @atom:n1 @atom:sh
@bond:n1-ss @atom:n1 @atom:ss
@bond:n2-n2 @atom:n2 @atom:n2
@bond:n2-n3 @atom:n2 @atom:n3
@bond:n2-n4 @atom:n2 @atom:n4
@bond:n2-na @atom:n2 @atom:na
@bond:n2-nc @atom:n2 @atom:nc
@bond:n2-nd @atom:n2 @atom:nd
@bond:n2-ne @atom:n2 @atom:ne
@bond:n2-nf @atom:n2 @atom:nf
@bond:n2-nh @atom:n2 @atom:nh
@bond:n2-no @atom:n2 @atom:no
@bond:n2-o @atom:n2 @atom:o
@bond:n2-oh @atom:n2 @atom:oh
@bond:n2-os @atom:n2 @atom:os
@bond:n2-p2 @atom:n2 @atom:p2
@bond:n2-p3 @atom:n2 @atom:p3
@bond:n2-p4 @atom:n2 @atom:p4
@bond:n2-p5 @atom:n2 @atom:p5
@bond:n2-pe @atom:n2 @atom:pe
@bond:n2-pf @atom:n2 @atom:pf
@bond:n2-s2 @atom:n2 @atom:s2
@bond:n2-s4 @atom:n2 @atom:s4
@bond:n2-s @atom:n2 @atom:s
@bond:n2-s6 @atom:n2 @atom:s6
@bond:n2-sh @atom:n2 @atom:sh
@bond:n2-ss @atom:n2 @atom:ss
@bond:n3-n3 @atom:n3 @atom:n3
@bond:n3-n4 @atom:n3 @atom:n4
@bond:n3-na @atom:n3 @atom:na
@bond:n3-nh @atom:n3 @atom:nh
@bond:n3-no @atom:n3 @atom:no
@bond:n3-o @atom:n3 @atom:o
@bond:n3-oh @atom:n3 @atom:oh
@bond:n3-os @atom:n3 @atom:os
@bond:n3-p2 @atom:n3 @atom:p2
@bond:n3-p3 @atom:n3 @atom:p3
@bond:n3-p4 @atom:n3 @atom:p4
@bond:n3-p5 @atom:n3 @atom:p5
@bond:n3-py @atom:n3 @atom:py
@bond:n3-s @atom:n3 @atom:s
@bond:n3-s4 @atom:n3 @atom:s4
@bond:n3-s6 @atom:n3 @atom:s6
@bond:n3-sh @atom:n3 @atom:sh
@bond:n3-ss @atom:n3 @atom:ss
@bond:n3-sy @atom:n3 @atom:sy
@bond:n4-n4 @atom:n4 @atom:n4
@bond:n4-na @atom:n4 @atom:na
@bond:n4-nh @atom:n4 @atom:nh
@bond:n4-no @atom:n4 @atom:no
@bond:n4-o @atom:n4 @atom:o
@bond:n4-oh @atom:n4 @atom:oh
@bond:n4-os @atom:n4 @atom:os
@bond:n4-p2 @atom:n4 @atom:p2
@bond:n4-p3 @atom:n4 @atom:p3
@bond:n4-p4 @atom:n4 @atom:p4
@bond:n4-p5 @atom:n4 @atom:p5
@bond:n4-py @atom:n4 @atom:py
@bond:n4-s @atom:n4 @atom:s
@bond:n4-s4 @atom:n4 @atom:s4
@bond:n4-s6 @atom:n4 @atom:s6
@bond:n4-sh @atom:n4 @atom:sh
@bond:n4-ss @atom:n4 @atom:ss
@bond:na-na @atom:na @atom:na
@bond:na-nb @atom:na @atom:nb
@bond:na-nc @atom:na @atom:nc
@bond:na-nd @atom:na @atom:nd
@bond:na-nh @atom:na @atom:nh
@bond:na-no @atom:na @atom:no
@bond:na-o @atom:na @atom:o
@bond:na-oh @atom:na @atom:oh
@bond:na-os @atom:na @atom:os
@bond:na-p2 @atom:na @atom:p2
@bond:na-p3 @atom:na @atom:p3
@bond:na-p4 @atom:na @atom:p4
@bond:na-p5 @atom:na @atom:p5
@bond:na-pc @atom:na @atom:pc
@bond:na-pd @atom:na @atom:pd
@bond:na-py @atom:na @atom:py
@bond:na-s @atom:na @atom:s
@bond:na-s4 @atom:na @atom:s4
@bond:na-s6 @atom:na @atom:s6
@bond:na-sh @atom:na @atom:sh
@bond:na-ss @atom:na @atom:ss
@bond:na-sy @atom:na @atom:sy
@bond:nb-nb @atom:nb @atom:nb
@bond:nb-pb @atom:nb @atom:pb
@bond:nc-nc @atom:nc @atom:nc
@bond:nc-nd @atom:nc @atom:nd
@bond:nc-os @atom:nc @atom:os
@bond:nc-ss @atom:nc @atom:ss
@bond:nc-sy @atom:nc @atom:sy
@bond:nd-nd @atom:nd @atom:nd
@bond:nd-os @atom:nd @atom:os
@bond:nd-ss @atom:nd @atom:ss
@bond:nd-sy @atom:nd @atom:sy
@bond:ne-ne @atom:ne @atom:ne
@bond:ne-nf @atom:ne @atom:nf
@bond:ne-o @atom:ne @atom:o
@bond:ne-p2 @atom:ne @atom:p2
@bond:ne-pe @atom:ne @atom:pe
@bond:ne-px @atom:ne @atom:px
@bond:ne-py @atom:ne @atom:py
@bond:ne-s @atom:ne @atom:s
@bond:ne-sx @atom:ne @atom:sx
@bond:ne-sy @atom:ne @atom:sy
@bond:nf-nf @atom:nf @atom:nf
@bond:nf-o @atom:nf @atom:o
@bond:nf-p2 @atom:nf @atom:p2
@bond:nf-pf @atom:nf @atom:pf
@bond:nf-px @atom:nf @atom:px
@bond:nf-py @atom:nf @atom:py
@bond:nf-s @atom:nf @atom:s
@bond:nf-sx @atom:nf @atom:sx
@bond:nf-sy @atom:nf @atom:sy
@bond:nh-nh @atom:nh @atom:nh
@bond:nh-no @atom:nh @atom:no
@bond:nh-o @atom:nh @atom:o
@bond:nh-oh @atom:nh @atom:oh
@bond:nh-os @atom:nh @atom:os
@bond:nh-p2 @atom:nh @atom:p2
@bond:nh-p3 @atom:nh @atom:p3
@bond:nh-p4 @atom:nh @atom:p4
@bond:nh-p5 @atom:nh @atom:p5
@bond:nh-s @atom:nh @atom:s
@bond:nh-s4 @atom:nh @atom:s4
@bond:nh-s6 @atom:nh @atom:s6
@bond:nh-sh @atom:nh @atom:sh
@bond:nh-ss @atom:nh @atom:ss
@bond:nh-sy @atom:nh @atom:sy
@bond:n-n1 @atom:n @atom:n1
@bond:n-n2 @atom:n @atom:n2
@bond:n-n3 @atom:n @atom:n3
@bond:n-n4 @atom:n @atom:n4
@bond:n-n @atom:n @atom:n
@bond:n-na @atom:n @atom:na
@bond:n-nc @atom:n @atom:nc
@bond:n-nd @atom:n @atom:nd
@bond:n-nh @atom:n @atom:nh
@bond:n-no @atom:n @atom:no
@bond:n-o @atom:n @atom:o
@bond:n-oh @atom:n @atom:oh
@bond:no-no @atom:no @atom:no
@bond:no-o @atom:no @atom:o
@bond:no-oh @atom:no @atom:oh
@bond:no-os @atom:no @atom:os
@bond:no-p2 @atom:no @atom:p2
@bond:no-p3 @atom:no @atom:p3
@bond:no-p4 @atom:no @atom:p4
@bond:no-p5 @atom:no @atom:p5
@bond:no-s @atom:no @atom:s
@bond:n-os @atom:n @atom:os
@bond:no-s4 @atom:no @atom:s4
@bond:no-s6 @atom:no @atom:s6
@bond:no-sh @atom:no @atom:sh
@bond:no-ss @atom:no @atom:ss
@bond:n-p2 @atom:n @atom:p2
@bond:n-p3 @atom:n @atom:p3
@bond:n-p4 @atom:n @atom:p4
@bond:n-p5 @atom:n @atom:p5
@bond:n-pc @atom:n @atom:pc
@bond:n-pd @atom:n @atom:pd
@bond:n-s @atom:n @atom:s
@bond:n-s4 @atom:n @atom:s4
@bond:n-s6 @atom:n @atom:s6
@bond:n-sh @atom:n @atom:sh
@bond:n-ss @atom:n @atom:ss
@bond:n-sy @atom:n @atom:sy
@bond:oh-oh @atom:oh @atom:oh
@bond:oh-os @atom:oh @atom:os
@bond:oh-p2 @atom:oh @atom:p2
@bond:oh-p3 @atom:oh @atom:p3
@bond:oh-p4 @atom:oh @atom:p4
@bond:oh-p5 @atom:oh @atom:p5
@bond:oh-py @atom:oh @atom:py
@bond:oh-s @atom:oh @atom:s
@bond:oh-s4 @atom:oh @atom:s4
@bond:oh-s6 @atom:oh @atom:s6
@bond:oh-sh @atom:oh @atom:sh
@bond:oh-ss @atom:oh @atom:ss
@bond:oh-sy @atom:oh @atom:sy
@bond:o-o @atom:o @atom:o
@bond:o-oh @atom:o @atom:oh
@bond:o-os @atom:o @atom:os
@bond:o-p2 @atom:o @atom:p2
@bond:o-p3 @atom:o @atom:p3
@bond:o-p4 @atom:o @atom:p4
@bond:o-p5 @atom:o @atom:p5
@bond:o-pe @atom:o @atom:pe
@bond:o-pf @atom:o @atom:pf
@bond:o-px @atom:o @atom:px
@bond:o-py @atom:o @atom:py
@bond:o-s @atom:o @atom:s
@bond:o-s2 @atom:o @atom:s2
@bond:o-s4 @atom:o @atom:s4
@bond:o-s6 @atom:o @atom:s6
@bond:o-sh @atom:o @atom:sh
@bond:os-os @atom:os @atom:os
@bond:os-p2 @atom:os @atom:p2
@bond:os-p3 @atom:os @atom:p3
@bond:os-p4 @atom:os @atom:p4
@bond:os-p5 @atom:os @atom:p5
@bond:os-py @atom:os @atom:py
@bond:os-s @atom:os @atom:s
@bond:o-ss @atom:o @atom:ss
@bond:os-s4 @atom:os @atom:s4
@bond:os-s6 @atom:os @atom:s6
@bond:os-sh @atom:os @atom:sh
@bond:os-ss @atom:os @atom:ss
@bond:os-sy @atom:os @atom:sy
@bond:o-sx @atom:o @atom:sx
@bond:o-sy @atom:o @atom:sy
@bond:p2-p2 @atom:p2 @atom:p2
@bond:p2-p3 @atom:p2 @atom:p3
@bond:p2-p4 @atom:p2 @atom:p4
@bond:p2-p5 @atom:p2 @atom:p5
@bond:p2-pe @atom:p2 @atom:pe
@bond:p2-pf @atom:p2 @atom:pf
@bond:p2-s @atom:p2 @atom:s
@bond:p2-s4 @atom:p2 @atom:s4
@bond:p2-s6 @atom:p2 @atom:s6
@bond:p2-sh @atom:p2 @atom:sh
@bond:p2-ss @atom:p2 @atom:ss
@bond:p3-p3 @atom:p3 @atom:p3
@bond:p3-p4 @atom:p3 @atom:p4
@bond:p3-p5 @atom:p3 @atom:p5
@bond:p3-s @atom:p3 @atom:s
@bond:p3-s4 @atom:p3 @atom:s4
@bond:p3-s6 @atom:p3 @atom:s6
@bond:p3-sh @atom:p3 @atom:sh
@bond:p3-ss @atom:p3 @atom:ss
@bond:p4-p4 @atom:p4 @atom:p4
@bond:p4-p5 @atom:p4 @atom:p5
@bond:p4-s @atom:p4 @atom:s
@bond:p4-s4 @atom:p4 @atom:s4
@bond:p4-s6 @atom:p4 @atom:s6
@bond:p4-sh @atom:p4 @atom:sh
@bond:p4-ss @atom:p4 @atom:ss
@bond:p5-p5 @atom:p5 @atom:p5
@bond:p5-s @atom:p5 @atom:s
@bond:p5-s4 @atom:p5 @atom:s4
@bond:p5-s6 @atom:p5 @atom:s6
@bond:p5-sh @atom:p5 @atom:sh
@bond:p5-ss @atom:p5 @atom:ss
@bond:pe-pe @atom:pe @atom:pe
@bond:pe-pf @atom:pe @atom:pf
@bond:pe-px @atom:pe @atom:px
@bond:pe-py @atom:pe @atom:py
@bond:pe-s @atom:pe @atom:s
@bond:pe-sx @atom:pe @atom:sx
@bond:pe-sy @atom:pe @atom:sy
@bond:pf-pf @atom:pf @atom:pf
@bond:pf-px @atom:pf @atom:px
@bond:pf-py @atom:pf @atom:py
@bond:pf-s @atom:pf @atom:s
@bond:pf-sx @atom:pf @atom:sx
@bond:pf-sy @atom:pf @atom:sy
@bond:px-py @atom:px @atom:py
@bond:px-sx @atom:px @atom:sx
@bond:px-sy @atom:px @atom:sy
@bond:py-py @atom:py @atom:py
@bond:py-sx @atom:py @atom:sx
@bond:py-sy @atom:py @atom:sy
@bond:s4-s4 @atom:s4 @atom:s4
@bond:s4-s6 @atom:s4 @atom:s6
@bond:s4-sh @atom:s4 @atom:sh
@bond:s4-ss @atom:s4 @atom:ss
@bond:s6-s6 @atom:s6 @atom:s6
@bond:s6-sh @atom:s6 @atom:sh
@bond:s6-ss @atom:s6 @atom:ss
@bond:sh-sh @atom:sh @atom:sh
@bond:sh-ss @atom:sh @atom:ss
@bond:s-s @atom:s @atom:s
@bond:s-s2 @atom:s @atom:s2
@bond:s-s4 @atom:s @atom:s4
@bond:s-s6 @atom:s @atom:s6
@bond:s-sh @atom:s @atom:sh
@bond:s-ss @atom:s @atom:ss
@bond:ss-ss @atom:ss @atom:ss
@bond:sx-sx @atom:sx @atom:sx
@bond:sx-sy @atom:sx @atom:sy
@bond:sy-sy @atom:sy @atom:sy
@bond:br-cd @atom:br @atom:cd
@bond:c1-cf @atom:c1 @atom:cf
@bond:cd-f @atom:cd @atom:f
@bond:cd-n4 @atom:cd @atom:n4
@bond:cd-nf @atom:cd @atom:nf
@bond:cd-no @atom:cd @atom:no
@bond:cd-sh @atom:cd @atom:sh
@bond:cd-sx @atom:cd @atom:sx
@bond:cc-cy @atom:cc @atom:cy
@bond:cf-cl @atom:cf @atom:cl
@bond:cf-cx @atom:cf @atom:cx
@bond:cf-cy @atom:cf @atom:cy
@bond:cf-na @atom:cf @atom:na
@bond:cf-ss @atom:cf @atom:ss
@bond:cq-na @atom:cq @atom:na
@bond:cq-nb @atom:cq @atom:nb
} # (end of Bonds By Type)
write_once("In Settings") {
angle_coeff @angle:hw-ow-hw harmonic 100.00 104.52 # AMBER 1 TIP3P_water
angle_coeff @angle:hw-hw-ow harmonic 0.00 127.74 # AMBER 1 (found_in_crystallographic_water_with_3_bonds)
angle_coeff @angle:br-c1-br harmonic 57.76 180.00 # Guess 0
angle_coeff @angle:br-c1-c1 harmonic 54.93 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-c1 harmonic 64.41 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-c2 harmonic 60.84 180.00 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-c3 harmonic 56.28 178.46 # SOURCE4 188 0.6631
angle_coeff @angle:c1-c1-ca harmonic 56.92 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-cl harmonic 51.40 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-f harmonic 61.02 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-ha harmonic 44.84 178.38 # SOURCE3 41 2.0683
angle_coeff @angle:c1-c1-hc harmonic 44.73 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-i harmonic 49.80 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-n1 harmonic 67.17 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-n2 harmonic 65.17 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-n3 harmonic 59.77 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-n4 harmonic 59.09 179.56 # SOURCE3 3 0.3096
angle_coeff @angle:c1-c1-n harmonic 62.13 177.18 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-na harmonic 61.23 176.75 # SOURCE3 8 2.9328
angle_coeff @angle:c1-c1-nh harmonic 61.44 179.27 # SOURCE3 3 0.2357
angle_coeff @angle:c1-c1-no harmonic 59.38 180.00 # SOURCE3 3 0.0000
angle_coeff @angle:c1-c1-o harmonic 66.79 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-oh harmonic 62.70 176.65 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-os harmonic 62.77 176.42 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-p2 harmonic 65.19 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-p3 harmonic 66.41 169.63 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-p4 harmonic 64.47 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-p5 harmonic 66.52 176.17 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-s4 harmonic 54.12 167.47 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-s6 harmonic 53.74 174.38 # SOURCE3 2 0.0000
angle_coeff @angle:c1-c1-s harmonic 55.65 179.97 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c1-sh harmonic 54.14 180.00 # SOURCE3 1
angle_coeff @angle:c1-c1-ss harmonic 55.22 173.22 # SOURCE3 2 0.0000
angle_coeff @angle:c2-c1-c2 harmonic 58.20 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:c2-c1-ce harmonic 58.18 179.01 # SOURCE4 6 0.4656
angle_coeff @angle:c2-c1-n1 harmonic 63.14 180.00 # HF/6-31G* 1
angle_coeff @angle:c2-c1-o harmonic 63.07 179.50 # SOURCE2 1 0.0000
angle_coeff @angle:c2-c1-s2 harmonic 56.73 172.98 # SOURCE3 1 0.0000
angle_coeff @angle:c3-c1-c3 harmonic 51.75 180.00 # Guess 0
angle_coeff @angle:c3-c1-cg harmonic 55.79 178.52 # SOURCE4 39 0.5063
angle_coeff @angle:c3-c1-n1 harmonic 58.10 178.50 # SOURCE4 77 0.5443
angle_coeff @angle:ca-c1-ca harmonic 52.83 180.00 # Guess 0
angle_coeff @angle:c-c1-c1 harmonic 56.33 180.00 # SOURCE3 1
angle_coeff @angle:cg-c1-ha harmonic 43.98 177.41 # SOURCE3 22 2.4947
angle_coeff @angle:ch-c1-ha harmonic 43.98 177.41 # SOURCE3 22 same_as_cg-c1-ha
angle_coeff @angle:cl-c1-cl harmonic 46.64 180.00 # Guess 0
angle_coeff @angle:f-c1-f harmonic 58.19 180.00 # Guess 0
angle_coeff @angle:i-c1-i harmonic 53.41 180.00 # Guess 0
angle_coeff @angle:n1-c1-n1 harmonic 93.20 102.01 # SOURCE3 1
angle_coeff @angle:n1-c1-n3 harmonic 63.71 169.70 # SOURCE2 1 0.0000
angle_coeff @angle:n1-c1-nh harmonic 64.02 177.43 # SOURCE4 7 0.7877
angle_coeff @angle:n1-c1-os harmonic 64.72 178.59 # SOURCE3 1 0.0000
angle_coeff @angle:n1-c1-p3 harmonic 67.69 171.20 # SOURCE2 1 0.0000
angle_coeff @angle:n1-c1-ss harmonic 55.82 178.68 # SOURCE3 1 0.0000
angle_coeff @angle:n2-c1-n2 harmonic 65.99 180.00 # Guess 0
angle_coeff @angle:n2-c1-o harmonic 69.15 171.79 # SOURCE3 2 0.3594
angle_coeff @angle:n2-c1-s harmonic 57.48 176.01 # SOURCE4 9 0.1123
angle_coeff @angle:n3-c1-n3 harmonic 57.36 180.00 # Guess 0
angle_coeff @angle:n4-c1-n4 harmonic 56.35 180.00 # Guess 0
angle_coeff @angle:na-c1-na harmonic 58.62 180.00 # Guess 0
angle_coeff @angle:ne-c1-o harmonic 69.39 172.33 # SOURCE3 1 0.0000
angle_coeff @angle:ne-c1-s harmonic 57.59 175.81 # SOURCE4 8 0.2356
angle_coeff @angle:nf-c1-o harmonic 69.39 172.33 # SOURCE3 1 same_as_ne-c1-o
angle_coeff @angle:nh-c1-nh harmonic 59.55 180.00 # Guess 0
angle_coeff @angle:n-c1-n harmonic 60.03 180.00 # Guess 0
angle_coeff @angle:no-c1-no harmonic 56.83 180.00 # Guess 0
angle_coeff @angle:oh-c1-oh harmonic 60.91 180.00 # Guess 0
angle_coeff @angle:o-c1-o harmonic 69.27 180.00 # Guess 0
angle_coeff @angle:os-c1-os harmonic 60.96 180.00 # Guess 0
angle_coeff @angle:p2-c1-p2 harmonic 80.59 180.00 # Guess 0
angle_coeff @angle:p3-c1-p3 harmonic 79.69 180.00 # Guess 0
angle_coeff @angle:p4-c1-p4 harmonic 79.69 180.00 # Guess 0
angle_coeff @angle:p5-c1-p5 harmonic 81.37 180.00 # Guess 0
angle_coeff @angle:s2-c1-s2 harmonic 55.83 180.00 # Guess 0
angle_coeff @angle:s4-c1-s4 harmonic 51.00 180.00 # Guess 0
angle_coeff @angle:s6-c1-s6 harmonic 51.72 180.00 # Guess 0
angle_coeff @angle:sh-c1-sh harmonic 53.01 180.00 # Guess 0
angle_coeff @angle:s-c1-s harmonic 54.63 180.00 # Guess 0
angle_coeff @angle:ss-c1-ss harmonic 53.04 180.00 # Guess 0
angle_coeff @angle:br-c2-br harmonic 68.56 115.06 # SOURCE3 1 0.0000
angle_coeff @angle:br-c2-c2 harmonic 63.97 118.96 # SOURCE4 6 0.4902
angle_coeff @angle:br-c2-c3 harmonic 63.71 115.33 # SOURCE4 6 0.5872
angle_coeff @angle:br-c2-ce harmonic 63.21 121.59 # SOURCE4 7 0.7078
angle_coeff @angle:br-c2-h4 harmonic 43.04 113.94 # SOURCE4 6 0.4017
angle_coeff @angle:br-c2-ha harmonic 43.18 113.28 # SOURCE3 1 0.0000
angle_coeff @angle:c1-c2-c1 harmonic 72.26 116.77 # SOURCE3 1
angle_coeff @angle:c1-c2-c2 harmonic 70.34 121.62 # SOURCE3 1
angle_coeff @angle:c1-c2-c3 harmonic 64.22 124.92 # SOURCE4 17 0.7576
angle_coeff @angle:c1-c2-f harmonic 67.99 124.90 # SOURCE2 1 0.0000
angle_coeff @angle:c1-c2-ha harmonic 50.43 121.37 # SOURCE3 8 0.0055
angle_coeff @angle:c2-c2-c2 harmonic 69.84 121.81 # SOURCE3 10 0.3843
angle_coeff @angle:c2-c2-c3 harmonic 64.33 123.42 # SOURCE3 41 2.6057
angle_coeff @angle:c2-c2-ca harmonic 66.88 117.00 # SOURCE3 1
angle_coeff @angle:c2-c2-cc harmonic 70.22 117.21 # SOURCE3 2 0.3418
angle_coeff @angle:c2-c2-cd harmonic 70.22 117.21 # SOURCE3 2 same_as_c2-c2-cc
angle_coeff @angle:c2-c2-cl harmonic 58.43 122.85 # SOURCE4 23 0.6711
angle_coeff @angle:c2-c2-cx harmonic 64.50 125.40 # SOURCE4 12 1.8494
angle_coeff @angle:c2-c2-cy harmonic 70.42 103.30 # SOURCE2 1 0.0000
angle_coeff @angle:c2-c2-f harmonic 68.11 122.92 # SOURCE4 12 0.5301
angle_coeff @angle:c2-c2-h4 harmonic 49.75 122.54 # SOURCE4 69 1.1900
angle_coeff @angle:c2-c2-ha harmonic 50.04 120.94 # SOURCE3 254 1.3150
angle_coeff @angle:c2-c2-hc harmonic 50.30 119.70 # SOURCE3 1
angle_coeff @angle:c2-c2-hx harmonic 48.98 126.45 # SOURCE3 3 0.0219
angle_coeff @angle:c2-c2-i harmonic 56.28 121.03 # SOURCE3 2 0.0000
angle_coeff @angle:c2-c2-n1 harmonic 71.69 122.98 # HF/6-31G* 1
angle_coeff @angle:c2-c2-n2 harmonic 71.29 126.01 # SOURCE3 1 0.0000
angle_coeff @angle:c2-c2-n3 harmonic 70.33 124.55 # SOURCE3 1
angle_coeff @angle:c2-c2-n4 harmonic 67.18 121.52 # SOURCE3 5 1.2656
angle_coeff @angle:c2-c2-n harmonic 68.86 123.20 # SOURCE4 15 1.8657
angle_coeff @angle:c2-c2-na harmonic 69.83 121.38 # SOURCE3 26 6.9463
angle_coeff @angle:c2-c2-nh harmonic 69.80 124.99 # SOURCE3 7 0.9929
angle_coeff @angle:c2-c2-no harmonic 67.52 124.09 # SOURCE4 6 1.2772
angle_coeff @angle:c2-c2-o harmonic 71.92 130.89 # SOURCE3 2 0.0201
angle_coeff @angle:c2-c2-oh harmonic 71.64 122.07 # SOURCE4 6 1.0883
angle_coeff @angle:c2-c2-os harmonic 71.04 121.89 # SOURCE4 33 1.3457
angle_coeff @angle:c2-c2-p2 harmonic 84.73 115.10 # SOURCE3 1
angle_coeff @angle:c2-c2-p3 harmonic 75.19 124.83 # SOURCE3 5 2.1222
angle_coeff @angle:c2-c2-p4 harmonic 77.22 119.76 # SOURCE3 1
angle_coeff @angle:c2-c2-p5 harmonic 73.70 125.97 # SOURCE3 1
angle_coeff @angle:c2-c2-s4 harmonic 62.85 119.84 # SOURCE3 1
angle_coeff @angle:c2-c2-s6 harmonic 62.81 120.01 # SOURCE3 1
angle_coeff @angle:c2-c2-s harmonic 61.25 129.37 # SOURCE3 2 0.0000
angle_coeff @angle:c2-c2-sh harmonic 60.87 125.70 # SOURCE3 3 1.3390
angle_coeff @angle:c2-c2-ss harmonic 62.79 122.86 # SOURCE4 13 1.7467
angle_coeff @angle:c3-c2-c3 harmonic 62.70 116.52 # SOURCE3 15 3.1001
angle_coeff @angle:c3-c2-cc harmonic 63.22 125.39 # CORR 27
angle_coeff @angle:c3-c2-cd harmonic 63.22 125.39 # CORR 27
angle_coeff @angle:c3-c2-ce harmonic 64.17 123.08 # CORR 1288
angle_coeff @angle:c3-c2-cf harmonic 64.17 123.08 # CORR 1288
angle_coeff @angle:c3-c2-h4 harmonic 45.30 119.25 # SOURCE4 22 2.1707
angle_coeff @angle:c3-c2-ha harmonic 45.66 117.30 # SOURCE3 33 1.7453
angle_coeff @angle:c3-c2-hc harmonic 45.15 120.00 # SOURCE3 1
angle_coeff @angle:c3-c2-n2 harmonic 66.47 123.52 # SOURCE4 141 2.2935
angle_coeff @angle:c3-c2-n harmonic 66.79 114.80 # SOURCE4 12 1.8112
angle_coeff @angle:c3-c2-na harmonic 64.95 122.54 # SOURCE3 1 0.0000
angle_coeff @angle:c3-c2-ne harmonic 66.96 122.15 # SOURCE3 4 0.2197
angle_coeff @angle:c3-c2-nf harmonic 66.96 122.15 # SOURCE3 4 same_as_c3-c2-ne
angle_coeff @angle:c3-c2-nh harmonic 66.69 118.59 # SOURCE3 6 2.2622
angle_coeff @angle:c3-c2-o harmonic 67.88 123.18 # SOURCE4 5 0.9226
angle_coeff @angle:c3-c2-oh harmonic 68.50 115.04 # SOURCE4 36 2.0110
angle_coeff @angle:c3-c2-os harmonic 68.77 112.69 # SOURCE4 50 2.4254
angle_coeff @angle:c3-c2-p2 harmonic 78.98 122.74 # SOURCE3 2 0.0000
angle_coeff @angle:c3-c2-s harmonic 62.79 115.44 # SOURCE3 2 0.0115
angle_coeff @angle:c3-c2-ss harmonic 61.62 119.66 # SOURCE4 45 1.9732
angle_coeff @angle:ca-c2-ca harmonic 63.51 117.88 # SOURCE3 1
angle_coeff @angle:ca-c2-hc harmonic 45.28 123.30 # SOURCE3 1
angle_coeff @angle:c-c2-c2 harmonic 67.93 120.70 # SOURCE3 1
angle_coeff @angle:c-c2-c3 harmonic 63.87 119.70 # SOURCE3 1
angle_coeff @angle:c-c2-c harmonic 66.57 118.88 # SOURCE3 1
angle_coeff @angle:cc-c2-h4 harmonic 49.19 120.33 # SOURCE4 7 0.0865
angle_coeff @angle:cc-c2-ha harmonic 49.07 120.76 # SOURCE3 11 1.4155
angle_coeff @angle:cc-c2-nh harmonic 69.46 122.96 # SOURCE4 10 0.7347
angle_coeff @angle:cc-c2-o harmonic 72.80 123.59 # SOURCE4 6 0.0560
angle_coeff @angle:cd-c2-ha harmonic 49.07 120.76 # SOURCE3 11 1.4155
angle_coeff @angle:ce-c2-cl harmonic 58.06 123.90 # SOURCE4 11 0.3570
angle_coeff @angle:ce-c2-h4 harmonic 49.38 122.29 # SOURCE4 75 1.4008
angle_coeff @angle:ce-c2-ha harmonic 49.57 121.19 # SOURCE3 122 0.5318
angle_coeff @angle:ce-c2-na harmonic 68.82 123.71 # SOURCE4 6 2.0109
angle_coeff @angle:ce-c2-nh harmonic 70.64 120.72 # SOURCE4 93 2.2537
angle_coeff @angle:ce-c2-no harmonic 68.45 119.65 # SOURCE4 5 0.9817
angle_coeff @angle:ce-c2-o harmonic 73.66 123.08 # SOURCE4 5 0.2391
angle_coeff @angle:ce-c2-oh harmonic 70.90 123.27 # SOURCE4 42 1.8111
angle_coeff @angle:ce-c2-os harmonic 70.47 122.52 # SOURCE4 51 2.4680
angle_coeff @angle:cf-c2-ha harmonic 49.57 121.19 # SOURCE3 122 same_as_ce-c2-ha
angle_coeff @angle:c-c2-ha harmonic 47.67 121.33 # SOURCE3 4 0.2462
angle_coeff @angle:c-c2-hc harmonic 48.00 119.70 # SOURCE3 1
angle_coeff @angle:cl-c2-cl harmonic 55.44 114.27 # SOURCE4 10 0.5850
angle_coeff @angle:cl-c2-h4 harmonic 40.76 113.77 # SOURCE4 9 0.6228
angle_coeff @angle:cl-c2-ha harmonic 40.86 113.20 # SOURCE3 1 0.0000
angle_coeff @angle:cx-c2-ha harmonic 46.61 115.89 # SOURCE4 15 0.3682
angle_coeff @angle:f-c2-f harmonic 70.67 109.60 # SOURCE2 2 0.6000
angle_coeff @angle:f-c2-ha harmonic 51.25 110.00 # SOURCE2 1 0.0000
angle_coeff @angle:h4-c2-n2 harmonic 52.40 120.69 # SOURCE4 13 1.3105
angle_coeff @angle:h4-c2-n harmonic 50.48 113.57 # SOURCE4 26 1.0283
angle_coeff @angle:h4-c2-na harmonic 51.03 113.22 # SOURCE4 9 0.6345
angle_coeff @angle:h4-c2-ne harmonic 52.87 119.63 # SOURCE4 10 1.6786
angle_coeff @angle:h4-c2-nh harmonic 51.55 115.64 # SOURCE4 31 1.0081
angle_coeff @angle:h4-c2-no harmonic 49.39 113.38 # SOURCE4 6 0.1240
angle_coeff @angle:h4-c2-os harmonic 52.23 113.70 # SOURCE3 13 2.0464
angle_coeff @angle:h4-c2-ss harmonic 42.85 118.47 # SOURCE3 9 2.5335
angle_coeff @angle:h5-c2-n2 harmonic 52.41 120.16 # SOURCE4 27 1.8999
angle_coeff @angle:h5-c2-na harmonic 48.23 126.39 # SOURCE3 4 0.3299
angle_coeff @angle:h5-c2-ne harmonic 52.76 119.62 # SOURCE4 17 1.3235
angle_coeff @angle:h5-c2-nh harmonic 51.85 113.93 # SOURCE4 50 0.8394
angle_coeff @angle:ha-c2-ha harmonic 38.02 117.65 # SOURCE3 349 1.3426
angle_coeff @angle:ha-c2-n1 harmonic 51.83 120.76 # SOURCE3 8 0.6632
angle_coeff @angle:ha-c2-n2 harmonic 52.39 120.54 # SOURCE3 92 1.4571
angle_coeff @angle:ha-c2-n3 harmonic 52.44 113.54 # SOURCE3 1
angle_coeff @angle:ha-c2-n harmonic 50.49 113.40 # SOURCE3 4 1.2182
angle_coeff @angle:ha-c2-na harmonic 51.18 112.42 # SOURCE3 8 0.6507
angle_coeff @angle:ha-c2-ne harmonic 52.48 121.18 # SOURCE3 68 0.6824
angle_coeff @angle:ha-c2-nf harmonic 52.48 121.18 # SOURCE3 68 same_as_ha-c2-ne
angle_coeff @angle:ha-c2-nh harmonic 51.29 116.68 # SOURCE3 13 2.5734
angle_coeff @angle:ha-c2-no harmonic 49.64 112.14 # SOURCE3 2 0.0264
angle_coeff @angle:ha-c2-o harmonic 55.30 117.23 # SOURCE3 2 0.0201
angle_coeff @angle:ha-c2-oh harmonic 52.34 116.18 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-os harmonic 52.43 112.69 # SOURCE3 13 2.5851
angle_coeff @angle:ha-c2-p2 harmonic 55.74 121.48 # SOURCE3 122 0.4329
angle_coeff @angle:ha-c2-p3 harmonic 52.04 114.31 # SOURCE3 3 0.0000
angle_coeff @angle:ha-c2-p4 harmonic 51.62 117.86 # SOURCE3 1
angle_coeff @angle:ha-c2-p5 harmonic 49.81 120.10 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-pe harmonic 55.05 121.46 # SOURCE3 104 0.7821
angle_coeff @angle:ha-c2-pf harmonic 55.05 121.46 # SOURCE3 104 same_as_ha-c2-pe
angle_coeff @angle:ha-c2-s2 harmonic 46.19 118.74 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-s4 harmonic 42.81 115.30 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-s harmonic 43.42 115.70 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-s6 harmonic 42.58 116.60 # SOURCE3 2 0.0000
angle_coeff @angle:ha-c2-sh harmonic 43.04 111.74 # SOURCE3 1 0.0000
angle_coeff @angle:ha-c2-ss harmonic 43.18 116.72 # SOURCE3 7 2.7543
angle_coeff @angle:hc-c2-hc harmonic 37.81 118.92 # SOURCE3 1
angle_coeff @angle:hc-c2-n2 harmonic 52.42 120.40 # SOURCE3 1
angle_coeff @angle:hc-c2-n harmonic 50.35 114.04 # SOURCE3 1
angle_coeff @angle:hc-c2-na harmonic 49.73 119.10 # SOURCE3 1
angle_coeff @angle:hc-c2-nh harmonic 52.03 113.36 # SOURCE3 1
angle_coeff @angle:hc-c2-no harmonic 49.64 112.12 # SOURCE3 1
angle_coeff @angle:hc-c2-oh harmonic 52.33 116.22 # SOURCE3 1
angle_coeff @angle:hc-c2-os harmonic 51.65 116.11 # SOURCE3 1
angle_coeff @angle:hc-c2-p3 harmonic 51.40 117.19 # SOURCE3 1
angle_coeff @angle:hc-c2-p5 harmonic 49.92 119.58 # SOURCE3 1
angle_coeff @angle:hc-c2-s4 harmonic 42.66 116.12 # SOURCE3 1
angle_coeff @angle:hc-c2-s6 harmonic 42.79 115.45 # SOURCE3 1
angle_coeff @angle:hc-c2-sh harmonic 42.31 115.63 # SOURCE3 1
angle_coeff @angle:hc-c2-ss harmonic 43.38 115.62 # SOURCE3 1
angle_coeff @angle:hx-c2-n4 harmonic 48.42 113.03 # SOURCE3 3 0.3873
angle_coeff @angle:i-c2-i harmonic 60.96 117.94 # SOURCE3 1 0.0000
angle_coeff @angle:n1-c2-n1 harmonic 73.61 124.15 # HF/6-31G* 1
angle_coeff @angle:n2-c2-n2 harmonic 77.96 113.82 # SOURCE3 1 0.0000
angle_coeff @angle:n2-c2-n4 harmonic 72.03 113.05 # SOURCE4 6 0.3318
angle_coeff @angle:n2-c2-na harmonic 71.71 123.62 # SOURCE3 1 0.0000
angle_coeff @angle:n2-c2-nh harmonic 72.62 124.27 # SOURCE3 12 2.4114
angle_coeff @angle:n2-c2-oh harmonic 74.36 122.08 # SOURCE3 1 0.0000
angle_coeff @angle:n2-c2-os harmonic 74.32 119.82 # SOURCE4 20 1.2664
angle_coeff @angle:n2-c2-ss harmonic 62.86 129.77 # SOURCE3 1 0.0000
angle_coeff @angle:n3-c2-n3 harmonic 73.45 118.47 # SOURCE3 1
angle_coeff @angle:n4-c2-n4 harmonic 67.72 113.93 # SOURCE3 1 0.0000
angle_coeff @angle:n4-c2-ss harmonic 64.40 116.26 # SOURCE4 7 2.4226
angle_coeff @angle:na-c2-na harmonic 73.65 109.33 # SOURCE3 3 3.0187
angle_coeff @angle:ne-c2-nh harmonic 73.03 123.56 # CORR 128
angle_coeff @angle:ne-c2-os harmonic 74.86 118.76 # SOURCE4 5 0.3382
angle_coeff @angle:ne-c2-ss harmonic 65.41 120.06 # SOURCE4 9 1.3423
angle_coeff @angle:nf-c2-nh harmonic 73.03 123.56 # CORR 128
angle_coeff @angle:nh-c2-nh harmonic 74.46 112.72 # SOURCE4 257 1.8176
angle_coeff @angle:nh-c2-oh harmonic 74.05 117.16 # SOURCE4 7 0.8698
angle_coeff @angle:nh-c2-os harmonic 74.32 114.29 # SOURCE4 18 1.0900
angle_coeff @angle:nh-c2-ss harmonic 67.23 111.55 # SOURCE4 37 1.1778
angle_coeff @angle:n-c2-n2 harmonic 70.56 125.95 # SOURCE3 2 5.0202
angle_coeff @angle:n-c2-n harmonic 71.55 113.23 # SOURCE3 1 0.0000
angle_coeff @angle:n-c2-na harmonic 74.57 105.42 # SOURCE3 1 0.0000
angle_coeff @angle:n-c2-ne harmonic 70.89 125.38 # SOURCE4 10 1.6819
angle_coeff @angle:n-c2-nh harmonic 74.20 109.14 # SOURCE4 22 1.5634
angle_coeff @angle:no-c2-no harmonic 69.43 113.90 # SOURCE3 1 0.0000
angle_coeff @angle:n-c2-ss harmonic 66.83 111.06 # SOURCE4 9 0.5522
angle_coeff @angle:oh-c2-oh harmonic 76.03 114.33 # SOURCE3 1 0.0000
angle_coeff @angle:o-c2-o harmonic 80.23 121.69 # SOURCE3 1
angle_coeff @angle:o-c2-oh harmonic 76.69 121.23 # SOURCE4 6 0.0958
angle_coeff @angle:o-c2-s harmonic 64.15 127.68 # SOURCE3 2 0.0547
angle_coeff @angle:os-c2-os harmonic 74.21 115.80 # SOURCE3 1 0.0000
angle_coeff @angle:p2-c2-p2 harmonic 100.59 129.80 # SOURCE3 1
angle_coeff @angle:p3-c2-p3 harmonic 97.08 115.54 # SOURCE3 1 0.0000
angle_coeff @angle:p5-c2-p5 harmonic 92.92 121.85 # SOURCE3 1
angle_coeff @angle:s4-c2-s4 harmonic 61.89 120.32 # SOURCE3 1
angle_coeff @angle:s4-c2-s6 harmonic 61.98 119.95 # SOURCE3 1
angle_coeff @angle:s6-c2-s6 harmonic 61.98 119.97 # SOURCE3 1
angle_coeff @angle:sh-c2-sh harmonic 63.96 110.48 # SOURCE3 1 0.0000
angle_coeff @angle:sh-c2-ss harmonic 62.65 117.82 # SOURCE3 1
angle_coeff @angle:s-c2-s harmonic 62.47 121.67 # SOURCE3 1
angle_coeff @angle:ss-c2-ss harmonic 62.77 120.24 # SOURCE3 1 0.0000
angle_coeff @angle:br-c3-br harmonic 67.46 109.03 # SOURCE4 6 0.5435
angle_coeff @angle:br-c3-c1 harmonic 62.77 111.80 # SOURCE2 3 0.2160
angle_coeff @angle:br-c3-c3 harmonic 63.03 109.25 # SOURCE3 10 0.5685
angle_coeff @angle:br-c3-c harmonic 62.92 110.37 # SOURCE4 13 2.4747
angle_coeff @angle:br-c3-h1 harmonic 43.12 103.04 # SOURCE3 5 0.3092
angle_coeff @angle:br-c3-h2 harmonic 42.34 107.10 # SOURCE4 7 0.2378
angle_coeff @angle:br-c3-hc harmonic 42.40 106.50 # SOURCE3 1
angle_coeff @angle:c1-c3-c1 harmonic 66.50 109.00 # SOURCE2 1 0.0000
angle_coeff @angle:c1-c3-c2 harmonic 65.00 111.11 # SOURCE4 12 0.7366
angle_coeff @angle:c1-c3-c3 harmonic 64.29 111.42 # SOURCE4 197 1.2106
angle_coeff @angle:c1-c3-ca harmonic 64.93 110.95 # SOURCE4 28 1.1203
angle_coeff @angle:c1-c3-cc harmonic 64.32 114.20 # CORR 13
angle_coeff @angle:c1-c3-cd harmonic 64.32 114.20 # CORR 13
angle_coeff @angle:c1-c3-cl harmonic 58.49 110.63 # SOURCE2 3 1.2257
angle_coeff @angle:c1-c3-h1 harmonic 48.35 109.29 # SOURCE4 133 0.5701
angle_coeff @angle:c1-c3-hc harmonic 48.25 109.75 # SOURCE3 12 0.8436
angle_coeff @angle:c1-c3-hx harmonic 47.76 112.05 # SOURCE4 17 0.2587
angle_coeff @angle:c1-c3-n3 harmonic 67.03 112.59 # SOURCE4 28 0.9555
angle_coeff @angle:c1-c3-n4 harmonic 66.53 112.04 # SOURCE4 11 0.5701
angle_coeff @angle:c1-c3-n harmonic 67.41 112.08 # SOURCE4 18 0.9568
angle_coeff @angle:c1-c3-nh harmonic 67.25 112.79 # SOURCE4 8 0.9453
angle_coeff @angle:c1-c3-oh harmonic 69.49 109.14 # SOURCE4 39 0.6500
angle_coeff @angle:c1-c3-os harmonic 69.27 108.88 # SOURCE4 31 0.9597
angle_coeff @angle:c2-c3-c2 harmonic 63.93 112.08 # SOURCE4 153 0.7742
angle_coeff @angle:c2-c3-c3 harmonic 63.53 111.44 # SOURCE4 2891 1.7167
angle_coeff @angle:c2-c3-ca harmonic 63.71 112.45 # SOURCE4 141 1.6755
angle_coeff @angle:c2-c3-cc harmonic 64.24 111.64 # CORR 32
angle_coeff @angle:c2-c3-cd harmonic 64.24 111.64 # CORR 32
angle_coeff @angle:c2-c3-ce harmonic 64.05 111.87 # CORR 38
angle_coeff @angle:c2-c3-cf harmonic 64.05 111.87 # CORR 38
angle_coeff @angle:c2-c3-cl harmonic 57.71 112.07 # SOURCE4 6 0.9936
angle_coeff @angle:c2-c3-cx harmonic 63.65 112.62 # SOURCE4 17 1.3287
angle_coeff @angle:c2-c3-cy harmonic 66.76 101.33 # SOURCE4 58 0.9262
angle_coeff @angle:c2-c3-f harmonic 66.52 110.96 # SOURCE4 25 0.2829
angle_coeff @angle:c2-c3-h1 harmonic 47.03 110.46 # SOURCE3 17 1.1525
angle_coeff @angle:c2-c3-h2 harmonic 46.84 111.19 # SOURCE4 17 0.8311
angle_coeff @angle:c2-c3-hc harmonic 47.03 110.49 # SOURCE3 159 0.7479
angle_coeff @angle:c2-c3-hx harmonic 46.83 111.45 # SOURCE4 20 0.9004
angle_coeff @angle:c2-c3-n2 harmonic 67.09 108.99 # SOURCE4 10 1.2025
angle_coeff @angle:c2-c3-n3 harmonic 66.47 111.52 # SOURCE4 158 1.4012
angle_coeff @angle:c2-c3-n harmonic 66.73 111.38 # SOURCE4 67 1.7559
angle_coeff @angle:c2-c3-na harmonic 66.24 113.30 # SOURCE4 27 1.2945
angle_coeff @angle:c2-c3-nh harmonic 67.10 110.27 # SOURCE4 56 1.8018
angle_coeff @angle:c2-c3-oh harmonic 68.18 110.21 # SOURCE4 220 1.4197
angle_coeff @angle:c2-c3-os harmonic 68.45 108.48 # SOURCE4 204 1.6082
angle_coeff @angle:c2-c3-s4 harmonic 62.57 109.73 # SOURCE4 6 0.1722
angle_coeff @angle:c2-c3-ss harmonic 63.62 104.97 # SOURCE3 2 2.2248
angle_coeff @angle:c3-c3-c3 harmonic 63.21 110.63 # SOURCE3 507 2.7845
angle_coeff @angle:c3-c3-ca harmonic 63.25 112.09 # SOURCE4 3859 1.5523
angle_coeff @angle:c3-c3-cc harmonic 63.58 111.89 # CORR 700
angle_coeff @angle:c3-c3-cd harmonic 63.58 111.89 # CORR 700
angle_coeff @angle:c3-c3-ce harmonic 63.70 111.06 # CORR 490
angle_coeff @angle:c3-c3-cf harmonic 63.70 111.06 # CORR 490
angle_coeff @angle:c3-c3-cl harmonic 57.85 110.33 # SOURCE3 20 1.1495
angle_coeff @angle:c3-c3-cx harmonic 63.30 111.82 # SOURCE4 179 2.4814
angle_coeff @angle:c3-c3-cy harmonic 63.63 109.62 # SOURCE3 5 2.0747
angle_coeff @angle:c3-c3-f harmonic 66.22 109.41 # SOURCE3 18 1.1878
angle_coeff @angle:c3-c3-h1 harmonic 46.36 110.07 # SOURCE3 457 1.1542
angle_coeff @angle:c3-c3-h2 harmonic 46.02 111.59 # SOURCE3 8 1.1217
angle_coeff @angle:c3-c3-hc harmonic 46.37 110.05 # SOURCE3 2092 0.6991
angle_coeff @angle:c3-c3-hx harmonic 46.02 111.74 # SOURCE3 15 1.2365
angle_coeff @angle:c3-c3-i harmonic 58.48 110.96 # SOURCE3 2 0.0000
angle_coeff @angle:c3-c3-n1 harmonic 66.64 108.86 # SOURCE4 9 0.8093
angle_coeff @angle:c3-c3-n2 harmonic 66.40 109.16 # SOURCE3 8 1.4079
angle_coeff @angle:c3-c3-n3 harmonic 66.18 110.38 # SOURCE3 69 2.9054
angle_coeff @angle:c3-c3-n4 harmonic 64.45 114.32 # SOURCE4 567 2.4412
angle_coeff @angle:c3-c3-n harmonic 65.85 112.13 # SOURCE3 31 2.0700
angle_coeff @angle:c3-c3-na harmonic 65.73 112.81 # SOURCE4 595 1.5050
angle_coeff @angle:c3-c3-nh harmonic 66.39 110.45 # SOURCE4 1514 1.3881
angle_coeff @angle:c3-c3-no harmonic 65.21 109.27 # SOURCE4 25 1.1817
angle_coeff @angle:c3-c3-o harmonic 68.59 112.97 # SOURCE4 14 1.0277
angle_coeff @angle:c3-c3-oh harmonic 67.72 109.43 # SOURCE3 48 1.5023
angle_coeff @angle:c3-c3-os harmonic 67.78 108.42 # SOURCE3 122 1.6759
angle_coeff @angle:c3-c3-p3 harmonic 76.46 113.19 # SOURCE4 15 0.2974
angle_coeff @angle:c3-c3-p5 harmonic 77.70 112.32 # SOURCE4 106 1.1753
angle_coeff @angle:c3-c3-s4 harmonic 62.16 110.07 # SOURCE4 38 0.8510
angle_coeff @angle:c3-c3-s6 harmonic 62.98 110.00 # SOURCE4 152 1.4278
angle_coeff @angle:c3-c3-sh harmonic 60.98 113.02 # SOURCE4 80 1.3442
angle_coeff @angle:c3-c3-ss harmonic 61.10 112.69 # SOURCE3 24 2.1842
angle_coeff @angle:c3-c3-sy harmonic 62.81 109.91 # SOURCE4 22 0.9248
angle_coeff @angle:ca-c3-ca harmonic 63.66 112.26 # SOURCE4 385 1.7047
angle_coeff @angle:ca-c3-cc harmonic 63.92 112.38 # CORR 69
angle_coeff @angle:ca-c3-cd harmonic 63.92 112.38 # CORR 69
angle_coeff @angle:ca-c3-ce harmonic 63.81 112.33 # SOURCE4 51 1.1929
angle_coeff @angle:ca-c3-cl harmonic 57.85 111.31 # SOURCE4 16 0.8077
angle_coeff @angle:ca-c3-cx harmonic 63.69 112.10 # SOURCE4 5 2.1117
angle_coeff @angle:ca-c3-f harmonic 66.14 111.76 # SOURCE4 449 0.3492
angle_coeff @angle:ca-c3-h1 harmonic 46.78 110.95 # SOURCE3 12 1.1170
angle_coeff @angle:ca-c3-h2 harmonic 47.03 109.66 # SOURCE4 29 1.2184
angle_coeff @angle:ca-c3-hc harmonic 46.96 110.15 # SOURCE3 47 1.2602
angle_coeff @angle:ca-c3-hx harmonic 46.69 111.44 # SOURCE4 33 0.4691
angle_coeff @angle:ca-c3-n2 harmonic 65.92 112.49 # SOURCE4 22 1.1043
angle_coeff @angle:ca-c3-n3 harmonic 66.18 112.13 # SOURCE4 387 1.2309
angle_coeff @angle:ca-c3-n4 harmonic 64.87 114.54 # SOURCE4 22 2.3986
angle_coeff @angle:ca-c3-n harmonic 66.29 112.43 # SOURCE4 201 1.5133
angle_coeff @angle:ca-c3-na harmonic 66.27 112.81 # SOURCE4 104 1.5807
angle_coeff @angle:ca-c3-nc harmonic 68.20 106.51 # SOURCE3 1 0.0000
angle_coeff @angle:ca-c3-nd harmonic 68.20 106.51 # SOURCE3 1 same_as_ca-c3-nc
angle_coeff @angle:ca-c3-nh harmonic 66.64 111.41 # SOURCE4 147 1.0074
angle_coeff @angle:ca-c3-oh harmonic 67.94 110.55 # SOURCE4 348 1.2310
angle_coeff @angle:ca-c3-os harmonic 68.19 108.89 # SOURCE4 411 1.0102
angle_coeff @angle:ca-c3-p5 harmonic 77.64 113.41 # SOURCE4 19 1.4444
angle_coeff @angle:ca-c3-s6 harmonic 62.87 111.36 # SOURCE4 15 1.4775
angle_coeff @angle:ca-c3-ss harmonic 61.90 110.66 # SOURCE4 78 1.4797
angle_coeff @angle:ca-c3-sx harmonic 62.16 110.80 # SOURCE4 16 0.5396
angle_coeff @angle:c-c3-c1 harmonic 64.56 112.64 # SOURCE4 11 1.0678
angle_coeff @angle:c-c3-c2 harmonic 64.14 111.32 # SOURCE4 92 1.8522
angle_coeff @angle:c-c3-c3 harmonic 63.79 110.53 # SOURCE3 62 1.9636
angle_coeff @angle:c-c3-c harmonic 64.06 111.61 # SOURCE4 151 2.1872
angle_coeff @angle:c-c3-ca harmonic 64.13 110.99 # SOURCE4 481 1.7257
angle_coeff @angle:c-c3-cc harmonic 63.89 112.89 # CORR 104
angle_coeff @angle:cc-c3-cc harmonic 64.61 111.05 # CORR 19
angle_coeff @angle:cc-c3-cd harmonic 67.30 102.35 # SOURCE3 1 0.0000
angle_coeff @angle:cc-c3-cx harmonic 63.85 112.55 # SOURCE4 5 1.4317
angle_coeff @angle:c-c3-cd harmonic 63.89 112.89 # CORR 104
angle_coeff @angle:c-c3-ce harmonic 64.02 111.98 # SOURCE4 16 2.1388
angle_coeff @angle:cc-c3-f harmonic 66.70 111.22 # CORR 69
angle_coeff @angle:cc-c3-h1 harmonic 47.03 111.62 # SOURCE3 20 1.0215
angle_coeff @angle:cc-c3-hc harmonic 47.20 110.86 # SOURCE3 85 1.0276
angle_coeff @angle:cc-c3-hx harmonic 47.17 111.02 # SOURCE4 9 0.7503
angle_coeff @angle:c-c3-cl harmonic 57.94 111.16 # SOURCE4 41 1.2257
angle_coeff @angle:cc-c3-n2 harmonic 66.85 110.47 # SOURCE4 11 0.5153
angle_coeff @angle:cc-c3-n3 harmonic 66.79 111.17 # CORR 111
angle_coeff @angle:cc-c3-n4 harmonic 64.88 115.58 # SOURCE4 6 1.1723
angle_coeff @angle:cc-c3-n harmonic 66.84 111.71 # CORR 32
angle_coeff @angle:cc-c3-na harmonic 66.43 113.39 # SOURCE4 8 0.8010
angle_coeff @angle:cc-c3-nc harmonic 68.37 107.04 # SOURCE3 2 0.0000
angle_coeff @angle:cc-c3-nh harmonic 66.68 112.38 # CORR 21
angle_coeff @angle:cc-c3-oh harmonic 68.13 111.10 # CORR 116
angle_coeff @angle:cc-c3-os harmonic 68.51 109.01 # CORR 91
angle_coeff @angle:cc-c3-p5 harmonic 76.89 116.23 # SOURCE4 6 0.7766
angle_coeff @angle:cc-c3-sh harmonic 61.11 114.02 # SOURCE3 1 same_as_cd-c3-sh
angle_coeff @angle:cc-c3-ss harmonic 61.95 111.06 # CORR 43
angle_coeff @angle:c-c3-cx harmonic 64.08 111.09 # SOURCE4 9 1.2357
angle_coeff @angle:cd-c3-cd harmonic 64.61 111.05 # CORR 19
angle_coeff @angle:cd-c3-f harmonic 66.70 111.22 # CORR 69
angle_coeff @angle:cd-c3-h1 harmonic 47.03 111.62 # SOURCE3 20 1.0215
angle_coeff @angle:cd-c3-hc harmonic 47.20 110.86 # SOURCE3 85 1.0276
angle_coeff @angle:cd-c3-n3 harmonic 66.79 111.17 # CORR 111
angle_coeff @angle:cd-c3-n harmonic 66.84 111.71 # CORR 32
angle_coeff @angle:cd-c3-nd harmonic 68.37 107.04 # SOURCE3 2 same_as_cc-c3-nc
angle_coeff @angle:cd-c3-nh harmonic 66.68 112.38 # CORR 21
angle_coeff @angle:cd-c3-oh harmonic 68.13 111.10 # CORR 116
angle_coeff @angle:cd-c3-os harmonic 68.51 109.01 # CORR 91
angle_coeff @angle:cd-c3-sh harmonic 61.11 114.02 # SOURCE3 1 0.0000
angle_coeff @angle:cd-c3-ss harmonic 61.95 111.06 # CORR 43
angle_coeff @angle:ce-c3-ce harmonic 64.24 111.44 # SOURCE4 18 0.3695
angle_coeff @angle:ce-c3-cy harmonic 66.33 102.85 # CORR 55
angle_coeff @angle:ce-c3-h1 harmonic 47.30 109.59 # CORR 119
angle_coeff @angle:ce-c3-hc harmonic 47.00 110.98 # SOURCE3 27 0.1559
angle_coeff @angle:ce-c3-n3 harmonic 66.45 111.83 # CORR 28
angle_coeff @angle:ce-c3-n harmonic 67.09 110.41 # SOURCE4 6 1.1405
angle_coeff @angle:ce-c3-oh harmonic 68.00 111.05 # SOURCE4 17 1.5159
angle_coeff @angle:ce-c3-os harmonic 68.64 108.10 # SOURCE4 16 1.9583
angle_coeff @angle:ce-c3-ss harmonic 61.87 111.10 # SOURCE4 7 2.0156
angle_coeff @angle:c-c3-f harmonic 66.82 109.98 # SOURCE4 38 0.9895
angle_coeff @angle:cf-c3-cy harmonic 66.33 102.85 # CORR 55
angle_coeff @angle:cf-c3-h1 harmonic 47.30 109.59 # CORR 119
angle_coeff @angle:cf-c3-hc harmonic 47.00 110.98 # SOURCE3 27 same_as_ce-c3-hc
angle_coeff @angle:cf-c3-n3 harmonic 66.45 111.83 # CORR 28
angle_coeff @angle:c-c3-h1 harmonic 47.63 107.66 # SOURCE3 66 1.4015
angle_coeff @angle:c-c3-h2 harmonic 47.16 109.69 # SOURCE4 38 1.0614
angle_coeff @angle:c-c3-hc harmonic 47.20 109.68 # SOURCE3 614 0.6426
angle_coeff @angle:c-c3-hx harmonic 47.23 109.54 # SOURCE4 47 0.6627
angle_coeff @angle:cl-c3-cl harmonic 54.23 111.03 # SOURCE2 6 1.1324
angle_coeff @angle:cl-c3-f harmonic 59.15 109.02 # SOURCE4 15 0.3609
angle_coeff @angle:cl-c3-h1 harmonic 40.66 105.93 # SOURCE3 19 1.1883
angle_coeff @angle:cl-c3-h2 harmonic 40.44 107.14 # SOURCE4 50 0.5973
angle_coeff @angle:cl-c3-hc harmonic 40.33 107.65 # SOURCE2 2 2.2500
angle_coeff @angle:cl-c3-os harmonic 60.38 111.40 # SOURCE4 8 0.8275
angle_coeff @angle:cl-c3-ss harmonic 57.60 112.94 # SOURCE4 10 1.4625
angle_coeff @angle:c-c3-n2 harmonic 66.92 109.55 # SOURCE4 55 1.4579
angle_coeff @angle:c-c3-n3 harmonic 66.59 111.14 # SOURCE4 629 1.6673
angle_coeff @angle:c-c3-n4 harmonic 65.07 114.21 # SOURCE4 27 1.5388
angle_coeff @angle:c-c3-n harmonic 66.67 111.56 # SOURCE3 28 1.7981
angle_coeff @angle:c-c3-na harmonic 66.81 111.37 # SOURCE4 31 1.6229
angle_coeff @angle:c-c3-nh harmonic 67.36 109.43 # SOURCE4 42 1.7022
angle_coeff @angle:c-c3-oh harmonic 68.65 108.70 # SOURCE4 299 1.3415
angle_coeff @angle:c-c3-os harmonic 68.03 109.82 # SOURCE3 10 2.0612
angle_coeff @angle:c-c3-p5 harmonic 78.76 110.41 # SOURCE4 15 2.2683
angle_coeff @angle:c-c3-s6 harmonic 63.26 110.22 # SOURCE4 5 2.0076
angle_coeff @angle:c-c3-sh harmonic 62.46 108.82 # SOURCE4 12 0.8354
angle_coeff @angle:c-c3-ss harmonic 61.70 111.58 # SOURCE3 5 1.9506
angle_coeff @angle:cx-c3-cx harmonic 63.53 112.58 # SOURCE4 7 1.2211
angle_coeff @angle:cx-c3-h1 harmonic 47.04 109.64 # SOURCE4 175 0.8822
angle_coeff @angle:cx-c3-hc harmonic 46.92 110.20 # SOURCE4 356 0.8798
angle_coeff @angle:cx-c3-hx harmonic 46.38 112.81 # SOURCE4 12 0.0977
angle_coeff @angle:cx-c3-n3 harmonic 65.83 113.22 # SOURCE4 33 1.3978
angle_coeff @angle:cx-c3-n4 harmonic 68.88 101.51 # SOURCE4 12 0.0760
angle_coeff @angle:cx-c3-n harmonic 66.22 112.59 # SOURCE4 22 0.8034
angle_coeff @angle:cx-c3-oh harmonic 68.10 109.97 # SOURCE4 25 1.3176
angle_coeff @angle:cx-c3-os harmonic 68.40 108.16 # SOURCE4 26 1.0162
angle_coeff @angle:cy-c3-h1 harmonic 47.00 107.88 # SOURCE4 162 0.9624
angle_coeff @angle:cy-c3-hc harmonic 46.51 110.17 # SOURCE3 16 0.5693
angle_coeff @angle:cy-c3-n3 harmonic 65.63 112.72 # SOURCE4 7 1.0639
angle_coeff @angle:cy-c3-oh harmonic 67.22 111.56 # SOURCE4 138 0.5051
angle_coeff @angle:cy-c3-os harmonic 68.45 106.79 # SOURCE4 5 1.0955
angle_coeff @angle:f-c3-f harmonic 71.26 107.16 # SOURCE2 10 1.1324
angle_coeff @angle:f-c3-h1 harmonic 51.57 107.85 # SOURCE3 14 0.9537
angle_coeff @angle:f-c3-h2 harmonic 51.36 108.41 # SOURCE3 6 0.5081
angle_coeff @angle:f-c3-h3 harmonic 51.05 110.01 # SOURCE4 19 0.6811
angle_coeff @angle:f-c3-hc harmonic 51.33 108.92 # SOURCE2 5 3.0534
angle_coeff @angle:f-c3-n2 harmonic 69.23 110.40 # SOURCE2 3 2.6470
angle_coeff @angle:f-c3-os harmonic 70.66 110.61 # SOURCE4 45 1.1755
angle_coeff @angle:f-c3-p5 harmonic 80.63 107.25 # SOURCE4 11 1.1735
angle_coeff @angle:f-c3-s6 harmonic 64.18 109.67 # SOURCE4 24 0.4116
angle_coeff @angle:f-c3-ss harmonic 62.13 111.89 # SOURCE4 11 0.9479
angle_coeff @angle:h1-c3-h1 harmonic 39.18 109.55 # SOURCE3 1888 1.1205
angle_coeff @angle:h1-c3-n1 harmonic 49.99 107.31 # HF/6-31G* 1
angle_coeff @angle:h1-c3-n2 harmonic 49.26 109.61 # SOURCE3 63 1.0452
angle_coeff @angle:h1-c3-n3 harmonic 49.39 109.92 # SOURCE3 313 1.1810
angle_coeff @angle:h1-c3-n harmonic 49.82 109.32 # SOURCE3 91 1.0325
angle_coeff @angle:h1-c3-na harmonic 49.90 109.45 # SOURCE3 53 0.9555
angle_coeff @angle:h1-c3-nc harmonic 50.11 108.57 # SOURCE3 6 0.0764
angle_coeff @angle:h1-c3-nd harmonic 50.11 108.57 # SOURCE3 6 same_as_h1-c3-nc
angle_coeff @angle:h1-c3-nh harmonic 49.73 109.96 # SOURCE3 70 0.7000
angle_coeff @angle:h1-c3-no harmonic 48.66 105.15 # SOURCE4 16 0.4950
angle_coeff @angle:h1-c3-o harmonic 52.53 117.19 # SOURCE3 6 0.0003
angle_coeff @angle:h1-c3-oh harmonic 50.97 109.88 # SOURCE3 63 1.3172
angle_coeff @angle:h1-c3-os harmonic 50.84 108.82 # SOURCE3 541 0.8042
angle_coeff @angle:h1-c3-p5 harmonic 54.25 107.99 # SOURCE4 72 1.1862
angle_coeff @angle:h1-c3-s4 harmonic 42.89 108.66 # SOURCE3 201 0.3834
angle_coeff @angle:h1-c3-s harmonic 41.18 112.60 # SOURCE3 6 0.0026
angle_coeff @angle:h1-c3-s6 harmonic 43.86 108.11 # SOURCE3 160 0.5518
angle_coeff @angle:h1-c3-sh harmonic 42.40 109.21 # SOURCE3 22 1.2028
angle_coeff @angle:h1-c3-ss harmonic 42.40 109.34 # SOURCE3 356 0.6573
angle_coeff @angle:h1-c3-sx harmonic 42.83 108.69 # SOURCE3 90 0.2749
angle_coeff @angle:h1-c3-sy harmonic 43.65 108.09 # SOURCE3 93 0.2556
angle_coeff @angle:h2-c3-h2 harmonic 39.00 109.19 # SOURCE3 29 3.1352
angle_coeff @angle:h2-c3-i harmonic 38.69 104.99 # SOURCE3 2 0.0000
angle_coeff @angle:h2-c3-n2 harmonic 49.08 110.22 # SOURCE3 6 0.2133
angle_coeff @angle:h2-c3-n3 harmonic 49.37 109.80 # SOURCE4 189 1.2893
angle_coeff @angle:h2-c3-n harmonic 50.22 107.38 # SOURCE4 258 1.3140
angle_coeff @angle:h2-c3-na harmonic 50.27 107.66 # SOURCE3 6 1.4096
angle_coeff @angle:h2-c3-nc harmonic 49.85 109.47 # SOURCE3 10 0.3133
angle_coeff @angle:h2-c3-nd harmonic 49.85 109.47 # SOURCE3 10 same_as_h2-c3-nc
angle_coeff @angle:h2-c3-nh harmonic 49.60 110.33 # SOURCE4 102 1.0596
angle_coeff @angle:h2-c3-no harmonic 47.83 108.69 # SOURCE3 4 0.0000
angle_coeff @angle:h2-c3-o harmonic 54.38 108.97 # SOURCE3 4 0.0000
angle_coeff @angle:h2-c3-oh harmonic 51.29 108.30 # SOURCE3 6 0.5715
angle_coeff @angle:h2-c3-os harmonic 50.84 108.58 # SOURCE3 44 1.2773
angle_coeff @angle:h2-c3-s4 harmonic 42.93 108.58 # SOURCE3 8 0.2408
angle_coeff @angle:h2-c3-s harmonic 42.32 106.75 # SOURCE3 4 0.0000
angle_coeff @angle:h2-c3-s6 harmonic 44.20 106.54 # SOURCE4 27 0.9934
angle_coeff @angle:h2-c3-sh harmonic 42.68 107.87 # SOURCE3 6 0.4376
angle_coeff @angle:h2-c3-ss harmonic 42.34 109.75 # SOURCE3 10 0.3442
angle_coeff @angle:h3-c3-n3 harmonic 49.73 108.39 # SOURCE4 12 1.7932
angle_coeff @angle:h3-c3-nc harmonic 49.91 109.37 # SOURCE3 1 0.0000
angle_coeff @angle:h3-c3-nd harmonic 49.91 109.37 # SOURCE3 1 same_as_h3-c3-nc
angle_coeff @angle:h3-c3-nh harmonic 49.53 110.78 # SOURCE4 5 1.5993
angle_coeff @angle:h3-c3-os harmonic 50.09 112.03 # SOURCE4 17 1.0957
angle_coeff @angle:h3-c3-ss harmonic 42.42 109.27 # SOURCE4 8 0.8367
angle_coeff @angle:hc-c3-hc harmonic 39.43 108.35 # SOURCE3 2380 0.9006
angle_coeff @angle:hc-c3-i harmonic 38.62 104.99 # SOURCE3 1
angle_coeff @angle:hc-c3-n2 harmonic 49.29 109.50 # SOURCE3 1
angle_coeff @angle:hc-c3-n3 harmonic 49.42 109.80 # SOURCE2 5 2.0070
angle_coeff @angle:hc-c3-n4 harmonic 49.01 107.90 # SOURCE3 1
angle_coeff @angle:hc-c3-n harmonic 49.78 109.50 # SOURCE3 1
angle_coeff @angle:hc-c3-na harmonic 49.90 109.50 # SOURCE3 1
angle_coeff @angle:hc-c3-nh harmonic 49.38 111.54 # SOURCE3 1
angle_coeff @angle:hc-c3-no harmonic 48.19 107.20 # SOURCE2 1 0.0000
angle_coeff @angle:hc-c3-oh harmonic 51.07 109.50 # SOURCE3 1
angle_coeff @angle:hc-c3-os harmonic 50.87 108.70 # SOURCE2 13 2.3739
angle_coeff @angle:hc-c3-p2 harmonic 52.37 110.18 # SOURCE3 25 0.4057
angle_coeff @angle:hc-c3-p3 harmonic 52.73 110.14 # SOURCE3 325 0.5126
angle_coeff @angle:hc-c3-p4 harmonic 53.21 109.59 # SOURCE3 87 0.3196
angle_coeff @angle:hc-c3-p5 harmonic 53.84 109.64 # SOURCE3 69 0.8112
angle_coeff @angle:hc-c3-px harmonic 53.46 109.74 # SOURCE3 84 0.3474
angle_coeff @angle:hc-c3-py harmonic 53.86 109.54 # SOURCE3 39 0.1999
angle_coeff @angle:hc-c3-s4 harmonic 43.12 107.50 # SOURCE2 1 0.0000
angle_coeff @angle:hc-c3-s6 harmonic 43.84 108.20 # SOURCE3 1
angle_coeff @angle:hc-c3-sh harmonic 42.66 107.87 # SOURCE2 3 2.0981
angle_coeff @angle:hc-c3-ss harmonic 42.51 108.76 # SOURCE2 3 1.6891
angle_coeff @angle:hx-c3-hx harmonic 39.04 110.74 # SOURCE3 137 0.5531
angle_coeff @angle:hx-c3-n4 harmonic 49.02 107.91 # SOURCE3 148 0.5899
angle_coeff @angle:i-c3-i harmonic 61.98 113.12 # SOURCE3 1 0.0000
angle_coeff @angle:n1-c3-n1 harmonic 71.09 105.07 # HF/6-31G* 1
angle_coeff @angle:n2-c3-n2 harmonic 69.89 107.70 # SOURCE3 1 0.0000
angle_coeff @angle:n2-c3-nh harmonic 69.26 111.06 # SOURCE4 5 0.7868
angle_coeff @angle:n2-c3-oh harmonic 70.15 111.82 # SOURCE4 10 0.3451
angle_coeff @angle:n2-c3-os harmonic 70.04 111.23 # SOURCE4 6 1.0463
angle_coeff @angle:n3-c3-n3 harmonic 69.61 109.59 # SOURCE4 27 1.8125
angle_coeff @angle:n3-c3-nc harmonic 68.79 113.29 # SOURCE3 1 0.0000
angle_coeff @angle:n3-c3-nd harmonic 68.79 113.29 # SOURCE3 1 same_as_n3-c3-nc
angle_coeff @angle:n3-c3-nh harmonic 69.74 110.08 # SOURCE4 21 1.0686
angle_coeff @angle:n3-c3-oh harmonic 70.71 110.63 # SOURCE4 20 1.0177
angle_coeff @angle:n3-c3-os harmonic 71.15 108.33 # SOURCE4 17 1.9545
angle_coeff @angle:n3-c3-p5 harmonic 81.55 109.51 # SOURCE4 10 1.5002
angle_coeff @angle:n3-c3-ss harmonic 64.75 107.73 # SOURCE4 18 1.7621
angle_coeff @angle:n4-c3-n4 harmonic 67.13 113.32 # SOURCE3 1 0.0000
angle_coeff @angle:na-c3-na harmonic 69.06 113.49 # SOURCE3 1 0.0000
angle_coeff @angle:na-c3-os harmonic 71.27 109.06 # SOURCE4 170 0.5450
angle_coeff @angle:nc-c3-nc harmonic 69.96 110.61 # SOURCE3 1 0.0000
angle_coeff @angle:nc-c3-nh harmonic 69.34 112.43 # SOURCE3 1 0.0000
angle_coeff @angle:nc-c3-os harmonic 69.28 115.41 # SOURCE3 3 1.0288
angle_coeff @angle:nd-c3-nd harmonic 69.96 110.61 # SOURCE3 1 same_as_nc-c3-nc
angle_coeff @angle:nd-c3-nh harmonic 69.34 112.43 # SOURCE3 1 same_as_nc-c3-nh
angle_coeff @angle:nd-c3-os harmonic 69.28 115.41 # SOURCE3 3 same_as_nc-c3-os
angle_coeff @angle:nh-c3-nh harmonic 71.41 105.87 # SOURCE3 1 0.0000
angle_coeff @angle:nh-c3-oh harmonic 70.47 112.36 # SOURCE4 12 0.7775
angle_coeff @angle:nh-c3-os harmonic 71.26 108.93 # SOURCE4 17 1.3775
angle_coeff @angle:nh-c3-p5 harmonic 80.62 112.50 # SOURCE4 5 1.7371
angle_coeff @angle:nh-c3-ss harmonic 64.53 108.88 # SOURCE4 8 2.1521
angle_coeff @angle:n-c3-n2 harmonic 68.82 112.34 # SOURCE4 5 1.1443
angle_coeff @angle:n-c3-n3 harmonic 69.39 111.03 # SOURCE4 15 1.8216
angle_coeff @angle:n-c3-n harmonic 68.78 113.81 # SOURCE3 1 0.0000
angle_coeff @angle:n-c3-nh harmonic 70.54 108.34 # SOURCE4 11 2.1727
angle_coeff @angle:n-c3-oh harmonic 70.36 112.54 # SOURCE4 31 1.1295
angle_coeff @angle:no-c3-no harmonic 68.37 104.47 # SOURCE4 5 0.9726
angle_coeff @angle:n-c3-os harmonic 71.14 109.16 # SOURCE4 153 0.8778
angle_coeff @angle:n-c3-p5 harmonic 81.48 110.05 # SOURCE4 5 1.2965
angle_coeff @angle:oh-c3-oh harmonic 72.71 109.23 # SOURCE4 8 1.4978
angle_coeff @angle:oh-c3-os harmonic 72.38 109.21 # SOURCE4 85 1.1964
angle_coeff @angle:oh-c3-p5 harmonic 82.83 108.86 # SOURCE4 33 1.2025
angle_coeff @angle:oh-c3-sh harmonic 63.30 115.46 # SOURCE3 1 0.0000
angle_coeff @angle:o-c3-o harmonic 74.43 122.30 # SOURCE3 1 0.0000
angle_coeff @angle:os-c3-os harmonic 71.72 110.24 # SOURCE3 17 2.1340
angle_coeff @angle:os-c3-p5 harmonic 82.86 108.36 # SOURCE4 22 2.1937
angle_coeff @angle:os-c3-ss harmonic 65.36 107.98 # SOURCE4 20 1.7464
angle_coeff @angle:p2-c3-p2 harmonic 98.16 110.48 # SOURCE3 1 0.0000
angle_coeff @angle:p3-c3-p3 harmonic 98.88 110.16 # SOURCE3 1 0.0000
angle_coeff @angle:p5-c3-p5 harmonic 100.59 110.13 # SOURCE4 33 2.4116
angle_coeff @angle:p5-c3-ss harmonic 78.88 111.30 # SOURCE4 5 2.0560
angle_coeff @angle:s4-c3-s4 harmonic 62.40 112.29 # SOURCE3 2 1.2724
angle_coeff @angle:s4-c3-s6 harmonic 62.62 113.52 # SOURCE3 1
angle_coeff @angle:s6-c3-s6 harmonic 63.71 111.75 # SOURCE3 1 0.0000
angle_coeff @angle:sh-c3-sh harmonic 60.82 116.26 # SOURCE3 1 0.0000
angle_coeff @angle:sh-c3-ss harmonic 62.33 110.73 # SOURCE3 1
angle_coeff @angle:s-c3-s harmonic 58.31 123.35 # SOURCE3 1 0.0000
angle_coeff @angle:ss-c3-ss harmonic 62.40 110.57 # SOURCE4 15 1.4311
angle_coeff @angle:br-ca-br harmonic 67.31 117.60 # SOURCE3 1
angle_coeff @angle:br-ca-ca harmonic 63.48 118.13 # SOURCE3 8 0.6041
angle_coeff @angle:c1-ca-c1 harmonic 64.70 120.00 # SOURCE3 1
angle_coeff @angle:c1-ca-ca harmonic 65.86 120.00 # SOURCE3 1
angle_coeff @angle:c2-ca-c2 harmonic 62.95 120.00 # SOURCE3 1
angle_coeff @angle:c2-ca-ca harmonic 64.69 120.60 # SOURCE3 1
angle_coeff @angle:c3-ca-c2 harmonic 62.24 120.00 # SOURCE3 1
angle_coeff @angle:c3-ca-c3 harmonic 62.41 116.80 # SOURCE3 1
angle_coeff @angle:c3-ca-ca harmonic 63.84 120.63 # SOURCE3 60 0.7175
angle_coeff @angle:c3-ca-cp harmonic 63.64 120.63 # CORR 120
angle_coeff @angle:c3-ca-cq harmonic 63.64 120.63 # CORR 120
angle_coeff @angle:c3-ca-na harmonic 66.59 118.78 # SOURCE4 59 1.1184
angle_coeff @angle:c3-ca-nb harmonic 67.33 116.66 # SOURCE4 408 0.9380
angle_coeff @angle:ca-ca-ca harmonic 67.18 119.97 # SOURCE3 1969 0.3480
angle_coeff @angle:ca-ca-cc harmonic 65.99 120.10 # SOURCE3 103 0.3451
angle_coeff @angle:ca-ca-cd harmonic 65.99 120.10 # SOURCE3 103 0.3451
angle_coeff @angle:ca-ca-ce harmonic 64.88 120.66 # SOURCE3 14 0.1564
angle_coeff @angle:ca-ca-cf harmonic 64.88 120.66 # SOURCE3 14 same_as_ca-ca-ce
angle_coeff @angle:ca-ca-cg harmonic 65.90 120.05 # SOURCE3 6 0.2397
angle_coeff @angle:ca-ca-ch harmonic 65.90 120.05 # SOURCE3 6 same_as_ca-ca-cg
angle_coeff @angle:ca-ca-cl harmonic 58.52 119.40 # SOURCE4 2459 0.5283
angle_coeff @angle:ca-ca-cp harmonic 67.16 119.07 # CORR 28
angle_coeff @angle:ca-ca-cq harmonic 67.16 119.07 # CORR 28
angle_coeff @angle:ca-ca-cx harmonic 64.48 120.83 # SOURCE4 71 1.3062
angle_coeff @angle:ca-ca-cy harmonic 63.77 120.86 # SOURCE4 17 2.0287
angle_coeff @angle:ca-ca-f harmonic 67.51 118.95 # SOURCE4 967 0.3369
angle_coeff @angle:ca-ca-h4 harmonic 48.24 121.09 # SOURCE3 57 1.4696
angle_coeff @angle:ca-ca-ha harmonic 48.46 120.01 # SOURCE3 2980 0.2511
angle_coeff @angle:ca-ca-i harmonic 58.59 118.47 # SOURCE3 10 0.6181
angle_coeff @angle:ca-ca-n1 harmonic 68.92 118.50 # HF/6-31G* 1
angle_coeff @angle:ca-ca-n2 harmonic 70.95 119.57 # SOURCE3 1
angle_coeff @angle:ca-ca-n4 harmonic 67.28 118.41 # SOURCE3 6 0.1691
angle_coeff @angle:ca-ca-n harmonic 67.97 119.89 # SOURCE3 18 0.2095
angle_coeff @angle:ca-ca-na harmonic 70.21 118.34 # SOURCE3 54 3.6168
angle_coeff @angle:ca-ca-nb harmonic 69.16 122.63 # SOURCE3 83 1.1249
angle_coeff @angle:ca-ca-nc harmonic 70.14 119.72 # SOURCE3 22 3.3994
angle_coeff @angle:ca-ca-nd harmonic 70.14 119.72 # SOURCE3 22 3.3994
angle_coeff @angle:ca-ca-ne harmonic 67.74 119.88 # SOURCE3 24 0.3637
angle_coeff @angle:ca-ca-nf harmonic 67.74 119.88 # SOURCE3 24 0.3637
angle_coeff @angle:ca-ca-nh harmonic 69.34 120.13 # SOURCE3 193 0.6341
angle_coeff @angle:ca-ca-no harmonic 66.88 119.54 # SOURCE3 10 1.3187
angle_coeff @angle:ca-ca-o harmonic 71.85 123.29 # SOURCE4 11 1.2526
angle_coeff @angle:ca-ca-oh harmonic 69.85 119.94 # SOURCE3 14 0.1627
angle_coeff @angle:ca-ca-os harmonic 69.79 119.20 # SOURCE3 52 0.5240
angle_coeff @angle:ca-ca-p2 harmonic 77.87 114.36 # SOURCE3 1
angle_coeff @angle:ca-ca-p3 harmonic 76.34 120.73 # SOURCE3 6 0.1273
angle_coeff @angle:ca-ca-p4 harmonic 77.11 120.30 # SOURCE3 1
angle_coeff @angle:ca-ca-p5 harmonic 77.50 120.28 # SOURCE4 5 0.0177
angle_coeff @angle:ca-ca-pe harmonic 76.26 120.45 # SOURCE3 20 0.2719
angle_coeff @angle:ca-ca-pf harmonic 76.26 120.45 # SOURCE3 20 0.2719
angle_coeff @angle:ca-ca-px harmonic 76.37 120.53 # SOURCE3 10 0.4509
angle_coeff @angle:ca-ca-py harmonic 77.43 119.98 # SOURCE3 6 0.0670
angle_coeff @angle:ca-ca-s4 harmonic 61.72 119.15 # SOURCE3 1
angle_coeff @angle:ca-ca-s6 harmonic 62.18 120.54 # SOURCE4 36 1.2154
angle_coeff @angle:ca-ca-s harmonic 62.22 122.55 # SOURCE3 4 0.0000
angle_coeff @angle:ca-ca-sh harmonic 61.32 121.78 # SOURCE4 17 1.2849
angle_coeff @angle:ca-ca-ss harmonic 62.03 119.93 # SOURCE3 16 0.3901
angle_coeff @angle:ca-ca-sx harmonic 60.68 119.18 # SOURCE3 6 0.0434
angle_coeff @angle:ca-ca-sy harmonic 61.64 119.89 # SOURCE3 24 1.8813
angle_coeff @angle:c-ca-c3 harmonic 62.61 118.06 # SOURCE3 1
angle_coeff @angle:c-ca-c harmonic 62.65 120.00 # SOURCE3 1
angle_coeff @angle:c-ca-ca harmonic 64.64 120.14 # SOURCE3 40 0.4788
angle_coeff @angle:cc-ca-cp harmonic 64.63 124.30 # SOURCE4 10 0.6423
angle_coeff @angle:cc-ca-nb harmonic 69.19 118.02 # CORR 64
angle_coeff @angle:cd-ca-nb harmonic 69.19 118.02 # CORR 64
angle_coeff @angle:ce-ca-na harmonic 67.44 119.85 # SOURCE4 9 0.7001
angle_coeff @angle:ce-ca-nb harmonic 68.24 117.59 # CORR 44
angle_coeff @angle:cf-ca-nb harmonic 68.24 117.59 # CORR 44
angle_coeff @angle:cg-ca-cp harmonic 65.26 121.53 # SOURCE4 12 0.1831
angle_coeff @angle:c-ca-ha harmonic 46.51 115.90 # SOURCE3 1
angle_coeff @angle:cl-ca-cl harmonic 54.17 118.72 # SOURCE3 1
angle_coeff @angle:cl-ca-cp harmonic 58.19 120.31 # SOURCE4 18 0.5607
angle_coeff @angle:cl-ca-nb harmonic 61.21 116.15 # SOURCE4 50 0.6047
angle_coeff @angle:c-ca-nb harmonic 67.71 117.94 # SOURCE4 91 1.0536
angle_coeff @angle:c-ca-nc harmonic 64.40 130.80 # SOURCE3 1
angle_coeff @angle:c-ca-nd harmonic 64.40 130.80 # SOURCE3 1 same_as_c-ca-nc
angle_coeff @angle:cp-ca-f harmonic 67.10 119.39 # SOURCE4 16 0.1724
angle_coeff @angle:cp-ca-h4 harmonic 48.15 120.03 # SOURCE4 27 0.4431
angle_coeff @angle:cp-ca-ha harmonic 47.94 121.08 # CORR 24
angle_coeff @angle:cp-ca-na harmonic 72.91 108.79 # SOURCE4 165 0.5166
angle_coeff @angle:cp-ca-nb harmonic 68.56 123.72 # SOURCE4 50 0.8176
angle_coeff @angle:cp-ca-nh harmonic 68.66 121.52 # SOURCE4 11 0.5438
angle_coeff @angle:cp-ca-oh harmonic 69.26 120.96 # SOURCE4 12 1.1400
angle_coeff @angle:cp-ca-ss harmonic 63.87 112.75 # SOURCE4 8 0.6216
angle_coeff @angle:cp-ca-sy harmonic 63.91 111.18 # CORR 4
angle_coeff @angle:cq-ca-ha harmonic 47.94 121.08 # CORR 24
angle_coeff @angle:cq-ca-sy harmonic 63.91 111.18 # CORR 4
angle_coeff @angle:f-ca-f harmonic 68.05 117.50 # SOURCE3 1
angle_coeff @angle:f-ca-nb harmonic 71.69 114.58 # SOURCE4 19 0.2987
angle_coeff @angle:h4-ca-n harmonic 49.48 116.02 # SOURCE3 1
angle_coeff @angle:h4-ca-na harmonic 51.88 114.65 # SOURCE3 5 1.5484
angle_coeff @angle:h4-ca-nb harmonic 51.82 115.94 # SOURCE3 52 0.7370
angle_coeff @angle:h4-ca-nc harmonic 51.46 118.36 # SOURCE3 1
angle_coeff @angle:h4-ca-nd harmonic 51.46 118.36 # SOURCE3 1 same_as_h4-ca-nc
angle_coeff @angle:h4-ca-os harmonic 52.30 111.15 # SOURCE3 1
angle_coeff @angle:h4-ca-ss harmonic 42.40 116.19 # SOURCE3 1
angle_coeff @angle:h5-ca-nb harmonic 51.76 116.35 # SOURCE3 30 0.5545
angle_coeff @angle:h5-ca-nc harmonic 50.70 122.11 # SOURCE3 1
angle_coeff @angle:h5-ca-nd harmonic 50.70 122.11 # SOURCE3 1 same_as_h5-ca-nc
angle_coeff @angle:ha-ca-n2 harmonic 52.97 116.00 # SOURCE2 1 0.0000
angle_coeff @angle:ha-ca-p2 harmonic 50.08 122.56 # SOURCE3 1
angle_coeff @angle:i-ca-i harmonic 62.29 119.28 # SOURCE3 1
angle_coeff @angle:n1-ca-n1 harmonic 70.73 117.03 # HF/6-31G* 1
angle_coeff @angle:n2-ca-n2 harmonic 75.05 120.00 # SOURCE3 1
angle_coeff @angle:n2-ca-na harmonic 73.80 119.60 # SOURCE3 1
angle_coeff @angle:n4-ca-n4 harmonic 67.65 116.82 # SOURCE3 1
angle_coeff @angle:na-ca-na harmonic 76.48 107.65 # SOURCE4 5 0.8751
angle_coeff @angle:na-ca-nb harmonic 70.60 127.07 # SOURCE4 237 1.9392
angle_coeff @angle:na-ca-nh harmonic 72.48 118.62 # SOURCE4 29 0.9759
angle_coeff @angle:nb-ca-nb harmonic 70.78 127.19 # SOURCE4 585 1.1793
angle_coeff @angle:nb-ca-nc harmonic 71.12 126.53 # CORR 22
angle_coeff @angle:nb-ca-nd harmonic 71.12 126.53 # CORR 22
angle_coeff @angle:nb-ca-nh harmonic 73.20 116.95 # SOURCE4 765 0.8040
angle_coeff @angle:nb-ca-oh harmonic 73.57 117.30 # SOURCE4 64 0.9290
angle_coeff @angle:nb-ca-os harmonic 72.54 119.66 # SOURCE4 76 0.6493
angle_coeff @angle:nb-ca-sh harmonic 64.31 117.59 # SOURCE4 15 1.4616
angle_coeff @angle:nb-ca-ss harmonic 64.10 119.30 # SOURCE4 41 1.3420
angle_coeff @angle:nc-ca-nc harmonic 70.67 128.74 # SOURCE3 1
angle_coeff @angle:nc-ca-nh harmonic 72.77 118.86 # SOURCE3 1
angle_coeff @angle:nd-ca-nd harmonic 70.67 128.74 # SOURCE3 1 same_as_nc-ca-nc
angle_coeff @angle:nd-ca-nh harmonic 72.77 118.86 # SOURCE3 1 same_as_nc-ca-nh
angle_coeff @angle:nh-ca-nh harmonic 71.40 120.98 # SOURCE3 1
angle_coeff @angle:n-ca-nc harmonic 69.66 123.86 # SOURCE3 1
angle_coeff @angle:n-ca-nd harmonic 69.66 123.86 # SOURCE3 1 same_as_n-ca-nc
angle_coeff @angle:n-ca-nh harmonic 71.29 116.16 # SOURCE3 1
angle_coeff @angle:no-ca-no harmonic 67.42 117.14 # SOURCE3 1
angle_coeff @angle:oh-ca-oh harmonic 72.63 120.00 # SOURCE3 1
angle_coeff @angle:o-ca-o harmonic 78.21 126.82 # SOURCE3 1
angle_coeff @angle:os-ca-os harmonic 74.01 113.73 # SOURCE3 1
angle_coeff @angle:p2-ca-p2 harmonic 94.48 121.20 # SOURCE3 1
angle_coeff @angle:p3-ca-p3 harmonic 95.21 121.46 # SOURCE3 1
angle_coeff @angle:p5-ca-p5 harmonic 97.33 120.00 # SOURCE3 1
angle_coeff @angle:s4-ca-s4 harmonic 64.96 105.81 # SOURCE3 1
angle_coeff @angle:s6-ca-s6 harmonic 66.03 105.81 # SOURCE3 1
angle_coeff @angle:sh-ca-sh harmonic 61.27 120.24 # SOURCE3 1
angle_coeff @angle:s-ca-s harmonic 61.42 125.14 # SOURCE3 1
angle_coeff @angle:ss-ca-ss harmonic 62.91 115.15 # SOURCE3 1
angle_coeff @angle:br-c-br harmonic 66.91 113.10 # SOURCE3 1
angle_coeff @angle:br-c-c3 harmonic 63.34 110.74 # SOURCE3 1 0.0000
angle_coeff @angle:br-c-o harmonic 63.19 121.46 # SOURCE3 5 1.6264
angle_coeff @angle:c1-c-c1 harmonic 65.09 115.32 # SOURCE3 1
angle_coeff @angle:c1-c-o harmonic 69.92 122.34 # SOURCE3 1
angle_coeff @angle:c2-c-c2 harmonic 67.17 116.78 # SOURCE3 1
angle_coeff @angle:c2-c-ha harmonic 48.65 115.95 # SOURCE3 1
angle_coeff @angle:c2-c-o harmonic 72.77 119.12 # SOURCE3 2 0.0000
angle_coeff @angle:c2-c-s harmonic 64.67 119.16 # SOURCE3 2 0.0000
angle_coeff @angle:c3-c-c3 harmonic 62.82 116.05 # SOURCE3 11 1.0986
angle_coeff @angle:c3-c-ca harmonic 62.59 118.54 # SOURCE4 240 1.3614
angle_coeff @angle:c3-c-cc harmonic 63.38 117.47 # CORR 46
angle_coeff @angle:c3-c-cd harmonic 63.38 117.47 # CORR 46
angle_coeff @angle:c3-c-ce harmonic 63.44 116.37 # CORR 233
angle_coeff @angle:c3-c-cf harmonic 63.44 116.37 # CORR 233
angle_coeff @angle:c3-c-cg harmonic 64.26 115.00 # SOURCE2 1 0.0000
angle_coeff @angle:c3-c-ch harmonic 64.26 115.00 # SOURCE2 1 same_as_c3-c-cg
angle_coeff @angle:c3-c-cl harmonic 58.18 111.99 # SOURCE3 2 0.0125
angle_coeff @angle:c3-c-f harmonic 66.93 110.70 # SOURCE2 1 0.0000
angle_coeff @angle:c3-c-h4 harmonic 46.11 114.40 # SOURCE4 57 0.4032
angle_coeff @angle:c3-c-ha harmonic 46.01 115.22 # SOURCE3 15 0.3181
angle_coeff @angle:c3-c-i harmonic 56.87 112.94 # SOURCE3 1 0.0000
angle_coeff @angle:c3-c-n2 harmonic 66.62 114.53 # SOURCE3 1
angle_coeff @angle:c3-c-n4 harmonic 64.61 112.26 # SOURCE3 2 0.0000
angle_coeff @angle:c3-c-n harmonic 67.86 115.15 # SOURCE3 153 2.7443
angle_coeff @angle:c3-c-ne harmonic 68.03 111.56 # CORR 12
angle_coeff @angle:c3-c-nf harmonic 68.03 111.56 # CORR 12
angle_coeff @angle:c3-c-o harmonic 68.03 123.11 # SOURCE3 267 3.0977
angle_coeff @angle:c3-c-oh harmonic 69.84 112.20 # SOURCE3 14 1.8324
angle_coeff @angle:c3-c-os harmonic 69.26 111.96 # SOURCE3 15 2.3072
angle_coeff @angle:c3-c-p3 harmonic 74.55 116.42 # SOURCE3 3 0.1291
angle_coeff @angle:c3-c-p5 harmonic 73.81 118.90 # SOURCE3 1
angle_coeff @angle:c3-c-pe harmonic 74.19 114.85 # SOURCE3 1 0.0000
angle_coeff @angle:c3-c-pf harmonic 74.19 114.85 # SOURCE3 1 same_as_c3-c-pe
angle_coeff @angle:c3-c-px harmonic 74.17 115.60 # SOURCE3 1 0.0000
angle_coeff @angle:c3-c-py harmonic 74.48 118.16 # SOURCE3 3 1.0735
angle_coeff @angle:c3-c-s4 harmonic 59.64 114.79 # SOURCE3 1
angle_coeff @angle:c3-c-s6 harmonic 59.65 114.72 # SOURCE3 1
angle_coeff @angle:c3-c-s harmonic 62.03 123.73 # SOURCE3 9 1.4528
angle_coeff @angle:c3-c-sh harmonic 61.97 114.21 # SOURCE3 3 2.3916
angle_coeff @angle:c3-c-ss harmonic 62.41 114.32 # SOURCE3 5 2.7478
angle_coeff @angle:c3-c-sx harmonic 59.48 113.97 # SOURCE3 3 0.0610
angle_coeff @angle:c3-c-sy harmonic 59.89 114.28 # SOURCE3 3 0.7341
angle_coeff @angle:ca-c-ca harmonic 63.03 118.58 # SOURCE4 144 2.1146
angle_coeff @angle:ca-c-cc harmonic 64.24 116.07 # CORR 257
angle_coeff @angle:ca-c-cd harmonic 64.24 116.07 # CORR 257
angle_coeff @angle:ca-c-ce harmonic 63.21 118.92 # CORR 36
angle_coeff @angle:ca-c-cf harmonic 63.21 118.92 # CORR 36
angle_coeff @angle:ca-c-h4 harmonic 46.52 115.14 # SOURCE4 30 0.7320
angle_coeff @angle:ca-c-ha harmonic 46.80 114.12 # SOURCE3 1 0.0000
angle_coeff @angle:ca-c-n harmonic 68.47 115.14 # SOURCE4 571 1.4648
angle_coeff @angle:ca-c-ne harmonic 67.74 114.39 # SOURCE4 5 0.2958
angle_coeff @angle:ca-c-o harmonic 68.67 123.44 # SOURCE3 18 2.5574
angle_coeff @angle:ca-c-oh harmonic 70.11 113.44 # SOURCE4 222 0.8421
angle_coeff @angle:ca-c-os harmonic 68.78 115.54 # SOURCE3 5 2.6708
angle_coeff @angle:ca-c-s harmonic 62.52 123.04 # SOURCE4 12 0.7935
angle_coeff @angle:ca-c-sh harmonic 61.05 118.63 # SOURCE3 1 0.0000
angle_coeff @angle:ca-c-ss harmonic 62.45 115.13 # SOURCE4 12 1.0069
angle_coeff @angle:br-cc-c harmonic 63.98 115.68 # SOURCE4 8 0.4970
angle_coeff @angle:br-cc-cc harmonic 61.82 124.89 # SOURCE4 8 1.9479
angle_coeff @angle:br-cc-cd harmonic 62.26 124.56 # SOURCE4 32 2.4696
angle_coeff @angle:br-cc-na harmonic 64.60 121.42 # SOURCE4 6 0.5507
angle_coeff @angle:c2-cc-c3 harmonic 63.27 126.11 # SOURCE3 2 0.0000
angle_coeff @angle:c2-cc-ca harmonic 65.34 124.66 # CORR 16
angle_coeff @angle:c2-cc-cc harmonic 66.24 121.77 # CORR 32
angle_coeff @angle:c2-cc-cd harmonic 69.09 117.02 # SOURCE3 2 0.0703
angle_coeff @angle:c2-cc-ha harmonic 48.69 122.72 # SOURCE3 2 0.0092
angle_coeff @angle:c2-cc-n harmonic 67.74 126.90 # SOURCE3 1 0.0000
angle_coeff @angle:c2-cc-os harmonic 70.10 120.79 # CORR 13
angle_coeff @angle:c-c-c3 harmonic 61.72 116.86 # SOURCE3 5 0.1653
angle_coeff @angle:c3-cc-ca harmonic 61.96 125.89 # CORR 127
angle_coeff @angle:c3-cc-cc harmonic 64.66 115.97 # SOURCE3 4 3.0507
angle_coeff @angle:c3-cc-cd harmonic 64.81 119.45 # SOURCE3 35 8.2040
angle_coeff @angle:c3-cc-cf harmonic 65.34 117.84 # CORR 2
angle_coeff @angle:c3-cc-ha harmonic 45.11 121.52 # SOURCE3 32 3.2091
angle_coeff @angle:c3-cc-n2 harmonic 65.80 126.87 # CORR 9
angle_coeff @angle:c3-cc-n harmonic 66.33 119.11 # CORR 68
angle_coeff @angle:c3-cc-na harmonic 65.50 122.78 # CORR 632
angle_coeff @angle:c3-cc-nc harmonic 65.90 120.94 # CORR 309
angle_coeff @angle:c3-cc-nd harmonic 66.32 122.13 # CORR 475
angle_coeff @angle:c3-cc-os harmonic 67.54 116.88 # CORR 203
angle_coeff @angle:c3-cc-ss harmonic 61.21 121.66 # CORR 171
angle_coeff @angle:c-c-c harmonic 62.30 111.68 # SOURCE3 2 6.1226
angle_coeff @angle:c-c-ca harmonic 61.73 118.34 # SOURCE4 26 1.0692
angle_coeff @angle:ca-cc-cc harmonic 67.66 111.04 # SOURCE3 9 7.9455
angle_coeff @angle:ca-cc-cd harmonic 68.23 113.51 # SOURCE3 26 7.4229
angle_coeff @angle:ca-cc-ce harmonic 62.51 127.87 # SOURCE4 11 1.7579
angle_coeff @angle:ca-cc-h4 harmonic 45.57 128.66 # SOURCE3 10 3.1167
angle_coeff @angle:ca-cc-ha harmonic 46.40 124.04 # SOURCE3 34 3.6691
angle_coeff @angle:ca-cc-n harmonic 68.46 117.67 # CORR 18
angle_coeff @angle:ca-cc-nc harmonic 67.69 120.67 # CORR 162
angle_coeff @angle:ca-cc-nd harmonic 67.92 123.02 # CORR 188
angle_coeff @angle:ca-cc-nh harmonic 67.46 122.45 # SOURCE4 9 1.4092
angle_coeff @angle:ca-cc-oh harmonic 69.61 117.71 # CORR 21
angle_coeff @angle:ca-cc-os harmonic 69.82 115.16 # CORR 134
angle_coeff @angle:ca-cc-ss harmonic 62.30 120.51 # CORR 43
angle_coeff @angle:c-cc-c2 harmonic 65.60 120.92 # CORR 22
angle_coeff @angle:c-cc-c3 harmonic 63.60 117.42 # CORR 126
angle_coeff @angle:c-cc-c harmonic 63.42 121.17 # CORR 64
angle_coeff @angle:c-c-cc harmonic 64.02 111.67 # SOURCE3 4 5.5146
angle_coeff @angle:c-cc-ca harmonic 63.55 122.95 # SOURCE3 1 0.0000
angle_coeff @angle:c-cc-cc harmonic 63.72 122.69 # SOURCE3 2 0.0000
angle_coeff @angle:cc-c-cc harmonic 64.80 116.04 # CORR 56
angle_coeff @angle:cc-cc-cc harmonic 67.88 110.70 # SOURCE3 54 3.4091
angle_coeff @angle:cc-cc-cd harmonic 68.16 114.19 # SOURCE3 517 6.5960
angle_coeff @angle:cc-cc-ce harmonic 62.78 127.20 # CORR 42
angle_coeff @angle:cc-cc-cf harmonic 65.88 122.59 # CORR 39
angle_coeff @angle:cc-cc-cg harmonic 63.63 126.15 # CORR 27
angle_coeff @angle:c-cc-cd harmonic 65.25 121.42 # CORR 1708
angle_coeff @angle:cc-c-cd harmonic 65.73 112.79 # SOURCE3 1 0.0000
angle_coeff @angle:c-cc-ce harmonic 63.20 122.73 # CORR 10
angle_coeff @angle:cc-c-ce harmonic 64.64 115.68 # SOURCE4 6 1.2033
angle_coeff @angle:cc-cc-f harmonic 66.35 119.41 # SOURCE4 7 0.4917
angle_coeff @angle:c-cc-cg harmonic 64.98 118.14 # SOURCE4 7 0.7745
angle_coeff @angle:cc-cc-h4 harmonic 45.56 129.47 # SOURCE3 171 2.2734
angle_coeff @angle:cc-cc-ha harmonic 47.14 120.86 # CORR 1751
angle_coeff @angle:c-cc-cl harmonic 58.39 116.05 # CORR 24
angle_coeff @angle:cc-cc-n2 harmonic 69.48 121.15 # CORR 12
angle_coeff @angle:cc-cc-n harmonic 67.95 119.89 # SOURCE3 36 0.2095
angle_coeff @angle:cc-cc-na harmonic 72.21 106.80 # SOURCE3 33 0.6297
angle_coeff @angle:cc-cc-nc harmonic 67.53 121.69 # CORR 105
angle_coeff @angle:cc-cc-nd harmonic 71.15 112.56 # SOURCE3 141 4.2871
angle_coeff @angle:cc-cc-nh harmonic 68.41 119.51 # CORR 228
angle_coeff @angle:cc-cc-oh harmonic 68.53 121.96 # CORR 27
angle_coeff @angle:cc-cc-os harmonic 69.34 117.23 # CORR 211
angle_coeff @angle:cc-cc-pd harmonic 80.79 115.36 # SOURCE3 84 same_as_cd-cd-pc
angle_coeff @angle:cc-cc-ss harmonic 62.45 120.12 # CORR 31
angle_coeff @angle:cc-cc-sy harmonic 59.22 128.36 # SOURCE4 8 0.9813
angle_coeff @angle:c-c-cd harmonic 64.02 111.67 # SOURCE3 4 5.5146
angle_coeff @angle:cd-cc-cd harmonic 67.89 120.23 # CORR 133
angle_coeff @angle:cd-cc-ce harmonic 63.67 128.41 # CORR 210
angle_coeff @angle:cd-cc-cl harmonic 57.46 123.70 # CORR 62
angle_coeff @angle:cd-cc-f harmonic 67.42 121.08 # SOURCE4 28 0.8788
angle_coeff @angle:cd-cc-h4 harmonic 47.19 129.11 # SOURCE3 418 3.1355
angle_coeff @angle:cd-cc-ha harmonic 48.35 122.89 # SOURCE3 584 2.9334
angle_coeff @angle:cd-cc-n harmonic 70.72 115.52 # SOURCE3 52 1.3322
angle_coeff @angle:cd-cc-na harmonic 72.91 109.42 # SOURCE3 265 2.6051
angle_coeff @angle:cd-cc-nc harmonic 72.01 111.75 # CORR 1101
angle_coeff @angle:cd-cc-nh harmonic 68.69 123.89 # CORR 106
angle_coeff @angle:cd-cc-no harmonic 65.78 128.95 # SOURCE4 117 1.4740
angle_coeff @angle:cd-cc-oh harmonic 69.56 123.89 # CORR 106
angle_coeff @angle:cd-cc-os harmonic 69.96 120.30 # SOURCE3 64 5.4354
angle_coeff @angle:cd-cc-ss harmonic 65.44 111.55 # CORR 884
angle_coeff @angle:cd-cc-sy harmonic 60.54 124.91 # CORR 41
angle_coeff @angle:ce-cc-na harmonic 66.32 124.22 # CORR 48
angle_coeff @angle:ce-cc-nc harmonic 67.01 121.29 # CORR 37
angle_coeff @angle:ce-cc-nd harmonic 67.80 121.51 # CORR 37
angle_coeff @angle:ce-cc-os harmonic 68.17 119.03 # CORR 66
angle_coeff @angle:ce-cc-ss harmonic 61.83 121.44 # CORR 38
angle_coeff @angle:c-cc-f harmonic 66.16 116.87 # SOURCE4 16 0.5322
angle_coeff @angle:cg-cc-na harmonic 67.51 122.35 # SOURCE4 5 0.8112
angle_coeff @angle:cg-cc-ss harmonic 62.33 120.70 # SOURCE4 12 0.9090
angle_coeff @angle:cc-c-h4 harmonic 47.13 115.45 # SOURCE4 5 0.8021
angle_coeff @angle:c-cc-ha harmonic 46.99 117.02 # SOURCE3 56 1.9713
angle_coeff @angle:cl-cc-na harmonic 59.37 121.61 # SOURCE4 12 0.3436
angle_coeff @angle:cl-cc-nd harmonic 59.35 122.97 # CORR 6
angle_coeff @angle:cl-cc-ss harmonic 58.09 119.85 # SOURCE4 11 1.0626
angle_coeff @angle:c-cc-n2 harmonic 68.54 120.89 # CORR 2
angle_coeff @angle:c-cc-n harmonic 68.11 116.32 # CORR 21
angle_coeff @angle:cc-c-n harmonic 70.19 111.86 # SOURCE3 36 2.3407
angle_coeff @angle:c-cc-nc harmonic 66.19 123.47 # CORR 24
angle_coeff @angle:cc-c-nd harmonic 67.92 116.21 # CORR 33
angle_coeff @angle:c-cc-nd harmonic 67.50 121.67 # CORR 47
angle_coeff @angle:c-cc-ne harmonic 67.11 119.88 # SOURCE4 6 0.3139
angle_coeff @angle:cc-c-o harmonic 68.91 125.71 # SOURCE3 66 2.4784
angle_coeff @angle:c-cc-oh harmonic 70.04 113.64 # CORR 53
angle_coeff @angle:cc-c-oh harmonic 71.00 113.10 # CORR 85
angle_coeff @angle:c-cc-os harmonic 67.83 119.39 # CORR 78
angle_coeff @angle:cc-c-os harmonic 70.50 112.30 # SOURCE3 6 2.7842
angle_coeff @angle:cc-c-s harmonic 61.67 127.94 # SOURCE4 12 0.9342
angle_coeff @angle:cc-c-ss harmonic 63.47 112.52 # SOURCE4 10 0.6933
angle_coeff @angle:cx-cc-nd harmonic 65.61 127.75 # SOURCE4 12 1.7156
angle_coeff @angle:cx-cc-os harmonic 67.94 118.08 # SOURCE4 10 0.0955
angle_coeff @angle:cd-c-cd harmonic 64.80 116.04 # CORR 56
angle_coeff @angle:cd-c-cx harmonic 63.88 117.46 # SOURCE4 13 0.1625
angle_coeff @angle:cd-c-n harmonic 70.19 111.86 # SOURCE3 36 2.3407
angle_coeff @angle:cd-c-nc harmonic 67.92 116.21 # CORR 33
angle_coeff @angle:cd-c-nd harmonic 68.65 113.75 # SOURCE4 14 0.0860
angle_coeff @angle:cd-c-o harmonic 68.91 125.71 # SOURCE3 66 2.4784
angle_coeff @angle:cd-c-oh harmonic 71.00 113.10 # CORR 85
angle_coeff @angle:cd-c-os harmonic 70.50 112.30 # SOURCE3 6 2.7842
angle_coeff @angle:ce-c-ce harmonic 64.34 115.80 # CORR 74
angle_coeff @angle:ce-c-cf harmonic 64.04 116.89 # SOURCE4 11 1.6021
angle_coeff @angle:ce-c-cx harmonic 63.95 116.25 # SOURCE4 6 0.6351
angle_coeff @angle:ce-c-h4 harmonic 46.93 114.88 # SOURCE4 19 0.3355
angle_coeff @angle:ce-c-ha harmonic 46.93 115.22 # SOURCE3 7 2.4188
angle_coeff @angle:ce-c-n harmonic 68.80 115.27 # CORR 32
angle_coeff @angle:ce-c-o harmonic 69.27 122.92 # SOURCE3 17 3.5085
angle_coeff @angle:ce-c-oh harmonic 70.32 114.09 # CORR 128
angle_coeff @angle:ce-c-os harmonic 70.16 112.28 # CORR 149
angle_coeff @angle:ce-c-s harmonic 64.09 117.80 # SOURCE3 1 0.0000
angle_coeff @angle:ce-c-ss harmonic 63.94 110.39 # SOURCE4 5 0.6050
angle_coeff @angle:cf-c-cf harmonic 64.34 115.80 # CORR 74
angle_coeff @angle:cf-c-ha harmonic 46.93 115.22 # SOURCE3 7 same_as_ce-c-ha
angle_coeff @angle:cf-c-n harmonic 68.80 115.27 # CORR 32
angle_coeff @angle:cf-c-o harmonic 69.27 122.92 # SOURCE3 17 3.5085
angle_coeff @angle:cf-c-oh harmonic 70.32 114.09 # CORR 128
angle_coeff @angle:cf-c-os harmonic 70.16 112.28 # CORR 149
angle_coeff @angle:cf-c-s harmonic 64.09 117.80 # SOURCE3 1 same_as_ce-c-s
angle_coeff @angle:cg-c-cg harmonic 65.44 115.38 # SOURCE3 1 0.0000
angle_coeff @angle:cg-c-ha harmonic 47.80 113.90 # SOURCE2 1 0.0000
angle_coeff @angle:cg-c-o harmonic 70.21 122.31 # SOURCE3 2 0.0000
angle_coeff @angle:c-c-h4 harmonic 44.62 116.36 # SOURCE4 5 0.5586
angle_coeff @angle:h4-cc-n harmonic 50.39 117.62 # SOURCE3 53 0.9721
angle_coeff @angle:h4-cc-na harmonic 50.22 119.66 # SOURCE3 294 2.4702
angle_coeff @angle:h4-cc-nc harmonic 50.00 120.03 # SOURCE3 16 2.3863
angle_coeff @angle:h4-cc-nd harmonic 51.39 119.11 # SOURCE3 135 1.6946
angle_coeff @angle:h4-cc-os harmonic 52.27 111.89 # SOURCE3 61 2.3500
angle_coeff @angle:h4-cc-ss harmonic 42.95 117.75 # SOURCE3 40 3.1156
angle_coeff @angle:h5-cc-n harmonic 50.84 115.72 # CORR 20
angle_coeff @angle:h5-cc-na harmonic 49.76 122.10 # SOURCE3 16 1.4626
angle_coeff @angle:h5-cc-nc harmonic 49.29 123.70 # SOURCE3 6 0.3547
angle_coeff @angle:h5-cc-nd harmonic 50.13 125.38 # SOURCE3 40 2.2157
angle_coeff @angle:h5-cc-os harmonic 51.30 116.33 # SOURCE3 12 3.2919
angle_coeff @angle:h5-cc-ss harmonic 42.19 122.00 # SOURCE3 6 0.7237
angle_coeff @angle:c-c-ha harmonic 44.85 115.43 # SOURCE2 3 0.6549
angle_coeff @angle:ha-cc-na harmonic 49.82 121.50 # SOURCE2 1 0.0000
angle_coeff @angle:ha-cc-nc harmonic 50.73 116.54 # SOURCE3 5 1.4482
angle_coeff @angle:ha-cc-nd harmonic 51.41 118.88 # SOURCE3 20 2.8923
angle_coeff @angle:ha-cc-os harmonic 52.49 110.86 # SOURCE3 7 1.3846
angle_coeff @angle:ha-cc-pd harmonic 53.59 121.76 # SOURCE3 84 same_as_ha-cd-pc
angle_coeff @angle:ha-cc-ss harmonic 42.26 121.64 # SOURCE2 5 1.3276
angle_coeff @angle:ch-c-ch harmonic 65.44 115.38 # SOURCE3 1 same_as_cg-c-cg
angle_coeff @angle:ch-c-ha harmonic 47.80 113.90 # SOURCE2 1 same_as_cg-c-ha
angle_coeff @angle:ch-c-o harmonic 70.21 122.31 # SOURCE3 2 same_as_cg-c-o
angle_coeff @angle:cl-c-cl harmonic 54.78 111.30 # SOURCE2 1 0.0000
angle_coeff @angle:cl-c-f harmonic 59.05 112.00 # SOURCE2 1 0.0000
angle_coeff @angle:cl-c-ha harmonic 40.42 109.90 # SOURCE2 1 0.0000
angle_coeff @angle:cl-c-o harmonic 59.78 121.51 # SOURCE3 6 1.6987
angle_coeff @angle:cl-c-s harmonic 56.74 127.60 # SOURCE2 1 0.0000
angle_coeff @angle:c-c-n harmonic 67.53 112.14 # SOURCE4 53 2.1247
angle_coeff @angle:na-cc-nc harmonic 70.72 121.62 # CORR 231
angle_coeff @angle:na-cc-nd harmonic 74.78 112.02 # SOURCE3 17 2.2434
angle_coeff @angle:na-cc-no harmonic 68.48 124.90 # SOURCE4 48 0.7933
angle_coeff @angle:na-cc-oh harmonic 73.25 117.26 # SOURCE4 16 0.9090
angle_coeff @angle:na-cc-sx harmonic 63.25 117.04 # SOURCE4 13 0.4187
angle_coeff @angle:na-cc-sy harmonic 63.13 120.55 # SOURCE4 7 1.7547
angle_coeff @angle:nc-cc-nd harmonic 73.35 115.96 # CORR 222
angle_coeff @angle:nc-cc-nh harmonic 72.33 116.85 # CORR 35
angle_coeff @angle:nc-cc-no harmonic 69.31 121.54 # SOURCE4 7 0.9221
angle_coeff @angle:nc-cc-ss harmonic 64.63 119.86 # SOURCE3 2 0.0000
angle_coeff @angle:nd-cc-nd harmonic 70.88 128.17 # SOURCE4 7 0.0269
angle_coeff @angle:nd-cc-ne harmonic 69.29 129.66 # SOURCE4 7 0.4306
angle_coeff @angle:nd-cc-nh harmonic 72.41 120.11 # SOURCE3 5 0.9313
angle_coeff @angle:nd-cc-no harmonic 69.90 122.68 # SOURCE4 16 0.3393
angle_coeff @angle:nd-cc-oh harmonic 72.93 121.54 # CORR 22
angle_coeff @angle:nd-cc-os harmonic 73.85 116.29 # CORR 209
angle_coeff @angle:nd-cc-sh harmonic 62.75 124.92 # SOURCE4 5 0.9563
angle_coeff @angle:nd-cc-ss harmonic 66.51 114.51 # SOURCE3 8 0.3449
angle_coeff @angle:nd-cc-sx harmonic 60.81 127.60 # SOURCE4 14 1.1650
angle_coeff @angle:nd-cc-sy harmonic 62.75 123.08 # SOURCE4 13 1.0531
angle_coeff @angle:ne-cc-ss harmonic 65.39 116.99 # SOURCE4 7 0.1657
angle_coeff @angle:nh-cc-nh harmonic 72.93 115.96 # SOURCE3 1 0.0000
angle_coeff @angle:nh-cc-os harmonic 72.96 116.69 # CORR 25
angle_coeff @angle:nh-cc-ss harmonic 64.19 121.94 # CORR 91
angle_coeff @angle:n-cc-n2 harmonic 74.78 114.48 # SOURCE4 15 2.3208
angle_coeff @angle:n-cc-na harmonic 70.47 122.14 # CORR 59
angle_coeff @angle:n-cc-nc harmonic 69.35 125.66 # CORR 64
angle_coeff @angle:n-cc-nd harmonic 71.12 122.98 # CORR 229
angle_coeff @angle:n-cc-nh harmonic 72.22 116.87 # CORR 79
angle_coeff @angle:no-cc-os harmonic 71.01 117.59 # SOURCE4 62 0.2199
angle_coeff @angle:no-cc-ss harmonic 63.76 121.10 # SOURCE4 10 0.0957
angle_coeff @angle:n-cc-ss harmonic 63.75 123.03 # CORR 45
angle_coeff @angle:c-c-o harmonic 67.16 120.99 # SOURCE4 233 2.0333
angle_coeff @angle:c-c-oh harmonic 68.20 113.23 # SOURCE3 5 0.5615
angle_coeff @angle:c-c-os harmonic 68.18 111.39 # SOURCE4 14 0.4038
angle_coeff @angle:os-cc-ss harmonic 61.99 132.01 # SOURCE3 1 0.0000
angle_coeff @angle:ss-cc-ss harmonic 62.44 121.37 # CORR 22
angle_coeff @angle:ss-cc-sy harmonic 61.51 121.70 # CORR 39
angle_coeff @angle:cx-c-cx harmonic 85.45 64.60 # SOURCE2 1 0.0000
angle_coeff @angle:cx-c-n harmonic 68.69 114.49 # SOURCE4 23 1.4914
angle_coeff @angle:cx-c-o harmonic 68.88 122.82 # SOURCE4 97 2.2075
angle_coeff @angle:cx-c-oh harmonic 70.49 112.32 # SOURCE4 10 0.6413
angle_coeff @angle:cx-c-os harmonic 70.06 111.48 # SOURCE4 16 1.3998
angle_coeff @angle:cy-c-cy harmonic 70.14 90.55 # SOURCE2 2 2.4500
angle_coeff @angle:cy-c-n harmonic 75.43 91.54 # SOURCE4 249 0.5104
angle_coeff @angle:cy-c-o harmonic 64.27 135.04 # SOURCE4 253 1.3450
angle_coeff @angle:cy-c-oh harmonic 69.09 112.48 # SOURCE4 5 1.0793
angle_coeff @angle:cy-c-os harmonic 74.55 94.89 # SOURCE4 8 0.6016
angle_coeff @angle:c2-cd-c3 harmonic 63.27 126.11 # SOURCE3 2 0.0000
angle_coeff @angle:c2-cd-ca harmonic 65.34 124.66 # CORR 16
angle_coeff @angle:c2-cd-cc harmonic 69.09 117.02 # SOURCE3 2 same_as_c2-cc-cd
angle_coeff @angle:c2-cd-cd harmonic 66.24 121.77 # CORR 32
angle_coeff @angle:c2-cd-ha harmonic 48.69 122.72 # SOURCE3 2 same_as_c2-cc-ha
angle_coeff @angle:c2-cd-n harmonic 67.74 126.90 # SOURCE3 1 same_as_c2-cc-n
angle_coeff @angle:c2-cd-os harmonic 70.10 120.79 # CORR 13
angle_coeff @angle:c3-cd-ca harmonic 61.96 125.89 # CORR 127
angle_coeff @angle:c3-cd-cc harmonic 64.81 119.45 # SOURCE3 35 8.2040
angle_coeff @angle:c3-cd-cd harmonic 64.66 115.97 # SOURCE3 4 3.0507
angle_coeff @angle:c3-cd-ce harmonic 65.34 117.84 # CORR 2
angle_coeff @angle:c3-cd-ha harmonic 45.11 121.52 # SOURCE3 32 3.2091
angle_coeff @angle:c3-cd-n2 harmonic 65.80 126.87 # CORR 9
angle_coeff @angle:c3-cd-n harmonic 66.33 119.11 # CORR 68
angle_coeff @angle:c3-cd-na harmonic 65.50 122.78 # CORR 632
angle_coeff @angle:c3-cd-nc harmonic 66.32 122.13 # CORR 475
angle_coeff @angle:c3-cd-nd harmonic 65.90 120.94 # CORR 309
angle_coeff @angle:c3-cd-os harmonic 67.54 116.88 # CORR 203
angle_coeff @angle:c3-cd-ss harmonic 61.21 121.66 # CORR 171
angle_coeff @angle:ca-cd-cc harmonic 68.23 113.51 # SOURCE3 26 7.4229
angle_coeff @angle:ca-cd-cd harmonic 67.66 111.04 # SOURCE3 9 7.9455
angle_coeff @angle:ca-cd-ce harmonic 65.09 125.10 # SOURCE4 9 1.9265
angle_coeff @angle:ca-cd-h4 harmonic 45.57 128.66 # SOURCE3 10 3.1167
angle_coeff @angle:ca-cd-ha harmonic 46.40 124.04 # SOURCE3 34 3.6691
angle_coeff @angle:ca-cd-n harmonic 68.46 117.67 # CORR 18
angle_coeff @angle:ca-cd-na harmonic 67.03 123.45 # SOURCE4 39 1.9138
angle_coeff @angle:ca-cd-nc harmonic 67.92 123.02 # CORR 188
angle_coeff @angle:ca-cd-nd harmonic 67.69 120.67 # CORR 162
angle_coeff @angle:ca-cd-oh harmonic 69.61 117.71 # CORR 21
angle_coeff @angle:ca-cd-os harmonic 69.82 115.16 # CORR 134
angle_coeff @angle:ca-cd-ss harmonic 62.30 120.51 # CORR 43
angle_coeff @angle:c-cd-c2 harmonic 65.60 120.92 # CORR 22
angle_coeff @angle:c-cd-c3 harmonic 63.60 117.42 # CORR 126
angle_coeff @angle:c-cd-c harmonic 63.42 121.17 # CORR 64
angle_coeff @angle:c-cd-ca harmonic 63.55 122.95 # SOURCE3 1 same_as_c-cc-ca
angle_coeff @angle:c-cd-cc harmonic 65.25 121.42 # CORR 1708
angle_coeff @angle:cc-cd-cc harmonic 67.89 120.23 # CORR 133
angle_coeff @angle:cc-cd-cd harmonic 68.16 114.19 # SOURCE3 517 6.5960
angle_coeff @angle:cc-cd-cf harmonic 63.67 128.41 # CORR 210
angle_coeff @angle:cc-cd-ch harmonic 64.92 126.05 # SOURCE4 30 1.4695
angle_coeff @angle:cc-cd-cl harmonic 57.46 123.70 # CORR 62
angle_coeff @angle:cc-cd-cy harmonic 63.93 122.13 # SOURCE4 10 0.8509
angle_coeff @angle:c-cd-cd harmonic 63.72 122.69 # SOURCE3 2 0.0000
angle_coeff @angle:c-cd-cf harmonic 63.20 122.73 # CORR 10
angle_coeff @angle:cc-cd-h4 harmonic 47.19 129.11 # SOURCE3 418 3.1355
angle_coeff @angle:cc-cd-ha harmonic 48.35 122.89 # SOURCE3 584 2.9334
angle_coeff @angle:c-cd-cl harmonic 58.39 116.05 # CORR 24
angle_coeff @angle:cc-cd-n harmonic 70.72 115.52 # SOURCE3 52 1.3322
angle_coeff @angle:cc-cd-na harmonic 72.91 109.42 # SOURCE3 265 2.6051
angle_coeff @angle:cc-cd-nc harmonic 69.42 123.82 # SOURCE4 14 0.3678
angle_coeff @angle:cc-cd-nd harmonic 72.01 111.75 # CORR 1101
angle_coeff @angle:cc-cd-nh harmonic 68.69 123.89 # CORR 106
angle_coeff @angle:cc-cd-oh harmonic 69.56 123.89 # CORR 106
angle_coeff @angle:cc-cd-os harmonic 69.96 120.30 # SOURCE3 64 5.4354
angle_coeff @angle:cc-cd-ss harmonic 65.44 111.55 # CORR 884
angle_coeff @angle:cc-cd-sy harmonic 60.54 124.91 # CORR 41
angle_coeff @angle:cd-cd-cd harmonic 67.88 110.70 # SOURCE3 54 3.4091
angle_coeff @angle:cd-cd-ce harmonic 65.88 122.59 # CORR 39
angle_coeff @angle:cd-cd-cf harmonic 62.78 127.20 # CORR 42
angle_coeff @angle:cd-cd-ch harmonic 63.63 126.15 # CORR 27
angle_coeff @angle:cd-cd-cy harmonic 63.17 120.93 # SOURCE4 6 1.2205
angle_coeff @angle:cd-cd-h4 harmonic 45.56 129.47 # SOURCE3 171 2.2734
angle_coeff @angle:cd-cd-ha harmonic 47.14 120.86 # CORR 1751
angle_coeff @angle:cd-cd-n2 harmonic 69.48 121.15 # CORR 12
angle_coeff @angle:cd-cd-n harmonic 67.95 119.89 # SOURCE3 36 0.2095
angle_coeff @angle:cd-cd-na harmonic 72.21 106.80 # SOURCE3 33 same_as_cc-cc-na
angle_coeff @angle:cd-cd-nc harmonic 71.15 112.56 # SOURCE3 141 4.2871
angle_coeff @angle:cd-cd-nd harmonic 67.53 121.69 # CORR 105
angle_coeff @angle:cd-cd-nh harmonic 68.41 119.51 # CORR 228
angle_coeff @angle:cd-cd-oh harmonic 68.53 121.96 # CORR 27
angle_coeff @angle:cd-cd-os harmonic 69.34 117.23 # CORR 211
angle_coeff @angle:cd-cd-pc harmonic 80.79 115.36 # SOURCE3 84 3.2889
angle_coeff @angle:cd-cd-ss harmonic 62.45 120.12 # CORR 31
angle_coeff @angle:ce-cd-nd harmonic 68.22 124.90 # SOURCE4 5 2.3975
angle_coeff @angle:cf-cd-na harmonic 66.32 124.22 # CORR 48
angle_coeff @angle:cf-cd-nc harmonic 67.80 121.51 # CORR 37
angle_coeff @angle:cf-cd-nd harmonic 67.01 121.29 # CORR 37
angle_coeff @angle:cf-cd-os harmonic 68.17 119.03 # CORR 66
angle_coeff @angle:cf-cd-ss harmonic 61.83 121.44 # CORR 38
angle_coeff @angle:c-cd-h4 harmonic 46.77 118.19 # SOURCE4 8 0.2226
angle_coeff @angle:c-cd-ha harmonic 46.99 117.02 # SOURCE3 56 1.9713
angle_coeff @angle:cl-cd-nc harmonic 59.35 122.97 # CORR 6
angle_coeff @angle:c-cd-n2 harmonic 68.54 120.89 # CORR 2
angle_coeff @angle:c-cd-n harmonic 68.11 116.32 # CORR 21
angle_coeff @angle:c-cd-nc harmonic 67.50 121.67 # CORR 47
angle_coeff @angle:c-cd-nd harmonic 66.19 123.47 # CORR 24
angle_coeff @angle:c-cd-oh harmonic 70.04 113.64 # CORR 53
angle_coeff @angle:c-cd-os harmonic 67.83 119.39 # CORR 78
angle_coeff @angle:h4-cd-n harmonic 50.39 117.62 # SOURCE3 53 0.9721
angle_coeff @angle:h4-cd-na harmonic 50.22 119.66 # SOURCE3 294 2.4702
angle_coeff @angle:h4-cd-nc harmonic 51.39 119.11 # SOURCE3 135 1.6946
angle_coeff @angle:h4-cd-nd harmonic 50.00 120.03 # SOURCE3 16 2.3863
angle_coeff @angle:h4-cd-os harmonic 52.27 111.89 # SOURCE3 61 2.3500
angle_coeff @angle:h4-cd-ss harmonic 42.95 117.75 # SOURCE3 40 3.1156
angle_coeff @angle:h5-cd-n harmonic 50.84 115.72 # CORR 20
angle_coeff @angle:h5-cd-na harmonic 49.76 122.10 # SOURCE3 16 1.4626
angle_coeff @angle:h5-cd-nc harmonic 50.13 125.38 # SOURCE3 40 2.2157
angle_coeff @angle:h5-cd-nd harmonic 49.29 123.70 # SOURCE3 6 0.3547
angle_coeff @angle:h5-cd-os harmonic 51.30 116.33 # SOURCE3 12 3.2919
angle_coeff @angle:h5-cd-ss harmonic 42.19 122.00 # SOURCE3 6 0.7237
angle_coeff @angle:ha-cd-na harmonic 49.82 121.50 # SOURCE2 1 same_as_ha-cc-na
angle_coeff @angle:ha-cd-nc harmonic 51.41 118.88 # SOURCE3 20 2.8923
angle_coeff @angle:ha-cd-nd harmonic 50.73 116.54 # SOURCE3 5 1.4482
angle_coeff @angle:ha-cd-os harmonic 52.49 110.86 # SOURCE3 7 1.3846
angle_coeff @angle:ha-cd-pc harmonic 53.59 121.76 # SOURCE3 84 2.2216
angle_coeff @angle:ha-cd-ss harmonic 42.26 121.64 # SOURCE2 5 same_as_ha-cc-ss
angle_coeff @angle:na-cd-nc harmonic 74.78 112.02 # SOURCE3 17 2.2434
angle_coeff @angle:na-cd-nd harmonic 70.72 121.62 # CORR 231
angle_coeff @angle:na-cd-nh harmonic 72.43 116.98 # SOURCE4 46 1.4937
angle_coeff @angle:na-cd-ss harmonic 67.07 111.46 # SOURCE4 20 0.8600
angle_coeff @angle:nc-cd-nd harmonic 73.35 115.96 # CORR 222
angle_coeff @angle:nc-cd-nh harmonic 72.41 120.11 # SOURCE3 5 0.9313
angle_coeff @angle:nc-cd-oh harmonic 72.93 121.54 # CORR 22
angle_coeff @angle:nc-cd-os harmonic 73.85 116.29 # CORR 209
angle_coeff @angle:nc-cd-ss harmonic 66.51 114.51 # SOURCE3 8 0.3449
angle_coeff @angle:nd-cd-nd harmonic 69.47 125.58 # SOURCE4 13 0.4672
angle_coeff @angle:nd-cd-nh harmonic 72.33 116.85 # CORR 35
angle_coeff @angle:nd-cd-ss harmonic 64.63 119.86 # SOURCE3 2 same_as_nc-cc-ss
angle_coeff @angle:nh-cd-nh harmonic 72.93 115.96 # SOURCE3 1 same_as_nh-cc-nh
angle_coeff @angle:nh-cd-os harmonic 72.96 116.69 # CORR 25
angle_coeff @angle:nh-cd-ss harmonic 64.19 121.94 # CORR 91
angle_coeff @angle:n-cd-na harmonic 70.47 122.14 # CORR 59
angle_coeff @angle:n-cd-nc harmonic 71.12 122.98 # CORR 229
angle_coeff @angle:n-cd-nd harmonic 69.35 125.66 # CORR 64
angle_coeff @angle:n-cd-nh harmonic 72.22 116.87 # CORR 79
angle_coeff @angle:n-cd-ss harmonic 63.75 123.03 # CORR 45
angle_coeff @angle:oh-cd-os harmonic 75.54 111.61 # SOURCE4 6 1.1909
angle_coeff @angle:os-cd-ss harmonic 61.99 132.01 # SOURCE3 1 same_as_os-cc-ss
angle_coeff @angle:ss-cd-ss harmonic 62.44 121.37 # CORR 22
angle_coeff @angle:ss-cd-sy harmonic 61.51 121.70 # CORR 39
angle_coeff @angle:c2-ce-c3 harmonic 64.30 122.89 # SOURCE3 7 1.0449
angle_coeff @angle:c2-ce-ca harmonic 65.16 123.08 # SOURCE3 6 2.1589
angle_coeff @angle:c2-ce-cc harmonic 65.62 123.27 # CORR 72
angle_coeff @angle:c2-ce-ce harmonic 65.73 123.08 # SOURCE3 12 0.6518
angle_coeff @angle:c2-ce-cg harmonic 66.66 121.67 # CORR 21
angle_coeff @angle:c2-ce-cl harmonic 57.87 119.51 # SOURCE4 24 1.4963
angle_coeff @angle:c2-ce-h4 harmonic 48.64 125.58 # SOURCE4 11 0.9381
angle_coeff @angle:c2-ce-ha harmonic 49.56 121.10 # SOURCE3 46 2.4054
angle_coeff @angle:c2-ce-n1 harmonic 72.67 117.85 # SOURCE4 7 0.3180
angle_coeff @angle:c2-ce-n2 harmonic 70.34 128.70 # SOURCE3 1 0.0000
angle_coeff @angle:c2-ce-na harmonic 69.29 119.19 # SOURCE4 5 0.8452
angle_coeff @angle:c2-ce-ne harmonic 69.73 118.32 # SOURCE3 7 1.0468
angle_coeff @angle:c2-ce-oh harmonic 70.32 123.78 # SOURCE4 10 1.8182
angle_coeff @angle:c2-ce-p2 harmonic 77.91 118.24 # SOURCE3 1
angle_coeff @angle:c2-ce-pe harmonic 77.59 118.76 # SOURCE3 8 2.3984
angle_coeff @angle:c2-ce-px harmonic 77.17 119.72 # SOURCE3 6 0.5213
angle_coeff @angle:c2-ce-py harmonic 77.39 122.13 # SOURCE3 5 3.1367
angle_coeff @angle:c2-ce-sx harmonic 61.64 119.87 # SOURCE3 5 0.8557
angle_coeff @angle:c2-ce-sy harmonic 61.96 120.35 # SOURCE3 5 0.5401
angle_coeff @angle:c3-ce-ca harmonic 62.76 119.28 # CORR 178
angle_coeff @angle:c3-ce-cc harmonic 63.42 118.22 # CORR 39
angle_coeff @angle:c3-ce-ce harmonic 63.80 116.99 # CORR 244
angle_coeff @angle:c3-ce-cf harmonic 64.52 122.11 # CORR 221
angle_coeff @angle:c3-ce-cg harmonic 63.79 118.48 # SOURCE4 8 1.4756
angle_coeff @angle:c3-ce-n2 harmonic 66.92 122.70 # CORR 81
angle_coeff @angle:c3-ce-nf harmonic 67.26 120.75 # SOURCE4 6 2.1938
angle_coeff @angle:c3-ce-nh harmonic 65.76 119.90 # SOURCE4 5 0.9634
angle_coeff @angle:ca-ce-ca harmonic 63.94 117.58 # CORR 112
angle_coeff @angle:ca-ce-cc harmonic 64.21 118.06 # CORR 17
angle_coeff @angle:ca-ce-ce harmonic 63.84 119.62 # SOURCE4 14 1.9171
angle_coeff @angle:ca-ce-cf harmonic 64.07 127.39 # CORR 318
angle_coeff @angle:ca-ce-cl harmonic 57.99 114.22 # SOURCE4 6 1.3164
angle_coeff @angle:ca-ce-h4 harmonic 46.71 116.86 # SOURCE4 74 0.9179
angle_coeff @angle:ca-ce-ha harmonic 47.07 115.16 # CORR 345
angle_coeff @angle:ca-ce-n2 harmonic 68.51 120.72 # SOURCE3 1 0.0000
angle_coeff @angle:ca-ce-nf harmonic 67.74 122.66 # CORR 22
angle_coeff @angle:ca-ce-nh harmonic 67.87 115.51 # SOURCE4 93 0.9284
angle_coeff @angle:ca-ce-oh harmonic 68.85 116.37 # CORR 11
angle_coeff @angle:ca-ce-os harmonic 68.60 115.58 # SOURCE4 8 1.0735
angle_coeff @angle:ca-ce-ss harmonic 61.21 117.73 # SOURCE4 5 1.1596
angle_coeff @angle:c-ce-c2 harmonic 65.82 120.42 # SOURCE3 13 1.8877
angle_coeff @angle:c-ce-c3 harmonic 63.35 116.92 # CORR 188
angle_coeff @angle:c-ce-c harmonic 62.59 122.38 # CORR 23
angle_coeff @angle:c-ce-ca harmonic 63.79 117.98 # SOURCE4 8 1.5129
angle_coeff @angle:cc-ce-cd harmonic 63.28 130.36 # SOURCE4 5 2.3402
angle_coeff @angle:cc-ce-cf harmonic 64.87 126.20 # CORR 88
angle_coeff @angle:c-ce-cd harmonic 63.81 126.07 # CORR 2
angle_coeff @angle:c-ce-ce harmonic 63.46 120.89 # SOURCE4 16 1.8719
angle_coeff @angle:c-ce-cf harmonic 64.26 126.41 # SOURCE3 2 5.7847
angle_coeff @angle:c-ce-cg harmonic 64.57 118.32 # SOURCE4 15 1.0595
angle_coeff @angle:cc-ce-h4 harmonic 47.52 115.40 # SOURCE4 29 0.8744
angle_coeff @angle:cc-ce-ha harmonic 47.53 115.45 # CORR 113
angle_coeff @angle:c-ce-cl harmonic 57.67 115.40 # SOURCE4 6 1.0958
angle_coeff @angle:cc-ce-n2 harmonic 68.94 121.28 # CORR 69
angle_coeff @angle:cc-ce-nh harmonic 67.31 119.17 # SOURCE4 8 2.1378
angle_coeff @angle:c-ce-cy harmonic 72.72 88.22 # SOURCE4 19 0.3234
angle_coeff @angle:cd-ce-ce harmonic 64.81 124.49 # CORR 12
angle_coeff @angle:cd-ce-ha harmonic 49.97 115.48 # CORR 39
angle_coeff @angle:ce-ce-ce harmonic 64.55 118.74 # SOURCE3 1 0.0000
angle_coeff @angle:ce-ce-cf harmonic 65.46 124.19 # CORR 341
angle_coeff @angle:ce-ce-cl harmonic 57.29 117.93 # SOURCE4 12 0.2639
angle_coeff @angle:ce-ce-h4 harmonic 47.06 117.97 # CORR 19
angle_coeff @angle:ce-ce-ha harmonic 47.50 115.90 # SOURCE3 12 0.4670
angle_coeff @angle:ce-ce-n1 harmonic 66.79 127.15 # CORR 4
angle_coeff @angle:ce-ce-n2 harmonic 69.57 119.33 # CORR 13
angle_coeff @angle:ce-ce-oh harmonic 69.29 116.89 # SOURCE4 11 2.0380
angle_coeff @angle:cf-ce-cg harmonic 66.10 123.79 # CORR 41
angle_coeff @angle:cf-ce-cy harmonic 60.53 137.74 # SOURCE4 13 0.3952
angle_coeff @angle:cf-ce-h4 harmonic 49.02 123.76 # SOURCE4 5 1.0909
angle_coeff @angle:cf-ce-ha harmonic 50.21 118.12 # CORR 655
angle_coeff @angle:cf-ce-n1 harmonic 72.03 120.03 # SOURCE4 6 1.9451
angle_coeff @angle:cf-ce-n harmonic 72.60 108.25 # CORR 64
angle_coeff @angle:cf-ce-nh harmonic 69.48 121.52 # SOURCE4 12 2.0106
angle_coeff @angle:cf-ce-oh harmonic 70.92 121.78 # CORR 24
angle_coeff @angle:cg-ce-cg harmonic 65.58 118.26 # CORR 7
angle_coeff @angle:cg-ce-ha harmonic 47.93 116.54 # CORR 18
angle_coeff @angle:cg-ce-n1 harmonic 69.49 119.50 # CORR 2
angle_coeff @angle:cg-ce-n2 harmonic 69.59 121.43 # SOURCE4 6 0.8382
angle_coeff @angle:c-ce-ha harmonic 46.59 117.26 # SOURCE3 11 2.7158
angle_coeff @angle:c-ce-n harmonic 66.20 118.62 # CORR 137
angle_coeff @angle:c-ce-nh harmonic 67.79 115.62 # CORR 19
angle_coeff @angle:c-ce-oh harmonic 68.34 117.92 # SOURCE4 5 1.4580
angle_coeff @angle:c-ce-os harmonic 69.09 113.78 # SOURCE4 21 1.8258
angle_coeff @angle:h4-ce-n1 harmonic 52.58 116.36 # SOURCE4 7 0.2182
angle_coeff @angle:h4-ce-n2 harmonic 52.36 121.58 # CORR 116
angle_coeff @angle:h4-ce-ne harmonic 49.72 115.81 # SOURCE4 7 1.9836
angle_coeff @angle:ha-ce-n1 harmonic 52.70 115.96 # CORR 4
angle_coeff @angle:ha-ce-n2 harmonic 52.85 119.51 # SOURCE3 2 0.4623
angle_coeff @angle:ha-ce-ne harmonic 49.16 118.59 # SOURCE3 5 1.1113
angle_coeff @angle:ha-ce-nh harmonic 50.62 114.99 # CORR 2
angle_coeff @angle:ha-ce-p2 harmonic 51.40 120.11 # SOURCE3 1
angle_coeff @angle:ha-ce-pe harmonic 51.44 119.33 # SOURCE3 6 0.8966
angle_coeff @angle:ha-ce-px harmonic 51.66 117.90 # SOURCE3 6 0.1809
angle_coeff @angle:ha-ce-py harmonic 52.32 118.72 # SOURCE3 3 0.3064
angle_coeff @angle:ha-ce-sx harmonic 41.85 115.45 # SOURCE3 3 0.6640
angle_coeff @angle:ha-ce-sy harmonic 42.34 114.86 # SOURCE3 3 0.4717
angle_coeff @angle:n2-ce-nh harmonic 71.56 124.96 # CORR 92
angle_coeff @angle:n2-ce-os harmonic 74.58 118.13 # SOURCE4 6 0.1367
angle_coeff @angle:n2-ce-ss harmonic 64.40 117.23 # SOURCE4 6 2.0518
angle_coeff @angle:ne-ce-ne harmonic 68.07 123.87 # SOURCE3 1 0.0000
angle_coeff @angle:ne-ce-nh harmonic 71.89 112.91 # SOURCE4 12 1.1263
angle_coeff @angle:nf-ce-nh harmonic 73.31 118.13 # SOURCE4 6 0.5842
angle_coeff @angle:pe-ce-pe harmonic 92.40 129.79 # SOURCE3 1 0.0000
angle_coeff @angle:py-ce-py harmonic 102.62 108.06 # SOURCE3 1 0.0000
angle_coeff @angle:sx-ce-sx harmonic 60.61 120.32 # SOURCE3 1 0.0000
angle_coeff @angle:sy-ce-sy harmonic 61.21 119.97 # SOURCE3 1 0.0000
angle_coeff @angle:c2-cf-c3 harmonic 64.30 122.89 # SOURCE3 7 same_as_c2-ce-c3
angle_coeff @angle:c2-cf-ca harmonic 65.16 123.08 # SOURCE3 6 same_as_c2-ce-ca
angle_coeff @angle:c2-cf-cd harmonic 65.62 123.27 # CORR 72
angle_coeff @angle:c2-cf-cf harmonic 65.73 123.08 # SOURCE3 12 same_as_c2-ce-ce
angle_coeff @angle:c2-cf-ch harmonic 66.66 121.67 # CORR 21
angle_coeff @angle:c2-cf-ha harmonic 49.56 121.10 # SOURCE3 46 same_as_c2-ce-ha
angle_coeff @angle:c2-cf-n2 harmonic 70.34 128.70 # SOURCE3 1 same_as_c2-ce-n2
angle_coeff @angle:c2-cf-nf harmonic 69.73 118.32 # SOURCE3 7 same_as_c2-ce-ne
angle_coeff @angle:c2-cf-p2 harmonic 77.91 118.24 # SOURCE3 1 same_as_c2-ce-p2
angle_coeff @angle:c2-cf-pf harmonic 77.59 118.76 # SOURCE3 8 same_as_c2-ce-pe
angle_coeff @angle:c2-cf-px harmonic 77.17 119.72 # SOURCE3 6 same_as_c2-ce-px
angle_coeff @angle:c2-cf-py harmonic 77.39 122.13 # SOURCE3 5 same_as_c2-ce-py
angle_coeff @angle:c2-cf-sx harmonic 61.64 119.87 # SOURCE3 5 same_as_c2-ce-sx
angle_coeff @angle:c2-cf-sy harmonic 61.96 120.35 # SOURCE3 5 same_as_c2-ce-sy
angle_coeff @angle:c3-cf-ca harmonic 62.76 119.28 # CORR 178
angle_coeff @angle:c3-cf-cd harmonic 63.42 118.22 # CORR 39
angle_coeff @angle:c3-cf-ce harmonic 64.52 122.11 # CORR 221
angle_coeff @angle:c3-cf-cf harmonic 63.80 116.99 # CORR 244
angle_coeff @angle:c3-cf-n2 harmonic 66.92 122.70 # CORR 81
angle_coeff @angle:ca-cf-ca harmonic 63.94 117.58 # CORR 112
angle_coeff @angle:ca-cf-cc harmonic 62.70 130.80 # SOURCE4 12 1.2696
angle_coeff @angle:ca-cf-cd harmonic 64.21 118.06 # CORR 17
angle_coeff @angle:ca-cf-ce harmonic 64.07 127.39 # CORR 318
angle_coeff @angle:ca-cf-ha harmonic 47.07 115.16 # CORR 345
angle_coeff @angle:ca-cf-n2 harmonic 68.51 120.72 # SOURCE3 1 same_as_ca-ce-n2
angle_coeff @angle:ca-cf-ne harmonic 67.74 122.66 # CORR 22
angle_coeff @angle:ca-cf-oh harmonic 68.85 116.37 # CORR 11
angle_coeff @angle:c-cf-c2 harmonic 65.82 120.42 # SOURCE3 13 same_as_c-ce-c2
angle_coeff @angle:c-cf-c3 harmonic 63.35 116.92 # CORR 188
angle_coeff @angle:c-cf-c harmonic 62.59 122.38 # CORR 23
angle_coeff @angle:c-cf-cc harmonic 63.81 126.07 # CORR 2
angle_coeff @angle:cc-cf-cf harmonic 64.81 124.49 # CORR 12
angle_coeff @angle:c-cf-cd harmonic 64.25 117.76 # SOURCE4 10 1.2451
angle_coeff @angle:c-cf-ce harmonic 64.26 126.41 # SOURCE3 2 same_as_c-ce-cf
angle_coeff @angle:cc-cf-ha harmonic 49.97 115.48 # CORR 39
angle_coeff @angle:cd-cf-ce harmonic 64.87 126.20 # CORR 88
angle_coeff @angle:cd-cf-ha harmonic 47.53 115.45 # CORR 113
angle_coeff @angle:cd-cf-n2 harmonic 68.94 121.28 # CORR 69
angle_coeff @angle:ce-cf-cf harmonic 65.46 124.19 # CORR 341
angle_coeff @angle:ce-cf-ch harmonic 66.10 123.79 # CORR 41
angle_coeff @angle:ce-cf-ha harmonic 50.21 118.12 # CORR 655
angle_coeff @angle:ce-cf-n harmonic 72.60 108.25 # CORR 64
angle_coeff @angle:ce-cf-oh harmonic 70.92 121.78 # CORR 24
angle_coeff @angle:cf-cf-cf harmonic 64.55 118.74 # SOURCE3 1 same_as_ce-ce-ce
angle_coeff @angle:cf-cf-h4 harmonic 47.06 117.97 # CORR 19
angle_coeff @angle:cf-cf-ha harmonic 47.50 115.90 # SOURCE3 12 0.4670
angle_coeff @angle:cf-cf-n1 harmonic 66.79 127.15 # CORR 4
angle_coeff @angle:cf-cf-n2 harmonic 69.57 119.33 # CORR 13
angle_coeff @angle:c-cf-ha harmonic 46.59 117.26 # SOURCE3 11 2.7158
angle_coeff @angle:ch-cf-ch harmonic 65.58 118.26 # CORR 7
angle_coeff @angle:ch-cf-ha harmonic 47.93 116.54 # CORR 18
angle_coeff @angle:ch-cf-n1 harmonic 69.49 119.50 # CORR 2
angle_coeff @angle:c-cf-n2 harmonic 70.16 114.88 # SOURCE4 5 1.3647
angle_coeff @angle:c-cf-n harmonic 66.20 118.62 # CORR 137
angle_coeff @angle:c-cf-nh harmonic 67.79 115.62 # CORR 19
angle_coeff @angle:f-c-f harmonic 72.22 107.35 # SOURCE2 2 0.2500
angle_coeff @angle:h4-cf-n2 harmonic 52.36 121.58 # CORR 116
angle_coeff @angle:h4-cf-ne harmonic 52.29 120.21 # SOURCE4 6 0.8104
angle_coeff @angle:ha-cf-n1 harmonic 52.70 115.96 # CORR 4
angle_coeff @angle:ha-cf-n2 harmonic 52.85 119.51 # SOURCE3 2 same_as_ha-ce-n2
angle_coeff @angle:ha-cf-nf harmonic 49.16 118.59 # SOURCE3 5 same_as_ha-ce-ne
angle_coeff @angle:ha-cf-nh harmonic 50.62 114.99 # CORR 2
angle_coeff @angle:ha-cf-p2 harmonic 51.40 120.11 # SOURCE3 1 same_as_ha-ce-p2
angle_coeff @angle:ha-cf-pf harmonic 51.44 119.33 # SOURCE3 6 same_as_ha-ce-pe
angle_coeff @angle:ha-cf-px harmonic 51.66 117.90 # SOURCE3 6 same_as_ha-ce-px
angle_coeff @angle:ha-cf-py harmonic 52.32 118.72 # SOURCE3 3 same_as_ha-ce-py
angle_coeff @angle:ha-cf-sx harmonic 41.85 115.45 # SOURCE3 3 same_as_ha-ce-sx
angle_coeff @angle:ha-cf-sy harmonic 42.34 114.86 # SOURCE3 3 same_as_ha-ce-sy
angle_coeff @angle:n2-cf-nh harmonic 71.56 124.96 # CORR 92
angle_coeff @angle:nf-cf-nf harmonic 68.07 123.87 # SOURCE3 1 same_as_ne-ce-ne
angle_coeff @angle:f-c-o harmonic 73.21 123.44 # SOURCE3 1
angle_coeff @angle:pf-cf-pf harmonic 92.40 129.79 # SOURCE3 1 same_as_pe-ce-pe
angle_coeff @angle:py-cf-py harmonic 102.62 108.06 # SOURCE3 1 same_as_py-ce-py
angle_coeff @angle:f-c-s harmonic 63.41 124.00 # SOURCE2 1 0.0000
angle_coeff @angle:sx-cf-sx harmonic 60.61 120.32 # SOURCE3 1 same_as_sx-ce-sx
angle_coeff @angle:sy-cf-sy harmonic 61.21 119.97 # SOURCE3 1 same_as_sy-ce-sy
angle_coeff @angle:c1-cg-ca harmonic 56.52 179.52 # CORR 19
angle_coeff @angle:c1-cg-cc harmonic 56.97 178.60 # SOURCE4 6 0.3822
angle_coeff @angle:c1-cg-ce harmonic 56.95 178.05 # CORR 7
angle_coeff @angle:c1-cg-cg harmonic 58.17 179.70 # CORR 18
angle_coeff @angle:c1-cg-ne harmonic 62.73 170.02 # SOURCE3 4 1.1724
angle_coeff @angle:c1-cg-pe harmonic 71.80 173.29 # SOURCE3 11 4.9305
angle_coeff @angle:ca-cg-ch harmonic 56.91 179.64 # CORR 13
angle_coeff @angle:ca-cg-n1 harmonic 58.93 179.43 # CORR 103
angle_coeff @angle:c-cg-c1 harmonic 56.19 179.14 # SOURCE3 2 0.0000
angle_coeff @angle:cc-cg-n1 harmonic 59.43 178.54 # CORR 50
angle_coeff @angle:ce-cg-ch harmonic 57.39 177.94 # CORR 17
angle_coeff @angle:ce-cg-n1 harmonic 59.39 177.97 # CORR 67
angle_coeff @angle:n1-cg-ne harmonic 64.98 174.44 # CORR 17
angle_coeff @angle:h4-c-o harmonic 54.28 120.93 # SOURCE4 129 0.5769
angle_coeff @angle:h5-c-n harmonic 52.39 112.19 # SOURCE4 33 0.4220
angle_coeff @angle:h5-c-o harmonic 53.89 123.26 # SOURCE4 38 0.4806
angle_coeff @angle:ha-c-ha harmonic 37.86 115.61 # SOURCE3 4 0.0458
angle_coeff @angle:ha-c-i harmonic 36.71 110.58 # SOURCE3 1 0.0000
angle_coeff @angle:ha-c-n harmonic 52.40 112.37 # SOURCE3 4 0.6424
angle_coeff @angle:ha-c-o harmonic 54.27 121.94 # SOURCE3 51 2.3235
angle_coeff @angle:ha-c-oh harmonic 53.97 111.82 # SOURCE3 4 1.9375
angle_coeff @angle:ha-c-os harmonic 53.24 110.34 # SOURCE3 8 1.9344
angle_coeff @angle:ha-c-s harmonic 44.27 119.56 # SOURCE3 3 0.7586
angle_coeff @angle:c1-ch-ca harmonic 56.52 179.52 # CORR 19
angle_coeff @angle:c1-ch-cf harmonic 56.95 178.05 # CORR 7
angle_coeff @angle:c1-ch-ch harmonic 58.17 179.70 # CORR 18
angle_coeff @angle:c1-ch-nf harmonic 62.73 170.02 # SOURCE3 4 same_as_c1-cg-ne
angle_coeff @angle:c1-ch-pf harmonic 71.80 173.29 # SOURCE3 11 same_as_c1-cg-pe
angle_coeff @angle:ca-ch-cg harmonic 56.91 179.64 # CORR 13
angle_coeff @angle:ca-ch-n1 harmonic 58.93 179.43 # CORR 103
angle_coeff @angle:c-ch-c1 harmonic 56.19 179.14 # SOURCE3 2 same_as_c-cg-c1
angle_coeff @angle:cd-ch-n1 harmonic 59.43 178.54 # CORR 50
angle_coeff @angle:cf-ch-cg harmonic 57.39 177.94 # CORR 17
angle_coeff @angle:cf-ch-n1 harmonic 59.39 177.97 # CORR 67
angle_coeff @angle:cg-ch-ch harmonic 58.68 179.67 # SOURCE4 7 0.1439
angle_coeff @angle:n1-ch-nf harmonic 64.98 174.44 # CORR 17
angle_coeff @angle:i-c-i harmonic 59.79 116.45 # SOURCE3 1 0.0000
angle_coeff @angle:i-c-o harmonic 55.51 122.02 # SOURCE3 4 1.2961
angle_coeff @angle:f-cl-f harmonic 0.00 87.50 # SOURCE2 1 estimated_force_constant
angle_coeff @angle:n2-c-n2 harmonic 71.83 110.31 # SOURCE3 1
angle_coeff @angle:n2-c-o harmonic 73.02 122.50 # SOURCE3 1
angle_coeff @angle:n4-c-n4 harmonic 64.71 114.64 # SOURCE3 1 0.0000
angle_coeff @angle:n4-c-o harmonic 69.58 118.83 # SOURCE3 4 3.8516
angle_coeff @angle:nc-c-o harmonic 73.92 122.97 # CORR 121
angle_coeff @angle:nd-c-o harmonic 73.92 122.97 # CORR 121
angle_coeff @angle:ne-c-ne harmonic 73.21 110.31 # CORR 2
angle_coeff @angle:ne-c-o harmonic 72.96 125.91 # CORR 42
angle_coeff @angle:nf-c-nf harmonic 73.21 110.31 # CORR 2
angle_coeff @angle:nf-c-o harmonic 72.96 125.91 # CORR 42
angle_coeff @angle:n-c-n harmonic 74.80 113.38 # SOURCE4 635 1.4358
angle_coeff @angle:n-c-nc harmonic 72.35 117.05 # CORR 77
angle_coeff @angle:n-c-nd harmonic 72.35 117.05 # CORR 77
angle_coeff @angle:n-c-ne harmonic 74.43 110.37 # SOURCE4 10 1.7492
angle_coeff @angle:n-c-o harmonic 75.83 122.03 # SOURCE3 221 2.3565
angle_coeff @angle:n-c-oh harmonic 76.22 113.63 # SOURCE4 5 1.1209
angle_coeff @angle:no-c-no harmonic 66.54 109.28 # SOURCE3 1
angle_coeff @angle:no-c-o harmonic 67.95 125.36 # SOURCE3 1
angle_coeff @angle:n-c-os harmonic 76.68 109.28 # SOURCE4 318 0.8749
angle_coeff @angle:n-c-s harmonic 65.73 123.88 # SOURCE3 5 1.2935
angle_coeff @angle:n-c-sh harmonic 65.61 112.61 # SOURCE4 8 1.2601
angle_coeff @angle:n-c-ss harmonic 66.85 110.42 # SOURCE4 59 1.5507
angle_coeff @angle:oh-c-oh harmonic 78.91 110.56 # SOURCE3 2 0.5498
angle_coeff @angle:oh-c-s harmonic 66.64 123.44 # SOURCE3 1 0.0000
angle_coeff @angle:o-c-o harmonic 78.17 130.38 # SOURCE4 429 1.0315
angle_coeff @angle:o-c-oh harmonic 77.38 122.88 # SOURCE3 33 2.1896
angle_coeff @angle:o-c-os harmonic 75.93 123.33 # SOURCE4 1708 1.0632
angle_coeff @angle:o-c-p2 harmonic 75.65 123.10 # SOURCE3 1
angle_coeff @angle:o-c-p3 harmonic 77.08 120.79 # SOURCE3 1
angle_coeff @angle:o-c-p5 harmonic 77.01 121.20 # SOURCE4 8 1.2117
angle_coeff @angle:o-c-pe harmonic 75.23 123.02 # SOURCE3 3 0.1404
angle_coeff @angle:o-c-pf harmonic 75.23 123.02 # SOURCE3 3 same_as_o-c-pe
angle_coeff @angle:o-c-px harmonic 76.75 119.10 # SOURCE3 1 0.0000
angle_coeff @angle:o-c-py harmonic 77.45 121.71 # SOURCE4 5 0.3133
angle_coeff @angle:o-c-s4 harmonic 61.24 121.15 # SOURCE3 1
angle_coeff @angle:o-c-s6 harmonic 61.67 119.45 # SOURCE3 1
angle_coeff @angle:o-c-s harmonic 68.21 120.44 # SOURCE3 2 0.0000
angle_coeff @angle:o-c-sh harmonic 64.19 121.41 # SOURCE3 4 1.4052
angle_coeff @angle:os-c-os harmonic 76.45 111.38 # SOURCE4 12 0.8309
angle_coeff @angle:o-c-ss harmonic 64.62 122.29 # SOURCE3 7 1.9240
angle_coeff @angle:os-c-s harmonic 65.82 125.03 # SOURCE4 18 0.9978
angle_coeff @angle:os-c-ss harmonic 66.30 113.63 # SOURCE4 5 0.7367
angle_coeff @angle:o-c-sx harmonic 60.75 121.15 # SOURCE3 5 3.6452
angle_coeff @angle:o-c-sy harmonic 61.88 119.32 # SOURCE3 5 2.4495
angle_coeff @angle:p2-c-p2 harmonic 94.44 113.75 # SOURCE3 1
angle_coeff @angle:p3-c-p3 harmonic 93.55 118.04 # SOURCE3 1 0.0000
angle_coeff @angle:p3-c-py harmonic 107.54 90.08 # SOURCE3 1 0.0000
angle_coeff @angle:p5-c-p5 harmonic 91.43 123.76 # SOURCE3 1
angle_coeff @angle:ca-cp-ca harmonic 67.11 118.33 # CORR 526
angle_coeff @angle:ca-cp-cp harmonic 64.09 121.13 # CORR 991
angle_coeff @angle:ca-cp-na harmonic 68.78 119.43 # SOURCE4 21 0.6591
angle_coeff @angle:ca-cp-nb harmonic 69.19 121.65 # SOURCE4 63 0.6564
angle_coeff @angle:cp-cp-cp harmonic 72.20 90.00 # SOURCE3 4 0.0000
angle_coeff @angle:cp-cp-cq harmonic 62.64 124.47 # CORR 10
angle_coeff @angle:cp-cp-nb harmonic 68.05 116.60 # SOURCE4 88 1.1887
angle_coeff @angle:pe-c-pe harmonic 93.89 113.77 # SOURCE3 1 0.0000
angle_coeff @angle:pf-c-pf harmonic 93.89 113.77 # SOURCE3 1 same_as_pe-c-pe
angle_coeff @angle:nb-cp-nb harmonic 71.31 125.72 # SOURCE4 5 0.6674
angle_coeff @angle:py-c-py harmonic 92.13 123.80 # SOURCE3 1 0.0000
angle_coeff @angle:ca-cq-ca harmonic 67.11 118.33 # CORR 526
angle_coeff @angle:ca-cq-cq harmonic 64.09 121.13 # CORR 991
angle_coeff @angle:ca-cq-nb harmonic 69.19 121.65 # SOURCE4 63 same as ca-cp-nb
angle_coeff @angle:cp-cq-cq harmonic 62.64 124.47 # CORR 10
angle_coeff @angle:cq-cq-cq harmonic 72.20 90.00 # SOURCE3 4 0.0000
angle_coeff @angle:cq-cq-nb harmonic 68.05 116.60 # SOURCE4 88 same as cp-cp-nb
angle_coeff @angle:s4-c-s4 harmonic 61.25 108.81 # SOURCE3 1
angle_coeff @angle:s6-c-s6 harmonic 59.39 115.75 # SOURCE3 1
angle_coeff @angle:sh-c-sh harmonic 62.47 115.33 # SOURCE3 1 0.0000
angle_coeff @angle:s-c-s harmonic 65.01 120.40 # SOURCE3 2 1.2766
angle_coeff @angle:s-c-sh harmonic 62.29 122.76 # SOURCE4 11 1.5734
angle_coeff @angle:s-c-ss harmonic 61.88 125.90 # SOURCE3 1 0.0000
angle_coeff @angle:ss-c-ss harmonic 63.79 113.00 # SOURCE3 1 0.0000
angle_coeff @angle:sx-c-sx harmonic 60.77 108.80 # SOURCE3 1 0.0000
angle_coeff @angle:sy-c-sy harmonic 59.54 115.78 # SOURCE3 1 0.0000
angle_coeff @angle:c2-cu-cx harmonic 58.56 148.21 # SOURCE4 6 1.8305
angle_coeff @angle:c-cu-cu harmonic 94.97 62.60 # SOURCE2 1 0.0000
angle_coeff @angle:cu-cu-cx harmonic 100.97 50.80 # SOURCE2 1 0.0000
angle_coeff @angle:cu-cu-ha harmonic 46.11 147.73 # SOURCE2 3 2.0950
angle_coeff @angle:cv-cv-cy harmonic 73.28 94.17 # SOURCE3 2 0.0000
angle_coeff @angle:cv-cv-ha harmonic 47.30 133.70 # SOURCE3 2 0.0000
angle_coeff @angle:cx-cv-cx harmonic 84.66 63.90 # SOURCE2 1 0.0000
angle_coeff @angle:cy-cv-ha harmonic 42.89 132.14 # SOURCE3 2 0.0000
angle_coeff @angle:c1-cx-cx harmonic 63.10 120.66 # SOURCE4 9 0.9067
angle_coeff @angle:c2-cx-cx harmonic 62.33 120.54 # SOURCE4 51 2.2377
angle_coeff @angle:c2-cx-h1 harmonic 46.63 115.78 # SOURCE4 8 0.2332
angle_coeff @angle:c2-cx-hc harmonic 46.77 115.10 # SOURCE4 12 0.7463
angle_coeff @angle:c2-cx-os harmonic 67.14 116.17 # SOURCE4 14 1.2782
angle_coeff @angle:c3-cx-c3 harmonic 63.00 114.48 # SOURCE4 46 1.9627
angle_coeff @angle:c3-cx-cx harmonic 61.82 120.06 # SOURCE4 448 2.1467
angle_coeff @angle:c3-cx-h1 harmonic 45.87 115.42 # SOURCE4 89 1.1096
angle_coeff @angle:c3-cx-hc harmonic 46.12 114.16 # SOURCE4 85 1.1118
angle_coeff @angle:c3-cx-n3 harmonic 64.31 118.50 # SOURCE4 17 2.4897
angle_coeff @angle:c3-cx-os harmonic 66.57 115.50 # SOURCE4 161 1.3016
angle_coeff @angle:ca-cx-cx harmonic 61.86 122.18 # SOURCE4 65 1.6898
angle_coeff @angle:ca-cx-h1 harmonic 46.81 114.57 # SOURCE4 7 0.6498
angle_coeff @angle:ca-cx-hc harmonic 47.05 113.41 # SOURCE4 18 0.7843
angle_coeff @angle:ca-cx-oh harmonic 69.25 112.93 # SOURCE3 1 0.0000
angle_coeff @angle:ca-cx-os harmonic 66.42 118.50 # SOURCE4 6 0.7514
angle_coeff @angle:c-cx-c3 harmonic 62.91 116.93 # SOURCE4 18 1.8253
angle_coeff @angle:cc-cx-cx harmonic 62.90 119.31 # CORR 39
angle_coeff @angle:cc-cx-hc harmonic 47.37 113.84 # SOURCE4 15 0.6682
angle_coeff @angle:c-cx-cx harmonic 62.96 117.96 # SOURCE4 147 1.8483
angle_coeff @angle:cd-cx-cx harmonic 62.90 119.31 # CORR 39
angle_coeff @angle:c-cx-h1 harmonic 46.27 117.25 # SOURCE4 24 0.7935
angle_coeff @angle:c-cx-hc harmonic 46.42 116.53 # SOURCE4 36 1.2830
angle_coeff @angle:cl-cx-cl harmonic 54.42 114.20 # SOURCE2 1 0.0000
angle_coeff @angle:cl-cx-cx harmonic 56.53 120.10 # SOURCE4 15 0.5917
angle_coeff @angle:cl-cx-h1 harmonic 40.37 111.43 # SOURCE3 1 0.0000
angle_coeff @angle:cl-cx-hc harmonic 39.60 115.80 # SOURCE2 1 0.0000
angle_coeff @angle:c-cx-os harmonic 67.25 115.59 # SOURCE4 36 0.8227
angle_coeff @angle:cu-cx-cu harmonic 91.53 54.60 # SOURCE2 1 0.0000
angle_coeff @angle:cu-cx-cx harmonic 88.72 58.50 # SOURCE4 7 0.1333
angle_coeff @angle:cu-cx-hc harmonic 45.49 118.09 # SOURCE4 7 1.0126
angle_coeff @angle:cx-cx-cx harmonic 87.90 60.00 # SOURCE4 681 0.6259
angle_coeff @angle:cx-cx-cy harmonic 67.54 100.53 # SOURCE3 4 0.0000
angle_coeff @angle:cx-cx-f harmonic 64.53 117.93 # SOURCE4 7 1.1613
angle_coeff @angle:cx-cx-h1 harmonic 45.45 119.66 # SOURCE3 12 0.4529
angle_coeff @angle:cx-cx-hc harmonic 45.79 117.92 # SOURCE3 92 1.1927
angle_coeff @angle:cx-cx-hx harmonic 45.47 119.62 # SOURCE4 9 0.1118
angle_coeff @angle:cx-cx-n3 harmonic 91.17 59.59 # SOURCE4 154 0.3104
angle_coeff @angle:cx-cx-na harmonic 62.94 125.85 # SOURCE4 16 2.0385
angle_coeff @angle:cx-cx-nh harmonic 92.03 59.15 # SOURCE4 116 0.6758
angle_coeff @angle:cx-cx-os harmonic 93.61 59.07 # SOURCE4 306 0.5253
angle_coeff @angle:cy-cx-hc harmonic 43.98 125.43 # SOURCE3 2 0.0000
angle_coeff @angle:f-cx-f harmonic 70.61 106.90 # SOURCE2 2 1.4000
angle_coeff @angle:f-cx-h1 harmonic 50.35 111.68 # SOURCE3 1 0.0000
angle_coeff @angle:f-cx-hc harmonic 50.22 112.30 # SOURCE2 1 0.0000
angle_coeff @angle:h1-cx-h1 harmonic 38.38 115.45 # SOURCE4 230 0.3302
angle_coeff @angle:h1-cx-n3 harmonic 47.97 116.43 # SOURCE4 173 1.4531
angle_coeff @angle:h1-cx-n harmonic 49.06 115.42 # SOURCE4 12 1.0443
angle_coeff @angle:h1-cx-na harmonic 49.96 108.67 # SOURCE4 8 1.6134
angle_coeff @angle:h1-cx-nh harmonic 48.50 116.32 # SOURCE4 151 1.0310
angle_coeff @angle:h1-cx-os harmonic 50.01 115.17 # SOURCE3 8 0.0226
angle_coeff @angle:h2-cx-h2 harmonic 37.87 119.43 # SOURCE3 1 0.0000
angle_coeff @angle:h2-cx-n2 harmonic 47.55 117.18 # SOURCE3 4 0.0000
angle_coeff @angle:hc-cx-hc harmonic 38.58 114.47 # SOURCE3 19 0.3295
angle_coeff @angle:hc-cx-os harmonic 50.25 114.10 # SOURCE2 1 0.0000
angle_coeff @angle:hx-cx-n4 harmonic 49.89 114.47 # SOURCE4 8 0.1059
angle_coeff @angle:n2-cx-n2 harmonic 102.06 50.16 # SOURCE3 1 0.0000
angle_coeff @angle:n-cx-oh harmonic 70.16 119.75 # SOURCE3 2 0.0000
angle_coeff @angle:n-cx-os harmonic 92.71 65.98 # SOURCE3 1 0.0000
angle_coeff @angle:oh-cx-oh harmonic 76.67 107.85 # SOURCE3 1 0.0000
angle_coeff @angle:oh-cx-os harmonic 71.64 118.12 # SOURCE3 4 1.3581
angle_coeff @angle:os-cx-os harmonic 70.90 115.84 # SOURCE4 7 2.0760
angle_coeff @angle:c2-cy-cy harmonic 66.57 100.40 # SOURCE2 1 0.0000
angle_coeff @angle:c3-cy-c3 harmonic 63.19 111.58 # SOURCE4 15 1.0060
angle_coeff @angle:c3-cy-cy harmonic 60.76 118.70 # SOURCE4 293 1.8510
angle_coeff @angle:c3-cy-h1 harmonic 46.16 111.77 # SOURCE4 119 0.4412
angle_coeff @angle:c3-cy-hc harmonic 46.21 111.55 # SOURCE3 5 0.6276
angle_coeff @angle:c3-cy-n3 harmonic 65.28 112.92 # SOURCE3 2 0.0000
angle_coeff @angle:c3-cy-n harmonic 68.32 104.05 # SOURCE4 122 0.5745
angle_coeff @angle:c3-cy-os harmonic 66.99 111.96 # SOURCE4 11 1.0668
angle_coeff @angle:c-cy-c3 harmonic 61.78 116.72 # SOURCE4 129 0.5236
angle_coeff @angle:cc-cy-cy harmonic 60.58 121.17 # CORR 19
angle_coeff @angle:c-cy-cy harmonic 71.81 84.99 # SOURCE4 263 0.6952
angle_coeff @angle:cd-cy-cy harmonic 60.58 121.17 # CORR 19
angle_coeff @angle:ce-cy-h2 harmonic 45.50 117.25 # SOURCE4 17 0.5351
angle_coeff @angle:ce-cy-n harmonic 74.69 88.02 # SOURCE4 14 0.1416
angle_coeff @angle:ce-cy-ss harmonic 58.47 121.33 # SOURCE4 13 0.1599
angle_coeff @angle:c-cy-h1 harmonic 45.89 113.10 # SOURCE4 71 0.7655
angle_coeff @angle:c-cy-hc harmonic 45.75 113.85 # SOURCE3 8 0.2067
angle_coeff @angle:cl-cy-cy harmonic 57.58 112.00 # SOURCE3 2 0.0000
angle_coeff @angle:cl-cy-h1 harmonic 40.98 106.59 # SOURCE3 1 0.0000
angle_coeff @angle:cl-cy-hc harmonic 39.62 114.00 # SOURCE2 1 0.0000
angle_coeff @angle:c-cy-n harmonic 64.32 117.39 # SOURCE4 70 1.0742
angle_coeff @angle:c-cy-os harmonic 66.27 114.42 # SOURCE4 6 1.2052
angle_coeff @angle:cv-cy-cy harmonic 71.46 86.67 # SOURCE4 6 1.1600
angle_coeff @angle:cv-cy-hc harmonic 46.06 114.47 # SOURCE4 7 0.4307
angle_coeff @angle:cx-cy-cy harmonic 66.08 101.23 # SOURCE3 4 0.0000
angle_coeff @angle:cx-cy-hc harmonic 45.25 118.30 # SOURCE2 3 5.7799
angle_coeff @angle:cy-cy-cy harmonic 70.16 87.61 # SOURCE3 32 1.5407
angle_coeff @angle:cy-cy-f harmonic 64.55 112.87 # SOURCE4 13 1.6772
angle_coeff @angle:cy-cy-h1 harmonic 44.87 114.84 # SOURCE3 20 2.5651
angle_coeff @angle:cy-cy-h2 harmonic 44.51 116.77 # SOURCE4 83 0.8683
angle_coeff @angle:cy-cy-hc harmonic 44.82 115.14 # SOURCE3 114 0.8364
angle_coeff @angle:cy-cy-n3 harmonic 73.47 87.58 # SOURCE3 4 0.6135
angle_coeff @angle:cy-cy-n harmonic 65.22 112.13 # SOURCE3 31 2.0700
angle_coeff @angle:cy-cy-na harmonic 63.12 119.70 # SOURCE4 9 0.3333
angle_coeff @angle:cy-cy-oh harmonic 66.00 114.19 # SOURCE3 4 0.0000
angle_coeff @angle:cy-cy-os harmonic 66.41 111.77 # SOURCE4 18 2.1334
angle_coeff @angle:cy-cy-s6 harmonic 58.93 117.46 # SOURCE4 7 1.2423
angle_coeff @angle:cy-cy-ss harmonic 58.83 118.18 # SOURCE4 55 0.9860
angle_coeff @angle:h1-cy-h1 harmonic 39.01 109.72 # SOURCE3 6 0.8087
angle_coeff @angle:h1-cy-n3 harmonic 48.21 113.36 # SOURCE3 6 1.4509
angle_coeff @angle:h1-cy-n harmonic 49.10 111.18 # SOURCE4 141 0.5848
angle_coeff @angle:h1-cy-oh harmonic 50.89 111.49 # SOURCE3 2 0.0000
angle_coeff @angle:h1-cy-os harmonic 50.53 110.94 # SOURCE3 8 0.6522
angle_coeff @angle:h1-cy-s6 harmonic 41.05 112.57 # SOURCE4 5 1.2943
angle_coeff @angle:h2-cy-n harmonic 48.42 114.44 # SOURCE4 88 0.7114
angle_coeff @angle:h2-cy-os harmonic 50.97 109.19 # SOURCE4 6 0.4162
angle_coeff @angle:h2-cy-s6 harmonic 42.11 106.85 # SOURCE4 6 0.3975
angle_coeff @angle:h2-cy-ss harmonic 41.64 109.73 # SOURCE4 92 0.7424
angle_coeff @angle:hc-cy-hc harmonic 39.24 109.04 # SOURCE3 28 0.5962
angle_coeff @angle:n-cy-os harmonic 71.62 107.50 # SOURCE4 9 2.3773
angle_coeff @angle:n-cy-s6 harmonic 65.24 103.45 # SOURCE4 6 0.7197
angle_coeff @angle:n-cy-ss harmonic 64.81 105.12 # SOURCE4 69 0.3987
angle_coeff @angle:nh-cz-nh harmonic 72.97 120.17 # SOURCE4 26 0.3964
angle_coeff @angle:br-n1-c1 harmonic 51.10 180.00 # HF/6-31G* 1
angle_coeff @angle:c1-n1-c1 harmonic 64.91 179.92 # HF/6-31G* 1
angle_coeff @angle:c1-n1-c2 harmonic 60.25 177.73 # HF/6-31G* 1
angle_coeff @angle:c1-n1-c3 harmonic 54.83 180.00 # HF/6-31G* 1
angle_coeff @angle:c1-n1-ca harmonic 56.97 179.99 # HF/6-31G* 1
angle_coeff @angle:c1-n1-cl harmonic 50.10 179.95 # HF/6-31G* 1
angle_coeff @angle:c1-n1-f harmonic 55.86 179.96 # HF/6-31G* 1
angle_coeff @angle:c1-n1-hn harmonic 45.62 179.98 # HF/6-31G* 1
angle_coeff @angle:c1-n1-i harmonic 46.23 179.95 # HF/6-31G* 1
angle_coeff @angle:c1-n1-n1 harmonic 66.89 180.00 # HF/6-31G* 1
angle_coeff @angle:c1-n1-n2 harmonic 65.70 171.56 # HF/6-31G* 1
angle_coeff @angle:c1-n1-n3 harmonic 60.69 175.59 # HF/6-31G* 1
angle_coeff @angle:c1-n1-n4 harmonic 59.68 179.69 # HF/6-31G* 1
angle_coeff @angle:c1-n1-na harmonic 59.95 180.00 # HF/6-31G* 1
angle_coeff @angle:c1-n1-nh harmonic 60.88 176.35 # HF/6-31G* 1
angle_coeff @angle:c1-n1-o harmonic 62.62 179.95 # HF/6-31G* 1
angle_coeff @angle:c1-n1-oh harmonic 62.88 174.31 # HF/6-31G* 1
angle_coeff @angle:c1-n1-os harmonic 62.15 176.61 # HF/6-31G* 1
angle_coeff @angle:c1-n1-p2 harmonic 68.11 172.83 # HF/6-31G* 1
angle_coeff @angle:c1-n1-p3 harmonic 68.68 173.51 # HF/6-31G* 1
angle_coeff @angle:c1-n1-p4 harmonic 67.87 173.64 # HF/6-31G* 1
angle_coeff @angle:c1-n1-p5 harmonic 71.49 177.28 # HF/6-31G* 1
angle_coeff @angle:c1-n1-s2 harmonic 60.33 178.11 # HF/6-31G* 1
angle_coeff @angle:c1-n1-s4 harmonic 55.20 169.60 # HF/6-31G* 1
angle_coeff @angle:c1-n1-s harmonic 53.31 179.99 # HF/6-31G* 1
angle_coeff @angle:c1-n1-s6 harmonic 61.81 175.92 # HF/6-31G* 1
angle_coeff @angle:c1-n1-sh harmonic 55.72 174.25 # HF/6-31G* 1
angle_coeff @angle:c1-n1-ss harmonic 55.44 176.06 # HF/6-31G* 1
angle_coeff @angle:c2-n1-n1 harmonic 61.58 180.00 # HF/6-31G* 1
angle_coeff @angle:c2-n1-o harmonic 73.09 116.94 # SOURCE3 2 0.0060
angle_coeff @angle:c2-n1-s harmonic 64.71 118.00 # SOURCE3 2 0.0121
angle_coeff @angle:c3-n1-n1 harmonic 56.30 180.00 # HF/6-31G* 1
angle_coeff @angle:ca-n1-n1 harmonic 58.54 180.00 # HF/6-31G* 1
angle_coeff @angle:ce-n1-o harmonic 71.28 122.40 # CORR 2
angle_coeff @angle:ce-n1-s harmonic 64.84 117.34 # CORR 2
angle_coeff @angle:cf-n1-o harmonic 71.28 122.40 # CORR 2
angle_coeff @angle:cf-n1-s harmonic 64.84 117.34 # CORR 2
angle_coeff @angle:cl-n1-n1 harmonic 51.37 179.94 # HF/6-31G* 1
angle_coeff @angle:f-n1-n1 harmonic 57.39 179.93 # HF/6-31G* 1
angle_coeff @angle:hn-n1-n1 harmonic 47.14 179.91 # HF/6-31G* 1
angle_coeff @angle:i-n1-n1 harmonic 47.26 179.94 # HF/6-31G* 1
angle_coeff @angle:n1-n1-n1 harmonic 68.97 179.97 # HF/6-31G* 1
angle_coeff @angle:n1-n1-n2 harmonic 67.65 171.57 # HF/6-31G* 1
angle_coeff @angle:n1-n1-n3 harmonic 62.49 175.09 # HF/6-31G* 1
angle_coeff @angle:n1-n1-n4 harmonic 61.31 179.91 # HF/6-31G* 1
angle_coeff @angle:n1-n1-na harmonic 61.63 179.97 # HF/6-31G* 1
angle_coeff @angle:n1-n1-nh harmonic 62.66 176.00 # HF/6-31G* 1
angle_coeff @angle:n1-n1-o harmonic 64.43 179.94 # HF/6-31G* 1
angle_coeff @angle:n1-n1-oh harmonic 64.78 173.77 # HF/6-31G* 1
angle_coeff @angle:n1-n1-os harmonic 64.01 176.12 # HF/6-31G* 1
angle_coeff @angle:n1-n1-p2 harmonic 69.42 174.71 # HF/6-31G* 1
angle_coeff @angle:n1-n1-p3 harmonic 70.24 174.27 # HF/6-31G* 1
angle_coeff @angle:n1-n1-s harmonic 54.64 180.00 # SOURCE3 1 0.0000
angle_coeff @angle:n1-n1-sh harmonic 57.01 175.07 # HF/6-31G* 1
angle_coeff @angle:n1-n1-ss harmonic 56.92 175.61 # HF/6-31G* 1
angle_coeff @angle:o-n1-p2 harmonic 84.67 116.05 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n1-s harmonic 80.34 119.93 # SOURCE3 1 0.0000
angle_coeff @angle:br-n2-br harmonic 63.89 106.60 # SOURCE3 1
angle_coeff @angle:br-n2-c2 harmonic 59.13 112.40 # SOURCE3 1 0.0000
angle_coeff @angle:br-n2-n2 harmonic 61.08 110.42 # SOURCE3 1 0.0000
angle_coeff @angle:br-n2-o harmonic 60.10 114.47 # SOURCE3 1 0.0000
angle_coeff @angle:br-n2-p2 harmonic 80.05 111.03 # SOURCE3 1 0.0000
angle_coeff @angle:br-n2-s harmonic 62.40 115.78 # SOURCE3 1 0.0000
angle_coeff @angle:c1-n2-c1 harmonic 74.41 121.10 # SOURCE3 1
angle_coeff @angle:c1-n2-c3 harmonic 58.67 151.88 # SOURCE3 4 15.8282
angle_coeff @angle:c1-n2-cl harmonic 55.36 118.80 # SOURCE2 1 0.0000
angle_coeff @angle:c1-n2-hn harmonic 51.47 126.50 # SOURCE2 3 7.6267
angle_coeff @angle:c1-n2-n2 harmonic 76.75 113.40 # SOURCE3 1
angle_coeff @angle:c1-n2-o harmonic 79.20 113.59 # SOURCE3 1
angle_coeff @angle:c1-n2-p2 harmonic 84.76 119.57 # SOURCE3 1
angle_coeff @angle:c1-n2-s harmonic 69.80 117.67 # SOURCE3 1
angle_coeff @angle:c2-n2-c2 harmonic 70.76 118.18 # SOURCE3 1
angle_coeff @angle:c2-n2-c3 harmonic 66.13 115.30 # SOURCE3 8 4.2940
angle_coeff @angle:c2-n2-ca harmonic 69.83 119.94 # SOURCE3 1
angle_coeff @angle:c2-n2-cl harmonic 56.69 112.64 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n2-f harmonic 68.30 108.14 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n2-hn harmonic 52.63 110.33 # SOURCE3 9 0.6498
angle_coeff @angle:c2-n2-i harmonic 51.86 114.74 # SOURCE3 2 0.0139
angle_coeff @angle:c2-n2-n1 harmonic 75.45 115.09 # HF/6-31G* 1
angle_coeff @angle:c2-n2-n2 harmonic 77.94 103.59 # SOURCE3 2 0.0000
angle_coeff @angle:c2-n2-n3 harmonic 71.34 118.14 # SOURCE3 1
angle_coeff @angle:c2-n2-n4 harmonic 62.39 112.22 # SOURCE3 3 0.0406
angle_coeff @angle:c2-n2-n harmonic 70.16 117.98 # SOURCE4 11 0.9019
angle_coeff @angle:c2-n2-na harmonic 70.35 117.58 # SOURCE3 8 1.6671
angle_coeff @angle:c2-n2-nh harmonic 70.71 117.61 # SOURCE3 6 3.2642
angle_coeff @angle:c2-n2-no harmonic 64.22 111.54 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n2-o harmonic 75.47 116.94 # SOURCE3 1
angle_coeff @angle:c2-n2-oh harmonic 72.08 110.89 # SOURCE4 22 1.2709
angle_coeff @angle:c2-n2-os harmonic 71.83 110.51 # SOURCE4 13 0.7888
angle_coeff @angle:c2-n2-p2 harmonic 85.03 116.00 # SOURCE3 1
angle_coeff @angle:c2-n2-p3 harmonic 77.54 119.30 # SOURCE3 3 2.8489
angle_coeff @angle:c2-n2-p4 harmonic 79.28 118.77 # SOURCE3 1
angle_coeff @angle:c2-n2-s4 harmonic 68.12 112.29 # SOURCE3 1
angle_coeff @angle:c2-n2-s6 harmonic 68.85 116.24 # SOURCE3 1
angle_coeff @angle:c2-n2-s harmonic 68.67 118.00 # SOURCE3 1
angle_coeff @angle:c2-n2-sh harmonic 63.09 115.48 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n2-ss harmonic 64.97 118.04 # SOURCE3 4 2.2804
angle_coeff @angle:c3-n2-c3 harmonic 63.76 110.70 # SOURCE3 1
angle_coeff @angle:c3-n2-ca harmonic 65.97 114.95 # SOURCE4 5 0.9744
angle_coeff @angle:c3-n2-ce harmonic 65.37 118.53 # CORR 123
angle_coeff @angle:c3-n2-cf harmonic 65.37 118.53 # CORR 123
angle_coeff @angle:c3-n2-hn harmonic 45.18 118.40 # SOURCE3 1
angle_coeff @angle:c3-n2-n1 harmonic 68.64 116.20 # SOURCE4 12 0.5407
angle_coeff @angle:c3-n2-n2 harmonic 69.29 111.18 # SOURCE3 7 0.4349
angle_coeff @angle:c3-n2-nh harmonic 68.08 109.99 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n2-o harmonic 70.29 112.40 # SOURCE2 1 0.0000
angle_coeff @angle:c3-n2-p2 harmonic 82.11 114.21 # SOURCE3 2 2.2772
angle_coeff @angle:c3-n2-s6 harmonic 66.28 113.84 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n2-s harmonic 65.70 116.72 # SOURCE3 1 0.0000
angle_coeff @angle:ca-n2-ca harmonic 71.79 112.20 # SOURCE3 1
angle_coeff @angle:ca-n2-hn harmonic 50.01 120.00 # SOURCE3 1
angle_coeff @angle:ca-n2-n2 harmonic 74.00 113.53 # SOURCE3 1
angle_coeff @angle:ca-n2-o harmonic 75.26 116.00 # SOURCE2 1 0.0000
angle_coeff @angle:ca-n2-p2 harmonic 84.03 118.11 # SOURCE3 1
angle_coeff @angle:ca-n2-s harmonic 67.84 120.11 # SOURCE3 1
angle_coeff @angle:c-n2-c2 harmonic 66.22 120.97 # SOURCE3 1
angle_coeff @angle:c-n2-c harmonic 62.71 123.80 # SOURCE3 1
angle_coeff @angle:c-n2-ca harmonic 66.05 120.50 # SOURCE3 1
angle_coeff @angle:cc-n2-cl harmonic 55.90 115.79 # CORR 2
angle_coeff @angle:cc-n2-hn harmonic 52.42 110.72 # CORR 20
angle_coeff @angle:cc-n2-na harmonic 73.01 108.92 # SOURCE4 9 1.6245
angle_coeff @angle:cc-n2-nh harmonic 70.37 118.47 # SOURCE4 6 1.7995
angle_coeff @angle:cd-n2-cl harmonic 55.90 115.79 # CORR 2
angle_coeff @angle:cd-n2-hn harmonic 52.42 110.72 # CORR 20
angle_coeff @angle:ce-n2-hn harmonic 52.74 111.05 # CORR 69
angle_coeff @angle:ce-n2-n harmonic 70.35 118.04 # CORR 101
angle_coeff @angle:ce-n2-nh harmonic 70.64 118.57 # CORR 54
angle_coeff @angle:ce-n2-o harmonic 77.37 112.16 # SOURCE3 1
angle_coeff @angle:ce-n2-oh harmonic 71.48 113.38 # CORR 37
angle_coeff @angle:ce-n2-os harmonic 71.23 112.97 # CORR 40
angle_coeff @angle:ce-n2-s harmonic 69.30 116.28 # SOURCE3 1
angle_coeff @angle:cf-n2-hn harmonic 52.74 111.05 # CORR 69
angle_coeff @angle:cf-n2-n harmonic 70.35 118.04 # CORR 101
angle_coeff @angle:cf-n2-nh harmonic 70.64 118.57 # CORR 54
angle_coeff @angle:cf-n2-o harmonic 77.37 112.16 # SOURCE3 1 same_as_ce-n2-o
angle_coeff @angle:cf-n2-oh harmonic 71.48 113.38 # CORR 37
angle_coeff @angle:cf-n2-os harmonic 71.23 112.97 # CORR 40
angle_coeff @angle:cf-n2-s harmonic 69.30 116.28 # SOURCE3 1 same_as_ce-n2-s
angle_coeff @angle:cl-n2-n1 harmonic 59.29 108.70 # SOURCE2 1 0.0000
angle_coeff @angle:cl-n2-n2 harmonic 58.70 110.47 # SOURCE3 1 0.0000
angle_coeff @angle:cl-n2-o harmonic 58.23 114.03 # SOURCE3 1
angle_coeff @angle:cl-n2-p2 harmonic 73.98 112.98 # SOURCE3 1 0.0000
angle_coeff @angle:cl-n2-s harmonic 58.50 115.77 # SOURCE3 1 0.0000
angle_coeff @angle:cx-n2-n2 harmonic 90.46 64.92 # SOURCE3 2 0.0000
angle_coeff @angle:f-n2-n2 harmonic 68.29 114.60 # SOURCE2 1 0.0000
angle_coeff @angle:f-n2-o harmonic 71.17 110.10 # SOURCE2 1 0.0000
angle_coeff @angle:f-n2-p2 harmonic 84.30 107.10 # SOURCE3 1 0.0000
angle_coeff @angle:f-n2-s harmonic 67.14 110.73 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-hn harmonic 38.61 120.00 # SOURCE3 1
angle_coeff @angle:hn-n2-n1 harmonic 55.33 114.10 # SOURCE2 1 0.0000
angle_coeff @angle:hn-n2-n2 harmonic 55.84 105.01 # SOURCE3 19 1.5183
angle_coeff @angle:hn-n2-ne harmonic 54.69 108.56 # SOURCE3 29 5.5708
angle_coeff @angle:hn-n2-nf harmonic 54.69 108.56 # SOURCE3 29 same_as_hn-n2-ne
angle_coeff @angle:hn-n2-o harmonic 57.61 107.37 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-p2 harmonic 58.61 112.09 # SOURCE3 18 4.0663
angle_coeff @angle:hn-n2-p4 harmonic 54.50 111.33 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-p5 harmonic 56.32 122.34 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-pe harmonic 61.28 111.41 # SOURCE3 20 4.9895
angle_coeff @angle:hn-n2-pf harmonic 61.28 111.41 # SOURCE3 20 same_as_hn-n2-pe
angle_coeff @angle:hn-n2-s2 harmonic 48.34 115.80 # SOURCE2 1 0.0000
angle_coeff @angle:hn-n2-s4 harmonic 46.34 111.21 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-s harmonic 49.11 108.17 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n2-s6 harmonic 47.82 112.59 # SOURCE3 2 0.0000
angle_coeff @angle:i-n2-n2 harmonic 53.71 111.79 # SOURCE3 1 0.0000
angle_coeff @angle:i-n2-o harmonic 52.33 116.82 # SOURCE3 1 0.0000
angle_coeff @angle:i-n2-p2 harmonic 72.31 113.26 # SOURCE3 1 0.0000
angle_coeff @angle:i-n2-s harmonic 56.35 116.85 # SOURCE3 1 0.0000
angle_coeff @angle:n1-n2-n1 harmonic 80.82 112.00 # HF/6-31G* 1
angle_coeff @angle:n2-n2-n1 harmonic 62.28 180.00 # dac_for_azides 0
angle_coeff @angle:n2-n2-n2 harmonic 78.20 109.49 # SOURCE3 2 0.0000
angle_coeff @angle:n2-n2-n3 harmonic 76.59 108.88 # SOURCE3 1
angle_coeff @angle:n2-n2-n4 harmonic 65.78 106.45 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-na harmonic 74.18 112.23 # SOURCE3 1
angle_coeff @angle:n2-n2-nh harmonic 74.76 111.70 # SOURCE3 5 0.3475
angle_coeff @angle:n2-n2-no harmonic 67.68 105.97 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-o harmonic 80.17 110.43 # SOURCE3 1
angle_coeff @angle:n2-n2-oh harmonic 74.02 111.51 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-os harmonic 74.69 108.38 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-p2 harmonic 90.07 109.15 # SOURCE3 1
angle_coeff @angle:n2-n2-p3 harmonic 81.73 113.05 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-p4 harmonic 81.37 118.77 # SOURCE3 1
angle_coeff @angle:n2-n2-p5 harmonic 89.80 110.46 # SOURCE3 1
angle_coeff @angle:n2-n2-s4 harmonic 71.60 107.30 # SOURCE3 1
angle_coeff @angle:n2-n2-s6 harmonic 72.35 111.25 # SOURCE3 1
angle_coeff @angle:n2-n2-s harmonic 71.24 115.91 # SOURCE3 1
angle_coeff @angle:n2-n2-sh harmonic 66.00 111.10 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n2-ss harmonic 68.46 112.14 # SOURCE3 1 0.0000
angle_coeff @angle:n3-n2-n3 harmonic 72.95 115.07 # SOURCE3 1
angle_coeff @angle:n3-n2-o harmonic 76.86 114.00 # SOURCE2 1 0.0000
angle_coeff @angle:n3-n2-p2 harmonic 86.69 115.34 # SOURCE3 1
angle_coeff @angle:n3-n2-s harmonic 69.96 117.13 # SOURCE3 1
angle_coeff @angle:n4-n2-n4 harmonic 59.97 106.70 # SOURCE3 1
angle_coeff @angle:n4-n2-o harmonic 64.86 112.20 # SOURCE3 1 0.0000
angle_coeff @angle:n4-n2-p2 harmonic 79.54 113.07 # SOURCE3 1 0.0000
angle_coeff @angle:n4-n2-s harmonic 62.44 118.50 # SOURCE3 1 0.0000
angle_coeff @angle:na-n2-na harmonic 73.47 107.00 # SOURCE3 1
angle_coeff @angle:na-n2-o harmonic 75.74 113.09 # SOURCE3 1 0.0000
angle_coeff @angle:na-n2-p2 harmonic 84.58 119.16 # SOURCE3 1 0.0000
angle_coeff @angle:na-n2-s harmonic 68.94 118.26 # SOURCE3 1 0.0000
angle_coeff @angle:ne-n2-nh harmonic 74.13 113.09 # CORR 12
angle_coeff @angle:ne-n2-o harmonic 79.97 110.31 # SOURCE3 1
angle_coeff @angle:ne-n2-s harmonic 71.04 116.22 # SOURCE3 1
angle_coeff @angle:nf-n2-nh harmonic 74.13 113.09 # CORR 12
angle_coeff @angle:nf-n2-o harmonic 79.97 110.31 # SOURCE3 1 same_as_ne-n2-o
angle_coeff @angle:nf-n2-s harmonic 71.04 116.22 # SOURCE3 1 same_as_ne-n2-s
angle_coeff @angle:nh-n2-nh harmonic 69.67 121.20 # SOURCE3 1
angle_coeff @angle:nh-n2-o harmonic 76.02 113.60 # SOURCE4 13 1.0945
angle_coeff @angle:nh-n2-p2 harmonic 84.93 118.83 # SOURCE3 2 0.1024
angle_coeff @angle:nh-n2-s harmonic 69.56 116.90 # SOURCE3 2 0.2276
angle_coeff @angle:n-n2-n2 harmonic 75.48 108.18 # SOURCE4 8 0.3496
angle_coeff @angle:n-n2-o harmonic 74.99 115.10 # SOURCE4 31 0.2796
angle_coeff @angle:no-n2-no harmonic 62.81 103.70 # SOURCE3 1
angle_coeff @angle:no-n2-o harmonic 70.40 100.76 # SOURCE3 1 0.0000
angle_coeff @angle:no-n2-p2 harmonic 81.32 111.95 # SOURCE3 1 0.0000
angle_coeff @angle:n-n2-p2 harmonic 85.20 117.30 # SOURCE3 1 0.0000
angle_coeff @angle:n-n2-s harmonic 69.64 115.74 # SOURCE3 1 0.0000
angle_coeff @angle:oh-n2-oh harmonic 74.84 101.70 # SOURCE3 1
angle_coeff @angle:oh-n2-p2 harmonic 86.05 115.11 # SOURCE3 1 0.0000
angle_coeff @angle:oh-n2-s harmonic 69.52 116.08 # SOURCE3 1 0.0000
angle_coeff @angle:o-n2-o harmonic 81.02 115.37 # SOURCE3 1
angle_coeff @angle:o-n2-oh harmonic 75.56 112.15 # SOURCE2 2 1.4500
angle_coeff @angle:o-n2-os harmonic 75.73 110.35 # SOURCE3 2 0.0042
angle_coeff @angle:o-n2-p2 harmonic 88.65 116.08 # SOURCE3 1
angle_coeff @angle:o-n2-p3 harmonic 82.37 113.43 # SOURCE3 1 0.0000
angle_coeff @angle:o-n2-p4 harmonic 85.23 110.61 # SOURCE3 1
angle_coeff @angle:o-n2-p5 harmonic 91.73 109.11 # SOURCE3 1
angle_coeff @angle:o-n2-pe harmonic 85.18 134.56 # SOURCE3 1
angle_coeff @angle:o-n2-pf harmonic 85.18 134.56 # SOURCE3 1 same_as_o-n2-pe
angle_coeff @angle:o-n2-s4 harmonic 72.12 108.91 # SOURCE3 1
angle_coeff @angle:o-n2-s6 harmonic 73.56 111.34 # SOURCE3 1
angle_coeff @angle:o-n2-s harmonic 72.09 117.18 # SOURCE3 1
angle_coeff @angle:o-n2-sh harmonic 65.55 114.98 # SOURCE3 1 0.0000
angle_coeff @angle:os-n2-os harmonic 71.25 110.29 # SOURCE3 1
angle_coeff @angle:os-n2-p2 harmonic 87.70 110.20 # SOURCE3 1 0.0000
angle_coeff @angle:o-n2-ss harmonic 68.39 115.34 # SOURCE3 1 0.0000
angle_coeff @angle:os-n2-s harmonic 70.47 112.23 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n2-p2 harmonic 107.12 116.80 # SOURCE3 1
angle_coeff @angle:p2-n2-p3 harmonic 98.43 124.48 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n2-p4 harmonic 98.27 128.37 # SOURCE3 1
angle_coeff @angle:p2-n2-p5 harmonic 104.38 123.47 # SOURCE3 1
angle_coeff @angle:p2-n2-s4 harmonic 86.26 112.10 # SOURCE3 1
angle_coeff @angle:p2-n2-s6 harmonic 86.44 115.70 # SOURCE3 1
angle_coeff @angle:p2-n2-s harmonic 85.91 117.84 # SOURCE3 1
angle_coeff @angle:p2-n2-sh harmonic 80.45 118.45 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n2-ss harmonic 82.01 120.43 # SOURCE3 1 0.0000
angle_coeff @angle:p3-n2-p3 harmonic 96.00 120.40 # SOURCE3 1
angle_coeff @angle:p3-n2-s harmonic 80.08 120.86 # SOURCE3 1 0.0000
angle_coeff @angle:p4-n2-s harmonic 77.83 131.84 # SOURCE3 1
angle_coeff @angle:p5-n2-p5 harmonic 105.81 120.60 # SOURCE3 1
angle_coeff @angle:p5-n2-s harmonic 85.34 119.89 # SOURCE3 1
angle_coeff @angle:pe-n2-s harmonic 88.59 115.73 # SOURCE3 1
angle_coeff @angle:pf-n2-s harmonic 88.59 115.73 # SOURCE3 1 same_as_pe-n2-s
angle_coeff @angle:s4-n2-s4 harmonic 66.00 119.18 # SOURCE3 1
angle_coeff @angle:s4-n2-s6 harmonic 67.18 119.18 # SOURCE3 1
angle_coeff @angle:s6-n2-s6 harmonic 68.49 119.18 # SOURCE3 1
angle_coeff @angle:sh-n2-sh harmonic 59.95 123.93 # SOURCE3 1
angle_coeff @angle:sh-n2-ss harmonic 61.33 123.93 # SOURCE3 1
angle_coeff @angle:s-n2-s harmonic 68.47 120.88 # SOURCE3 1
angle_coeff @angle:s-n2-s4 harmonic 69.20 113.00 # SOURCE3 1
angle_coeff @angle:s-n2-s6 harmonic 68.60 119.61 # SOURCE3 1
angle_coeff @angle:s-n2-sh harmonic 63.58 122.05 # SOURCE3 1 0.0000
angle_coeff @angle:s-n2-ss harmonic 66.58 118.19 # SOURCE3 1 0.0000
angle_coeff @angle:ss-n2-ss harmonic 62.92 123.93 # SOURCE3 1
angle_coeff @angle:br-n3-br harmonic 66.54 107.15 # SOURCE3 1 0.0000
angle_coeff @angle:br-n3-c3 harmonic 62.70 106.93 # SOURCE3 2 0.0000
angle_coeff @angle:c1-n3-c1 harmonic 64.09 123.34 # SOURCE3 1
angle_coeff @angle:c1-n3-f harmonic 68.22 104.70 # SOURCE2 1 0.0000
angle_coeff @angle:c1-n3-hn harmonic 47.74 118.31 # SOURCE3 1
angle_coeff @angle:c1-n3-o harmonic 70.01 116.63 # SOURCE3 1
angle_coeff @angle:c2-n3-c2 harmonic 66.22 124.68 # SOURCE3 1
angle_coeff @angle:c2-n3-hn harmonic 49.11 119.38 # SOURCE3 1
angle_coeff @angle:c3-n3-c3 harmonic 64.01 110.90 # SOURCE3 40 2.3048
angle_coeff @angle:c3-n3-cl harmonic 57.82 107.23 # SOURCE3 3 0.3673
angle_coeff @angle:c3-n3-cx harmonic 62.45 116.32 # SOURCE4 24 0.5119
angle_coeff @angle:c3-n3-cy harmonic 61.69 118.26 # SOURCE4 14 0.8788
angle_coeff @angle:c3-n3-f harmonic 66.81 103.13 # SOURCE3 2 0.0000
angle_coeff @angle:c3-n3-hn harmonic 47.13 109.92 # SOURCE3 120 2.2590
angle_coeff @angle:c3-n3-i harmonic 56.98 108.48 # SOURCE3 2 0.0000
angle_coeff @angle:c3-n3-n2 harmonic 66.23 118.75 # SOURCE2 2 2.6500
angle_coeff @angle:c3-n3-n3 harmonic 66.76 108.15 # SOURCE3 15 1.3999
angle_coeff @angle:c3-n3-n4 harmonic 67.18 109.65 # SOURCE3 3 0.1146
angle_coeff @angle:c3-n3-n harmonic 66.67 111.75 # SOURCE4 50 1.6777
angle_coeff @angle:c3-n3-nh harmonic 66.37 111.89 # SOURCE4 21 1.3006
angle_coeff @angle:c3-n3-no harmonic 66.02 111.27 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n3-o harmonic 68.68 113.31 # SOURCE3 5 8.9081
angle_coeff @angle:c3-n3-oh harmonic 69.07 106.14 # SOURCE4 14 1.1040
angle_coeff @angle:c3-n3-os harmonic 68.48 104.95 # SOURCE4 9 0.9687
angle_coeff @angle:c3-n3-p3 harmonic 75.79 121.93 # SOURCE3 3 5.6009
angle_coeff @angle:c3-n3-p5 harmonic 78.53 119.81 # SOURCE4 58 1.8367
angle_coeff @angle:c3-n3-s4 harmonic 61.45 112.91 # SOURCE3 3 0.8983
angle_coeff @angle:c3-n3-s6 harmonic 63.67 116.57 # SOURCE4 73 1.8772
angle_coeff @angle:c3-n3-s harmonic 61.46 110.02 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n3-sh harmonic 62.06 112.70 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n3-ss harmonic 61.59 116.01 # SOURCE3 3 1.1944
angle_coeff @angle:c3-n3-sy harmonic 62.43 115.27 # SOURCE4 108 1.7647
angle_coeff @angle:cl-n3-cl harmonic 53.49 108.28 # SOURCE3 1 0.0000
angle_coeff @angle:cl-n3-hn harmonic 39.61 104.39 # SOURCE3 2 0.0000
angle_coeff @angle:cl-n3-n3 harmonic 59.29 107.65 # SOURCE3 1 0.0000
angle_coeff @angle:cx-n3-cx harmonic 86.39 60.71 # SOURCE4 57 0.2359
angle_coeff @angle:cx-n3-hn harmonic 47.15 109.57 # SOURCE4 26 0.7439
angle_coeff @angle:cx-n3-p5 harmonic 78.66 119.32 # SOURCE4 71 1.1948
angle_coeff @angle:cx-n3-py harmonic 76.73 121.75 # SOURCE4 10 1.0295
angle_coeff @angle:cy-n3-cy harmonic 70.04 90.87 # SOURCE4 10 0.5777
angle_coeff @angle:cy-n3-hn harmonic 46.25 112.12 # SOURCE4 9 1.9058
angle_coeff @angle:f-n3-f harmonic 67.71 102.22 # SOURCE2 4 0.7562
angle_coeff @angle:f-n3-hn harmonic 50.78 99.80 # SOURCE2 1 0.0000
angle_coeff @angle:hn-n3-hn harmonic 41.30 107.13 # SOURCE3 44 1.9687
angle_coeff @angle:hn-n3-i harmonic 35.43 109.98 # SOURCE3 2 0.0000
angle_coeff @angle:hn-n3-n1 harmonic 52.05 110.17 # HF/6-31G* 1
angle_coeff @angle:hn-n3-n2 harmonic 51.40 115.94 # SOURCE3 1
angle_coeff @angle:hn-n3-n3 harmonic 50.16 103.98 # SOURCE3 18 1.8593
angle_coeff @angle:hn-n3-n4 harmonic 50.87 106.40 # SOURCE3 5 0.5863
angle_coeff @angle:hn-n3-n harmonic 51.02 106.57 # SOURCE3 6 1.0767
angle_coeff @angle:hn-n3-na harmonic 50.32 107.89 # SOURCE3 1
angle_coeff @angle:hn-n3-nh harmonic 50.44 107.39 # SOURCE3 11 1.6294
angle_coeff @angle:hn-n3-no harmonic 50.25 104.78 # SOURCE3 3 1.1126
angle_coeff @angle:hn-n3-o harmonic 53.14 113.32 # SOURCE3 3 4.3945
angle_coeff @angle:hn-n3-oh harmonic 53.08 101.11 # SOURCE3 4 0.9921
angle_coeff @angle:hn-n3-os harmonic 51.67 100.92 # SOURCE3 6 0.7295
angle_coeff @angle:hn-n3-p2 harmonic 54.24 120.26 # SOURCE3 1
angle_coeff @angle:hn-n3-p3 harmonic 52.93 116.89 # SOURCE3 9 3.8816
angle_coeff @angle:hn-n3-p4 harmonic 54.97 113.05 # SOURCE3 2 0.0000
angle_coeff @angle:hn-n3-p5 harmonic 56.04 113.68 # SOURCE3 6 2.1781
angle_coeff @angle:hn-n3-s4 harmonic 42.47 108.93 # SOURCE3 7 1.7819
angle_coeff @angle:hn-n3-s harmonic 41.53 109.47 # SOURCE3 1
angle_coeff @angle:hn-n3-s6 harmonic 46.06 109.33 # SOURCE4 86 0.9610
angle_coeff @angle:hn-n3-sh harmonic 43.12 108.67 # SOURCE3 3 2.5025
angle_coeff @angle:hn-n3-ss harmonic 43.36 109.85 # SOURCE3 5 2.3215
angle_coeff @angle:hn-n3-sy harmonic 44.15 109.49 # SOURCE4 278 0.7897
angle_coeff @angle:i-n3-i harmonic 60.04 111.27 # SOURCE3 1 0.0000
angle_coeff @angle:n1-n3-n1 harmonic 72.40 113.21 # HF/6-31G* 1
angle_coeff @angle:n2-n3-n2 harmonic 71.82 118.73 # SOURCE3 1
angle_coeff @angle:n2-n3-o harmonic 74.13 114.91 # SOURCE3 1
angle_coeff @angle:n3-n3-n3 harmonic 69.57 105.71 # SOURCE3 3 0.3561
angle_coeff @angle:n4-n3-n4 harmonic 69.04 113.48 # SOURCE3 1 0.0000
angle_coeff @angle:n4-n3-nh harmonic 70.91 107.14 # SOURCE3 1
angle_coeff @angle:na-n3-na harmonic 69.21 112.00 # SOURCE3 1
angle_coeff @angle:nh-n3-nh harmonic 70.75 107.15 # SOURCE3 1 0.0000
angle_coeff @angle:n-n3-n harmonic 70.25 110.55 # SOURCE3 1 0.0000
angle_coeff @angle:no-n3-no harmonic 67.04 115.26 # SOURCE3 1 0.0000
angle_coeff @angle:oh-n3-oh harmonic 72.79 107.18 # SOURCE3 1 0.0000
angle_coeff @angle:o-n3-o harmonic 71.89 126.14 # SOURCE3 1
angle_coeff @angle:o-n3-p2 harmonic 84.34 117.02 # SOURCE3 1
angle_coeff @angle:o-n3-p4 harmonic 83.38 116.65 # SOURCE3 1
angle_coeff @angle:o-n3-s4 harmonic 64.56 114.09 # SOURCE3 1
angle_coeff @angle:o-n3-s6 harmonic 68.82 113.80 # SOURCE3 1
angle_coeff @angle:o-n3-s harmonic 62.04 119.81 # SOURCE3 1
angle_coeff @angle:os-n3-os harmonic 70.79 106.52 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n3-p2 harmonic 97.53 130.13 # SOURCE3 1
angle_coeff @angle:p3-n3-p3 harmonic 98.56 118.74 # SOURCE3 3 3.3755
angle_coeff @angle:p4-n3-p4 harmonic 101.51 116.35 # SOURCE3 1
angle_coeff @angle:p5-n3-p5 harmonic 102.24 119.42 # SOURCE3 1 0.0000
angle_coeff @angle:s4-n3-s4 harmonic 60.13 120.02 # SOURCE3 1 0.0000
angle_coeff @angle:s4-n3-s6 harmonic 61.99 120.95 # SOURCE3 1
angle_coeff @angle:s6-n3-s6 harmonic 63.29 126.13 # SOURCE3 1 0.0000
angle_coeff @angle:sh-n3-sh harmonic 61.24 118.63 # SOURCE3 1 0.0000
angle_coeff @angle:sh-n3-ss harmonic 61.27 119.67 # SOURCE3 1
angle_coeff @angle:s-n3-s harmonic 56.48 131.36 # SOURCE3 1 0.0000
angle_coeff @angle:ss-n3-ss harmonic 61.60 119.57 # SOURCE3 1 0.0000
angle_coeff @angle:br-n4-br harmonic 65.14 114.82 # SOURCE3 1 0.0000
angle_coeff @angle:br-n4-hn harmonic 41.38 108.44 # SOURCE3 7 0.5630
angle_coeff @angle:c1-n4-c1 harmonic 65.53 113.87 # SOURCE3 1 0.0000
angle_coeff @angle:c1-n4-hn harmonic 48.62 110.19 # SOURCE3 7 1.0847
angle_coeff @angle:c2-n4-c2 harmonic 63.01 112.58 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n4-c3 harmonic 63.10 110.96 # SOURCE4 13 2.4632
angle_coeff @angle:c2-n4-hn harmonic 46.43 111.36 # SOURCE3 13 1.2672
angle_coeff @angle:c3-n4-c3 harmonic 62.84 110.64 # SOURCE3 13 1.3060
angle_coeff @angle:c3-n4-ca harmonic 63.61 110.40 # SOURCE4 46 1.4643
angle_coeff @angle:c3-n4-cc harmonic 62.84 111.09 # SOURCE4 7 0.7065
angle_coeff @angle:c3-n4-cl harmonic 57.92 108.04 # SOURCE3 3 0.0000
angle_coeff @angle:c3-n4-hn harmonic 46.19 110.11 # SOURCE3 100 1.3136
angle_coeff @angle:c3-n4-n3 harmonic 66.73 108.72 # SOURCE3 2 0.0000
angle_coeff @angle:c3-n4-n4 harmonic 63.72 114.07 # SOURCE3 4 0.0000
angle_coeff @angle:c3-n4-n harmonic 66.20 109.26 # SOURCE4 7 1.9859
angle_coeff @angle:c3-n4-nh harmonic 64.76 111.73 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-no harmonic 65.25 109.08 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-o harmonic 67.25 111.66 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-oh harmonic 65.90 113.73 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-os harmonic 67.38 107.42 # SOURCE3 3 3.5920
angle_coeff @angle:c3-n4-p2 harmonic 71.92 112.52 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-p3 harmonic 74.40 110.73 # SOURCE3 3 2.1084
angle_coeff @angle:c3-n4-p5 harmonic 75.11 113.22 # SOURCE3 3 0.4021
angle_coeff @angle:c3-n4-s4 harmonic 57.21 108.23 # SOURCE3 3 0.4195
angle_coeff @angle:c3-n4-s6 harmonic 57.75 111.56 # SOURCE3 3 1.8851
angle_coeff @angle:c3-n4-s harmonic 59.21 113.55 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-sh harmonic 59.13 115.81 # SOURCE3 1 0.0000
angle_coeff @angle:c3-n4-ss harmonic 59.66 113.68 # SOURCE3 3 1.1405
angle_coeff @angle:ca-n4-ca harmonic 63.21 114.48 # SOURCE3 1 0.0000
angle_coeff @angle:ca-n4-hn harmonic 47.54 108.52 # SOURCE3 5 1.1693
angle_coeff @angle:c-n4-c harmonic 61.50 108.61 # SOURCE3 1 0.0000
angle_coeff @angle:c-n4-hn harmonic 44.68 110.86 # SOURCE3 10 1.0073
angle_coeff @angle:cl-n4-cl harmonic 52.73 114.91 # SOURCE3 1 0.0000
angle_coeff @angle:cl-n4-hn harmonic 39.53 108.87 # SOURCE3 7 0.7719
angle_coeff @angle:f-n4-f harmonic 70.47 109.05 # SOURCE3 1 0.0000
angle_coeff @angle:f-n4-hn harmonic 51.67 108.39 # SOURCE3 4 0.0000
angle_coeff @angle:hn-n4-hn harmonic 40.52 108.11 # SOURCE3 208 1.4126
angle_coeff @angle:hn-n4-i harmonic 36.44 108.72 # SOURCE3 7 1.2717
angle_coeff @angle:hn-n4-n1 harmonic 51.79 109.39 # HF/6-31G* 1
angle_coeff @angle:hn-n4-n2 harmonic 42.29 109.68 # SOURCE3 19 0.6266
angle_coeff @angle:hn-n4-n3 harmonic 49.85 110.40 # SOURCE3 11 0.7307
angle_coeff @angle:hn-n4-n4 harmonic 48.09 108.66 # SOURCE3 18 1.2967
angle_coeff @angle:hn-n4-n harmonic 49.59 109.08 # SOURCE3 13 1.6047
angle_coeff @angle:hn-n4-na harmonic 49.43 109.38 # SOURCE3 25 1.0758
angle_coeff @angle:hn-n4-nh harmonic 48.36 109.92 # SOURCE3 12 0.7304
angle_coeff @angle:hn-n4-no harmonic 49.19 104.38 # SOURCE3 2 0.0000
angle_coeff @angle:hn-n4-o harmonic 52.09 109.26 # SOURCE3 6 2.1203
angle_coeff @angle:hn-n4-oh harmonic 51.12 108.09 # SOURCE3 6 1.6728
angle_coeff @angle:hn-n4-os harmonic 50.15 109.39 # SOURCE3 10 1.4403
angle_coeff @angle:hn-n4-p2 harmonic 47.71 110.50 # SOURCE3 25 1.0664
angle_coeff @angle:hn-n4-p3 harmonic 49.73 109.89 # SOURCE3 10 2.3870
angle_coeff @angle:hn-n4-p4 harmonic 47.65 111.33 # SOURCE3 3 0.0000
angle_coeff @angle:hn-n4-p5 harmonic 51.29 110.00 # SOURCE3 10 1.0282
angle_coeff @angle:hn-n4-py harmonic 47.36 117.89 # SOURCE3 8 0.0000
angle_coeff @angle:hn-n4-s4 harmonic 37.07 110.10 # SOURCE3 6 0.8471
angle_coeff @angle:hn-n4-s harmonic 41.06 106.89 # SOURCE3 6 1.0775
angle_coeff @angle:hn-n4-s6 harmonic 38.64 108.94 # SOURCE3 10 0.5715
angle_coeff @angle:hn-n4-sh harmonic 41.29 108.56 # SOURCE3 6 0.8535
angle_coeff @angle:hn-n4-ss harmonic 41.15 109.17 # SOURCE3 10 0.8455
angle_coeff @angle:i-n4-i harmonic 58.99 118.49 # SOURCE3 1 0.0000
angle_coeff @angle:n1-n4-n1 harmonic 72.69 110.67 # HF/6-31G* 1
angle_coeff @angle:n2-n4-n2 harmonic 59.43 108.64 # SOURCE3 1 0.0000
angle_coeff @angle:n3-n4-n3 harmonic 69.79 111.07 # SOURCE3 1 0.0000
angle_coeff @angle:n4-n4-n4 harmonic 65.21 115.49 # SOURCE3 1 0.0000
angle_coeff @angle:na-n4-na harmonic 66.27 119.60 # SOURCE3 1 0.0000
angle_coeff @angle:nh-n4-nh harmonic 67.83 109.38 # SOURCE3 1 0.0000
angle_coeff @angle:n-n4-n harmonic 66.68 118.62 # SOURCE3 1 0.0000
angle_coeff @angle:oh-n4-oh harmonic 72.25 108.19 # SOURCE3 1 0.0000
angle_coeff @angle:o-n4-o harmonic 70.28 120.97 # SOURCE3 1 0.0000
angle_coeff @angle:os-n4-os harmonic 72.46 104.40 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n4-p2 harmonic 89.65 113.91 # SOURCE3 2 0.0000
angle_coeff @angle:p3-n4-p3 harmonic 89.71 121.38 # SOURCE3 1 0.0000
angle_coeff @angle:p5-n4-p5 harmonic 98.15 107.02 # SOURCE3 1 0.0000
angle_coeff @angle:py-n4-py harmonic 116.94 69.79 # SOURCE3 2 0.0000
angle_coeff @angle:s4-n4-s4 harmonic 54.75 115.43 # SOURCE3 1
angle_coeff @angle:s6-n4-s6 harmonic 57.91 109.51 # SOURCE3 1 0.0000
angle_coeff @angle:sh-n4-sh harmonic 60.37 112.59 # SOURCE3 1 0.0000
angle_coeff @angle:s-n4-s harmonic 56.74 124.55 # SOURCE3 1 0.0000
angle_coeff @angle:ss-n4-ss harmonic 61.26 109.20 # SOURCE3 1 0.0000
angle_coeff @angle:br-na-br harmonic 60.55 123.00 # SOURCE3 1
angle_coeff @angle:br-na-c2 harmonic 63.61 100.48 # SOURCE3 2 1.0536
angle_coeff @angle:br-na-ca harmonic 57.15 124.81 # SOURCE3 1
angle_coeff @angle:br-na-cc harmonic 57.16 124.62 # SOURCE3 3 0.5348
angle_coeff @angle:br-na-cd harmonic 57.16 124.62 # SOURCE3 3 same_as_br-na-cc
angle_coeff @angle:br-na-nc harmonic 59.86 119.42 # SOURCE3 4 1.6703
angle_coeff @angle:br-na-nd harmonic 59.86 119.42 # SOURCE3 4 same_as_br-na-nc
angle_coeff @angle:br-na-os harmonic 63.92 104.99 # SOURCE3 1 0.0000
angle_coeff @angle:br-na-p2 harmonic 75.91 121.01 # SOURCE3 1
angle_coeff @angle:br-na-pc harmonic 76.39 120.26 # SOURCE3 3 2.1456
angle_coeff @angle:br-na-pd harmonic 76.39 120.26 # SOURCE3 3 same_as_br-na-pc
angle_coeff @angle:br-na-ss harmonic 62.46 112.28 # SOURCE3 1 0.0000
angle_coeff @angle:c1-na-c1 harmonic 67.20 117.20 # SOURCE3 1
angle_coeff @angle:c1-na-c2 harmonic 64.32 125.20 # SOURCE3 1
angle_coeff @angle:c1-na-ca harmonic 66.54 120.57 # SOURCE3 1
angle_coeff @angle:c1-na-cc harmonic 65.82 121.35 # SOURCE3 6 0.6517
angle_coeff @angle:c1-na-cd harmonic 65.82 121.35 # SOURCE3 6 0.6517
angle_coeff @angle:c1-na-nc harmonic 68.27 120.24 # SOURCE3 4 1.6849
angle_coeff @angle:c1-na-nd harmonic 68.27 120.24 # SOURCE3 4 same_as_c1-na-nc
angle_coeff @angle:c1-na-os harmonic 70.24 106.96 # SOURCE3 2 0.0000
angle_coeff @angle:c1-na-p2 harmonic 76.49 122.25 # SOURCE3 1
angle_coeff @angle:c1-na-pc harmonic 77.33 121.48 # SOURCE3 3 2.1681
angle_coeff @angle:c1-na-pd harmonic 77.33 121.48 # SOURCE3 3 same_as_c1-na-pc
angle_coeff @angle:c1-na-ss harmonic 61.89 118.30 # SOURCE3 1 0.0000
angle_coeff @angle:c2-na-c2 harmonic 67.80 110.37 # SOURCE3 6 0.5121
angle_coeff @angle:c2-na-c3 harmonic 64.23 117.20 # SOURCE3 2 0.0000
angle_coeff @angle:c2-na-ca harmonic 64.55 125.33 # SOURCE4 7 0.5648
angle_coeff @angle:c2-na-cc harmonic 63.98 125.75 # SOURCE3 10 1.5856
angle_coeff @angle:c2-na-cd harmonic 63.98 125.75 # SOURCE3 10 1.5856
angle_coeff @angle:c2-na-cl harmonic 58.85 101.01 # SOURCE3 2 1.5799
angle_coeff @angle:c2-na-f harmonic 68.64 103.11 # SOURCE3 1 0.0000
angle_coeff @angle:c2-na-hn harmonic 47.62 119.28 # SOURCE3 14 6.6027
angle_coeff @angle:c2-na-i harmonic 58.98 106.74 # SOURCE3 1 0.0000
angle_coeff @angle:c2-na-n1 harmonic 66.27 124.81 # HF/6-31G* 1
angle_coeff @angle:c2-na-n2 harmonic 65.80 125.00 # SOURCE3 1
angle_coeff @angle:c2-na-n3 harmonic 64.64 124.80 # SOURCE3 1
angle_coeff @angle:c2-na-n4 harmonic 65.19 121.32 # SOURCE3 1
angle_coeff @angle:c2-na-n harmonic 65.63 124.70 # SOURCE3 1
angle_coeff @angle:c2-na-na harmonic 65.14 124.60 # SOURCE3 1
angle_coeff @angle:c2-na-nc harmonic 67.42 120.61 # CORR 9
angle_coeff @angle:c2-na-nd harmonic 67.42 120.61 # CORR 9
angle_coeff @angle:c2-na-nh harmonic 65.04 124.98 # SOURCE3 1
angle_coeff @angle:c2-na-no harmonic 64.34 124.20 # SOURCE3 1
angle_coeff @angle:c2-na-o harmonic 68.21 125.90 # SOURCE3 1
angle_coeff @angle:c2-na-oh harmonic 65.80 123.90 # SOURCE3 1
angle_coeff @angle:c2-na-os harmonic 68.53 110.33 # SOURCE3 4 3.2172
angle_coeff @angle:c2-na-p2 harmonic 76.19 122.14 # SOURCE3 1
angle_coeff @angle:c2-na-p3 harmonic 74.55 126.10 # SOURCE3 1
angle_coeff @angle:c2-na-p4 harmonic 81.58 125.00 # SOURCE3 1
angle_coeff @angle:c2-na-p5 harmonic 76.43 125.10 # SOURCE3 1
angle_coeff @angle:c2-na-pc harmonic 76.96 121.56 # SOURCE3 3 1.6252
angle_coeff @angle:c2-na-pd harmonic 76.96 121.56 # SOURCE3 3 same_as_c2-na-pc
angle_coeff @angle:c2-na-s4 harmonic 58.37 124.90 # SOURCE3 1
angle_coeff @angle:c2-na-s6 harmonic 60.24 124.40 # SOURCE3 1
angle_coeff @angle:c2-na-s harmonic 58.90 125.80 # SOURCE3 1
angle_coeff @angle:c2-na-sh harmonic 60.23 125.10 # SOURCE3 1
angle_coeff @angle:c2-na-ss harmonic 62.34 115.53 # SOURCE3 5 1.4036
angle_coeff @angle:c3-na-c3 harmonic 60.72 125.59 # SOURCE3 1 0.0000
angle_coeff @angle:c3-na-ca harmonic 63.15 124.36 # SOURCE3 5 4.2557
angle_coeff @angle:c3-na-cc harmonic 62.56 125.09 # SOURCE3 18 1.2138
angle_coeff @angle:c3-na-cd harmonic 62.56 125.09 # SOURCE3 18 1.2138
angle_coeff @angle:c3-na-cp harmonic 63.76 119.46 # SOURCE4 7 0.4108
angle_coeff @angle:c3-na-n2 harmonic 65.48 120.05 # SOURCE4 5 0.8795
angle_coeff @angle:c3-na-n harmonic 67.37 112.68 # SOURCE4 12 0.5122
angle_coeff @angle:c3-na-nc harmonic 65.74 120.46 # SOURCE3 8 2.1625
angle_coeff @angle:c3-na-nd harmonic 65.74 120.46 # SOURCE3 8 2.1625
angle_coeff @angle:c3-na-os harmonic 68.91 104.39 # SOURCE3 3 1.2017
angle_coeff @angle:c3-na-p2 harmonic 75.04 123.12 # SOURCE3 1
angle_coeff @angle:c3-na-pc harmonic 75.89 122.11 # SOURCE3 3 2.8504
angle_coeff @angle:c3-na-pd harmonic 75.89 122.11 # SOURCE3 3 same_as_c3-na-pc
angle_coeff @angle:c3-na-sh harmonic 63.38 110.28 # SOURCE3 1
angle_coeff @angle:c3-na-ss harmonic 62.90 110.87 # SOURCE3 3 0.8260
angle_coeff @angle:ca-na-ca harmonic 66.98 120.09 # SOURCE4 321 1.7366
angle_coeff @angle:ca-na-cc harmonic 68.46 113.15 # SOURCE3 18 9.8644
angle_coeff @angle:ca-na-cd harmonic 68.46 113.15 # SOURCE3 18 9.8644
angle_coeff @angle:ca-na-cl harmonic 53.17 124.79 # SOURCE3 1
angle_coeff @angle:ca-na-cp harmonic 65.88 120.96 # SOURCE4 20 1.2820
angle_coeff @angle:ca-na-cx harmonic 63.07 124.09 # SOURCE4 12 1.8167
angle_coeff @angle:ca-na-f harmonic 65.51 116.40 # SOURCE3 1
angle_coeff @angle:ca-na-hn harmonic 47.63 125.59 # SOURCE4 437 1.1893
angle_coeff @angle:ca-na-i harmonic 55.21 121.62 # SOURCE3 1
angle_coeff @angle:ca-na-n2 harmonic 68.21 119.85 # SOURCE4 6 1.2043
angle_coeff @angle:ca-na-n4 harmonic 66.37 120.19 # SOURCE3 1
angle_coeff @angle:ca-na-n harmonic 67.34 122.00 # SOURCE3 1
angle_coeff @angle:ca-na-na harmonic 66.29 123.76 # SOURCE3 1
angle_coeff @angle:ca-na-nb harmonic 68.18 122.16 # SOURCE4 7 0.8543
angle_coeff @angle:ca-na-nc harmonic 69.27 117.85 # SOURCE3 6 3.6536
angle_coeff @angle:ca-na-nd harmonic 69.27 117.85 # SOURCE3 6 same_as_ca-na-nc
angle_coeff @angle:ca-na-nh harmonic 66.14 124.33 # SOURCE4 7 1.3855
angle_coeff @angle:ca-na-o harmonic 71.14 119.99 # SOURCE4 51 1.2671
angle_coeff @angle:ca-na-oh harmonic 66.69 124.08 # SOURCE3 1
angle_coeff @angle:ca-na-os harmonic 69.70 109.46 # SOURCE3 1 0.0000
angle_coeff @angle:ca-na-p2 harmonic 75.51 125.85 # SOURCE3 1
angle_coeff @angle:ca-na-p3 harmonic 75.50 124.38 # SOURCE3 1
angle_coeff @angle:ca-na-p4 harmonic 82.41 124.97 # SOURCE3 1
angle_coeff @angle:ca-na-p5 harmonic 77.51 123.30 # SOURCE3 1
angle_coeff @angle:ca-na-pc harmonic 77.26 122.13 # SOURCE3 3 2.2393
angle_coeff @angle:ca-na-pd harmonic 77.26 122.13 # SOURCE3 3 same_as_ca-na-pc
angle_coeff @angle:ca-na-py harmonic 72.61 140.88 # SOURCE3 2 0.0000
angle_coeff @angle:ca-na-s4 harmonic 60.55 117.23 # SOURCE3 1
angle_coeff @angle:ca-na-s6 harmonic 61.55 120.69 # SOURCE3 1
angle_coeff @angle:ca-na-s harmonic 59.27 125.64 # SOURCE3 1
angle_coeff @angle:ca-na-sh harmonic 60.55 125.44 # SOURCE3 1
angle_coeff @angle:ca-na-ss harmonic 59.16 129.91 # SOURCE4 8 0.1449
angle_coeff @angle:cc-na-cc harmonic 68.94 109.90 # SOURCE3 109 1.5547
angle_coeff @angle:cc-na-cd harmonic 63.88 128.01 # SOURCE3 1 0.0000
angle_coeff @angle:cc-na-ce harmonic 63.05 126.61 # SOURCE4 8 0.5158
angle_coeff @angle:cc-na-cl harmonic 53.10 124.61 # SOURCE3 3 0.5208
angle_coeff @angle:cc-na-f harmonic 64.60 118.03 # SOURCE3 4 0.3081
angle_coeff @angle:cc-na-hn harmonic 47.02 125.50 # CORR 861
angle_coeff @angle:cc-na-i harmonic 54.34 125.70 # SOURCE3 6 0.7821
angle_coeff @angle:cc-na-n2 harmonic 66.83 122.96 # SOURCE3 15 0.9350
angle_coeff @angle:cc-na-n4 harmonic 65.90 120.31 # SOURCE3 10 3.4394
angle_coeff @angle:cc-na-n harmonic 66.52 123.19 # SOURCE3 13 0.3010
angle_coeff @angle:cc-na-na harmonic 65.91 123.43 # SOURCE3 23 0.2088
angle_coeff @angle:cc-na-nc harmonic 70.18 113.02 # SOURCE3 38 2.2867
angle_coeff @angle:cc-na-nd harmonic 66.41 126.22 # CORR 124
angle_coeff @angle:cc-na-nh harmonic 66.23 122.25 # SOURCE3 19 0.2010
angle_coeff @angle:cc-na-no harmonic 65.40 121.78 # SOURCE3 9 0.3521
angle_coeff @angle:cc-na-o harmonic 69.01 125.21 # SOURCE3 10 0.0124
angle_coeff @angle:cc-na-oh harmonic 66.67 122.38 # SOURCE3 10 0.1570
angle_coeff @angle:cc-na-os harmonic 67.01 116.86 # CORR 48
angle_coeff @angle:cc-na-p2 harmonic 75.29 125.86 # SOURCE3 14 2.2993
angle_coeff @angle:cc-na-p3 harmonic 75.02 125.25 # SOURCE3 8 0.1998
angle_coeff @angle:cc-na-p4 harmonic 81.11 127.73 # SOURCE3 7 3.6077
angle_coeff @angle:cc-na-p5 harmonic 76.81 124.70 # SOURCE3 13 1.4225
angle_coeff @angle:cc-na-s4 harmonic 59.45 121.03 # SOURCE3 10 0.5589
angle_coeff @angle:cc-na-s6 harmonic 60.98 122.19 # SOURCE3 10 0.9634
angle_coeff @angle:cc-na-s harmonic 59.10 125.66 # SOURCE3 8 0.1880
angle_coeff @angle:cc-na-sh harmonic 60.71 123.96 # SOURCE3 10 0.3424
angle_coeff @angle:cc-na-ss harmonic 61.34 120.10 # CORR 44
angle_coeff @angle:cd-na-cd harmonic 68.94 109.90 # SOURCE3 109 1.5547
angle_coeff @angle:cd-na-cl harmonic 53.10 124.61 # SOURCE3 3 same_as_cc-na-cl
angle_coeff @angle:cd-na-f harmonic 64.60 118.03 # SOURCE3 4 0.3081
angle_coeff @angle:cd-na-hn harmonic 47.02 125.50 # CORR 861
angle_coeff @angle:cd-na-i harmonic 54.34 125.70 # SOURCE3 6 0.7821
angle_coeff @angle:cd-na-n2 harmonic 66.83 122.96 # SOURCE3 15 0.9350
angle_coeff @angle:cd-na-n4 harmonic 65.90 120.31 # SOURCE3 10 3.4394
angle_coeff @angle:cd-na-n harmonic 66.52 123.19 # SOURCE3 13 0.3010
angle_coeff @angle:cd-na-na harmonic 65.91 123.43 # SOURCE3 23 0.2088
angle_coeff @angle:cd-na-nc harmonic 66.41 126.22 # CORR 124
angle_coeff @angle:cd-na-nd harmonic 70.18 113.02 # SOURCE3 38 2.2867
angle_coeff @angle:cd-na-nh harmonic 66.23 122.25 # SOURCE3 19 0.2010
angle_coeff @angle:cd-na-no harmonic 65.40 121.78 # SOURCE3 9 0.3521
angle_coeff @angle:cd-na-o harmonic 69.01 125.21 # SOURCE3 10 0.0124
angle_coeff @angle:cd-na-oh harmonic 66.67 122.38 # SOURCE3 10 0.1570
angle_coeff @angle:cd-na-os harmonic 67.01 116.86 # CORR 48
angle_coeff @angle:cd-na-p2 harmonic 75.29 125.86 # SOURCE3 14 2.2993
angle_coeff @angle:cd-na-p3 harmonic 75.02 125.25 # SOURCE3 8 0.1998
angle_coeff @angle:cd-na-p4 harmonic 81.11 127.73 # SOURCE3 7 same_as_cc-na-p4
angle_coeff @angle:cd-na-p5 harmonic 76.81 124.70 # SOURCE3 13 1.4225
angle_coeff @angle:cd-na-s4 harmonic 59.45 121.03 # SOURCE3 10 0.5589
angle_coeff @angle:cd-na-s6 harmonic 60.98 122.19 # SOURCE3 10 0.9634
angle_coeff @angle:cd-na-s harmonic 59.10 125.66 # SOURCE3 8 0.1880
angle_coeff @angle:cd-na-sh harmonic 60.71 123.96 # SOURCE3 10 0.3424
angle_coeff @angle:cd-na-ss harmonic 61.34 120.10 # CORR 44
angle_coeff @angle:cl-na-cl harmonic 48.73 122.80 # SOURCE3 1
angle_coeff @angle:cl-na-nc harmonic 55.70 119.36 # SOURCE3 4 1.7128
angle_coeff @angle:cl-na-nd harmonic 55.70 119.36 # SOURCE3 4 same_as_cl-na-nc
angle_coeff @angle:cl-na-os harmonic 58.63 106.58 # SOURCE3 1 0.0000
angle_coeff @angle:cl-na-p2 harmonic 68.67 121.29 # SOURCE3 1
angle_coeff @angle:cl-na-pc harmonic 69.19 120.51 # SOURCE3 3 2.1985
angle_coeff @angle:cl-na-pd harmonic 69.19 120.51 # SOURCE3 3 same_as_cl-na-pc
angle_coeff @angle:cl-na-ss harmonic 56.71 111.91 # SOURCE3 1 0.0000
angle_coeff @angle:f-na-f harmonic 62.22 120.20 # SOURCE3 1
angle_coeff @angle:f-na-nc harmonic 66.64 118.05 # SOURCE3 4 1.7931
angle_coeff @angle:f-na-nd harmonic 66.64 118.05 # SOURCE3 4 same_as_f-na-nc
angle_coeff @angle:f-na-os harmonic 69.15 103.86 # SOURCE3 1 0.0000
angle_coeff @angle:f-na-p2 harmonic 75.54 119.95 # SOURCE3 1
angle_coeff @angle:f-na-pc harmonic 76.37 119.10 # SOURCE3 3 2.3967
angle_coeff @angle:f-na-pd harmonic 76.37 119.10 # SOURCE3 3 same_as_f-na-pc
angle_coeff @angle:f-na-ss harmonic 63.34 108.01 # SOURCE3 1 0.0000
angle_coeff @angle:hn-na-hn harmonic 39.83 116.80 # SOURCE3 1
angle_coeff @angle:hn-na-n harmonic 50.90 111.26 # SOURCE4 5 1.1280
angle_coeff @angle:hn-na-nc harmonic 50.00 119.61 # SOURCE3 16 1.8079
angle_coeff @angle:hn-na-nd harmonic 50.00 119.61 # SOURCE3 16 1.8079
angle_coeff @angle:hn-na-os harmonic 51.44 101.41 # SOURCE3 7 3.0814
angle_coeff @angle:hn-na-p2 harmonic 51.02 122.52 # SOURCE3 1
angle_coeff @angle:hn-na-pc harmonic 51.81 121.48 # SOURCE3 3 2.9355
angle_coeff @angle:hn-na-pd harmonic 51.81 121.48 # SOURCE3 3 same_as_hn-na-pc
angle_coeff @angle:hn-na-ss harmonic 42.24 113.95 # SOURCE3 1 0.0000
angle_coeff @angle:i-na-i harmonic 58.32 124.20 # SOURCE3 1
angle_coeff @angle:i-na-nc harmonic 56.94 120.03 # SOURCE3 4 2.0032
angle_coeff @angle:i-na-nd harmonic 56.94 120.03 # SOURCE3 4 same_as_i-na-nc
angle_coeff @angle:i-na-os harmonic 59.85 109.91 # SOURCE3 1 0.0000
angle_coeff @angle:i-na-p2 harmonic 73.36 122.28 # SOURCE3 1
angle_coeff @angle:i-na-pc harmonic 73.81 121.40 # SOURCE3 3 2.4763
angle_coeff @angle:i-na-pd harmonic 73.81 121.40 # SOURCE3 3 same_as_i-na-pc
angle_coeff @angle:i-na-ss harmonic 59.04 118.40 # SOURCE3 1 0.0000
angle_coeff @angle:n2-na-n2 harmonic 70.35 116.71 # SOURCE3 1
angle_coeff @angle:n2-na-nc harmonic 69.85 119.96 # SOURCE3 4 4.5041
angle_coeff @angle:n2-na-nd harmonic 69.85 119.96 # SOURCE3 4 same_as_n2-na-nc
angle_coeff @angle:n2-na-os harmonic 70.33 111.53 # SOURCE3 1 0.0000
angle_coeff @angle:n2-na-p2 harmonic 77.46 124.88 # SOURCE3 1
angle_coeff @angle:n2-na-pc harmonic 78.60 123.18 # SOURCE3 3 4.7947
angle_coeff @angle:n2-na-pd harmonic 78.60 123.18 # SOURCE3 3 same_as_n2-na-pc
angle_coeff @angle:n2-na-ss harmonic 61.71 124.64 # SOURCE3 1 0.0000
angle_coeff @angle:n3-na-n3 harmonic 65.77 124.00 # SOURCE3 1
angle_coeff @angle:n4-na-n4 harmonic 68.57 111.70 # SOURCE3 1
angle_coeff @angle:n4-na-nc harmonic 69.09 116.44 # SOURCE3 4 3.6604
angle_coeff @angle:n4-na-nd harmonic 69.09 116.44 # SOURCE3 4 same_as_n4-na-nc
angle_coeff @angle:n4-na-os harmonic 71.61 102.97 # SOURCE3 1 0.0000
angle_coeff @angle:n4-na-p2 harmonic 77.04 123.56 # SOURCE3 1
angle_coeff @angle:n4-na-pc harmonic 78.10 121.98 # SOURCE3 3 4.4884
angle_coeff @angle:n4-na-pd harmonic 78.10 121.98 # SOURCE3 3 same_as_n4-na-pc
angle_coeff @angle:na-na-na harmonic 66.77 123.60 # SOURCE3 1
angle_coeff @angle:na-na-nc harmonic 69.08 119.64 # SOURCE3 4 1.6920
angle_coeff @angle:na-na-nd harmonic 69.08 119.64 # SOURCE3 4 same_as_na-na-nc
angle_coeff @angle:na-na-os harmonic 70.25 109.47 # SOURCE3 1 0.0000
angle_coeff @angle:na-na-p2 harmonic 78.07 121.72 # SOURCE3 1
angle_coeff @angle:na-na-pc harmonic 78.92 120.91 # SOURCE3 3 2.3033
angle_coeff @angle:na-na-pd harmonic 78.92 120.91 # SOURCE3 3 same_as_na-na-pc
angle_coeff @angle:na-na-ss harmonic 63.50 116.50 # SOURCE3 1 0.0000
angle_coeff @angle:nc-na-nc harmonic 71.20 117.08 # SOURCE3 31 1.8121
angle_coeff @angle:nc-na-nd harmonic 69.53 122.77 # SOURCE4 5 0.1352
angle_coeff @angle:nc-na-nh harmonic 68.82 120.55 # SOURCE3 8 1.1436
angle_coeff @angle:nc-na-no harmonic 68.19 119.15 # SOURCE3 4 1.6049
angle_coeff @angle:nc-na-o harmonic 72.04 122.79 # SOURCE3 6 1.3154
angle_coeff @angle:nc-na-oh harmonic 69.71 119.22 # SOURCE3 4 1.7201
angle_coeff @angle:nc-na-os harmonic 68.30 119.65 # SOURCE3 4 1.5019
angle_coeff @angle:nc-na-p2 harmonic 79.23 119.99 # SOURCE3 4 3.6009
angle_coeff @angle:nc-na-p3 harmonic 78.72 120.07 # SOURCE3 4 3.7188
angle_coeff @angle:nc-na-p4 harmonic 86.25 119.77 # SOURCE3 3 0.3747
angle_coeff @angle:nc-na-p5 harmonic 80.84 118.95 # SOURCE3 4 3.1194
angle_coeff @angle:nc-na-pc harmonic 80.31 118.66 # SOURCE3 27 1.5082
angle_coeff @angle:nc-na-s4 harmonic 61.52 119.20 # SOURCE3 4 2.3841
angle_coeff @angle:nc-na-s6 harmonic 63.45 119.24 # SOURCE3 4 2.2262
angle_coeff @angle:nc-na-s harmonic 61.55 122.26 # SOURCE3 4 0.9173
angle_coeff @angle:nc-na-sh harmonic 63.29 120.50 # SOURCE3 4 1.5016
angle_coeff @angle:nc-na-ss harmonic 62.94 120.50 # SOURCE3 4 1.5615
angle_coeff @angle:nd-na-nd harmonic 71.20 117.08 # SOURCE3 31 1.8121
angle_coeff @angle:nd-na-nh harmonic 68.82 120.55 # SOURCE3 8 same_as_nc-na-nh
angle_coeff @angle:nd-na-no harmonic 68.19 119.15 # SOURCE3 4 same_as_nc-na-no
angle_coeff @angle:nd-na-o harmonic 72.04 122.79 # SOURCE3 6 same_as_nc-na-o
angle_coeff @angle:nd-na-oh harmonic 69.71 119.22 # SOURCE3 4 same_as_nc-na-oh
angle_coeff @angle:nd-na-os harmonic 68.30 119.65 # SOURCE3 4 same_as_nc-na-os
angle_coeff @angle:nd-na-p2 harmonic 79.23 119.99 # SOURCE3 4 same_as_nc-na-p2
angle_coeff @angle:nd-na-p3 harmonic 78.72 120.07 # SOURCE3 4 same_as_nc-na-p3
angle_coeff @angle:nd-na-p4 harmonic 86.25 119.77 # SOURCE3 3 same_as_nc-na-p4
angle_coeff @angle:nd-na-p5 harmonic 80.84 118.95 # SOURCE3 4 same_as_nc-na-p5
angle_coeff @angle:nd-na-pd harmonic 80.31 118.66 # SOURCE3 27 same_as_nc-na-pc
angle_coeff @angle:nd-na-s4 harmonic 61.52 119.20 # SOURCE3 4 same_as_nc-na-s4
angle_coeff @angle:nd-na-s6 harmonic 63.45 119.24 # SOURCE3 4 same_as_nc-na-s6
angle_coeff @angle:nd-na-s harmonic 61.55 122.26 # SOURCE3 4 same_as_nc-na-s
angle_coeff @angle:nd-na-sh harmonic 63.29 120.50 # SOURCE3 4 same_as_nc-na-sh
angle_coeff @angle:nd-na-ss harmonic 62.94 120.50 # SOURCE3 4 same_as_nc-na-ss
angle_coeff @angle:nh-na-nh harmonic 66.77 123.60 # SOURCE3 1
angle_coeff @angle:nh-na-os harmonic 69.65 111.37 # SOURCE3 1 0.0000
angle_coeff @angle:nh-na-p2 harmonic 78.35 120.86 # SOURCE3 1
angle_coeff @angle:nh-na-pc harmonic 79.10 120.38 # SOURCE3 6 1.3513
angle_coeff @angle:nh-na-pd harmonic 79.10 120.38 # SOURCE3 6 same_as_nh-na-pc
angle_coeff @angle:nh-na-ss harmonic 64.66 112.35 # SOURCE3 2 5.2951
angle_coeff @angle:n-na-n harmonic 67.78 123.80 # SOURCE3 1
angle_coeff @angle:n-na-nc harmonic 69.61 119.85 # SOURCE3 4 1.6156
angle_coeff @angle:n-na-nd harmonic 69.61 119.85 # SOURCE3 4 same_as_n-na-nc
angle_coeff @angle:no-na-no harmonic 65.22 122.80 # SOURCE3 1
angle_coeff @angle:no-na-os harmonic 70.30 106.55 # SOURCE3 1 0.0000
angle_coeff @angle:no-na-pc harmonic 78.65 120.11 # SOURCE3 3 2.0821
angle_coeff @angle:no-na-pd harmonic 78.65 120.11 # SOURCE3 3 same_as_no-na-pc
angle_coeff @angle:n-na-os harmonic 72.34 104.71 # SOURCE3 1 0.0000
angle_coeff @angle:no-na-ss harmonic 63.49 114.95 # SOURCE3 1 0.0000
angle_coeff @angle:n-na-p2 harmonic 78.46 121.35 # SOURCE3 1
angle_coeff @angle:n-na-pc harmonic 79.30 120.64 # SOURCE3 3 2.0168
angle_coeff @angle:n-na-pd harmonic 79.30 120.64 # SOURCE3 3 same_as_n-na-pc
angle_coeff @angle:n-na-ss harmonic 63.84 116.10 # SOURCE3 1 0.0000
angle_coeff @angle:oh-na-oh harmonic 68.13 122.20 # SOURCE3 1
angle_coeff @angle:oh-na-p2 harmonic 78.88 120.76 # SOURCE3 1
angle_coeff @angle:oh-na-pc harmonic 79.74 119.99 # SOURCE3 3 2.1734
angle_coeff @angle:oh-na-pd harmonic 79.74 119.99 # SOURCE3 3 same_as_oh-na-pc
angle_coeff @angle:oh-na-ss harmonic 64.88 113.04 # SOURCE3 1 0.0000
angle_coeff @angle:o-na-o harmonic 74.03 126.20 # SOURCE3 1
angle_coeff @angle:o-na-os harmonic 70.76 118.39 # SOURCE3 1 0.0000
angle_coeff @angle:o-na-p2 harmonic 79.51 122.80 # SOURCE3 1
angle_coeff @angle:o-na-pc harmonic 80.36 122.34 # SOURCE3 3 1.2908
angle_coeff @angle:o-na-pd harmonic 80.36 122.34 # SOURCE3 3 same_as_o-na-pc
angle_coeff @angle:os-na-os harmonic 71.29 104.45 # SOURCE3 2 0.0983
angle_coeff @angle:os-na-p2 harmonic 79.21 117.86 # SOURCE3 1 0.0000
angle_coeff @angle:os-na-p3 harmonic 83.58 104.70 # SOURCE3 1 0.0000
angle_coeff @angle:os-na-p5 harmonic 82.64 111.41 # SOURCE3 1 0.0000
angle_coeff @angle:os-na-pc harmonic 79.09 119.91 # SOURCE3 3 1.9002
angle_coeff @angle:os-na-pd harmonic 79.09 119.91 # SOURCE3 3 same_as_os-na-pc
angle_coeff @angle:os-na-s4 harmonic 64.81 105.88 # SOURCE3 2 0.0000
angle_coeff @angle:os-na-s6 harmonic 64.80 112.00 # SOURCE3 2 0.0000
angle_coeff @angle:os-na-ss harmonic 65.33 109.64 # SOURCE3 3 4.1395
angle_coeff @angle:p2-na-p2 harmonic 96.62 120.91 # SOURCE3 1
angle_coeff @angle:p2-na-p3 harmonic 94.74 124.80 # SOURCE3 1
angle_coeff @angle:p2-na-p5 harmonic 96.33 123.99 # SOURCE3 1
angle_coeff @angle:p2-na-pc harmonic 97.16 120.72 # SOURCE3 3 0.2407
angle_coeff @angle:p2-na-pd harmonic 97.16 120.72 # SOURCE3 3 same_as_p2-na-pc
angle_coeff @angle:p2-na-s4 harmonic 74.88 122.47 # SOURCE3 1
angle_coeff @angle:p2-na-s6 harmonic 76.31 122.50 # SOURCE3 1
angle_coeff @angle:p2-na-s harmonic 75.69 121.85 # SOURCE3 1
angle_coeff @angle:p2-na-sh harmonic 76.68 121.75 # SOURCE3 1
angle_coeff @angle:p2-na-ss harmonic 76.38 121.88 # SOURCE3 1
angle_coeff @angle:p3-na-p3 harmonic 93.72 126.60 # SOURCE3 1
angle_coeff @angle:p3-na-pc harmonic 95.76 123.32 # SOURCE3 3 4.1781
angle_coeff @angle:p3-na-pd harmonic 95.76 123.32 # SOURCE3 3 same_as_p3-na-pc
angle_coeff @angle:p5-na-p5 harmonic 97.06 124.60 # SOURCE3 1
angle_coeff @angle:p5-na-pc harmonic 97.33 122.69 # SOURCE3 3 3.6738
angle_coeff @angle:p5-na-pd harmonic 97.33 122.69 # SOURCE3 3 same_as_p5-na-pc
angle_coeff @angle:p5-na-ss harmonic 78.22 118.52 # SOURCE3 1 0.0000
angle_coeff @angle:pc-na-pc harmonic 97.62 120.78 # SOURCE3 27 1.6457
angle_coeff @angle:pc-na-s4 harmonic 75.52 121.51 # SOURCE3 3 2.7242
angle_coeff @angle:pc-na-s6 harmonic 76.99 121.55 # SOURCE3 3 2.7065
angle_coeff @angle:pc-na-s harmonic 76.17 121.47 # SOURCE3 3 1.0668
angle_coeff @angle:pc-na-sh harmonic 77.28 121.08 # SOURCE3 3 1.8942
angle_coeff @angle:pc-na-ss harmonic 76.97 121.20 # SOURCE3 3 1.9295
angle_coeff @angle:pd-na-pd harmonic 97.62 120.78 # SOURCE3 27 same_as_pc-na-pc
angle_coeff @angle:pd-na-s4 harmonic 75.52 121.51 # SOURCE3 3 same_as_pc-na-s4
angle_coeff @angle:pd-na-s6 harmonic 76.99 121.55 # SOURCE3 3 same_as_pc-na-s6
angle_coeff @angle:pd-na-s harmonic 76.17 121.47 # SOURCE3 3 same_as_pc-na-s
angle_coeff @angle:pd-na-sh harmonic 77.28 121.08 # SOURCE3 3 same_as_pc-na-sh
angle_coeff @angle:pd-na-ss harmonic 76.97 121.20 # SOURCE3 3 same_as_pc-na-ss
angle_coeff @angle:py-na-py harmonic 122.69 78.25 # SOURCE3 1 0.0000
angle_coeff @angle:s4-na-s4 harmonic 58.05 124.20 # SOURCE3 1
angle_coeff @angle:s4-na-s6 harmonic 62.00 112.86 # SOURCE3 1
angle_coeff @angle:s4-na-ss harmonic 62.16 111.92 # SOURCE3 1 0.0000
angle_coeff @angle:s6-na-s6 harmonic 60.51 123.20 # SOURCE3 1
angle_coeff @angle:s6-na-ss harmonic 61.44 119.10 # SOURCE3 1 0.0000
angle_coeff @angle:sh-na-sh harmonic 60.38 124.60 # SOURCE3 1
angle_coeff @angle:sh-na-ss harmonic 61.63 118.79 # SOURCE3 1 0.0000
angle_coeff @angle:s-na-s harmonic 58.55 126.00 # SOURCE3 1
angle_coeff @angle:s-na-ss harmonic 62.52 112.49 # SOURCE3 1 0.0000
angle_coeff @angle:ss-na-ss harmonic 62.90 113.24 # SOURCE3 2 6.6084
angle_coeff @angle:sy-na-sy harmonic 60.51 123.20 # SOURCE3 1
angle_coeff @angle:ca-nb-ca harmonic 68.59 115.86 # SOURCE3 46 1.1645
angle_coeff @angle:ca-nb-cp harmonic 68.01 118.04 # SOURCE4 58 0.7819
angle_coeff @angle:ca-nb-cq harmonic 68.01 118.04 # SOURCE4 58 same as ca-nb-cp
angle_coeff @angle:ca-nb-nb harmonic 69.37 118.89 # SOURCE3 10 0.6031
angle_coeff @angle:cp-nb-nb harmonic 68.79 121.11 # SOURCE4 12 0.4315
angle_coeff @angle:nb-nb-nb harmonic 70.44 121.04 # SOURCE3 1 0.0000
angle_coeff @angle:br-n-br harmonic 66.59 116.20 # SOURCE3 1 0.0000
angle_coeff @angle:br-n-c harmonic 61.85 120.77 # SOURCE3 5 2.6390
angle_coeff @angle:br-n-ca harmonic 62.07 118.19 # SOURCE3 1
angle_coeff @angle:br-n-cc harmonic 62.34 118.19 # SOURCE3 1 same_as_br-n-cd
angle_coeff @angle:br-n-cd harmonic 62.34 118.19 # SOURCE3 1 0.0000
angle_coeff @angle:c1-n-c1 harmonic 73.52 102.69 # SOURCE3 1
angle_coeff @angle:c1-n-ca harmonic 65.90 118.88 # SOURCE3 1
angle_coeff @angle:c1-n-cc harmonic 67.02 118.88 # SOURCE3 1 same_as_c1-n-cd
angle_coeff @angle:c1-n-cd harmonic 67.02 118.88 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n-c2 harmonic 65.18 116.75 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n-c3 harmonic 63.06 119.98 # SOURCE4 23 2.3373
angle_coeff @angle:c2-n-ca harmonic 64.88 116.54 # SOURCE3 1
angle_coeff @angle:c2-n-cc harmonic 65.85 116.54 # SOURCE3 1 same_as_c2-n-cd
angle_coeff @angle:c2-n-cd harmonic 65.85 116.54 # SOURCE3 1 0.0000
angle_coeff @angle:c2-n-hn harmonic 47.33 118.36 # SOURCE4 40 1.8005
angle_coeff @angle:c3-n-c3 harmonic 63.13 115.56 # SOURCE4 392 2.0191
angle_coeff @angle:c3-n-ca harmonic 62.76 119.96 # SOURCE4 165 2.0808
angle_coeff @angle:c3-n-cc harmonic 63.33 121.00 # CORR 267
angle_coeff @angle:c3-n-cd harmonic 63.33 121.00 # CORR 267
angle_coeff @angle:c3-n-cy harmonic 62.51 117.11 # SOURCE4 49 1.0344
angle_coeff @angle:c3-n-hn harmonic 46.04 116.78 # SOURCE3 39 2.1985
angle_coeff @angle:c3-n-n2 harmonic 64.89 121.68 # SOURCE4 52 1.3175
angle_coeff @angle:c3-n-n harmonic 66.40 114.82 # SOURCE4 9 0.7008
angle_coeff @angle:c3-n-nc harmonic 66.97 115.21 # CORR 48
angle_coeff @angle:c3-n-nd harmonic 66.97 115.21 # CORR 48
angle_coeff @angle:c3-n-oh harmonic 66.88 113.05 # SOURCE4 31 0.8144
angle_coeff @angle:c3-n-os harmonic 66.99 112.65 # SOURCE4 16 1.5399
angle_coeff @angle:c3-n-sy harmonic 60.53 121.27 # SOURCE4 5 1.1298
angle_coeff @angle:ca-n-ca harmonic 64.31 117.39 # SOURCE4 39 1.6465
angle_coeff @angle:ca-n-cc harmonic 66.19 114.06 # CORR 34
angle_coeff @angle:ca-n-cd harmonic 66.19 114.06 # CORR 34
angle_coeff @angle:ca-n-cl harmonic 57.24 117.72 # SOURCE3 1
angle_coeff @angle:ca-n-f harmonic 64.62 114.92 # SOURCE3 1
angle_coeff @angle:ca-n-hn harmonic 47.36 115.94 # SOURCE4 537 1.8890
angle_coeff @angle:ca-n-i harmonic 56.58 119.30 # SOURCE3 1
angle_coeff @angle:ca-n-n2 harmonic 65.72 122.17 # SOURCE4 5 0.2545
angle_coeff @angle:ca-n-n4 harmonic 64.15 122.98 # SOURCE3 1
angle_coeff @angle:ca-n-n harmonic 66.30 118.54 # SOURCE4 21 0.3399
angle_coeff @angle:ca-n-na harmonic 66.33 119.31 # SOURCE4 16 0.3168
angle_coeff @angle:ca-n-nc harmonic 68.25 114.36 # CORR 6
angle_coeff @angle:ca-n-nd harmonic 68.25 114.36 # CORR 6
angle_coeff @angle:ca-n-nh harmonic 66.60 116.45 # SOURCE3 1
angle_coeff @angle:ca-n-p2 harmonic 79.60 112.32 # SOURCE3 1
angle_coeff @angle:ca-n-p3 harmonic 74.22 125.11 # SOURCE3 1
angle_coeff @angle:ca-n-s4 harmonic 59.97 118.40 # SOURCE3 1
angle_coeff @angle:ca-n-s6 harmonic 62.01 117.32 # SOURCE3 1
angle_coeff @angle:ca-n-ss harmonic 62.15 116.60 # SOURCE3 1
angle_coeff @angle:c-n-c1 harmonic 68.47 117.04 # SOURCE3 1 0.0000
angle_coeff @angle:c-n-c2 harmonic 65.09 122.15 # SOURCE3 9 5.1016
angle_coeff @angle:c-n-c3 harmonic 63.92 121.35 # SOURCE3 54 2.3808
angle_coeff @angle:c3-nc-cd harmonic 67.60 109.51 # SOURCE3 9 5.4142
angle_coeff @angle:c-n-c harmonic 65.33 127.14 # SOURCE4 514 2.0111
angle_coeff @angle:c-n-ca harmonic 64.29 123.71 # SOURCE3 10 3.8159
angle_coeff @angle:ca-nc-ca harmonic 70.73 109.95 # SOURCE3 1
angle_coeff @angle:ca-nc-cd harmonic 72.43 104.94 # CORR 437
angle_coeff @angle:ca-nc-n harmonic 73.68 104.69 # CORR 2
angle_coeff @angle:ca-nc-na harmonic 74.57 102.74 # CORR 14
angle_coeff @angle:ca-nc-os harmonic 73.08 104.48 # CORR 10
angle_coeff @angle:ca-nc-ss harmonic 67.84 116.29 # SOURCE3 1
angle_coeff @angle:c-n-cc harmonic 65.24 124.19 # SOURCE3 57 2.2262
angle_coeff @angle:c-nc-ca harmonic 66.11 120.66 # CORR 2
angle_coeff @angle:cc-n-cc harmonic 68.80 108.92 # SOURCE3 11 0.3167
angle_coeff @angle:cc-nc-cc harmonic 70.50 104.34 # CORR 6
angle_coeff @angle:cc-nc-cd harmonic 71.08 105.67 # CORR 1240
angle_coeff @angle:c-nc-cd harmonic 66.18 120.48 # CORR 138
angle_coeff @angle:cc-n-cl harmonic 57.67 117.72 # SOURCE3 1 same_as_cd-n-cl
angle_coeff @angle:cc-nc-na harmonic 73.38 102.97 # SOURCE3 1 0.0000
angle_coeff @angle:cc-nc-nd harmonic 72.54 107.94 # SOURCE3 6 1.4052
angle_coeff @angle:c-n-cd harmonic 65.24 124.19 # SOURCE3 57 2.2262
angle_coeff @angle:cd-nc-cd harmonic 68.53 117.28 # CORR 17
angle_coeff @angle:cd-nc-n harmonic 69.66 117.19 # CORR 64
angle_coeff @angle:cd-nc-na harmonic 74.24 103.73 # SOURCE3 122 2.3292
angle_coeff @angle:cd-nc-nc harmonic 71.99 107.88 # CORR 355
angle_coeff @angle:cd-nc-os harmonic 73.04 104.66 # CORR 116
angle_coeff @angle:cd-nc-ss harmonic 70.36 108.15 # CORR 45
angle_coeff @angle:c-n-ce harmonic 62.21 131.83 # SOURCE4 146 1.3048
angle_coeff @angle:cc-n-f harmonic 65.61 114.92 # SOURCE3 1 same_as_cd-n-f
angle_coeff @angle:cc-n-hn harmonic 47.99 119.14 # CORR 276
angle_coeff @angle:cc-n-i harmonic 56.61 119.30 # SOURCE3 1 same_as_cd-n-i
angle_coeff @angle:c-n-cl harmonic 58.34 116.35 # SOURCE4 11 0.6829
angle_coeff @angle:cc-n-n2 harmonic 70.09 110.87 # SOURCE3 1 same_as_cd-n-n2
angle_coeff @angle:cc-n-n harmonic 66.53 121.37 # SOURCE3 1 same_as_cd-n-n
angle_coeff @angle:cc-n-na harmonic 67.87 117.57 # SOURCE3 1 same_as_cd-n-na
angle_coeff @angle:cc-n-nc harmonic 70.08 112.03 # CORR 14
angle_coeff @angle:cc-n-nh harmonic 67.30 117.52 # SOURCE3 1 same_as_cd-n-nh
angle_coeff @angle:cc-n-no harmonic 66.40 115.92 # SOURCE3 1 same_as_cd-n-no
angle_coeff @angle:cc-n-o harmonic 70.07 120.54 # SOURCE3 1 same_as_cd-n-o
angle_coeff @angle:cc-n-oh harmonic 67.32 118.15 # SOURCE3 1 same_as_cd-n-oh
angle_coeff @angle:cc-n-os harmonic 68.06 115.56 # SOURCE3 1 same_as_cd-n-os
angle_coeff @angle:cc-n-p2 harmonic 80.17 112.32 # SOURCE3 1 same_as_cd-n-p2
angle_coeff @angle:cc-n-p3 harmonic 74.70 125.11 # SOURCE3 1 same_as_cd-n-p3
angle_coeff @angle:cc-n-p5 harmonic 78.11 121.00 # SOURCE3 1 same_as_cd-n-p5
angle_coeff @angle:cc-n-s4 harmonic 60.34 118.40 # SOURCE3 1 same_as_cd-n-s4
angle_coeff @angle:cc-n-s6 harmonic 62.48 117.32 # SOURCE3 1 same_as_cd-n-s6
angle_coeff @angle:cc-n-s harmonic 60.78 118.29 # SOURCE3 1 same_as_cd-n-s
angle_coeff @angle:cc-n-sh harmonic 61.64 119.13 # SOURCE3 1 same_as_cd-n-sh
angle_coeff @angle:cc-n-ss harmonic 62.62 116.60 # SOURCE3 2 same_as_cd-n-ss
angle_coeff @angle:c-n-cx harmonic 64.22 122.07 # SOURCE4 11 1.9478
angle_coeff @angle:c-n-cy harmonic 72.26 94.23 # SOURCE4 270 1.3777
angle_coeff @angle:cd-n-cd harmonic 68.80 108.92 # SOURCE3 11 same_as_cc-n-cc
angle_coeff @angle:cd-n-cl harmonic 57.67 117.72 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-f harmonic 65.61 114.92 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-hn harmonic 47.99 119.14 # CORR 276
angle_coeff @angle:cd-n-i harmonic 56.61 119.30 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-n2 harmonic 70.09 110.87 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-n harmonic 66.53 121.37 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-na harmonic 67.87 117.57 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-nd harmonic 70.08 112.03 # CORR 14
angle_coeff @angle:cd-n-nh harmonic 67.30 117.52 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-no harmonic 66.40 115.92 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-o harmonic 70.07 120.54 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-oh harmonic 67.32 118.15 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-os harmonic 68.06 115.56 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-p2 harmonic 80.17 112.32 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-p3 harmonic 74.70 125.11 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-p5 harmonic 78.11 121.00 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-s4 harmonic 60.34 118.40 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-s6 harmonic 62.48 117.32 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-s harmonic 60.78 118.29 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-sh harmonic 61.64 119.13 # SOURCE3 1 0.0000
angle_coeff @angle:cd-n-ss harmonic 62.62 116.60 # SOURCE3 2 1.8318
angle_coeff @angle:ce-n-cy harmonic 64.70 111.89 # CORR 152
angle_coeff @angle:c-n-f harmonic 68.30 108.63 # SOURCE3 3 4.6785
angle_coeff @angle:cf-n-cy harmonic 64.70 111.89 # CORR 152
angle_coeff @angle:c-n-hn harmonic 49.21 118.46 # SOURCE3 157 2.4094
angle_coeff @angle:c-n-i harmonic 56.34 120.38 # SOURCE3 5 2.1600
angle_coeff @angle:cl-n-cl harmonic 54.70 111.69 # SOURCE3 1 0.0000
angle_coeff @angle:c-n-n2 harmonic 68.06 120.59 # SOURCE3 9 3.2410
angle_coeff @angle:c-n-n3 harmonic 67.13 120.43 # SOURCE3 5 0.9481
angle_coeff @angle:c-n-n4 harmonic 68.85 112.32 # SOURCE3 5 1.2622
angle_coeff @angle:c-n-n harmonic 68.18 118.42 # SOURCE3 10 2.8922
angle_coeff @angle:c-n-na harmonic 68.25 119.20 # SOURCE3 11 2.3032
angle_coeff @angle:na-nc-nd harmonic 75.97 105.47 # SOURCE3 6 0.6349
angle_coeff @angle:c-n-nc harmonic 67.16 125.19 # CORR 84
angle_coeff @angle:nc-nc-nd harmonic 73.11 111.29 # CORR 61
angle_coeff @angle:c-n-nd harmonic 67.16 125.19 # CORR 84
angle_coeff @angle:nd-nc-os harmonic 74.42 107.22 # SOURCE3 3 0.4707
angle_coeff @angle:c-n-nh harmonic 68.02 117.81 # SOURCE4 21 1.5935
angle_coeff @angle:c-n-no harmonic 66.47 118.16 # SOURCE3 4 5.4870
angle_coeff @angle:c-n-o harmonic 71.64 118.90 # SOURCE3 9 5.4085
angle_coeff @angle:c-n-oh harmonic 69.53 113.39 # SOURCE3 6 1.3345
angle_coeff @angle:c-n-os harmonic 69.60 113.14 # SOURCE3 7 3.0839
angle_coeff @angle:c-n-p2 harmonic 76.53 124.56 # SOURCE3 8 3.6907
angle_coeff @angle:c-n-p3 harmonic 75.82 122.54 # SOURCE3 9 4.4802
angle_coeff @angle:c-n-p4 harmonic 76.84 123.44 # SOURCE3 1 0.0000
angle_coeff @angle:c-n-p5 harmonic 76.23 128.50 # SOURCE4 6 0.5353
angle_coeff @angle:c-n-pc harmonic 77.00 122.23 # SOURCE3 3 2.8787
angle_coeff @angle:c-n-pd harmonic 77.00 122.23 # SOURCE3 3 same_as_c-n-pc
angle_coeff @angle:c-n-s4 harmonic 60.09 120.41 # SOURCE3 4 3.1760
angle_coeff @angle:c-n-s6 harmonic 60.86 125.01 # SOURCE4 13 1.6314
angle_coeff @angle:c-n-s harmonic 59.04 126.55 # SOURCE3 3 4.3365
angle_coeff @angle:c-n-sh harmonic 61.87 119.54 # SOURCE3 4 1.7681
angle_coeff @angle:c-n-ss harmonic 61.97 120.37 # SOURCE3 7 1.4450
angle_coeff @angle:c-n-sy harmonic 60.91 124.81 # SOURCE4 51 1.0517
angle_coeff @angle:cx-n-hn harmonic 46.26 118.58 # SOURCE4 5 0.3288
angle_coeff @angle:cx-n-os harmonic 97.40 54.04 # SOURCE3 1 0.0000
angle_coeff @angle:cy-n-hn harmonic 45.34 119.00 # SOURCE4 65 1.3840
angle_coeff @angle:c3-nd-cc harmonic 67.60 109.51 # SOURCE3 9 same_as_c3-nc-cd
angle_coeff @angle:ca-nd-ca harmonic 70.73 109.95 # SOURCE3 1 same_as_ca-nc-ca
angle_coeff @angle:ca-nd-cc harmonic 72.43 104.94 # CORR 437
angle_coeff @angle:ca-nd-n harmonic 73.68 104.69 # CORR 2
angle_coeff @angle:ca-nd-na harmonic 74.57 102.74 # CORR 14
angle_coeff @angle:ca-nd-nc harmonic 73.55 108.41 # SOURCE4 9 0.1575
angle_coeff @angle:ca-nd-os harmonic 73.08 104.48 # CORR 10
angle_coeff @angle:ca-nd-ss harmonic 67.84 116.29 # SOURCE3 1 same_as_ca-nc-ss
angle_coeff @angle:c-nd-ca harmonic 66.11 120.66 # CORR 2
angle_coeff @angle:c-nd-cc harmonic 66.18 120.48 # CORR 138
angle_coeff @angle:cc-nd-cc harmonic 68.53 117.28 # CORR 17
angle_coeff @angle:cc-nd-cd harmonic 71.08 105.67 # CORR 1240
angle_coeff @angle:cc-nd-n harmonic 69.66 117.19 # CORR 64
angle_coeff @angle:cc-nd-na harmonic 74.24 103.73 # SOURCE3 122 2.3292
angle_coeff @angle:cc-nd-nd harmonic 71.99 107.88 # CORR 355
angle_coeff @angle:cc-nd-os harmonic 73.04 104.66 # CORR 116
angle_coeff @angle:cc-nd-ss harmonic 70.36 108.15 # CORR 45
angle_coeff @angle:cd-nd-cd harmonic 70.50 104.34 # CORR 6
angle_coeff @angle:cd-nd-na harmonic 73.38 102.97 # SOURCE3 1 same_as_cc-nc-na
angle_coeff @angle:cd-nd-nc harmonic 72.54 107.94 # SOURCE3 6 1.4052
angle_coeff @angle:na-nd-nc harmonic 75.97 105.47 # SOURCE3 6 0.6349
angle_coeff @angle:nc-nd-nd harmonic 73.11 111.29 # CORR 61
angle_coeff @angle:nc-nd-os harmonic 74.42 107.22 # SOURCE3 3 same_as_nd-nc-os
angle_coeff @angle:c1-ne-ca harmonic 60.41 150.84 # CORR 9
angle_coeff @angle:c1-ne-cg harmonic 66.00 140.00 # SOURCE2 1 0.0000
angle_coeff @angle:c2-ne-ca harmonic 66.09 120.84 # CORR 55
angle_coeff @angle:c2-ne-ce harmonic 67.33 118.17 # SOURCE3 3 1.2374
angle_coeff @angle:c2-ne-cg harmonic 68.36 123.58 # SOURCE4 12 0.8560
angle_coeff @angle:c2-ne-n2 harmonic 74.56 113.31 # SOURCE3 1
angle_coeff @angle:c2-ne-ne harmonic 69.17 110.86 # SOURCE3 7 4.5874
angle_coeff @angle:c2-ne-p2 harmonic 80.83 134.03 # SOURCE3 1
angle_coeff @angle:c2-ne-pe harmonic 79.24 120.52 # SOURCE3 8 8.1381
angle_coeff @angle:c2-ne-px harmonic 80.57 117.75 # SOURCE3 5 0.8581
angle_coeff @angle:c2-ne-py harmonic 84.33 117.04 # SOURCE3 3 1.4398
angle_coeff @angle:c2-ne-sx harmonic 60.95 111.98 # SOURCE3 3 0.4090
angle_coeff @angle:c2-ne-sy harmonic 61.78 118.92 # CORR 9
angle_coeff @angle:ca-ne-cf harmonic 65.56 121.98 # CORR 15
angle_coeff @angle:ca-ne-n2 harmonic 69.73 114.06 # CORR 11
angle_coeff @angle:ca-ne-nf harmonic 69.69 115.12 # CORR 44
angle_coeff @angle:ca-ne-o harmonic 71.10 113.96 # SOURCE3 3 1.1253
angle_coeff @angle:ca-ne-p2 harmonic 83.08 118.09 # SOURCE3 1 0.0000
angle_coeff @angle:ca-ne-s harmonic 65.75 120.11 # SOURCE3 1 0.0000
angle_coeff @angle:c-ne-c2 harmonic 67.85 118.53 # CORR 6
angle_coeff @angle:ce-ne-n2 harmonic 71.16 111.19 # SOURCE3 1 0.0000
angle_coeff @angle:ce-ne-o harmonic 72.26 112.16 # SOURCE3 1 0.0000
angle_coeff @angle:ce-ne-p2 harmonic 83.85 117.02 # SOURCE3 1 0.0000
angle_coeff @angle:ce-ne-s harmonic 67.15 116.28 # SOURCE3 1 0.0000
angle_coeff @angle:cg-ne-n1 harmonic 71.71 120.20 # SOURCE2 1 0.0000
angle_coeff @angle:cg-ne-n2 harmonic 73.16 113.39 # SOURCE3 1 0.0000
angle_coeff @angle:cg-ne-o harmonic 74.43 114.70 # SOURCE2 1 0.0000
angle_coeff @angle:cg-ne-p2 harmonic 84.75 119.57 # SOURCE3 1 0.0000
angle_coeff @angle:cg-ne-s harmonic 68.28 117.70 # SOURCE3 1 0.0000
angle_coeff @angle:c-ne-sy harmonic 61.66 116.05 # SOURCE4 6 1.2661
angle_coeff @angle:n2-ne-n2 harmonic 78.59 107.22 # SOURCE3 1
angle_coeff @angle:n2-ne-ne harmonic 70.94 110.72 # SOURCE3 9 6.1488
angle_coeff @angle:n2-ne-o harmonic 78.09 114.10 # SOURCE3 1 0.0000
angle_coeff @angle:n2-ne-p2 harmonic 91.59 109.66 # SOURCE3 1
angle_coeff @angle:n2-ne-pe harmonic 84.18 112.15 # SOURCE3 7 6.5273
angle_coeff @angle:n2-ne-px harmonic 83.20 115.97 # SOURCE3 3 1.9854
angle_coeff @angle:n2-ne-py harmonic 87.34 114.60 # SOURCE3 3 2.9261
angle_coeff @angle:n2-ne-s harmonic 71.27 115.90 # SOURCE3 1 0.0000
angle_coeff @angle:n2-ne-sx harmonic 63.80 107.29 # SOURCE3 1 0.0000
angle_coeff @angle:n2-ne-sy harmonic 65.46 111.21 # SOURCE3 1 0.0000
angle_coeff @angle:ne-ne-o harmonic 72.28 110.45 # SOURCE3 10 1.8535
angle_coeff @angle:ne-ne-p2 harmonic 85.32 114.39 # SOURCE3 6 4.0528
angle_coeff @angle:ne-ne-s harmonic 67.59 115.95 # SOURCE3 6 3.4604
angle_coeff @angle:o-ne-o harmonic 76.91 124.09 # SOURCE3 2 8.7534
angle_coeff @angle:o-ne-pe harmonic 78.32 132.32 # SOURCE3 11 23.9559
angle_coeff @angle:o-ne-px harmonic 86.11 110.62 # SOURCE3 1 0.0000
angle_coeff @angle:o-ne-py harmonic 90.01 110.79 # SOURCE3 4 1.6818
angle_coeff @angle:o-ne-s harmonic 71.99 117.19 # SOURCE3 2 0.0225
angle_coeff @angle:o-ne-sx harmonic 63.79 108.92 # SOURCE3 1 0.0000
angle_coeff @angle:o-ne-sy harmonic 66.05 111.34 # SOURCE3 1 0.0000
angle_coeff @angle:p2-ne-pe harmonic 104.56 116.81 # SOURCE3 1 0.0000
angle_coeff @angle:p2-ne-px harmonic 100.10 128.35 # SOURCE3 1 0.0000
angle_coeff @angle:p2-ne-py harmonic 105.15 123.47 # SOURCE3 1 0.0000
angle_coeff @angle:p2-ne-sx harmonic 80.48 112.12 # SOURCE3 1 0.0000
angle_coeff @angle:p2-ne-sy harmonic 81.80 115.73 # SOURCE3 1 0.0000
angle_coeff @angle:pe-ne-s harmonic 83.52 115.73 # SOURCE3 1 0.0000
angle_coeff @angle:px-ne-s harmonic 78.54 131.84 # SOURCE3 1 0.0000
angle_coeff @angle:py-ne-s harmonic 86.30 116.18 # SOURCE3 4 3.7135
angle_coeff @angle:s-ne-s harmonic 68.65 120.87 # SOURCE3 1 0.0000
angle_coeff @angle:s-ne-sx harmonic 63.66 112.96 # SOURCE3 1 0.0000
angle_coeff @angle:s-ne-sy harmonic 63.94 119.63 # SOURCE3 1 0.0000
angle_coeff @angle:c1-nf-ca harmonic 60.41 150.84 # CORR 9
angle_coeff @angle:c1-nf-ch harmonic 66.00 140.00 # SOURCE2 1 same_as_c1-ne-cg
angle_coeff @angle:c2-nf-ca harmonic 66.09 120.84 # CORR 55
angle_coeff @angle:c2-nf-cf harmonic 67.33 118.17 # SOURCE3 3 same_as_c2-ne-ce
angle_coeff @angle:c2-nf-n2 harmonic 74.56 113.31 # SOURCE3 1 same_as_c2-ne-n2
angle_coeff @angle:c2-nf-nf harmonic 69.17 110.86 # SOURCE3 7 same_as_c2-ne-ne
angle_coeff @angle:c2-nf-p2 harmonic 80.83 134.03 # SOURCE3 1 same_as_c2-ne-p2
angle_coeff @angle:c2-nf-pf harmonic 79.24 120.52 # SOURCE3 8 same_as_c2-ne-pe
angle_coeff @angle:c2-nf-px harmonic 80.57 117.75 # SOURCE3 5 same_as_c2-ne-px
angle_coeff @angle:c2-nf-py harmonic 84.33 117.04 # SOURCE3 3 same_as_c2-ne-py
angle_coeff @angle:c2-nf-sx harmonic 60.95 111.98 # SOURCE3 3 same_as_c2-ne-sx
angle_coeff @angle:c2-nf-sy harmonic 61.78 118.92 # CORR 9
angle_coeff @angle:ca-nf-ce harmonic 65.56 121.98 # CORR 15
angle_coeff @angle:ca-nf-n2 harmonic 69.73 114.06 # CORR 11
angle_coeff @angle:ca-nf-ne harmonic 69.69 115.12 # CORR 44
angle_coeff @angle:ca-nf-o harmonic 71.10 113.96 # SOURCE3 3 same_as_ca-ne-o
angle_coeff @angle:ca-nf-p2 harmonic 83.08 118.09 # SOURCE3 1 same_as_ca-ne-p2
angle_coeff @angle:ca-nf-s harmonic 65.75 120.11 # SOURCE3 1 same_as_ca-ne-s
angle_coeff @angle:c-nf-c2 harmonic 67.85 118.53 # CORR 6
angle_coeff @angle:cf-nf-n2 harmonic 71.16 111.19 # SOURCE3 1 same_as_ce-ne-n2
angle_coeff @angle:cf-nf-o harmonic 72.26 112.16 # SOURCE3 1 same_as_ce-ne-o
angle_coeff @angle:cf-nf-p2 harmonic 83.85 117.02 # SOURCE3 1 same_as_ce-ne-p2
angle_coeff @angle:cf-nf-s harmonic 67.15 116.28 # SOURCE3 1 same_as_ce-ne-s
angle_coeff @angle:ch-nf-n1 harmonic 71.71 120.20 # SOURCE2 1 same_as_cg-ne-n1
angle_coeff @angle:ch-nf-n2 harmonic 73.16 113.39 # SOURCE3 1 same_as_cg-ne-n2
angle_coeff @angle:ch-nf-o harmonic 74.43 114.70 # SOURCE2 1 same_as_cg-ne-o
angle_coeff @angle:ch-nf-p2 harmonic 84.75 119.57 # SOURCE3 1 same_as_cg-ne-p2
angle_coeff @angle:ch-nf-s harmonic 68.28 117.70 # SOURCE3 1 same_as_cg-ne-s
angle_coeff @angle:f-n-f harmonic 67.90 102.98 # SOURCE3 1 0.0000
angle_coeff @angle:n2-nf-n2 harmonic 78.59 107.22 # SOURCE3 1 same_as_n2-ne-n2
angle_coeff @angle:n2-nf-nf harmonic 70.94 110.72 # SOURCE3 9 same_as_n2-ne-ne
angle_coeff @angle:n2-nf-o harmonic 78.09 114.10 # SOURCE3 1 same_as_n2-ne-o
angle_coeff @angle:n2-nf-p2 harmonic 91.59 109.66 # SOURCE3 1 same_as_n2-ne-p2
angle_coeff @angle:n2-nf-pf harmonic 84.18 112.15 # SOURCE3 7 same_as_n2-ne-pe
angle_coeff @angle:n2-nf-px harmonic 83.20 115.97 # SOURCE3 3 same_as_n2-ne-px
angle_coeff @angle:n2-nf-py harmonic 87.34 114.60 # SOURCE3 3 same_as_n2-ne-py
angle_coeff @angle:n2-nf-s harmonic 71.27 115.90 # SOURCE3 1 same_as_n2-ne-s
angle_coeff @angle:n2-nf-sx harmonic 63.80 107.29 # SOURCE3 1 same_as_n2-ne-sx
angle_coeff @angle:n2-nf-sy harmonic 65.46 111.21 # SOURCE3 1 same_as_n2-ne-sy
angle_coeff @angle:nf-nf-o harmonic 72.28 110.45 # SOURCE3 10 same_as_ne-ne-o
angle_coeff @angle:nf-nf-p2 harmonic 85.32 114.39 # SOURCE3 6 same_as_ne-ne-p2
angle_coeff @angle:nf-nf-s harmonic 67.59 115.95 # SOURCE3 6 same_as_ne-ne-s
angle_coeff @angle:o-nf-o harmonic 76.91 124.09 # SOURCE3 2 same_as_o-ne-o
angle_coeff @angle:o-nf-pf harmonic 78.32 132.32 # SOURCE3 11 same_as_o-ne-pe
angle_coeff @angle:o-nf-px harmonic 86.11 110.62 # SOURCE3 1 same_as_o-ne-px
angle_coeff @angle:o-nf-py harmonic 90.01 110.79 # SOURCE3 4 same_as_o-ne-py
angle_coeff @angle:o-nf-s harmonic 71.99 117.19 # SOURCE3 2 same_as_o-ne-s
angle_coeff @angle:o-nf-sx harmonic 63.79 108.92 # SOURCE3 1 same_as_o-ne-sx
angle_coeff @angle:o-nf-sy harmonic 66.05 111.34 # SOURCE3 1 same_as_o-ne-sy
angle_coeff @angle:p2-nf-pf harmonic 104.56 116.81 # SOURCE3 1 same_as_p2-ne-pe
angle_coeff @angle:p2-nf-px harmonic 100.10 128.35 # SOURCE3 1 same_as_p2-ne-px
angle_coeff @angle:p2-nf-py harmonic 105.15 123.47 # SOURCE3 1 same_as_p2-ne-py
angle_coeff @angle:p2-nf-sx harmonic 80.48 112.12 # SOURCE3 1 same_as_p2-ne-sx
angle_coeff @angle:p2-nf-sy harmonic 81.80 115.73 # SOURCE3 1 same_as_p2-ne-sy
angle_coeff @angle:pf-nf-s harmonic 83.52 115.73 # SOURCE3 1 same_as_pe-ne-s
angle_coeff @angle:px-nf-s harmonic 78.54 131.84 # SOURCE3 1 same_as_px-ne-s
angle_coeff @angle:py-nf-s harmonic 86.30 116.18 # SOURCE3 4 same_as_py-ne-s
angle_coeff @angle:s-nf-s harmonic 68.65 120.87 # SOURCE3 1 same_as_s-ne-s
angle_coeff @angle:s-nf-sx harmonic 63.66 112.96 # SOURCE3 1 same_as_s-ne-sx
angle_coeff @angle:s-nf-sy harmonic 63.94 119.63 # SOURCE3 1 same_as_s-ne-sy
angle_coeff @angle:br-nh-br harmonic 67.09 106.27 # SOURCE3 1
angle_coeff @angle:br-nh-ca harmonic 62.04 111.88 # SOURCE3 1 0.0000
angle_coeff @angle:br-nh-hn harmonic 42.11 101.56 # SOURCE3 1 0.0000
angle_coeff @angle:c1-nh-c1 harmonic 68.33 116.98 # SOURCE3 1 0.0000
angle_coeff @angle:c1-nh-c2 harmonic 66.36 122.71 # SOURCE4 5 1.0077
angle_coeff @angle:c1-nh-ca harmonic 66.22 122.36 # SOURCE3 3 1.2016
angle_coeff @angle:c1-nh-hn harmonic 49.55 117.30 # SOURCE4 8 0.7120
angle_coeff @angle:c2-nh-c2 harmonic 65.54 124.50 # SOURCE4 43 1.7515
angle_coeff @angle:c2-nh-c3 harmonic 63.17 123.71 # SOURCE3 8 3.5348
angle_coeff @angle:c2-nh-ca harmonic 64.59 127.34 # SOURCE4 97 2.4321
angle_coeff @angle:c2-nh-cc harmonic 64.92 126.03 # CORR 11
angle_coeff @angle:c2-nh-cd harmonic 64.92 126.03 # CORR 11
angle_coeff @angle:c2-nh-cx harmonic 63.08 124.44 # SOURCE4 10 1.6817
angle_coeff @angle:c2-nh-hn harmonic 49.62 114.89 # SOURCE4 1000 1.4571
angle_coeff @angle:c2-nh-n2 harmonic 68.36 120.00 # SOURCE4 33 1.1823
angle_coeff @angle:c2-nh-n3 harmonic 67.57 116.98 # SOURCE4 14 1.4183
angle_coeff @angle:c2-nh-no harmonic 66.09 125.63 # SOURCE4 7 0.7554
angle_coeff @angle:c2-nh-oh harmonic 69.45 112.51 # SOURCE4 12 1.1687
angle_coeff @angle:c2-nh-os harmonic 69.27 112.93 # SOURCE4 6 0.3945
angle_coeff @angle:c2-nh-sy harmonic 61.76 121.13 # SOURCE4 10 0.5133
angle_coeff @angle:c3-nh-c3 harmonic 63.53 114.44 # SOURCE4 523 2.1428
angle_coeff @angle:c3-nh-ca harmonic 64.56 117.77 # SOURCE3 8 1.7521
angle_coeff @angle:c3-nh-cc harmonic 64.17 119.23 # CORR 163
angle_coeff @angle:c3-nh-cd harmonic 64.17 119.23 # CORR 163
angle_coeff @angle:c3-nh-cf harmonic 63.47 119.92 # SOURCE4 20 1.8571
angle_coeff @angle:c3-nh-cz harmonic 63.01 125.51 # SOURCE4 12 0.5177
angle_coeff @angle:c3-nh-hn harmonic 46.46 114.95 # SOURCE3 19 2.4787
angle_coeff @angle:c3-nh-n2 harmonic 67.89 112.35 # SOURCE3 9 4.0058
angle_coeff @angle:c3-nh-n harmonic 67.10 111.71 # SOURCE4 6 2.4251
angle_coeff @angle:c3-nh-na harmonic 66.92 112.43 # SOURCE4 8 1.4219
angle_coeff @angle:c3-nh-p2 harmonic 77.12 123.35 # SOURCE3 1 0.0000
angle_coeff @angle:c3-nh-sy harmonic 61.91 116.12 # SOURCE4 13 1.2830
angle_coeff @angle:ca-nh-ca harmonic 64.34 127.46 # SOURCE3 2 0.0002
angle_coeff @angle:ca-nh-cc harmonic 63.77 129.77 # CORR 38
angle_coeff @angle:ca-nh-cd harmonic 63.77 129.77 # CORR 38
angle_coeff @angle:ca-nh-cl harmonic 57.67 113.15 # SOURCE3 1 0.0000
angle_coeff @angle:ca-nh-cx harmonic 63.11 123.63 # SOURCE4 36 0.5899
angle_coeff @angle:ca-nh-f harmonic 67.90 106.09 # SOURCE3 3 1.0660
angle_coeff @angle:ca-nh-hn harmonic 49.08 116.13 # SOURCE4 1780 1.2853
angle_coeff @angle:ca-nh-i harmonic 55.55 117.83 # SOURCE3 1 0.0000
angle_coeff @angle:ca-nh-n1 harmonic 69.37 117.13 # HF/6-31G* 1
angle_coeff @angle:ca-nh-n2 harmonic 67.82 121.11 # SOURCE4 19 0.9700
angle_coeff @angle:ca-nh-n3 harmonic 68.18 114.21 # SOURCE3 6 2.2412
angle_coeff @angle:ca-nh-n4 harmonic 68.56 108.94 # SOURCE3 5 0.6562
angle_coeff @angle:ca-nh-n harmonic 68.07 116.15 # SOURCE4 12 0.8135
angle_coeff @angle:ca-nh-na harmonic 68.58 114.54 # SOURCE3 8 0.7807
angle_coeff @angle:ca-nh-nh harmonic 68.49 114.87 # SOURCE3 6 2.1432
angle_coeff @angle:ca-nh-no harmonic 69.19 113.92 # SOURCE3 4 2.9561
angle_coeff @angle:ca-nh-o harmonic 69.64 121.92 # SOURCE3 2 3.9630
angle_coeff @angle:ca-nh-oh harmonic 69.15 112.80 # SOURCE3 1 0.0000
angle_coeff @angle:ca-nh-os harmonic 69.93 110.17 # SOURCE3 3 0.6448
angle_coeff @angle:ca-nh-p2 harmonic 77.99 125.27 # SOURCE3 8 5.1798
angle_coeff @angle:ca-nh-p3 harmonic 76.07 125.70 # SOURCE3 3 5.7796
angle_coeff @angle:ca-nh-p4 harmonic 77.43 124.01 # SOURCE3 3 2.5810
angle_coeff @angle:ca-nh-p5 harmonic 78.16 125.61 # SOURCE3 3 0.5287
angle_coeff @angle:ca-nh-s4 harmonic 62.13 115.62 # SOURCE3 3 0.3434
angle_coeff @angle:ca-nh-s6 harmonic 61.56 123.53 # SOURCE4 33 2.0385
angle_coeff @angle:ca-nh-s harmonic 59.38 122.54 # SOURCE3 3 2.7001
angle_coeff @angle:ca-nh-sh harmonic 61.78 121.41 # SOURCE3 1 0.0000
angle_coeff @angle:ca-nh-ss harmonic 61.75 121.50 # SOURCE3 3 2.6255
angle_coeff @angle:ca-nh-sy harmonic 60.64 125.26 # SOURCE4 41 1.7517
angle_coeff @angle:cc-nh-cx harmonic 63.09 123.72 # CORR 58
angle_coeff @angle:cc-nh-hn harmonic 48.86 117.16 # SOURCE3 11 2.6137
angle_coeff @angle:cc-nh-n2 harmonic 68.23 119.66 # SOURCE4 5 1.3903
angle_coeff @angle:cc-nh-sy harmonic 61.22 122.91 # SOURCE4 23 1.2029
angle_coeff @angle:cd-nh-cx harmonic 63.09 123.72 # CORR 58
angle_coeff @angle:cd-nh-hn harmonic 48.86 117.16 # SOURCE3 11 2.6137
angle_coeff @angle:ce-nh-hn harmonic 48.38 115.62 # CORR 203
angle_coeff @angle:ce-nh-o harmonic 66.85 129.43 # CORR 2
angle_coeff @angle:ce-nh-sy harmonic 63.58 112.97 # SOURCE4 7 1.0636
angle_coeff @angle:cf-nh-hn harmonic 48.38 115.62 # CORR 203
angle_coeff @angle:cf-nh-o harmonic 66.85 129.43 # CORR 2
angle_coeff @angle:cl-nh-cl harmonic 54.43 106.60 # SOURCE3 1
angle_coeff @angle:cl-nh-hn harmonic 40.07 104.14 # SOURCE3 1 0.0000
angle_coeff @angle:cx-nh-cx harmonic 86.53 62.02 # SOURCE4 45 0.6189
angle_coeff @angle:cx-nh-hn harmonic 45.79 118.89 # SOURCE4 8 0.1391
angle_coeff @angle:cz-nh-hn harmonic 48.79 121.24 # SOURCE4 40 0.5682
angle_coeff @angle:f-nh-f harmonic 66.93 101.70 # SOURCE3 1 0.0000
angle_coeff @angle:f-nh-hn harmonic 49.80 101.23 # SOURCE3 1 0.0000
angle_coeff @angle:hn-nh-hn harmonic 40.05 114.85 # SOURCE4 1108 2.0811
angle_coeff @angle:hn-nh-i harmonic 36.55 107.57 # SOURCE3 1 0.0000
angle_coeff @angle:hn-nh-n1 harmonic 52.31 110.57 # HF/6-31G* 1
angle_coeff @angle:hn-nh-n2 harmonic 50.08 118.22 # SOURCE4 75 2.3319
angle_coeff @angle:hn-nh-n3 harmonic 50.05 109.12 # SOURCE3 5 2.3680
angle_coeff @angle:hn-nh-n4 harmonic 49.69 104.40 # SOURCE3 3 0.5056
angle_coeff @angle:hn-nh-n harmonic 50.89 107.96 # SOURCE4 16 1.2025
angle_coeff @angle:hn-nh-na harmonic 50.95 107.91 # SOURCE3 26 1.5528
angle_coeff @angle:hn-nh-nh harmonic 50.32 110.64 # SOURCE4 8 1.3390
angle_coeff @angle:hn-nh-no harmonic 50.99 109.93 # SOURCE4 7 0.2027
angle_coeff @angle:hn-nh-o harmonic 52.99 116.45 # SOURCE3 2 0.6063
angle_coeff @angle:hn-nh-oh harmonic 51.13 106.55 # SOURCE4 8 0.4590
angle_coeff @angle:hn-nh-os harmonic 51.51 104.76 # SOURCE3 3 0.4883
angle_coeff @angle:hn-nh-p2 harmonic 54.38 118.18 # SOURCE3 21 3.6927
angle_coeff @angle:hn-nh-p3 harmonic 53.06 116.19 # SOURCE3 3 3.0539
angle_coeff @angle:hn-nh-p4 harmonic 54.74 112.60 # SOURCE3 3 0.8237
angle_coeff @angle:hn-nh-p5 harmonic 55.35 115.26 # SOURCE3 3 0.9168
angle_coeff @angle:hn-nh-s4 harmonic 43.06 107.48 # SOURCE3 3 1.3960
angle_coeff @angle:hn-nh-s harmonic 40.81 114.37 # SOURCE3 1 0.0000
angle_coeff @angle:hn-nh-s6 harmonic 44.04 109.98 # SOURCE4 29 0.7478
angle_coeff @angle:hn-nh-sh harmonic 43.27 112.25 # SOURCE3 1 0.0000
angle_coeff @angle:hn-nh-ss harmonic 42.95 113.89 # SOURCE3 3 1.4030
angle_coeff @angle:hn-nh-sy harmonic 43.28 111.23 # SOURCE4 62 1.1413
angle_coeff @angle:i-nh-i harmonic 59.80 115.82 # SOURCE3 1
angle_coeff @angle:n1-nh-n1 harmonic 75.13 106.71 # HF/6-31G* 1
angle_coeff @angle:n2-nh-n2 harmonic 70.76 117.50 # SOURCE3 2 1.1907
angle_coeff @angle:n2-nh-n3 harmonic 69.63 115.54 # SOURCE3 1 0.0000
angle_coeff @angle:n2-nh-o harmonic 70.40 126.06 # SOURCE3 1 0.0000
angle_coeff @angle:n3-nh-n3 harmonic 69.52 110.98 # SOURCE3 1 0.0000
angle_coeff @angle:n4-nh-n4 harmonic 68.15 108.36 # SOURCE3 1 0.0000
angle_coeff @angle:na-nh-na harmonic 70.14 112.01 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-hn harmonic 39.73 117.85 # SOURCE3 15 2.3694
angle_coeff @angle:nh-nh-nh harmonic 70.07 112.23 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-i harmonic 36.08 117.24 # SOURCE3 2 0.4435
angle_coeff @angle:hn-n-n2 harmonic 49.62 118.33 # SOURCE3 5 2.2377
angle_coeff @angle:hn-n-n3 harmonic 48.69 117.22 # SOURCE4 37 1.3737
angle_coeff @angle:hn-n-n4 harmonic 48.90 112.68 # SOURCE3 3 1.9746
angle_coeff @angle:hn-n-n harmonic 50.14 113.12 # SOURCE3 7 3.2954
angle_coeff @angle:hn-n-na harmonic 50.40 113.55 # SOURCE3 8 1.9324
angle_coeff @angle:hn-n-nc harmonic 50.74 115.24 # SOURCE4 10 0.4966
angle_coeff @angle:hn-n-nh harmonic 49.74 113.13 # SOURCE4 12 1.2125
angle_coeff @angle:hn-n-no harmonic 48.71 110.11 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-o harmonic 53.83 116.32 # SOURCE3 2 0.0175
angle_coeff @angle:n-nh-o harmonic 72.07 115.63 # SOURCE3 1
angle_coeff @angle:hn-n-oh harmonic 50.33 110.71 # SOURCE4 46 1.1278
angle_coeff @angle:no-nh-no harmonic 72.07 108.55 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-os harmonic 50.52 109.82 # SOURCE4 12 0.6996
angle_coeff @angle:hn-n-p2 harmonic 52.51 118.05 # SOURCE3 7 3.0564
angle_coeff @angle:hn-n-p3 harmonic 50.93 119.63 # SOURCE3 2 0.0000
angle_coeff @angle:hn-n-p4 harmonic 53.00 115.71 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-p5 harmonic 54.50 113.20 # SOURCE4 6 1.0341
angle_coeff @angle:hn-n-s4 harmonic 41.18 112.46 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-s harmonic 41.14 114.92 # SOURCE3 2 0.0260
angle_coeff @angle:hn-n-s6 harmonic 43.06 112.18 # SOURCE4 6 0.6101
angle_coeff @angle:hn-n-sh harmonic 42.19 114.91 # SOURCE3 1 0.0000
angle_coeff @angle:hn-n-ss harmonic 42.36 115.60 # SOURCE3 3 0.6414
angle_coeff @angle:hn-n-sy harmonic 43.02 112.34 # SOURCE4 38 0.6039
angle_coeff @angle:oh-nh-oh harmonic 72.15 106.27 # SOURCE3 1
angle_coeff @angle:o-nh-o harmonic 72.24 128.06 # SOURCE3 1
angle_coeff @angle:os-nh-os harmonic 72.41 105.27 # SOURCE3 1
angle_coeff @angle:p2-nh-p2 harmonic 98.07 127.33 # SOURCE3 2 2.7857
angle_coeff @angle:p3-nh-p3 harmonic 96.03 125.08 # SOURCE3 1
angle_coeff @angle:p5-nh-p5 harmonic 104.72 112.76 # SOURCE3 1
angle_coeff @angle:s4-nh-s4 harmonic 62.56 112.39 # SOURCE3 1
angle_coeff @angle:s6-nh-s6 harmonic 62.35 120.27 # SOURCE3 1
angle_coeff @angle:sh-nh-sh harmonic 62.26 119.00 # SOURCE3 1
angle_coeff @angle:s-nh-s harmonic 59.67 118.73 # SOURCE3 1 0.0000
angle_coeff @angle:ss-nh-ss harmonic 62.19 119.25 # SOURCE3 1
angle_coeff @angle:i-n-i harmonic 60.66 118.20 # SOURCE3 1 0.0000
angle_coeff @angle:n2-n-n2 harmonic 70.16 116.89 # SOURCE3 1 0.0000
angle_coeff @angle:n3-n-n3 harmonic 68.02 117.94 # SOURCE3 1 0.0000
angle_coeff @angle:n4-n-n4 harmonic 68.42 112.69 # SOURCE3 1 0.0000
angle_coeff @angle:na-n-na harmonic 69.61 117.38 # SOURCE3 1 0.0000
angle_coeff @angle:nc-n-nc harmonic 71.04 116.41 # CORR 2
angle_coeff @angle:nc-n-p2 harmonic 80.69 117.21 # CORR 2
angle_coeff @angle:nc-n-pc harmonic 80.42 117.21 # CORR 2
angle_coeff @angle:nd-n-nd harmonic 71.04 116.41 # CORR 2
angle_coeff @angle:nd-n-p2 harmonic 80.69 117.21 # CORR 2
angle_coeff @angle:nd-n-pd harmonic 80.42 117.21 # CORR 2
angle_coeff @angle:nh-n-nh harmonic 69.10 115.18 # SOURCE3 1 0.0000
angle_coeff @angle:n-n-n harmonic 69.89 114.62 # SOURCE3 1 0.0000
angle_coeff @angle:no-n-no harmonic 68.52 108.66 # SOURCE3 1 0.0000
angle_coeff @angle:br-no-o harmonic 58.48 113.19 # SOURCE3 2 0.0000
angle_coeff @angle:c1-no-o harmonic 71.34 116.63 # SOURCE3 6 0.0000
angle_coeff @angle:c2-no-o harmonic 69.87 116.87 # SOURCE3 8 0.4200
angle_coeff @angle:c3-no-o harmonic 66.96 116.56 # SOURCE3 6 0.3959
angle_coeff @angle:ca-no-o harmonic 68.74 118.10 # SOURCE3 10 1.1524
angle_coeff @angle:cc-no-o harmonic 70.34 117.52 # SOURCE4 198 0.6255
angle_coeff @angle:cl-no-o harmonic 57.30 115.08 # SOURCE3 2 0.0000
angle_coeff @angle:c-no-o harmonic 67.10 115.26 # SOURCE3 1
angle_coeff @angle:hn-no-o harmonic 55.31 115.49 # SOURCE3 2 0.0000
angle_coeff @angle:oh-n-oh harmonic 72.05 107.26 # SOURCE3 1 0.0000
angle_coeff @angle:i-no-o harmonic 54.60 116.31 # SOURCE3 2 0.0000
angle_coeff @angle:n1-no-o harmonic 73.78 115.00 # HF/6-31G* 1
angle_coeff @angle:n2-no-o harmonic 65.79 115.10 # SOURCE2 2 2.4000
angle_coeff @angle:n3-no-o harmonic 72.01 115.56 # SOURCE3 6 0.6427
angle_coeff @angle:n4-no-o harmonic 72.87 109.00 # SOURCE3 2 0.0000
angle_coeff @angle:na-no-o harmonic 72.24 115.49 # SOURCE3 18 0.5640
angle_coeff @angle:nh-no-o harmonic 74.08 115.71 # SOURCE3 8 0.4811
angle_coeff @angle:n-no-o harmonic 71.67 115.41 # SOURCE3 8 0.3748
angle_coeff @angle:no-no-o harmonic 59.92 112.38 # SOURCE3 4 0.0000
angle_coeff @angle:o-n-o harmonic 73.39 128.61 # SOURCE3 3 1.0626
angle_coeff @angle:o-no-o harmonic 77.15 125.13 # SOURCE4 461 0.7605
angle_coeff @angle:o-no-oh harmonic 74.09 114.70 # SOURCE3 2 0.0000
angle_coeff @angle:o-no-os harmonic 73.71 114.01 # SOURCE3 8 0.9778
angle_coeff @angle:o-no-p2 harmonic 82.07 117.38 # SOURCE3 20 0.8083
angle_coeff @angle:o-no-p3 harmonic 77.73 116.78 # SOURCE3 6 0.4929
angle_coeff @angle:o-no-p4 harmonic 76.69 116.64 # SOURCE3 6 0.0089
angle_coeff @angle:o-no-p5 harmonic 78.18 116.69 # SOURCE3 8 0.4507
angle_coeff @angle:o-no-s4 harmonic 57.15 114.49 # SOURCE3 6 0.5674
angle_coeff @angle:o-no-s6 harmonic 57.79 114.39 # SOURCE3 6 0.8311
angle_coeff @angle:o-no-s harmonic 64.05 119.81 # SOURCE3 4 0.0042
angle_coeff @angle:o-no-sh harmonic 62.94 116.10 # SOURCE3 2 0.0000
angle_coeff @angle:o-no-ss harmonic 62.27 115.58 # SOURCE3 6 0.5860
angle_coeff @angle:os-n-os harmonic 72.28 106.53 # SOURCE3 1 0.0000
angle_coeff @angle:p2-n-p2 harmonic 98.03 119.62 # SOURCE3 1
angle_coeff @angle:p3-n-p3 harmonic 100.67 108.73 # SOURCE3 3 0.2591
angle_coeff @angle:p4-n-p4 harmonic 102.85 108.55 # SOURCE3 1
angle_coeff @angle:p5-n-p5 harmonic 108.79 99.99 # SOURCE3 1
angle_coeff @angle:pc-n-pc harmonic 97.64 119.62 # SOURCE3 1 0.0000
angle_coeff @angle:pd-n-pd harmonic 97.64 119.62 # SOURCE3 1 same_as_pc-n-pc
angle_coeff @angle:s4-n-s4 harmonic 61.03 113.75 # SOURCE3 1 0.0000
angle_coeff @angle:s6-n-s6 harmonic 61.82 119.68 # SOURCE3 1 0.0000
angle_coeff @angle:sh-n-sh harmonic 61.53 119.03 # SOURCE3 1 0.0000
angle_coeff @angle:s-n-s harmonic 58.48 126.00 # SOURCE3 1
angle_coeff @angle:ss-n-ss harmonic 62.06 118.49 # SOURCE3 1 0.0000
angle_coeff @angle:br-oh-ho harmonic 42.15 101.60 # SOURCE3 1 0.0000
angle_coeff @angle:c1-oh-ho harmonic 50.20 108.76 # SOURCE3 1 0.0000
angle_coeff @angle:c2-oh-ho harmonic 49.91 108.98 # SOURCE3 6 2.2379
angle_coeff @angle:c3-oh-ho harmonic 47.09 108.16 # SOURCE3 42 1.3034
angle_coeff @angle:ca-oh-ho harmonic 48.85 109.47 # SOURCE3 7 1.0405
angle_coeff @angle:cc-oh-ho harmonic 49.96 107.06 # CORR 117
angle_coeff @angle:cd-oh-ho harmonic 49.96 107.06 # CORR 117
angle_coeff @angle:ce-oh-ho harmonic 49.85 106.95 # CORR 34
angle_coeff @angle:cf-oh-ho harmonic 49.85 106.95 # CORR 34
angle_coeff @angle:c-oh-ho harmonic 51.19 107.37 # SOURCE3 34 1.6830
angle_coeff @angle:cl-oh-ho harmonic 40.51 102.40 # SOURCE2 1 0.0000
angle_coeff @angle:cx-oh-ho harmonic 49.64 106.17 # SOURCE3 3 0.0644
angle_coeff @angle:cy-oh-ho harmonic 47.62 107.32 # SOURCE4 5 0.4955
angle_coeff @angle:f-oh-ho harmonic 48.47 96.80 # SOURCE2 1 0.0000
angle_coeff @angle:ho-oh-ho harmonic 41.93 104.80 # SOURCE2 1 0.0000
angle_coeff @angle:ho-oh-i harmonic 35.67 107.98 # SOURCE3 2 0.0000
angle_coeff @angle:ho-oh-n1 harmonic 52.55 107.81 # HF/6-31G* 1
angle_coeff @angle:ho-oh-n2 harmonic 50.57 102.74 # SOURCE3 9 2.1286
angle_coeff @angle:ho-oh-n3 harmonic 50.61 102.33 # SOURCE3 5 1.2591
angle_coeff @angle:ho-oh-n4 harmonic 49.44 106.63 # SOURCE3 3 0.2770
angle_coeff @angle:ho-oh-n harmonic 50.46 101.03 # SOURCE3 6 1.4086
angle_coeff @angle:ho-oh-na harmonic 50.24 103.71 # SOURCE3 9 1.2590
angle_coeff @angle:ho-oh-nh harmonic 49.97 102.42 # SOURCE4 15 0.6819
angle_coeff @angle:ho-oh-no harmonic 50.31 102.17 # SOURCE3 1 0.0000
angle_coeff @angle:ho-oh-o harmonic 47.26 100.87 # SOURCE3 1
angle_coeff @angle:ho-oh-oh harmonic 49.34 98.72 # SOURCE3 2 0.0000
angle_coeff @angle:ho-oh-os harmonic 49.58 99.69 # SOURCE4 18 0.3384
angle_coeff @angle:ho-oh-p2 harmonic 55.87 109.45 # SOURCE3 8 3.3491
angle_coeff @angle:ho-oh-p3 harmonic 53.84 110.64 # SOURCE3 3 0.5191
angle_coeff @angle:ho-oh-p4 harmonic 55.27 110.19 # SOURCE3 4 0.2372
angle_coeff @angle:ho-oh-p5 harmonic 55.88 110.14 # SOURCE3 92 3.8033
angle_coeff @angle:ho-oh-py harmonic 56.18 110.73 # SOURCE3 79 1.7835
angle_coeff @angle:ho-oh-s4 harmonic 42.77 106.76 # SOURCE4 9 0.4035
angle_coeff @angle:ho-oh-s harmonic 40.86 100.15 # SOURCE3 2 0.0000
angle_coeff @angle:ho-oh-s6 harmonic 45.46 109.20 # SOURCE3 13 0.1856
angle_coeff @angle:ho-oh-sh harmonic 42.97 106.24 # SOURCE3 2 0.0661
angle_coeff @angle:ho-oh-ss harmonic 43.10 107.06 # SOURCE3 4 0.9967
angle_coeff @angle:ho-oh-sy harmonic 44.20 106.41 # SOURCE4 33 0.3729
angle_coeff @angle:br-os-br harmonic 65.08 110.63 # SOURCE3 1 0.0000
angle_coeff @angle:c1-os-c1 harmonic 66.99 115.02 # SOURCE3 1 0.0000
angle_coeff @angle:c1-os-c3 harmonic 64.47 113.39 # SOURCE3 1 0.0000
angle_coeff @angle:c2-os-c2 harmonic 65.95 113.14 # SOURCE3 6 2.1932
angle_coeff @angle:c2-os-c3 harmonic 64.21 112.09 # SOURCE3 7 4.1809
angle_coeff @angle:c2-os-ca harmonic 65.43 113.59 # SOURCE3 1 0.0000
angle_coeff @angle:c2-os-n2 harmonic 64.91 118.13 # SOURCE3 1 0.0000
angle_coeff @angle:c2-os-na harmonic 68.21 103.85 # SOURCE3 4 0.6297
angle_coeff @angle:c2-os-os harmonic 68.35 102.77 # SOURCE3 1 0.0000
angle_coeff @angle:c2-os-p5 harmonic 77.31 126.37 # SOURCE4 7 1.7939
angle_coeff @angle:c2-os-ss harmonic 63.08 108.13 # SOURCE3 1 0.0000
angle_coeff @angle:c3-os-c3 harmonic 62.39 112.45 # SOURCE4 1293 1.6468
angle_coeff @angle:c3-os-ca harmonic 62.27 117.97 # SOURCE4 2495 1.4576
angle_coeff @angle:c3-os-cc harmonic 62.50 117.33 # CORR 248
angle_coeff @angle:c3-os-cd harmonic 62.50 117.33 # CORR 248
angle_coeff @angle:c3-os-ce harmonic 62.79 116.05 # CORR 37
angle_coeff @angle:c3-os-cf harmonic 62.79 116.05 # CORR 37
angle_coeff @angle:c3-os-cl harmonic 56.20 110.50 # SOURCE2 1 0.0000
angle_coeff @angle:c3-os-cy harmonic 61.67 115.65 # SOURCE4 5 0.2390
angle_coeff @angle:c3-os-i harmonic 54.88 113.70 # SOURCE3 1 0.0000
angle_coeff @angle:c3-os-n1 harmonic 66.31 113.50 # HF/6-31G* 1
angle_coeff @angle:c3-os-n2 harmonic 65.92 108.12 # SOURCE3 7 0.3048
angle_coeff @angle:c3-os-n3 harmonic 64.52 110.28 # SOURCE4 14 1.9026
angle_coeff @angle:c3-os-n4 harmonic 64.88 110.50 # SOURCE3 3 0.5426
angle_coeff @angle:c3-os-n harmonic 65.40 109.52 # SOURCE4 14 0.6827
angle_coeff @angle:c3-os-na harmonic 64.54 109.91 # SOURCE3 9 1.8268
angle_coeff @angle:c3-os-nc harmonic 64.80 112.73 # SOURCE3 2 1.0358
angle_coeff @angle:c3-os-nd harmonic 64.80 112.73 # SOURCE3 2 same_as_c3-os-nc
angle_coeff @angle:c3-os-nh harmonic 65.22 109.69 # SOURCE4 8 0.1662
angle_coeff @angle:c3-os-no harmonic 63.89 113.80 # SOURCE4 42 0.2726
angle_coeff @angle:c3-os-o harmonic 65.62 103.00 # SOURCE3 1 0.0000
angle_coeff @angle:c3-os-oh harmonic 65.24 107.97 # SOURCE4 11 0.4333
angle_coeff @angle:c3-os-os harmonic 65.89 105.01 # SOURCE3 7 0.6328
angle_coeff @angle:c3-os-p2 harmonic 80.24 115.47 # SOURCE3 8 2.6374
angle_coeff @angle:c3-os-p3 harmonic 76.51 115.97 # SOURCE3 3 0.3597
angle_coeff @angle:c3-os-p4 harmonic 77.59 117.48 # SOURCE3 4 0.3850
angle_coeff @angle:c3-os-p5 harmonic 78.48 118.00 # SOURCE3 31 1.2882
angle_coeff @angle:c3-os-py harmonic 78.07 117.80 # SOURCE3 16 0.9654
angle_coeff @angle:c3-os-s4 harmonic 61.32 111.50 # SOURCE3 6 1.4240
angle_coeff @angle:c3-os-s6 harmonic 63.21 115.79 # SOURCE4 60 1.2588
angle_coeff @angle:c3-os-s harmonic 59.28 109.55 # SOURCE3 1 0.0000
angle_coeff @angle:c3-os-sh harmonic 61.67 112.82 # SOURCE3 1 0.0000
angle_coeff @angle:c3-os-ss harmonic 60.74 113.19 # SOURCE3 3 0.2455
angle_coeff @angle:ca-os-ca harmonic 63.31 119.95 # SOURCE4 107 1.6535
angle_coeff @angle:ca-os-cc harmonic 67.21 106.65 # CORR 62
angle_coeff @angle:ca-os-cd harmonic 67.21 106.65 # CORR 62
angle_coeff @angle:ca-os-n3 harmonic 65.39 112.19 # SOURCE3 1 0.0000
angle_coeff @angle:ca-os-na harmonic 66.47 108.24 # SOURCE3 1 0.0000
angle_coeff @angle:ca-os-nc harmonic 66.09 113.68 # SOURCE3 2
angle_coeff @angle:ca-os-nd harmonic 66.09 113.68 # SOURCE3 2
angle_coeff @angle:ca-os-p5 harmonic 77.96 123.42 # SOURCE4 54 1.1358
angle_coeff @angle:ca-os-s6 harmonic 63.95 116.97 # SOURCE4 15 0.9514
angle_coeff @angle:c-os-c2 harmonic 64.91 118.02 # SOURCE4 7 0.3666
angle_coeff @angle:c-os-c3 harmonic 63.63 115.14 # SOURCE3 17 1.8967
angle_coeff @angle:c-os-c harmonic 64.54 120.64 # SOURCE4 7 1.5114
angle_coeff @angle:c-os-ca harmonic 63.75 120.87 # SOURCE4 257 1.7209
angle_coeff @angle:c-os-cc harmonic 64.15 119.62 # SOURCE3 5 6.0675
angle_coeff @angle:cc-os-cc harmonic 67.27 106.69 # CORR 252
angle_coeff @angle:cc-os-cd harmonic 63.80 118.62 # SOURCE4 14 1.9764
angle_coeff @angle:c-os-cd harmonic 64.15 119.62 # SOURCE3 5 6.0675
angle_coeff @angle:cc-os-na harmonic 65.51 111.66 # SOURCE3 28 4.1343
angle_coeff @angle:cc-os-nc harmonic 68.12 107.23 # SOURCE3 6 2.7507
angle_coeff @angle:cc-os-os harmonic 66.27 108.47 # SOURCE3 2 0.0000
angle_coeff @angle:cc-os-ss harmonic 59.85 119.59 # SOURCE3 1 0.0000
angle_coeff @angle:c-os-cy harmonic 71.75 91.10 # SOURCE3 2 0.0155
angle_coeff @angle:cd-os-cd harmonic 67.27 106.69 # CORR 252
angle_coeff @angle:cd-os-na harmonic 65.51 111.66 # SOURCE3 28 4.1343
angle_coeff @angle:cd-os-nd harmonic 68.12 107.23 # SOURCE3 6 2.7507
angle_coeff @angle:cd-os-os harmonic 66.27 108.47 # SOURCE3 2 same_as_cc-os-os
angle_coeff @angle:cd-os-ss harmonic 59.85 119.59 # SOURCE3 1 same_as_cc-os-ss
angle_coeff @angle:cl-os-cl harmonic 52.29 110.76 # SOURCE3 2 0.0000
angle_coeff @angle:c-os-n2 harmonic 66.95 112.08 # SOURCE4 6 0.1154
angle_coeff @angle:c-os-n harmonic 66.83 112.10 # SOURCE4 6 0.6163
angle_coeff @angle:c-os-oh harmonic 66.50 110.50 # SOURCE3 1 0.0000
angle_coeff @angle:c-os-os harmonic 66.25 110.28 # SOURCE4 10 1.3612
angle_coeff @angle:c-os-p5 harmonic 78.89 122.10 # SOURCE4 5 0.5870
angle_coeff @angle:c-os-sy harmonic 61.85 113.49 # SOURCE3 1 0.0000
angle_coeff @angle:cx-os-cx harmonic 85.27 61.82 # SOURCE4 107 0.1793
angle_coeff @angle:cx-os-n harmonic 88.98 59.99 # SOURCE3 1 0.0000
angle_coeff @angle:cx-os-os harmonic 90.38 56.52 # SOURCE3 2 0.0000
angle_coeff @angle:cy-os-cy harmonic 68.81 93.40 # SOURCE2 2 1.4000
angle_coeff @angle:f-os-f harmonic 63.94 103.30 # SOURCE2 1 0.0000
angle_coeff @angle:f-os-os harmonic 63.94 109.50 # SOURCE2 1 0.0000
angle_coeff @angle:i-os-i harmonic 58.06 115.67 # SOURCE3 1 0.0000
angle_coeff @angle:n1-os-n1 harmonic 70.28 117.79 # HF/6-31G* 1
angle_coeff @angle:n2-os-n2 harmonic 68.76 106.83 # SOURCE3 1 0.0000
angle_coeff @angle:n2-os-s6 harmonic 66.63 111.30 # SOURCE4 7 0.5651
angle_coeff @angle:n3-os-n3 harmonic 67.76 104.88 # SOURCE3 1 0.0000
angle_coeff @angle:n4-os-n4 harmonic 65.66 114.68 # SOURCE3 1 0.0000
angle_coeff @angle:na-os-na harmonic 66.10 109.59 # SOURCE3 1 0.0000
angle_coeff @angle:na-os-ss harmonic 64.75 104.34 # SOURCE3 1 0.0000
angle_coeff @angle:nc-os-nc harmonic 68.17 110.40 # SOURCE2 1 0.0000
angle_coeff @angle:nc-os-ss harmonic 63.38 110.97 # SOURCE3 1 0.0000
angle_coeff @angle:nd-os-nd harmonic 68.17 110.40 # SOURCE2 1 same_as_nc-os-nc
angle_coeff @angle:nd-os-ss harmonic 63.38 110.97 # SOURCE3 1 same_as_nc-os-ss
angle_coeff @angle:nh-os-nh harmonic 67.81 108.29 # SOURCE3 1 0.0000
angle_coeff @angle:n-os-n harmonic 68.08 108.31 # SOURCE3 1 0.0000
angle_coeff @angle:no-os-no harmonic 66.40 111.86 # SOURCE3 1 0.0000
angle_coeff @angle:n-os-s6 harmonic 65.87 113.62 # SOURCE4 5 0.0928
angle_coeff @angle:o-os-o harmonic 62.76 114.68 # SOURCE3 1 0.0000
angle_coeff @angle:p2-os-p2 harmonic 103.59 120.02 # SOURCE3 1 0.0000
angle_coeff @angle:p2-os-p5 harmonic 108.26 107.86 # SOURCE3 1 0.0000
angle_coeff @angle:p3-os-p3 harmonic 96.17 121.22 # SOURCE3 1 0.0000
angle_coeff @angle:p3-os-py harmonic 105.11 105.58 # SOURCE3 1 0.0000
angle_coeff @angle:p5-os-p5 harmonic 99.18 126.25 # SOURCE3 1 0.0000
angle_coeff @angle:s4-os-s4 harmonic 62.09 111.63 # SOURCE3 1 0.0000
angle_coeff @angle:s6-os-s6 harmonic 64.77 119.07 # SOURCE3 2 0.4318
angle_coeff @angle:sh-os-sh harmonic 61.15 118.95 # SOURCE3 1 0.0000
angle_coeff @angle:s-os-s harmonic 56.98 118.08 # SOURCE3 1 0.0000
angle_coeff @angle:ss-os-ss harmonic 60.82 115.64 # SOURCE3 1 0.0000
angle_coeff @angle:br-p2-br harmonic 40.68 108.60 # SOURCE3 1
angle_coeff @angle:br-p2-c2 harmonic 39.43 102.32 # SOURCE3 2 0.0146
angle_coeff @angle:br-p2-n2 harmonic 40.42 103.33 # SOURCE3 1 0.0000
angle_coeff @angle:br-p2-o harmonic 39.43 110.87 # SOURCE3 1 0.0000
angle_coeff @angle:br-p2-p2 harmonic 50.16 115.46 # SOURCE3 4 7.8622
angle_coeff @angle:br-p2-s harmonic 40.59 110.52 # SOURCE3 1 0.0000
angle_coeff @angle:c1-p2-c1 harmonic 39.20 99.04 # SOURCE3 1
angle_coeff @angle:c1-p2-c2 harmonic 39.82 101.29 # SOURCE3 1
angle_coeff @angle:c1-p2-n2 harmonic 41.36 101.79 # SOURCE3 1
angle_coeff @angle:c1-p2-o harmonic 41.32 107.62 # SOURCE3 1
angle_coeff @angle:c1-p2-p2 harmonic 53.31 99.54 # SOURCE3 1
angle_coeff @angle:c1-p2-s harmonic 41.00 105.90 # SOURCE3 1
angle_coeff @angle:c2-p2-c2 harmonic 40.45 104.50 # SOURCE3 1
angle_coeff @angle:c2-p2-c3 harmonic 38.60 101.90 # SOURCE3 4 0.1132
angle_coeff @angle:c2-p2-ca harmonic 38.79 101.95 # SOURCE3 1
angle_coeff @angle:c2-p2-cl harmonic 35.61 102.72 # SOURCE3 2 0.0000
angle_coeff @angle:c2-p2-f harmonic 41.60 103.47 # SOURCE3 2 0.0136
angle_coeff @angle:c2-p2-hp harmonic 30.13 97.19 # SOURCE3 3 0.0216
angle_coeff @angle:c2-p2-i harmonic 33.85 101.94 # SOURCE3 2 0.0368
angle_coeff @angle:c2-p2-n2 harmonic 43.20 99.88 # SOURCE3 1
angle_coeff @angle:c2-p2-n3 harmonic 41.99 101.80 # SOURCE3 1
angle_coeff @angle:c2-p2-n4 harmonic 39.07 98.26 # SOURCE3 6 0.1522
angle_coeff @angle:c2-p2-n harmonic 40.89 103.28 # SOURCE3 4 3.3113
angle_coeff @angle:c2-p2-na harmonic 40.54 103.99 # SOURCE3 8 1.6834
angle_coeff @angle:c2-p2-nh harmonic 41.20 105.17 # SOURCE3 8 0.8263
angle_coeff @angle:c2-p2-no harmonic 41.91 97.97 # SOURCE3 3 0.4175
angle_coeff @angle:c2-p2-o harmonic 41.51 115.16 # SOURCE3 1
angle_coeff @angle:c2-p2-oh harmonic 42.50 102.89 # SOURCE3 3 0.8191
angle_coeff @angle:c2-p2-os harmonic 43.35 102.12 # SOURCE3 4 0.8783
angle_coeff @angle:c2-p2-p2 harmonic 54.72 99.56 # SOURCE3 1
angle_coeff @angle:c2-p2-p3 harmonic 48.11 99.27 # SOURCE3 4 1.1590
angle_coeff @angle:c2-p2-p4 harmonic 48.19 96.94 # SOURCE3 1
angle_coeff @angle:c2-p2-p5 harmonic 48.01 97.61 # SOURCE3 1
angle_coeff @angle:c2-p2-s4 harmonic 38.27 95.15 # SOURCE3 1
angle_coeff @angle:c2-p2-s6 harmonic 38.35 95.51 # SOURCE3 1
angle_coeff @angle:c2-p2-s harmonic 42.19 105.53 # SOURCE3 1
angle_coeff @angle:c2-p2-sh harmonic 40.19 101.49 # SOURCE3 3 0.0057
angle_coeff @angle:c2-p2-ss harmonic 40.19 101.81 # SOURCE3 4 0.5883
angle_coeff @angle:c3-p2-c3 harmonic 37.36 99.30 # SOURCE3 1
angle_coeff @angle:c3-p2-n2 harmonic 40.30 100.82 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p2-o harmonic 40.10 106.72 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p2-os harmonic 40.68 101.34 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p2-p2 harmonic 51.78 100.48 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p2-s harmonic 40.04 105.68 # SOURCE3 1 0.0000
angle_coeff @angle:ca-p2-ca harmonic 37.59 99.70 # SOURCE3 1
angle_coeff @angle:ca-p2-n2 harmonic 40.53 100.82 # SOURCE3 1
angle_coeff @angle:ca-p2-n harmonic 41.68 89.97 # SOURCE3 1
angle_coeff @angle:ca-p2-na harmonic 41.69 89.21 # SOURCE3 1
angle_coeff @angle:ca-p2-o harmonic 40.31 106.88 # SOURCE3 1
angle_coeff @angle:ca-p2-s harmonic 39.79 107.93 # SOURCE3 1
angle_coeff @angle:c-p2-c2 harmonic 38.89 97.30 # SOURCE3 1
angle_coeff @angle:c-p2-c harmonic 38.29 90.10 # SOURCE3 1
angle_coeff @angle:ce-p2-o harmonic 40.63 107.44 # SOURCE3 1
angle_coeff @angle:ce-p2-s harmonic 40.55 105.54 # SOURCE3 1
angle_coeff @angle:cf-p2-o harmonic 40.63 107.44 # SOURCE3 1 same_as_ce-p2-o
angle_coeff @angle:cf-p2-s harmonic 40.55 105.54 # SOURCE3 1 same_as_ce-p2-s
angle_coeff @angle:cl-p2-cl harmonic 32.00 108.70 # SOURCE3 1
angle_coeff @angle:cl-p2-n2 harmonic 36.67 103.38 # SOURCE3 1 0.0000
angle_coeff @angle:cl-p2-o harmonic 36.00 110.57 # SOURCE3 1 0.0000
angle_coeff @angle:cl-p2-p2 harmonic 47.78 103.11 # SOURCE3 1 0.0000
angle_coeff @angle:cl-p2-s harmonic 36.62 110.11 # SOURCE3 1 0.0000
angle_coeff @angle:f-p2-f harmonic 42.20 107.10 # SOURCE3 1
angle_coeff @angle:f-p2-n2 harmonic 43.59 103.57 # SOURCE3 1 0.0000
angle_coeff @angle:f-p2-o harmonic 43.81 110.61 # SOURCE3 1 0.0000
angle_coeff @angle:f-p2-p2 harmonic 54.54 103.48 # SOURCE3 1 0.0000
angle_coeff @angle:f-p2-s harmonic 41.15 114.71 # SOURCE3 2 5.2794
angle_coeff @angle:hp-p2-hp harmonic 22.84 98.76 # SOURCE3 1
angle_coeff @angle:hp-p2-n1 harmonic 31.08 95.18 # SOURCE3 2 1.5708
angle_coeff @angle:hp-p2-n2 harmonic 32.08 95.54 # SOURCE3 19 4.7352
angle_coeff @angle:hp-p2-ne harmonic 31.94 100.10 # SOURCE3 14 6.1290
angle_coeff @angle:hp-p2-nf harmonic 31.94 100.10 # SOURCE3 14 same_as_hp-p2-ne
angle_coeff @angle:hp-p2-o harmonic 32.04 105.58 # SOURCE3 1 0.0000
angle_coeff @angle:hp-p2-p2 harmonic 38.16 101.88 # SOURCE3 27 12.9535
angle_coeff @angle:hp-p2-p4 harmonic 32.69 94.51 # SOURCE3 1 0.0000
angle_coeff @angle:hp-p2-p5 harmonic 33.66 89.07 # SOURCE3 1 0.0000
angle_coeff @angle:hp-p2-pe harmonic 37.56 97.25 # SOURCE3 16 8.8916
angle_coeff @angle:hp-p2-pf harmonic 37.56 97.25 # SOURCE3 16 same_as_hp-p2-pe
angle_coeff @angle:hp-p2-s4 harmonic 26.33 89.99 # SOURCE3 1 0.0000
angle_coeff @angle:hp-p2-s harmonic 30.26 102.52 # SOURCE3 1 0.0000
angle_coeff @angle:hp-p2-s6 harmonic 26.74 88.13 # SOURCE3 1 0.0000
angle_coeff @angle:i-p2-i harmonic 35.75 104.16 # SOURCE3 1
angle_coeff @angle:i-p2-n2 harmonic 34.63 101.77 # SOURCE3 1 0.0000
angle_coeff @angle:i-p2-o harmonic 33.34 109.51 # SOURCE3 1 0.0000
angle_coeff @angle:i-p2-p2 harmonic 46.22 102.63 # SOURCE3 1 0.0000
angle_coeff @angle:i-p2-s harmonic 35.18 110.60 # SOURCE3 1 0.0000
angle_coeff @angle:n1-p2-n1 harmonic 46.52 86.22 # HF/6-31G* 1
angle_coeff @angle:n2-p2-n2 harmonic 45.62 98.00 # SOURCE3 1
angle_coeff @angle:n2-p2-n3 harmonic 44.14 100.42 # SOURCE3 1
angle_coeff @angle:n2-p2-n4 harmonic 41.53 93.42 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-na harmonic 42.63 102.03 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-nh harmonic 43.69 101.87 # SOURCE3 2 0.8491
angle_coeff @angle:n2-p2-no harmonic 43.64 98.12 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-o harmonic 43.53 115.34 # SOURCE3 1
angle_coeff @angle:n2-p2-oh harmonic 43.02 109.72 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-os harmonic 45.35 102.29 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-p3 harmonic 49.55 99.51 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-p4 harmonic 48.48 101.73 # SOURCE3 1
angle_coeff @angle:n2-p2-p5 harmonic 50.50 93.68 # SOURCE3 1
angle_coeff @angle:n2-p2-s4 harmonic 38.89 97.83 # SOURCE3 1
angle_coeff @angle:n2-p2-s6 harmonic 38.99 98.14 # SOURCE3 1
angle_coeff @angle:n2-p2-s harmonic 42.45 112.94 # SOURCE3 1
angle_coeff @angle:n2-p2-sh harmonic 41.75 100.82 # SOURCE3 1 0.0000
angle_coeff @angle:n2-p2-ss harmonic 41.64 101.76 # SOURCE3 1 0.0000
angle_coeff @angle:n3-p2-n3 harmonic 42.10 106.30 # SOURCE3 1
angle_coeff @angle:n3-p2-o harmonic 44.16 106.83 # SOURCE3 1
angle_coeff @angle:n3-p2-p2 harmonic 55.78 100.58 # SOURCE3 1
angle_coeff @angle:n3-p2-s harmonic 43.18 105.75 # SOURCE3 1
angle_coeff @angle:n4-p2-n4 harmonic 39.61 88.80 # SOURCE3 1
angle_coeff @angle:n4-p2-o harmonic 40.67 101.36 # SOURCE3 1 0.0000
angle_coeff @angle:n4-p2-p2 harmonic 52.72 96.53 # SOURCE3 1 0.0000
angle_coeff @angle:n4-p2-s harmonic 40.06 104.98 # SOURCE3 1 0.0000
angle_coeff @angle:na-p2-na harmonic 40.23 106.10 # SOURCE3 1
angle_coeff @angle:na-p2-o harmonic 42.71 107.46 # SOURCE3 1 0.0000
angle_coeff @angle:na-p2-s harmonic 41.81 108.15 # SOURCE3 1 0.0000
angle_coeff @angle:ne-p2-o harmonic 45.72 107.71 # SOURCE3 1
angle_coeff @angle:ne-p2-s harmonic 44.34 105.50 # SOURCE3 1
angle_coeff @angle:nf-p2-o harmonic 45.72 107.71 # SOURCE3 1 same_as_ne-p2-o
angle_coeff @angle:nf-p2-s harmonic 44.34 105.50 # SOURCE3 1 same_as_ne-p2-s
angle_coeff @angle:nh-p2-nh harmonic 42.33 104.00 # SOURCE3 1
angle_coeff @angle:nh-p2-o harmonic 43.75 108.11 # SOURCE3 2 0.6773
angle_coeff @angle:nh-p2-p2 harmonic 53.77 107.73 # SOURCE3 3 3.1678
angle_coeff @angle:nh-p2-s harmonic 42.31 109.62 # SOURCE3 2 1.7725
angle_coeff @angle:n-p2-n2 harmonic 43.55 98.85 # SOURCE3 1 0.0000
angle_coeff @angle:n-p2-o harmonic 43.46 105.08 # SOURCE3 1 0.0000
angle_coeff @angle:no-p2-no harmonic 42.08 98.20 # SOURCE3 1
angle_coeff @angle:no-p2-o harmonic 43.42 104.87 # SOURCE3 1 0.0000
angle_coeff @angle:no-p2-p2 harmonic 52.75 108.57 # SOURCE3 3 8.2121
angle_coeff @angle:no-p2-s harmonic 41.76 109.06 # SOURCE3 2 5.4074
angle_coeff @angle:n-p2-p2 harmonic 54.46 102.12 # SOURCE3 1 0.0000
angle_coeff @angle:n-p2-s harmonic 41.20 112.34 # SOURCE3 1 0.0000
angle_coeff @angle:oh-p2-oh harmonic 44.96 100.10 # SOURCE3 1
angle_coeff @angle:oh-p2-p2 harmonic 54.71 107.82 # SOURCE3 2 2.6708
angle_coeff @angle:oh-p2-s harmonic 43.05 109.75 # SOURCE3 1 0.0000
angle_coeff @angle:o-p2-o harmonic 44.39 119.96 # SOURCE3 1
angle_coeff @angle:o-p2-oh harmonic 44.33 110.46 # SOURCE3 1 0.0000
angle_coeff @angle:o-p2-os harmonic 45.59 108.81 # SOURCE3 1 0.0000
angle_coeff @angle:o-p2-p2 harmonic 54.57 114.23 # SOURCE3 1
angle_coeff @angle:o-p2-p3 harmonic 48.45 106.69 # SOURCE3 1 0.0000
angle_coeff @angle:o-p2-p4 harmonic 48.42 104.37 # SOURCE3 1
angle_coeff @angle:o-p2-p5 harmonic 48.37 104.49 # SOURCE3 1
angle_coeff @angle:o-p2-pe harmonic 46.73 145.96 # SOURCE3 1
angle_coeff @angle:o-p2-pf harmonic 46.73 145.96 # SOURCE3 1 same_as_o-p2-pe
angle_coeff @angle:o-p2-s4 harmonic 37.68 106.59 # SOURCE3 1
angle_coeff @angle:o-p2-s6 harmonic 38.12 105.04 # SOURCE3 1
angle_coeff @angle:o-p2-s harmonic 42.77 117.42 # SOURCE3 1
angle_coeff @angle:o-p2-sh harmonic 40.81 109.60 # SOURCE3 1 0.0000
angle_coeff @angle:os-p2-os harmonic 47.01 98.30 # SOURCE3 1
angle_coeff @angle:os-p2-p2 harmonic 57.14 101.46 # SOURCE3 1 0.0000
angle_coeff @angle:o-p2-ss harmonic 40.89 109.60 # SOURCE3 1 0.0000
angle_coeff @angle:os-p2-s harmonic 43.89 108.47 # SOURCE3 3 1.7065
angle_coeff @angle:p2-p2-n2 harmonic 57.57 97.40 # SOURCE3 1
angle_coeff @angle:p2-p2-p3 harmonic 64.09 101.73 # SOURCE3 1 0.0000
angle_coeff @angle:p2-p2-p4 harmonic 63.42 101.98 # SOURCE3 1
angle_coeff @angle:p2-p2-p5 harmonic 64.24 99.33 # SOURCE3 1
angle_coeff @angle:p2-p2-s4 harmonic 51.53 95.73 # SOURCE3 1
angle_coeff @angle:p2-p2-s6 harmonic 51.64 95.95 # SOURCE3 1
angle_coeff @angle:p2-p2-s harmonic 54.52 111.28 # SOURCE3 1
angle_coeff @angle:p2-p2-sh harmonic 50.78 113.94 # SOURCE3 3 8.5009
angle_coeff @angle:p3-p2-p3 harmonic 59.88 101.00 # SOURCE3 1
angle_coeff @angle:p3-p2-s harmonic 48.09 113.28 # SOURCE3 2 6.7035
angle_coeff @angle:p4-p2-s harmonic 49.75 103.89 # SOURCE3 1
angle_coeff @angle:p5-p2-p5 harmonic 62.82 89.40 # SOURCE3 1
angle_coeff @angle:p5-p2-s harmonic 50.38 101.21 # SOURCE3 1
angle_coeff @angle:pe-p2-s harmonic 54.45 106.35 # SOURCE3 1
angle_coeff @angle:pf-p2-s harmonic 54.45 106.35 # SOURCE3 1 same_as_pe-p2-s
angle_coeff @angle:s4-p2-s4 harmonic 39.97 85.30 # SOURCE3 1
angle_coeff @angle:s6-p2-s6 harmonic 37.42 98.20 # SOURCE3 1
angle_coeff @angle:sh-p2-sh harmonic 41.33 98.50 # SOURCE3 1
angle_coeff @angle:s-p2-s harmonic 44.19 106.60 # SOURCE3 1
angle_coeff @angle:s-p2-s4 harmonic 38.90 105.29 # SOURCE3 1
angle_coeff @angle:s-p2-s6 harmonic 38.73 106.93 # SOURCE3 1
angle_coeff @angle:s-p2-sh harmonic 40.82 110.73 # SOURCE3 2 0.0232
angle_coeff @angle:s-p2-ss harmonic 40.27 114.14 # SOURCE3 4 5.9223
angle_coeff @angle:ss-p2-ss harmonic 41.56 97.90 # SOURCE3 1
angle_coeff @angle:br-p3-br harmonic 41.27 103.54 # SOURCE3 1 0.0000
angle_coeff @angle:br-p3-hp harmonic 26.94 96.36 # SOURCE3 4 0.6701
angle_coeff @angle:c1-p3-c1 harmonic 38.48 100.50 # SOURCE3 1 0.0000
angle_coeff @angle:c1-p3-f harmonic 40.73 96.90 # SOURCE2 1 0.0000
angle_coeff @angle:c1-p3-hp harmonic 28.14 97.67 # SOURCE3 2 0.0000
angle_coeff @angle:c2-p3-c2 harmonic 37.32 101.77 # SOURCE3 3 0.0000
angle_coeff @angle:c2-p3-hp harmonic 27.57 97.85 # SOURCE3 4 0.0000
angle_coeff @angle:c3-p3-c3 harmonic 37.51 99.66 # SOURCE3 40 0.9854
angle_coeff @angle:c3-p3-ca harmonic 37.29 101.94 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-cl harmonic 35.74 99.89 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p3-f harmonic 39.74 97.80 # SOURCE2 1 0.0000
angle_coeff @angle:c3-p3-hp harmonic 27.47 97.66 # SOURCE3 9 0.4096
angle_coeff @angle:c3-p3-n2 harmonic 39.87 96.55 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-n3 harmonic 39.28 101.18 # SOURCE3 10 2.2338
angle_coeff @angle:c3-p3-n4 harmonic 38.58 96.94 # SOURCE3 6 0.4815
angle_coeff @angle:c3-p3-n harmonic 38.78 101.77 # SOURCE3 12 2.4449
angle_coeff @angle:c3-p3-na harmonic 39.16 100.17 # SOURCE3 4 0.0554
angle_coeff @angle:c3-p3-nh harmonic 38.65 104.50 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-no harmonic 38.96 96.98 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-o harmonic 39.33 111.67 # SOURCE3 28 5.3387
angle_coeff @angle:c3-p3-oh harmonic 40.60 98.21 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-os harmonic 40.25 99.53 # SOURCE3 3 1.7678
angle_coeff @angle:c3-p3-p3 harmonic 45.77 100.31 # SOURCE3 18 2.1836
angle_coeff @angle:c3-p3-p5 harmonic 45.65 100.90 # SOURCE3 10 2.7070
angle_coeff @angle:c3-p3-s4 harmonic 37.94 98.88 # SOURCE3 8 6.2235
angle_coeff @angle:c3-p3-s6 harmonic 37.62 101.18 # SOURCE3 12 6.4536
angle_coeff @angle:c3-p3-sh harmonic 37.43 98.71 # SOURCE3 2 0.0000
angle_coeff @angle:c3-p3-ss harmonic 37.44 99.37 # SOURCE3 2 0.0000
angle_coeff @angle:ca-p3-ca harmonic 37.89 99.86 # SOURCE3 1 0.0000
angle_coeff @angle:ca-p3-hp harmonic 27.74 97.50 # SOURCE3 2 0.0000
angle_coeff @angle:c-p3-c3 harmonic 37.60 97.06 # SOURCE3 3 1.1490
angle_coeff @angle:c-p3-c harmonic 36.51 100.90 # SOURCE3 1 0.0000
angle_coeff @angle:c-p3-hp harmonic 27.15 96.55 # SOURCE3 6 0.5223
angle_coeff @angle:cl-p3-cl harmonic 33.91 102.82 # SOURCE3 1 0.0000
angle_coeff @angle:cl-p3-f harmonic 37.03 99.20 # SOURCE2 1 0.0000
angle_coeff @angle:cl-p3-hp harmonic 25.67 96.30 # SOURCE3 3 0.6203
angle_coeff @angle:c-p3-os harmonic 43.95 81.32 # SOURCE3 1 0.0000
angle_coeff @angle:cx-p3-hp harmonic 27.54 95.20 # SOURCE2 1 0.0000
angle_coeff @angle:f-p3-f harmonic 43.08 97.40 # SOURCE2 8 1.6636
angle_coeff @angle:f-p3-hp harmonic 30.56 96.41 # SOURCE3 2 0.0000
angle_coeff @angle:f-p3-n3 harmonic 41.86 100.60 # SOURCE2 1 0.0000
angle_coeff @angle:f-p3-os harmonic 42.42 102.20 # SOURCE2 1 0.0000
angle_coeff @angle:f-p3-p3 harmonic 47.13 97.20 # SOURCE2 1 0.0000
angle_coeff @angle:hp-p3-hp harmonic 22.02 95.52 # SOURCE3 44 2.4200
angle_coeff @angle:hp-p3-i harmonic 23.42 96.19 # SOURCE3 4 0.6454
angle_coeff @angle:hp-p3-n1 harmonic 31.27 92.98 # HF/6-31G* 1
angle_coeff @angle:hp-p3-n2 harmonic 29.07 98.28 # SOURCE3 10 1.8860
angle_coeff @angle:hp-p3-n3 harmonic 30.10 94.46 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-n4 harmonic 28.34 93.21 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-n harmonic 29.47 95.15 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-na harmonic 29.25 97.27 # SOURCE3 12 0.9318
angle_coeff @angle:hp-p3-nh harmonic 30.16 94.10 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-no harmonic 28.83 93.06 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-o harmonic 32.01 101.02 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-oh harmonic 30.73 95.95 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-os harmonic 30.39 97.35 # SOURCE3 6 2.8326
angle_coeff @angle:hp-p3-p2 harmonic 32.41 99.11 # SOURCE3 16 4.3022
angle_coeff @angle:hp-p3-p3 harmonic 32.07 95.52 # SOURCE3 4 0.0844
angle_coeff @angle:hp-p3-p4 harmonic 31.97 95.95 # SOURCE3 6 0.0489
angle_coeff @angle:hp-p3-p5 harmonic 32.08 95.54 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-s4 harmonic 26.89 95.49 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-s6 harmonic 27.38 92.95 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-sh harmonic 26.51 94.21 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p3-ss harmonic 26.59 94.61 # SOURCE3 2 0.0000
angle_coeff @angle:i-p3-i harmonic 36.63 105.25 # SOURCE3 1 0.0000
angle_coeff @angle:n1-p3-n1 harmonic 45.91 90.44 # HF/6-31G* 1
angle_coeff @angle:n2-p3-n2 harmonic 40.40 103.46 # SOURCE3 1 0.0000
angle_coeff @angle:n3-p3-n3 harmonic 39.27 113.80 # SOURCE3 1 0.0000
angle_coeff @angle:n3-p3-o harmonic 43.04 107.10 # SOURCE3 4 0.0000
angle_coeff @angle:n3-p3-oh harmonic 43.13 98.36 # SOURCE3 1
angle_coeff @angle:n4-p3-n4 harmonic 38.45 100.53 # SOURCE3 1 0.0000
angle_coeff @angle:na-p3-na harmonic 39.91 106.22 # SOURCE3 1
angle_coeff @angle:nh-p3-nh harmonic 40.11 109.11 # SOURCE3 1 0.0000
angle_coeff @angle:n-p3-n harmonic 40.04 104.58 # SOURCE3 1
angle_coeff @angle:n-p3-o harmonic 42.80 104.99 # SOURCE3 4 0.0000
angle_coeff @angle:no-p3-no harmonic 39.64 98.33 # SOURCE3 1 0.0000
angle_coeff @angle:oh-p3-oh harmonic 42.77 104.48 # SOURCE3 1 0.0000
angle_coeff @angle:o-p3-o harmonic 43.78 122.18 # SOURCE3 2 7.8556
angle_coeff @angle:o-p3-p3 harmonic 45.09 116.74 # SOURCE3 14 0.7525
angle_coeff @angle:o-p3-p5 harmonic 46.98 107.62 # SOURCE3 4 0.0000
angle_coeff @angle:o-p3-s4 harmonic 38.63 110.70 # SOURCE3 4 0.7259
angle_coeff @angle:o-p3-s6 harmonic 39.52 106.66 # SOURCE3 6 3.4017
angle_coeff @angle:os-p3-os harmonic 42.11 106.65 # SOURCE3 1 0.0000
angle_coeff @angle:p2-p3-p2 harmonic 59.12 103.58 # SOURCE3 1 0.0000
angle_coeff @angle:p3-p3-p3 harmonic 57.00 105.31 # SOURCE3 4 3.5864
angle_coeff @angle:p4-p3-p4 harmonic 58.70 99.09 # SOURCE3 1
angle_coeff @angle:p5-p3-p5 harmonic 58.78 99.10 # SOURCE3 1 0.0000
angle_coeff @angle:s4-p3-s4 harmonic 39.08 98.26 # SOURCE3 1 0.0000
angle_coeff @angle:s6-p3-s6 harmonic 39.36 97.78 # SOURCE3 1 0.0000
angle_coeff @angle:sh-p3-sh harmonic 36.56 107.58 # SOURCE3 1 0.0000
angle_coeff @angle:s-p3-s harmonic 34.08 131.32 # SOURCE3 1
angle_coeff @angle:ss-p3-ss harmonic 36.47 109.24 # SOURCE3 1 0.0000
angle_coeff @angle:br-p4-br harmonic 41.07 110.41 # SOURCE3 1
angle_coeff @angle:br-p4-o harmonic 37.80 124.80 # SOURCE3 1
angle_coeff @angle:c2-p4-c2 harmonic 37.13 104.21 # SOURCE3 1
angle_coeff @angle:c2-p4-hp harmonic 27.68 99.50 # SOURCE3 2 0.0000
angle_coeff @angle:c2-p4-o harmonic 39.43 113.59 # SOURCE3 1
angle_coeff @angle:c3-p4-c3 harmonic 37.20 102.55 # SOURCE3 4 0.0192
angle_coeff @angle:c3-p4-n2 harmonic 39.09 103.17 # SOURCE3 1
angle_coeff @angle:c3-p4-n3 harmonic 39.50 102.37 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p4-n4 harmonic 37.54 99.57 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p4-n harmonic 38.98 103.26 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p4-na harmonic 37.92 117.67 # SOURCE3 5 19.0404
angle_coeff @angle:c3-p4-nh harmonic 39.33 102.79 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p4-no harmonic 38.24 99.80 # SOURCE3 3 0.2151
angle_coeff @angle:c3-p4-o harmonic 38.77 116.44 # SOURCE3 25 2.6494
angle_coeff @angle:c3-p4-oh harmonic 41.01 98.56 # SOURCE3 2 0.4558
angle_coeff @angle:c3-p4-os harmonic 41.17 98.01 # SOURCE3 2 0.0931
angle_coeff @angle:c3-p4-p2 harmonic 44.43 109.27 # SOURCE3 1
angle_coeff @angle:c3-p4-p3 harmonic 45.09 103.53 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p4-p4 harmonic 48.14 102.12 # SOURCE3 1
angle_coeff @angle:c3-p4-p5 harmonic 44.64 104.15 # SOURCE3 1
angle_coeff @angle:c3-p4-sh harmonic 37.43 100.17 # SOURCE3 2 0.0815
angle_coeff @angle:c3-p4-ss harmonic 37.38 101.19 # SOURCE3 1
angle_coeff @angle:ca-p4-ca harmonic 36.83 107.77 # SOURCE3 1
angle_coeff @angle:ca-p4-o harmonic 40.03 111.64 # SOURCE3 1
angle_coeff @angle:cl-p4-cl harmonic 33.80 103.51 # SOURCE3 1 0.0000
angle_coeff @angle:cl-p4-o harmonic 36.03 116.53 # SOURCE3 2 0.0000
angle_coeff @angle:hp-p4-hp harmonic 22.57 99.21 # SOURCE3 4 6.4572
angle_coeff @angle:hp-p4-n1 harmonic 30.24 99.91 # HF/6-31G* 1
angle_coeff @angle:hp-p4-o harmonic 31.44 109.35 # SOURCE3 6 10.8284
angle_coeff @angle:hp-p4-p3 harmonic 31.40 98.96 # SOURCE3 4 0.0000
angle_coeff @angle:hp-p4-s harmonic 24.32 110.24 # SOURCE3 4 4.1081
angle_coeff @angle:i-p4-i harmonic 38.53 113.22 # SOURCE3 2 6.7916
angle_coeff @angle:i-p4-o harmonic 37.71 110.22 # SOURCE3 4 9.7726
angle_coeff @angle:n1-p4-n1 harmonic 43.01 100.61 # HF/6-31G* 1
angle_coeff @angle:n1-p4-o harmonic 42.53 114.59 # HF/6-31G* 1
angle_coeff @angle:n2-p4-n2 harmonic 41.52 102.54 # SOURCE3 1
angle_coeff @angle:n2-p4-o harmonic 40.81 120.28 # SOURCE3 1
angle_coeff @angle:n3-p4-o harmonic 42.50 113.27 # SOURCE3 1 0.0000
angle_coeff @angle:n4-p4-o harmonic 39.56 107.61 # SOURCE3 1 0.0000
angle_coeff @angle:na-p4-o harmonic 45.17 110.60 # SOURCE3 5 1.3133
angle_coeff @angle:nh-p4-nh harmonic 43.52 95.30 # SOURCE3 1 0.0000
angle_coeff @angle:nh-p4-o harmonic 41.87 115.86 # SOURCE3 3 3.2712
angle_coeff @angle:n-p4-o harmonic 41.05 117.99 # SOURCE3 1 0.0000
angle_coeff @angle:no-p4-o harmonic 39.42 114.69 # SOURCE3 3 0.1070
angle_coeff @angle:oh-p4-oh harmonic 45.67 95.71 # SOURCE3 1 0.0000
angle_coeff @angle:o-p4-o harmonic 45.06 117.22 # SOURCE3 6 2.7792
angle_coeff @angle:o-p4-oh harmonic 42.88 117.39 # SOURCE3 4 1.0083
angle_coeff @angle:o-p4-os harmonic 43.10 116.67 # SOURCE3 4 0.6923
angle_coeff @angle:o-p4-p2 harmonic 44.91 121.35 # SOURCE3 1
angle_coeff @angle:o-p4-p3 harmonic 45.60 114.00 # SOURCE3 3 0.6663
angle_coeff @angle:o-p4-p4 harmonic 48.81 116.43 # SOURCE3 1
angle_coeff @angle:o-p4-p5 harmonic 46.05 109.76 # SOURCE3 1
angle_coeff @angle:o-p4-s4 harmonic 35.77 112.19 # SOURCE3 1
angle_coeff @angle:o-p4-s6 harmonic 35.22 113.89 # SOURCE3 1
angle_coeff @angle:o-p4-s harmonic 37.34 112.78 # SOURCE3 2 0.0000
angle_coeff @angle:o-p4-sh harmonic 36.99 118.09 # SOURCE3 1
angle_coeff @angle:os-p4-os harmonic 44.74 100.34 # SOURCE3 1 0.0000
angle_coeff @angle:o-p4-ss harmonic 37.47 116.14 # SOURCE3 4 1.0636
angle_coeff @angle:p2-p4-p2 harmonic 56.48 110.71 # SOURCE3 1
angle_coeff @angle:p3-p4-p3 harmonic 54.50 114.98 # SOURCE3 1 0.0000
angle_coeff @angle:p4-p4-p4 harmonic 61.44 107.38 # SOURCE3 1
angle_coeff @angle:p5-p4-p5 harmonic 55.76 107.78 # SOURCE3 1
angle_coeff @angle:s4-p4-s4 harmonic 36.61 96.24 # SOURCE3 1
angle_coeff @angle:s6-p4-s6 harmonic 35.22 102.36 # SOURCE3 1
angle_coeff @angle:sh-p4-sh harmonic 38.45 98.81 # SOURCE3 1 0.0000
angle_coeff @angle:s-p4-s harmonic 36.54 106.30 # SOURCE3 2 25.0119
angle_coeff @angle:ss-p4-ss harmonic 37.60 104.41 # SOURCE3 1 0.0000
angle_coeff @angle:br-p5-br harmonic 41.96 103.38 # SOURCE3 1 0.0000
angle_coeff @angle:br-p5-o harmonic 39.04 114.65 # SOURCE3 3 1.0910
angle_coeff @angle:br-p5-oh harmonic 40.90 102.92 # SOURCE3 4 0.5468
angle_coeff @angle:c1-p5-c1 harmonic 38.83 102.89 # SOURCE3 1 0.0000
angle_coeff @angle:c1-p5-o harmonic 40.32 115.77 # SOURCE3 2 0.0000
angle_coeff @angle:c1-p5-oh harmonic 41.43 102.79 # SOURCE3 2 0.0000
angle_coeff @angle:c2-p5-c2 harmonic 35.85 106.56 # SOURCE3 1
angle_coeff @angle:c2-p5-o harmonic 39.62 109.24 # SOURCE4 7 2.2628
angle_coeff @angle:c2-p5-oh harmonic 40.04 101.69 # SOURCE3 1
angle_coeff @angle:c2-p5-os harmonic 39.90 103.34 # SOURCE3 1
angle_coeff @angle:c3-p5-c3 harmonic 36.95 106.23 # SOURCE3 14 2.6389
angle_coeff @angle:c3-p5-hp harmonic 27.05 103.62 # SOURCE4 7 1.1616
angle_coeff @angle:c3-p5-n3 harmonic 40.01 102.76 # SOURCE3 1 0.0000
angle_coeff @angle:c3-p5-o harmonic 39.91 112.50 # SOURCE3 23 4.4203
angle_coeff @angle:c3-p5-oh harmonic 40.83 101.56 # SOURCE3 17 2.1803
angle_coeff @angle:c3-p5-os harmonic 41.20 100.77 # SOURCE4 51 2.0928
angle_coeff @angle:c3-p5-p4 harmonic 44.32 106.27 # SOURCE3 1
angle_coeff @angle:c3-p5-s harmonic 37.51 113.40 # SOURCE3 4 2.0067
angle_coeff @angle:c3-p5-ss harmonic 36.91 103.76 # SOURCE3 1 0.0000
angle_coeff @angle:ca-p5-ca harmonic 37.10 107.53 # SOURCE3 1
angle_coeff @angle:ca-p5-o harmonic 39.95 113.98 # SOURCE3 1
angle_coeff @angle:ca-p5-oh harmonic 41.04 101.77 # SOURCE3 1
angle_coeff @angle:ca-p5-os harmonic 40.86 103.75 # SOURCE3 1
angle_coeff @angle:c-p5-c harmonic 35.96 104.16 # SOURCE3 1
angle_coeff @angle:cl-p5-cl harmonic 33.77 103.70 # SOURCE2 1 0.0000
angle_coeff @angle:cl-p5-o harmonic 36.29 115.32 # SOURCE3 2 0.0000
angle_coeff @angle:cl-p5-oh harmonic 37.85 102.44 # SOURCE3 2 0.0000
angle_coeff @angle:c-p5-o harmonic 39.74 107.19 # SOURCE4 16 0.5711
angle_coeff @angle:c-p5-oh harmonic 39.73 102.12 # SOURCE3 1
angle_coeff @angle:f-p5-f harmonic 42.49 99.96 # SOURCE2 4 0.9197
angle_coeff @angle:f-p5-o harmonic 43.22 112.03 # SOURCE4 7 0.5178
angle_coeff @angle:f-p5-oh harmonic 43.33 101.98 # SOURCE3 2 0.0000
angle_coeff @angle:f-p5-os harmonic 43.51 102.70 # SOURCE4 5 0.1524
angle_coeff @angle:f-p5-s harmonic 38.09 117.40 # SOURCE2 1 0.0000
angle_coeff @angle:hp-p5-hp harmonic 21.44 101.09 # SOURCE3 4 1.3036
angle_coeff @angle:hp-p5-n1 harmonic 31.09 101.32 # HF/6-31G* 1
angle_coeff @angle:hp-p5-o harmonic 30.21 116.58 # SOURCE3 7 1.3282
angle_coeff @angle:hp-p5-oh harmonic 30.57 101.45 # SOURCE3 5 0.9084
angle_coeff @angle:hp-p5-s harmonic 25.97 119.20 # SOURCE2 1 0.0000
angle_coeff @angle:i-p5-i harmonic 35.88 107.17 # SOURCE3 1 0.0000
angle_coeff @angle:i-p5-o harmonic 32.99 115.93 # SOURCE3 3 0.0415
angle_coeff @angle:i-p5-oh harmonic 35.44 102.26 # SOURCE3 4 1.9577
angle_coeff @angle:n1-p5-n1 harmonic 45.78 101.55 # HF/6-31G* 1
angle_coeff @angle:n1-p5-o harmonic 44.71 113.78 # HF/6-31G* 1
angle_coeff @angle:n2-p5-n2 harmonic 43.96 106.34 # SOURCE3 1
angle_coeff @angle:n2-p5-o harmonic 44.30 113.53 # SOURCE3 1
angle_coeff @angle:n2-p5-oh harmonic 44.68 102.40 # SOURCE3 1
angle_coeff @angle:n3-p5-n3 harmonic 42.87 103.37 # SOURCE4 47 2.1009
angle_coeff @angle:n3-p5-nh harmonic 42.63 104.02 # SOURCE4 5 1.8740
angle_coeff @angle:n3-p5-o harmonic 43.02 114.64 # SOURCE4 76 2.2728
angle_coeff @angle:n3-p5-oh harmonic 43.43 104.18 # SOURCE3 6 0.4373
angle_coeff @angle:n3-p5-os harmonic 44.20 101.94 # SOURCE4 34 2.3553
angle_coeff @angle:n3-p5-s harmonic 39.05 117.12 # SOURCE4 7 0.7109
angle_coeff @angle:n4-p5-n4 harmonic 39.18 102.20 # SOURCE3 1 0.0000
angle_coeff @angle:n4-p5-o harmonic 41.10 109.78 # SOURCE3 5 2.7519
angle_coeff @angle:n4-p5-oh harmonic 42.23 98.48 # SOURCE3 6 0.4104
angle_coeff @angle:n4-p5-os harmonic 43.31 94.55 # SOURCE3 2 0.0000
angle_coeff @angle:na-p5-na harmonic 40.56 108.57 # SOURCE3 1 0.0000
angle_coeff @angle:na-p5-o harmonic 42.38 113.43 # SOURCE3 11 0.8968
angle_coeff @angle:na-p5-oh harmonic 43.14 102.07 # SOURCE3 16 1.4144
angle_coeff @angle:na-p5-os harmonic 43.20 103.06 # SOURCE3 4 0.7463
angle_coeff @angle:nh-p5-nh harmonic 43.48 99.51 # SOURCE3 1 0.0000
angle_coeff @angle:nh-p5-o harmonic 42.11 118.91 # SOURCE3 3 1.3237
angle_coeff @angle:nh-p5-oh harmonic 43.40 103.81 # SOURCE3 2 0.0000
angle_coeff @angle:nh-p5-os harmonic 44.39 100.51 # SOURCE3 2 0.0000
angle_coeff @angle:n-p5-n3 harmonic 42.13 104.11 # SOURCE4 11 1.4088
angle_coeff @angle:n-p5-n harmonic 41.80 103.09 # SOURCE3 1 0.0000
angle_coeff @angle:n-p5-o harmonic 43.40 108.73 # SOURCE4 5 0.2571
angle_coeff @angle:n-p5-oh harmonic 43.17 102.44 # SOURCE3 4 0.0999
angle_coeff @angle:no-p5-no harmonic 40.40 95.68 # SOURCE3 1 0.0000
angle_coeff @angle:no-p5-o harmonic 40.49 112.75 # SOURCE3 4 3.3684
angle_coeff @angle:no-p5-oh harmonic 41.56 101.35 # SOURCE3 2 0.0000
angle_coeff @angle:no-p5-os harmonic 41.69 101.70 # SOURCE3 4 0.0565
angle_coeff @angle:n-p5-os harmonic 43.85 100.48 # SOURCE3 2 0.0000
angle_coeff @angle:oh-p5-oh harmonic 44.58 102.45 # SOURCE3 39 2.4223
angle_coeff @angle:oh-p5-os harmonic 44.91 102.37 # SOURCE3 8 1.5063
angle_coeff @angle:oh-p5-p2 harmonic 48.24 103.53 # SOURCE3 1
angle_coeff @angle:oh-p5-p3 harmonic 47.55 103.83 # SOURCE3 13 0.4303
angle_coeff @angle:oh-p5-p4 harmonic 47.57 101.79 # SOURCE3 1
angle_coeff @angle:oh-p5-p5 harmonic 51.43 100.45 # SOURCE3 1
angle_coeff @angle:oh-p5-s4 harmonic 40.30 103.24 # SOURCE3 1
angle_coeff @angle:oh-p5-s6 harmonic 40.65 101.48 # SOURCE3 1
angle_coeff @angle:oh-p5-s harmonic 42.20 102.88 # SOURCE3 3 1.6044
angle_coeff @angle:oh-p5-sh harmonic 40.01 101.41 # SOURCE3 2 0.0000
angle_coeff @angle:oh-p5-ss harmonic 38.95 104.33 # SOURCE3 6 2.0112
angle_coeff @angle:o-p5-o harmonic 46.01 115.80 # SOURCE3 17 5.7902
angle_coeff @angle:o-p5-oh harmonic 43.79 115.26 # SOURCE4 740 1.3004
angle_coeff @angle:o-p5-os harmonic 44.01 116.09 # SOURCE3 35 3.2062
angle_coeff @angle:o-p5-p2 harmonic 46.23 114.60 # SOURCE3 1
angle_coeff @angle:o-p5-p3 harmonic 45.38 115.48 # SOURCE3 9 2.1084
angle_coeff @angle:o-p5-p4 harmonic 45.07 114.66 # SOURCE3 1
angle_coeff @angle:o-p5-p5 harmonic 49.11 113.44 # SOURCE3 1
angle_coeff @angle:o-p5-s4 harmonic 39.61 110.23 # SOURCE3 1
angle_coeff @angle:o-p5-s6 harmonic 39.34 111.75 # SOURCE3 1
angle_coeff @angle:o-p5-s harmonic 40.46 116.94 # SOURCE3 3 2.9506
angle_coeff @angle:o-p5-sh harmonic 38.14 114.56 # SOURCE3 3 1.7645
angle_coeff @angle:os-p5-os harmonic 45.37 101.77 # SOURCE4 243 2.0816
angle_coeff @angle:os-p5-p3 harmonic 47.66 103.67 # SOURCE3 2 0.0000
angle_coeff @angle:os-p5-p5 harmonic 50.58 104.48 # SOURCE3 1
angle_coeff @angle:os-p5-s4 harmonic 40.57 102.52 # SOURCE3 1
angle_coeff @angle:os-p5-s6 harmonic 40.69 101.89 # SOURCE3 1
angle_coeff @angle:o-p5-ss harmonic 37.95 112.46 # SOURCE3 6 2.7392
angle_coeff @angle:os-p5-s harmonic 39.69 117.28 # SOURCE4 74 0.7542
angle_coeff @angle:os-p5-sh harmonic 39.51 104.59 # SOURCE3 2 0.0000
angle_coeff @angle:os-p5-ss harmonic 39.36 102.65 # SOURCE4 25 1.8093
angle_coeff @angle:p2-p5-p2 harmonic 57.39 107.14 # SOURCE3 1
angle_coeff @angle:p3-p5-p3 harmonic 57.04 105.23 # SOURCE3 3 5.1024
angle_coeff @angle:p4-p5-p4 harmonic 57.42 101.62 # SOURCE3 1
angle_coeff @angle:p5-p5-p5 harmonic 59.38 112.72 # SOURCE3 1
angle_coeff @angle:s6-p5-s6 harmonic 38.64 105.18 # SOURCE3 1
angle_coeff @angle:sh-p5-sh harmonic 37.97 104.56 # SOURCE3 1 0.0000
angle_coeff @angle:sh-p5-ss harmonic 37.22 107.13 # SOURCE3 1
angle_coeff @angle:s-p5-s harmonic 39.37 114.13 # SOURCE3 1 0.0000
angle_coeff @angle:ss-p5-ss harmonic 36.51 109.61 # SOURCE3 1 0.0000
angle_coeff @angle:cd-pc-n harmonic 42.75 90.80 # SOURCE3 3 2.3423
angle_coeff @angle:cd-pc-na harmonic 43.00 90.18 # SOURCE3 81 2.7619
angle_coeff @angle:cc-pd-n harmonic 42.75 90.80 # SOURCE3 3 same_as_cd-pc-n
angle_coeff @angle:cc-pd-na harmonic 43.00 90.18 # SOURCE3 81 same_as_cd-pc-na
angle_coeff @angle:c2-pe-ca harmonic 38.84 101.44 # SOURCE3 3 0.7177
angle_coeff @angle:c2-pe-ce harmonic 38.68 103.01 # SOURCE3 4 1.4470
angle_coeff @angle:c2-pe-cg harmonic 40.85 104.03 # SOURCE3 3 3.8740
angle_coeff @angle:c2-pe-n2 harmonic 44.94 94.14 # SOURCE3 1
angle_coeff @angle:c2-pe-ne harmonic 41.85 98.70 # SOURCE3 12 5.3383
angle_coeff @angle:c2-pe-o harmonic 41.06 115.16 # SOURCE3 2 0.0149
angle_coeff @angle:c2-pe-p2 harmonic 50.94 107.82 # SOURCE3 1
angle_coeff @angle:c2-pe-pe harmonic 48.17 102.99 # SOURCE3 9 8.2860
angle_coeff @angle:c2-pe-px harmonic 51.11 97.37 # SOURCE3 4 0.6655
angle_coeff @angle:c2-pe-py harmonic 50.92 96.71 # SOURCE3 4 1.2755
angle_coeff @angle:c2-pe-s harmonic 41.06 111.16 # SOURCE3 2 0.0000
angle_coeff @angle:c2-pe-sx harmonic 38.51 95.11 # SOURCE3 4 0.2676
angle_coeff @angle:c2-pe-sy harmonic 37.78 95.56 # SOURCE3 2 0.0462
angle_coeff @angle:ca-pe-n2 harmonic 40.97 102.03 # SOURCE3 1 0.0000
angle_coeff @angle:ca-pe-o harmonic 40.40 106.88 # SOURCE3 2 0.0018
angle_coeff @angle:ca-pe-p2 harmonic 50.96 100.79 # SOURCE3 1 0.0000
angle_coeff @angle:ca-pe-pf harmonic 48.44 99.70 # SOURCE3 2 0.0000
angle_coeff @angle:ca-pe-s harmonic 40.07 107.93 # SOURCE3 1 0.0000
angle_coeff @angle:c-pe-c2 harmonic 38.58 97.30 # SOURCE3 3 0.0335
angle_coeff @angle:ce-pe-n2 harmonic 41.45 100.55 # SOURCE3 1 0.0000
angle_coeff @angle:ce-pe-o harmonic 40.47 107.44 # SOURCE3 1 0.0000
angle_coeff @angle:ce-pe-p2 harmonic 51.42 99.56 # SOURCE3 1 0.0000
angle_coeff @angle:ce-pe-s harmonic 40.65 105.54 # SOURCE3 1 0.0000
angle_coeff @angle:cg-pe-n2 harmonic 44.31 101.79 # SOURCE3 1 0.0000
angle_coeff @angle:cg-pe-o harmonic 43.57 107.62 # SOURCE3 1 0.0000
angle_coeff @angle:cg-pe-p2 harmonic 52.47 104.68 # SOURCE3 2 5.1435
angle_coeff @angle:cg-pe-s harmonic 42.30 108.60 # SOURCE3 4 2.6981
angle_coeff @angle:n2-pe-n2 harmonic 45.26 108.14 # SOURCE3 1
angle_coeff @angle:n2-pe-ne harmonic 42.89 106.80 # SOURCE3 6 4.5981
angle_coeff @angle:n2-pe-o harmonic 44.34 115.39 # SOURCE3 1 0.0000
angle_coeff @angle:n2-pe-p2 harmonic 52.85 111.60 # SOURCE3 1
angle_coeff @angle:n2-pe-pe harmonic 48.70 109.40 # SOURCE3 1 0.0000
angle_coeff @angle:n2-pe-px harmonic 50.28 110.30 # SOURCE3 3 6.0548
angle_coeff @angle:n2-pe-py harmonic 54.11 93.68 # SOURCE3 1 0.0000
angle_coeff @angle:n2-pe-s harmonic 42.94 114.84 # SOURCE3 3 3.6512
angle_coeff @angle:n2-pe-sx harmonic 39.42 97.83 # SOURCE3 1 0.0000
angle_coeff @angle:n2-pe-sy harmonic 38.61 98.14 # SOURCE3 1 0.0000
angle_coeff @angle:ne-pe-o harmonic 42.65 110.24 # SOURCE3 3 3.8478
angle_coeff @angle:ne-pe-p2 harmonic 52.77 104.48 # SOURCE3 2 7.1207
angle_coeff @angle:ne-pe-s harmonic 42.21 109.19 # SOURCE3 5 3.6708
angle_coeff @angle:o-pe-o harmonic 44.01 119.96 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-p2 harmonic 52.71 114.23 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-pe harmonic 42.47 145.96 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-px harmonic 52.10 104.37 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-py harmonic 51.64 104.49 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-s harmonic 42.89 117.42 # SOURCE3 2 0.0426
angle_coeff @angle:o-pe-sx harmonic 38.02 106.59 # SOURCE3 1 0.0000
angle_coeff @angle:o-pe-sy harmonic 37.56 105.04 # SOURCE3 1 0.0000
angle_coeff @angle:p2-pe-pe harmonic 65.58 98.24 # SOURCE3 1 0.0000
angle_coeff @angle:p2-pe-px harmonic 64.12 108.28 # SOURCE3 2 6.2959
angle_coeff @angle:p2-pe-py harmonic 62.99 110.87 # SOURCE3 3 8.1645
angle_coeff @angle:p2-pe-s harmonic 53.42 111.28 # SOURCE3 1 0.0000
angle_coeff @angle:p2-pe-sx harmonic 51.26 95.73 # SOURCE3 1 0.0000
angle_coeff @angle:p2-pe-sy harmonic 50.47 95.95 # SOURCE3 1 0.0000
angle_coeff @angle:pe-pe-s harmonic 50.40 107.91 # SOURCE3 2 1.5577
angle_coeff @angle:px-pe-s harmonic 51.97 107.62 # SOURCE3 2 3.7266
angle_coeff @angle:py-pe-s harmonic 51.36 108.73 # SOURCE3 3 5.3201
angle_coeff @angle:s-pe-s harmonic 34.43 178.44 # SOURCE3 1 0.0000
angle_coeff @angle:s-pe-sx harmonic 38.72 108.32 # SOURCE3 2 3.0318
angle_coeff @angle:s-pe-sy harmonic 38.35 106.93 # SOURCE3 1 0.0000
angle_coeff @angle:c2-pf-ca harmonic 38.84 101.44 # SOURCE3 3 same_as_c2-pe-ca
angle_coeff @angle:c2-pf-cf harmonic 38.68 103.01 # SOURCE3 4 same_as_c2-pe-ce
angle_coeff @angle:c2-pf-ch harmonic 40.85 104.03 # SOURCE3 3 same_as_c2-pe-cg
angle_coeff @angle:c2-pf-n2 harmonic 44.94 94.14 # SOURCE3 1 same_as_c2-pe-n2
angle_coeff @angle:c2-pf-nf harmonic 41.85 98.70 # SOURCE3 12 same_as_c2-pe-ne
angle_coeff @angle:c2-pf-o harmonic 41.06 115.16 # SOURCE3 2 same_as_c2-pe-o
angle_coeff @angle:c2-pf-p2 harmonic 50.94 107.82 # SOURCE3 1 same_as_c2-pe-p2
angle_coeff @angle:c2-pf-pf harmonic 48.17 102.99 # SOURCE3 9 same_as_c2-pe-pe
angle_coeff @angle:c2-pf-px harmonic 51.11 97.37 # SOURCE3 4 same_as_c2-pe-px
angle_coeff @angle:c2-pf-py harmonic 50.92 96.71 # SOURCE3 4 same_as_c2-pe-py
angle_coeff @angle:c2-pf-s harmonic 41.06 111.16 # SOURCE3 2 same_as_c2-pe-s
angle_coeff @angle:c2-pf-sx harmonic 38.51 95.11 # SOURCE3 4 same_as_c2-pe-sx
angle_coeff @angle:c2-pf-sy harmonic 37.78 95.56 # SOURCE3 2 same_as_c2-pe-sy
angle_coeff @angle:ca-pf-n2 harmonic 40.97 102.03 # SOURCE3 1 same_as_ca-pe-n2
angle_coeff @angle:ca-pf-o harmonic 40.40 106.88 # SOURCE3 2 same_as_ca-pe-o
angle_coeff @angle:ca-pf-p2 harmonic 50.96 100.79 # SOURCE3 1 same_as_ca-pe-p2
angle_coeff @angle:ca-pf-pe harmonic 48.44 99.70 # SOURCE3 2 0.0000
angle_coeff @angle:ca-pf-s harmonic 40.07 107.93 # SOURCE3 1 same_as_ca-pe-s
angle_coeff @angle:c-pf-c2 harmonic 38.58 97.30 # SOURCE3 3 same_as_c-pe-c2
angle_coeff @angle:cf-pf-n2 harmonic 41.45 100.55 # SOURCE3 1 same_as_ce-pe-n2
angle_coeff @angle:cf-pf-o harmonic 40.47 107.44 # SOURCE3 1 same_as_ce-pe-o
angle_coeff @angle:cf-pf-p2 harmonic 51.42 99.56 # SOURCE3 1 same_as_ce-pe-p2
angle_coeff @angle:cf-pf-s harmonic 40.65 105.54 # SOURCE3 1 same_as_ce-pe-s
angle_coeff @angle:ch-pf-n2 harmonic 44.31 101.79 # SOURCE3 1 same_as_cg-pe-n2
angle_coeff @angle:ch-pf-o harmonic 43.57 107.62 # SOURCE3 1 same_as_cg-pe-o
angle_coeff @angle:ch-pf-p2 harmonic 52.47 104.68 # SOURCE3 2 same_as_cg-pe-p2
angle_coeff @angle:ch-pf-s harmonic 42.30 108.60 # SOURCE3 4 same_as_cg-pe-s
angle_coeff @angle:n2-pf-n2 harmonic 45.26 108.14 # SOURCE3 1 same_as_n2-pe-n2
angle_coeff @angle:n2-pf-nf harmonic 42.89 106.80 # SOURCE3 6 same_as_n2-pe-ne
angle_coeff @angle:n2-pf-o harmonic 44.34 115.39 # SOURCE3 1 same_as_n2-pe-o
angle_coeff @angle:n2-pf-p2 harmonic 52.85 111.60 # SOURCE3 1 same_as_n2-pe-p2
angle_coeff @angle:n2-pf-pf harmonic 48.70 109.40 # SOURCE3 1 same_as_n2-pe-pe
angle_coeff @angle:n2-pf-px harmonic 50.28 110.30 # SOURCE3 3 same_as_n2-pe-px
angle_coeff @angle:n2-pf-py harmonic 54.11 93.68 # SOURCE3 1 same_as_n2-pe-py
angle_coeff @angle:n2-pf-s harmonic 42.94 114.84 # SOURCE3 3 same_as_n2-pe-s
angle_coeff @angle:n2-pf-sx harmonic 39.42 97.83 # SOURCE3 1 same_as_n2-pe-sx
angle_coeff @angle:n2-pf-sy harmonic 38.61 98.14 # SOURCE3 1 same_as_n2-pe-sy
angle_coeff @angle:nf-pf-o harmonic 42.65 110.24 # SOURCE3 3 same_as_ne-pe-o
angle_coeff @angle:nf-pf-p2 harmonic 52.77 104.48 # SOURCE3 2 same_as_ne-pe-p2
angle_coeff @angle:nf-pf-s harmonic 42.21 109.19 # SOURCE3 5 same_as_ne-pe-s
angle_coeff @angle:o-pf-o harmonic 44.01 119.96 # SOURCE3 1 same_as_o-pe-o
angle_coeff @angle:o-pf-p2 harmonic 52.71 114.23 # SOURCE3 1 same_as_o-pe-p2
angle_coeff @angle:o-pf-pf harmonic 42.47 145.96 # SOURCE3 1 same_as_o-pe-pe
angle_coeff @angle:o-pf-px harmonic 52.10 104.37 # SOURCE3 1 same_as_o-pe-px
angle_coeff @angle:o-pf-py harmonic 51.64 104.49 # SOURCE3 1 same_as_o-pe-py
angle_coeff @angle:o-pf-s harmonic 42.89 117.42 # SOURCE3 2 same_as_o-pe-s
angle_coeff @angle:o-pf-sx harmonic 38.02 106.59 # SOURCE3 1 same_as_o-pe-sx
angle_coeff @angle:o-pf-sy harmonic 37.56 105.04 # SOURCE3 1 same_as_o-pe-sy
angle_coeff @angle:p2-pf-pf harmonic 65.58 98.24 # SOURCE3 1 same_as_p2-pe-pe
angle_coeff @angle:p2-pf-px harmonic 64.12 108.28 # SOURCE3 2 same_as_p2-pe-px
angle_coeff @angle:p2-pf-py harmonic 62.99 110.87 # SOURCE3 3 same_as_p2-pe-py
angle_coeff @angle:p2-pf-s harmonic 53.42 111.28 # SOURCE3 1 same_as_p2-pe-s
angle_coeff @angle:p2-pf-sx harmonic 51.26 95.73 # SOURCE3 1 same_as_p2-pe-sx
angle_coeff @angle:p2-pf-sy harmonic 50.47 95.95 # SOURCE3 1 same_as_p2-pe-sy
angle_coeff @angle:pf-pf-s harmonic 50.40 107.91 # SOURCE3 2 same_as_pe-pe-s
angle_coeff @angle:px-pf-s harmonic 51.97 107.62 # SOURCE3 2 same_as_px-pe-s
angle_coeff @angle:py-pf-s harmonic 51.36 108.73 # SOURCE3 3 same_as_py-pe-s
angle_coeff @angle:s-pf-s harmonic 34.43 178.44 # SOURCE3 1 same_as_s-pe-s
angle_coeff @angle:s-pf-sx harmonic 38.72 108.32 # SOURCE3 2 same_as_s-pe-sx
angle_coeff @angle:s-pf-sy harmonic 38.35 106.93 # SOURCE3 1 same_as_s-pe-sy
angle_coeff @angle:c3-px-ca harmonic 36.97 104.79 # SOURCE3 1 0.0000
angle_coeff @angle:c3-px-ce harmonic 37.00 104.86 # SOURCE3 4 0.6354
angle_coeff @angle:c3-px-cf harmonic 37.00 104.86 # SOURCE3 4 same_as_c3-px-ce
angle_coeff @angle:c3-px-ne harmonic 39.55 102.46 # SOURCE3 7 1.8685
angle_coeff @angle:c3-px-nf harmonic 39.55 102.46 # SOURCE3 7 same_as_c3-px-ne
angle_coeff @angle:c3-px-o harmonic 39.39 113.68 # SOURCE3 28 4.8990
angle_coeff @angle:c3-px-pe harmonic 47.82 105.73 # SOURCE3 10 4.4059
angle_coeff @angle:c3-px-pf harmonic 47.82 105.73 # SOURCE3 10 same_as_c3-px-pe
angle_coeff @angle:c3-px-py harmonic 45.50 103.11 # SOURCE3 3 0.8680
angle_coeff @angle:c3-px-sx harmonic 36.06 99.55 # SOURCE3 1 0.0000
angle_coeff @angle:c3-px-sy harmonic 35.30 103.41 # SOURCE3 1 0.0000
angle_coeff @angle:ca-px-ca harmonic 37.08 104.15 # SOURCE3 2 3.6168
angle_coeff @angle:ca-px-o harmonic 40.49 107.50 # SOURCE3 5 5.7355
angle_coeff @angle:c-px-c3 harmonic 36.70 101.72 # SOURCE3 1 0.0000
angle_coeff @angle:ce-px-ce harmonic 37.15 104.21 # SOURCE3 1 0.0000
angle_coeff @angle:ce-px-o harmonic 39.42 113.79 # SOURCE3 6 0.3877
angle_coeff @angle:cf-px-cf harmonic 37.15 104.21 # SOURCE3 1 same_as_ce-px-ce
angle_coeff @angle:cf-px-o harmonic 39.42 113.79 # SOURCE3 6 same_as_ce-px-o
angle_coeff @angle:c-px-o harmonic 37.98 114.47 # SOURCE3 1 0.0000
angle_coeff @angle:ne-px-ne harmonic 41.92 103.22 # SOURCE3 2 0.6807
angle_coeff @angle:ne-px-o harmonic 42.27 114.13 # SOURCE3 11 8.9737
angle_coeff @angle:nf-px-nf harmonic 41.92 103.22 # SOURCE3 2 same_as_ne-px-ne
angle_coeff @angle:nf-px-o harmonic 42.27 114.13 # SOURCE3 11 same_as_ne-px-o
angle_coeff @angle:o-px-pe harmonic 49.41 116.50 # SOURCE3 12 8.2925
angle_coeff @angle:o-px-pf harmonic 49.41 116.50 # SOURCE3 12 same_as_o-px-pe
angle_coeff @angle:o-px-py harmonic 45.90 114.20 # SOURCE3 5 1.7165
angle_coeff @angle:o-px-sx harmonic 35.81 112.81 # SOURCE3 3 0.8799
angle_coeff @angle:o-px-sy harmonic 35.59 113.54 # SOURCE3 3 0.5010
angle_coeff @angle:pe-px-pe harmonic 61.38 110.71 # SOURCE3 1 0.0000
angle_coeff @angle:pf-px-pf harmonic 61.38 110.71 # SOURCE3 1 same_as_pe-px-pe
angle_coeff @angle:py-px-py harmonic 56.72 107.78 # SOURCE3 1 0.0000
angle_coeff @angle:sx-px-sx harmonic 36.76 96.24 # SOURCE3 1 0.0000
angle_coeff @angle:sy-px-sy harmonic 35.53 102.36 # SOURCE3 1 0.0000
angle_coeff @angle:c3-py-n4 harmonic 37.34 103.83 # SOURCE3 4 0.0000
angle_coeff @angle:c3-py-na harmonic 38.76 106.89 # SOURCE3 2 0.0000
angle_coeff @angle:c3-py-o harmonic 38.95 117.87 # SOURCE3 13 2.3554
angle_coeff @angle:c3-py-oh harmonic 41.22 100.16 # SOURCE3 2 0.0000
angle_coeff @angle:c3-py-os harmonic 40.15 105.39 # SOURCE3 1 0.0000
angle_coeff @angle:c3-py-px harmonic 44.89 106.27 # SOURCE3 2 0.0000
angle_coeff @angle:c3-py-py harmonic 43.54 113.97 # SOURCE3 10 1.6346
angle_coeff @angle:c3-py-sx harmonic 34.74 106.36 # SOURCE3 4 0.0000
angle_coeff @angle:ca-py-ca harmonic 36.99 107.55 # SOURCE3 1 0.0000
angle_coeff @angle:ca-py-o harmonic 39.82 113.98 # SOURCE3 3 0.5309
angle_coeff @angle:ca-py-oh harmonic 40.90 102.68 # SOURCE4 5 1.2945
angle_coeff @angle:ca-py-os harmonic 40.66 103.75 # SOURCE3 2 0.0000
angle_coeff @angle:c-py-c3 harmonic 35.71 110.36 # SOURCE3 1 0.0000
angle_coeff @angle:c-py-c harmonic 36.23 104.20 # SOURCE3 1 0.0000
angle_coeff @angle:ce-py-ce harmonic 37.29 106.54 # SOURCE3 1 0.0000
angle_coeff @angle:ce-py-o harmonic 40.24 112.16 # SOURCE3 5 3.2594
angle_coeff @angle:ce-py-oh harmonic 40.58 104.77 # SOURCE3 6 2.1852
angle_coeff @angle:ce-py-os harmonic 40.82 103.34 # SOURCE3 2 0.0000
angle_coeff @angle:cf-py-cf harmonic 37.29 106.54 # SOURCE3 1 same_as_ce-py-ce
angle_coeff @angle:cf-py-o harmonic 40.24 112.16 # SOURCE3 5 same_as_ce-py-o
angle_coeff @angle:cf-py-oh harmonic 40.58 104.77 # SOURCE3 6 same_as_ce-py-oh
angle_coeff @angle:cf-py-os harmonic 40.82 103.34 # SOURCE3 2 same_as_ce-py-os
angle_coeff @angle:c-py-o harmonic 38.52 115.25 # SOURCE3 6 2.6519
angle_coeff @angle:c-py-oh harmonic 40.03 102.14 # SOURCE3 6 1.0654
angle_coeff @angle:c-py-os harmonic 41.32 95.74 # SOURCE3 3 9.0999
angle_coeff @angle:n3-py-ne harmonic 41.93 108.44 # SOURCE4 12 0.9498
angle_coeff @angle:n4-py-o harmonic 38.83 115.58 # SOURCE3 4 0.0000
angle_coeff @angle:n4-py-py harmonic 63.24 55.10 # SOURCE3 4 0.0000
angle_coeff @angle:na-py-o harmonic 40.78 122.40 # SOURCE3 2 0.0000
angle_coeff @angle:na-py-py harmonic 67.66 50.88 # SOURCE3 2 0.0000
angle_coeff @angle:ne-py-ne harmonic 43.51 106.29 # SOURCE3 1 0.0000
angle_coeff @angle:ne-py-o harmonic 44.00 113.21 # SOURCE3 15 3.8894
angle_coeff @angle:ne-py-oh harmonic 44.13 104.70 # SOURCE3 26 2.7513
angle_coeff @angle:ne-py-os harmonic 44.80 101.33 # SOURCE3 2 0.0000
angle_coeff @angle:nf-py-nf harmonic 43.51 106.29 # SOURCE3 1 same_as_ne-py-ne
angle_coeff @angle:nf-py-o harmonic 44.00 113.21 # SOURCE3 15 same_as_ne-py-o
angle_coeff @angle:nf-py-oh harmonic 44.13 104.70 # SOURCE3 26 same_as_ne-py-oh
angle_coeff @angle:nf-py-os harmonic 44.80 101.33 # SOURCE3 2 same_as_ne-py-os
angle_coeff @angle:oh-py-oh harmonic 45.06 101.78 # SOURCE3 35 2.2937
angle_coeff @angle:oh-py-pe harmonic 50.99 104.84 # SOURCE3 22 2.0337
angle_coeff @angle:oh-py-pf harmonic 50.99 104.84 # SOURCE3 22 same_as_oh-py-pe
angle_coeff @angle:oh-py-px harmonic 47.75 104.30 # SOURCE3 8 1.2772
angle_coeff @angle:oh-py-py harmonic 48.91 100.45 # SOURCE3 6 0.0000
angle_coeff @angle:oh-py-sx harmonic 37.44 100.94 # SOURCE3 4 0.0000
angle_coeff @angle:oh-py-sy harmonic 38.51 101.47 # SOURCE3 6 0.2490
angle_coeff @angle:o-py-oh harmonic 43.74 116.14 # SOURCE3 79 2.1455
angle_coeff @angle:o-py-os harmonic 43.55 116.79 # SOURCE3 17 1.3534
angle_coeff @angle:o-py-pe harmonic 49.46 114.56 # SOURCE3 12 3.6114
angle_coeff @angle:o-py-pf harmonic 49.46 114.56 # SOURCE3 12 same_as_o-py-pe
angle_coeff @angle:o-py-px harmonic 46.50 111.37 # SOURCE3 5 0.3803
angle_coeff @angle:o-py-py harmonic 44.97 120.43 # SOURCE3 16 6.0629
angle_coeff @angle:os-py-os harmonic 45.06 101.25 # SOURCE3 8 2.0860
angle_coeff @angle:os-py-py harmonic 47.94 104.48 # SOURCE3 4 0.0000
angle_coeff @angle:os-py-sx harmonic 36.90 103.86 # SOURCE3 2 0.0000
angle_coeff @angle:os-py-sy harmonic 38.37 102.12 # SOURCE3 2 0.0000
angle_coeff @angle:o-py-sx harmonic 34.68 118.56 # SOURCE3 7 6.2976
angle_coeff @angle:o-py-sy harmonic 36.96 111.71 # SOURCE3 5 1.1937
angle_coeff @angle:pe-py-pe harmonic 61.78 107.14 # SOURCE3 1 0.0000
angle_coeff @angle:pf-py-pf harmonic 61.78 107.14 # SOURCE3 1 same_as_pe-py-pe
angle_coeff @angle:py-py-py harmonic 55.80 112.70 # SOURCE3 1 0.0000
angle_coeff @angle:py-py-sx harmonic 58.65 61.54 # SOURCE3 4 0.0000
angle_coeff @angle:sy-py-sy harmonic 36.13 105.17 # SOURCE3 1 0.0000
angle_coeff @angle:c1-s2-o harmonic 65.76 117.25 # SOURCE3 1 0.0000
angle_coeff @angle:c2-s2-n2 harmonic 68.67 110.84 # SOURCE3 1 0.0000
angle_coeff @angle:c2-s2-o harmonic 66.18 114.70 # SOURCE2 1 0.0000
angle_coeff @angle:cl-s2-n1 harmonic 53.42 117.70 # SOURCE2 1 0.0000
angle_coeff @angle:f-s2-n1 harmonic 66.15 116.90 # SOURCE2 1 0.0000
angle_coeff @angle:n1-s2-o harmonic 73.05 108.46 # HF/6-31G* 1
angle_coeff @angle:n2-s2-o harmonic 67.93 121.20 # SOURCE2 2 0.8000
angle_coeff @angle:o-s2-o harmonic 67.99 116.17 # SOURCE3 1 0.0000
angle_coeff @angle:o-s2-s harmonic 63.79 118.30 # SOURCE2 1 0.0000
angle_coeff @angle:s-s2-s harmonic 63.50 115.04 # SOURCE3 1 0.0000
angle_coeff @angle:br-s4-br harmonic 64.61 98.02 # SOURCE3 1
angle_coeff @angle:br-s4-c3 harmonic 62.19 92.98 # SOURCE3 1 0.0000
angle_coeff @angle:br-s4-o harmonic 59.20 112.07 # SOURCE3 1 0.0000
angle_coeff @angle:c1-s4-c1 harmonic 65.35 93.55 # SOURCE3 1 0.0000
angle_coeff @angle:c1-s4-o harmonic 65.98 110.36 # SOURCE3 2 0.0000
angle_coeff @angle:c2-s4-c2 harmonic 62.00 102.29 # SOURCE3 1
angle_coeff @angle:c2-s4-c3 harmonic 63.48 94.95 # SOURCE3 1
angle_coeff @angle:c2-s4-o harmonic 66.61 107.09 # SOURCE3 1
angle_coeff @angle:c3-s4-c3 harmonic 62.07 96.82 # SOURCE3 11 1.5580
angle_coeff @angle:c3-s4-ca harmonic 62.99 95.00 # SOURCE3 1
angle_coeff @angle:c3-s4-f harmonic 66.32 91.70 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-hs harmonic 46.55 90.60 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-i harmonic 52.86 90.53 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-n2 harmonic 69.07 90.59 # SOURCE3 1
angle_coeff @angle:c3-s4-n3 harmonic 65.18 94.49 # SOURCE3 4 1.5570
angle_coeff @angle:c3-s4-n harmonic 64.28 96.07 # SOURCE3 4 1.0354
angle_coeff @angle:c3-s4-n4 harmonic 61.99 92.47 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-na harmonic 65.11 93.07 # SOURCE3 10 1.8813
angle_coeff @angle:c3-s4-nh harmonic 64.51 97.08 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-no harmonic 62.53 89.53 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-o harmonic 65.63 106.21 # SOURCE3 60 2.0426
angle_coeff @angle:c3-s4-oh harmonic 68.22 90.25 # SOURCE4 8 0.3023
angle_coeff @angle:c3-s4-os harmonic 68.23 90.06 # SOURCE3 4 0.4484
angle_coeff @angle:c3-s4-p2 harmonic 76.43 94.37 # SOURCE3 1
angle_coeff @angle:c3-s4-p3 harmonic 78.19 96.54 # SOURCE3 4 1.3634
angle_coeff @angle:c3-s4-p4 harmonic 73.69 97.40 # SOURCE3 1
angle_coeff @angle:c3-s4-p5 harmonic 78.32 99.18 # SOURCE3 1
angle_coeff @angle:c3-s4-s4 harmonic 64.31 89.50 # SOURCE3 1
angle_coeff @angle:c3-s4-s harmonic 61.31 98.72 # SOURCE3 2 0.0185
angle_coeff @angle:c3-s4-s6 harmonic 61.62 97.48 # SOURCE3 1
angle_coeff @angle:c3-s4-sh harmonic 60.74 94.66 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s4-ss harmonic 60.58 95.31 # SOURCE3 3 1.4101
angle_coeff @angle:ca-s4-ca harmonic 63.26 95.21 # SOURCE3 1
angle_coeff @angle:ca-s4-o harmonic 66.01 106.63 # SOURCE3 1
angle_coeff @angle:c-s4-c3 harmonic 61.53 95.07 # SOURCE3 1
angle_coeff @angle:c-s4-c harmonic 63.34 86.83 # SOURCE3 1
angle_coeff @angle:cl-s4-cl harmonic 53.89 97.68 # SOURCE3 1 0.0000
angle_coeff @angle:cl-s4-o harmonic 58.13 108.34 # SOURCE3 2 0.0000
angle_coeff @angle:c-s4-o harmonic 63.97 106.17 # SOURCE3 1
angle_coeff @angle:cx-s4-cx harmonic 86.71 48.80 # SOURCE2 1 0.0000
angle_coeff @angle:cx-s4-o harmonic 64.10 110.00 # SOURCE2 1 0.0000
angle_coeff @angle:f-s4-f harmonic 69.99 92.71 # SOURCE2 3 0.1490
angle_coeff @angle:f-s4-o harmonic 70.11 106.81 # SOURCE2 2 0.0100
angle_coeff @angle:f-s4-s harmonic 59.78 107.50 # SOURCE2 1 0.0000
angle_coeff @angle:hs-s4-hs harmonic 37.79 87.00 # SOURCE3 2 0.0202
angle_coeff @angle:hs-s4-n1 harmonic 51.22 90.51 # HF/6-31G* 1
angle_coeff @angle:hs-s4-o harmonic 49.80 110.27 # SOURCE3 5 0.1908
angle_coeff @angle:i-s4-i harmonic 54.45 97.29 # SOURCE3 1
angle_coeff @angle:i-s4-o harmonic 47.32 113.91 # SOURCE3 1 0.0000
angle_coeff @angle:n1-s4-n1 harmonic 72.41 94.02 # HF/6-31G* 1
angle_coeff @angle:n1-s4-o harmonic 70.24 110.09 # HF/6-31G* 1
angle_coeff @angle:n2-s4-n2 harmonic 75.77 90.17 # SOURCE3 1
angle_coeff @angle:n2-s4-o harmonic 72.12 107.57 # SOURCE3 1
angle_coeff @angle:n3-s4-n3 harmonic 68.89 91.19 # SOURCE3 1 0.0000
angle_coeff @angle:n3-s4-o harmonic 67.59 109.07 # SOURCE3 6 2.3605
angle_coeff @angle:n4-s4-n4 harmonic 60.39 94.61 # SOURCE3 1 0.0000
angle_coeff @angle:n4-s4-o harmonic 63.17 104.91 # SOURCE3 3 0.4370
angle_coeff @angle:na-s4-na harmonic 63.63 103.10 # SOURCE3 1
angle_coeff @angle:na-s4-o harmonic 66.52 109.75 # SOURCE3 10 2.6919
angle_coeff @angle:nh-s4-nh harmonic 68.96 92.24 # SOURCE3 1 0.0000
angle_coeff @angle:nh-s4-o harmonic 68.40 107.54 # SOURCE3 3 0.0401
angle_coeff @angle:n-s4-n harmonic 68.03 91.30 # SOURCE3 1
angle_coeff @angle:n-s4-o harmonic 68.09 105.70 # SOURCE3 4 1.6857
angle_coeff @angle:no-s4-no harmonic 63.55 83.40 # SOURCE3 1 0.0000
angle_coeff @angle:no-s4-o harmonic 62.93 103.58 # SOURCE3 3 1.5109
angle_coeff @angle:oh-s4-oh harmonic 69.00 100.34 # SOURCE3 1
angle_coeff @angle:o-s4-o harmonic 74.43 110.61 # SOURCE3 5 3.6413
angle_coeff @angle:o-s4-oh harmonic 69.42 110.13 # SOURCE4 10 0.5760
angle_coeff @angle:o-s4-os harmonic 69.67 109.02 # SOURCE3 8 1.5005
angle_coeff @angle:o-s4-p2 harmonic 76.18 106.77 # SOURCE3 1
angle_coeff @angle:o-s4-p3 harmonic 79.76 106.51 # SOURCE3 8 4.0943
angle_coeff @angle:o-s4-p4 harmonic 75.38 103.36 # SOURCE3 1
angle_coeff @angle:o-s4-p5 harmonic 85.32 96.95 # SOURCE3 1
angle_coeff @angle:o-s4-s4 harmonic 63.80 104.55 # SOURCE3 1
angle_coeff @angle:o-s4-s harmonic 61.69 112.22 # SOURCE3 4 2.8682
angle_coeff @angle:o-s4-s6 harmonic 64.33 102.84 # SOURCE3 1
angle_coeff @angle:o-s4-sh harmonic 60.56 107.51 # SOURCE3 3 0.7511
angle_coeff @angle:os-s4-os harmonic 71.26 93.68 # SOURCE3 2 2.4166
angle_coeff @angle:o-s4-ss harmonic 60.06 109.49 # SOURCE3 5 1.8509
angle_coeff @angle:p2-s4-p2 harmonic 98.20 92.62 # SOURCE3 1
angle_coeff @angle:p3-s4-p3 harmonic 101.37 95.71 # SOURCE3 2 1.2239
angle_coeff @angle:p5-s4-p5 harmonic 104.72 93.86 # SOURCE3 1
angle_coeff @angle:s4-s4-s4 harmonic 65.42 90.17 # SOURCE3 1
angle_coeff @angle:s4-s4-s6 harmonic 65.42 90.17 # SOURCE3 1
angle_coeff @angle:s6-s4-s6 harmonic 64.23 93.52 # SOURCE3 1
angle_coeff @angle:sh-s4-sh harmonic 58.79 102.76 # SOURCE3 1 0.0000
angle_coeff @angle:sh-s4-ss harmonic 58.85 102.64 # SOURCE3 1
angle_coeff @angle:s-s4-s harmonic 59.87 108.08 # SOURCE3 1 0.0000
angle_coeff @angle:ss-s4-ss harmonic 61.05 95.47 # SOURCE3 1 0.0000
angle_coeff @angle:br-s6-br harmonic 67.11 101.57 # SOURCE3 1 0.0000
angle_coeff @angle:br-s6-c3 harmonic 63.24 98.99 # SOURCE3 1 0.0000
angle_coeff @angle:br-s6-f harmonic 63.06 100.60 # SOURCE2 1 0.0000
angle_coeff @angle:br-s6-o harmonic 63.90 107.58 # SOURCE3 6 0.3000
angle_coeff @angle:c1-s6-c1 harmonic 64.09 99.99 # SOURCE3 1 0.0000
angle_coeff @angle:c1-s6-o harmonic 68.10 108.23 # SOURCE3 4 0.0000
angle_coeff @angle:c2-s6-c2 harmonic 61.86 102.75 # SOURCE3 1
angle_coeff @angle:c2-s6-c3 harmonic 61.23 104.05 # SOURCE3 1
angle_coeff @angle:c2-s6-o harmonic 67.53 106.58 # SOURCE3 1
angle_coeff @angle:c3-s6-c3 harmonic 61.35 102.83 # SOURCE3 7 1.2531
angle_coeff @angle:c3-s6-ca harmonic 61.51 103.17 # SOURCE3 1
angle_coeff @angle:c3-s6-cy harmonic 62.55 94.57 # SOURCE4 8 0.4183
angle_coeff @angle:c3-s6-f harmonic 65.73 97.11 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-hs harmonic 44.94 100.62 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-i harmonic 50.82 97.74 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-n2 harmonic 63.42 112.95 # SOURCE4 11 0.7920
angle_coeff @angle:c3-s6-n3 harmonic 65.71 101.38 # SOURCE4 60 0.9507
angle_coeff @angle:c3-s6-n harmonic 63.84 102.97 # SOURCE3 4 0.8785
angle_coeff @angle:c3-s6-n4 harmonic 61.33 99.40 # SOURCE3 3 0.4695
angle_coeff @angle:c3-s6-na harmonic 63.68 102.81 # SOURCE3 10 3.1256
angle_coeff @angle:c3-s6-nh harmonic 63.74 104.31 # SOURCE4 34 1.5848
angle_coeff @angle:c3-s6-no harmonic 60.08 99.57 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-o harmonic 66.59 108.32 # SOURCE3 112 1.8014
angle_coeff @angle:c3-s6-oh harmonic 67.71 98.60 # SOURCE4 42 0.8366
angle_coeff @angle:c3-s6-os harmonic 68.68 96.32 # SOURCE4 30 0.4539
angle_coeff @angle:c3-s6-p2 harmonic 72.54 106.47 # SOURCE3 1
angle_coeff @angle:c3-s6-p3 harmonic 76.24 103.40 # SOURCE3 3 0.8516
angle_coeff @angle:c3-s6-p4 harmonic 71.10 104.12 # SOURCE3 1
angle_coeff @angle:c3-s6-p5 harmonic 77.16 103.46 # SOURCE3 1
angle_coeff @angle:c3-s6-s4 harmonic 61.78 98.10 # SOURCE3 1
angle_coeff @angle:c3-s6-s harmonic 60.70 104.50 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-s6 harmonic 60.60 101.95 # SOURCE3 1
angle_coeff @angle:c3-s6-sh harmonic 60.07 101.84 # SOURCE3 1 0.0000
angle_coeff @angle:c3-s6-ss harmonic 59.68 102.47 # SOURCE3 3 1.7451
angle_coeff @angle:ca-s6-ca harmonic 61.80 103.08 # SOURCE3 1
angle_coeff @angle:ca-s6-o harmonic 68.37 104.07 # SOURCE4 59 0.5636
angle_coeff @angle:c-s6-c3 harmonic 60.12 101.24 # SOURCE3 1
angle_coeff @angle:c-s6-c harmonic 59.07 99.82 # SOURCE3 1
angle_coeff @angle:cc-s6-o harmonic 65.29 103.63 # SOURCE4 9 0.5934
angle_coeff @angle:cl-s6-cl harmonic 52.93 101.25 # SOURCE3 1 0.0000
angle_coeff @angle:cl-s6-f harmonic 57.88 99.00 # SOURCE2 1 0.0000
angle_coeff @angle:cl-s6-o harmonic 58.51 107.66 # SOURCE3 4 0.0000
angle_coeff @angle:c-s6-o harmonic 63.97 107.97 # SOURCE3 1
angle_coeff @angle:c-s6-os harmonic 64.36 102.12 # SOURCE3 1
angle_coeff @angle:cx-s6-cx harmonic 86.21 54.70 # SOURCE2 1 0.0000
angle_coeff @angle:cy-s6-o harmonic 63.83 110.22 # SOURCE4 20 1.1009
angle_coeff @angle:f-s6-f harmonic 70.81 94.70 # SOURCE2 3 0.9899
angle_coeff @angle:f-s6-o harmonic 72.38 106.48 # SOURCE3 2 0.0000
angle_coeff @angle:hs-s6-hs harmonic 35.84 99.02 # SOURCE3 2 0.0595
angle_coeff @angle:hs-s6-n1 harmonic 54.71 97.27 # HF/6-31G* 1
angle_coeff @angle:hs-s6-o harmonic 51.91 107.60 # SOURCE3 10 0.0343
angle_coeff @angle:i-s6-i harmonic 53.90 99.25 # SOURCE3 1
angle_coeff @angle:i-s6-o harmonic 47.73 109.74 # SOURCE3 2 0.0000
angle_coeff @angle:n1-s6-n1 harmonic 83.71 95.52 # HF/6-31G* 1
angle_coeff @angle:n1-s6-o harmonic 78.79 107.52 # HF/6-31G* 1
angle_coeff @angle:n2-s6-n2 harmonic 75.20 98.61 # SOURCE3 1
angle_coeff @angle:n2-s6-o harmonic 72.08 116.41 # SOURCE3 3 5.0830
angle_coeff @angle:n2-s6-oh harmonic 71.75 106.96 # SOURCE3 2 0.0000
angle_coeff @angle:n2-s6-os harmonic 73.30 103.25 # SOURCE3 1
angle_coeff @angle:n3-s6-n3 harmonic 71.49 98.57 # SOURCE4 7 0.2690
angle_coeff @angle:n3-s6-o harmonic 72.90 106.80 # SOURCE3 14 1.7908
angle_coeff @angle:n3-s6-os harmonic 72.84 99.26 # SOURCE4 8 0.5141
angle_coeff @angle:n4-s6-n4 harmonic 59.97 101.85 # SOURCE3 1 0.0000
angle_coeff @angle:n4-s6-o harmonic 65.83 102.92 # SOURCE3 10 1.5434
angle_coeff @angle:na-s6-na harmonic 67.74 98.04 # SOURCE3 1
angle_coeff @angle:na-s6-o harmonic 70.46 105.67 # SOURCE3 20 0.8019
angle_coeff @angle:nh-s6-nh harmonic 70.22 94.56 # SOURCE3 1 0.0000
angle_coeff @angle:nh-s6-o harmonic 70.23 109.12 # SOURCE3 6 0.9556
angle_coeff @angle:n-s6-n harmonic 66.18 104.16 # SOURCE3 1
angle_coeff @angle:n-s6-o harmonic 70.74 105.91 # SOURCE3 8 0.2953
angle_coeff @angle:no-s6-no harmonic 61.24 91.63 # SOURCE3 1 0.0000
angle_coeff @angle:no-s6-o harmonic 62.67 107.43 # SOURCE3 6 1.5494
angle_coeff @angle:n-s6-os harmonic 70.81 99.23 # SOURCE4 5 0.9794
angle_coeff @angle:oh-s6-oh harmonic 73.67 100.34 # SOURCE3 6 0.0076
angle_coeff @angle:oh-s6-os harmonic 75.33 96.62 # SOURCE4 26 0.6688
angle_coeff @angle:oh-s6-p2 harmonic 75.13 109.67 # SOURCE3 2 0.0000
angle_coeff @angle:o-s6-o harmonic 74.58 119.73 # SOURCE4 324 2.0530
angle_coeff @angle:o-s6-oh harmonic 74.13 108.21 # SOURCE3 18 0.7437
angle_coeff @angle:o-s6-os harmonic 74.58 107.84 # SOURCE3 12 0.7025
angle_coeff @angle:o-s6-p2 harmonic 76.65 106.61 # SOURCE3 1
angle_coeff @angle:o-s6-p3 harmonic 80.16 107.07 # SOURCE3 22 1.0550
angle_coeff @angle:o-s6-p4 harmonic 73.92 105.67 # SOURCE3 1
angle_coeff @angle:o-s6-p5 harmonic 81.69 106.64 # SOURCE3 1
angle_coeff @angle:o-s6-s4 harmonic 63.02 107.85 # SOURCE3 1
angle_coeff @angle:o-s6-s harmonic 63.52 110.29 # SOURCE3 6 2.2405
angle_coeff @angle:o-s6-s6 harmonic 63.55 106.07 # SOURCE3 1
angle_coeff @angle:o-s6-sh harmonic 62.53 106.81 # SOURCE3 6 0.6292
angle_coeff @angle:os-s6-os harmonic 74.80 98.70 # SOURCE3 1 0.0000
angle_coeff @angle:o-s6-ss harmonic 62.06 107.43 # SOURCE3 10 1.1423
angle_coeff @angle:p3-s6-p3 harmonic 94.93 110.17 # SOURCE3 4 5.3678
angle_coeff @angle:p5-s6-p5 harmonic 99.25 104.49 # SOURCE3 1
angle_coeff @angle:s4-s6-s4 harmonic 61.51 101.99 # SOURCE3 1
angle_coeff @angle:s4-s6-s6 harmonic 65.42 90.17 # SOURCE3 1
angle_coeff @angle:s6-s6-s6 harmonic 61.12 103.29 # SOURCE3 1
angle_coeff @angle:sh-s6-sh harmonic 59.41 106.43 # SOURCE3 1 0.0000
angle_coeff @angle:sh-s6-ss harmonic 60.36 102.64 # SOURCE3 1
angle_coeff @angle:s-s6-s harmonic 60.63 109.34 # SOURCE3 1 0.0000
angle_coeff @angle:ss-s6-ss harmonic 60.46 101.82 # SOURCE3 1 0.0000
angle_coeff @angle:br-sh-hs harmonic 43.54 95.64 # SOURCE3 1 0.0000
angle_coeff @angle:c1-sh-hs harmonic 48.23 95.99 # calculated_based_on_C#C-SH 0
angle_coeff @angle:c2-sh-hs harmonic 45.81 97.08 # SOURCE4 5 0.3132
angle_coeff @angle:c3-sh-hs harmonic 44.94 96.60 # SOURCE3 12 0.8009
angle_coeff @angle:ca-sh-hs harmonic 46.32 94.84 # SOURCE4 13 0.4130
angle_coeff @angle:cc-sh-hs harmonic 46.41 95.38 # SOURCE4 8 1.1410
angle_coeff @angle:c-sh-hs harmonic 45.96 96.07 # SOURCE3 6 1.1164
angle_coeff @angle:f-sh-hs harmonic 48.09 96.50 # SOURCE3 1 0.0000
angle_coeff @angle:hs-sh-hs harmonic 37.45 93.72 # SOURCE3 3 0.4777
angle_coeff @angle:hs-sh-i harmonic 37.09 96.44 # SOURCE3 1 0.0000
angle_coeff @angle:hs-sh-n1 harmonic 51.69 93.51 # HF/6-31G* 1
angle_coeff @angle:hs-sh-n2 harmonic 48.12 95.82 # SOURCE3 5 3.1495
angle_coeff @angle:hs-sh-n harmonic 48.41 95.59 # SOURCE3 4 3.9065
angle_coeff @angle:hs-sh-n3 harmonic 48.06 95.98 # SOURCE3 3 1.1735
angle_coeff @angle:hs-sh-n4 harmonic 47.15 93.13 # SOURCE3 3 0.1675
angle_coeff @angle:hs-sh-na harmonic 48.12 97.38 # SOURCE3 9 1.0223
angle_coeff @angle:hs-sh-nh harmonic 47.52 101.11 # SOURCE3 1 0.0000
angle_coeff @angle:hs-sh-no harmonic 47.35 92.93 # SOURCE3 1 0.0000
angle_coeff @angle:hs-sh-o harmonic 48.22 109.23 # SOURCE3 2 0.0068
angle_coeff @angle:hs-sh-oh harmonic 48.75 98.64 # SOURCE3 2 0.0605
angle_coeff @angle:hs-sh-os harmonic 49.35 98.15 # SOURCE3 3 0.1661
angle_coeff @angle:hs-sh-p2 harmonic 56.52 99.12 # SOURCE3 10 5.4110
angle_coeff @angle:hs-sh-p3 harmonic 53.11 95.81 # SOURCE3 3 0.4396
angle_coeff @angle:hs-sh-p4 harmonic 54.01 94.22 # SOURCE3 4 0.7605
angle_coeff @angle:hs-sh-p5 harmonic 54.80 94.52 # SOURCE3 3 0.5589
angle_coeff @angle:hs-sh-s harmonic 40.94 102.87 # SOURCE3 2 0.0000
angle_coeff @angle:hs-sh-s4 harmonic 42.04 92.16 # SOURCE3 3 1.6519
angle_coeff @angle:hs-sh-s6 harmonic 42.91 93.83 # SOURCE3 3 1.2561
angle_coeff @angle:hs-sh-sh harmonic 42.80 99.07 # SOURCE3 2 0.0000
angle_coeff @angle:hs-sh-ss harmonic 42.59 99.17 # SOURCE3 3 0.2457
angle_coeff @angle:br-ss-br harmonic 67.00 102.92 # SOURCE3 1 0.0000
angle_coeff @angle:br-ss-c3 harmonic 63.06 99.03 # SOURCE3 1 0.0000
angle_coeff @angle:c1-ss-c1 harmonic 66.30 98.30 # SOURCE2 1 0.0000
angle_coeff @angle:c1-ss-c3 harmonic 62.89 99.90 # SOURCE2 1 0.0000
angle_coeff @angle:c2-ss-c2 harmonic 63.71 99.56 # SOURCE3 1 0.0000
angle_coeff @angle:c2-ss-c3 harmonic 61.87 100.37 # SOURCE4 100 2.3280
angle_coeff @angle:c2-ss-cy harmonic 65.30 88.61 # SOURCE4 27 0.4481
angle_coeff @angle:c2-ss-n2 harmonic 64.45 106.76 # SOURCE3 1 0.0000
angle_coeff @angle:c2-ss-na harmonic 65.02 100.51 # SOURCE3 6 6.9702
angle_coeff @angle:c2-ss-os harmonic 69.78 89.76 # SOURCE3 1 0.0000
angle_coeff @angle:c2-ss-ss harmonic 64.78 92.26 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-c3 harmonic 60.63 99.92 # SOURCE3 14 2.0723
angle_coeff @angle:c3-ss-ca harmonic 60.80 102.12 # SOURCE4 161 1.3084
angle_coeff @angle:c3-ss-cc harmonic 61.74 100.75 # CORR 87
angle_coeff @angle:c3-ss-cd harmonic 61.74 100.75 # CORR 87
angle_coeff @angle:c3-ss-cl harmonic 56.40 99.40 # SOURCE2 1 0.0000
angle_coeff @angle:c3-ss-cy harmonic 61.94 94.32 # SOURCE4 62 0.3646
angle_coeff @angle:c3-ss-f harmonic 63.40 97.49 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-i harmonic 56.03 100.00 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-n1 harmonic 65.93 98.44 # HF/6-31G* 1
angle_coeff @angle:c3-ss-n2 harmonic 65.94 96.42 # SOURCE3 5 1.3604
angle_coeff @angle:c3-ss-n3 harmonic 64.10 98.83 # SOURCE3 3 0.2909
angle_coeff @angle:c3-ss-n harmonic 63.71 100.30 # SOURCE3 4 0.6579
angle_coeff @angle:c3-ss-n4 harmonic 62.94 97.79 # SOURCE3 3 0.2002
angle_coeff @angle:c3-ss-na harmonic 63.51 100.14 # SOURCE3 12 1.7415
angle_coeff @angle:c3-ss-nh harmonic 63.75 100.63 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-no harmonic 62.40 98.62 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-o harmonic 64.67 106.60 # SOURCE3 2 1.6714
angle_coeff @angle:c3-ss-oh harmonic 65.29 98.28 # SOURCE3 2 1.4326
angle_coeff @angle:c3-ss-os harmonic 64.97 98.21 # SOURCE3 4 1.7097
angle_coeff @angle:c3-ss-p2 harmonic 80.22 98.41 # SOURCE3 8 0.9454
angle_coeff @angle:c3-ss-p3 harmonic 76.29 98.70 # SOURCE3 3 0.0356
angle_coeff @angle:c3-ss-p4 harmonic 76.93 98.16 # SOURCE3 4 0.1361
angle_coeff @angle:c3-ss-p5 harmonic 75.86 100.22 # SOURCE4 23 1.1410
angle_coeff @angle:c3-ss-s4 harmonic 60.11 96.37 # SOURCE3 3 0.0202
angle_coeff @angle:c3-ss-s harmonic 59.94 101.90 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-s6 harmonic 60.94 96.76 # SOURCE3 3 1.5680
angle_coeff @angle:c3-ss-sh harmonic 60.36 101.93 # SOURCE3 1 0.0000
angle_coeff @angle:c3-ss-ss harmonic 60.34 103.10 # SOURCE4 70 1.3377
angle_coeff @angle:ca-ss-ca harmonic 62.76 98.71 # SOURCE4 97 1.2321
angle_coeff @angle:ca-ss-cc harmonic 66.53 89.47 # CORR 134
angle_coeff @angle:ca-ss-cd harmonic 66.53 89.47 # CORR 134
angle_coeff @angle:ca-ss-cl harmonic 56.45 101.05 # SOURCE3 1 0.0000
angle_coeff @angle:ca-ss-n harmonic 65.76 97.16 # SOURCE3 1
angle_coeff @angle:ca-ss-na harmonic 64.76 99.32 # SOURCE3 1
angle_coeff @angle:ca-ss-nc harmonic 69.21 94.76 # SOURCE3 1 0.0000
angle_coeff @angle:ca-ss-nd harmonic 69.21 94.76 # SOURCE3 1 same_as_ca-ss-nc
angle_coeff @angle:ca-ss-ss harmonic 60.39 104.90 # SOURCE4 19 0.8743
angle_coeff @angle:c-ss-c2 harmonic 65.63 92.43 # SOURCE3 1 0.0000
angle_coeff @angle:c-ss-c3 harmonic 61.48 100.29 # SOURCE3 5 2.2127
angle_coeff @angle:c-ss-c harmonic 62.20 101.40 # SOURCE3 1 0.0000
angle_coeff @angle:c-ss-cc harmonic 65.61 92.43 # SOURCE4 14 2.3600
angle_coeff @angle:cc-ss-cc harmonic 67.01 89.91 # SOURCE3 11 2.2164
angle_coeff @angle:cc-ss-cd harmonic 67.07 89.74 # SOURCE4 49 0.7509
angle_coeff @angle:cc-ss-n harmonic 66.42 97.16 # SOURCE3 1 same_as_cd-ss-n
angle_coeff @angle:cc-ss-na harmonic 65.39 99.33 # SOURCE3 18 same_as_cd-ss-na
angle_coeff @angle:cc-ss-nc harmonic 70.31 94.08 # CORR 13
angle_coeff @angle:cc-ss-os harmonic 66.48 98.81 # SOURCE3 2 2.1583
angle_coeff @angle:cc-ss-ss harmonic 63.91 94.76 # CORR 13
angle_coeff @angle:cd-ss-cd harmonic 67.01 89.91 # SOURCE3 11 2.2164
angle_coeff @angle:cd-ss-n harmonic 66.42 97.16 # SOURCE3 1 0.0000
angle_coeff @angle:cd-ss-na harmonic 65.39 99.33 # SOURCE3 18 2.5847
angle_coeff @angle:cd-ss-nd harmonic 70.31 94.08 # CORR 13
angle_coeff @angle:cd-ss-os harmonic 66.48 98.81 # SOURCE3 2 same_as_cc-ss-os
angle_coeff @angle:cd-ss-ss harmonic 63.91 94.76 # CORR 13
angle_coeff @angle:cl-ss-cl harmonic 52.39 103.37 # SOURCE3 1 0.0000
angle_coeff @angle:cx-ss-cx harmonic 87.49 48.30 # SOURCE2 1 0.0000
angle_coeff @angle:f-ss-f harmonic 66.18 98.30 # SOURCE2 1 0.0000
angle_coeff @angle:f-ss-ss harmonic 59.85 108.30 # SOURCE2 1 0.0000
angle_coeff @angle:i-ss-i harmonic 58.15 106.29 # SOURCE3 1 0.0000
angle_coeff @angle:n1-ss-n1 harmonic 73.07 96.96 # HF/6-31G* 1
angle_coeff @angle:n2-ss-n2 harmonic 71.12 96.75 # SOURCE3 1 0.0000
angle_coeff @angle:n3-ss-n3 harmonic 66.50 102.34 # SOURCE3 1 0.0000
angle_coeff @angle:n4-ss-n4 harmonic 63.55 101.19 # SOURCE3 1 0.0000
angle_coeff @angle:na-ss-na harmonic 65.92 102.81 # SOURCE3 1 0.0000
angle_coeff @angle:nc-ss-nc harmonic 75.03 97.94 # CORR 9
angle_coeff @angle:nd-ss-nd harmonic 75.03 97.94 # CORR 9
angle_coeff @angle:nh-ss-nh harmonic 65.30 107.89 # SOURCE3 1 0.0000
angle_coeff @angle:n-ss-n harmonic 66.45 103.10 # SOURCE3 1 0.0000
angle_coeff @angle:no-ss-no harmonic 61.43 106.43 # SOURCE3 1 0.0000
angle_coeff @angle:oh-ss-oh harmonic 68.23 104.25 # SOURCE3 1 0.0000
angle_coeff @angle:o-ss-o harmonic 69.80 119.30 # SOURCE2 1 0.0000
angle_coeff @angle:o-ss-p5 harmonic 78.64 106.41 # SOURCE3 1 0.0000
angle_coeff @angle:o-ss-s6 harmonic 62.35 105.39 # SOURCE3 1
angle_coeff @angle:os-ss-os harmonic 67.76 102.99 # SOURCE3 1 0.0000
angle_coeff @angle:o-ss-ss harmonic 62.04 112.70 # SOURCE2 1 0.0000
angle_coeff @angle:p2-ss-p2 harmonic 105.52 99.52 # SOURCE3 1 0.0000
angle_coeff @angle:p3-ss-p3 harmonic 96.77 101.67 # SOURCE3 1
angle_coeff @angle:p5-ss-p5 harmonic 103.25 89.83 # SOURCE3 1 0.0000
angle_coeff @angle:s4-ss-s4 harmonic 60.86 96.08 # SOURCE3 1 0.0000
angle_coeff @angle:s4-ss-s6 harmonic 59.93 101.26 # SOURCE3 1
angle_coeff @angle:s6-ss-s6 harmonic 60.46 101.81 # SOURCE3 1 0.0000
angle_coeff @angle:sh-ss-sh harmonic 60.28 107.54 # SOURCE3 1 0.0000
angle_coeff @angle:sh-ss-ss harmonic 60.81 106.53 # SOURCE3 1
angle_coeff @angle:s-ss-s harmonic 57.67 115.04 # SOURCE3 1
angle_coeff @angle:ss-ss-ss harmonic 60.44 108.76 # SOURCE4 8 0.2385
angle_coeff @angle:c3-sx-ca harmonic 61.85 96.41 # SOURCE4 13 0.3130
angle_coeff @angle:c3-sx-cc harmonic 62.52 95.11 # SOURCE4 17 0.6557
angle_coeff @angle:c3-sx-ce harmonic 62.82 94.95 # SOURCE3 3 0.0007
angle_coeff @angle:c3-sx-cf harmonic 62.82 94.95 # SOURCE3 3 same_as_c3-sx-ce
angle_coeff @angle:c3-sx-ne harmonic 65.33 90.06 # SOURCE3 5 1.9627
angle_coeff @angle:c3-sx-nf harmonic 65.33 90.06 # SOURCE3 5 same_as_c3-sx-ne
angle_coeff @angle:c3-sx-o harmonic 64.94 107.88 # SOURCE3 30 0.8721
angle_coeff @angle:c3-sx-pe harmonic 76.99 94.32 # SOURCE3 7 0.5547
angle_coeff @angle:c3-sx-pf harmonic 76.99 94.32 # SOURCE3 7 same_as_c3-sx-pe
angle_coeff @angle:c3-sx-px harmonic 74.26 96.46 # SOURCE3 3 1.3351
angle_coeff @angle:c3-sx-py harmonic 74.13 95.67 # SOURCE3 1 0.0000
angle_coeff @angle:c3-sx-sx harmonic 57.22 91.47 # SOURCE3 4 1.9919
angle_coeff @angle:c3-sx-sy harmonic 58.71 95.47 # SOURCE3 3 2.8422
angle_coeff @angle:ca-sx-ca harmonic 61.97 95.21 # SOURCE3 1 0.0000
angle_coeff @angle:ca-sx-o harmonic 64.82 106.89 # SOURCE4 25 0.5562
angle_coeff @angle:c-sx-c3 harmonic 62.01 92.71 # SOURCE3 3 0.3095
angle_coeff @angle:c-sx-c harmonic 62.83 86.85 # SOURCE3 1 0.0000
angle_coeff @angle:cc-sx-o harmonic 65.92 104.49 # SOURCE4 17 1.7759
angle_coeff @angle:ce-sx-ce harmonic 63.02 94.96 # SOURCE3 1 0.0000
angle_coeff @angle:ce-sx-o harmonic 65.38 107.47 # SOURCE3 5 0.3128
angle_coeff @angle:cf-sx-cf harmonic 63.02 94.96 # SOURCE3 1 same_as_ce-sx-ce
angle_coeff @angle:cf-sx-o harmonic 65.38 107.47 # SOURCE3 5 same_as_ce-sx-o
angle_coeff @angle:c-sx-o harmonic 63.47 106.17 # SOURCE3 5 0.9477
angle_coeff @angle:ne-sx-ne harmonic 66.37 90.17 # SOURCE3 1 0.0000
angle_coeff @angle:ne-sx-o harmonic 65.36 109.20 # SOURCE3 7 1.4542
angle_coeff @angle:nf-sx-nf harmonic 66.37 90.17 # SOURCE3 1 same_as_ne-sx-ne
angle_coeff @angle:nf-sx-o harmonic 65.36 109.20 # SOURCE3 7 same_as_ne-sx-o
angle_coeff @angle:o-sx-pe harmonic 77.00 106.43 # SOURCE3 9 2.8345
angle_coeff @angle:o-sx-pf harmonic 77.00 106.43 # SOURCE3 9 same_as_o-sx-pe
angle_coeff @angle:o-sx-px harmonic 75.16 104.77 # SOURCE3 3 1.9810
angle_coeff @angle:o-sx-py harmonic 73.10 109.13 # SOURCE3 7 5.6840
angle_coeff @angle:o-sx-sx harmonic 55.68 104.65 # SOURCE3 6 3.0524
angle_coeff @angle:o-sx-sy harmonic 59.44 103.41 # SOURCE3 5 0.9618
angle_coeff @angle:pe-sx-pe harmonic 99.19 92.62 # SOURCE3 1 0.0000
angle_coeff @angle:pf-sx-pf harmonic 99.19 92.62 # SOURCE3 1 same_as_pe-sx-pe
angle_coeff @angle:py-sx-py harmonic 110.11 69.23 # SOURCE3 3 17.4143
angle_coeff @angle:sx-sx-sx harmonic 58.65 84.90 # SOURCE3 1 0.0000
angle_coeff @angle:sy-sx-sy harmonic 59.25 93.52 # SOURCE3 1 0.0000
angle_coeff @angle:c3-sy-ca harmonic 60.74 103.86 # SOURCE4 54 0.3180
angle_coeff @angle:c3-sy-cc harmonic 61.24 102.19 # SOURCE4 12 1.5324
angle_coeff @angle:c3-sy-ce harmonic 60.79 103.81 # SOURCE3 3 0.3368
angle_coeff @angle:c3-sy-cf harmonic 60.79 103.81 # SOURCE3 3 same_as_c3-sy-ce
angle_coeff @angle:c3-sy-ne harmonic 63.01 103.12 # SOURCE3 5 4.1882
angle_coeff @angle:c3-sy-nf harmonic 63.01 103.12 # SOURCE3 5 same_as_c3-sy-ne
angle_coeff @angle:c3-sy-o harmonic 65.97 108.48 # SOURCE3 62 0.8576
angle_coeff @angle:c3-sy-pe harmonic 71.79 106.03 # SOURCE3 6 2.6117
angle_coeff @angle:c3-sy-pf harmonic 71.79 106.03 # SOURCE3 6 same_as_c3-sy-pe
angle_coeff @angle:c3-sy-px harmonic 71.71 103.62 # SOURCE3 3 0.7078
angle_coeff @angle:c3-sy-py harmonic 73.48 103.39 # SOURCE3 3 0.4563
angle_coeff @angle:c3-sy-sx harmonic 56.27 104.64 # SOURCE3 3 4.6276
angle_coeff @angle:c3-sy-sy harmonic 57.43 100.78 # SOURCE3 4 1.1633
angle_coeff @angle:ca-sy-ca harmonic 60.65 104.04 # SOURCE4 25 2.0762
angle_coeff @angle:ca-sy-cc harmonic 60.36 105.09 # SOURCE4 5 0.3628
angle_coeff @angle:ca-sy-n3 harmonic 64.10 102.48 # SOURCE4 180 1.0802
angle_coeff @angle:ca-sy-n harmonic 62.89 105.45 # SOURCE4 51 1.1497
angle_coeff @angle:ca-sy-ne harmonic 62.86 103.47 # SOURCE4 11 1.6071
angle_coeff @angle:ca-sy-nh harmonic 62.86 105.59 # SOURCE4 78 1.5805
angle_coeff @angle:ca-sy-o harmonic 65.84 108.73 # SOURCE3 26 1.2638
angle_coeff @angle:ca-sy-oh harmonic 65.64 101.25 # SOURCE4 23 0.9100
angle_coeff @angle:ca-sy-os harmonic 67.64 92.98 # SOURCE3 1 0.0000
angle_coeff @angle:c-sy-c3 harmonic 60.09 101.25 # SOURCE3 3 1.1850
angle_coeff @angle:c-sy-c harmonic 59.23 99.81 # SOURCE3 1 0.0000
angle_coeff @angle:cc-sy-n3 harmonic 64.10 102.54 # CORR 30
angle_coeff @angle:cc-sy-o harmonic 66.17 107.71 # CORR 100
angle_coeff @angle:cd-sy-n3 harmonic 64.10 102.54 # CORR 30
angle_coeff @angle:cd-sy-nh harmonic 65.53 97.20 # SOURCE4 6 0.2429
angle_coeff @angle:cd-sy-o harmonic 66.17 107.71 # CORR 100
angle_coeff @angle:ce-sy-ce harmonic 61.09 102.78 # SOURCE3 1 0.0000
angle_coeff @angle:ce-sy-o harmonic 66.35 107.25 # SOURCE3 10 0.5477
angle_coeff @angle:cf-sy-cf harmonic 61.09 102.78 # SOURCE3 1 same_as_ce-sy-ce
angle_coeff @angle:cf-sy-o harmonic 66.35 107.25 # SOURCE3 10 same_as_ce-sy-o
angle_coeff @angle:c-sy-o harmonic 64.07 107.23 # SOURCE3 10 0.8425
angle_coeff @angle:f-sy-o harmonic 63.64 105.60 # SOURCE4 7 0.2000
angle_coeff @angle:n2-sy-o harmonic 61.16 123.53 # SOURCE4 6 1.2388
angle_coeff @angle:n3-sy-ne harmonic 66.36 102.40 # SOURCE4 5 1.3390
angle_coeff @angle:n3-sy-o harmonic 70.45 107.11 # SOURCE4 375 1.1257
angle_coeff @angle:na-sy-na harmonic 67.74 98.04 # SOURCE3 1
angle_coeff @angle:nc-sy-nc harmonic 75.24 98.04 # SOURCE3 2
angle_coeff @angle:nd-sy-nd harmonic 75.24 98.04 # SOURCE3 2
angle_coeff @angle:ne-sy-ne harmonic 66.58 98.62 # SOURCE3 1 0.0000
angle_coeff @angle:ne-sy-o harmonic 68.89 107.06 # SOURCE3 14 2.2705
angle_coeff @angle:nf-sy-nf harmonic 66.58 98.62 # SOURCE3 1 same_as_ne-sy-ne
angle_coeff @angle:nf-sy-o harmonic 68.89 107.06 # SOURCE3 14 same_as_ne-sy-o
angle_coeff @angle:nh-sy-o harmonic 70.18 106.38 # SOURCE4 123 1.6517
angle_coeff @angle:n-sy-o harmonic 69.79 107.50 # SOURCE4 61 1.8720
angle_coeff @angle:o-sy-o harmonic 72.40 121.88 # SOURCE3 46 0.9495
angle_coeff @angle:o-sy-oh harmonic 72.26 106.93 # SOURCE3 8 0.7424
angle_coeff @angle:o-sy-os harmonic 70.39 108.31 # SOURCE4 7 0.1222
angle_coeff @angle:o-sy-pe harmonic 75.40 106.90 # SOURCE3 12 1.4524
angle_coeff @angle:o-sy-pf harmonic 75.40 106.90 # SOURCE3 12 same_as_o-sy-pe
angle_coeff @angle:o-sy-px harmonic 74.45 106.17 # SOURCE3 6 0.7059
angle_coeff @angle:o-sy-py harmonic 76.54 106.67 # SOURCE3 10 0.6478
angle_coeff @angle:o-sy-sx harmonic 58.62 106.33 # SOURCE3 10 2.0456
angle_coeff @angle:o-sy-sy harmonic 58.79 106.19 # SOURCE3 12 0.1754
angle_coeff @angle:py-sy-py harmonic 92.79 104.49 # SOURCE3 1 0.0000
angle_coeff @angle:sx-sy-sx harmonic 56.74 101.99 # SOURCE3 1 0.0000
angle_coeff @angle:sy-sy-sy harmonic 56.50 103.29 # SOURCE3 1 0.0000
angle_coeff @angle:c2-c1-cf harmonic 58.18 179.01 # NEW 6
angle_coeff @angle:c3-c1-ch harmonic 55.79 178.52 # NEW 39
angle_coeff @angle:nf-c1-s harmonic 57.59 175.81 # NEW 8
angle_coeff @angle:br-c2-cf harmonic 63.21 121.59 # NEW 7
angle_coeff @angle:cd-c2-h4 harmonic 49.19 120.33 # NEW 7
angle_coeff @angle:cd-c2-nh harmonic 69.46 122.96 # NEW 10
angle_coeff @angle:cd-c2-o harmonic 72.80 123.59 # NEW 6
angle_coeff @angle:cf-c2-cl harmonic 58.06 123.90 # NEW 11
angle_coeff @angle:cf-c2-h4 harmonic 49.38 122.29 # NEW 75
angle_coeff @angle:cf-c2-na harmonic 68.82 123.71 # NEW 6
angle_coeff @angle:cf-c2-nh harmonic 70.64 120.72 # NEW 93
angle_coeff @angle:cf-c2-no harmonic 68.45 119.65 # NEW 5
angle_coeff @angle:cf-c2-o harmonic 73.66 123.08 # NEW 5
angle_coeff @angle:cf-c2-oh harmonic 70.90 123.27 # NEW 42
angle_coeff @angle:cf-c2-os harmonic 70.47 122.52 # NEW 51
angle_coeff @angle:h4-c2-nf harmonic 52.87 119.63 # NEW 10
angle_coeff @angle:h5-c2-nf harmonic 52.76 119.62 # NEW 17
angle_coeff @angle:nf-c2-os harmonic 74.86 118.76 # NEW 5
angle_coeff @angle:nf-c2-ss harmonic 65.41 120.06 # NEW 9
angle_coeff @angle:n-c2-nf harmonic 70.89 125.38 # NEW 10
angle_coeff @angle:ca-c3-cf harmonic 63.81 112.33 # NEW 51
angle_coeff @angle:cd-c3-cx harmonic 63.85 112.55 # NEW 5
angle_coeff @angle:c-c3-cf harmonic 64.02 111.98 # NEW 16
angle_coeff @angle:cd-c3-hx harmonic 47.17 111.02 # NEW 9
angle_coeff @angle:cd-c3-n2 harmonic 66.85 110.47 # NEW 11
angle_coeff @angle:cd-c3-n4 harmonic 64.88 115.58 # NEW 6
angle_coeff @angle:cd-c3-na harmonic 66.43 113.39 # NEW 8
angle_coeff @angle:cd-c3-p5 harmonic 76.89 116.23 # NEW 6
angle_coeff @angle:cf-c3-cf harmonic 64.24 111.44 # NEW 18
angle_coeff @angle:cf-c3-n harmonic 67.09 110.41 # NEW 6
angle_coeff @angle:cf-c3-oh harmonic 68.00 111.05 # NEW 17
angle_coeff @angle:cf-c3-os harmonic 68.64 108.10 # NEW 16
angle_coeff @angle:cf-c3-ss harmonic 61.87 111.10 # NEW 7
angle_coeff @angle:cd-ca-cq harmonic 64.63 124.30 # NEW 10
angle_coeff @angle:cf-ca-na harmonic 67.44 119.85 # NEW 9
angle_coeff @angle:ch-ca-cq harmonic 65.26 121.53 # NEW 12
angle_coeff @angle:cl-ca-cq harmonic 58.19 120.31 # NEW 18
angle_coeff @angle:cq-ca-f harmonic 67.10 119.39 # NEW 16
angle_coeff @angle:cq-ca-h4 harmonic 48.15 120.03 # NEW 27
angle_coeff @angle:cq-ca-na harmonic 72.91 108.79 # NEW 165
angle_coeff @angle:cq-ca-nb harmonic 68.56 123.72 # NEW 50
angle_coeff @angle:cq-ca-nh harmonic 68.66 121.52 # NEW 11
angle_coeff @angle:cq-ca-oh harmonic 69.26 120.96 # NEW 12
angle_coeff @angle:cq-ca-ss harmonic 63.87 112.75 # NEW 8
angle_coeff @angle:ca-c-nf harmonic 67.74 114.39 # NEW 5
angle_coeff @angle:br-cd-c harmonic 63.98 115.68 # NEW 8
angle_coeff @angle:br-cd-cd harmonic 61.82 124.89 # NEW 8
angle_coeff @angle:br-cd-cc harmonic 62.26 124.56 # NEW 32
angle_coeff @angle:br-cd-na harmonic 64.60 121.42 # NEW 6
angle_coeff @angle:ca-cd-cf harmonic 62.51 127.87 # NEW 11
angle_coeff @angle:ca-cd-nh harmonic 67.46 122.45 # NEW 9
angle_coeff @angle:cd-c-cf harmonic 64.64 115.68 # NEW 6
angle_coeff @angle:cd-cd-f harmonic 66.35 119.41 # NEW 7
angle_coeff @angle:c-cd-ch harmonic 64.98 118.14 # NEW 7
angle_coeff @angle:cd-cd-sy harmonic 59.22 128.36 # NEW 8
angle_coeff @angle:cc-cd-f harmonic 67.42 121.08 # NEW 28
angle_coeff @angle:cc-cd-no harmonic 65.78 128.95 # NEW 117
angle_coeff @angle:c-cd-f harmonic 66.16 116.87 # NEW 16
angle_coeff @angle:ch-cd-na harmonic 67.51 122.35 # NEW 5
angle_coeff @angle:ch-cd-ss harmonic 62.33 120.70 # NEW 12
angle_coeff @angle:cd-c-h4 harmonic 47.13 115.45 # NEW 5
angle_coeff @angle:cl-cd-na harmonic 59.37 121.61 # NEW 12
angle_coeff @angle:cl-cd-ss harmonic 58.09 119.85 # NEW 11
angle_coeff @angle:c-cd-nf harmonic 67.11 119.88 # NEW 6
angle_coeff @angle:cd-c-s harmonic 61.67 127.94 # NEW 12
angle_coeff @angle:cd-c-ss harmonic 63.47 112.52 # NEW 10
angle_coeff @angle:cx-cd-nc harmonic 65.61 127.75 # NEW 12
angle_coeff @angle:cx-cd-os harmonic 67.94 118.08 # NEW 10
angle_coeff @angle:cc-c-cx harmonic 63.88 117.46 # NEW 13
angle_coeff @angle:cc-c-nc harmonic 68.65 113.75 # NEW 14
angle_coeff @angle:cf-c-cx harmonic 63.95 116.25 # NEW 6
angle_coeff @angle:cf-c-h4 harmonic 46.93 114.88 # NEW 19
angle_coeff @angle:cf-c-ss harmonic 63.94 110.39 # NEW 5
angle_coeff @angle:na-cd-no harmonic 68.48 124.90 # NEW 48
angle_coeff @angle:na-cd-oh harmonic 73.25 117.26 # NEW 16
angle_coeff @angle:na-cd-sx harmonic 63.25 117.04 # NEW 13
angle_coeff @angle:na-cd-sy harmonic 63.13 120.55 # NEW 7
angle_coeff @angle:nd-cd-no harmonic 69.31 121.54 # NEW 7
angle_coeff @angle:nc-cd-nc harmonic 70.88 128.17 # NEW 7
angle_coeff @angle:nc-cd-nf harmonic 69.29 129.66 # NEW 7
angle_coeff @angle:nc-cd-no harmonic 69.90 122.68 # NEW 16
angle_coeff @angle:nc-cd-sh harmonic 62.75 124.92 # NEW 5
angle_coeff @angle:nc-cd-sx harmonic 60.81 127.60 # NEW 14
angle_coeff @angle:nc-cd-sy harmonic 62.75 123.08 # NEW 13
angle_coeff @angle:nf-cd-ss harmonic 65.39 116.99 # NEW 7
angle_coeff @angle:n-cd-n2 harmonic 74.78 114.48 # NEW 15
angle_coeff @angle:no-cd-os harmonic 71.01 117.59 # NEW 62
angle_coeff @angle:no-cd-ss harmonic 63.76 121.10 # NEW 10
angle_coeff @angle:ca-cc-cf harmonic 65.09 125.10 # NEW 9
angle_coeff @angle:ca-cc-na harmonic 67.03 123.45 # NEW 39
angle_coeff @angle:cd-cc-cg harmonic 64.92 126.05 # NEW 30
angle_coeff @angle:cd-cc-cy harmonic 63.93 122.13 # NEW 10
angle_coeff @angle:cd-cc-nd harmonic 69.42 123.82 # NEW 14
angle_coeff @angle:cc-cc-cy harmonic 63.17 120.93 # NEW 6
angle_coeff @angle:cf-cc-nc harmonic 68.22 124.90 # NEW 5
angle_coeff @angle:c-cc-h4 harmonic 46.77 118.19 # NEW 8
angle_coeff @angle:na-cc-nh harmonic 72.43 116.98 # NEW 46
angle_coeff @angle:na-cc-ss harmonic 67.07 111.46 # NEW 20
angle_coeff @angle:nc-cc-nc harmonic 69.47 125.58 # NEW 13
angle_coeff @angle:oh-cc-os harmonic 75.54 111.61 # NEW 6
angle_coeff @angle:c2-cf-cl harmonic 57.87 119.51 # NEW 24
angle_coeff @angle:c2-cf-h4 harmonic 48.64 125.58 # NEW 11
angle_coeff @angle:c2-cf-n1 harmonic 72.67 117.85 # NEW 7
angle_coeff @angle:c2-cf-na harmonic 69.29 119.19 # NEW 5
angle_coeff @angle:c2-cf-oh harmonic 70.32 123.78 # NEW 10
angle_coeff @angle:c3-cf-ch harmonic 63.79 118.48 # NEW 8
angle_coeff @angle:c3-cf-ne harmonic 67.26 120.75 # NEW 6
angle_coeff @angle:c3-cf-nh harmonic 65.76 119.90 # NEW 5
angle_coeff @angle:ca-cf-cf harmonic 63.84 119.62 # NEW 14
angle_coeff @angle:ca-cf-cl harmonic 57.99 114.22 # NEW 6
angle_coeff @angle:ca-cf-h4 harmonic 46.71 116.86 # NEW 74
angle_coeff @angle:ca-cf-nh harmonic 67.87 115.51 # NEW 93
angle_coeff @angle:ca-cf-os harmonic 68.60 115.58 # NEW 8
angle_coeff @angle:ca-cf-ss harmonic 61.21 117.73 # NEW 5
angle_coeff @angle:c-cf-ca harmonic 63.79 117.98 # NEW 8
angle_coeff @angle:cd-cf-cc harmonic 63.28 130.36 # NEW 5
angle_coeff @angle:c-cf-cf harmonic 63.46 120.89 # NEW 16
angle_coeff @angle:c-cf-ch harmonic 64.57 118.32 # NEW 15
angle_coeff @angle:cd-cf-h4 harmonic 47.52 115.40 # NEW 29
angle_coeff @angle:c-cf-cl harmonic 57.67 115.40 # NEW 6
angle_coeff @angle:cd-cf-nh harmonic 67.31 119.17 # NEW 8
angle_coeff @angle:c-cf-cy harmonic 72.72 88.22 # NEW 19
angle_coeff @angle:cf-cf-cl harmonic 57.29 117.93 # NEW 12
angle_coeff @angle:cf-cf-oh harmonic 69.29 116.89 # NEW 11
angle_coeff @angle:ce-cf-cy harmonic 60.53 137.74 # NEW 13
angle_coeff @angle:ce-cf-h4 harmonic 49.02 123.76 # NEW 5
angle_coeff @angle:ce-cf-n1 harmonic 72.03 120.03 # NEW 6
angle_coeff @angle:ce-cf-nh harmonic 69.48 121.52 # NEW 12
angle_coeff @angle:ch-cf-n2 harmonic 69.59 121.43 # NEW 6
angle_coeff @angle:c-cf-oh harmonic 68.34 117.92 # NEW 5
angle_coeff @angle:c-cf-os harmonic 69.09 113.78 # NEW 21
angle_coeff @angle:h4-cf-n1 harmonic 52.58 116.36 # NEW 7
angle_coeff @angle:h4-cf-nf harmonic 49.72 115.81 # NEW 7
angle_coeff @angle:n2-cf-os harmonic 74.58 118.13 # NEW 6
angle_coeff @angle:n2-cf-ss harmonic 64.40 117.23 # NEW 6
angle_coeff @angle:nf-cf-nh harmonic 71.89 112.91 # NEW 12
angle_coeff @angle:ne-cf-nh harmonic 73.31 118.13 # NEW 6
angle_coeff @angle:ca-ce-cd harmonic 62.70 130.80 # NEW 12
angle_coeff @angle:c-ce-cc harmonic 64.25 117.76 # NEW 10
angle_coeff @angle:c-ce-n2 harmonic 70.16 114.88 # NEW 5
angle_coeff @angle:h4-ce-nf harmonic 52.29 120.21 # NEW 6
angle_coeff @angle:c1-ch-cd harmonic 56.97 178.60 # NEW 6
angle_coeff @angle:ch-cg-cg harmonic 58.68 179.67 # NEW 7
angle_coeff @angle:n-c-nf harmonic 74.43 110.37 # NEW 10
angle_coeff @angle:ca-cq-na harmonic 68.78 119.43 # NEW 21
angle_coeff @angle:nb-cq-nb harmonic 71.31 125.72 # NEW 5
angle_coeff @angle:cd-cx-hc harmonic 47.37 113.84 # NEW 15
angle_coeff @angle:cf-cy-h2 harmonic 45.50 117.25 # NEW 17
angle_coeff @angle:cf-cy-n harmonic 74.69 88.02 # NEW 14
angle_coeff @angle:cf-cy-ss harmonic 58.47 121.33 # NEW 13
angle_coeff @angle:cd-n2-na harmonic 73.01 108.92 # NEW 9
angle_coeff @angle:cd-n2-nh harmonic 70.37 118.47 # NEW 6
angle_coeff @angle:c3-n4-cd harmonic 62.84 111.09 # NEW 7
angle_coeff @angle:c3-na-cq harmonic 63.76 119.46 # NEW 7
angle_coeff @angle:ca-na-cq harmonic 65.88 120.96 # NEW 20
angle_coeff @angle:cd-na-cf harmonic 63.05 126.61 # NEW 8
angle_coeff @angle:cq-nb-nb harmonic 68.79 121.11 # NEW 12
angle_coeff @angle:c-n-cf harmonic 62.21 131.83 # NEW 146
angle_coeff @angle:ca-nc-nd harmonic 73.55 108.41 # NEW 9
angle_coeff @angle:c2-nf-ch harmonic 68.36 123.58 # NEW 12
angle_coeff @angle:c-nf-sy harmonic 61.66 116.05 # NEW 6
angle_coeff @angle:c3-nh-ce harmonic 63.47 119.92 # NEW 20
angle_coeff @angle:cd-nh-n2 harmonic 68.23 119.66 # NEW 5
angle_coeff @angle:cd-nh-sy harmonic 61.22 122.91 # NEW 23
angle_coeff @angle:cf-nh-sy harmonic 63.58 112.97 # NEW 7
angle_coeff @angle:hn-n-nd harmonic 50.74 115.24 # NEW 10
angle_coeff @angle:cd-no-o harmonic 70.34 117.52 # NEW 198
angle_coeff @angle:n3-py-nf harmonic 41.93 108.44 # NEW 12
angle_coeff @angle:cd-s6-o harmonic 70.23 103.63 # NEW 9
angle_coeff @angle:cd-sh-hs harmonic 46.41 95.38 # NEW 8
angle_coeff @angle:c-ss-cd harmonic 65.61 92.43 # NEW 14
angle_coeff @angle:c3-sx-cd harmonic 62.52 95.11 # NEW 17
angle_coeff @angle:cd-sx-o harmonic 65.92 104.49 # NEW 17
angle_coeff @angle:c3-sy-cd harmonic 61.24 102.19 # NEW 12
angle_coeff @angle:ca-sy-cd harmonic 60.36 105.09 # NEW 5
angle_coeff @angle:ca-sy-nf harmonic 62.86 103.47 # NEW 11
angle_coeff @angle:cc-sy-nh harmonic 65.53 97.20 # NEW 6
angle_coeff @angle:n3-sy-nf harmonic 66.36 102.40 # NEW 5
} # (end of angle_coeffs)
write_once("Data Angles By Type") {
@angle:hw-ow-hw @atom:hw @atom:ow @atom:hw
@angle:hw-hw-ow @atom:hw @atom:hw @atom:ow
@angle:br-c1-br @atom:br @atom:c1 @atom:br
@angle:br-c1-c1 @atom:br @atom:c1 @atom:c1
@angle:c1-c1-c1 @atom:c1 @atom:c1 @atom:c1
@angle:c1-c1-c2 @atom:c1 @atom:c1 @atom:c2
@angle:c1-c1-c3 @atom:c1 @atom:c1 @atom:c3
@angle:c1-c1-ca @atom:c1 @atom:c1 @atom:ca
@angle:c1-c1-cl @atom:c1 @atom:c1 @atom:cl
@angle:c1-c1-f @atom:c1 @atom:c1 @atom:f
@angle:c1-c1-ha @atom:c1 @atom:c1 @atom:ha
@angle:c1-c1-hc @atom:c1 @atom:c1 @atom:hc
@angle:c1-c1-i @atom:c1 @atom:c1 @atom:i
@angle:c1-c1-n1 @atom:c1 @atom:c1 @atom:n1
@angle:c1-c1-n2 @atom:c1 @atom:c1 @atom:n2
@angle:c1-c1-n3 @atom:c1 @atom:c1 @atom:n3
@angle:c1-c1-n4 @atom:c1 @atom:c1 @atom:n4
@angle:c1-c1-n @atom:c1 @atom:c1 @atom:n
@angle:c1-c1-na @atom:c1 @atom:c1 @atom:na
@angle:c1-c1-nh @atom:c1 @atom:c1 @atom:nh
@angle:c1-c1-no @atom:c1 @atom:c1 @atom:no
@angle:c1-c1-o @atom:c1 @atom:c1 @atom:o
@angle:c1-c1-oh @atom:c1 @atom:c1 @atom:oh
@angle:c1-c1-os @atom:c1 @atom:c1 @atom:os
@angle:c1-c1-p2 @atom:c1 @atom:c1 @atom:p2
@angle:c1-c1-p3 @atom:c1 @atom:c1 @atom:p3
@angle:c1-c1-p4 @atom:c1 @atom:c1 @atom:p4
@angle:c1-c1-p5 @atom:c1 @atom:c1 @atom:p5
@angle:c1-c1-s4 @atom:c1 @atom:c1 @atom:s4
@angle:c1-c1-s6 @atom:c1 @atom:c1 @atom:s6
@angle:c1-c1-s @atom:c1 @atom:c1 @atom:s
@angle:c1-c1-sh @atom:c1 @atom:c1 @atom:sh
@angle:c1-c1-ss @atom:c1 @atom:c1 @atom:ss
@angle:c2-c1-c2 @atom:c2 @atom:c1 @atom:c2
@angle:c2-c1-ce @atom:c2 @atom:c1 @atom:ce
@angle:c2-c1-n1 @atom:c2 @atom:c1 @atom:n1
@angle:c2-c1-o @atom:c2 @atom:c1 @atom:o
@angle:c2-c1-s2 @atom:c2 @atom:c1 @atom:s2
@angle:c3-c1-c3 @atom:c3 @atom:c1 @atom:c3
@angle:c3-c1-cg @atom:c3 @atom:c1 @atom:cg
@angle:c3-c1-n1 @atom:c3 @atom:c1 @atom:n1
@angle:ca-c1-ca @atom:ca @atom:c1 @atom:ca
@angle:c-c1-c1 @atom:c @atom:c1 @atom:c1
@angle:cg-c1-ha @atom:cg @atom:c1 @atom:ha
@angle:ch-c1-ha @atom:ch @atom:c1 @atom:ha
@angle:cl-c1-cl @atom:cl @atom:c1 @atom:cl
@angle:f-c1-f @atom:f @atom:c1 @atom:f
@angle:i-c1-i @atom:i @atom:c1 @atom:i
@angle:n1-c1-n1 @atom:n1 @atom:c1 @atom:n1
@angle:n1-c1-n3 @atom:n1 @atom:c1 @atom:n3
@angle:n1-c1-nh @atom:n1 @atom:c1 @atom:nh
@angle:n1-c1-os @atom:n1 @atom:c1 @atom:os
@angle:n1-c1-p3 @atom:n1 @atom:c1 @atom:p3
@angle:n1-c1-ss @atom:n1 @atom:c1 @atom:ss
@angle:n2-c1-n2 @atom:n2 @atom:c1 @atom:n2
@angle:n2-c1-o @atom:n2 @atom:c1 @atom:o
@angle:n2-c1-s @atom:n2 @atom:c1 @atom:s
@angle:n3-c1-n3 @atom:n3 @atom:c1 @atom:n3
@angle:n4-c1-n4 @atom:n4 @atom:c1 @atom:n4
@angle:na-c1-na @atom:na @atom:c1 @atom:na
@angle:ne-c1-o @atom:ne @atom:c1 @atom:o
@angle:ne-c1-s @atom:ne @atom:c1 @atom:s
@angle:nf-c1-o @atom:nf @atom:c1 @atom:o
@angle:nh-c1-nh @atom:nh @atom:c1 @atom:nh
@angle:n-c1-n @atom:n @atom:c1 @atom:n
@angle:no-c1-no @atom:no @atom:c1 @atom:no
@angle:oh-c1-oh @atom:oh @atom:c1 @atom:oh
@angle:o-c1-o @atom:o @atom:c1 @atom:o
@angle:os-c1-os @atom:os @atom:c1 @atom:os
@angle:p2-c1-p2 @atom:p2 @atom:c1 @atom:p2
@angle:p3-c1-p3 @atom:p3 @atom:c1 @atom:p3
@angle:p4-c1-p4 @atom:p4 @atom:c1 @atom:p4
@angle:p5-c1-p5 @atom:p5 @atom:c1 @atom:p5
@angle:s2-c1-s2 @atom:s2 @atom:c1 @atom:s2
@angle:s4-c1-s4 @atom:s4 @atom:c1 @atom:s4
@angle:s6-c1-s6 @atom:s6 @atom:c1 @atom:s6
@angle:sh-c1-sh @atom:sh @atom:c1 @atom:sh
@angle:s-c1-s @atom:s @atom:c1 @atom:s
@angle:ss-c1-ss @atom:ss @atom:c1 @atom:ss
@angle:br-c2-br @atom:br @atom:c2 @atom:br
@angle:br-c2-c2 @atom:br @atom:c2 @atom:c2
@angle:br-c2-c3 @atom:br @atom:c2 @atom:c3
@angle:br-c2-ce @atom:br @atom:c2 @atom:ce
@angle:br-c2-h4 @atom:br @atom:c2 @atom:h4
@angle:br-c2-ha @atom:br @atom:c2 @atom:ha
@angle:c1-c2-c1 @atom:c1 @atom:c2 @atom:c1
@angle:c1-c2-c2 @atom:c1 @atom:c2 @atom:c2
@angle:c1-c2-c3 @atom:c1 @atom:c2 @atom:c3
@angle:c1-c2-f @atom:c1 @atom:c2 @atom:f
@angle:c1-c2-ha @atom:c1 @atom:c2 @atom:ha
@angle:c2-c2-c2 @atom:c2 @atom:c2 @atom:c2
@angle:c2-c2-c3 @atom:c2 @atom:c2 @atom:c3
@angle:c2-c2-ca @atom:c2 @atom:c2 @atom:ca
@angle:c2-c2-cc @atom:c2 @atom:c2 @atom:cc
@angle:c2-c2-cd @atom:c2 @atom:c2 @atom:cd
@angle:c2-c2-cl @atom:c2 @atom:c2 @atom:cl
@angle:c2-c2-cx @atom:c2 @atom:c2 @atom:cx
@angle:c2-c2-cy @atom:c2 @atom:c2 @atom:cy
@angle:c2-c2-f @atom:c2 @atom:c2 @atom:f
@angle:c2-c2-h4 @atom:c2 @atom:c2 @atom:h4
@angle:c2-c2-ha @atom:c2 @atom:c2 @atom:ha
@angle:c2-c2-hc @atom:c2 @atom:c2 @atom:hc
@angle:c2-c2-hx @atom:c2 @atom:c2 @atom:hx
@angle:c2-c2-i @atom:c2 @atom:c2 @atom:i
@angle:c2-c2-n1 @atom:c2 @atom:c2 @atom:n1
@angle:c2-c2-n2 @atom:c2 @atom:c2 @atom:n2
@angle:c2-c2-n3 @atom:c2 @atom:c2 @atom:n3
@angle:c2-c2-n4 @atom:c2 @atom:c2 @atom:n4
@angle:c2-c2-n @atom:c2 @atom:c2 @atom:n
@angle:c2-c2-na @atom:c2 @atom:c2 @atom:na
@angle:c2-c2-nh @atom:c2 @atom:c2 @atom:nh
@angle:c2-c2-no @atom:c2 @atom:c2 @atom:no
@angle:c2-c2-o @atom:c2 @atom:c2 @atom:o
@angle:c2-c2-oh @atom:c2 @atom:c2 @atom:oh
@angle:c2-c2-os @atom:c2 @atom:c2 @atom:os
@angle:c2-c2-p2 @atom:c2 @atom:c2 @atom:p2
@angle:c2-c2-p3 @atom:c2 @atom:c2 @atom:p3
@angle:c2-c2-p4 @atom:c2 @atom:c2 @atom:p4
@angle:c2-c2-p5 @atom:c2 @atom:c2 @atom:p5
@angle:c2-c2-s4 @atom:c2 @atom:c2 @atom:s4
@angle:c2-c2-s6 @atom:c2 @atom:c2 @atom:s6
@angle:c2-c2-s @atom:c2 @atom:c2 @atom:s
@angle:c2-c2-sh @atom:c2 @atom:c2 @atom:sh
@angle:c2-c2-ss @atom:c2 @atom:c2 @atom:ss
@angle:c3-c2-c3 @atom:c3 @atom:c2 @atom:c3
@angle:c3-c2-cc @atom:c3 @atom:c2 @atom:cc
@angle:c3-c2-cd @atom:c3 @atom:c2 @atom:cd
@angle:c3-c2-ce @atom:c3 @atom:c2 @atom:ce
@angle:c3-c2-cf @atom:c3 @atom:c2 @atom:cf
@angle:c3-c2-h4 @atom:c3 @atom:c2 @atom:h4
@angle:c3-c2-ha @atom:c3 @atom:c2 @atom:ha
@angle:c3-c2-hc @atom:c3 @atom:c2 @atom:hc
@angle:c3-c2-n2 @atom:c3 @atom:c2 @atom:n2
@angle:c3-c2-n @atom:c3 @atom:c2 @atom:n
@angle:c3-c2-na @atom:c3 @atom:c2 @atom:na
@angle:c3-c2-ne @atom:c3 @atom:c2 @atom:ne
@angle:c3-c2-nf @atom:c3 @atom:c2 @atom:nf
@angle:c3-c2-nh @atom:c3 @atom:c2 @atom:nh
@angle:c3-c2-o @atom:c3 @atom:c2 @atom:o
@angle:c3-c2-oh @atom:c3 @atom:c2 @atom:oh
@angle:c3-c2-os @atom:c3 @atom:c2 @atom:os
@angle:c3-c2-p2 @atom:c3 @atom:c2 @atom:p2
@angle:c3-c2-s @atom:c3 @atom:c2 @atom:s
@angle:c3-c2-ss @atom:c3 @atom:c2 @atom:ss
@angle:ca-c2-ca @atom:ca @atom:c2 @atom:ca
@angle:ca-c2-hc @atom:ca @atom:c2 @atom:hc
@angle:c-c2-c2 @atom:c @atom:c2 @atom:c2
@angle:c-c2-c3 @atom:c @atom:c2 @atom:c3
@angle:c-c2-c @atom:c @atom:c2 @atom:c
@angle:cc-c2-h4 @atom:cc @atom:c2 @atom:h4
@angle:cc-c2-ha @atom:cc @atom:c2 @atom:ha
@angle:cc-c2-nh @atom:cc @atom:c2 @atom:nh
@angle:cc-c2-o @atom:cc @atom:c2 @atom:o
@angle:cd-c2-ha @atom:cd @atom:c2 @atom:ha
@angle:ce-c2-cl @atom:ce @atom:c2 @atom:cl
@angle:ce-c2-h4 @atom:ce @atom:c2 @atom:h4
@angle:ce-c2-ha @atom:ce @atom:c2 @atom:ha
@angle:ce-c2-na @atom:ce @atom:c2 @atom:na
@angle:ce-c2-nh @atom:ce @atom:c2 @atom:nh
@angle:ce-c2-no @atom:ce @atom:c2 @atom:no
@angle:ce-c2-o @atom:ce @atom:c2 @atom:o
@angle:ce-c2-oh @atom:ce @atom:c2 @atom:oh
@angle:ce-c2-os @atom:ce @atom:c2 @atom:os
@angle:cf-c2-ha @atom:cf @atom:c2 @atom:ha
@angle:c-c2-ha @atom:c @atom:c2 @atom:ha
@angle:c-c2-hc @atom:c @atom:c2 @atom:hc
@angle:cl-c2-cl @atom:cl @atom:c2 @atom:cl
@angle:cl-c2-h4 @atom:cl @atom:c2 @atom:h4
@angle:cl-c2-ha @atom:cl @atom:c2 @atom:ha
@angle:cx-c2-ha @atom:cx @atom:c2 @atom:ha
@angle:f-c2-f @atom:f @atom:c2 @atom:f
@angle:f-c2-ha @atom:f @atom:c2 @atom:ha
@angle:h4-c2-n2 @atom:h4 @atom:c2 @atom:n2
@angle:h4-c2-n @atom:h4 @atom:c2 @atom:n
@angle:h4-c2-na @atom:h4 @atom:c2 @atom:na
@angle:h4-c2-ne @atom:h4 @atom:c2 @atom:ne
@angle:h4-c2-nh @atom:h4 @atom:c2 @atom:nh
@angle:h4-c2-no @atom:h4 @atom:c2 @atom:no
@angle:h4-c2-os @atom:h4 @atom:c2 @atom:os
@angle:h4-c2-ss @atom:h4 @atom:c2 @atom:ss
@angle:h5-c2-n2 @atom:h5 @atom:c2 @atom:n2
@angle:h5-c2-na @atom:h5 @atom:c2 @atom:na
@angle:h5-c2-ne @atom:h5 @atom:c2 @atom:ne
@angle:h5-c2-nh @atom:h5 @atom:c2 @atom:nh
@angle:ha-c2-ha @atom:ha @atom:c2 @atom:ha
@angle:ha-c2-n1 @atom:ha @atom:c2 @atom:n1
@angle:ha-c2-n2 @atom:ha @atom:c2 @atom:n2
@angle:ha-c2-n3 @atom:ha @atom:c2 @atom:n3
@angle:ha-c2-n @atom:ha @atom:c2 @atom:n
@angle:ha-c2-na @atom:ha @atom:c2 @atom:na
@angle:ha-c2-ne @atom:ha @atom:c2 @atom:ne
@angle:ha-c2-nf @atom:ha @atom:c2 @atom:nf
@angle:ha-c2-nh @atom:ha @atom:c2 @atom:nh
@angle:ha-c2-no @atom:ha @atom:c2 @atom:no
@angle:ha-c2-o @atom:ha @atom:c2 @atom:o
@angle:ha-c2-oh @atom:ha @atom:c2 @atom:oh
@angle:ha-c2-os @atom:ha @atom:c2 @atom:os
@angle:ha-c2-p2 @atom:ha @atom:c2 @atom:p2
@angle:ha-c2-p3 @atom:ha @atom:c2 @atom:p3
@angle:ha-c2-p4 @atom:ha @atom:c2 @atom:p4
@angle:ha-c2-p5 @atom:ha @atom:c2 @atom:p5
@angle:ha-c2-pe @atom:ha @atom:c2 @atom:pe
@angle:ha-c2-pf @atom:ha @atom:c2 @atom:pf
@angle:ha-c2-s2 @atom:ha @atom:c2 @atom:s2
@angle:ha-c2-s4 @atom:ha @atom:c2 @atom:s4
@angle:ha-c2-s @atom:ha @atom:c2 @atom:s
@angle:ha-c2-s6 @atom:ha @atom:c2 @atom:s6
@angle:ha-c2-sh @atom:ha @atom:c2 @atom:sh
@angle:ha-c2-ss @atom:ha @atom:c2 @atom:ss
@angle:hc-c2-hc @atom:hc @atom:c2 @atom:hc
@angle:hc-c2-n2 @atom:hc @atom:c2 @atom:n2
@angle:hc-c2-n @atom:hc @atom:c2 @atom:n
@angle:hc-c2-na @atom:hc @atom:c2 @atom:na
@angle:hc-c2-nh @atom:hc @atom:c2 @atom:nh
@angle:hc-c2-no @atom:hc @atom:c2 @atom:no
@angle:hc-c2-oh @atom:hc @atom:c2 @atom:oh
@angle:hc-c2-os @atom:hc @atom:c2 @atom:os
@angle:hc-c2-p3 @atom:hc @atom:c2 @atom:p3
@angle:hc-c2-p5 @atom:hc @atom:c2 @atom:p5
@angle:hc-c2-s4 @atom:hc @atom:c2 @atom:s4
@angle:hc-c2-s6 @atom:hc @atom:c2 @atom:s6
@angle:hc-c2-sh @atom:hc @atom:c2 @atom:sh
@angle:hc-c2-ss @atom:hc @atom:c2 @atom:ss
@angle:hx-c2-n4 @atom:hx @atom:c2 @atom:n4
@angle:i-c2-i @atom:i @atom:c2 @atom:i
@angle:n1-c2-n1 @atom:n1 @atom:c2 @atom:n1
@angle:n2-c2-n2 @atom:n2 @atom:c2 @atom:n2
@angle:n2-c2-n4 @atom:n2 @atom:c2 @atom:n4
@angle:n2-c2-na @atom:n2 @atom:c2 @atom:na
@angle:n2-c2-nh @atom:n2 @atom:c2 @atom:nh
@angle:n2-c2-oh @atom:n2 @atom:c2 @atom:oh
@angle:n2-c2-os @atom:n2 @atom:c2 @atom:os
@angle:n2-c2-ss @atom:n2 @atom:c2 @atom:ss
@angle:n3-c2-n3 @atom:n3 @atom:c2 @atom:n3
@angle:n4-c2-n4 @atom:n4 @atom:c2 @atom:n4
@angle:n4-c2-ss @atom:n4 @atom:c2 @atom:ss
@angle:na-c2-na @atom:na @atom:c2 @atom:na
@angle:ne-c2-nh @atom:ne @atom:c2 @atom:nh
@angle:ne-c2-os @atom:ne @atom:c2 @atom:os
@angle:ne-c2-ss @atom:ne @atom:c2 @atom:ss
@angle:nf-c2-nh @atom:nf @atom:c2 @atom:nh
@angle:nh-c2-nh @atom:nh @atom:c2 @atom:nh
@angle:nh-c2-oh @atom:nh @atom:c2 @atom:oh
@angle:nh-c2-os @atom:nh @atom:c2 @atom:os
@angle:nh-c2-ss @atom:nh @atom:c2 @atom:ss
@angle:n-c2-n2 @atom:n @atom:c2 @atom:n2
@angle:n-c2-n @atom:n @atom:c2 @atom:n
@angle:n-c2-na @atom:n @atom:c2 @atom:na
@angle:n-c2-ne @atom:n @atom:c2 @atom:ne
@angle:n-c2-nh @atom:n @atom:c2 @atom:nh
@angle:no-c2-no @atom:no @atom:c2 @atom:no
@angle:n-c2-ss @atom:n @atom:c2 @atom:ss
@angle:oh-c2-oh @atom:oh @atom:c2 @atom:oh
@angle:o-c2-o @atom:o @atom:c2 @atom:o
@angle:o-c2-oh @atom:o @atom:c2 @atom:oh
@angle:o-c2-s @atom:o @atom:c2 @atom:s
@angle:os-c2-os @atom:os @atom:c2 @atom:os
@angle:p2-c2-p2 @atom:p2 @atom:c2 @atom:p2
@angle:p3-c2-p3 @atom:p3 @atom:c2 @atom:p3
@angle:p5-c2-p5 @atom:p5 @atom:c2 @atom:p5
@angle:s4-c2-s4 @atom:s4 @atom:c2 @atom:s4
@angle:s4-c2-s6 @atom:s4 @atom:c2 @atom:s6
@angle:s6-c2-s6 @atom:s6 @atom:c2 @atom:s6
@angle:sh-c2-sh @atom:sh @atom:c2 @atom:sh
@angle:sh-c2-ss @atom:sh @atom:c2 @atom:ss
@angle:s-c2-s @atom:s @atom:c2 @atom:s
@angle:ss-c2-ss @atom:ss @atom:c2 @atom:ss
@angle:br-c3-br @atom:br @atom:c3 @atom:br
@angle:br-c3-c1 @atom:br @atom:c3 @atom:c1
@angle:br-c3-c3 @atom:br @atom:c3 @atom:c3
@angle:br-c3-c @atom:br @atom:c3 @atom:c
@angle:br-c3-h1 @atom:br @atom:c3 @atom:h1
@angle:br-c3-h2 @atom:br @atom:c3 @atom:h2
@angle:br-c3-hc @atom:br @atom:c3 @atom:hc
@angle:c1-c3-c1 @atom:c1 @atom:c3 @atom:c1
@angle:c1-c3-c2 @atom:c1 @atom:c3 @atom:c2
@angle:c1-c3-c3 @atom:c1 @atom:c3 @atom:c3
@angle:c1-c3-ca @atom:c1 @atom:c3 @atom:ca
@angle:c1-c3-cc @atom:c1 @atom:c3 @atom:cc
@angle:c1-c3-cd @atom:c1 @atom:c3 @atom:cd
@angle:c1-c3-cl @atom:c1 @atom:c3 @atom:cl
@angle:c1-c3-h1 @atom:c1 @atom:c3 @atom:h1
@angle:c1-c3-hc @atom:c1 @atom:c3 @atom:hc
@angle:c1-c3-hx @atom:c1 @atom:c3 @atom:hx
@angle:c1-c3-n3 @atom:c1 @atom:c3 @atom:n3
@angle:c1-c3-n4 @atom:c1 @atom:c3 @atom:n4
@angle:c1-c3-n @atom:c1 @atom:c3 @atom:n
@angle:c1-c3-nh @atom:c1 @atom:c3 @atom:nh
@angle:c1-c3-oh @atom:c1 @atom:c3 @atom:oh
@angle:c1-c3-os @atom:c1 @atom:c3 @atom:os
@angle:c2-c3-c2 @atom:c2 @atom:c3 @atom:c2
@angle:c2-c3-c3 @atom:c2 @atom:c3 @atom:c3
@angle:c2-c3-ca @atom:c2 @atom:c3 @atom:ca
@angle:c2-c3-cc @atom:c2 @atom:c3 @atom:cc
@angle:c2-c3-cd @atom:c2 @atom:c3 @atom:cd
@angle:c2-c3-ce @atom:c2 @atom:c3 @atom:ce
@angle:c2-c3-cf @atom:c2 @atom:c3 @atom:cf
@angle:c2-c3-cl @atom:c2 @atom:c3 @atom:cl
@angle:c2-c3-cx @atom:c2 @atom:c3 @atom:cx
@angle:c2-c3-cy @atom:c2 @atom:c3 @atom:cy
@angle:c2-c3-f @atom:c2 @atom:c3 @atom:f
@angle:c2-c3-h1 @atom:c2 @atom:c3 @atom:h1
@angle:c2-c3-h2 @atom:c2 @atom:c3 @atom:h2
@angle:c2-c3-hc @atom:c2 @atom:c3 @atom:hc
@angle:c2-c3-hx @atom:c2 @atom:c3 @atom:hx
@angle:c2-c3-n2 @atom:c2 @atom:c3 @atom:n2
@angle:c2-c3-n3 @atom:c2 @atom:c3 @atom:n3
@angle:c2-c3-n @atom:c2 @atom:c3 @atom:n
@angle:c2-c3-na @atom:c2 @atom:c3 @atom:na
@angle:c2-c3-nh @atom:c2 @atom:c3 @atom:nh
@angle:c2-c3-oh @atom:c2 @atom:c3 @atom:oh
@angle:c2-c3-os @atom:c2 @atom:c3 @atom:os
@angle:c2-c3-s4 @atom:c2 @atom:c3 @atom:s4
@angle:c2-c3-ss @atom:c2 @atom:c3 @atom:ss
@angle:c3-c3-c3 @atom:c3 @atom:c3 @atom:c3
@angle:c3-c3-ca @atom:c3 @atom:c3 @atom:ca
@angle:c3-c3-cc @atom:c3 @atom:c3 @atom:cc
@angle:c3-c3-cd @atom:c3 @atom:c3 @atom:cd
@angle:c3-c3-ce @atom:c3 @atom:c3 @atom:ce
@angle:c3-c3-cf @atom:c3 @atom:c3 @atom:cf
@angle:c3-c3-cl @atom:c3 @atom:c3 @atom:cl
@angle:c3-c3-cx @atom:c3 @atom:c3 @atom:cx
@angle:c3-c3-cy @atom:c3 @atom:c3 @atom:cy
@angle:c3-c3-f @atom:c3 @atom:c3 @atom:f
@angle:c3-c3-h1 @atom:c3 @atom:c3 @atom:h1
@angle:c3-c3-h2 @atom:c3 @atom:c3 @atom:h2
@angle:c3-c3-hc @atom:c3 @atom:c3 @atom:hc
@angle:c3-c3-hx @atom:c3 @atom:c3 @atom:hx
@angle:c3-c3-i @atom:c3 @atom:c3 @atom:i
@angle:c3-c3-n1 @atom:c3 @atom:c3 @atom:n1
@angle:c3-c3-n2 @atom:c3 @atom:c3 @atom:n2
@angle:c3-c3-n3 @atom:c3 @atom:c3 @atom:n3
@angle:c3-c3-n4 @atom:c3 @atom:c3 @atom:n4
@angle:c3-c3-n @atom:c3 @atom:c3 @atom:n
@angle:c3-c3-na @atom:c3 @atom:c3 @atom:na
@angle:c3-c3-nh @atom:c3 @atom:c3 @atom:nh
@angle:c3-c3-no @atom:c3 @atom:c3 @atom:no
@angle:c3-c3-o @atom:c3 @atom:c3 @atom:o
@angle:c3-c3-oh @atom:c3 @atom:c3 @atom:oh
@angle:c3-c3-os @atom:c3 @atom:c3 @atom:os
@angle:c3-c3-p3 @atom:c3 @atom:c3 @atom:p3
@angle:c3-c3-p5 @atom:c3 @atom:c3 @atom:p5
@angle:c3-c3-s4 @atom:c3 @atom:c3 @atom:s4
@angle:c3-c3-s6 @atom:c3 @atom:c3 @atom:s6
@angle:c3-c3-sh @atom:c3 @atom:c3 @atom:sh
@angle:c3-c3-ss @atom:c3 @atom:c3 @atom:ss
@angle:c3-c3-sy @atom:c3 @atom:c3 @atom:sy
@angle:ca-c3-ca @atom:ca @atom:c3 @atom:ca
@angle:ca-c3-cc @atom:ca @atom:c3 @atom:cc
@angle:ca-c3-cd @atom:ca @atom:c3 @atom:cd
@angle:ca-c3-ce @atom:ca @atom:c3 @atom:ce
@angle:ca-c3-cl @atom:ca @atom:c3 @atom:cl
@angle:ca-c3-cx @atom:ca @atom:c3 @atom:cx
@angle:ca-c3-f @atom:ca @atom:c3 @atom:f
@angle:ca-c3-h1 @atom:ca @atom:c3 @atom:h1
@angle:ca-c3-h2 @atom:ca @atom:c3 @atom:h2
@angle:ca-c3-hc @atom:ca @atom:c3 @atom:hc
@angle:ca-c3-hx @atom:ca @atom:c3 @atom:hx
@angle:ca-c3-n2 @atom:ca @atom:c3 @atom:n2
@angle:ca-c3-n3 @atom:ca @atom:c3 @atom:n3
@angle:ca-c3-n4 @atom:ca @atom:c3 @atom:n4
@angle:ca-c3-n @atom:ca @atom:c3 @atom:n
@angle:ca-c3-na @atom:ca @atom:c3 @atom:na
@angle:ca-c3-nc @atom:ca @atom:c3 @atom:nc
@angle:ca-c3-nd @atom:ca @atom:c3 @atom:nd
@angle:ca-c3-nh @atom:ca @atom:c3 @atom:nh
@angle:ca-c3-oh @atom:ca @atom:c3 @atom:oh
@angle:ca-c3-os @atom:ca @atom:c3 @atom:os
@angle:ca-c3-p5 @atom:ca @atom:c3 @atom:p5
@angle:ca-c3-s6 @atom:ca @atom:c3 @atom:s6
@angle:ca-c3-ss @atom:ca @atom:c3 @atom:ss
@angle:ca-c3-sx @atom:ca @atom:c3 @atom:sx
@angle:c-c3-c1 @atom:c @atom:c3 @atom:c1
@angle:c-c3-c2 @atom:c @atom:c3 @atom:c2
@angle:c-c3-c3 @atom:c @atom:c3 @atom:c3
@angle:c-c3-c @atom:c @atom:c3 @atom:c
@angle:c-c3-ca @atom:c @atom:c3 @atom:ca
@angle:c-c3-cc @atom:c @atom:c3 @atom:cc
@angle:cc-c3-cc @atom:cc @atom:c3 @atom:cc
@angle:cc-c3-cd @atom:cc @atom:c3 @atom:cd
@angle:cc-c3-cx @atom:cc @atom:c3 @atom:cx
@angle:c-c3-cd @atom:c @atom:c3 @atom:cd
@angle:c-c3-ce @atom:c @atom:c3 @atom:ce
@angle:cc-c3-f @atom:cc @atom:c3 @atom:f
@angle:cc-c3-h1 @atom:cc @atom:c3 @atom:h1
@angle:cc-c3-hc @atom:cc @atom:c3 @atom:hc
@angle:cc-c3-hx @atom:cc @atom:c3 @atom:hx
@angle:c-c3-cl @atom:c @atom:c3 @atom:cl
@angle:cc-c3-n2 @atom:cc @atom:c3 @atom:n2
@angle:cc-c3-n3 @atom:cc @atom:c3 @atom:n3
@angle:cc-c3-n4 @atom:cc @atom:c3 @atom:n4
@angle:cc-c3-n @atom:cc @atom:c3 @atom:n
@angle:cc-c3-na @atom:cc @atom:c3 @atom:na
@angle:cc-c3-nc @atom:cc @atom:c3 @atom:nc
@angle:cc-c3-nh @atom:cc @atom:c3 @atom:nh
@angle:cc-c3-oh @atom:cc @atom:c3 @atom:oh
@angle:cc-c3-os @atom:cc @atom:c3 @atom:os
@angle:cc-c3-p5 @atom:cc @atom:c3 @atom:p5
@angle:cc-c3-sh @atom:cc @atom:c3 @atom:sh
@angle:cc-c3-ss @atom:cc @atom:c3 @atom:ss
@angle:c-c3-cx @atom:c @atom:c3 @atom:cx
@angle:cd-c3-cd @atom:cd @atom:c3 @atom:cd
@angle:cd-c3-f @atom:cd @atom:c3 @atom:f
@angle:cd-c3-h1 @atom:cd @atom:c3 @atom:h1
@angle:cd-c3-hc @atom:cd @atom:c3 @atom:hc
@angle:cd-c3-n3 @atom:cd @atom:c3 @atom:n3
@angle:cd-c3-n @atom:cd @atom:c3 @atom:n
@angle:cd-c3-nd @atom:cd @atom:c3 @atom:nd
@angle:cd-c3-nh @atom:cd @atom:c3 @atom:nh
@angle:cd-c3-oh @atom:cd @atom:c3 @atom:oh
@angle:cd-c3-os @atom:cd @atom:c3 @atom:os
@angle:cd-c3-sh @atom:cd @atom:c3 @atom:sh
@angle:cd-c3-ss @atom:cd @atom:c3 @atom:ss
@angle:ce-c3-ce @atom:ce @atom:c3 @atom:ce
@angle:ce-c3-cy @atom:ce @atom:c3 @atom:cy
@angle:ce-c3-h1 @atom:ce @atom:c3 @atom:h1
@angle:ce-c3-hc @atom:ce @atom:c3 @atom:hc
@angle:ce-c3-n3 @atom:ce @atom:c3 @atom:n3
@angle:ce-c3-n @atom:ce @atom:c3 @atom:n
@angle:ce-c3-oh @atom:ce @atom:c3 @atom:oh
@angle:ce-c3-os @atom:ce @atom:c3 @atom:os
@angle:ce-c3-ss @atom:ce @atom:c3 @atom:ss
@angle:c-c3-f @atom:c @atom:c3 @atom:f
@angle:cf-c3-cy @atom:cf @atom:c3 @atom:cy
@angle:cf-c3-h1 @atom:cf @atom:c3 @atom:h1
@angle:cf-c3-hc @atom:cf @atom:c3 @atom:hc
@angle:cf-c3-n3 @atom:cf @atom:c3 @atom:n3
@angle:c-c3-h1 @atom:c @atom:c3 @atom:h1
@angle:c-c3-h2 @atom:c @atom:c3 @atom:h2
@angle:c-c3-hc @atom:c @atom:c3 @atom:hc
@angle:c-c3-hx @atom:c @atom:c3 @atom:hx
@angle:cl-c3-cl @atom:cl @atom:c3 @atom:cl
@angle:cl-c3-f @atom:cl @atom:c3 @atom:f
@angle:cl-c3-h1 @atom:cl @atom:c3 @atom:h1
@angle:cl-c3-h2 @atom:cl @atom:c3 @atom:h2
@angle:cl-c3-hc @atom:cl @atom:c3 @atom:hc
@angle:cl-c3-os @atom:cl @atom:c3 @atom:os
@angle:cl-c3-ss @atom:cl @atom:c3 @atom:ss
@angle:c-c3-n2 @atom:c @atom:c3 @atom:n2
@angle:c-c3-n3 @atom:c @atom:c3 @atom:n3
@angle:c-c3-n4 @atom:c @atom:c3 @atom:n4
@angle:c-c3-n @atom:c @atom:c3 @atom:n
@angle:c-c3-na @atom:c @atom:c3 @atom:na
@angle:c-c3-nh @atom:c @atom:c3 @atom:nh
@angle:c-c3-oh @atom:c @atom:c3 @atom:oh
@angle:c-c3-os @atom:c @atom:c3 @atom:os
@angle:c-c3-p5 @atom:c @atom:c3 @atom:p5
@angle:c-c3-s6 @atom:c @atom:c3 @atom:s6
@angle:c-c3-sh @atom:c @atom:c3 @atom:sh
@angle:c-c3-ss @atom:c @atom:c3 @atom:ss
@angle:cx-c3-cx @atom:cx @atom:c3 @atom:cx
@angle:cx-c3-h1 @atom:cx @atom:c3 @atom:h1
@angle:cx-c3-hc @atom:cx @atom:c3 @atom:hc
@angle:cx-c3-hx @atom:cx @atom:c3 @atom:hx
@angle:cx-c3-n3 @atom:cx @atom:c3 @atom:n3
@angle:cx-c3-n4 @atom:cx @atom:c3 @atom:n4
@angle:cx-c3-n @atom:cx @atom:c3 @atom:n
@angle:cx-c3-oh @atom:cx @atom:c3 @atom:oh
@angle:cx-c3-os @atom:cx @atom:c3 @atom:os
@angle:cy-c3-h1 @atom:cy @atom:c3 @atom:h1
@angle:cy-c3-hc @atom:cy @atom:c3 @atom:hc
@angle:cy-c3-n3 @atom:cy @atom:c3 @atom:n3
@angle:cy-c3-oh @atom:cy @atom:c3 @atom:oh
@angle:cy-c3-os @atom:cy @atom:c3 @atom:os
@angle:f-c3-f @atom:f @atom:c3 @atom:f
@angle:f-c3-h1 @atom:f @atom:c3 @atom:h1
@angle:f-c3-h2 @atom:f @atom:c3 @atom:h2
@angle:f-c3-h3 @atom:f @atom:c3 @atom:h3
@angle:f-c3-hc @atom:f @atom:c3 @atom:hc
@angle:f-c3-n2 @atom:f @atom:c3 @atom:n2
@angle:f-c3-os @atom:f @atom:c3 @atom:os
@angle:f-c3-p5 @atom:f @atom:c3 @atom:p5
@angle:f-c3-s6 @atom:f @atom:c3 @atom:s6
@angle:f-c3-ss @atom:f @atom:c3 @atom:ss
@angle:h1-c3-h1 @atom:h1 @atom:c3 @atom:h1
@angle:h1-c3-n1 @atom:h1 @atom:c3 @atom:n1
@angle:h1-c3-n2 @atom:h1 @atom:c3 @atom:n2
@angle:h1-c3-n3 @atom:h1 @atom:c3 @atom:n3
@angle:h1-c3-n @atom:h1 @atom:c3 @atom:n
@angle:h1-c3-na @atom:h1 @atom:c3 @atom:na
@angle:h1-c3-nc @atom:h1 @atom:c3 @atom:nc
@angle:h1-c3-nd @atom:h1 @atom:c3 @atom:nd
@angle:h1-c3-nh @atom:h1 @atom:c3 @atom:nh
@angle:h1-c3-no @atom:h1 @atom:c3 @atom:no
@angle:h1-c3-o @atom:h1 @atom:c3 @atom:o
@angle:h1-c3-oh @atom:h1 @atom:c3 @atom:oh
@angle:h1-c3-os @atom:h1 @atom:c3 @atom:os
@angle:h1-c3-p5 @atom:h1 @atom:c3 @atom:p5
@angle:h1-c3-s4 @atom:h1 @atom:c3 @atom:s4
@angle:h1-c3-s @atom:h1 @atom:c3 @atom:s
@angle:h1-c3-s6 @atom:h1 @atom:c3 @atom:s6
@angle:h1-c3-sh @atom:h1 @atom:c3 @atom:sh
@angle:h1-c3-ss @atom:h1 @atom:c3 @atom:ss
@angle:h1-c3-sx @atom:h1 @atom:c3 @atom:sx
@angle:h1-c3-sy @atom:h1 @atom:c3 @atom:sy
@angle:h2-c3-h2 @atom:h2 @atom:c3 @atom:h2
@angle:h2-c3-i @atom:h2 @atom:c3 @atom:i
@angle:h2-c3-n2 @atom:h2 @atom:c3 @atom:n2
@angle:h2-c3-n3 @atom:h2 @atom:c3 @atom:n3
@angle:h2-c3-n @atom:h2 @atom:c3 @atom:n
@angle:h2-c3-na @atom:h2 @atom:c3 @atom:na
@angle:h2-c3-nc @atom:h2 @atom:c3 @atom:nc
@angle:h2-c3-nd @atom:h2 @atom:c3 @atom:nd
@angle:h2-c3-nh @atom:h2 @atom:c3 @atom:nh
@angle:h2-c3-no @atom:h2 @atom:c3 @atom:no
@angle:h2-c3-o @atom:h2 @atom:c3 @atom:o
@angle:h2-c3-oh @atom:h2 @atom:c3 @atom:oh
@angle:h2-c3-os @atom:h2 @atom:c3 @atom:os
@angle:h2-c3-s4 @atom:h2 @atom:c3 @atom:s4
@angle:h2-c3-s @atom:h2 @atom:c3 @atom:s
@angle:h2-c3-s6 @atom:h2 @atom:c3 @atom:s6
@angle:h2-c3-sh @atom:h2 @atom:c3 @atom:sh
@angle:h2-c3-ss @atom:h2 @atom:c3 @atom:ss
@angle:h3-c3-n3 @atom:h3 @atom:c3 @atom:n3
@angle:h3-c3-nc @atom:h3 @atom:c3 @atom:nc
@angle:h3-c3-nd @atom:h3 @atom:c3 @atom:nd
@angle:h3-c3-nh @atom:h3 @atom:c3 @atom:nh
@angle:h3-c3-os @atom:h3 @atom:c3 @atom:os
@angle:h3-c3-ss @atom:h3 @atom:c3 @atom:ss
@angle:hc-c3-hc @atom:hc @atom:c3 @atom:hc
@angle:hc-c3-i @atom:hc @atom:c3 @atom:i
@angle:hc-c3-n2 @atom:hc @atom:c3 @atom:n2
@angle:hc-c3-n3 @atom:hc @atom:c3 @atom:n3
@angle:hc-c3-n4 @atom:hc @atom:c3 @atom:n4
@angle:hc-c3-n @atom:hc @atom:c3 @atom:n
@angle:hc-c3-na @atom:hc @atom:c3 @atom:na
@angle:hc-c3-nh @atom:hc @atom:c3 @atom:nh
@angle:hc-c3-no @atom:hc @atom:c3 @atom:no
@angle:hc-c3-oh @atom:hc @atom:c3 @atom:oh
@angle:hc-c3-os @atom:hc @atom:c3 @atom:os
@angle:hc-c3-p2 @atom:hc @atom:c3 @atom:p2
@angle:hc-c3-p3 @atom:hc @atom:c3 @atom:p3
@angle:hc-c3-p4 @atom:hc @atom:c3 @atom:p4
@angle:hc-c3-p5 @atom:hc @atom:c3 @atom:p5
@angle:hc-c3-px @atom:hc @atom:c3 @atom:px
@angle:hc-c3-py @atom:hc @atom:c3 @atom:py
@angle:hc-c3-s4 @atom:hc @atom:c3 @atom:s4
@angle:hc-c3-s6 @atom:hc @atom:c3 @atom:s6
@angle:hc-c3-sh @atom:hc @atom:c3 @atom:sh
@angle:hc-c3-ss @atom:hc @atom:c3 @atom:ss
@angle:hx-c3-hx @atom:hx @atom:c3 @atom:hx
@angle:hx-c3-n4 @atom:hx @atom:c3 @atom:n4
@angle:i-c3-i @atom:i @atom:c3 @atom:i
@angle:n1-c3-n1 @atom:n1 @atom:c3 @atom:n1
@angle:n2-c3-n2 @atom:n2 @atom:c3 @atom:n2
@angle:n2-c3-nh @atom:n2 @atom:c3 @atom:nh
@angle:n2-c3-oh @atom:n2 @atom:c3 @atom:oh
@angle:n2-c3-os @atom:n2 @atom:c3 @atom:os
@angle:n3-c3-n3 @atom:n3 @atom:c3 @atom:n3
@angle:n3-c3-nc @atom:n3 @atom:c3 @atom:nc
@angle:n3-c3-nd @atom:n3 @atom:c3 @atom:nd
@angle:n3-c3-nh @atom:n3 @atom:c3 @atom:nh
@angle:n3-c3-oh @atom:n3 @atom:c3 @atom:oh
@angle:n3-c3-os @atom:n3 @atom:c3 @atom:os
@angle:n3-c3-p5 @atom:n3 @atom:c3 @atom:p5
@angle:n3-c3-ss @atom:n3 @atom:c3 @atom:ss
@angle:n4-c3-n4 @atom:n4 @atom:c3 @atom:n4
@angle:na-c3-na @atom:na @atom:c3 @atom:na
@angle:na-c3-os @atom:na @atom:c3 @atom:os
@angle:nc-c3-nc @atom:nc @atom:c3 @atom:nc
@angle:nc-c3-nh @atom:nc @atom:c3 @atom:nh
@angle:nc-c3-os @atom:nc @atom:c3 @atom:os
@angle:nd-c3-nd @atom:nd @atom:c3 @atom:nd
@angle:nd-c3-nh @atom:nd @atom:c3 @atom:nh
@angle:nd-c3-os @atom:nd @atom:c3 @atom:os
@angle:nh-c3-nh @atom:nh @atom:c3 @atom:nh
@angle:nh-c3-oh @atom:nh @atom:c3 @atom:oh
@angle:nh-c3-os @atom:nh @atom:c3 @atom:os
@angle:nh-c3-p5 @atom:nh @atom:c3 @atom:p5
@angle:nh-c3-ss @atom:nh @atom:c3 @atom:ss
@angle:n-c3-n2 @atom:n @atom:c3 @atom:n2
@angle:n-c3-n3 @atom:n @atom:c3 @atom:n3
@angle:n-c3-n @atom:n @atom:c3 @atom:n
@angle:n-c3-nh @atom:n @atom:c3 @atom:nh
@angle:n-c3-oh @atom:n @atom:c3 @atom:oh
@angle:no-c3-no @atom:no @atom:c3 @atom:no
@angle:n-c3-os @atom:n @atom:c3 @atom:os
@angle:n-c3-p5 @atom:n @atom:c3 @atom:p5
@angle:oh-c3-oh @atom:oh @atom:c3 @atom:oh
@angle:oh-c3-os @atom:oh @atom:c3 @atom:os
@angle:oh-c3-p5 @atom:oh @atom:c3 @atom:p5
@angle:oh-c3-sh @atom:oh @atom:c3 @atom:sh
@angle:o-c3-o @atom:o @atom:c3 @atom:o
@angle:os-c3-os @atom:os @atom:c3 @atom:os
@angle:os-c3-p5 @atom:os @atom:c3 @atom:p5
@angle:os-c3-ss @atom:os @atom:c3 @atom:ss
@angle:p2-c3-p2 @atom:p2 @atom:c3 @atom:p2
@angle:p3-c3-p3 @atom:p3 @atom:c3 @atom:p3
@angle:p5-c3-p5 @atom:p5 @atom:c3 @atom:p5
@angle:p5-c3-ss @atom:p5 @atom:c3 @atom:ss
@angle:s4-c3-s4 @atom:s4 @atom:c3 @atom:s4
@angle:s4-c3-s6 @atom:s4 @atom:c3 @atom:s6
@angle:s6-c3-s6 @atom:s6 @atom:c3 @atom:s6
@angle:sh-c3-sh @atom:sh @atom:c3 @atom:sh
@angle:sh-c3-ss @atom:sh @atom:c3 @atom:ss
@angle:s-c3-s @atom:s @atom:c3 @atom:s
@angle:ss-c3-ss @atom:ss @atom:c3 @atom:ss
@angle:br-ca-br @atom:br @atom:ca @atom:br
@angle:br-ca-ca @atom:br @atom:ca @atom:ca
@angle:c1-ca-c1 @atom:c1 @atom:ca @atom:c1
@angle:c1-ca-ca @atom:c1 @atom:ca @atom:ca
@angle:c2-ca-c2 @atom:c2 @atom:ca @atom:c2
@angle:c2-ca-ca @atom:c2 @atom:ca @atom:ca
@angle:c3-ca-c2 @atom:c3 @atom:ca @atom:c2
@angle:c3-ca-c3 @atom:c3 @atom:ca @atom:c3
@angle:c3-ca-ca @atom:c3 @atom:ca @atom:ca
@angle:c3-ca-cp @atom:c3 @atom:ca @atom:cp
@angle:c3-ca-cq @atom:c3 @atom:ca @atom:cq
@angle:c3-ca-na @atom:c3 @atom:ca @atom:na
@angle:c3-ca-nb @atom:c3 @atom:ca @atom:nb
@angle:ca-ca-ca @atom:ca @atom:ca @atom:ca
@angle:ca-ca-cc @atom:ca @atom:ca @atom:cc
@angle:ca-ca-cd @atom:ca @atom:ca @atom:cd
@angle:ca-ca-ce @atom:ca @atom:ca @atom:ce
@angle:ca-ca-cf @atom:ca @atom:ca @atom:cf
@angle:ca-ca-cg @atom:ca @atom:ca @atom:cg
@angle:ca-ca-ch @atom:ca @atom:ca @atom:ch
@angle:ca-ca-cl @atom:ca @atom:ca @atom:cl
@angle:ca-ca-cp @atom:ca @atom:ca @atom:cp
@angle:ca-ca-cq @atom:ca @atom:ca @atom:cq
@angle:ca-ca-cx @atom:ca @atom:ca @atom:cx
@angle:ca-ca-cy @atom:ca @atom:ca @atom:cy
@angle:ca-ca-f @atom:ca @atom:ca @atom:f
@angle:ca-ca-h4 @atom:ca @atom:ca @atom:h4
@angle:ca-ca-ha @atom:ca @atom:ca @atom:ha
@angle:ca-ca-i @atom:ca @atom:ca @atom:i
@angle:ca-ca-n1 @atom:ca @atom:ca @atom:n1
@angle:ca-ca-n2 @atom:ca @atom:ca @atom:n2
@angle:ca-ca-n4 @atom:ca @atom:ca @atom:n4
@angle:ca-ca-n @atom:ca @atom:ca @atom:n
@angle:ca-ca-na @atom:ca @atom:ca @atom:na
@angle:ca-ca-nb @atom:ca @atom:ca @atom:nb
@angle:ca-ca-nc @atom:ca @atom:ca @atom:nc
@angle:ca-ca-nd @atom:ca @atom:ca @atom:nd
@angle:ca-ca-ne @atom:ca @atom:ca @atom:ne
@angle:ca-ca-nf @atom:ca @atom:ca @atom:nf
@angle:ca-ca-nh @atom:ca @atom:ca @atom:nh
@angle:ca-ca-no @atom:ca @atom:ca @atom:no
@angle:ca-ca-o @atom:ca @atom:ca @atom:o
@angle:ca-ca-oh @atom:ca @atom:ca @atom:oh
@angle:ca-ca-os @atom:ca @atom:ca @atom:os
@angle:ca-ca-p2 @atom:ca @atom:ca @atom:p2
@angle:ca-ca-p3 @atom:ca @atom:ca @atom:p3
@angle:ca-ca-p4 @atom:ca @atom:ca @atom:p4
@angle:ca-ca-p5 @atom:ca @atom:ca @atom:p5
@angle:ca-ca-pe @atom:ca @atom:ca @atom:pe
@angle:ca-ca-pf @atom:ca @atom:ca @atom:pf
@angle:ca-ca-px @atom:ca @atom:ca @atom:px
@angle:ca-ca-py @atom:ca @atom:ca @atom:py
@angle:ca-ca-s4 @atom:ca @atom:ca @atom:s4
@angle:ca-ca-s6 @atom:ca @atom:ca @atom:s6
@angle:ca-ca-s @atom:ca @atom:ca @atom:s
@angle:ca-ca-sh @atom:ca @atom:ca @atom:sh
@angle:ca-ca-ss @atom:ca @atom:ca @atom:ss
@angle:ca-ca-sx @atom:ca @atom:ca @atom:sx
@angle:ca-ca-sy @atom:ca @atom:ca @atom:sy
@angle:c-ca-c3 @atom:c @atom:ca @atom:c3
@angle:c-ca-c @atom:c @atom:ca @atom:c
@angle:c-ca-ca @atom:c @atom:ca @atom:ca
@angle:cc-ca-cp @atom:cc @atom:ca @atom:cp
@angle:cc-ca-nb @atom:cc @atom:ca @atom:nb
@angle:cd-ca-nb @atom:cd @atom:ca @atom:nb
@angle:ce-ca-na @atom:ce @atom:ca @atom:na
@angle:ce-ca-nb @atom:ce @atom:ca @atom:nb
@angle:cf-ca-nb @atom:cf @atom:ca @atom:nb
@angle:cg-ca-cp @atom:cg @atom:ca @atom:cp
@angle:c-ca-ha @atom:c @atom:ca @atom:ha
@angle:cl-ca-cl @atom:cl @atom:ca @atom:cl
@angle:cl-ca-cp @atom:cl @atom:ca @atom:cp
@angle:cl-ca-nb @atom:cl @atom:ca @atom:nb
@angle:c-ca-nb @atom:c @atom:ca @atom:nb
@angle:c-ca-nc @atom:c @atom:ca @atom:nc
@angle:c-ca-nd @atom:c @atom:ca @atom:nd
@angle:cp-ca-f @atom:cp @atom:ca @atom:f
@angle:cp-ca-h4 @atom:cp @atom:ca @atom:h4
@angle:cp-ca-ha @atom:cp @atom:ca @atom:ha
@angle:cp-ca-na @atom:cp @atom:ca @atom:na
@angle:cp-ca-nb @atom:cp @atom:ca @atom:nb
@angle:cp-ca-nh @atom:cp @atom:ca @atom:nh
@angle:cp-ca-oh @atom:cp @atom:ca @atom:oh
@angle:cp-ca-ss @atom:cp @atom:ca @atom:ss
@angle:cp-ca-sy @atom:cp @atom:ca @atom:sy
@angle:cq-ca-ha @atom:cq @atom:ca @atom:ha
@angle:cq-ca-sy @atom:cq @atom:ca @atom:sy
@angle:f-ca-f @atom:f @atom:ca @atom:f
@angle:f-ca-nb @atom:f @atom:ca @atom:nb
@angle:h4-ca-n @atom:h4 @atom:ca @atom:n
@angle:h4-ca-na @atom:h4 @atom:ca @atom:na
@angle:h4-ca-nb @atom:h4 @atom:ca @atom:nb
@angle:h4-ca-nc @atom:h4 @atom:ca @atom:nc
@angle:h4-ca-nd @atom:h4 @atom:ca @atom:nd
@angle:h4-ca-os @atom:h4 @atom:ca @atom:os
@angle:h4-ca-ss @atom:h4 @atom:ca @atom:ss
@angle:h5-ca-nb @atom:h5 @atom:ca @atom:nb
@angle:h5-ca-nc @atom:h5 @atom:ca @atom:nc
@angle:h5-ca-nd @atom:h5 @atom:ca @atom:nd
@angle:ha-ca-n2 @atom:ha @atom:ca @atom:n2
@angle:ha-ca-p2 @atom:ha @atom:ca @atom:p2
@angle:i-ca-i @atom:i @atom:ca @atom:i
@angle:n1-ca-n1 @atom:n1 @atom:ca @atom:n1
@angle:n2-ca-n2 @atom:n2 @atom:ca @atom:n2
@angle:n2-ca-na @atom:n2 @atom:ca @atom:na
@angle:n4-ca-n4 @atom:n4 @atom:ca @atom:n4
@angle:na-ca-na @atom:na @atom:ca @atom:na
@angle:na-ca-nb @atom:na @atom:ca @atom:nb
@angle:na-ca-nh @atom:na @atom:ca @atom:nh
@angle:nb-ca-nb @atom:nb @atom:ca @atom:nb
@angle:nb-ca-nc @atom:nb @atom:ca @atom:nc
@angle:nb-ca-nd @atom:nb @atom:ca @atom:nd
@angle:nb-ca-nh @atom:nb @atom:ca @atom:nh
@angle:nb-ca-oh @atom:nb @atom:ca @atom:oh
@angle:nb-ca-os @atom:nb @atom:ca @atom:os
@angle:nb-ca-sh @atom:nb @atom:ca @atom:sh
@angle:nb-ca-ss @atom:nb @atom:ca @atom:ss
@angle:nc-ca-nc @atom:nc @atom:ca @atom:nc
@angle:nc-ca-nh @atom:nc @atom:ca @atom:nh
@angle:nd-ca-nd @atom:nd @atom:ca @atom:nd
@angle:nd-ca-nh @atom:nd @atom:ca @atom:nh
@angle:nh-ca-nh @atom:nh @atom:ca @atom:nh
@angle:n-ca-nc @atom:n @atom:ca @atom:nc
@angle:n-ca-nd @atom:n @atom:ca @atom:nd
@angle:n-ca-nh @atom:n @atom:ca @atom:nh
@angle:no-ca-no @atom:no @atom:ca @atom:no
@angle:oh-ca-oh @atom:oh @atom:ca @atom:oh
@angle:o-ca-o @atom:o @atom:ca @atom:o
@angle:os-ca-os @atom:os @atom:ca @atom:os
@angle:p2-ca-p2 @atom:p2 @atom:ca @atom:p2
@angle:p3-ca-p3 @atom:p3 @atom:ca @atom:p3
@angle:p5-ca-p5 @atom:p5 @atom:ca @atom:p5
@angle:s4-ca-s4 @atom:s4 @atom:ca @atom:s4
@angle:s6-ca-s6 @atom:s6 @atom:ca @atom:s6
@angle:sh-ca-sh @atom:sh @atom:ca @atom:sh
@angle:s-ca-s @atom:s @atom:ca @atom:s
@angle:ss-ca-ss @atom:ss @atom:ca @atom:ss
@angle:br-c-br @atom:br @atom:c @atom:br
@angle:br-c-c3 @atom:br @atom:c @atom:c3
@angle:br-c-o @atom:br @atom:c @atom:o
@angle:c1-c-c1 @atom:c1 @atom:c @atom:c1
@angle:c1-c-o @atom:c1 @atom:c @atom:o
@angle:c2-c-c2 @atom:c2 @atom:c @atom:c2
@angle:c2-c-ha @atom:c2 @atom:c @atom:ha
@angle:c2-c-o @atom:c2 @atom:c @atom:o
@angle:c2-c-s @atom:c2 @atom:c @atom:s
@angle:c3-c-c3 @atom:c3 @atom:c @atom:c3
@angle:c3-c-ca @atom:c3 @atom:c @atom:ca
@angle:c3-c-cc @atom:c3 @atom:c @atom:cc
@angle:c3-c-cd @atom:c3 @atom:c @atom:cd
@angle:c3-c-ce @atom:c3 @atom:c @atom:ce
@angle:c3-c-cf @atom:c3 @atom:c @atom:cf
@angle:c3-c-cg @atom:c3 @atom:c @atom:cg
@angle:c3-c-ch @atom:c3 @atom:c @atom:ch
@angle:c3-c-cl @atom:c3 @atom:c @atom:cl
@angle:c3-c-f @atom:c3 @atom:c @atom:f
@angle:c3-c-h4 @atom:c3 @atom:c @atom:h4
@angle:c3-c-ha @atom:c3 @atom:c @atom:ha
@angle:c3-c-i @atom:c3 @atom:c @atom:i
@angle:c3-c-n2 @atom:c3 @atom:c @atom:n2
@angle:c3-c-n4 @atom:c3 @atom:c @atom:n4
@angle:c3-c-n @atom:c3 @atom:c @atom:n
@angle:c3-c-ne @atom:c3 @atom:c @atom:ne
@angle:c3-c-nf @atom:c3 @atom:c @atom:nf
@angle:c3-c-o @atom:c3 @atom:c @atom:o
@angle:c3-c-oh @atom:c3 @atom:c @atom:oh
@angle:c3-c-os @atom:c3 @atom:c @atom:os
@angle:c3-c-p3 @atom:c3 @atom:c @atom:p3
@angle:c3-c-p5 @atom:c3 @atom:c @atom:p5
@angle:c3-c-pe @atom:c3 @atom:c @atom:pe
@angle:c3-c-pf @atom:c3 @atom:c @atom:pf
@angle:c3-c-px @atom:c3 @atom:c @atom:px
@angle:c3-c-py @atom:c3 @atom:c @atom:py
@angle:c3-c-s4 @atom:c3 @atom:c @atom:s4
@angle:c3-c-s6 @atom:c3 @atom:c @atom:s6
@angle:c3-c-s @atom:c3 @atom:c @atom:s
@angle:c3-c-sh @atom:c3 @atom:c @atom:sh
@angle:c3-c-ss @atom:c3 @atom:c @atom:ss
@angle:c3-c-sx @atom:c3 @atom:c @atom:sx
@angle:c3-c-sy @atom:c3 @atom:c @atom:sy
@angle:ca-c-ca @atom:ca @atom:c @atom:ca
@angle:ca-c-cc @atom:ca @atom:c @atom:cc
@angle:ca-c-cd @atom:ca @atom:c @atom:cd
@angle:ca-c-ce @atom:ca @atom:c @atom:ce
@angle:ca-c-cf @atom:ca @atom:c @atom:cf
@angle:ca-c-h4 @atom:ca @atom:c @atom:h4
@angle:ca-c-ha @atom:ca @atom:c @atom:ha
@angle:ca-c-n @atom:ca @atom:c @atom:n
@angle:ca-c-ne @atom:ca @atom:c @atom:ne
@angle:ca-c-o @atom:ca @atom:c @atom:o
@angle:ca-c-oh @atom:ca @atom:c @atom:oh
@angle:ca-c-os @atom:ca @atom:c @atom:os
@angle:ca-c-s @atom:ca @atom:c @atom:s
@angle:ca-c-sh @atom:ca @atom:c @atom:sh
@angle:ca-c-ss @atom:ca @atom:c @atom:ss
@angle:br-cc-c @atom:br @atom:cc @atom:c
@angle:br-cc-cc @atom:br @atom:cc @atom:cc
@angle:br-cc-cd @atom:br @atom:cc @atom:cd
@angle:br-cc-na @atom:br @atom:cc @atom:na
@angle:c2-cc-c3 @atom:c2 @atom:cc @atom:c3
@angle:c2-cc-ca @atom:c2 @atom:cc @atom:ca
@angle:c2-cc-cc @atom:c2 @atom:cc @atom:cc
@angle:c2-cc-cd @atom:c2 @atom:cc @atom:cd
@angle:c2-cc-ha @atom:c2 @atom:cc @atom:ha
@angle:c2-cc-n @atom:c2 @atom:cc @atom:n
@angle:c2-cc-os @atom:c2 @atom:cc @atom:os
@angle:c-c-c3 @atom:c @atom:c @atom:c3
@angle:c3-cc-ca @atom:c3 @atom:cc @atom:ca
@angle:c3-cc-cc @atom:c3 @atom:cc @atom:cc
@angle:c3-cc-cd @atom:c3 @atom:cc @atom:cd
@angle:c3-cc-cf @atom:c3 @atom:cc @atom:cf
@angle:c3-cc-ha @atom:c3 @atom:cc @atom:ha
@angle:c3-cc-n2 @atom:c3 @atom:cc @atom:n2
@angle:c3-cc-n @atom:c3 @atom:cc @atom:n
@angle:c3-cc-na @atom:c3 @atom:cc @atom:na
@angle:c3-cc-nc @atom:c3 @atom:cc @atom:nc
@angle:c3-cc-nd @atom:c3 @atom:cc @atom:nd
@angle:c3-cc-os @atom:c3 @atom:cc @atom:os
@angle:c3-cc-ss @atom:c3 @atom:cc @atom:ss
@angle:c-c-c @atom:c @atom:c @atom:c
@angle:c-c-ca @atom:c @atom:c @atom:ca
@angle:ca-cc-cc @atom:ca @atom:cc @atom:cc
@angle:ca-cc-cd @atom:ca @atom:cc @atom:cd
@angle:ca-cc-ce @atom:ca @atom:cc @atom:ce
@angle:ca-cc-h4 @atom:ca @atom:cc @atom:h4
@angle:ca-cc-ha @atom:ca @atom:cc @atom:ha
@angle:ca-cc-n @atom:ca @atom:cc @atom:n
@angle:ca-cc-nc @atom:ca @atom:cc @atom:nc
@angle:ca-cc-nd @atom:ca @atom:cc @atom:nd
@angle:ca-cc-nh @atom:ca @atom:cc @atom:nh
@angle:ca-cc-oh @atom:ca @atom:cc @atom:oh
@angle:ca-cc-os @atom:ca @atom:cc @atom:os
@angle:ca-cc-ss @atom:ca @atom:cc @atom:ss
@angle:c-cc-c2 @atom:c @atom:cc @atom:c2
@angle:c-cc-c3 @atom:c @atom:cc @atom:c3
@angle:c-cc-c @atom:c @atom:cc @atom:c
@angle:c-c-cc @atom:c @atom:c @atom:cc
@angle:c-cc-ca @atom:c @atom:cc @atom:ca
@angle:c-cc-cc @atom:c @atom:cc @atom:cc
@angle:cc-c-cc @atom:cc @atom:c @atom:cc
@angle:cc-cc-cc @atom:cc @atom:cc @atom:cc
@angle:cc-cc-cd @atom:cc @atom:cc @atom:cd
@angle:cc-cc-ce @atom:cc @atom:cc @atom:ce
@angle:cc-cc-cf @atom:cc @atom:cc @atom:cf
@angle:cc-cc-cg @atom:cc @atom:cc @atom:cg
@angle:c-cc-cd @atom:c @atom:cc @atom:cd
@angle:cc-c-cd @atom:cc @atom:c @atom:cd
@angle:c-cc-ce @atom:c @atom:cc @atom:ce
@angle:cc-c-ce @atom:cc @atom:c @atom:ce
@angle:cc-cc-f @atom:cc @atom:cc @atom:f
@angle:c-cc-cg @atom:c @atom:cc @atom:cg
@angle:cc-cc-h4 @atom:cc @atom:cc @atom:h4
@angle:cc-cc-ha @atom:cc @atom:cc @atom:ha
@angle:c-cc-cl @atom:c @atom:cc @atom:cl
@angle:cc-cc-n2 @atom:cc @atom:cc @atom:n2
@angle:cc-cc-n @atom:cc @atom:cc @atom:n
@angle:cc-cc-na @atom:cc @atom:cc @atom:na
@angle:cc-cc-nc @atom:cc @atom:cc @atom:nc
@angle:cc-cc-nd @atom:cc @atom:cc @atom:nd
@angle:cc-cc-nh @atom:cc @atom:cc @atom:nh
@angle:cc-cc-oh @atom:cc @atom:cc @atom:oh
@angle:cc-cc-os @atom:cc @atom:cc @atom:os
@angle:cc-cc-pd @atom:cc @atom:cc @atom:pd
@angle:cc-cc-ss @atom:cc @atom:cc @atom:ss
@angle:cc-cc-sy @atom:cc @atom:cc @atom:sy
@angle:c-c-cd @atom:c @atom:c @atom:cd
@angle:cd-cc-cd @atom:cd @atom:cc @atom:cd
@angle:cd-cc-ce @atom:cd @atom:cc @atom:ce
@angle:cd-cc-cl @atom:cd @atom:cc @atom:cl
@angle:cd-cc-f @atom:cd @atom:cc @atom:f
@angle:cd-cc-h4 @atom:cd @atom:cc @atom:h4
@angle:cd-cc-ha @atom:cd @atom:cc @atom:ha
@angle:cd-cc-n @atom:cd @atom:cc @atom:n
@angle:cd-cc-na @atom:cd @atom:cc @atom:na
@angle:cd-cc-nc @atom:cd @atom:cc @atom:nc
@angle:cd-cc-nh @atom:cd @atom:cc @atom:nh
@angle:cd-cc-no @atom:cd @atom:cc @atom:no
@angle:cd-cc-oh @atom:cd @atom:cc @atom:oh
@angle:cd-cc-os @atom:cd @atom:cc @atom:os
@angle:cd-cc-ss @atom:cd @atom:cc @atom:ss
@angle:cd-cc-sy @atom:cd @atom:cc @atom:sy
@angle:ce-cc-na @atom:ce @atom:cc @atom:na
@angle:ce-cc-nc @atom:ce @atom:cc @atom:nc
@angle:ce-cc-nd @atom:ce @atom:cc @atom:nd
@angle:ce-cc-os @atom:ce @atom:cc @atom:os
@angle:ce-cc-ss @atom:ce @atom:cc @atom:ss
@angle:c-cc-f @atom:c @atom:cc @atom:f
@angle:cg-cc-na @atom:cg @atom:cc @atom:na
@angle:cg-cc-ss @atom:cg @atom:cc @atom:ss
@angle:cc-c-h4 @atom:cc @atom:c @atom:h4
@angle:c-cc-ha @atom:c @atom:cc @atom:ha
@angle:cl-cc-na @atom:cl @atom:cc @atom:na
@angle:cl-cc-nd @atom:cl @atom:cc @atom:nd
@angle:cl-cc-ss @atom:cl @atom:cc @atom:ss
@angle:c-cc-n2 @atom:c @atom:cc @atom:n2
@angle:c-cc-n @atom:c @atom:cc @atom:n
@angle:cc-c-n @atom:cc @atom:c @atom:n
@angle:c-cc-nc @atom:c @atom:cc @atom:nc
@angle:cc-c-nd @atom:cc @atom:c @atom:nd
@angle:c-cc-nd @atom:c @atom:cc @atom:nd
@angle:c-cc-ne @atom:c @atom:cc @atom:ne
@angle:cc-c-o @atom:cc @atom:c @atom:o
@angle:c-cc-oh @atom:c @atom:cc @atom:oh
@angle:cc-c-oh @atom:cc @atom:c @atom:oh
@angle:c-cc-os @atom:c @atom:cc @atom:os
@angle:cc-c-os @atom:cc @atom:c @atom:os
@angle:cc-c-s @atom:cc @atom:c @atom:s
@angle:cc-c-ss @atom:cc @atom:c @atom:ss
@angle:cx-cc-nd @atom:cx @atom:cc @atom:nd
@angle:cx-cc-os @atom:cx @atom:cc @atom:os
@angle:cd-c-cd @atom:cd @atom:c @atom:cd
@angle:cd-c-cx @atom:cd @atom:c @atom:cx
@angle:cd-c-n @atom:cd @atom:c @atom:n
@angle:cd-c-nc @atom:cd @atom:c @atom:nc
@angle:cd-c-nd @atom:cd @atom:c @atom:nd
@angle:cd-c-o @atom:cd @atom:c @atom:o
@angle:cd-c-oh @atom:cd @atom:c @atom:oh
@angle:cd-c-os @atom:cd @atom:c @atom:os
@angle:ce-c-ce @atom:ce @atom:c @atom:ce
@angle:ce-c-cf @atom:ce @atom:c @atom:cf
@angle:ce-c-cx @atom:ce @atom:c @atom:cx
@angle:ce-c-h4 @atom:ce @atom:c @atom:h4
@angle:ce-c-ha @atom:ce @atom:c @atom:ha
@angle:ce-c-n @atom:ce @atom:c @atom:n
@angle:ce-c-o @atom:ce @atom:c @atom:o
@angle:ce-c-oh @atom:ce @atom:c @atom:oh
@angle:ce-c-os @atom:ce @atom:c @atom:os
@angle:ce-c-s @atom:ce @atom:c @atom:s
@angle:ce-c-ss @atom:ce @atom:c @atom:ss
@angle:cf-c-cf @atom:cf @atom:c @atom:cf
@angle:cf-c-ha @atom:cf @atom:c @atom:ha
@angle:cf-c-n @atom:cf @atom:c @atom:n
@angle:cf-c-o @atom:cf @atom:c @atom:o
@angle:cf-c-oh @atom:cf @atom:c @atom:oh
@angle:cf-c-os @atom:cf @atom:c @atom:os
@angle:cf-c-s @atom:cf @atom:c @atom:s
@angle:cg-c-cg @atom:cg @atom:c @atom:cg
@angle:cg-c-ha @atom:cg @atom:c @atom:ha
@angle:cg-c-o @atom:cg @atom:c @atom:o
@angle:c-c-h4 @atom:c @atom:c @atom:h4
@angle:h4-cc-n @atom:h4 @atom:cc @atom:n
@angle:h4-cc-na @atom:h4 @atom:cc @atom:na
@angle:h4-cc-nc @atom:h4 @atom:cc @atom:nc
@angle:h4-cc-nd @atom:h4 @atom:cc @atom:nd
@angle:h4-cc-os @atom:h4 @atom:cc @atom:os
@angle:h4-cc-ss @atom:h4 @atom:cc @atom:ss
@angle:h5-cc-n @atom:h5 @atom:cc @atom:n
@angle:h5-cc-na @atom:h5 @atom:cc @atom:na
@angle:h5-cc-nc @atom:h5 @atom:cc @atom:nc
@angle:h5-cc-nd @atom:h5 @atom:cc @atom:nd
@angle:h5-cc-os @atom:h5 @atom:cc @atom:os
@angle:h5-cc-ss @atom:h5 @atom:cc @atom:ss
@angle:c-c-ha @atom:c @atom:c @atom:ha
@angle:ha-cc-na @atom:ha @atom:cc @atom:na
@angle:ha-cc-nc @atom:ha @atom:cc @atom:nc
@angle:ha-cc-nd @atom:ha @atom:cc @atom:nd
@angle:ha-cc-os @atom:ha @atom:cc @atom:os
@angle:ha-cc-pd @atom:ha @atom:cc @atom:pd
@angle:ha-cc-ss @atom:ha @atom:cc @atom:ss
@angle:ch-c-ch @atom:ch @atom:c @atom:ch
@angle:ch-c-ha @atom:ch @atom:c @atom:ha
@angle:ch-c-o @atom:ch @atom:c @atom:o
@angle:cl-c-cl @atom:cl @atom:c @atom:cl
@angle:cl-c-f @atom:cl @atom:c @atom:f
@angle:cl-c-ha @atom:cl @atom:c @atom:ha
@angle:cl-c-o @atom:cl @atom:c @atom:o
@angle:cl-c-s @atom:cl @atom:c @atom:s
@angle:c-c-n @atom:c @atom:c @atom:n
@angle:na-cc-nc @atom:na @atom:cc @atom:nc
@angle:na-cc-nd @atom:na @atom:cc @atom:nd
@angle:na-cc-no @atom:na @atom:cc @atom:no
@angle:na-cc-oh @atom:na @atom:cc @atom:oh
@angle:na-cc-sx @atom:na @atom:cc @atom:sx
@angle:na-cc-sy @atom:na @atom:cc @atom:sy
@angle:nc-cc-nd @atom:nc @atom:cc @atom:nd
@angle:nc-cc-nh @atom:nc @atom:cc @atom:nh
@angle:nc-cc-no @atom:nc @atom:cc @atom:no
@angle:nc-cc-ss @atom:nc @atom:cc @atom:ss
@angle:nd-cc-nd @atom:nd @atom:cc @atom:nd
@angle:nd-cc-ne @atom:nd @atom:cc @atom:ne
@angle:nd-cc-nh @atom:nd @atom:cc @atom:nh
@angle:nd-cc-no @atom:nd @atom:cc @atom:no
@angle:nd-cc-oh @atom:nd @atom:cc @atom:oh
@angle:nd-cc-os @atom:nd @atom:cc @atom:os
@angle:nd-cc-sh @atom:nd @atom:cc @atom:sh
@angle:nd-cc-ss @atom:nd @atom:cc @atom:ss
@angle:nd-cc-sx @atom:nd @atom:cc @atom:sx
@angle:nd-cc-sy @atom:nd @atom:cc @atom:sy
@angle:ne-cc-ss @atom:ne @atom:cc @atom:ss
@angle:nh-cc-nh @atom:nh @atom:cc @atom:nh
@angle:nh-cc-os @atom:nh @atom:cc @atom:os
@angle:nh-cc-ss @atom:nh @atom:cc @atom:ss
@angle:n-cc-n2 @atom:n @atom:cc @atom:n2
@angle:n-cc-na @atom:n @atom:cc @atom:na
@angle:n-cc-nc @atom:n @atom:cc @atom:nc
@angle:n-cc-nd @atom:n @atom:cc @atom:nd
@angle:n-cc-nh @atom:n @atom:cc @atom:nh
@angle:no-cc-os @atom:no @atom:cc @atom:os
@angle:no-cc-ss @atom:no @atom:cc @atom:ss
@angle:n-cc-ss @atom:n @atom:cc @atom:ss
@angle:c-c-o @atom:c @atom:c @atom:o
@angle:c-c-oh @atom:c @atom:c @atom:oh
@angle:c-c-os @atom:c @atom:c @atom:os
@angle:os-cc-ss @atom:os @atom:cc @atom:ss
@angle:ss-cc-ss @atom:ss @atom:cc @atom:ss
@angle:ss-cc-sy @atom:ss @atom:cc @atom:sy
@angle:cx-c-cx @atom:cx @atom:c @atom:cx
@angle:cx-c-n @atom:cx @atom:c @atom:n
@angle:cx-c-o @atom:cx @atom:c @atom:o
@angle:cx-c-oh @atom:cx @atom:c @atom:oh
@angle:cx-c-os @atom:cx @atom:c @atom:os
@angle:cy-c-cy @atom:cy @atom:c @atom:cy
@angle:cy-c-n @atom:cy @atom:c @atom:n
@angle:cy-c-o @atom:cy @atom:c @atom:o
@angle:cy-c-oh @atom:cy @atom:c @atom:oh
@angle:cy-c-os @atom:cy @atom:c @atom:os
@angle:c2-cd-c3 @atom:c2 @atom:cd @atom:c3
@angle:c2-cd-ca @atom:c2 @atom:cd @atom:ca
@angle:c2-cd-cc @atom:c2 @atom:cd @atom:cc
@angle:c2-cd-cd @atom:c2 @atom:cd @atom:cd
@angle:c2-cd-ha @atom:c2 @atom:cd @atom:ha
@angle:c2-cd-n @atom:c2 @atom:cd @atom:n
@angle:c2-cd-os @atom:c2 @atom:cd @atom:os
@angle:c3-cd-ca @atom:c3 @atom:cd @atom:ca
@angle:c3-cd-cc @atom:c3 @atom:cd @atom:cc
@angle:c3-cd-cd @atom:c3 @atom:cd @atom:cd
@angle:c3-cd-ce @atom:c3 @atom:cd @atom:ce
@angle:c3-cd-ha @atom:c3 @atom:cd @atom:ha
@angle:c3-cd-n2 @atom:c3 @atom:cd @atom:n2
@angle:c3-cd-n @atom:c3 @atom:cd @atom:n
@angle:c3-cd-na @atom:c3 @atom:cd @atom:na
@angle:c3-cd-nc @atom:c3 @atom:cd @atom:nc
@angle:c3-cd-nd @atom:c3 @atom:cd @atom:nd
@angle:c3-cd-os @atom:c3 @atom:cd @atom:os
@angle:c3-cd-ss @atom:c3 @atom:cd @atom:ss
@angle:ca-cd-cc @atom:ca @atom:cd @atom:cc
@angle:ca-cd-cd @atom:ca @atom:cd @atom:cd
@angle:ca-cd-ce @atom:ca @atom:cd @atom:ce
@angle:ca-cd-h4 @atom:ca @atom:cd @atom:h4
@angle:ca-cd-ha @atom:ca @atom:cd @atom:ha
@angle:ca-cd-n @atom:ca @atom:cd @atom:n
@angle:ca-cd-na @atom:ca @atom:cd @atom:na
@angle:ca-cd-nc @atom:ca @atom:cd @atom:nc
@angle:ca-cd-nd @atom:ca @atom:cd @atom:nd
@angle:ca-cd-oh @atom:ca @atom:cd @atom:oh
@angle:ca-cd-os @atom:ca @atom:cd @atom:os
@angle:ca-cd-ss @atom:ca @atom:cd @atom:ss
@angle:c-cd-c2 @atom:c @atom:cd @atom:c2
@angle:c-cd-c3 @atom:c @atom:cd @atom:c3
@angle:c-cd-c @atom:c @atom:cd @atom:c
@angle:c-cd-ca @atom:c @atom:cd @atom:ca
@angle:c-cd-cc @atom:c @atom:cd @atom:cc
@angle:cc-cd-cc @atom:cc @atom:cd @atom:cc
@angle:cc-cd-cd @atom:cc @atom:cd @atom:cd
@angle:cc-cd-cf @atom:cc @atom:cd @atom:cf
@angle:cc-cd-ch @atom:cc @atom:cd @atom:ch
@angle:cc-cd-cl @atom:cc @atom:cd @atom:cl
@angle:cc-cd-cy @atom:cc @atom:cd @atom:cy
@angle:c-cd-cd @atom:c @atom:cd @atom:cd
@angle:c-cd-cf @atom:c @atom:cd @atom:cf
@angle:cc-cd-h4 @atom:cc @atom:cd @atom:h4
@angle:cc-cd-ha @atom:cc @atom:cd @atom:ha
@angle:c-cd-cl @atom:c @atom:cd @atom:cl
@angle:cc-cd-n @atom:cc @atom:cd @atom:n
@angle:cc-cd-na @atom:cc @atom:cd @atom:na
@angle:cc-cd-nc @atom:cc @atom:cd @atom:nc
@angle:cc-cd-nd @atom:cc @atom:cd @atom:nd
@angle:cc-cd-nh @atom:cc @atom:cd @atom:nh
@angle:cc-cd-oh @atom:cc @atom:cd @atom:oh
@angle:cc-cd-os @atom:cc @atom:cd @atom:os
@angle:cc-cd-ss @atom:cc @atom:cd @atom:ss
@angle:cc-cd-sy @atom:cc @atom:cd @atom:sy
@angle:cd-cd-cd @atom:cd @atom:cd @atom:cd
@angle:cd-cd-ce @atom:cd @atom:cd @atom:ce
@angle:cd-cd-cf @atom:cd @atom:cd @atom:cf
@angle:cd-cd-ch @atom:cd @atom:cd @atom:ch
@angle:cd-cd-cy @atom:cd @atom:cd @atom:cy
@angle:cd-cd-h4 @atom:cd @atom:cd @atom:h4
@angle:cd-cd-ha @atom:cd @atom:cd @atom:ha
@angle:cd-cd-n2 @atom:cd @atom:cd @atom:n2
@angle:cd-cd-n @atom:cd @atom:cd @atom:n
@angle:cd-cd-na @atom:cd @atom:cd @atom:na
@angle:cd-cd-nc @atom:cd @atom:cd @atom:nc
@angle:cd-cd-nd @atom:cd @atom:cd @atom:nd
@angle:cd-cd-nh @atom:cd @atom:cd @atom:nh
@angle:cd-cd-oh @atom:cd @atom:cd @atom:oh
@angle:cd-cd-os @atom:cd @atom:cd @atom:os
@angle:cd-cd-pc @atom:cd @atom:cd @atom:pc
@angle:cd-cd-ss @atom:cd @atom:cd @atom:ss
@angle:ce-cd-nd @atom:ce @atom:cd @atom:nd
@angle:cf-cd-na @atom:cf @atom:cd @atom:na
@angle:cf-cd-nc @atom:cf @atom:cd @atom:nc
@angle:cf-cd-nd @atom:cf @atom:cd @atom:nd
@angle:cf-cd-os @atom:cf @atom:cd @atom:os
@angle:cf-cd-ss @atom:cf @atom:cd @atom:ss
@angle:c-cd-h4 @atom:c @atom:cd @atom:h4
@angle:c-cd-ha @atom:c @atom:cd @atom:ha
@angle:cl-cd-nc @atom:cl @atom:cd @atom:nc
@angle:c-cd-n2 @atom:c @atom:cd @atom:n2
@angle:c-cd-n @atom:c @atom:cd @atom:n
@angle:c-cd-nc @atom:c @atom:cd @atom:nc
@angle:c-cd-nd @atom:c @atom:cd @atom:nd
@angle:c-cd-oh @atom:c @atom:cd @atom:oh
@angle:c-cd-os @atom:c @atom:cd @atom:os
@angle:h4-cd-n @atom:h4 @atom:cd @atom:n
@angle:h4-cd-na @atom:h4 @atom:cd @atom:na
@angle:h4-cd-nc @atom:h4 @atom:cd @atom:nc
@angle:h4-cd-nd @atom:h4 @atom:cd @atom:nd
@angle:h4-cd-os @atom:h4 @atom:cd @atom:os
@angle:h4-cd-ss @atom:h4 @atom:cd @atom:ss
@angle:h5-cd-n @atom:h5 @atom:cd @atom:n
@angle:h5-cd-na @atom:h5 @atom:cd @atom:na
@angle:h5-cd-nc @atom:h5 @atom:cd @atom:nc
@angle:h5-cd-nd @atom:h5 @atom:cd @atom:nd
@angle:h5-cd-os @atom:h5 @atom:cd @atom:os
@angle:h5-cd-ss @atom:h5 @atom:cd @atom:ss
@angle:ha-cd-na @atom:ha @atom:cd @atom:na
@angle:ha-cd-nc @atom:ha @atom:cd @atom:nc
@angle:ha-cd-nd @atom:ha @atom:cd @atom:nd
@angle:ha-cd-os @atom:ha @atom:cd @atom:os
@angle:ha-cd-pc @atom:ha @atom:cd @atom:pc
@angle:ha-cd-ss @atom:ha @atom:cd @atom:ss
@angle:na-cd-nc @atom:na @atom:cd @atom:nc
@angle:na-cd-nd @atom:na @atom:cd @atom:nd
@angle:na-cd-nh @atom:na @atom:cd @atom:nh
@angle:na-cd-ss @atom:na @atom:cd @atom:ss
@angle:nc-cd-nd @atom:nc @atom:cd @atom:nd
@angle:nc-cd-nh @atom:nc @atom:cd @atom:nh
@angle:nc-cd-oh @atom:nc @atom:cd @atom:oh
@angle:nc-cd-os @atom:nc @atom:cd @atom:os
@angle:nc-cd-ss @atom:nc @atom:cd @atom:ss
@angle:nd-cd-nd @atom:nd @atom:cd @atom:nd
@angle:nd-cd-nh @atom:nd @atom:cd @atom:nh
@angle:nd-cd-ss @atom:nd @atom:cd @atom:ss
@angle:nh-cd-nh @atom:nh @atom:cd @atom:nh
@angle:nh-cd-os @atom:nh @atom:cd @atom:os
@angle:nh-cd-ss @atom:nh @atom:cd @atom:ss
@angle:n-cd-na @atom:n @atom:cd @atom:na
@angle:n-cd-nc @atom:n @atom:cd @atom:nc
@angle:n-cd-nd @atom:n @atom:cd @atom:nd
@angle:n-cd-nh @atom:n @atom:cd @atom:nh
@angle:n-cd-ss @atom:n @atom:cd @atom:ss
@angle:oh-cd-os @atom:oh @atom:cd @atom:os
@angle:os-cd-ss @atom:os @atom:cd @atom:ss
@angle:ss-cd-ss @atom:ss @atom:cd @atom:ss
@angle:ss-cd-sy @atom:ss @atom:cd @atom:sy
@angle:c2-ce-c3 @atom:c2 @atom:ce @atom:c3
@angle:c2-ce-ca @atom:c2 @atom:ce @atom:ca
@angle:c2-ce-cc @atom:c2 @atom:ce @atom:cc
@angle:c2-ce-ce @atom:c2 @atom:ce @atom:ce
@angle:c2-ce-cg @atom:c2 @atom:ce @atom:cg
@angle:c2-ce-cl @atom:c2 @atom:ce @atom:cl
@angle:c2-ce-h4 @atom:c2 @atom:ce @atom:h4
@angle:c2-ce-ha @atom:c2 @atom:ce @atom:ha
@angle:c2-ce-n1 @atom:c2 @atom:ce @atom:n1
@angle:c2-ce-n2 @atom:c2 @atom:ce @atom:n2
@angle:c2-ce-na @atom:c2 @atom:ce @atom:na
@angle:c2-ce-ne @atom:c2 @atom:ce @atom:ne
@angle:c2-ce-oh @atom:c2 @atom:ce @atom:oh
@angle:c2-ce-p2 @atom:c2 @atom:ce @atom:p2
@angle:c2-ce-pe @atom:c2 @atom:ce @atom:pe
@angle:c2-ce-px @atom:c2 @atom:ce @atom:px
@angle:c2-ce-py @atom:c2 @atom:ce @atom:py
@angle:c2-ce-sx @atom:c2 @atom:ce @atom:sx
@angle:c2-ce-sy @atom:c2 @atom:ce @atom:sy
@angle:c3-ce-ca @atom:c3 @atom:ce @atom:ca
@angle:c3-ce-cc @atom:c3 @atom:ce @atom:cc
@angle:c3-ce-ce @atom:c3 @atom:ce @atom:ce
@angle:c3-ce-cf @atom:c3 @atom:ce @atom:cf
@angle:c3-ce-cg @atom:c3 @atom:ce @atom:cg
@angle:c3-ce-n2 @atom:c3 @atom:ce @atom:n2
@angle:c3-ce-nf @atom:c3 @atom:ce @atom:nf
@angle:c3-ce-nh @atom:c3 @atom:ce @atom:nh
@angle:ca-ce-ca @atom:ca @atom:ce @atom:ca
@angle:ca-ce-cc @atom:ca @atom:ce @atom:cc
@angle:ca-ce-ce @atom:ca @atom:ce @atom:ce
@angle:ca-ce-cf @atom:ca @atom:ce @atom:cf
@angle:ca-ce-cl @atom:ca @atom:ce @atom:cl
@angle:ca-ce-h4 @atom:ca @atom:ce @atom:h4
@angle:ca-ce-ha @atom:ca @atom:ce @atom:ha
@angle:ca-ce-n2 @atom:ca @atom:ce @atom:n2
@angle:ca-ce-nf @atom:ca @atom:ce @atom:nf
@angle:ca-ce-nh @atom:ca @atom:ce @atom:nh
@angle:ca-ce-oh @atom:ca @atom:ce @atom:oh
@angle:ca-ce-os @atom:ca @atom:ce @atom:os
@angle:ca-ce-ss @atom:ca @atom:ce @atom:ss
@angle:c-ce-c2 @atom:c @atom:ce @atom:c2
@angle:c-ce-c3 @atom:c @atom:ce @atom:c3
@angle:c-ce-c @atom:c @atom:ce @atom:c
@angle:c-ce-ca @atom:c @atom:ce @atom:ca
@angle:cc-ce-cd @atom:cc @atom:ce @atom:cd
@angle:cc-ce-cf @atom:cc @atom:ce @atom:cf
@angle:c-ce-cd @atom:c @atom:ce @atom:cd
@angle:c-ce-ce @atom:c @atom:ce @atom:ce
@angle:c-ce-cf @atom:c @atom:ce @atom:cf
@angle:c-ce-cg @atom:c @atom:ce @atom:cg
@angle:cc-ce-h4 @atom:cc @atom:ce @atom:h4
@angle:cc-ce-ha @atom:cc @atom:ce @atom:ha
@angle:c-ce-cl @atom:c @atom:ce @atom:cl
@angle:cc-ce-n2 @atom:cc @atom:ce @atom:n2
@angle:cc-ce-nh @atom:cc @atom:ce @atom:nh
@angle:c-ce-cy @atom:c @atom:ce @atom:cy
@angle:cd-ce-ce @atom:cd @atom:ce @atom:ce
@angle:cd-ce-ha @atom:cd @atom:ce @atom:ha
@angle:ce-ce-ce @atom:ce @atom:ce @atom:ce
@angle:ce-ce-cf @atom:ce @atom:ce @atom:cf
@angle:ce-ce-cl @atom:ce @atom:ce @atom:cl
@angle:ce-ce-h4 @atom:ce @atom:ce @atom:h4
@angle:ce-ce-ha @atom:ce @atom:ce @atom:ha
@angle:ce-ce-n1 @atom:ce @atom:ce @atom:n1
@angle:ce-ce-n2 @atom:ce @atom:ce @atom:n2
@angle:ce-ce-oh @atom:ce @atom:ce @atom:oh
@angle:cf-ce-cg @atom:cf @atom:ce @atom:cg
@angle:cf-ce-cy @atom:cf @atom:ce @atom:cy
@angle:cf-ce-h4 @atom:cf @atom:ce @atom:h4
@angle:cf-ce-ha @atom:cf @atom:ce @atom:ha
@angle:cf-ce-n1 @atom:cf @atom:ce @atom:n1
@angle:cf-ce-n @atom:cf @atom:ce @atom:n
@angle:cf-ce-nh @atom:cf @atom:ce @atom:nh
@angle:cf-ce-oh @atom:cf @atom:ce @atom:oh
@angle:cg-ce-cg @atom:cg @atom:ce @atom:cg
@angle:cg-ce-ha @atom:cg @atom:ce @atom:ha
@angle:cg-ce-n1 @atom:cg @atom:ce @atom:n1
@angle:cg-ce-n2 @atom:cg @atom:ce @atom:n2
@angle:c-ce-ha @atom:c @atom:ce @atom:ha
@angle:c-ce-n @atom:c @atom:ce @atom:n
@angle:c-ce-nh @atom:c @atom:ce @atom:nh
@angle:c-ce-oh @atom:c @atom:ce @atom:oh
@angle:c-ce-os @atom:c @atom:ce @atom:os
@angle:h4-ce-n1 @atom:h4 @atom:ce @atom:n1
@angle:h4-ce-n2 @atom:h4 @atom:ce @atom:n2
@angle:h4-ce-ne @atom:h4 @atom:ce @atom:ne
@angle:ha-ce-n1 @atom:ha @atom:ce @atom:n1
@angle:ha-ce-n2 @atom:ha @atom:ce @atom:n2
@angle:ha-ce-ne @atom:ha @atom:ce @atom:ne
@angle:ha-ce-nh @atom:ha @atom:ce @atom:nh
@angle:ha-ce-p2 @atom:ha @atom:ce @atom:p2
@angle:ha-ce-pe @atom:ha @atom:ce @atom:pe
@angle:ha-ce-px @atom:ha @atom:ce @atom:px
@angle:ha-ce-py @atom:ha @atom:ce @atom:py
@angle:ha-ce-sx @atom:ha @atom:ce @atom:sx
@angle:ha-ce-sy @atom:ha @atom:ce @atom:sy
@angle:n2-ce-nh @atom:n2 @atom:ce @atom:nh
@angle:n2-ce-os @atom:n2 @atom:ce @atom:os
@angle:n2-ce-ss @atom:n2 @atom:ce @atom:ss
@angle:ne-ce-ne @atom:ne @atom:ce @atom:ne
@angle:ne-ce-nh @atom:ne @atom:ce @atom:nh
@angle:nf-ce-nh @atom:nf @atom:ce @atom:nh
@angle:pe-ce-pe @atom:pe @atom:ce @atom:pe
@angle:py-ce-py @atom:py @atom:ce @atom:py
@angle:sx-ce-sx @atom:sx @atom:ce @atom:sx
@angle:sy-ce-sy @atom:sy @atom:ce @atom:sy
@angle:c2-cf-c3 @atom:c2 @atom:cf @atom:c3
@angle:c2-cf-ca @atom:c2 @atom:cf @atom:ca
@angle:c2-cf-cd @atom:c2 @atom:cf @atom:cd
@angle:c2-cf-cf @atom:c2 @atom:cf @atom:cf
@angle:c2-cf-ch @atom:c2 @atom:cf @atom:ch
@angle:c2-cf-ha @atom:c2 @atom:cf @atom:ha
@angle:c2-cf-n2 @atom:c2 @atom:cf @atom:n2
@angle:c2-cf-nf @atom:c2 @atom:cf @atom:nf
@angle:c2-cf-p2 @atom:c2 @atom:cf @atom:p2
@angle:c2-cf-pf @atom:c2 @atom:cf @atom:pf
@angle:c2-cf-px @atom:c2 @atom:cf @atom:px
@angle:c2-cf-py @atom:c2 @atom:cf @atom:py
@angle:c2-cf-sx @atom:c2 @atom:cf @atom:sx
@angle:c2-cf-sy @atom:c2 @atom:cf @atom:sy
@angle:c3-cf-ca @atom:c3 @atom:cf @atom:ca
@angle:c3-cf-cd @atom:c3 @atom:cf @atom:cd
@angle:c3-cf-ce @atom:c3 @atom:cf @atom:ce
@angle:c3-cf-cf @atom:c3 @atom:cf @atom:cf
@angle:c3-cf-n2 @atom:c3 @atom:cf @atom:n2
@angle:ca-cf-ca @atom:ca @atom:cf @atom:ca
@angle:ca-cf-cc @atom:ca @atom:cf @atom:cc
@angle:ca-cf-cd @atom:ca @atom:cf @atom:cd
@angle:ca-cf-ce @atom:ca @atom:cf @atom:ce
@angle:ca-cf-ha @atom:ca @atom:cf @atom:ha
@angle:ca-cf-n2 @atom:ca @atom:cf @atom:n2
@angle:ca-cf-ne @atom:ca @atom:cf @atom:ne
@angle:ca-cf-oh @atom:ca @atom:cf @atom:oh
@angle:c-cf-c2 @atom:c @atom:cf @atom:c2
@angle:c-cf-c3 @atom:c @atom:cf @atom:c3
@angle:c-cf-c @atom:c @atom:cf @atom:c
@angle:c-cf-cc @atom:c @atom:cf @atom:cc
@angle:cc-cf-cf @atom:cc @atom:cf @atom:cf
@angle:c-cf-cd @atom:c @atom:cf @atom:cd
@angle:c-cf-ce @atom:c @atom:cf @atom:ce
@angle:cc-cf-ha @atom:cc @atom:cf @atom:ha
@angle:cd-cf-ce @atom:cd @atom:cf @atom:ce
@angle:cd-cf-ha @atom:cd @atom:cf @atom:ha
@angle:cd-cf-n2 @atom:cd @atom:cf @atom:n2
@angle:ce-cf-cf @atom:ce @atom:cf @atom:cf
@angle:ce-cf-ch @atom:ce @atom:cf @atom:ch
@angle:ce-cf-ha @atom:ce @atom:cf @atom:ha
@angle:ce-cf-n @atom:ce @atom:cf @atom:n
@angle:ce-cf-oh @atom:ce @atom:cf @atom:oh
@angle:cf-cf-cf @atom:cf @atom:cf @atom:cf
@angle:cf-cf-h4 @atom:cf @atom:cf @atom:h4
@angle:cf-cf-ha @atom:cf @atom:cf @atom:ha
@angle:cf-cf-n1 @atom:cf @atom:cf @atom:n1
@angle:cf-cf-n2 @atom:cf @atom:cf @atom:n2
@angle:c-cf-ha @atom:c @atom:cf @atom:ha
@angle:ch-cf-ch @atom:ch @atom:cf @atom:ch
@angle:ch-cf-ha @atom:ch @atom:cf @atom:ha
@angle:ch-cf-n1 @atom:ch @atom:cf @atom:n1
@angle:c-cf-n2 @atom:c @atom:cf @atom:n2
@angle:c-cf-n @atom:c @atom:cf @atom:n
@angle:c-cf-nh @atom:c @atom:cf @atom:nh
@angle:f-c-f @atom:f @atom:c @atom:f
@angle:h4-cf-n2 @atom:h4 @atom:cf @atom:n2
@angle:h4-cf-ne @atom:h4 @atom:cf @atom:ne
@angle:ha-cf-n1 @atom:ha @atom:cf @atom:n1
@angle:ha-cf-n2 @atom:ha @atom:cf @atom:n2
@angle:ha-cf-nf @atom:ha @atom:cf @atom:nf
@angle:ha-cf-nh @atom:ha @atom:cf @atom:nh
@angle:ha-cf-p2 @atom:ha @atom:cf @atom:p2
@angle:ha-cf-pf @atom:ha @atom:cf @atom:pf
@angle:ha-cf-px @atom:ha @atom:cf @atom:px
@angle:ha-cf-py @atom:ha @atom:cf @atom:py
@angle:ha-cf-sx @atom:ha @atom:cf @atom:sx
@angle:ha-cf-sy @atom:ha @atom:cf @atom:sy
@angle:n2-cf-nh @atom:n2 @atom:cf @atom:nh
@angle:nf-cf-nf @atom:nf @atom:cf @atom:nf
@angle:f-c-o @atom:f @atom:c @atom:o
@angle:pf-cf-pf @atom:pf @atom:cf @atom:pf
@angle:py-cf-py @atom:py @atom:cf @atom:py
@angle:f-c-s @atom:f @atom:c @atom:s
@angle:sx-cf-sx @atom:sx @atom:cf @atom:sx
@angle:sy-cf-sy @atom:sy @atom:cf @atom:sy
@angle:c1-cg-ca @atom:c1 @atom:cg @atom:ca
@angle:c1-cg-cc @atom:c1 @atom:cg @atom:cc
@angle:c1-cg-ce @atom:c1 @atom:cg @atom:ce
@angle:c1-cg-cg @atom:c1 @atom:cg @atom:cg
@angle:c1-cg-ne @atom:c1 @atom:cg @atom:ne
@angle:c1-cg-pe @atom:c1 @atom:cg @atom:pe
@angle:ca-cg-ch @atom:ca @atom:cg @atom:ch
@angle:ca-cg-n1 @atom:ca @atom:cg @atom:n1
@angle:c-cg-c1 @atom:c @atom:cg @atom:c1
@angle:cc-cg-n1 @atom:cc @atom:cg @atom:n1
@angle:ce-cg-ch @atom:ce @atom:cg @atom:ch
@angle:ce-cg-n1 @atom:ce @atom:cg @atom:n1
@angle:n1-cg-ne @atom:n1 @atom:cg @atom:ne
@angle:h4-c-o @atom:h4 @atom:c @atom:o
@angle:h5-c-n @atom:h5 @atom:c @atom:n
@angle:h5-c-o @atom:h5 @atom:c @atom:o
@angle:ha-c-ha @atom:ha @atom:c @atom:ha
@angle:ha-c-i @atom:ha @atom:c @atom:i
@angle:ha-c-n @atom:ha @atom:c @atom:n
@angle:ha-c-o @atom:ha @atom:c @atom:o
@angle:ha-c-oh @atom:ha @atom:c @atom:oh
@angle:ha-c-os @atom:ha @atom:c @atom:os
@angle:ha-c-s @atom:ha @atom:c @atom:s
@angle:c1-ch-ca @atom:c1 @atom:ch @atom:ca
@angle:c1-ch-cf @atom:c1 @atom:ch @atom:cf
@angle:c1-ch-ch @atom:c1 @atom:ch @atom:ch
@angle:c1-ch-nf @atom:c1 @atom:ch @atom:nf
@angle:c1-ch-pf @atom:c1 @atom:ch @atom:pf
@angle:ca-ch-cg @atom:ca @atom:ch @atom:cg
@angle:ca-ch-n1 @atom:ca @atom:ch @atom:n1
@angle:c-ch-c1 @atom:c @atom:ch @atom:c1
@angle:cd-ch-n1 @atom:cd @atom:ch @atom:n1
@angle:cf-ch-cg @atom:cf @atom:ch @atom:cg
@angle:cf-ch-n1 @atom:cf @atom:ch @atom:n1
@angle:cg-ch-ch @atom:cg @atom:ch @atom:ch
@angle:n1-ch-nf @atom:n1 @atom:ch @atom:nf
@angle:i-c-i @atom:i @atom:c @atom:i
@angle:i-c-o @atom:i @atom:c @atom:o
@angle:f-cl-f @atom:f @atom:cl @atom:f
@angle:n2-c-n2 @atom:n2 @atom:c @atom:n2
@angle:n2-c-o @atom:n2 @atom:c @atom:o
@angle:n4-c-n4 @atom:n4 @atom:c @atom:n4
@angle:n4-c-o @atom:n4 @atom:c @atom:o
@angle:nc-c-o @atom:nc @atom:c @atom:o
@angle:nd-c-o @atom:nd @atom:c @atom:o
@angle:ne-c-ne @atom:ne @atom:c @atom:ne
@angle:ne-c-o @atom:ne @atom:c @atom:o
@angle:nf-c-nf @atom:nf @atom:c @atom:nf
@angle:nf-c-o @atom:nf @atom:c @atom:o
@angle:n-c-n @atom:n @atom:c @atom:n
@angle:n-c-nc @atom:n @atom:c @atom:nc
@angle:n-c-nd @atom:n @atom:c @atom:nd
@angle:n-c-ne @atom:n @atom:c @atom:ne
@angle:n-c-o @atom:n @atom:c @atom:o
@angle:n-c-oh @atom:n @atom:c @atom:oh
@angle:no-c-no @atom:no @atom:c @atom:no
@angle:no-c-o @atom:no @atom:c @atom:o
@angle:n-c-os @atom:n @atom:c @atom:os
@angle:n-c-s @atom:n @atom:c @atom:s
@angle:n-c-sh @atom:n @atom:c @atom:sh
@angle:n-c-ss @atom:n @atom:c @atom:ss
@angle:oh-c-oh @atom:oh @atom:c @atom:oh
@angle:oh-c-s @atom:oh @atom:c @atom:s
@angle:o-c-o @atom:o @atom:c @atom:o
@angle:o-c-oh @atom:o @atom:c @atom:oh
@angle:o-c-os @atom:o @atom:c @atom:os
@angle:o-c-p2 @atom:o @atom:c @atom:p2
@angle:o-c-p3 @atom:o @atom:c @atom:p3
@angle:o-c-p5 @atom:o @atom:c @atom:p5
@angle:o-c-pe @atom:o @atom:c @atom:pe
@angle:o-c-pf @atom:o @atom:c @atom:pf
@angle:o-c-px @atom:o @atom:c @atom:px
@angle:o-c-py @atom:o @atom:c @atom:py
@angle:o-c-s4 @atom:o @atom:c @atom:s4
@angle:o-c-s6 @atom:o @atom:c @atom:s6
@angle:o-c-s @atom:o @atom:c @atom:s
@angle:o-c-sh @atom:o @atom:c @atom:sh
@angle:os-c-os @atom:os @atom:c @atom:os
@angle:o-c-ss @atom:o @atom:c @atom:ss
@angle:os-c-s @atom:os @atom:c @atom:s
@angle:os-c-ss @atom:os @atom:c @atom:ss
@angle:o-c-sx @atom:o @atom:c @atom:sx
@angle:o-c-sy @atom:o @atom:c @atom:sy
@angle:p2-c-p2 @atom:p2 @atom:c @atom:p2
@angle:p3-c-p3 @atom:p3 @atom:c @atom:p3
@angle:p3-c-py @atom:p3 @atom:c @atom:py
@angle:p5-c-p5 @atom:p5 @atom:c @atom:p5
@angle:ca-cp-ca @atom:ca @atom:cp @atom:ca
@angle:ca-cp-cp @atom:ca @atom:cp @atom:cp
@angle:ca-cp-na @atom:ca @atom:cp @atom:na
@angle:ca-cp-nb @atom:ca @atom:cp @atom:nb
@angle:cp-cp-cp @atom:cp @atom:cp @atom:cp
@angle:cp-cp-cq @atom:cp @atom:cp @atom:cq
@angle:cp-cp-nb @atom:cp @atom:cp @atom:nb
@angle:pe-c-pe @atom:pe @atom:c @atom:pe
@angle:pf-c-pf @atom:pf @atom:c @atom:pf
@angle:nb-cp-nb @atom:nb @atom:cp @atom:nb
@angle:py-c-py @atom:py @atom:c @atom:py
@angle:ca-cq-ca @atom:ca @atom:cq @atom:ca
@angle:ca-cq-cq @atom:ca @atom:cq @atom:cq
@angle:ca-cq-nb @atom:ca @atom:cq @atom:nb
@angle:cp-cq-cq @atom:cp @atom:cq @atom:cq
@angle:cq-cq-cq @atom:cq @atom:cq @atom:cq
@angle:cq-cq-nb @atom:cq @atom:cq @atom:nb
@angle:s4-c-s4 @atom:s4 @atom:c @atom:s4
@angle:s6-c-s6 @atom:s6 @atom:c @atom:s6
@angle:sh-c-sh @atom:sh @atom:c @atom:sh
@angle:s-c-s @atom:s @atom:c @atom:s
@angle:s-c-sh @atom:s @atom:c @atom:sh
@angle:s-c-ss @atom:s @atom:c @atom:ss
@angle:ss-c-ss @atom:ss @atom:c @atom:ss
@angle:sx-c-sx @atom:sx @atom:c @atom:sx
@angle:sy-c-sy @atom:sy @atom:c @atom:sy
@angle:c2-cu-cx @atom:c2 @atom:cu @atom:cx
@angle:c-cu-cu @atom:c @atom:cu @atom:cu
@angle:cu-cu-cx @atom:cu @atom:cu @atom:cx
@angle:cu-cu-ha @atom:cu @atom:cu @atom:ha
@angle:cv-cv-cy @atom:cv @atom:cv @atom:cy
@angle:cv-cv-ha @atom:cv @atom:cv @atom:ha
@angle:cx-cv-cx @atom:cx @atom:cv @atom:cx
@angle:cy-cv-ha @atom:cy @atom:cv @atom:ha
@angle:c1-cx-cx @atom:c1 @atom:cx @atom:cx
@angle:c2-cx-cx @atom:c2 @atom:cx @atom:cx
@angle:c2-cx-h1 @atom:c2 @atom:cx @atom:h1
@angle:c2-cx-hc @atom:c2 @atom:cx @atom:hc
@angle:c2-cx-os @atom:c2 @atom:cx @atom:os
@angle:c3-cx-c3 @atom:c3 @atom:cx @atom:c3
@angle:c3-cx-cx @atom:c3 @atom:cx @atom:cx
@angle:c3-cx-h1 @atom:c3 @atom:cx @atom:h1
@angle:c3-cx-hc @atom:c3 @atom:cx @atom:hc
@angle:c3-cx-n3 @atom:c3 @atom:cx @atom:n3
@angle:c3-cx-os @atom:c3 @atom:cx @atom:os
@angle:ca-cx-cx @atom:ca @atom:cx @atom:cx
@angle:ca-cx-h1 @atom:ca @atom:cx @atom:h1
@angle:ca-cx-hc @atom:ca @atom:cx @atom:hc
@angle:ca-cx-oh @atom:ca @atom:cx @atom:oh
@angle:ca-cx-os @atom:ca @atom:cx @atom:os
@angle:c-cx-c3 @atom:c @atom:cx @atom:c3
@angle:cc-cx-cx @atom:cc @atom:cx @atom:cx
@angle:cc-cx-hc @atom:cc @atom:cx @atom:hc
@angle:c-cx-cx @atom:c @atom:cx @atom:cx
@angle:cd-cx-cx @atom:cd @atom:cx @atom:cx
@angle:c-cx-h1 @atom:c @atom:cx @atom:h1
@angle:c-cx-hc @atom:c @atom:cx @atom:hc
@angle:cl-cx-cl @atom:cl @atom:cx @atom:cl
@angle:cl-cx-cx @atom:cl @atom:cx @atom:cx
@angle:cl-cx-h1 @atom:cl @atom:cx @atom:h1
@angle:cl-cx-hc @atom:cl @atom:cx @atom:hc
@angle:c-cx-os @atom:c @atom:cx @atom:os
@angle:cu-cx-cu @atom:cu @atom:cx @atom:cu
@angle:cu-cx-cx @atom:cu @atom:cx @atom:cx
@angle:cu-cx-hc @atom:cu @atom:cx @atom:hc
@angle:cx-cx-cx @atom:cx @atom:cx @atom:cx
@angle:cx-cx-cy @atom:cx @atom:cx @atom:cy
@angle:cx-cx-f @atom:cx @atom:cx @atom:f
@angle:cx-cx-h1 @atom:cx @atom:cx @atom:h1
@angle:cx-cx-hc @atom:cx @atom:cx @atom:hc
@angle:cx-cx-hx @atom:cx @atom:cx @atom:hx
@angle:cx-cx-n3 @atom:cx @atom:cx @atom:n3
@angle:cx-cx-na @atom:cx @atom:cx @atom:na
@angle:cx-cx-nh @atom:cx @atom:cx @atom:nh
@angle:cx-cx-os @atom:cx @atom:cx @atom:os
@angle:cy-cx-hc @atom:cy @atom:cx @atom:hc
@angle:f-cx-f @atom:f @atom:cx @atom:f
@angle:f-cx-h1 @atom:f @atom:cx @atom:h1
@angle:f-cx-hc @atom:f @atom:cx @atom:hc
@angle:h1-cx-h1 @atom:h1 @atom:cx @atom:h1
@angle:h1-cx-n3 @atom:h1 @atom:cx @atom:n3
@angle:h1-cx-n @atom:h1 @atom:cx @atom:n
@angle:h1-cx-na @atom:h1 @atom:cx @atom:na
@angle:h1-cx-nh @atom:h1 @atom:cx @atom:nh
@angle:h1-cx-os @atom:h1 @atom:cx @atom:os
@angle:h2-cx-h2 @atom:h2 @atom:cx @atom:h2
@angle:h2-cx-n2 @atom:h2 @atom:cx @atom:n2
@angle:hc-cx-hc @atom:hc @atom:cx @atom:hc
@angle:hc-cx-os @atom:hc @atom:cx @atom:os
@angle:hx-cx-n4 @atom:hx @atom:cx @atom:n4
@angle:n2-cx-n2 @atom:n2 @atom:cx @atom:n2
@angle:n-cx-oh @atom:n @atom:cx @atom:oh
@angle:n-cx-os @atom:n @atom:cx @atom:os
@angle:oh-cx-oh @atom:oh @atom:cx @atom:oh
@angle:oh-cx-os @atom:oh @atom:cx @atom:os
@angle:os-cx-os @atom:os @atom:cx @atom:os
@angle:c2-cy-cy @atom:c2 @atom:cy @atom:cy
@angle:c3-cy-c3 @atom:c3 @atom:cy @atom:c3
@angle:c3-cy-cy @atom:c3 @atom:cy @atom:cy
@angle:c3-cy-h1 @atom:c3 @atom:cy @atom:h1
@angle:c3-cy-hc @atom:c3 @atom:cy @atom:hc
@angle:c3-cy-n3 @atom:c3 @atom:cy @atom:n3
@angle:c3-cy-n @atom:c3 @atom:cy @atom:n
@angle:c3-cy-os @atom:c3 @atom:cy @atom:os
@angle:c-cy-c3 @atom:c @atom:cy @atom:c3
@angle:cc-cy-cy @atom:cc @atom:cy @atom:cy
@angle:c-cy-cy @atom:c @atom:cy @atom:cy
@angle:cd-cy-cy @atom:cd @atom:cy @atom:cy
@angle:ce-cy-h2 @atom:ce @atom:cy @atom:h2
@angle:ce-cy-n @atom:ce @atom:cy @atom:n
@angle:ce-cy-ss @atom:ce @atom:cy @atom:ss
@angle:c-cy-h1 @atom:c @atom:cy @atom:h1
@angle:c-cy-hc @atom:c @atom:cy @atom:hc
@angle:cl-cy-cy @atom:cl @atom:cy @atom:cy
@angle:cl-cy-h1 @atom:cl @atom:cy @atom:h1
@angle:cl-cy-hc @atom:cl @atom:cy @atom:hc
@angle:c-cy-n @atom:c @atom:cy @atom:n
@angle:c-cy-os @atom:c @atom:cy @atom:os
@angle:cv-cy-cy @atom:cv @atom:cy @atom:cy
@angle:cv-cy-hc @atom:cv @atom:cy @atom:hc
@angle:cx-cy-cy @atom:cx @atom:cy @atom:cy
@angle:cx-cy-hc @atom:cx @atom:cy @atom:hc
@angle:cy-cy-cy @atom:cy @atom:cy @atom:cy
@angle:cy-cy-f @atom:cy @atom:cy @atom:f
@angle:cy-cy-h1 @atom:cy @atom:cy @atom:h1
@angle:cy-cy-h2 @atom:cy @atom:cy @atom:h2
@angle:cy-cy-hc @atom:cy @atom:cy @atom:hc
@angle:cy-cy-n3 @atom:cy @atom:cy @atom:n3
@angle:cy-cy-n @atom:cy @atom:cy @atom:n
@angle:cy-cy-na @atom:cy @atom:cy @atom:na
@angle:cy-cy-oh @atom:cy @atom:cy @atom:oh
@angle:cy-cy-os @atom:cy @atom:cy @atom:os
@angle:cy-cy-s6 @atom:cy @atom:cy @atom:s6
@angle:cy-cy-ss @atom:cy @atom:cy @atom:ss
@angle:h1-cy-h1 @atom:h1 @atom:cy @atom:h1
@angle:h1-cy-n3 @atom:h1 @atom:cy @atom:n3
@angle:h1-cy-n @atom:h1 @atom:cy @atom:n
@angle:h1-cy-oh @atom:h1 @atom:cy @atom:oh
@angle:h1-cy-os @atom:h1 @atom:cy @atom:os
@angle:h1-cy-s6 @atom:h1 @atom:cy @atom:s6
@angle:h2-cy-n @atom:h2 @atom:cy @atom:n
@angle:h2-cy-os @atom:h2 @atom:cy @atom:os
@angle:h2-cy-s6 @atom:h2 @atom:cy @atom:s6
@angle:h2-cy-ss @atom:h2 @atom:cy @atom:ss
@angle:hc-cy-hc @atom:hc @atom:cy @atom:hc
@angle:n-cy-os @atom:n @atom:cy @atom:os
@angle:n-cy-s6 @atom:n @atom:cy @atom:s6
@angle:n-cy-ss @atom:n @atom:cy @atom:ss
@angle:nh-cz-nh @atom:nh @atom:cz @atom:nh
@angle:br-n1-c1 @atom:br @atom:n1 @atom:c1
@angle:c1-n1-c1 @atom:c1 @atom:n1 @atom:c1
@angle:c1-n1-c2 @atom:c1 @atom:n1 @atom:c2
@angle:c1-n1-c3 @atom:c1 @atom:n1 @atom:c3
@angle:c1-n1-ca @atom:c1 @atom:n1 @atom:ca
@angle:c1-n1-cl @atom:c1 @atom:n1 @atom:cl
@angle:c1-n1-f @atom:c1 @atom:n1 @atom:f
@angle:c1-n1-hn @atom:c1 @atom:n1 @atom:hn
@angle:c1-n1-i @atom:c1 @atom:n1 @atom:i
@angle:c1-n1-n1 @atom:c1 @atom:n1 @atom:n1
@angle:c1-n1-n2 @atom:c1 @atom:n1 @atom:n2
@angle:c1-n1-n3 @atom:c1 @atom:n1 @atom:n3
@angle:c1-n1-n4 @atom:c1 @atom:n1 @atom:n4
@angle:c1-n1-na @atom:c1 @atom:n1 @atom:na
@angle:c1-n1-nh @atom:c1 @atom:n1 @atom:nh
@angle:c1-n1-o @atom:c1 @atom:n1 @atom:o
@angle:c1-n1-oh @atom:c1 @atom:n1 @atom:oh
@angle:c1-n1-os @atom:c1 @atom:n1 @atom:os
@angle:c1-n1-p2 @atom:c1 @atom:n1 @atom:p2
@angle:c1-n1-p3 @atom:c1 @atom:n1 @atom:p3
@angle:c1-n1-p4 @atom:c1 @atom:n1 @atom:p4
@angle:c1-n1-p5 @atom:c1 @atom:n1 @atom:p5
@angle:c1-n1-s2 @atom:c1 @atom:n1 @atom:s2
@angle:c1-n1-s4 @atom:c1 @atom:n1 @atom:s4
@angle:c1-n1-s @atom:c1 @atom:n1 @atom:s
@angle:c1-n1-s6 @atom:c1 @atom:n1 @atom:s6
@angle:c1-n1-sh @atom:c1 @atom:n1 @atom:sh
@angle:c1-n1-ss @atom:c1 @atom:n1 @atom:ss
@angle:c2-n1-n1 @atom:c2 @atom:n1 @atom:n1
@angle:c2-n1-o @atom:c2 @atom:n1 @atom:o
@angle:c2-n1-s @atom:c2 @atom:n1 @atom:s
@angle:c3-n1-n1 @atom:c3 @atom:n1 @atom:n1
@angle:ca-n1-n1 @atom:ca @atom:n1 @atom:n1
@angle:ce-n1-o @atom:ce @atom:n1 @atom:o
@angle:ce-n1-s @atom:ce @atom:n1 @atom:s
@angle:cf-n1-o @atom:cf @atom:n1 @atom:o
@angle:cf-n1-s @atom:cf @atom:n1 @atom:s
@angle:cl-n1-n1 @atom:cl @atom:n1 @atom:n1
@angle:f-n1-n1 @atom:f @atom:n1 @atom:n1
@angle:hn-n1-n1 @atom:hn @atom:n1 @atom:n1
@angle:i-n1-n1 @atom:i @atom:n1 @atom:n1
@angle:n1-n1-n1 @atom:n1 @atom:n1 @atom:n1
@angle:n1-n1-n2 @atom:n1 @atom:n1 @atom:n2
@angle:n1-n1-n3 @atom:n1 @atom:n1 @atom:n3
@angle:n1-n1-n4 @atom:n1 @atom:n1 @atom:n4
@angle:n1-n1-na @atom:n1 @atom:n1 @atom:na
@angle:n1-n1-nh @atom:n1 @atom:n1 @atom:nh
@angle:n1-n1-o @atom:n1 @atom:n1 @atom:o
@angle:n1-n1-oh @atom:n1 @atom:n1 @atom:oh
@angle:n1-n1-os @atom:n1 @atom:n1 @atom:os
@angle:n1-n1-p2 @atom:n1 @atom:n1 @atom:p2
@angle:n1-n1-p3 @atom:n1 @atom:n1 @atom:p3
@angle:n1-n1-s @atom:n1 @atom:n1 @atom:s
@angle:n1-n1-sh @atom:n1 @atom:n1 @atom:sh
@angle:n1-n1-ss @atom:n1 @atom:n1 @atom:ss
@angle:o-n1-p2 @atom:o @atom:n1 @atom:p2
@angle:p2-n1-s @atom:p2 @atom:n1 @atom:s
@angle:br-n2-br @atom:br @atom:n2 @atom:br
@angle:br-n2-c2 @atom:br @atom:n2 @atom:c2
@angle:br-n2-n2 @atom:br @atom:n2 @atom:n2
@angle:br-n2-o @atom:br @atom:n2 @atom:o
@angle:br-n2-p2 @atom:br @atom:n2 @atom:p2
@angle:br-n2-s @atom:br @atom:n2 @atom:s
@angle:c1-n2-c1 @atom:c1 @atom:n2 @atom:c1
@angle:c1-n2-c3 @atom:c1 @atom:n2 @atom:c3
@angle:c1-n2-cl @atom:c1 @atom:n2 @atom:cl
@angle:c1-n2-hn @atom:c1 @atom:n2 @atom:hn
@angle:c1-n2-n2 @atom:c1 @atom:n2 @atom:n2
@angle:c1-n2-o @atom:c1 @atom:n2 @atom:o
@angle:c1-n2-p2 @atom:c1 @atom:n2 @atom:p2
@angle:c1-n2-s @atom:c1 @atom:n2 @atom:s
@angle:c2-n2-c2 @atom:c2 @atom:n2 @atom:c2
@angle:c2-n2-c3 @atom:c2 @atom:n2 @atom:c3
@angle:c2-n2-ca @atom:c2 @atom:n2 @atom:ca
@angle:c2-n2-cl @atom:c2 @atom:n2 @atom:cl
@angle:c2-n2-f @atom:c2 @atom:n2 @atom:f
@angle:c2-n2-hn @atom:c2 @atom:n2 @atom:hn
@angle:c2-n2-i @atom:c2 @atom:n2 @atom:i
@angle:c2-n2-n1 @atom:c2 @atom:n2 @atom:n1
@angle:c2-n2-n2 @atom:c2 @atom:n2 @atom:n2
@angle:c2-n2-n3 @atom:c2 @atom:n2 @atom:n3
@angle:c2-n2-n4 @atom:c2 @atom:n2 @atom:n4
@angle:c2-n2-n @atom:c2 @atom:n2 @atom:n
@angle:c2-n2-na @atom:c2 @atom:n2 @atom:na
@angle:c2-n2-nh @atom:c2 @atom:n2 @atom:nh
@angle:c2-n2-no @atom:c2 @atom:n2 @atom:no
@angle:c2-n2-o @atom:c2 @atom:n2 @atom:o
@angle:c2-n2-oh @atom:c2 @atom:n2 @atom:oh
@angle:c2-n2-os @atom:c2 @atom:n2 @atom:os
@angle:c2-n2-p2 @atom:c2 @atom:n2 @atom:p2
@angle:c2-n2-p3 @atom:c2 @atom:n2 @atom:p3
@angle:c2-n2-p4 @atom:c2 @atom:n2 @atom:p4
@angle:c2-n2-s4 @atom:c2 @atom:n2 @atom:s4
@angle:c2-n2-s6 @atom:c2 @atom:n2 @atom:s6
@angle:c2-n2-s @atom:c2 @atom:n2 @atom:s
@angle:c2-n2-sh @atom:c2 @atom:n2 @atom:sh
@angle:c2-n2-ss @atom:c2 @atom:n2 @atom:ss
@angle:c3-n2-c3 @atom:c3 @atom:n2 @atom:c3
@angle:c3-n2-ca @atom:c3 @atom:n2 @atom:ca
@angle:c3-n2-ce @atom:c3 @atom:n2 @atom:ce
@angle:c3-n2-cf @atom:c3 @atom:n2 @atom:cf
@angle:c3-n2-hn @atom:c3 @atom:n2 @atom:hn
@angle:c3-n2-n1 @atom:c3 @atom:n2 @atom:n1
@angle:c3-n2-n2 @atom:c3 @atom:n2 @atom:n2
@angle:c3-n2-nh @atom:c3 @atom:n2 @atom:nh
@angle:c3-n2-o @atom:c3 @atom:n2 @atom:o
@angle:c3-n2-p2 @atom:c3 @atom:n2 @atom:p2
@angle:c3-n2-s6 @atom:c3 @atom:n2 @atom:s6
@angle:c3-n2-s @atom:c3 @atom:n2 @atom:s
@angle:ca-n2-ca @atom:ca @atom:n2 @atom:ca
@angle:ca-n2-hn @atom:ca @atom:n2 @atom:hn
@angle:ca-n2-n2 @atom:ca @atom:n2 @atom:n2
@angle:ca-n2-o @atom:ca @atom:n2 @atom:o
@angle:ca-n2-p2 @atom:ca @atom:n2 @atom:p2
@angle:ca-n2-s @atom:ca @atom:n2 @atom:s
@angle:c-n2-c2 @atom:c @atom:n2 @atom:c2
@angle:c-n2-c @atom:c @atom:n2 @atom:c
@angle:c-n2-ca @atom:c @atom:n2 @atom:ca
@angle:cc-n2-cl @atom:cc @atom:n2 @atom:cl
@angle:cc-n2-hn @atom:cc @atom:n2 @atom:hn
@angle:cc-n2-na @atom:cc @atom:n2 @atom:na
@angle:cc-n2-nh @atom:cc @atom:n2 @atom:nh
@angle:cd-n2-cl @atom:cd @atom:n2 @atom:cl
@angle:cd-n2-hn @atom:cd @atom:n2 @atom:hn
@angle:ce-n2-hn @atom:ce @atom:n2 @atom:hn
@angle:ce-n2-n @atom:ce @atom:n2 @atom:n
@angle:ce-n2-nh @atom:ce @atom:n2 @atom:nh
@angle:ce-n2-o @atom:ce @atom:n2 @atom:o
@angle:ce-n2-oh @atom:ce @atom:n2 @atom:oh
@angle:ce-n2-os @atom:ce @atom:n2 @atom:os
@angle:ce-n2-s @atom:ce @atom:n2 @atom:s
@angle:cf-n2-hn @atom:cf @atom:n2 @atom:hn
@angle:cf-n2-n @atom:cf @atom:n2 @atom:n
@angle:cf-n2-nh @atom:cf @atom:n2 @atom:nh
@angle:cf-n2-o @atom:cf @atom:n2 @atom:o
@angle:cf-n2-oh @atom:cf @atom:n2 @atom:oh
@angle:cf-n2-os @atom:cf @atom:n2 @atom:os
@angle:cf-n2-s @atom:cf @atom:n2 @atom:s
@angle:cl-n2-n1 @atom:cl @atom:n2 @atom:n1
@angle:cl-n2-n2 @atom:cl @atom:n2 @atom:n2
@angle:cl-n2-o @atom:cl @atom:n2 @atom:o
@angle:cl-n2-p2 @atom:cl @atom:n2 @atom:p2
@angle:cl-n2-s @atom:cl @atom:n2 @atom:s
@angle:cx-n2-n2 @atom:cx @atom:n2 @atom:n2
@angle:f-n2-n2 @atom:f @atom:n2 @atom:n2
@angle:f-n2-o @atom:f @atom:n2 @atom:o
@angle:f-n2-p2 @atom:f @atom:n2 @atom:p2
@angle:f-n2-s @atom:f @atom:n2 @atom:s
@angle:hn-n2-hn @atom:hn @atom:n2 @atom:hn
@angle:hn-n2-n1 @atom:hn @atom:n2 @atom:n1
@angle:hn-n2-n2 @atom:hn @atom:n2 @atom:n2
@angle:hn-n2-ne @atom:hn @atom:n2 @atom:ne
@angle:hn-n2-nf @atom:hn @atom:n2 @atom:nf
@angle:hn-n2-o @atom:hn @atom:n2 @atom:o
@angle:hn-n2-p2 @atom:hn @atom:n2 @atom:p2
@angle:hn-n2-p4 @atom:hn @atom:n2 @atom:p4
@angle:hn-n2-p5 @atom:hn @atom:n2 @atom:p5
@angle:hn-n2-pe @atom:hn @atom:n2 @atom:pe
@angle:hn-n2-pf @atom:hn @atom:n2 @atom:pf
@angle:hn-n2-s2 @atom:hn @atom:n2 @atom:s2
@angle:hn-n2-s4 @atom:hn @atom:n2 @atom:s4
@angle:hn-n2-s @atom:hn @atom:n2 @atom:s
@angle:hn-n2-s6 @atom:hn @atom:n2 @atom:s6
@angle:i-n2-n2 @atom:i @atom:n2 @atom:n2
@angle:i-n2-o @atom:i @atom:n2 @atom:o
@angle:i-n2-p2 @atom:i @atom:n2 @atom:p2
@angle:i-n2-s @atom:i @atom:n2 @atom:s
@angle:n1-n2-n1 @atom:n1 @atom:n2 @atom:n1
@angle:n2-n2-n1 @atom:n2 @atom:n2 @atom:n1
@angle:n2-n2-n2 @atom:n2 @atom:n2 @atom:n2
@angle:n2-n2-n3 @atom:n2 @atom:n2 @atom:n3
@angle:n2-n2-n4 @atom:n2 @atom:n2 @atom:n4
@angle:n2-n2-na @atom:n2 @atom:n2 @atom:na
@angle:n2-n2-nh @atom:n2 @atom:n2 @atom:nh
@angle:n2-n2-no @atom:n2 @atom:n2 @atom:no
@angle:n2-n2-o @atom:n2 @atom:n2 @atom:o
@angle:n2-n2-oh @atom:n2 @atom:n2 @atom:oh
@angle:n2-n2-os @atom:n2 @atom:n2 @atom:os
@angle:n2-n2-p2 @atom:n2 @atom:n2 @atom:p2
@angle:n2-n2-p3 @atom:n2 @atom:n2 @atom:p3
@angle:n2-n2-p4 @atom:n2 @atom:n2 @atom:p4
@angle:n2-n2-p5 @atom:n2 @atom:n2 @atom:p5
@angle:n2-n2-s4 @atom:n2 @atom:n2 @atom:s4
@angle:n2-n2-s6 @atom:n2 @atom:n2 @atom:s6
@angle:n2-n2-s @atom:n2 @atom:n2 @atom:s
@angle:n2-n2-sh @atom:n2 @atom:n2 @atom:sh
@angle:n2-n2-ss @atom:n2 @atom:n2 @atom:ss
@angle:n3-n2-n3 @atom:n3 @atom:n2 @atom:n3
@angle:n3-n2-o @atom:n3 @atom:n2 @atom:o
@angle:n3-n2-p2 @atom:n3 @atom:n2 @atom:p2
@angle:n3-n2-s @atom:n3 @atom:n2 @atom:s
@angle:n4-n2-n4 @atom:n4 @atom:n2 @atom:n4
@angle:n4-n2-o @atom:n4 @atom:n2 @atom:o
@angle:n4-n2-p2 @atom:n4 @atom:n2 @atom:p2
@angle:n4-n2-s @atom:n4 @atom:n2 @atom:s
@angle:na-n2-na @atom:na @atom:n2 @atom:na
@angle:na-n2-o @atom:na @atom:n2 @atom:o
@angle:na-n2-p2 @atom:na @atom:n2 @atom:p2
@angle:na-n2-s @atom:na @atom:n2 @atom:s
@angle:ne-n2-nh @atom:ne @atom:n2 @atom:nh
@angle:ne-n2-o @atom:ne @atom:n2 @atom:o
@angle:ne-n2-s @atom:ne @atom:n2 @atom:s
@angle:nf-n2-nh @atom:nf @atom:n2 @atom:nh
@angle:nf-n2-o @atom:nf @atom:n2 @atom:o
@angle:nf-n2-s @atom:nf @atom:n2 @atom:s
@angle:nh-n2-nh @atom:nh @atom:n2 @atom:nh
@angle:nh-n2-o @atom:nh @atom:n2 @atom:o
@angle:nh-n2-p2 @atom:nh @atom:n2 @atom:p2
@angle:nh-n2-s @atom:nh @atom:n2 @atom:s
@angle:n-n2-n2 @atom:n @atom:n2 @atom:n2
@angle:n-n2-o @atom:n @atom:n2 @atom:o
@angle:no-n2-no @atom:no @atom:n2 @atom:no
@angle:no-n2-o @atom:no @atom:n2 @atom:o
@angle:no-n2-p2 @atom:no @atom:n2 @atom:p2
@angle:n-n2-p2 @atom:n @atom:n2 @atom:p2
@angle:n-n2-s @atom:n @atom:n2 @atom:s
@angle:oh-n2-oh @atom:oh @atom:n2 @atom:oh
@angle:oh-n2-p2 @atom:oh @atom:n2 @atom:p2
@angle:oh-n2-s @atom:oh @atom:n2 @atom:s
@angle:o-n2-o @atom:o @atom:n2 @atom:o
@angle:o-n2-oh @atom:o @atom:n2 @atom:oh
@angle:o-n2-os @atom:o @atom:n2 @atom:os
@angle:o-n2-p2 @atom:o @atom:n2 @atom:p2
@angle:o-n2-p3 @atom:o @atom:n2 @atom:p3
@angle:o-n2-p4 @atom:o @atom:n2 @atom:p4
@angle:o-n2-p5 @atom:o @atom:n2 @atom:p5
@angle:o-n2-pe @atom:o @atom:n2 @atom:pe
@angle:o-n2-pf @atom:o @atom:n2 @atom:pf
@angle:o-n2-s4 @atom:o @atom:n2 @atom:s4
@angle:o-n2-s6 @atom:o @atom:n2 @atom:s6
@angle:o-n2-s @atom:o @atom:n2 @atom:s
@angle:o-n2-sh @atom:o @atom:n2 @atom:sh
@angle:os-n2-os @atom:os @atom:n2 @atom:os
@angle:os-n2-p2 @atom:os @atom:n2 @atom:p2
@angle:o-n2-ss @atom:o @atom:n2 @atom:ss
@angle:os-n2-s @atom:os @atom:n2 @atom:s
@angle:p2-n2-p2 @atom:p2 @atom:n2 @atom:p2
@angle:p2-n2-p3 @atom:p2 @atom:n2 @atom:p3
@angle:p2-n2-p4 @atom:p2 @atom:n2 @atom:p4
@angle:p2-n2-p5 @atom:p2 @atom:n2 @atom:p5
@angle:p2-n2-s4 @atom:p2 @atom:n2 @atom:s4
@angle:p2-n2-s6 @atom:p2 @atom:n2 @atom:s6
@angle:p2-n2-s @atom:p2 @atom:n2 @atom:s
@angle:p2-n2-sh @atom:p2 @atom:n2 @atom:sh
@angle:p2-n2-ss @atom:p2 @atom:n2 @atom:ss
@angle:p3-n2-p3 @atom:p3 @atom:n2 @atom:p3
@angle:p3-n2-s @atom:p3 @atom:n2 @atom:s
@angle:p4-n2-s @atom:p4 @atom:n2 @atom:s
@angle:p5-n2-p5 @atom:p5 @atom:n2 @atom:p5
@angle:p5-n2-s @atom:p5 @atom:n2 @atom:s
@angle:pe-n2-s @atom:pe @atom:n2 @atom:s
@angle:pf-n2-s @atom:pf @atom:n2 @atom:s
@angle:s4-n2-s4 @atom:s4 @atom:n2 @atom:s4
@angle:s4-n2-s6 @atom:s4 @atom:n2 @atom:s6
@angle:s6-n2-s6 @atom:s6 @atom:n2 @atom:s6
@angle:sh-n2-sh @atom:sh @atom:n2 @atom:sh
@angle:sh-n2-ss @atom:sh @atom:n2 @atom:ss
@angle:s-n2-s @atom:s @atom:n2 @atom:s
@angle:s-n2-s4 @atom:s @atom:n2 @atom:s4
@angle:s-n2-s6 @atom:s @atom:n2 @atom:s6
@angle:s-n2-sh @atom:s @atom:n2 @atom:sh
@angle:s-n2-ss @atom:s @atom:n2 @atom:ss
@angle:ss-n2-ss @atom:ss @atom:n2 @atom:ss
@angle:br-n3-br @atom:br @atom:n3 @atom:br
@angle:br-n3-c3 @atom:br @atom:n3 @atom:c3
@angle:c1-n3-c1 @atom:c1 @atom:n3 @atom:c1
@angle:c1-n3-f @atom:c1 @atom:n3 @atom:f
@angle:c1-n3-hn @atom:c1 @atom:n3 @atom:hn
@angle:c1-n3-o @atom:c1 @atom:n3 @atom:o
@angle:c2-n3-c2 @atom:c2 @atom:n3 @atom:c2
@angle:c2-n3-hn @atom:c2 @atom:n3 @atom:hn
@angle:c3-n3-c3 @atom:c3 @atom:n3 @atom:c3
@angle:c3-n3-cl @atom:c3 @atom:n3 @atom:cl
@angle:c3-n3-cx @atom:c3 @atom:n3 @atom:cx
@angle:c3-n3-cy @atom:c3 @atom:n3 @atom:cy
@angle:c3-n3-f @atom:c3 @atom:n3 @atom:f
@angle:c3-n3-hn @atom:c3 @atom:n3 @atom:hn
@angle:c3-n3-i @atom:c3 @atom:n3 @atom:i
@angle:c3-n3-n2 @atom:c3 @atom:n3 @atom:n2
@angle:c3-n3-n3 @atom:c3 @atom:n3 @atom:n3
@angle:c3-n3-n4 @atom:c3 @atom:n3 @atom:n4
@angle:c3-n3-n @atom:c3 @atom:n3 @atom:n
@angle:c3-n3-nh @atom:c3 @atom:n3 @atom:nh
@angle:c3-n3-no @atom:c3 @atom:n3 @atom:no
@angle:c3-n3-o @atom:c3 @atom:n3 @atom:o
@angle:c3-n3-oh @atom:c3 @atom:n3 @atom:oh
@angle:c3-n3-os @atom:c3 @atom:n3 @atom:os
@angle:c3-n3-p3 @atom:c3 @atom:n3 @atom:p3
@angle:c3-n3-p5 @atom:c3 @atom:n3 @atom:p5
@angle:c3-n3-s4 @atom:c3 @atom:n3 @atom:s4
@angle:c3-n3-s6 @atom:c3 @atom:n3 @atom:s6
@angle:c3-n3-s @atom:c3 @atom:n3 @atom:s
@angle:c3-n3-sh @atom:c3 @atom:n3 @atom:sh
@angle:c3-n3-ss @atom:c3 @atom:n3 @atom:ss
@angle:c3-n3-sy @atom:c3 @atom:n3 @atom:sy
@angle:cl-n3-cl @atom:cl @atom:n3 @atom:cl
@angle:cl-n3-hn @atom:cl @atom:n3 @atom:hn
@angle:cl-n3-n3 @atom:cl @atom:n3 @atom:n3
@angle:cx-n3-cx @atom:cx @atom:n3 @atom:cx
@angle:cx-n3-hn @atom:cx @atom:n3 @atom:hn
@angle:cx-n3-p5 @atom:cx @atom:n3 @atom:p5
@angle:cx-n3-py @atom:cx @atom:n3 @atom:py
@angle:cy-n3-cy @atom:cy @atom:n3 @atom:cy
@angle:cy-n3-hn @atom:cy @atom:n3 @atom:hn
@angle:f-n3-f @atom:f @atom:n3 @atom:f
@angle:f-n3-hn @atom:f @atom:n3 @atom:hn
@angle:hn-n3-hn @atom:hn @atom:n3 @atom:hn
@angle:hn-n3-i @atom:hn @atom:n3 @atom:i
@angle:hn-n3-n1 @atom:hn @atom:n3 @atom:n1
@angle:hn-n3-n2 @atom:hn @atom:n3 @atom:n2
@angle:hn-n3-n3 @atom:hn @atom:n3 @atom:n3
@angle:hn-n3-n4 @atom:hn @atom:n3 @atom:n4
@angle:hn-n3-n @atom:hn @atom:n3 @atom:n
@angle:hn-n3-na @atom:hn @atom:n3 @atom:na
@angle:hn-n3-nh @atom:hn @atom:n3 @atom:nh
@angle:hn-n3-no @atom:hn @atom:n3 @atom:no
@angle:hn-n3-o @atom:hn @atom:n3 @atom:o
@angle:hn-n3-oh @atom:hn @atom:n3 @atom:oh
@angle:hn-n3-os @atom:hn @atom:n3 @atom:os
@angle:hn-n3-p2 @atom:hn @atom:n3 @atom:p2
@angle:hn-n3-p3 @atom:hn @atom:n3 @atom:p3
@angle:hn-n3-p4 @atom:hn @atom:n3 @atom:p4
@angle:hn-n3-p5 @atom:hn @atom:n3 @atom:p5
@angle:hn-n3-s4 @atom:hn @atom:n3 @atom:s4
@angle:hn-n3-s @atom:hn @atom:n3 @atom:s
@angle:hn-n3-s6 @atom:hn @atom:n3 @atom:s6
@angle:hn-n3-sh @atom:hn @atom:n3 @atom:sh
@angle:hn-n3-ss @atom:hn @atom:n3 @atom:ss
@angle:hn-n3-sy @atom:hn @atom:n3 @atom:sy
@angle:i-n3-i @atom:i @atom:n3 @atom:i
@angle:n1-n3-n1 @atom:n1 @atom:n3 @atom:n1
@angle:n2-n3-n2 @atom:n2 @atom:n3 @atom:n2
@angle:n2-n3-o @atom:n2 @atom:n3 @atom:o
@angle:n3-n3-n3 @atom:n3 @atom:n3 @atom:n3
@angle:n4-n3-n4 @atom:n4 @atom:n3 @atom:n4
@angle:n4-n3-nh @atom:n4 @atom:n3 @atom:nh
@angle:na-n3-na @atom:na @atom:n3 @atom:na
@angle:nh-n3-nh @atom:nh @atom:n3 @atom:nh
@angle:n-n3-n @atom:n @atom:n3 @atom:n
@angle:no-n3-no @atom:no @atom:n3 @atom:no
@angle:oh-n3-oh @atom:oh @atom:n3 @atom:oh
@angle:o-n3-o @atom:o @atom:n3 @atom:o
@angle:o-n3-p2 @atom:o @atom:n3 @atom:p2
@angle:o-n3-p4 @atom:o @atom:n3 @atom:p4
@angle:o-n3-s4 @atom:o @atom:n3 @atom:s4
@angle:o-n3-s6 @atom:o @atom:n3 @atom:s6
@angle:o-n3-s @atom:o @atom:n3 @atom:s
@angle:os-n3-os @atom:os @atom:n3 @atom:os
@angle:p2-n3-p2 @atom:p2 @atom:n3 @atom:p2
@angle:p3-n3-p3 @atom:p3 @atom:n3 @atom:p3
@angle:p4-n3-p4 @atom:p4 @atom:n3 @atom:p4
@angle:p5-n3-p5 @atom:p5 @atom:n3 @atom:p5
@angle:s4-n3-s4 @atom:s4 @atom:n3 @atom:s4
@angle:s4-n3-s6 @atom:s4 @atom:n3 @atom:s6
@angle:s6-n3-s6 @atom:s6 @atom:n3 @atom:s6
@angle:sh-n3-sh @atom:sh @atom:n3 @atom:sh
@angle:sh-n3-ss @atom:sh @atom:n3 @atom:ss
@angle:s-n3-s @atom:s @atom:n3 @atom:s
@angle:ss-n3-ss @atom:ss @atom:n3 @atom:ss
@angle:br-n4-br @atom:br @atom:n4 @atom:br
@angle:br-n4-hn @atom:br @atom:n4 @atom:hn
@angle:c1-n4-c1 @atom:c1 @atom:n4 @atom:c1
@angle:c1-n4-hn @atom:c1 @atom:n4 @atom:hn
@angle:c2-n4-c2 @atom:c2 @atom:n4 @atom:c2
@angle:c2-n4-c3 @atom:c2 @atom:n4 @atom:c3
@angle:c2-n4-hn @atom:c2 @atom:n4 @atom:hn
@angle:c3-n4-c3 @atom:c3 @atom:n4 @atom:c3
@angle:c3-n4-ca @atom:c3 @atom:n4 @atom:ca
@angle:c3-n4-cc @atom:c3 @atom:n4 @atom:cc
@angle:c3-n4-cl @atom:c3 @atom:n4 @atom:cl
@angle:c3-n4-hn @atom:c3 @atom:n4 @atom:hn
@angle:c3-n4-n3 @atom:c3 @atom:n4 @atom:n3
@angle:c3-n4-n4 @atom:c3 @atom:n4 @atom:n4
@angle:c3-n4-n @atom:c3 @atom:n4 @atom:n
@angle:c3-n4-nh @atom:c3 @atom:n4 @atom:nh
@angle:c3-n4-no @atom:c3 @atom:n4 @atom:no
@angle:c3-n4-o @atom:c3 @atom:n4 @atom:o
@angle:c3-n4-oh @atom:c3 @atom:n4 @atom:oh
@angle:c3-n4-os @atom:c3 @atom:n4 @atom:os
@angle:c3-n4-p2 @atom:c3 @atom:n4 @atom:p2
@angle:c3-n4-p3 @atom:c3 @atom:n4 @atom:p3
@angle:c3-n4-p5 @atom:c3 @atom:n4 @atom:p5
@angle:c3-n4-s4 @atom:c3 @atom:n4 @atom:s4
@angle:c3-n4-s6 @atom:c3 @atom:n4 @atom:s6
@angle:c3-n4-s @atom:c3 @atom:n4 @atom:s
@angle:c3-n4-sh @atom:c3 @atom:n4 @atom:sh
@angle:c3-n4-ss @atom:c3 @atom:n4 @atom:ss
@angle:ca-n4-ca @atom:ca @atom:n4 @atom:ca
@angle:ca-n4-hn @atom:ca @atom:n4 @atom:hn
@angle:c-n4-c @atom:c @atom:n4 @atom:c
@angle:c-n4-hn @atom:c @atom:n4 @atom:hn
@angle:cl-n4-cl @atom:cl @atom:n4 @atom:cl
@angle:cl-n4-hn @atom:cl @atom:n4 @atom:hn
@angle:f-n4-f @atom:f @atom:n4 @atom:f
@angle:f-n4-hn @atom:f @atom:n4 @atom:hn
@angle:hn-n4-hn @atom:hn @atom:n4 @atom:hn
@angle:hn-n4-i @atom:hn @atom:n4 @atom:i
@angle:hn-n4-n1 @atom:hn @atom:n4 @atom:n1
@angle:hn-n4-n2 @atom:hn @atom:n4 @atom:n2
@angle:hn-n4-n3 @atom:hn @atom:n4 @atom:n3
@angle:hn-n4-n4 @atom:hn @atom:n4 @atom:n4
@angle:hn-n4-n @atom:hn @atom:n4 @atom:n
@angle:hn-n4-na @atom:hn @atom:n4 @atom:na
@angle:hn-n4-nh @atom:hn @atom:n4 @atom:nh
@angle:hn-n4-no @atom:hn @atom:n4 @atom:no
@angle:hn-n4-o @atom:hn @atom:n4 @atom:o
@angle:hn-n4-oh @atom:hn @atom:n4 @atom:oh
@angle:hn-n4-os @atom:hn @atom:n4 @atom:os
@angle:hn-n4-p2 @atom:hn @atom:n4 @atom:p2
@angle:hn-n4-p3 @atom:hn @atom:n4 @atom:p3
@angle:hn-n4-p4 @atom:hn @atom:n4 @atom:p4
@angle:hn-n4-p5 @atom:hn @atom:n4 @atom:p5
@angle:hn-n4-py @atom:hn @atom:n4 @atom:py
@angle:hn-n4-s4 @atom:hn @atom:n4 @atom:s4
@angle:hn-n4-s @atom:hn @atom:n4 @atom:s
@angle:hn-n4-s6 @atom:hn @atom:n4 @atom:s6
@angle:hn-n4-sh @atom:hn @atom:n4 @atom:sh
@angle:hn-n4-ss @atom:hn @atom:n4 @atom:ss
@angle:i-n4-i @atom:i @atom:n4 @atom:i
@angle:n1-n4-n1 @atom:n1 @atom:n4 @atom:n1
@angle:n2-n4-n2 @atom:n2 @atom:n4 @atom:n2
@angle:n3-n4-n3 @atom:n3 @atom:n4 @atom:n3
@angle:n4-n4-n4 @atom:n4 @atom:n4 @atom:n4
@angle:na-n4-na @atom:na @atom:n4 @atom:na
@angle:nh-n4-nh @atom:nh @atom:n4 @atom:nh
@angle:n-n4-n @atom:n @atom:n4 @atom:n
@angle:oh-n4-oh @atom:oh @atom:n4 @atom:oh
@angle:o-n4-o @atom:o @atom:n4 @atom:o
@angle:os-n4-os @atom:os @atom:n4 @atom:os
@angle:p2-n4-p2 @atom:p2 @atom:n4 @atom:p2
@angle:p3-n4-p3 @atom:p3 @atom:n4 @atom:p3
@angle:p5-n4-p5 @atom:p5 @atom:n4 @atom:p5
@angle:py-n4-py @atom:py @atom:n4 @atom:py
@angle:s4-n4-s4 @atom:s4 @atom:n4 @atom:s4
@angle:s6-n4-s6 @atom:s6 @atom:n4 @atom:s6
@angle:sh-n4-sh @atom:sh @atom:n4 @atom:sh
@angle:s-n4-s @atom:s @atom:n4 @atom:s
@angle:ss-n4-ss @atom:ss @atom:n4 @atom:ss
@angle:br-na-br @atom:br @atom:na @atom:br
@angle:br-na-c2 @atom:br @atom:na @atom:c2
@angle:br-na-ca @atom:br @atom:na @atom:ca
@angle:br-na-cc @atom:br @atom:na @atom:cc
@angle:br-na-cd @atom:br @atom:na @atom:cd
@angle:br-na-nc @atom:br @atom:na @atom:nc
@angle:br-na-nd @atom:br @atom:na @atom:nd
@angle:br-na-os @atom:br @atom:na @atom:os
@angle:br-na-p2 @atom:br @atom:na @atom:p2
@angle:br-na-pc @atom:br @atom:na @atom:pc
@angle:br-na-pd @atom:br @atom:na @atom:pd
@angle:br-na-ss @atom:br @atom:na @atom:ss
@angle:c1-na-c1 @atom:c1 @atom:na @atom:c1
@angle:c1-na-c2 @atom:c1 @atom:na @atom:c2
@angle:c1-na-ca @atom:c1 @atom:na @atom:ca
@angle:c1-na-cc @atom:c1 @atom:na @atom:cc
@angle:c1-na-cd @atom:c1 @atom:na @atom:cd
@angle:c1-na-nc @atom:c1 @atom:na @atom:nc
@angle:c1-na-nd @atom:c1 @atom:na @atom:nd
@angle:c1-na-os @atom:c1 @atom:na @atom:os
@angle:c1-na-p2 @atom:c1 @atom:na @atom:p2
@angle:c1-na-pc @atom:c1 @atom:na @atom:pc
@angle:c1-na-pd @atom:c1 @atom:na @atom:pd
@angle:c1-na-ss @atom:c1 @atom:na @atom:ss
@angle:c2-na-c2 @atom:c2 @atom:na @atom:c2
@angle:c2-na-c3 @atom:c2 @atom:na @atom:c3
@angle:c2-na-ca @atom:c2 @atom:na @atom:ca
@angle:c2-na-cc @atom:c2 @atom:na @atom:cc
@angle:c2-na-cd @atom:c2 @atom:na @atom:cd
@angle:c2-na-cl @atom:c2 @atom:na @atom:cl
@angle:c2-na-f @atom:c2 @atom:na @atom:f
@angle:c2-na-hn @atom:c2 @atom:na @atom:hn
@angle:c2-na-i @atom:c2 @atom:na @atom:i
@angle:c2-na-n1 @atom:c2 @atom:na @atom:n1
@angle:c2-na-n2 @atom:c2 @atom:na @atom:n2
@angle:c2-na-n3 @atom:c2 @atom:na @atom:n3
@angle:c2-na-n4 @atom:c2 @atom:na @atom:n4
@angle:c2-na-n @atom:c2 @atom:na @atom:n
@angle:c2-na-na @atom:c2 @atom:na @atom:na
@angle:c2-na-nc @atom:c2 @atom:na @atom:nc
@angle:c2-na-nd @atom:c2 @atom:na @atom:nd
@angle:c2-na-nh @atom:c2 @atom:na @atom:nh
@angle:c2-na-no @atom:c2 @atom:na @atom:no
@angle:c2-na-o @atom:c2 @atom:na @atom:o
@angle:c2-na-oh @atom:c2 @atom:na @atom:oh
@angle:c2-na-os @atom:c2 @atom:na @atom:os
@angle:c2-na-p2 @atom:c2 @atom:na @atom:p2
@angle:c2-na-p3 @atom:c2 @atom:na @atom:p3
@angle:c2-na-p4 @atom:c2 @atom:na @atom:p4
@angle:c2-na-p5 @atom:c2 @atom:na @atom:p5
@angle:c2-na-pc @atom:c2 @atom:na @atom:pc
@angle:c2-na-pd @atom:c2 @atom:na @atom:pd
@angle:c2-na-s4 @atom:c2 @atom:na @atom:s4
@angle:c2-na-s6 @atom:c2 @atom:na @atom:s6
@angle:c2-na-s @atom:c2 @atom:na @atom:s
@angle:c2-na-sh @atom:c2 @atom:na @atom:sh
@angle:c2-na-ss @atom:c2 @atom:na @atom:ss
@angle:c3-na-c3 @atom:c3 @atom:na @atom:c3
@angle:c3-na-ca @atom:c3 @atom:na @atom:ca
@angle:c3-na-cc @atom:c3 @atom:na @atom:cc
@angle:c3-na-cd @atom:c3 @atom:na @atom:cd
@angle:c3-na-cp @atom:c3 @atom:na @atom:cp
@angle:c3-na-n2 @atom:c3 @atom:na @atom:n2
@angle:c3-na-n @atom:c3 @atom:na @atom:n
@angle:c3-na-nc @atom:c3 @atom:na @atom:nc
@angle:c3-na-nd @atom:c3 @atom:na @atom:nd
@angle:c3-na-os @atom:c3 @atom:na @atom:os
@angle:c3-na-p2 @atom:c3 @atom:na @atom:p2
@angle:c3-na-pc @atom:c3 @atom:na @atom:pc
@angle:c3-na-pd @atom:c3 @atom:na @atom:pd
@angle:c3-na-sh @atom:c3 @atom:na @atom:sh
@angle:c3-na-ss @atom:c3 @atom:na @atom:ss
@angle:ca-na-ca @atom:ca @atom:na @atom:ca
@angle:ca-na-cc @atom:ca @atom:na @atom:cc
@angle:ca-na-cd @atom:ca @atom:na @atom:cd
@angle:ca-na-cl @atom:ca @atom:na @atom:cl
@angle:ca-na-cp @atom:ca @atom:na @atom:cp
@angle:ca-na-cx @atom:ca @atom:na @atom:cx
@angle:ca-na-f @atom:ca @atom:na @atom:f
@angle:ca-na-hn @atom:ca @atom:na @atom:hn
@angle:ca-na-i @atom:ca @atom:na @atom:i
@angle:ca-na-n2 @atom:ca @atom:na @atom:n2
@angle:ca-na-n4 @atom:ca @atom:na @atom:n4
@angle:ca-na-n @atom:ca @atom:na @atom:n
@angle:ca-na-na @atom:ca @atom:na @atom:na
@angle:ca-na-nb @atom:ca @atom:na @atom:nb
@angle:ca-na-nc @atom:ca @atom:na @atom:nc
@angle:ca-na-nd @atom:ca @atom:na @atom:nd
@angle:ca-na-nh @atom:ca @atom:na @atom:nh
@angle:ca-na-o @atom:ca @atom:na @atom:o
@angle:ca-na-oh @atom:ca @atom:na @atom:oh
@angle:ca-na-os @atom:ca @atom:na @atom:os
@angle:ca-na-p2 @atom:ca @atom:na @atom:p2
@angle:ca-na-p3 @atom:ca @atom:na @atom:p3
@angle:ca-na-p4 @atom:ca @atom:na @atom:p4
@angle:ca-na-p5 @atom:ca @atom:na @atom:p5
@angle:ca-na-pc @atom:ca @atom:na @atom:pc
@angle:ca-na-pd @atom:ca @atom:na @atom:pd
@angle:ca-na-py @atom:ca @atom:na @atom:py
@angle:ca-na-s4 @atom:ca @atom:na @atom:s4
@angle:ca-na-s6 @atom:ca @atom:na @atom:s6
@angle:ca-na-s @atom:ca @atom:na @atom:s
@angle:ca-na-sh @atom:ca @atom:na @atom:sh
@angle:ca-na-ss @atom:ca @atom:na @atom:ss
@angle:cc-na-cc @atom:cc @atom:na @atom:cc
@angle:cc-na-cd @atom:cc @atom:na @atom:cd
@angle:cc-na-ce @atom:cc @atom:na @atom:ce
@angle:cc-na-cl @atom:cc @atom:na @atom:cl
@angle:cc-na-f @atom:cc @atom:na @atom:f
@angle:cc-na-hn @atom:cc @atom:na @atom:hn
@angle:cc-na-i @atom:cc @atom:na @atom:i
@angle:cc-na-n2 @atom:cc @atom:na @atom:n2
@angle:cc-na-n4 @atom:cc @atom:na @atom:n4
@angle:cc-na-n @atom:cc @atom:na @atom:n
@angle:cc-na-na @atom:cc @atom:na @atom:na
@angle:cc-na-nc @atom:cc @atom:na @atom:nc
@angle:cc-na-nd @atom:cc @atom:na @atom:nd
@angle:cc-na-nh @atom:cc @atom:na @atom:nh
@angle:cc-na-no @atom:cc @atom:na @atom:no
@angle:cc-na-o @atom:cc @atom:na @atom:o
@angle:cc-na-oh @atom:cc @atom:na @atom:oh
@angle:cc-na-os @atom:cc @atom:na @atom:os
@angle:cc-na-p2 @atom:cc @atom:na @atom:p2
@angle:cc-na-p3 @atom:cc @atom:na @atom:p3
@angle:cc-na-p4 @atom:cc @atom:na @atom:p4
@angle:cc-na-p5 @atom:cc @atom:na @atom:p5
@angle:cc-na-s4 @atom:cc @atom:na @atom:s4
@angle:cc-na-s6 @atom:cc @atom:na @atom:s6
@angle:cc-na-s @atom:cc @atom:na @atom:s
@angle:cc-na-sh @atom:cc @atom:na @atom:sh
@angle:cc-na-ss @atom:cc @atom:na @atom:ss
@angle:cd-na-cd @atom:cd @atom:na @atom:cd
@angle:cd-na-cl @atom:cd @atom:na @atom:cl
@angle:cd-na-f @atom:cd @atom:na @atom:f
@angle:cd-na-hn @atom:cd @atom:na @atom:hn
@angle:cd-na-i @atom:cd @atom:na @atom:i
@angle:cd-na-n2 @atom:cd @atom:na @atom:n2
@angle:cd-na-n4 @atom:cd @atom:na @atom:n4
@angle:cd-na-n @atom:cd @atom:na @atom:n
@angle:cd-na-na @atom:cd @atom:na @atom:na
@angle:cd-na-nc @atom:cd @atom:na @atom:nc
@angle:cd-na-nd @atom:cd @atom:na @atom:nd
@angle:cd-na-nh @atom:cd @atom:na @atom:nh
@angle:cd-na-no @atom:cd @atom:na @atom:no
@angle:cd-na-o @atom:cd @atom:na @atom:o
@angle:cd-na-oh @atom:cd @atom:na @atom:oh
@angle:cd-na-os @atom:cd @atom:na @atom:os
@angle:cd-na-p2 @atom:cd @atom:na @atom:p2
@angle:cd-na-p3 @atom:cd @atom:na @atom:p3
@angle:cd-na-p4 @atom:cd @atom:na @atom:p4
@angle:cd-na-p5 @atom:cd @atom:na @atom:p5
@angle:cd-na-s4 @atom:cd @atom:na @atom:s4
@angle:cd-na-s6 @atom:cd @atom:na @atom:s6
@angle:cd-na-s @atom:cd @atom:na @atom:s
@angle:cd-na-sh @atom:cd @atom:na @atom:sh
@angle:cd-na-ss @atom:cd @atom:na @atom:ss
@angle:cl-na-cl @atom:cl @atom:na @atom:cl
@angle:cl-na-nc @atom:cl @atom:na @atom:nc
@angle:cl-na-nd @atom:cl @atom:na @atom:nd
@angle:cl-na-os @atom:cl @atom:na @atom:os
@angle:cl-na-p2 @atom:cl @atom:na @atom:p2
@angle:cl-na-pc @atom:cl @atom:na @atom:pc
@angle:cl-na-pd @atom:cl @atom:na @atom:pd
@angle:cl-na-ss @atom:cl @atom:na @atom:ss
@angle:f-na-f @atom:f @atom:na @atom:f
@angle:f-na-nc @atom:f @atom:na @atom:nc
@angle:f-na-nd @atom:f @atom:na @atom:nd
@angle:f-na-os @atom:f @atom:na @atom:os
@angle:f-na-p2 @atom:f @atom:na @atom:p2
@angle:f-na-pc @atom:f @atom:na @atom:pc
@angle:f-na-pd @atom:f @atom:na @atom:pd
@angle:f-na-ss @atom:f @atom:na @atom:ss
@angle:hn-na-hn @atom:hn @atom:na @atom:hn
@angle:hn-na-n @atom:hn @atom:na @atom:n
@angle:hn-na-nc @atom:hn @atom:na @atom:nc
@angle:hn-na-nd @atom:hn @atom:na @atom:nd
@angle:hn-na-os @atom:hn @atom:na @atom:os
@angle:hn-na-p2 @atom:hn @atom:na @atom:p2
@angle:hn-na-pc @atom:hn @atom:na @atom:pc
@angle:hn-na-pd @atom:hn @atom:na @atom:pd
@angle:hn-na-ss @atom:hn @atom:na @atom:ss
@angle:i-na-i @atom:i @atom:na @atom:i
@angle:i-na-nc @atom:i @atom:na @atom:nc
@angle:i-na-nd @atom:i @atom:na @atom:nd
@angle:i-na-os @atom:i @atom:na @atom:os
@angle:i-na-p2 @atom:i @atom:na @atom:p2
@angle:i-na-pc @atom:i @atom:na @atom:pc
@angle:i-na-pd @atom:i @atom:na @atom:pd
@angle:i-na-ss @atom:i @atom:na @atom:ss
@angle:n2-na-n2 @atom:n2 @atom:na @atom:n2
@angle:n2-na-nc @atom:n2 @atom:na @atom:nc
@angle:n2-na-nd @atom:n2 @atom:na @atom:nd
@angle:n2-na-os @atom:n2 @atom:na @atom:os
@angle:n2-na-p2 @atom:n2 @atom:na @atom:p2
@angle:n2-na-pc @atom:n2 @atom:na @atom:pc
@angle:n2-na-pd @atom:n2 @atom:na @atom:pd
@angle:n2-na-ss @atom:n2 @atom:na @atom:ss
@angle:n3-na-n3 @atom:n3 @atom:na @atom:n3
@angle:n4-na-n4 @atom:n4 @atom:na @atom:n4
@angle:n4-na-nc @atom:n4 @atom:na @atom:nc
@angle:n4-na-nd @atom:n4 @atom:na @atom:nd
@angle:n4-na-os @atom:n4 @atom:na @atom:os
@angle:n4-na-p2 @atom:n4 @atom:na @atom:p2
@angle:n4-na-pc @atom:n4 @atom:na @atom:pc
@angle:n4-na-pd @atom:n4 @atom:na @atom:pd
@angle:na-na-na @atom:na @atom:na @atom:na
@angle:na-na-nc @atom:na @atom:na @atom:nc
@angle:na-na-nd @atom:na @atom:na @atom:nd
@angle:na-na-os @atom:na @atom:na @atom:os
@angle:na-na-p2 @atom:na @atom:na @atom:p2
@angle:na-na-pc @atom:na @atom:na @atom:pc
@angle:na-na-pd @atom:na @atom:na @atom:pd
@angle:na-na-ss @atom:na @atom:na @atom:ss
@angle:nc-na-nc @atom:nc @atom:na @atom:nc
@angle:nc-na-nd @atom:nc @atom:na @atom:nd
@angle:nc-na-nh @atom:nc @atom:na @atom:nh
@angle:nc-na-no @atom:nc @atom:na @atom:no
@angle:nc-na-o @atom:nc @atom:na @atom:o
@angle:nc-na-oh @atom:nc @atom:na @atom:oh
@angle:nc-na-os @atom:nc @atom:na @atom:os
@angle:nc-na-p2 @atom:nc @atom:na @atom:p2
@angle:nc-na-p3 @atom:nc @atom:na @atom:p3
@angle:nc-na-p4 @atom:nc @atom:na @atom:p4
@angle:nc-na-p5 @atom:nc @atom:na @atom:p5
@angle:nc-na-pc @atom:nc @atom:na @atom:pc
@angle:nc-na-s4 @atom:nc @atom:na @atom:s4
@angle:nc-na-s6 @atom:nc @atom:na @atom:s6
@angle:nc-na-s @atom:nc @atom:na @atom:s
@angle:nc-na-sh @atom:nc @atom:na @atom:sh
@angle:nc-na-ss @atom:nc @atom:na @atom:ss
@angle:nd-na-nd @atom:nd @atom:na @atom:nd
@angle:nd-na-nh @atom:nd @atom:na @atom:nh
@angle:nd-na-no @atom:nd @atom:na @atom:no
@angle:nd-na-o @atom:nd @atom:na @atom:o
@angle:nd-na-oh @atom:nd @atom:na @atom:oh
@angle:nd-na-os @atom:nd @atom:na @atom:os
@angle:nd-na-p2 @atom:nd @atom:na @atom:p2
@angle:nd-na-p3 @atom:nd @atom:na @atom:p3
@angle:nd-na-p4 @atom:nd @atom:na @atom:p4
@angle:nd-na-p5 @atom:nd @atom:na @atom:p5
@angle:nd-na-pd @atom:nd @atom:na @atom:pd
@angle:nd-na-s4 @atom:nd @atom:na @atom:s4
@angle:nd-na-s6 @atom:nd @atom:na @atom:s6
@angle:nd-na-s @atom:nd @atom:na @atom:s
@angle:nd-na-sh @atom:nd @atom:na @atom:sh
@angle:nd-na-ss @atom:nd @atom:na @atom:ss
@angle:nh-na-nh @atom:nh @atom:na @atom:nh
@angle:nh-na-os @atom:nh @atom:na @atom:os
@angle:nh-na-p2 @atom:nh @atom:na @atom:p2
@angle:nh-na-pc @atom:nh @atom:na @atom:pc
@angle:nh-na-pd @atom:nh @atom:na @atom:pd
@angle:nh-na-ss @atom:nh @atom:na @atom:ss
@angle:n-na-n @atom:n @atom:na @atom:n
@angle:n-na-nc @atom:n @atom:na @atom:nc
@angle:n-na-nd @atom:n @atom:na @atom:nd
@angle:no-na-no @atom:no @atom:na @atom:no
@angle:no-na-os @atom:no @atom:na @atom:os
@angle:no-na-pc @atom:no @atom:na @atom:pc
@angle:no-na-pd @atom:no @atom:na @atom:pd
@angle:n-na-os @atom:n @atom:na @atom:os
@angle:no-na-ss @atom:no @atom:na @atom:ss
@angle:n-na-p2 @atom:n @atom:na @atom:p2
@angle:n-na-pc @atom:n @atom:na @atom:pc
@angle:n-na-pd @atom:n @atom:na @atom:pd
@angle:n-na-ss @atom:n @atom:na @atom:ss
@angle:oh-na-oh @atom:oh @atom:na @atom:oh
@angle:oh-na-p2 @atom:oh @atom:na @atom:p2
@angle:oh-na-pc @atom:oh @atom:na @atom:pc
@angle:oh-na-pd @atom:oh @atom:na @atom:pd
@angle:oh-na-ss @atom:oh @atom:na @atom:ss
@angle:o-na-o @atom:o @atom:na @atom:o
@angle:o-na-os @atom:o @atom:na @atom:os
@angle:o-na-p2 @atom:o @atom:na @atom:p2
@angle:o-na-pc @atom:o @atom:na @atom:pc
@angle:o-na-pd @atom:o @atom:na @atom:pd
@angle:os-na-os @atom:os @atom:na @atom:os
@angle:os-na-p2 @atom:os @atom:na @atom:p2
@angle:os-na-p3 @atom:os @atom:na @atom:p3
@angle:os-na-p5 @atom:os @atom:na @atom:p5
@angle:os-na-pc @atom:os @atom:na @atom:pc
@angle:os-na-pd @atom:os @atom:na @atom:pd
@angle:os-na-s4 @atom:os @atom:na @atom:s4
@angle:os-na-s6 @atom:os @atom:na @atom:s6
@angle:os-na-ss @atom:os @atom:na @atom:ss
@angle:p2-na-p2 @atom:p2 @atom:na @atom:p2
@angle:p2-na-p3 @atom:p2 @atom:na @atom:p3
@angle:p2-na-p5 @atom:p2 @atom:na @atom:p5
@angle:p2-na-pc @atom:p2 @atom:na @atom:pc
@angle:p2-na-pd @atom:p2 @atom:na @atom:pd
@angle:p2-na-s4 @atom:p2 @atom:na @atom:s4
@angle:p2-na-s6 @atom:p2 @atom:na @atom:s6
@angle:p2-na-s @atom:p2 @atom:na @atom:s
@angle:p2-na-sh @atom:p2 @atom:na @atom:sh
@angle:p2-na-ss @atom:p2 @atom:na @atom:ss
@angle:p3-na-p3 @atom:p3 @atom:na @atom:p3
@angle:p3-na-pc @atom:p3 @atom:na @atom:pc
@angle:p3-na-pd @atom:p3 @atom:na @atom:pd
@angle:p5-na-p5 @atom:p5 @atom:na @atom:p5
@angle:p5-na-pc @atom:p5 @atom:na @atom:pc
@angle:p5-na-pd @atom:p5 @atom:na @atom:pd
@angle:p5-na-ss @atom:p5 @atom:na @atom:ss
@angle:pc-na-pc @atom:pc @atom:na @atom:pc
@angle:pc-na-s4 @atom:pc @atom:na @atom:s4
@angle:pc-na-s6 @atom:pc @atom:na @atom:s6
@angle:pc-na-s @atom:pc @atom:na @atom:s
@angle:pc-na-sh @atom:pc @atom:na @atom:sh
@angle:pc-na-ss @atom:pc @atom:na @atom:ss
@angle:pd-na-pd @atom:pd @atom:na @atom:pd
@angle:pd-na-s4 @atom:pd @atom:na @atom:s4
@angle:pd-na-s6 @atom:pd @atom:na @atom:s6
@angle:pd-na-s @atom:pd @atom:na @atom:s
@angle:pd-na-sh @atom:pd @atom:na @atom:sh
@angle:pd-na-ss @atom:pd @atom:na @atom:ss
@angle:py-na-py @atom:py @atom:na @atom:py
@angle:s4-na-s4 @atom:s4 @atom:na @atom:s4
@angle:s4-na-s6 @atom:s4 @atom:na @atom:s6
@angle:s4-na-ss @atom:s4 @atom:na @atom:ss
@angle:s6-na-s6 @atom:s6 @atom:na @atom:s6
@angle:s6-na-ss @atom:s6 @atom:na @atom:ss
@angle:sh-na-sh @atom:sh @atom:na @atom:sh
@angle:sh-na-ss @atom:sh @atom:na @atom:ss
@angle:s-na-s @atom:s @atom:na @atom:s
@angle:s-na-ss @atom:s @atom:na @atom:ss
@angle:ss-na-ss @atom:ss @atom:na @atom:ss
@angle:sy-na-sy @atom:sy @atom:na @atom:sy
@angle:ca-nb-ca @atom:ca @atom:nb @atom:ca
@angle:ca-nb-cp @atom:ca @atom:nb @atom:cp
@angle:ca-nb-cq @atom:ca @atom:nb @atom:cq
@angle:ca-nb-nb @atom:ca @atom:nb @atom:nb
@angle:cp-nb-nb @atom:cp @atom:nb @atom:nb
@angle:nb-nb-nb @atom:nb @atom:nb @atom:nb
@angle:br-n-br @atom:br @atom:n @atom:br
@angle:br-n-c @atom:br @atom:n @atom:c
@angle:br-n-ca @atom:br @atom:n @atom:ca
@angle:br-n-cc @atom:br @atom:n @atom:cc
@angle:br-n-cd @atom:br @atom:n @atom:cd
@angle:c1-n-c1 @atom:c1 @atom:n @atom:c1
@angle:c1-n-ca @atom:c1 @atom:n @atom:ca
@angle:c1-n-cc @atom:c1 @atom:n @atom:cc
@angle:c1-n-cd @atom:c1 @atom:n @atom:cd
@angle:c2-n-c2 @atom:c2 @atom:n @atom:c2
@angle:c2-n-c3 @atom:c2 @atom:n @atom:c3
@angle:c2-n-ca @atom:c2 @atom:n @atom:ca
@angle:c2-n-cc @atom:c2 @atom:n @atom:cc
@angle:c2-n-cd @atom:c2 @atom:n @atom:cd
@angle:c2-n-hn @atom:c2 @atom:n @atom:hn
@angle:c3-n-c3 @atom:c3 @atom:n @atom:c3
@angle:c3-n-ca @atom:c3 @atom:n @atom:ca
@angle:c3-n-cc @atom:c3 @atom:n @atom:cc
@angle:c3-n-cd @atom:c3 @atom:n @atom:cd
@angle:c3-n-cy @atom:c3 @atom:n @atom:cy
@angle:c3-n-hn @atom:c3 @atom:n @atom:hn
@angle:c3-n-n2 @atom:c3 @atom:n @atom:n2
@angle:c3-n-n @atom:c3 @atom:n @atom:n
@angle:c3-n-nc @atom:c3 @atom:n @atom:nc
@angle:c3-n-nd @atom:c3 @atom:n @atom:nd
@angle:c3-n-oh @atom:c3 @atom:n @atom:oh
@angle:c3-n-os @atom:c3 @atom:n @atom:os
@angle:c3-n-sy @atom:c3 @atom:n @atom:sy
@angle:ca-n-ca @atom:ca @atom:n @atom:ca
@angle:ca-n-cc @atom:ca @atom:n @atom:cc
@angle:ca-n-cd @atom:ca @atom:n @atom:cd
@angle:ca-n-cl @atom:ca @atom:n @atom:cl
@angle:ca-n-f @atom:ca @atom:n @atom:f
@angle:ca-n-hn @atom:ca @atom:n @atom:hn
@angle:ca-n-i @atom:ca @atom:n @atom:i
@angle:ca-n-n2 @atom:ca @atom:n @atom:n2
@angle:ca-n-n4 @atom:ca @atom:n @atom:n4
@angle:ca-n-n @atom:ca @atom:n @atom:n
@angle:ca-n-na @atom:ca @atom:n @atom:na
@angle:ca-n-nc @atom:ca @atom:n @atom:nc
@angle:ca-n-nd @atom:ca @atom:n @atom:nd
@angle:ca-n-nh @atom:ca @atom:n @atom:nh
@angle:ca-n-p2 @atom:ca @atom:n @atom:p2
@angle:ca-n-p3 @atom:ca @atom:n @atom:p3
@angle:ca-n-s4 @atom:ca @atom:n @atom:s4
@angle:ca-n-s6 @atom:ca @atom:n @atom:s6
@angle:ca-n-ss @atom:ca @atom:n @atom:ss
@angle:c-n-c1 @atom:c @atom:n @atom:c1
@angle:c-n-c2 @atom:c @atom:n @atom:c2
@angle:c-n-c3 @atom:c @atom:n @atom:c3
@angle:c3-nc-cd @atom:c3 @atom:nc @atom:cd
@angle:c-n-c @atom:c @atom:n @atom:c
@angle:c-n-ca @atom:c @atom:n @atom:ca
@angle:ca-nc-ca @atom:ca @atom:nc @atom:ca
@angle:ca-nc-cd @atom:ca @atom:nc @atom:cd
@angle:ca-nc-n @atom:ca @atom:nc @atom:n
@angle:ca-nc-na @atom:ca @atom:nc @atom:na
@angle:ca-nc-os @atom:ca @atom:nc @atom:os
@angle:ca-nc-ss @atom:ca @atom:nc @atom:ss
@angle:c-n-cc @atom:c @atom:n @atom:cc
@angle:c-nc-ca @atom:c @atom:nc @atom:ca
@angle:cc-n-cc @atom:cc @atom:n @atom:cc
@angle:cc-nc-cc @atom:cc @atom:nc @atom:cc
@angle:cc-nc-cd @atom:cc @atom:nc @atom:cd
@angle:c-nc-cd @atom:c @atom:nc @atom:cd
@angle:cc-n-cl @atom:cc @atom:n @atom:cl
@angle:cc-nc-na @atom:cc @atom:nc @atom:na
@angle:cc-nc-nd @atom:cc @atom:nc @atom:nd
@angle:c-n-cd @atom:c @atom:n @atom:cd
@angle:cd-nc-cd @atom:cd @atom:nc @atom:cd
@angle:cd-nc-n @atom:cd @atom:nc @atom:n
@angle:cd-nc-na @atom:cd @atom:nc @atom:na
@angle:cd-nc-nc @atom:cd @atom:nc @atom:nc
@angle:cd-nc-os @atom:cd @atom:nc @atom:os
@angle:cd-nc-ss @atom:cd @atom:nc @atom:ss
@angle:c-n-ce @atom:c @atom:n @atom:ce
@angle:cc-n-f @atom:cc @atom:n @atom:f
@angle:cc-n-hn @atom:cc @atom:n @atom:hn
@angle:cc-n-i @atom:cc @atom:n @atom:i
@angle:c-n-cl @atom:c @atom:n @atom:cl
@angle:cc-n-n2 @atom:cc @atom:n @atom:n2
@angle:cc-n-n @atom:cc @atom:n @atom:n
@angle:cc-n-na @atom:cc @atom:n @atom:na
@angle:cc-n-nc @atom:cc @atom:n @atom:nc
@angle:cc-n-nh @atom:cc @atom:n @atom:nh
@angle:cc-n-no @atom:cc @atom:n @atom:no
@angle:cc-n-o @atom:cc @atom:n @atom:o
@angle:cc-n-oh @atom:cc @atom:n @atom:oh
@angle:cc-n-os @atom:cc @atom:n @atom:os
@angle:cc-n-p2 @atom:cc @atom:n @atom:p2
@angle:cc-n-p3 @atom:cc @atom:n @atom:p3
@angle:cc-n-p5 @atom:cc @atom:n @atom:p5
@angle:cc-n-s4 @atom:cc @atom:n @atom:s4
@angle:cc-n-s6 @atom:cc @atom:n @atom:s6
@angle:cc-n-s @atom:cc @atom:n @atom:s
@angle:cc-n-sh @atom:cc @atom:n @atom:sh
@angle:cc-n-ss @atom:cc @atom:n @atom:ss
@angle:c-n-cx @atom:c @atom:n @atom:cx
@angle:c-n-cy @atom:c @atom:n @atom:cy
@angle:cd-n-cd @atom:cd @atom:n @atom:cd
@angle:cd-n-cl @atom:cd @atom:n @atom:cl
@angle:cd-n-f @atom:cd @atom:n @atom:f
@angle:cd-n-hn @atom:cd @atom:n @atom:hn
@angle:cd-n-i @atom:cd @atom:n @atom:i
@angle:cd-n-n2 @atom:cd @atom:n @atom:n2
@angle:cd-n-n @atom:cd @atom:n @atom:n
@angle:cd-n-na @atom:cd @atom:n @atom:na
@angle:cd-n-nd @atom:cd @atom:n @atom:nd
@angle:cd-n-nh @atom:cd @atom:n @atom:nh
@angle:cd-n-no @atom:cd @atom:n @atom:no
@angle:cd-n-o @atom:cd @atom:n @atom:o
@angle:cd-n-oh @atom:cd @atom:n @atom:oh
@angle:cd-n-os @atom:cd @atom:n @atom:os
@angle:cd-n-p2 @atom:cd @atom:n @atom:p2
@angle:cd-n-p3 @atom:cd @atom:n @atom:p3
@angle:cd-n-p5 @atom:cd @atom:n @atom:p5
@angle:cd-n-s4 @atom:cd @atom:n @atom:s4
@angle:cd-n-s6 @atom:cd @atom:n @atom:s6
@angle:cd-n-s @atom:cd @atom:n @atom:s
@angle:cd-n-sh @atom:cd @atom:n @atom:sh
@angle:cd-n-ss @atom:cd @atom:n @atom:ss
@angle:ce-n-cy @atom:ce @atom:n @atom:cy
@angle:c-n-f @atom:c @atom:n @atom:f
@angle:cf-n-cy @atom:cf @atom:n @atom:cy
@angle:c-n-hn @atom:c @atom:n @atom:hn
@angle:c-n-i @atom:c @atom:n @atom:i
@angle:cl-n-cl @atom:cl @atom:n @atom:cl
@angle:c-n-n2 @atom:c @atom:n @atom:n2
@angle:c-n-n3 @atom:c @atom:n @atom:n3
@angle:c-n-n4 @atom:c @atom:n @atom:n4
@angle:c-n-n @atom:c @atom:n @atom:n
@angle:c-n-na @atom:c @atom:n @atom:na
@angle:na-nc-nd @atom:na @atom:nc @atom:nd
@angle:c-n-nc @atom:c @atom:n @atom:nc
@angle:nc-nc-nd @atom:nc @atom:nc @atom:nd
@angle:c-n-nd @atom:c @atom:n @atom:nd
@angle:nd-nc-os @atom:nd @atom:nc @atom:os
@angle:c-n-nh @atom:c @atom:n @atom:nh
@angle:c-n-no @atom:c @atom:n @atom:no
@angle:c-n-o @atom:c @atom:n @atom:o
@angle:c-n-oh @atom:c @atom:n @atom:oh
@angle:c-n-os @atom:c @atom:n @atom:os
@angle:c-n-p2 @atom:c @atom:n @atom:p2
@angle:c-n-p3 @atom:c @atom:n @atom:p3
@angle:c-n-p4 @atom:c @atom:n @atom:p4
@angle:c-n-p5 @atom:c @atom:n @atom:p5
@angle:c-n-pc @atom:c @atom:n @atom:pc
@angle:c-n-pd @atom:c @atom:n @atom:pd
@angle:c-n-s4 @atom:c @atom:n @atom:s4
@angle:c-n-s6 @atom:c @atom:n @atom:s6
@angle:c-n-s @atom:c @atom:n @atom:s
@angle:c-n-sh @atom:c @atom:n @atom:sh
@angle:c-n-ss @atom:c @atom:n @atom:ss
@angle:c-n-sy @atom:c @atom:n @atom:sy
@angle:cx-n-hn @atom:cx @atom:n @atom:hn
@angle:cx-n-os @atom:cx @atom:n @atom:os
@angle:cy-n-hn @atom:cy @atom:n @atom:hn
@angle:c3-nd-cc @atom:c3 @atom:nd @atom:cc
@angle:ca-nd-ca @atom:ca @atom:nd @atom:ca
@angle:ca-nd-cc @atom:ca @atom:nd @atom:cc
@angle:ca-nd-n @atom:ca @atom:nd @atom:n
@angle:ca-nd-na @atom:ca @atom:nd @atom:na
@angle:ca-nd-nc @atom:ca @atom:nd @atom:nc
@angle:ca-nd-os @atom:ca @atom:nd @atom:os
@angle:ca-nd-ss @atom:ca @atom:nd @atom:ss
@angle:c-nd-ca @atom:c @atom:nd @atom:ca
@angle:c-nd-cc @atom:c @atom:nd @atom:cc
@angle:cc-nd-cc @atom:cc @atom:nd @atom:cc
@angle:cc-nd-cd @atom:cc @atom:nd @atom:cd
@angle:cc-nd-n @atom:cc @atom:nd @atom:n
@angle:cc-nd-na @atom:cc @atom:nd @atom:na
@angle:cc-nd-nd @atom:cc @atom:nd @atom:nd
@angle:cc-nd-os @atom:cc @atom:nd @atom:os
@angle:cc-nd-ss @atom:cc @atom:nd @atom:ss
@angle:cd-nd-cd @atom:cd @atom:nd @atom:cd
@angle:cd-nd-na @atom:cd @atom:nd @atom:na
@angle:cd-nd-nc @atom:cd @atom:nd @atom:nc
@angle:na-nd-nc @atom:na @atom:nd @atom:nc
@angle:nc-nd-nd @atom:nc @atom:nd @atom:nd
@angle:nc-nd-os @atom:nc @atom:nd @atom:os
@angle:c1-ne-ca @atom:c1 @atom:ne @atom:ca
@angle:c1-ne-cg @atom:c1 @atom:ne @atom:cg
@angle:c2-ne-ca @atom:c2 @atom:ne @atom:ca
@angle:c2-ne-ce @atom:c2 @atom:ne @atom:ce
@angle:c2-ne-cg @atom:c2 @atom:ne @atom:cg
@angle:c2-ne-n2 @atom:c2 @atom:ne @atom:n2
@angle:c2-ne-ne @atom:c2 @atom:ne @atom:ne
@angle:c2-ne-p2 @atom:c2 @atom:ne @atom:p2
@angle:c2-ne-pe @atom:c2 @atom:ne @atom:pe
@angle:c2-ne-px @atom:c2 @atom:ne @atom:px
@angle:c2-ne-py @atom:c2 @atom:ne @atom:py
@angle:c2-ne-sx @atom:c2 @atom:ne @atom:sx
@angle:c2-ne-sy @atom:c2 @atom:ne @atom:sy
@angle:ca-ne-cf @atom:ca @atom:ne @atom:cf
@angle:ca-ne-n2 @atom:ca @atom:ne @atom:n2
@angle:ca-ne-nf @atom:ca @atom:ne @atom:nf
@angle:ca-ne-o @atom:ca @atom:ne @atom:o
@angle:ca-ne-p2 @atom:ca @atom:ne @atom:p2
@angle:ca-ne-s @atom:ca @atom:ne @atom:s
@angle:c-ne-c2 @atom:c @atom:ne @atom:c2
@angle:ce-ne-n2 @atom:ce @atom:ne @atom:n2
@angle:ce-ne-o @atom:ce @atom:ne @atom:o
@angle:ce-ne-p2 @atom:ce @atom:ne @atom:p2
@angle:ce-ne-s @atom:ce @atom:ne @atom:s
@angle:cg-ne-n1 @atom:cg @atom:ne @atom:n1
@angle:cg-ne-n2 @atom:cg @atom:ne @atom:n2
@angle:cg-ne-o @atom:cg @atom:ne @atom:o
@angle:cg-ne-p2 @atom:cg @atom:ne @atom:p2
@angle:cg-ne-s @atom:cg @atom:ne @atom:s
@angle:c-ne-sy @atom:c @atom:ne @atom:sy
@angle:n2-ne-n2 @atom:n2 @atom:ne @atom:n2
@angle:n2-ne-ne @atom:n2 @atom:ne @atom:ne
@angle:n2-ne-o @atom:n2 @atom:ne @atom:o
@angle:n2-ne-p2 @atom:n2 @atom:ne @atom:p2
@angle:n2-ne-pe @atom:n2 @atom:ne @atom:pe
@angle:n2-ne-px @atom:n2 @atom:ne @atom:px
@angle:n2-ne-py @atom:n2 @atom:ne @atom:py
@angle:n2-ne-s @atom:n2 @atom:ne @atom:s
@angle:n2-ne-sx @atom:n2 @atom:ne @atom:sx
@angle:n2-ne-sy @atom:n2 @atom:ne @atom:sy
@angle:ne-ne-o @atom:ne @atom:ne @atom:o
@angle:ne-ne-p2 @atom:ne @atom:ne @atom:p2
@angle:ne-ne-s @atom:ne @atom:ne @atom:s
@angle:o-ne-o @atom:o @atom:ne @atom:o
@angle:o-ne-pe @atom:o @atom:ne @atom:pe
@angle:o-ne-px @atom:o @atom:ne @atom:px
@angle:o-ne-py @atom:o @atom:ne @atom:py
@angle:o-ne-s @atom:o @atom:ne @atom:s
@angle:o-ne-sx @atom:o @atom:ne @atom:sx
@angle:o-ne-sy @atom:o @atom:ne @atom:sy
@angle:p2-ne-pe @atom:p2 @atom:ne @atom:pe
@angle:p2-ne-px @atom:p2 @atom:ne @atom:px
@angle:p2-ne-py @atom:p2 @atom:ne @atom:py
@angle:p2-ne-sx @atom:p2 @atom:ne @atom:sx
@angle:p2-ne-sy @atom:p2 @atom:ne @atom:sy
@angle:pe-ne-s @atom:pe @atom:ne @atom:s
@angle:px-ne-s @atom:px @atom:ne @atom:s
@angle:py-ne-s @atom:py @atom:ne @atom:s
@angle:s-ne-s @atom:s @atom:ne @atom:s
@angle:s-ne-sx @atom:s @atom:ne @atom:sx
@angle:s-ne-sy @atom:s @atom:ne @atom:sy
@angle:c1-nf-ca @atom:c1 @atom:nf @atom:ca
@angle:c1-nf-ch @atom:c1 @atom:nf @atom:ch
@angle:c2-nf-ca @atom:c2 @atom:nf @atom:ca
@angle:c2-nf-cf @atom:c2 @atom:nf @atom:cf
@angle:c2-nf-n2 @atom:c2 @atom:nf @atom:n2
@angle:c2-nf-nf @atom:c2 @atom:nf @atom:nf
@angle:c2-nf-p2 @atom:c2 @atom:nf @atom:p2
@angle:c2-nf-pf @atom:c2 @atom:nf @atom:pf
@angle:c2-nf-px @atom:c2 @atom:nf @atom:px
@angle:c2-nf-py @atom:c2 @atom:nf @atom:py
@angle:c2-nf-sx @atom:c2 @atom:nf @atom:sx
@angle:c2-nf-sy @atom:c2 @atom:nf @atom:sy
@angle:ca-nf-ce @atom:ca @atom:nf @atom:ce
@angle:ca-nf-n2 @atom:ca @atom:nf @atom:n2
@angle:ca-nf-ne @atom:ca @atom:nf @atom:ne
@angle:ca-nf-o @atom:ca @atom:nf @atom:o
@angle:ca-nf-p2 @atom:ca @atom:nf @atom:p2
@angle:ca-nf-s @atom:ca @atom:nf @atom:s
@angle:c-nf-c2 @atom:c @atom:nf @atom:c2
@angle:cf-nf-n2 @atom:cf @atom:nf @atom:n2
@angle:cf-nf-o @atom:cf @atom:nf @atom:o
@angle:cf-nf-p2 @atom:cf @atom:nf @atom:p2
@angle:cf-nf-s @atom:cf @atom:nf @atom:s
@angle:ch-nf-n1 @atom:ch @atom:nf @atom:n1
@angle:ch-nf-n2 @atom:ch @atom:nf @atom:n2
@angle:ch-nf-o @atom:ch @atom:nf @atom:o
@angle:ch-nf-p2 @atom:ch @atom:nf @atom:p2
@angle:ch-nf-s @atom:ch @atom:nf @atom:s
@angle:f-n-f @atom:f @atom:n @atom:f
@angle:n2-nf-n2 @atom:n2 @atom:nf @atom:n2
@angle:n2-nf-nf @atom:n2 @atom:nf @atom:nf
@angle:n2-nf-o @atom:n2 @atom:nf @atom:o
@angle:n2-nf-p2 @atom:n2 @atom:nf @atom:p2
@angle:n2-nf-pf @atom:n2 @atom:nf @atom:pf
@angle:n2-nf-px @atom:n2 @atom:nf @atom:px
@angle:n2-nf-py @atom:n2 @atom:nf @atom:py
@angle:n2-nf-s @atom:n2 @atom:nf @atom:s
@angle:n2-nf-sx @atom:n2 @atom:nf @atom:sx
@angle:n2-nf-sy @atom:n2 @atom:nf @atom:sy
@angle:nf-nf-o @atom:nf @atom:nf @atom:o
@angle:nf-nf-p2 @atom:nf @atom:nf @atom:p2
@angle:nf-nf-s @atom:nf @atom:nf @atom:s
@angle:o-nf-o @atom:o @atom:nf @atom:o
@angle:o-nf-pf @atom:o @atom:nf @atom:pf
@angle:o-nf-px @atom:o @atom:nf @atom:px
@angle:o-nf-py @atom:o @atom:nf @atom:py
@angle:o-nf-s @atom:o @atom:nf @atom:s
@angle:o-nf-sx @atom:o @atom:nf @atom:sx
@angle:o-nf-sy @atom:o @atom:nf @atom:sy
@angle:p2-nf-pf @atom:p2 @atom:nf @atom:pf
@angle:p2-nf-px @atom:p2 @atom:nf @atom:px
@angle:p2-nf-py @atom:p2 @atom:nf @atom:py
@angle:p2-nf-sx @atom:p2 @atom:nf @atom:sx
@angle:p2-nf-sy @atom:p2 @atom:nf @atom:sy
@angle:pf-nf-s @atom:pf @atom:nf @atom:s
@angle:px-nf-s @atom:px @atom:nf @atom:s
@angle:py-nf-s @atom:py @atom:nf @atom:s
@angle:s-nf-s @atom:s @atom:nf @atom:s
@angle:s-nf-sx @atom:s @atom:nf @atom:sx
@angle:s-nf-sy @atom:s @atom:nf @atom:sy
@angle:br-nh-br @atom:br @atom:nh @atom:br
@angle:br-nh-ca @atom:br @atom:nh @atom:ca
@angle:br-nh-hn @atom:br @atom:nh @atom:hn
@angle:c1-nh-c1 @atom:c1 @atom:nh @atom:c1
@angle:c1-nh-c2 @atom:c1 @atom:nh @atom:c2
@angle:c1-nh-ca @atom:c1 @atom:nh @atom:ca
@angle:c1-nh-hn @atom:c1 @atom:nh @atom:hn
@angle:c2-nh-c2 @atom:c2 @atom:nh @atom:c2
@angle:c2-nh-c3 @atom:c2 @atom:nh @atom:c3
@angle:c2-nh-ca @atom:c2 @atom:nh @atom:ca
@angle:c2-nh-cc @atom:c2 @atom:nh @atom:cc
@angle:c2-nh-cd @atom:c2 @atom:nh @atom:cd
@angle:c2-nh-cx @atom:c2 @atom:nh @atom:cx
@angle:c2-nh-hn @atom:c2 @atom:nh @atom:hn
@angle:c2-nh-n2 @atom:c2 @atom:nh @atom:n2
@angle:c2-nh-n3 @atom:c2 @atom:nh @atom:n3
@angle:c2-nh-no @atom:c2 @atom:nh @atom:no
@angle:c2-nh-oh @atom:c2 @atom:nh @atom:oh
@angle:c2-nh-os @atom:c2 @atom:nh @atom:os
@angle:c2-nh-sy @atom:c2 @atom:nh @atom:sy
@angle:c3-nh-c3 @atom:c3 @atom:nh @atom:c3
@angle:c3-nh-ca @atom:c3 @atom:nh @atom:ca
@angle:c3-nh-cc @atom:c3 @atom:nh @atom:cc
@angle:c3-nh-cd @atom:c3 @atom:nh @atom:cd
@angle:c3-nh-cf @atom:c3 @atom:nh @atom:cf
@angle:c3-nh-cz @atom:c3 @atom:nh @atom:cz
@angle:c3-nh-hn @atom:c3 @atom:nh @atom:hn
@angle:c3-nh-n2 @atom:c3 @atom:nh @atom:n2
@angle:c3-nh-n @atom:c3 @atom:nh @atom:n
@angle:c3-nh-na @atom:c3 @atom:nh @atom:na
@angle:c3-nh-p2 @atom:c3 @atom:nh @atom:p2
@angle:c3-nh-sy @atom:c3 @atom:nh @atom:sy
@angle:ca-nh-ca @atom:ca @atom:nh @atom:ca
@angle:ca-nh-cc @atom:ca @atom:nh @atom:cc
@angle:ca-nh-cd @atom:ca @atom:nh @atom:cd
@angle:ca-nh-cl @atom:ca @atom:nh @atom:cl
@angle:ca-nh-cx @atom:ca @atom:nh @atom:cx
@angle:ca-nh-f @atom:ca @atom:nh @atom:f
@angle:ca-nh-hn @atom:ca @atom:nh @atom:hn
@angle:ca-nh-i @atom:ca @atom:nh @atom:i
@angle:ca-nh-n1 @atom:ca @atom:nh @atom:n1
@angle:ca-nh-n2 @atom:ca @atom:nh @atom:n2
@angle:ca-nh-n3 @atom:ca @atom:nh @atom:n3
@angle:ca-nh-n4 @atom:ca @atom:nh @atom:n4
@angle:ca-nh-n @atom:ca @atom:nh @atom:n
@angle:ca-nh-na @atom:ca @atom:nh @atom:na
@angle:ca-nh-nh @atom:ca @atom:nh @atom:nh
@angle:ca-nh-no @atom:ca @atom:nh @atom:no
@angle:ca-nh-o @atom:ca @atom:nh @atom:o
@angle:ca-nh-oh @atom:ca @atom:nh @atom:oh
@angle:ca-nh-os @atom:ca @atom:nh @atom:os
@angle:ca-nh-p2 @atom:ca @atom:nh @atom:p2
@angle:ca-nh-p3 @atom:ca @atom:nh @atom:p3
@angle:ca-nh-p4 @atom:ca @atom:nh @atom:p4
@angle:ca-nh-p5 @atom:ca @atom:nh @atom:p5
@angle:ca-nh-s4 @atom:ca @atom:nh @atom:s4
@angle:ca-nh-s6 @atom:ca @atom:nh @atom:s6
@angle:ca-nh-s @atom:ca @atom:nh @atom:s
@angle:ca-nh-sh @atom:ca @atom:nh @atom:sh
@angle:ca-nh-ss @atom:ca @atom:nh @atom:ss
@angle:ca-nh-sy @atom:ca @atom:nh @atom:sy
@angle:cc-nh-cx @atom:cc @atom:nh @atom:cx
@angle:cc-nh-hn @atom:cc @atom:nh @atom:hn
@angle:cc-nh-n2 @atom:cc @atom:nh @atom:n2
@angle:cc-nh-sy @atom:cc @atom:nh @atom:sy
@angle:cd-nh-cx @atom:cd @atom:nh @atom:cx
@angle:cd-nh-hn @atom:cd @atom:nh @atom:hn
@angle:ce-nh-hn @atom:ce @atom:nh @atom:hn
@angle:ce-nh-o @atom:ce @atom:nh @atom:o
@angle:ce-nh-sy @atom:ce @atom:nh @atom:sy
@angle:cf-nh-hn @atom:cf @atom:nh @atom:hn
@angle:cf-nh-o @atom:cf @atom:nh @atom:o
@angle:cl-nh-cl @atom:cl @atom:nh @atom:cl
@angle:cl-nh-hn @atom:cl @atom:nh @atom:hn
@angle:cx-nh-cx @atom:cx @atom:nh @atom:cx
@angle:cx-nh-hn @atom:cx @atom:nh @atom:hn
@angle:cz-nh-hn @atom:cz @atom:nh @atom:hn
@angle:f-nh-f @atom:f @atom:nh @atom:f
@angle:f-nh-hn @atom:f @atom:nh @atom:hn
@angle:hn-nh-hn @atom:hn @atom:nh @atom:hn
@angle:hn-nh-i @atom:hn @atom:nh @atom:i
@angle:hn-nh-n1 @atom:hn @atom:nh @atom:n1
@angle:hn-nh-n2 @atom:hn @atom:nh @atom:n2
@angle:hn-nh-n3 @atom:hn @atom:nh @atom:n3
@angle:hn-nh-n4 @atom:hn @atom:nh @atom:n4
@angle:hn-nh-n @atom:hn @atom:nh @atom:n
@angle:hn-nh-na @atom:hn @atom:nh @atom:na
@angle:hn-nh-nh @atom:hn @atom:nh @atom:nh
@angle:hn-nh-no @atom:hn @atom:nh @atom:no
@angle:hn-nh-o @atom:hn @atom:nh @atom:o
@angle:hn-nh-oh @atom:hn @atom:nh @atom:oh
@angle:hn-nh-os @atom:hn @atom:nh @atom:os
@angle:hn-nh-p2 @atom:hn @atom:nh @atom:p2
@angle:hn-nh-p3 @atom:hn @atom:nh @atom:p3
@angle:hn-nh-p4 @atom:hn @atom:nh @atom:p4
@angle:hn-nh-p5 @atom:hn @atom:nh @atom:p5
@angle:hn-nh-s4 @atom:hn @atom:nh @atom:s4
@angle:hn-nh-s @atom:hn @atom:nh @atom:s
@angle:hn-nh-s6 @atom:hn @atom:nh @atom:s6
@angle:hn-nh-sh @atom:hn @atom:nh @atom:sh
@angle:hn-nh-ss @atom:hn @atom:nh @atom:ss
@angle:hn-nh-sy @atom:hn @atom:nh @atom:sy
@angle:i-nh-i @atom:i @atom:nh @atom:i
@angle:n1-nh-n1 @atom:n1 @atom:nh @atom:n1
@angle:n2-nh-n2 @atom:n2 @atom:nh @atom:n2
@angle:n2-nh-n3 @atom:n2 @atom:nh @atom:n3
@angle:n2-nh-o @atom:n2 @atom:nh @atom:o
@angle:n3-nh-n3 @atom:n3 @atom:nh @atom:n3
@angle:n4-nh-n4 @atom:n4 @atom:nh @atom:n4
@angle:na-nh-na @atom:na @atom:nh @atom:na
@angle:hn-n-hn @atom:hn @atom:n @atom:hn
@angle:nh-nh-nh @atom:nh @atom:nh @atom:nh
@angle:hn-n-i @atom:hn @atom:n @atom:i
@angle:hn-n-n2 @atom:hn @atom:n @atom:n2
@angle:hn-n-n3 @atom:hn @atom:n @atom:n3
@angle:hn-n-n4 @atom:hn @atom:n @atom:n4
@angle:hn-n-n @atom:hn @atom:n @atom:n
@angle:hn-n-na @atom:hn @atom:n @atom:na
@angle:hn-n-nc @atom:hn @atom:n @atom:nc
@angle:hn-n-nh @atom:hn @atom:n @atom:nh
@angle:hn-n-no @atom:hn @atom:n @atom:no
@angle:hn-n-o @atom:hn @atom:n @atom:o
@angle:n-nh-o @atom:n @atom:nh @atom:o
@angle:hn-n-oh @atom:hn @atom:n @atom:oh
@angle:no-nh-no @atom:no @atom:nh @atom:no
@angle:hn-n-os @atom:hn @atom:n @atom:os
@angle:hn-n-p2 @atom:hn @atom:n @atom:p2
@angle:hn-n-p3 @atom:hn @atom:n @atom:p3
@angle:hn-n-p4 @atom:hn @atom:n @atom:p4
@angle:hn-n-p5 @atom:hn @atom:n @atom:p5
@angle:hn-n-s4 @atom:hn @atom:n @atom:s4
@angle:hn-n-s @atom:hn @atom:n @atom:s
@angle:hn-n-s6 @atom:hn @atom:n @atom:s6
@angle:hn-n-sh @atom:hn @atom:n @atom:sh
@angle:hn-n-ss @atom:hn @atom:n @atom:ss
@angle:hn-n-sy @atom:hn @atom:n @atom:sy
@angle:oh-nh-oh @atom:oh @atom:nh @atom:oh
@angle:o-nh-o @atom:o @atom:nh @atom:o
@angle:os-nh-os @atom:os @atom:nh @atom:os
@angle:p2-nh-p2 @atom:p2 @atom:nh @atom:p2
@angle:p3-nh-p3 @atom:p3 @atom:nh @atom:p3
@angle:p5-nh-p5 @atom:p5 @atom:nh @atom:p5
@angle:s4-nh-s4 @atom:s4 @atom:nh @atom:s4
@angle:s6-nh-s6 @atom:s6 @atom:nh @atom:s6
@angle:sh-nh-sh @atom:sh @atom:nh @atom:sh
@angle:s-nh-s @atom:s @atom:nh @atom:s
@angle:ss-nh-ss @atom:ss @atom:nh @atom:ss
@angle:i-n-i @atom:i @atom:n @atom:i
@angle:n2-n-n2 @atom:n2 @atom:n @atom:n2
@angle:n3-n-n3 @atom:n3 @atom:n @atom:n3
@angle:n4-n-n4 @atom:n4 @atom:n @atom:n4
@angle:na-n-na @atom:na @atom:n @atom:na
@angle:nc-n-nc @atom:nc @atom:n @atom:nc
@angle:nc-n-p2 @atom:nc @atom:n @atom:p2
@angle:nc-n-pc @atom:nc @atom:n @atom:pc
@angle:nd-n-nd @atom:nd @atom:n @atom:nd
@angle:nd-n-p2 @atom:nd @atom:n @atom:p2
@angle:nd-n-pd @atom:nd @atom:n @atom:pd
@angle:nh-n-nh @atom:nh @atom:n @atom:nh
@angle:n-n-n @atom:n @atom:n @atom:n
@angle:no-n-no @atom:no @atom:n @atom:no
@angle:br-no-o @atom:br @atom:no @atom:o
@angle:c1-no-o @atom:c1 @atom:no @atom:o
@angle:c2-no-o @atom:c2 @atom:no @atom:o
@angle:c3-no-o @atom:c3 @atom:no @atom:o
@angle:ca-no-o @atom:ca @atom:no @atom:o
@angle:cc-no-o @atom:cc @atom:no @atom:o
@angle:cl-no-o @atom:cl @atom:no @atom:o
@angle:c-no-o @atom:c @atom:no @atom:o
@angle:hn-no-o @atom:hn @atom:no @atom:o
@angle:oh-n-oh @atom:oh @atom:n @atom:oh
@angle:i-no-o @atom:i @atom:no @atom:o
@angle:n1-no-o @atom:n1 @atom:no @atom:o
@angle:n2-no-o @atom:n2 @atom:no @atom:o
@angle:n3-no-o @atom:n3 @atom:no @atom:o
@angle:n4-no-o @atom:n4 @atom:no @atom:o
@angle:na-no-o @atom:na @atom:no @atom:o
@angle:nh-no-o @atom:nh @atom:no @atom:o
@angle:n-no-o @atom:n @atom:no @atom:o
@angle:no-no-o @atom:no @atom:no @atom:o
@angle:o-n-o @atom:o @atom:n @atom:o
@angle:o-no-o @atom:o @atom:no @atom:o
@angle:o-no-oh @atom:o @atom:no @atom:oh
@angle:o-no-os @atom:o @atom:no @atom:os
@angle:o-no-p2 @atom:o @atom:no @atom:p2
@angle:o-no-p3 @atom:o @atom:no @atom:p3
@angle:o-no-p4 @atom:o @atom:no @atom:p4
@angle:o-no-p5 @atom:o @atom:no @atom:p5
@angle:o-no-s4 @atom:o @atom:no @atom:s4
@angle:o-no-s6 @atom:o @atom:no @atom:s6
@angle:o-no-s @atom:o @atom:no @atom:s
@angle:o-no-sh @atom:o @atom:no @atom:sh
@angle:o-no-ss @atom:o @atom:no @atom:ss
@angle:os-n-os @atom:os @atom:n @atom:os
@angle:p2-n-p2 @atom:p2 @atom:n @atom:p2
@angle:p3-n-p3 @atom:p3 @atom:n @atom:p3
@angle:p4-n-p4 @atom:p4 @atom:n @atom:p4
@angle:p5-n-p5 @atom:p5 @atom:n @atom:p5
@angle:pc-n-pc @atom:pc @atom:n @atom:pc
@angle:pd-n-pd @atom:pd @atom:n @atom:pd
@angle:s4-n-s4 @atom:s4 @atom:n @atom:s4
@angle:s6-n-s6 @atom:s6 @atom:n @atom:s6
@angle:sh-n-sh @atom:sh @atom:n @atom:sh
@angle:s-n-s @atom:s @atom:n @atom:s
@angle:ss-n-ss @atom:ss @atom:n @atom:ss
@angle:br-oh-ho @atom:br @atom:oh @atom:ho
@angle:c1-oh-ho @atom:c1 @atom:oh @atom:ho
@angle:c2-oh-ho @atom:c2 @atom:oh @atom:ho
@angle:c3-oh-ho @atom:c3 @atom:oh @atom:ho
@angle:ca-oh-ho @atom:ca @atom:oh @atom:ho
@angle:cc-oh-ho @atom:cc @atom:oh @atom:ho
@angle:cd-oh-ho @atom:cd @atom:oh @atom:ho
@angle:ce-oh-ho @atom:ce @atom:oh @atom:ho
@angle:cf-oh-ho @atom:cf @atom:oh @atom:ho
@angle:c-oh-ho @atom:c @atom:oh @atom:ho
@angle:cl-oh-ho @atom:cl @atom:oh @atom:ho
@angle:cx-oh-ho @atom:cx @atom:oh @atom:ho
@angle:cy-oh-ho @atom:cy @atom:oh @atom:ho
@angle:f-oh-ho @atom:f @atom:oh @atom:ho
@angle:ho-oh-ho @atom:ho @atom:oh @atom:ho
@angle:ho-oh-i @atom:ho @atom:oh @atom:i
@angle:ho-oh-n1 @atom:ho @atom:oh @atom:n1
@angle:ho-oh-n2 @atom:ho @atom:oh @atom:n2
@angle:ho-oh-n3 @atom:ho @atom:oh @atom:n3
@angle:ho-oh-n4 @atom:ho @atom:oh @atom:n4
@angle:ho-oh-n @atom:ho @atom:oh @atom:n
@angle:ho-oh-na @atom:ho @atom:oh @atom:na
@angle:ho-oh-nh @atom:ho @atom:oh @atom:nh
@angle:ho-oh-no @atom:ho @atom:oh @atom:no
@angle:ho-oh-o @atom:ho @atom:oh @atom:o
@angle:ho-oh-oh @atom:ho @atom:oh @atom:oh
@angle:ho-oh-os @atom:ho @atom:oh @atom:os
@angle:ho-oh-p2 @atom:ho @atom:oh @atom:p2
@angle:ho-oh-p3 @atom:ho @atom:oh @atom:p3
@angle:ho-oh-p4 @atom:ho @atom:oh @atom:p4
@angle:ho-oh-p5 @atom:ho @atom:oh @atom:p5
@angle:ho-oh-py @atom:ho @atom:oh @atom:py
@angle:ho-oh-s4 @atom:ho @atom:oh @atom:s4
@angle:ho-oh-s @atom:ho @atom:oh @atom:s
@angle:ho-oh-s6 @atom:ho @atom:oh @atom:s6
@angle:ho-oh-sh @atom:ho @atom:oh @atom:sh
@angle:ho-oh-ss @atom:ho @atom:oh @atom:ss
@angle:ho-oh-sy @atom:ho @atom:oh @atom:sy
@angle:br-os-br @atom:br @atom:os @atom:br
@angle:c1-os-c1 @atom:c1 @atom:os @atom:c1
@angle:c1-os-c3 @atom:c1 @atom:os @atom:c3
@angle:c2-os-c2 @atom:c2 @atom:os @atom:c2
@angle:c2-os-c3 @atom:c2 @atom:os @atom:c3
@angle:c2-os-ca @atom:c2 @atom:os @atom:ca
@angle:c2-os-n2 @atom:c2 @atom:os @atom:n2
@angle:c2-os-na @atom:c2 @atom:os @atom:na
@angle:c2-os-os @atom:c2 @atom:os @atom:os
@angle:c2-os-p5 @atom:c2 @atom:os @atom:p5
@angle:c2-os-ss @atom:c2 @atom:os @atom:ss
@angle:c3-os-c3 @atom:c3 @atom:os @atom:c3
@angle:c3-os-ca @atom:c3 @atom:os @atom:ca
@angle:c3-os-cc @atom:c3 @atom:os @atom:cc
@angle:c3-os-cd @atom:c3 @atom:os @atom:cd
@angle:c3-os-ce @atom:c3 @atom:os @atom:ce
@angle:c3-os-cf @atom:c3 @atom:os @atom:cf
@angle:c3-os-cl @atom:c3 @atom:os @atom:cl
@angle:c3-os-cy @atom:c3 @atom:os @atom:cy
@angle:c3-os-i @atom:c3 @atom:os @atom:i
@angle:c3-os-n1 @atom:c3 @atom:os @atom:n1
@angle:c3-os-n2 @atom:c3 @atom:os @atom:n2
@angle:c3-os-n3 @atom:c3 @atom:os @atom:n3
@angle:c3-os-n4 @atom:c3 @atom:os @atom:n4
@angle:c3-os-n @atom:c3 @atom:os @atom:n
@angle:c3-os-na @atom:c3 @atom:os @atom:na
@angle:c3-os-nc @atom:c3 @atom:os @atom:nc
@angle:c3-os-nd @atom:c3 @atom:os @atom:nd
@angle:c3-os-nh @atom:c3 @atom:os @atom:nh
@angle:c3-os-no @atom:c3 @atom:os @atom:no
@angle:c3-os-o @atom:c3 @atom:os @atom:o
@angle:c3-os-oh @atom:c3 @atom:os @atom:oh
@angle:c3-os-os @atom:c3 @atom:os @atom:os
@angle:c3-os-p2 @atom:c3 @atom:os @atom:p2
@angle:c3-os-p3 @atom:c3 @atom:os @atom:p3
@angle:c3-os-p4 @atom:c3 @atom:os @atom:p4
@angle:c3-os-p5 @atom:c3 @atom:os @atom:p5
@angle:c3-os-py @atom:c3 @atom:os @atom:py
@angle:c3-os-s4 @atom:c3 @atom:os @atom:s4
@angle:c3-os-s6 @atom:c3 @atom:os @atom:s6
@angle:c3-os-s @atom:c3 @atom:os @atom:s
@angle:c3-os-sh @atom:c3 @atom:os @atom:sh
@angle:c3-os-ss @atom:c3 @atom:os @atom:ss
@angle:ca-os-ca @atom:ca @atom:os @atom:ca
@angle:ca-os-cc @atom:ca @atom:os @atom:cc
@angle:ca-os-cd @atom:ca @atom:os @atom:cd
@angle:ca-os-n3 @atom:ca @atom:os @atom:n3
@angle:ca-os-na @atom:ca @atom:os @atom:na
@angle:ca-os-nc @atom:ca @atom:os @atom:nc
@angle:ca-os-nd @atom:ca @atom:os @atom:nd
@angle:ca-os-p5 @atom:ca @atom:os @atom:p5
@angle:ca-os-s6 @atom:ca @atom:os @atom:s6
@angle:c-os-c2 @atom:c @atom:os @atom:c2
@angle:c-os-c3 @atom:c @atom:os @atom:c3
@angle:c-os-c @atom:c @atom:os @atom:c
@angle:c-os-ca @atom:c @atom:os @atom:ca
@angle:c-os-cc @atom:c @atom:os @atom:cc
@angle:cc-os-cc @atom:cc @atom:os @atom:cc
@angle:cc-os-cd @atom:cc @atom:os @atom:cd
@angle:c-os-cd @atom:c @atom:os @atom:cd
@angle:cc-os-na @atom:cc @atom:os @atom:na
@angle:cc-os-nc @atom:cc @atom:os @atom:nc
@angle:cc-os-os @atom:cc @atom:os @atom:os
@angle:cc-os-ss @atom:cc @atom:os @atom:ss
@angle:c-os-cy @atom:c @atom:os @atom:cy
@angle:cd-os-cd @atom:cd @atom:os @atom:cd
@angle:cd-os-na @atom:cd @atom:os @atom:na
@angle:cd-os-nd @atom:cd @atom:os @atom:nd
@angle:cd-os-os @atom:cd @atom:os @atom:os
@angle:cd-os-ss @atom:cd @atom:os @atom:ss
@angle:cl-os-cl @atom:cl @atom:os @atom:cl
@angle:c-os-n2 @atom:c @atom:os @atom:n2
@angle:c-os-n @atom:c @atom:os @atom:n
@angle:c-os-oh @atom:c @atom:os @atom:oh
@angle:c-os-os @atom:c @atom:os @atom:os
@angle:c-os-p5 @atom:c @atom:os @atom:p5
@angle:c-os-sy @atom:c @atom:os @atom:sy
@angle:cx-os-cx @atom:cx @atom:os @atom:cx
@angle:cx-os-n @atom:cx @atom:os @atom:n
@angle:cx-os-os @atom:cx @atom:os @atom:os
@angle:cy-os-cy @atom:cy @atom:os @atom:cy
@angle:f-os-f @atom:f @atom:os @atom:f
@angle:f-os-os @atom:f @atom:os @atom:os
@angle:i-os-i @atom:i @atom:os @atom:i
@angle:n1-os-n1 @atom:n1 @atom:os @atom:n1
@angle:n2-os-n2 @atom:n2 @atom:os @atom:n2
@angle:n2-os-s6 @atom:n2 @atom:os @atom:s6
@angle:n3-os-n3 @atom:n3 @atom:os @atom:n3
@angle:n4-os-n4 @atom:n4 @atom:os @atom:n4
@angle:na-os-na @atom:na @atom:os @atom:na
@angle:na-os-ss @atom:na @atom:os @atom:ss
@angle:nc-os-nc @atom:nc @atom:os @atom:nc
@angle:nc-os-ss @atom:nc @atom:os @atom:ss
@angle:nd-os-nd @atom:nd @atom:os @atom:nd
@angle:nd-os-ss @atom:nd @atom:os @atom:ss
@angle:nh-os-nh @atom:nh @atom:os @atom:nh
@angle:n-os-n @atom:n @atom:os @atom:n
@angle:no-os-no @atom:no @atom:os @atom:no
@angle:n-os-s6 @atom:n @atom:os @atom:s6
@angle:o-os-o @atom:o @atom:os @atom:o
@angle:p2-os-p2 @atom:p2 @atom:os @atom:p2
@angle:p2-os-p5 @atom:p2 @atom:os @atom:p5
@angle:p3-os-p3 @atom:p3 @atom:os @atom:p3
@angle:p3-os-py @atom:p3 @atom:os @atom:py
@angle:p5-os-p5 @atom:p5 @atom:os @atom:p5
@angle:s4-os-s4 @atom:s4 @atom:os @atom:s4
@angle:s6-os-s6 @atom:s6 @atom:os @atom:s6
@angle:sh-os-sh @atom:sh @atom:os @atom:sh
@angle:s-os-s @atom:s @atom:os @atom:s
@angle:ss-os-ss @atom:ss @atom:os @atom:ss
@angle:br-p2-br @atom:br @atom:p2 @atom:br
@angle:br-p2-c2 @atom:br @atom:p2 @atom:c2
@angle:br-p2-n2 @atom:br @atom:p2 @atom:n2
@angle:br-p2-o @atom:br @atom:p2 @atom:o
@angle:br-p2-p2 @atom:br @atom:p2 @atom:p2
@angle:br-p2-s @atom:br @atom:p2 @atom:s
@angle:c1-p2-c1 @atom:c1 @atom:p2 @atom:c1
@angle:c1-p2-c2 @atom:c1 @atom:p2 @atom:c2
@angle:c1-p2-n2 @atom:c1 @atom:p2 @atom:n2
@angle:c1-p2-o @atom:c1 @atom:p2 @atom:o
@angle:c1-p2-p2 @atom:c1 @atom:p2 @atom:p2
@angle:c1-p2-s @atom:c1 @atom:p2 @atom:s
@angle:c2-p2-c2 @atom:c2 @atom:p2 @atom:c2
@angle:c2-p2-c3 @atom:c2 @atom:p2 @atom:c3
@angle:c2-p2-ca @atom:c2 @atom:p2 @atom:ca
@angle:c2-p2-cl @atom:c2 @atom:p2 @atom:cl
@angle:c2-p2-f @atom:c2 @atom:p2 @atom:f
@angle:c2-p2-hp @atom:c2 @atom:p2 @atom:hp
@angle:c2-p2-i @atom:c2 @atom:p2 @atom:i
@angle:c2-p2-n2 @atom:c2 @atom:p2 @atom:n2
@angle:c2-p2-n3 @atom:c2 @atom:p2 @atom:n3
@angle:c2-p2-n4 @atom:c2 @atom:p2 @atom:n4
@angle:c2-p2-n @atom:c2 @atom:p2 @atom:n
@angle:c2-p2-na @atom:c2 @atom:p2 @atom:na
@angle:c2-p2-nh @atom:c2 @atom:p2 @atom:nh
@angle:c2-p2-no @atom:c2 @atom:p2 @atom:no
@angle:c2-p2-o @atom:c2 @atom:p2 @atom:o
@angle:c2-p2-oh @atom:c2 @atom:p2 @atom:oh
@angle:c2-p2-os @atom:c2 @atom:p2 @atom:os
@angle:c2-p2-p2 @atom:c2 @atom:p2 @atom:p2
@angle:c2-p2-p3 @atom:c2 @atom:p2 @atom:p3
@angle:c2-p2-p4 @atom:c2 @atom:p2 @atom:p4
@angle:c2-p2-p5 @atom:c2 @atom:p2 @atom:p5
@angle:c2-p2-s4 @atom:c2 @atom:p2 @atom:s4
@angle:c2-p2-s6 @atom:c2 @atom:p2 @atom:s6
@angle:c2-p2-s @atom:c2 @atom:p2 @atom:s
@angle:c2-p2-sh @atom:c2 @atom:p2 @atom:sh
@angle:c2-p2-ss @atom:c2 @atom:p2 @atom:ss
@angle:c3-p2-c3 @atom:c3 @atom:p2 @atom:c3
@angle:c3-p2-n2 @atom:c3 @atom:p2 @atom:n2
@angle:c3-p2-o @atom:c3 @atom:p2 @atom:o
@angle:c3-p2-os @atom:c3 @atom:p2 @atom:os
@angle:c3-p2-p2 @atom:c3 @atom:p2 @atom:p2
@angle:c3-p2-s @atom:c3 @atom:p2 @atom:s
@angle:ca-p2-ca @atom:ca @atom:p2 @atom:ca
@angle:ca-p2-n2 @atom:ca @atom:p2 @atom:n2
@angle:ca-p2-n @atom:ca @atom:p2 @atom:n
@angle:ca-p2-na @atom:ca @atom:p2 @atom:na
@angle:ca-p2-o @atom:ca @atom:p2 @atom:o
@angle:ca-p2-s @atom:ca @atom:p2 @atom:s
@angle:c-p2-c2 @atom:c @atom:p2 @atom:c2
@angle:c-p2-c @atom:c @atom:p2 @atom:c
@angle:ce-p2-o @atom:ce @atom:p2 @atom:o
@angle:ce-p2-s @atom:ce @atom:p2 @atom:s
@angle:cf-p2-o @atom:cf @atom:p2 @atom:o
@angle:cf-p2-s @atom:cf @atom:p2 @atom:s
@angle:cl-p2-cl @atom:cl @atom:p2 @atom:cl
@angle:cl-p2-n2 @atom:cl @atom:p2 @atom:n2
@angle:cl-p2-o @atom:cl @atom:p2 @atom:o
@angle:cl-p2-p2 @atom:cl @atom:p2 @atom:p2
@angle:cl-p2-s @atom:cl @atom:p2 @atom:s
@angle:f-p2-f @atom:f @atom:p2 @atom:f
@angle:f-p2-n2 @atom:f @atom:p2 @atom:n2
@angle:f-p2-o @atom:f @atom:p2 @atom:o
@angle:f-p2-p2 @atom:f @atom:p2 @atom:p2
@angle:f-p2-s @atom:f @atom:p2 @atom:s
@angle:hp-p2-hp @atom:hp @atom:p2 @atom:hp
@angle:hp-p2-n1 @atom:hp @atom:p2 @atom:n1
@angle:hp-p2-n2 @atom:hp @atom:p2 @atom:n2
@angle:hp-p2-ne @atom:hp @atom:p2 @atom:ne
@angle:hp-p2-nf @atom:hp @atom:p2 @atom:nf
@angle:hp-p2-o @atom:hp @atom:p2 @atom:o
@angle:hp-p2-p2 @atom:hp @atom:p2 @atom:p2
@angle:hp-p2-p4 @atom:hp @atom:p2 @atom:p4
@angle:hp-p2-p5 @atom:hp @atom:p2 @atom:p5
@angle:hp-p2-pe @atom:hp @atom:p2 @atom:pe
@angle:hp-p2-pf @atom:hp @atom:p2 @atom:pf
@angle:hp-p2-s4 @atom:hp @atom:p2 @atom:s4
@angle:hp-p2-s @atom:hp @atom:p2 @atom:s
@angle:hp-p2-s6 @atom:hp @atom:p2 @atom:s6
@angle:i-p2-i @atom:i @atom:p2 @atom:i
@angle:i-p2-n2 @atom:i @atom:p2 @atom:n2
@angle:i-p2-o @atom:i @atom:p2 @atom:o
@angle:i-p2-p2 @atom:i @atom:p2 @atom:p2
@angle:i-p2-s @atom:i @atom:p2 @atom:s
@angle:n1-p2-n1 @atom:n1 @atom:p2 @atom:n1
@angle:n2-p2-n2 @atom:n2 @atom:p2 @atom:n2
@angle:n2-p2-n3 @atom:n2 @atom:p2 @atom:n3
@angle:n2-p2-n4 @atom:n2 @atom:p2 @atom:n4
@angle:n2-p2-na @atom:n2 @atom:p2 @atom:na
@angle:n2-p2-nh @atom:n2 @atom:p2 @atom:nh
@angle:n2-p2-no @atom:n2 @atom:p2 @atom:no
@angle:n2-p2-o @atom:n2 @atom:p2 @atom:o
@angle:n2-p2-oh @atom:n2 @atom:p2 @atom:oh
@angle:n2-p2-os @atom:n2 @atom:p2 @atom:os
@angle:n2-p2-p3 @atom:n2 @atom:p2 @atom:p3
@angle:n2-p2-p4 @atom:n2 @atom:p2 @atom:p4
@angle:n2-p2-p5 @atom:n2 @atom:p2 @atom:p5
@angle:n2-p2-s4 @atom:n2 @atom:p2 @atom:s4
@angle:n2-p2-s6 @atom:n2 @atom:p2 @atom:s6
@angle:n2-p2-s @atom:n2 @atom:p2 @atom:s
@angle:n2-p2-sh @atom:n2 @atom:p2 @atom:sh
@angle:n2-p2-ss @atom:n2 @atom:p2 @atom:ss
@angle:n3-p2-n3 @atom:n3 @atom:p2 @atom:n3
@angle:n3-p2-o @atom:n3 @atom:p2 @atom:o
@angle:n3-p2-p2 @atom:n3 @atom:p2 @atom:p2
@angle:n3-p2-s @atom:n3 @atom:p2 @atom:s
@angle:n4-p2-n4 @atom:n4 @atom:p2 @atom:n4
@angle:n4-p2-o @atom:n4 @atom:p2 @atom:o
@angle:n4-p2-p2 @atom:n4 @atom:p2 @atom:p2
@angle:n4-p2-s @atom:n4 @atom:p2 @atom:s
@angle:na-p2-na @atom:na @atom:p2 @atom:na
@angle:na-p2-o @atom:na @atom:p2 @atom:o
@angle:na-p2-s @atom:na @atom:p2 @atom:s
@angle:ne-p2-o @atom:ne @atom:p2 @atom:o
@angle:ne-p2-s @atom:ne @atom:p2 @atom:s
@angle:nf-p2-o @atom:nf @atom:p2 @atom:o
@angle:nf-p2-s @atom:nf @atom:p2 @atom:s
@angle:nh-p2-nh @atom:nh @atom:p2 @atom:nh
@angle:nh-p2-o @atom:nh @atom:p2 @atom:o
@angle:nh-p2-p2 @atom:nh @atom:p2 @atom:p2
@angle:nh-p2-s @atom:nh @atom:p2 @atom:s
@angle:n-p2-n2 @atom:n @atom:p2 @atom:n2
@angle:n-p2-o @atom:n @atom:p2 @atom:o
@angle:no-p2-no @atom:no @atom:p2 @atom:no
@angle:no-p2-o @atom:no @atom:p2 @atom:o
@angle:no-p2-p2 @atom:no @atom:p2 @atom:p2
@angle:no-p2-s @atom:no @atom:p2 @atom:s
@angle:n-p2-p2 @atom:n @atom:p2 @atom:p2
@angle:n-p2-s @atom:n @atom:p2 @atom:s
@angle:oh-p2-oh @atom:oh @atom:p2 @atom:oh
@angle:oh-p2-p2 @atom:oh @atom:p2 @atom:p2
@angle:oh-p2-s @atom:oh @atom:p2 @atom:s
@angle:o-p2-o @atom:o @atom:p2 @atom:o
@angle:o-p2-oh @atom:o @atom:p2 @atom:oh
@angle:o-p2-os @atom:o @atom:p2 @atom:os
@angle:o-p2-p2 @atom:o @atom:p2 @atom:p2
@angle:o-p2-p3 @atom:o @atom:p2 @atom:p3
@angle:o-p2-p4 @atom:o @atom:p2 @atom:p4
@angle:o-p2-p5 @atom:o @atom:p2 @atom:p5
@angle:o-p2-pe @atom:o @atom:p2 @atom:pe
@angle:o-p2-pf @atom:o @atom:p2 @atom:pf
@angle:o-p2-s4 @atom:o @atom:p2 @atom:s4
@angle:o-p2-s6 @atom:o @atom:p2 @atom:s6
@angle:o-p2-s @atom:o @atom:p2 @atom:s
@angle:o-p2-sh @atom:o @atom:p2 @atom:sh
@angle:os-p2-os @atom:os @atom:p2 @atom:os
@angle:os-p2-p2 @atom:os @atom:p2 @atom:p2
@angle:o-p2-ss @atom:o @atom:p2 @atom:ss
@angle:os-p2-s @atom:os @atom:p2 @atom:s
@angle:p2-p2-n2 @atom:p2 @atom:p2 @atom:n2
@angle:p2-p2-p3 @atom:p2 @atom:p2 @atom:p3
@angle:p2-p2-p4 @atom:p2 @atom:p2 @atom:p4
@angle:p2-p2-p5 @atom:p2 @atom:p2 @atom:p5
@angle:p2-p2-s4 @atom:p2 @atom:p2 @atom:s4
@angle:p2-p2-s6 @atom:p2 @atom:p2 @atom:s6
@angle:p2-p2-s @atom:p2 @atom:p2 @atom:s
@angle:p2-p2-sh @atom:p2 @atom:p2 @atom:sh
@angle:p3-p2-p3 @atom:p3 @atom:p2 @atom:p3
@angle:p3-p2-s @atom:p3 @atom:p2 @atom:s
@angle:p4-p2-s @atom:p4 @atom:p2 @atom:s
@angle:p5-p2-p5 @atom:p5 @atom:p2 @atom:p5
@angle:p5-p2-s @atom:p5 @atom:p2 @atom:s
@angle:pe-p2-s @atom:pe @atom:p2 @atom:s
@angle:pf-p2-s @atom:pf @atom:p2 @atom:s
@angle:s4-p2-s4 @atom:s4 @atom:p2 @atom:s4
@angle:s6-p2-s6 @atom:s6 @atom:p2 @atom:s6
@angle:sh-p2-sh @atom:sh @atom:p2 @atom:sh
@angle:s-p2-s @atom:s @atom:p2 @atom:s
@angle:s-p2-s4 @atom:s @atom:p2 @atom:s4
@angle:s-p2-s6 @atom:s @atom:p2 @atom:s6
@angle:s-p2-sh @atom:s @atom:p2 @atom:sh
@angle:s-p2-ss @atom:s @atom:p2 @atom:ss
@angle:ss-p2-ss @atom:ss @atom:p2 @atom:ss
@angle:br-p3-br @atom:br @atom:p3 @atom:br
@angle:br-p3-hp @atom:br @atom:p3 @atom:hp
@angle:c1-p3-c1 @atom:c1 @atom:p3 @atom:c1
@angle:c1-p3-f @atom:c1 @atom:p3 @atom:f
@angle:c1-p3-hp @atom:c1 @atom:p3 @atom:hp
@angle:c2-p3-c2 @atom:c2 @atom:p3 @atom:c2
@angle:c2-p3-hp @atom:c2 @atom:p3 @atom:hp
@angle:c3-p3-c3 @atom:c3 @atom:p3 @atom:c3
@angle:c3-p3-ca @atom:c3 @atom:p3 @atom:ca
@angle:c3-p3-cl @atom:c3 @atom:p3 @atom:cl
@angle:c3-p3-f @atom:c3 @atom:p3 @atom:f
@angle:c3-p3-hp @atom:c3 @atom:p3 @atom:hp
@angle:c3-p3-n2 @atom:c3 @atom:p3 @atom:n2
@angle:c3-p3-n3 @atom:c3 @atom:p3 @atom:n3
@angle:c3-p3-n4 @atom:c3 @atom:p3 @atom:n4
@angle:c3-p3-n @atom:c3 @atom:p3 @atom:n
@angle:c3-p3-na @atom:c3 @atom:p3 @atom:na
@angle:c3-p3-nh @atom:c3 @atom:p3 @atom:nh
@angle:c3-p3-no @atom:c3 @atom:p3 @atom:no
@angle:c3-p3-o @atom:c3 @atom:p3 @atom:o
@angle:c3-p3-oh @atom:c3 @atom:p3 @atom:oh
@angle:c3-p3-os @atom:c3 @atom:p3 @atom:os
@angle:c3-p3-p3 @atom:c3 @atom:p3 @atom:p3
@angle:c3-p3-p5 @atom:c3 @atom:p3 @atom:p5
@angle:c3-p3-s4 @atom:c3 @atom:p3 @atom:s4
@angle:c3-p3-s6 @atom:c3 @atom:p3 @atom:s6
@angle:c3-p3-sh @atom:c3 @atom:p3 @atom:sh
@angle:c3-p3-ss @atom:c3 @atom:p3 @atom:ss
@angle:ca-p3-ca @atom:ca @atom:p3 @atom:ca
@angle:ca-p3-hp @atom:ca @atom:p3 @atom:hp
@angle:c-p3-c3 @atom:c @atom:p3 @atom:c3
@angle:c-p3-c @atom:c @atom:p3 @atom:c
@angle:c-p3-hp @atom:c @atom:p3 @atom:hp
@angle:cl-p3-cl @atom:cl @atom:p3 @atom:cl
@angle:cl-p3-f @atom:cl @atom:p3 @atom:f
@angle:cl-p3-hp @atom:cl @atom:p3 @atom:hp
@angle:c-p3-os @atom:c @atom:p3 @atom:os
@angle:cx-p3-hp @atom:cx @atom:p3 @atom:hp
@angle:f-p3-f @atom:f @atom:p3 @atom:f
@angle:f-p3-hp @atom:f @atom:p3 @atom:hp
@angle:f-p3-n3 @atom:f @atom:p3 @atom:n3
@angle:f-p3-os @atom:f @atom:p3 @atom:os
@angle:f-p3-p3 @atom:f @atom:p3 @atom:p3
@angle:hp-p3-hp @atom:hp @atom:p3 @atom:hp
@angle:hp-p3-i @atom:hp @atom:p3 @atom:i
@angle:hp-p3-n1 @atom:hp @atom:p3 @atom:n1
@angle:hp-p3-n2 @atom:hp @atom:p3 @atom:n2
@angle:hp-p3-n3 @atom:hp @atom:p3 @atom:n3
@angle:hp-p3-n4 @atom:hp @atom:p3 @atom:n4
@angle:hp-p3-n @atom:hp @atom:p3 @atom:n
@angle:hp-p3-na @atom:hp @atom:p3 @atom:na
@angle:hp-p3-nh @atom:hp @atom:p3 @atom:nh
@angle:hp-p3-no @atom:hp @atom:p3 @atom:no
@angle:hp-p3-o @atom:hp @atom:p3 @atom:o
@angle:hp-p3-oh @atom:hp @atom:p3 @atom:oh
@angle:hp-p3-os @atom:hp @atom:p3 @atom:os
@angle:hp-p3-p2 @atom:hp @atom:p3 @atom:p2
@angle:hp-p3-p3 @atom:hp @atom:p3 @atom:p3
@angle:hp-p3-p4 @atom:hp @atom:p3 @atom:p4
@angle:hp-p3-p5 @atom:hp @atom:p3 @atom:p5
@angle:hp-p3-s4 @atom:hp @atom:p3 @atom:s4
@angle:hp-p3-s6 @atom:hp @atom:p3 @atom:s6
@angle:hp-p3-sh @atom:hp @atom:p3 @atom:sh
@angle:hp-p3-ss @atom:hp @atom:p3 @atom:ss
@angle:i-p3-i @atom:i @atom:p3 @atom:i
@angle:n1-p3-n1 @atom:n1 @atom:p3 @atom:n1
@angle:n2-p3-n2 @atom:n2 @atom:p3 @atom:n2
@angle:n3-p3-n3 @atom:n3 @atom:p3 @atom:n3
@angle:n3-p3-o @atom:n3 @atom:p3 @atom:o
@angle:n3-p3-oh @atom:n3 @atom:p3 @atom:oh
@angle:n4-p3-n4 @atom:n4 @atom:p3 @atom:n4
@angle:na-p3-na @atom:na @atom:p3 @atom:na
@angle:nh-p3-nh @atom:nh @atom:p3 @atom:nh
@angle:n-p3-n @atom:n @atom:p3 @atom:n
@angle:n-p3-o @atom:n @atom:p3 @atom:o
@angle:no-p3-no @atom:no @atom:p3 @atom:no
@angle:oh-p3-oh @atom:oh @atom:p3 @atom:oh
@angle:o-p3-o @atom:o @atom:p3 @atom:o
@angle:o-p3-p3 @atom:o @atom:p3 @atom:p3
@angle:o-p3-p5 @atom:o @atom:p3 @atom:p5
@angle:o-p3-s4 @atom:o @atom:p3 @atom:s4
@angle:o-p3-s6 @atom:o @atom:p3 @atom:s6
@angle:os-p3-os @atom:os @atom:p3 @atom:os
@angle:p2-p3-p2 @atom:p2 @atom:p3 @atom:p2
@angle:p3-p3-p3 @atom:p3 @atom:p3 @atom:p3
@angle:p4-p3-p4 @atom:p4 @atom:p3 @atom:p4
@angle:p5-p3-p5 @atom:p5 @atom:p3 @atom:p5
@angle:s4-p3-s4 @atom:s4 @atom:p3 @atom:s4
@angle:s6-p3-s6 @atom:s6 @atom:p3 @atom:s6
@angle:sh-p3-sh @atom:sh @atom:p3 @atom:sh
@angle:s-p3-s @atom:s @atom:p3 @atom:s
@angle:ss-p3-ss @atom:ss @atom:p3 @atom:ss
@angle:br-p4-br @atom:br @atom:p4 @atom:br
@angle:br-p4-o @atom:br @atom:p4 @atom:o
@angle:c2-p4-c2 @atom:c2 @atom:p4 @atom:c2
@angle:c2-p4-hp @atom:c2 @atom:p4 @atom:hp
@angle:c2-p4-o @atom:c2 @atom:p4 @atom:o
@angle:c3-p4-c3 @atom:c3 @atom:p4 @atom:c3
@angle:c3-p4-n2 @atom:c3 @atom:p4 @atom:n2
@angle:c3-p4-n3 @atom:c3 @atom:p4 @atom:n3
@angle:c3-p4-n4 @atom:c3 @atom:p4 @atom:n4
@angle:c3-p4-n @atom:c3 @atom:p4 @atom:n
@angle:c3-p4-na @atom:c3 @atom:p4 @atom:na
@angle:c3-p4-nh @atom:c3 @atom:p4 @atom:nh
@angle:c3-p4-no @atom:c3 @atom:p4 @atom:no
@angle:c3-p4-o @atom:c3 @atom:p4 @atom:o
@angle:c3-p4-oh @atom:c3 @atom:p4 @atom:oh
@angle:c3-p4-os @atom:c3 @atom:p4 @atom:os
@angle:c3-p4-p2 @atom:c3 @atom:p4 @atom:p2
@angle:c3-p4-p3 @atom:c3 @atom:p4 @atom:p3
@angle:c3-p4-p4 @atom:c3 @atom:p4 @atom:p4
@angle:c3-p4-p5 @atom:c3 @atom:p4 @atom:p5
@angle:c3-p4-sh @atom:c3 @atom:p4 @atom:sh
@angle:c3-p4-ss @atom:c3 @atom:p4 @atom:ss
@angle:ca-p4-ca @atom:ca @atom:p4 @atom:ca
@angle:ca-p4-o @atom:ca @atom:p4 @atom:o
@angle:cl-p4-cl @atom:cl @atom:p4 @atom:cl
@angle:cl-p4-o @atom:cl @atom:p4 @atom:o
@angle:hp-p4-hp @atom:hp @atom:p4 @atom:hp
@angle:hp-p4-n1 @atom:hp @atom:p4 @atom:n1
@angle:hp-p4-o @atom:hp @atom:p4 @atom:o
@angle:hp-p4-p3 @atom:hp @atom:p4 @atom:p3
@angle:hp-p4-s @atom:hp @atom:p4 @atom:s
@angle:i-p4-i @atom:i @atom:p4 @atom:i
@angle:i-p4-o @atom:i @atom:p4 @atom:o
@angle:n1-p4-n1 @atom:n1 @atom:p4 @atom:n1
@angle:n1-p4-o @atom:n1 @atom:p4 @atom:o
@angle:n2-p4-n2 @atom:n2 @atom:p4 @atom:n2
@angle:n2-p4-o @atom:n2 @atom:p4 @atom:o
@angle:n3-p4-o @atom:n3 @atom:p4 @atom:o
@angle:n4-p4-o @atom:n4 @atom:p4 @atom:o
@angle:na-p4-o @atom:na @atom:p4 @atom:o
@angle:nh-p4-nh @atom:nh @atom:p4 @atom:nh
@angle:nh-p4-o @atom:nh @atom:p4 @atom:o
@angle:n-p4-o @atom:n @atom:p4 @atom:o
@angle:no-p4-o @atom:no @atom:p4 @atom:o
@angle:oh-p4-oh @atom:oh @atom:p4 @atom:oh
@angle:o-p4-o @atom:o @atom:p4 @atom:o
@angle:o-p4-oh @atom:o @atom:p4 @atom:oh
@angle:o-p4-os @atom:o @atom:p4 @atom:os
@angle:o-p4-p2 @atom:o @atom:p4 @atom:p2
@angle:o-p4-p3 @atom:o @atom:p4 @atom:p3
@angle:o-p4-p4 @atom:o @atom:p4 @atom:p4
@angle:o-p4-p5 @atom:o @atom:p4 @atom:p5
@angle:o-p4-s4 @atom:o @atom:p4 @atom:s4
@angle:o-p4-s6 @atom:o @atom:p4 @atom:s6
@angle:o-p4-s @atom:o @atom:p4 @atom:s
@angle:o-p4-sh @atom:o @atom:p4 @atom:sh
@angle:os-p4-os @atom:os @atom:p4 @atom:os
@angle:o-p4-ss @atom:o @atom:p4 @atom:ss
@angle:p2-p4-p2 @atom:p2 @atom:p4 @atom:p2
@angle:p3-p4-p3 @atom:p3 @atom:p4 @atom:p3
@angle:p4-p4-p4 @atom:p4 @atom:p4 @atom:p4
@angle:p5-p4-p5 @atom:p5 @atom:p4 @atom:p5
@angle:s4-p4-s4 @atom:s4 @atom:p4 @atom:s4
@angle:s6-p4-s6 @atom:s6 @atom:p4 @atom:s6
@angle:sh-p4-sh @atom:sh @atom:p4 @atom:sh
@angle:s-p4-s @atom:s @atom:p4 @atom:s
@angle:ss-p4-ss @atom:ss @atom:p4 @atom:ss
@angle:br-p5-br @atom:br @atom:p5 @atom:br
@angle:br-p5-o @atom:br @atom:p5 @atom:o
@angle:br-p5-oh @atom:br @atom:p5 @atom:oh
@angle:c1-p5-c1 @atom:c1 @atom:p5 @atom:c1
@angle:c1-p5-o @atom:c1 @atom:p5 @atom:o
@angle:c1-p5-oh @atom:c1 @atom:p5 @atom:oh
@angle:c2-p5-c2 @atom:c2 @atom:p5 @atom:c2
@angle:c2-p5-o @atom:c2 @atom:p5 @atom:o
@angle:c2-p5-oh @atom:c2 @atom:p5 @atom:oh
@angle:c2-p5-os @atom:c2 @atom:p5 @atom:os
@angle:c3-p5-c3 @atom:c3 @atom:p5 @atom:c3
@angle:c3-p5-hp @atom:c3 @atom:p5 @atom:hp
@angle:c3-p5-n3 @atom:c3 @atom:p5 @atom:n3
@angle:c3-p5-o @atom:c3 @atom:p5 @atom:o
@angle:c3-p5-oh @atom:c3 @atom:p5 @atom:oh
@angle:c3-p5-os @atom:c3 @atom:p5 @atom:os
@angle:c3-p5-p4 @atom:c3 @atom:p5 @atom:p4
@angle:c3-p5-s @atom:c3 @atom:p5 @atom:s
@angle:c3-p5-ss @atom:c3 @atom:p5 @atom:ss
@angle:ca-p5-ca @atom:ca @atom:p5 @atom:ca
@angle:ca-p5-o @atom:ca @atom:p5 @atom:o
@angle:ca-p5-oh @atom:ca @atom:p5 @atom:oh
@angle:ca-p5-os @atom:ca @atom:p5 @atom:os
@angle:c-p5-c @atom:c @atom:p5 @atom:c
@angle:cl-p5-cl @atom:cl @atom:p5 @atom:cl
@angle:cl-p5-o @atom:cl @atom:p5 @atom:o
@angle:cl-p5-oh @atom:cl @atom:p5 @atom:oh
@angle:c-p5-o @atom:c @atom:p5 @atom:o
@angle:c-p5-oh @atom:c @atom:p5 @atom:oh
@angle:f-p5-f @atom:f @atom:p5 @atom:f
@angle:f-p5-o @atom:f @atom:p5 @atom:o
@angle:f-p5-oh @atom:f @atom:p5 @atom:oh
@angle:f-p5-os @atom:f @atom:p5 @atom:os
@angle:f-p5-s @atom:f @atom:p5 @atom:s
@angle:hp-p5-hp @atom:hp @atom:p5 @atom:hp
@angle:hp-p5-n1 @atom:hp @atom:p5 @atom:n1
@angle:hp-p5-o @atom:hp @atom:p5 @atom:o
@angle:hp-p5-oh @atom:hp @atom:p5 @atom:oh
@angle:hp-p5-s @atom:hp @atom:p5 @atom:s
@angle:i-p5-i @atom:i @atom:p5 @atom:i
@angle:i-p5-o @atom:i @atom:p5 @atom:o
@angle:i-p5-oh @atom:i @atom:p5 @atom:oh
@angle:n1-p5-n1 @atom:n1 @atom:p5 @atom:n1
@angle:n1-p5-o @atom:n1 @atom:p5 @atom:o
@angle:n2-p5-n2 @atom:n2 @atom:p5 @atom:n2
@angle:n2-p5-o @atom:n2 @atom:p5 @atom:o
@angle:n2-p5-oh @atom:n2 @atom:p5 @atom:oh
@angle:n3-p5-n3 @atom:n3 @atom:p5 @atom:n3
@angle:n3-p5-nh @atom:n3 @atom:p5 @atom:nh
@angle:n3-p5-o @atom:n3 @atom:p5 @atom:o
@angle:n3-p5-oh @atom:n3 @atom:p5 @atom:oh
@angle:n3-p5-os @atom:n3 @atom:p5 @atom:os
@angle:n3-p5-s @atom:n3 @atom:p5 @atom:s
@angle:n4-p5-n4 @atom:n4 @atom:p5 @atom:n4
@angle:n4-p5-o @atom:n4 @atom:p5 @atom:o
@angle:n4-p5-oh @atom:n4 @atom:p5 @atom:oh
@angle:n4-p5-os @atom:n4 @atom:p5 @atom:os
@angle:na-p5-na @atom:na @atom:p5 @atom:na
@angle:na-p5-o @atom:na @atom:p5 @atom:o
@angle:na-p5-oh @atom:na @atom:p5 @atom:oh
@angle:na-p5-os @atom:na @atom:p5 @atom:os
@angle:nh-p5-nh @atom:nh @atom:p5 @atom:nh
@angle:nh-p5-o @atom:nh @atom:p5 @atom:o
@angle:nh-p5-oh @atom:nh @atom:p5 @atom:oh
@angle:nh-p5-os @atom:nh @atom:p5 @atom:os
@angle:n-p5-n3 @atom:n @atom:p5 @atom:n3
@angle:n-p5-n @atom:n @atom:p5 @atom:n
@angle:n-p5-o @atom:n @atom:p5 @atom:o
@angle:n-p5-oh @atom:n @atom:p5 @atom:oh
@angle:no-p5-no @atom:no @atom:p5 @atom:no
@angle:no-p5-o @atom:no @atom:p5 @atom:o
@angle:no-p5-oh @atom:no @atom:p5 @atom:oh
@angle:no-p5-os @atom:no @atom:p5 @atom:os
@angle:n-p5-os @atom:n @atom:p5 @atom:os
@angle:oh-p5-oh @atom:oh @atom:p5 @atom:oh
@angle:oh-p5-os @atom:oh @atom:p5 @atom:os
@angle:oh-p5-p2 @atom:oh @atom:p5 @atom:p2
@angle:oh-p5-p3 @atom:oh @atom:p5 @atom:p3
@angle:oh-p5-p4 @atom:oh @atom:p5 @atom:p4
@angle:oh-p5-p5 @atom:oh @atom:p5 @atom:p5
@angle:oh-p5-s4 @atom:oh @atom:p5 @atom:s4
@angle:oh-p5-s6 @atom:oh @atom:p5 @atom:s6
@angle:oh-p5-s @atom:oh @atom:p5 @atom:s
@angle:oh-p5-sh @atom:oh @atom:p5 @atom:sh
@angle:oh-p5-ss @atom:oh @atom:p5 @atom:ss
@angle:o-p5-o @atom:o @atom:p5 @atom:o
@angle:o-p5-oh @atom:o @atom:p5 @atom:oh
@angle:o-p5-os @atom:o @atom:p5 @atom:os
@angle:o-p5-p2 @atom:o @atom:p5 @atom:p2
@angle:o-p5-p3 @atom:o @atom:p5 @atom:p3
@angle:o-p5-p4 @atom:o @atom:p5 @atom:p4
@angle:o-p5-p5 @atom:o @atom:p5 @atom:p5
@angle:o-p5-s4 @atom:o @atom:p5 @atom:s4
@angle:o-p5-s6 @atom:o @atom:p5 @atom:s6
@angle:o-p5-s @atom:o @atom:p5 @atom:s
@angle:o-p5-sh @atom:o @atom:p5 @atom:sh
@angle:os-p5-os @atom:os @atom:p5 @atom:os
@angle:os-p5-p3 @atom:os @atom:p5 @atom:p3
@angle:os-p5-p5 @atom:os @atom:p5 @atom:p5
@angle:os-p5-s4 @atom:os @atom:p5 @atom:s4
@angle:os-p5-s6 @atom:os @atom:p5 @atom:s6
@angle:o-p5-ss @atom:o @atom:p5 @atom:ss
@angle:os-p5-s @atom:os @atom:p5 @atom:s
@angle:os-p5-sh @atom:os @atom:p5 @atom:sh
@angle:os-p5-ss @atom:os @atom:p5 @atom:ss
@angle:p2-p5-p2 @atom:p2 @atom:p5 @atom:p2
@angle:p3-p5-p3 @atom:p3 @atom:p5 @atom:p3
@angle:p4-p5-p4 @atom:p4 @atom:p5 @atom:p4
@angle:p5-p5-p5 @atom:p5 @atom:p5 @atom:p5
@angle:s6-p5-s6 @atom:s6 @atom:p5 @atom:s6
@angle:sh-p5-sh @atom:sh @atom:p5 @atom:sh
@angle:sh-p5-ss @atom:sh @atom:p5 @atom:ss
@angle:s-p5-s @atom:s @atom:p5 @atom:s
@angle:ss-p5-ss @atom:ss @atom:p5 @atom:ss
@angle:cd-pc-n @atom:cd @atom:pc @atom:n
@angle:cd-pc-na @atom:cd @atom:pc @atom:na
@angle:cc-pd-n @atom:cc @atom:pd @atom:n
@angle:cc-pd-na @atom:cc @atom:pd @atom:na
@angle:c2-pe-ca @atom:c2 @atom:pe @atom:ca
@angle:c2-pe-ce @atom:c2 @atom:pe @atom:ce
@angle:c2-pe-cg @atom:c2 @atom:pe @atom:cg
@angle:c2-pe-n2 @atom:c2 @atom:pe @atom:n2
@angle:c2-pe-ne @atom:c2 @atom:pe @atom:ne
@angle:c2-pe-o @atom:c2 @atom:pe @atom:o
@angle:c2-pe-p2 @atom:c2 @atom:pe @atom:p2
@angle:c2-pe-pe @atom:c2 @atom:pe @atom:pe
@angle:c2-pe-px @atom:c2 @atom:pe @atom:px
@angle:c2-pe-py @atom:c2 @atom:pe @atom:py
@angle:c2-pe-s @atom:c2 @atom:pe @atom:s
@angle:c2-pe-sx @atom:c2 @atom:pe @atom:sx
@angle:c2-pe-sy @atom:c2 @atom:pe @atom:sy
@angle:ca-pe-n2 @atom:ca @atom:pe @atom:n2
@angle:ca-pe-o @atom:ca @atom:pe @atom:o
@angle:ca-pe-p2 @atom:ca @atom:pe @atom:p2
@angle:ca-pe-pf @atom:ca @atom:pe @atom:pf
@angle:ca-pe-s @atom:ca @atom:pe @atom:s
@angle:c-pe-c2 @atom:c @atom:pe @atom:c2
@angle:ce-pe-n2 @atom:ce @atom:pe @atom:n2
@angle:ce-pe-o @atom:ce @atom:pe @atom:o
@angle:ce-pe-p2 @atom:ce @atom:pe @atom:p2
@angle:ce-pe-s @atom:ce @atom:pe @atom:s
@angle:cg-pe-n2 @atom:cg @atom:pe @atom:n2
@angle:cg-pe-o @atom:cg @atom:pe @atom:o
@angle:cg-pe-p2 @atom:cg @atom:pe @atom:p2
@angle:cg-pe-s @atom:cg @atom:pe @atom:s
@angle:n2-pe-n2 @atom:n2 @atom:pe @atom:n2
@angle:n2-pe-ne @atom:n2 @atom:pe @atom:ne
@angle:n2-pe-o @atom:n2 @atom:pe @atom:o
@angle:n2-pe-p2 @atom:n2 @atom:pe @atom:p2
@angle:n2-pe-pe @atom:n2 @atom:pe @atom:pe
@angle:n2-pe-px @atom:n2 @atom:pe @atom:px
@angle:n2-pe-py @atom:n2 @atom:pe @atom:py
@angle:n2-pe-s @atom:n2 @atom:pe @atom:s
@angle:n2-pe-sx @atom:n2 @atom:pe @atom:sx
@angle:n2-pe-sy @atom:n2 @atom:pe @atom:sy
@angle:ne-pe-o @atom:ne @atom:pe @atom:o
@angle:ne-pe-p2 @atom:ne @atom:pe @atom:p2
@angle:ne-pe-s @atom:ne @atom:pe @atom:s
@angle:o-pe-o @atom:o @atom:pe @atom:o
@angle:o-pe-p2 @atom:o @atom:pe @atom:p2
@angle:o-pe-pe @atom:o @atom:pe @atom:pe
@angle:o-pe-px @atom:o @atom:pe @atom:px
@angle:o-pe-py @atom:o @atom:pe @atom:py
@angle:o-pe-s @atom:o @atom:pe @atom:s
@angle:o-pe-sx @atom:o @atom:pe @atom:sx
@angle:o-pe-sy @atom:o @atom:pe @atom:sy
@angle:p2-pe-pe @atom:p2 @atom:pe @atom:pe
@angle:p2-pe-px @atom:p2 @atom:pe @atom:px
@angle:p2-pe-py @atom:p2 @atom:pe @atom:py
@angle:p2-pe-s @atom:p2 @atom:pe @atom:s
@angle:p2-pe-sx @atom:p2 @atom:pe @atom:sx
@angle:p2-pe-sy @atom:p2 @atom:pe @atom:sy
@angle:pe-pe-s @atom:pe @atom:pe @atom:s
@angle:px-pe-s @atom:px @atom:pe @atom:s
@angle:py-pe-s @atom:py @atom:pe @atom:s
@angle:s-pe-s @atom:s @atom:pe @atom:s
@angle:s-pe-sx @atom:s @atom:pe @atom:sx
@angle:s-pe-sy @atom:s @atom:pe @atom:sy
@angle:c2-pf-ca @atom:c2 @atom:pf @atom:ca
@angle:c2-pf-cf @atom:c2 @atom:pf @atom:cf
@angle:c2-pf-ch @atom:c2 @atom:pf @atom:ch
@angle:c2-pf-n2 @atom:c2 @atom:pf @atom:n2
@angle:c2-pf-nf @atom:c2 @atom:pf @atom:nf
@angle:c2-pf-o @atom:c2 @atom:pf @atom:o
@angle:c2-pf-p2 @atom:c2 @atom:pf @atom:p2
@angle:c2-pf-pf @atom:c2 @atom:pf @atom:pf
@angle:c2-pf-px @atom:c2 @atom:pf @atom:px
@angle:c2-pf-py @atom:c2 @atom:pf @atom:py
@angle:c2-pf-s @atom:c2 @atom:pf @atom:s
@angle:c2-pf-sx @atom:c2 @atom:pf @atom:sx
@angle:c2-pf-sy @atom:c2 @atom:pf @atom:sy
@angle:ca-pf-n2 @atom:ca @atom:pf @atom:n2
@angle:ca-pf-o @atom:ca @atom:pf @atom:o
@angle:ca-pf-p2 @atom:ca @atom:pf @atom:p2
@angle:ca-pf-pe @atom:ca @atom:pf @atom:pe
@angle:ca-pf-s @atom:ca @atom:pf @atom:s
@angle:c-pf-c2 @atom:c @atom:pf @atom:c2
@angle:cf-pf-n2 @atom:cf @atom:pf @atom:n2
@angle:cf-pf-o @atom:cf @atom:pf @atom:o
@angle:cf-pf-p2 @atom:cf @atom:pf @atom:p2
@angle:cf-pf-s @atom:cf @atom:pf @atom:s
@angle:ch-pf-n2 @atom:ch @atom:pf @atom:n2
@angle:ch-pf-o @atom:ch @atom:pf @atom:o
@angle:ch-pf-p2 @atom:ch @atom:pf @atom:p2
@angle:ch-pf-s @atom:ch @atom:pf @atom:s
@angle:n2-pf-n2 @atom:n2 @atom:pf @atom:n2
@angle:n2-pf-nf @atom:n2 @atom:pf @atom:nf
@angle:n2-pf-o @atom:n2 @atom:pf @atom:o
@angle:n2-pf-p2 @atom:n2 @atom:pf @atom:p2
@angle:n2-pf-pf @atom:n2 @atom:pf @atom:pf
@angle:n2-pf-px @atom:n2 @atom:pf @atom:px
@angle:n2-pf-py @atom:n2 @atom:pf @atom:py
@angle:n2-pf-s @atom:n2 @atom:pf @atom:s
@angle:n2-pf-sx @atom:n2 @atom:pf @atom:sx
@angle:n2-pf-sy @atom:n2 @atom:pf @atom:sy
@angle:nf-pf-o @atom:nf @atom:pf @atom:o
@angle:nf-pf-p2 @atom:nf @atom:pf @atom:p2
@angle:nf-pf-s @atom:nf @atom:pf @atom:s
@angle:o-pf-o @atom:o @atom:pf @atom:o
@angle:o-pf-p2 @atom:o @atom:pf @atom:p2
@angle:o-pf-pf @atom:o @atom:pf @atom:pf
@angle:o-pf-px @atom:o @atom:pf @atom:px
@angle:o-pf-py @atom:o @atom:pf @atom:py
@angle:o-pf-s @atom:o @atom:pf @atom:s
@angle:o-pf-sx @atom:o @atom:pf @atom:sx
@angle:o-pf-sy @atom:o @atom:pf @atom:sy
@angle:p2-pf-pf @atom:p2 @atom:pf @atom:pf
@angle:p2-pf-px @atom:p2 @atom:pf @atom:px
@angle:p2-pf-py @atom:p2 @atom:pf @atom:py
@angle:p2-pf-s @atom:p2 @atom:pf @atom:s
@angle:p2-pf-sx @atom:p2 @atom:pf @atom:sx
@angle:p2-pf-sy @atom:p2 @atom:pf @atom:sy
@angle:pf-pf-s @atom:pf @atom:pf @atom:s
@angle:px-pf-s @atom:px @atom:pf @atom:s
@angle:py-pf-s @atom:py @atom:pf @atom:s
@angle:s-pf-s @atom:s @atom:pf @atom:s
@angle:s-pf-sx @atom:s @atom:pf @atom:sx
@angle:s-pf-sy @atom:s @atom:pf @atom:sy
@angle:c3-px-ca @atom:c3 @atom:px @atom:ca
@angle:c3-px-ce @atom:c3 @atom:px @atom:ce
@angle:c3-px-cf @atom:c3 @atom:px @atom:cf
@angle:c3-px-ne @atom:c3 @atom:px @atom:ne
@angle:c3-px-nf @atom:c3 @atom:px @atom:nf
@angle:c3-px-o @atom:c3 @atom:px @atom:o
@angle:c3-px-pe @atom:c3 @atom:px @atom:pe
@angle:c3-px-pf @atom:c3 @atom:px @atom:pf
@angle:c3-px-py @atom:c3 @atom:px @atom:py
@angle:c3-px-sx @atom:c3 @atom:px @atom:sx
@angle:c3-px-sy @atom:c3 @atom:px @atom:sy
@angle:ca-px-ca @atom:ca @atom:px @atom:ca
@angle:ca-px-o @atom:ca @atom:px @atom:o
@angle:c-px-c3 @atom:c @atom:px @atom:c3
@angle:ce-px-ce @atom:ce @atom:px @atom:ce
@angle:ce-px-o @atom:ce @atom:px @atom:o
@angle:cf-px-cf @atom:cf @atom:px @atom:cf
@angle:cf-px-o @atom:cf @atom:px @atom:o
@angle:c-px-o @atom:c @atom:px @atom:o
@angle:ne-px-ne @atom:ne @atom:px @atom:ne
@angle:ne-px-o @atom:ne @atom:px @atom:o
@angle:nf-px-nf @atom:nf @atom:px @atom:nf
@angle:nf-px-o @atom:nf @atom:px @atom:o
@angle:o-px-pe @atom:o @atom:px @atom:pe
@angle:o-px-pf @atom:o @atom:px @atom:pf
@angle:o-px-py @atom:o @atom:px @atom:py
@angle:o-px-sx @atom:o @atom:px @atom:sx
@angle:o-px-sy @atom:o @atom:px @atom:sy
@angle:pe-px-pe @atom:pe @atom:px @atom:pe
@angle:pf-px-pf @atom:pf @atom:px @atom:pf
@angle:py-px-py @atom:py @atom:px @atom:py
@angle:sx-px-sx @atom:sx @atom:px @atom:sx
@angle:sy-px-sy @atom:sy @atom:px @atom:sy
@angle:c3-py-n4 @atom:c3 @atom:py @atom:n4
@angle:c3-py-na @atom:c3 @atom:py @atom:na
@angle:c3-py-o @atom:c3 @atom:py @atom:o
@angle:c3-py-oh @atom:c3 @atom:py @atom:oh
@angle:c3-py-os @atom:c3 @atom:py @atom:os
@angle:c3-py-px @atom:c3 @atom:py @atom:px
@angle:c3-py-py @atom:c3 @atom:py @atom:py
@angle:c3-py-sx @atom:c3 @atom:py @atom:sx
@angle:ca-py-ca @atom:ca @atom:py @atom:ca
@angle:ca-py-o @atom:ca @atom:py @atom:o
@angle:ca-py-oh @atom:ca @atom:py @atom:oh
@angle:ca-py-os @atom:ca @atom:py @atom:os
@angle:c-py-c3 @atom:c @atom:py @atom:c3
@angle:c-py-c @atom:c @atom:py @atom:c
@angle:ce-py-ce @atom:ce @atom:py @atom:ce
@angle:ce-py-o @atom:ce @atom:py @atom:o
@angle:ce-py-oh @atom:ce @atom:py @atom:oh
@angle:ce-py-os @atom:ce @atom:py @atom:os
@angle:cf-py-cf @atom:cf @atom:py @atom:cf
@angle:cf-py-o @atom:cf @atom:py @atom:o
@angle:cf-py-oh @atom:cf @atom:py @atom:oh
@angle:cf-py-os @atom:cf @atom:py @atom:os
@angle:c-py-o @atom:c @atom:py @atom:o
@angle:c-py-oh @atom:c @atom:py @atom:oh
@angle:c-py-os @atom:c @atom:py @atom:os
@angle:n3-py-ne @atom:n3 @atom:py @atom:ne
@angle:n4-py-o @atom:n4 @atom:py @atom:o
@angle:n4-py-py @atom:n4 @atom:py @atom:py
@angle:na-py-o @atom:na @atom:py @atom:o
@angle:na-py-py @atom:na @atom:py @atom:py
@angle:ne-py-ne @atom:ne @atom:py @atom:ne
@angle:ne-py-o @atom:ne @atom:py @atom:o
@angle:ne-py-oh @atom:ne @atom:py @atom:oh
@angle:ne-py-os @atom:ne @atom:py @atom:os
@angle:nf-py-nf @atom:nf @atom:py @atom:nf
@angle:nf-py-o @atom:nf @atom:py @atom:o
@angle:nf-py-oh @atom:nf @atom:py @atom:oh
@angle:nf-py-os @atom:nf @atom:py @atom:os
@angle:oh-py-oh @atom:oh @atom:py @atom:oh
@angle:oh-py-pe @atom:oh @atom:py @atom:pe
@angle:oh-py-pf @atom:oh @atom:py @atom:pf
@angle:oh-py-px @atom:oh @atom:py @atom:px
@angle:oh-py-py @atom:oh @atom:py @atom:py
@angle:oh-py-sx @atom:oh @atom:py @atom:sx
@angle:oh-py-sy @atom:oh @atom:py @atom:sy
@angle:o-py-oh @atom:o @atom:py @atom:oh
@angle:o-py-os @atom:o @atom:py @atom:os
@angle:o-py-pe @atom:o @atom:py @atom:pe
@angle:o-py-pf @atom:o @atom:py @atom:pf
@angle:o-py-px @atom:o @atom:py @atom:px
@angle:o-py-py @atom:o @atom:py @atom:py
@angle:os-py-os @atom:os @atom:py @atom:os
@angle:os-py-py @atom:os @atom:py @atom:py
@angle:os-py-sx @atom:os @atom:py @atom:sx
@angle:os-py-sy @atom:os @atom:py @atom:sy
@angle:o-py-sx @atom:o @atom:py @atom:sx
@angle:o-py-sy @atom:o @atom:py @atom:sy
@angle:pe-py-pe @atom:pe @atom:py @atom:pe
@angle:pf-py-pf @atom:pf @atom:py @atom:pf
@angle:py-py-py @atom:py @atom:py @atom:py
@angle:py-py-sx @atom:py @atom:py @atom:sx
@angle:sy-py-sy @atom:sy @atom:py @atom:sy
@angle:c1-s2-o @atom:c1 @atom:s2 @atom:o
@angle:c2-s2-n2 @atom:c2 @atom:s2 @atom:n2
@angle:c2-s2-o @atom:c2 @atom:s2 @atom:o
@angle:cl-s2-n1 @atom:cl @atom:s2 @atom:n1
@angle:f-s2-n1 @atom:f @atom:s2 @atom:n1
@angle:n1-s2-o @atom:n1 @atom:s2 @atom:o
@angle:n2-s2-o @atom:n2 @atom:s2 @atom:o
@angle:o-s2-o @atom:o @atom:s2 @atom:o
@angle:o-s2-s @atom:o @atom:s2 @atom:s
@angle:s-s2-s @atom:s @atom:s2 @atom:s
@angle:br-s4-br @atom:br @atom:s4 @atom:br
@angle:br-s4-c3 @atom:br @atom:s4 @atom:c3
@angle:br-s4-o @atom:br @atom:s4 @atom:o
@angle:c1-s4-c1 @atom:c1 @atom:s4 @atom:c1
@angle:c1-s4-o @atom:c1 @atom:s4 @atom:o
@angle:c2-s4-c2 @atom:c2 @atom:s4 @atom:c2
@angle:c2-s4-c3 @atom:c2 @atom:s4 @atom:c3
@angle:c2-s4-o @atom:c2 @atom:s4 @atom:o
@angle:c3-s4-c3 @atom:c3 @atom:s4 @atom:c3
@angle:c3-s4-ca @atom:c3 @atom:s4 @atom:ca
@angle:c3-s4-f @atom:c3 @atom:s4 @atom:f
@angle:c3-s4-hs @atom:c3 @atom:s4 @atom:hs
@angle:c3-s4-i @atom:c3 @atom:s4 @atom:i
@angle:c3-s4-n2 @atom:c3 @atom:s4 @atom:n2
@angle:c3-s4-n3 @atom:c3 @atom:s4 @atom:n3
@angle:c3-s4-n @atom:c3 @atom:s4 @atom:n
@angle:c3-s4-n4 @atom:c3 @atom:s4 @atom:n4
@angle:c3-s4-na @atom:c3 @atom:s4 @atom:na
@angle:c3-s4-nh @atom:c3 @atom:s4 @atom:nh
@angle:c3-s4-no @atom:c3 @atom:s4 @atom:no
@angle:c3-s4-o @atom:c3 @atom:s4 @atom:o
@angle:c3-s4-oh @atom:c3 @atom:s4 @atom:oh
@angle:c3-s4-os @atom:c3 @atom:s4 @atom:os
@angle:c3-s4-p2 @atom:c3 @atom:s4 @atom:p2
@angle:c3-s4-p3 @atom:c3 @atom:s4 @atom:p3
@angle:c3-s4-p4 @atom:c3 @atom:s4 @atom:p4
@angle:c3-s4-p5 @atom:c3 @atom:s4 @atom:p5
@angle:c3-s4-s4 @atom:c3 @atom:s4 @atom:s4
@angle:c3-s4-s @atom:c3 @atom:s4 @atom:s
@angle:c3-s4-s6 @atom:c3 @atom:s4 @atom:s6
@angle:c3-s4-sh @atom:c3 @atom:s4 @atom:sh
@angle:c3-s4-ss @atom:c3 @atom:s4 @atom:ss
@angle:ca-s4-ca @atom:ca @atom:s4 @atom:ca
@angle:ca-s4-o @atom:ca @atom:s4 @atom:o
@angle:c-s4-c3 @atom:c @atom:s4 @atom:c3
@angle:c-s4-c @atom:c @atom:s4 @atom:c
@angle:cl-s4-cl @atom:cl @atom:s4 @atom:cl
@angle:cl-s4-o @atom:cl @atom:s4 @atom:o
@angle:c-s4-o @atom:c @atom:s4 @atom:o
@angle:cx-s4-cx @atom:cx @atom:s4 @atom:cx
@angle:cx-s4-o @atom:cx @atom:s4 @atom:o
@angle:f-s4-f @atom:f @atom:s4 @atom:f
@angle:f-s4-o @atom:f @atom:s4 @atom:o
@angle:f-s4-s @atom:f @atom:s4 @atom:s
@angle:hs-s4-hs @atom:hs @atom:s4 @atom:hs
@angle:hs-s4-n1 @atom:hs @atom:s4 @atom:n1
@angle:hs-s4-o @atom:hs @atom:s4 @atom:o
@angle:i-s4-i @atom:i @atom:s4 @atom:i
@angle:i-s4-o @atom:i @atom:s4 @atom:o
@angle:n1-s4-n1 @atom:n1 @atom:s4 @atom:n1
@angle:n1-s4-o @atom:n1 @atom:s4 @atom:o
@angle:n2-s4-n2 @atom:n2 @atom:s4 @atom:n2
@angle:n2-s4-o @atom:n2 @atom:s4 @atom:o
@angle:n3-s4-n3 @atom:n3 @atom:s4 @atom:n3
@angle:n3-s4-o @atom:n3 @atom:s4 @atom:o
@angle:n4-s4-n4 @atom:n4 @atom:s4 @atom:n4
@angle:n4-s4-o @atom:n4 @atom:s4 @atom:o
@angle:na-s4-na @atom:na @atom:s4 @atom:na
@angle:na-s4-o @atom:na @atom:s4 @atom:o
@angle:nh-s4-nh @atom:nh @atom:s4 @atom:nh
@angle:nh-s4-o @atom:nh @atom:s4 @atom:o
@angle:n-s4-n @atom:n @atom:s4 @atom:n
@angle:n-s4-o @atom:n @atom:s4 @atom:o
@angle:no-s4-no @atom:no @atom:s4 @atom:no
@angle:no-s4-o @atom:no @atom:s4 @atom:o
@angle:oh-s4-oh @atom:oh @atom:s4 @atom:oh
@angle:o-s4-o @atom:o @atom:s4 @atom:o
@angle:o-s4-oh @atom:o @atom:s4 @atom:oh
@angle:o-s4-os @atom:o @atom:s4 @atom:os
@angle:o-s4-p2 @atom:o @atom:s4 @atom:p2
@angle:o-s4-p3 @atom:o @atom:s4 @atom:p3
@angle:o-s4-p4 @atom:o @atom:s4 @atom:p4
@angle:o-s4-p5 @atom:o @atom:s4 @atom:p5
@angle:o-s4-s4 @atom:o @atom:s4 @atom:s4
@angle:o-s4-s @atom:o @atom:s4 @atom:s
@angle:o-s4-s6 @atom:o @atom:s4 @atom:s6
@angle:o-s4-sh @atom:o @atom:s4 @atom:sh
@angle:os-s4-os @atom:os @atom:s4 @atom:os
@angle:o-s4-ss @atom:o @atom:s4 @atom:ss
@angle:p2-s4-p2 @atom:p2 @atom:s4 @atom:p2
@angle:p3-s4-p3 @atom:p3 @atom:s4 @atom:p3
@angle:p5-s4-p5 @atom:p5 @atom:s4 @atom:p5
@angle:s4-s4-s4 @atom:s4 @atom:s4 @atom:s4
@angle:s4-s4-s6 @atom:s4 @atom:s4 @atom:s6
@angle:s6-s4-s6 @atom:s6 @atom:s4 @atom:s6
@angle:sh-s4-sh @atom:sh @atom:s4 @atom:sh
@angle:sh-s4-ss @atom:sh @atom:s4 @atom:ss
@angle:s-s4-s @atom:s @atom:s4 @atom:s
@angle:ss-s4-ss @atom:ss @atom:s4 @atom:ss
@angle:br-s6-br @atom:br @atom:s6 @atom:br
@angle:br-s6-c3 @atom:br @atom:s6 @atom:c3
@angle:br-s6-f @atom:br @atom:s6 @atom:f
@angle:br-s6-o @atom:br @atom:s6 @atom:o
@angle:c1-s6-c1 @atom:c1 @atom:s6 @atom:c1
@angle:c1-s6-o @atom:c1 @atom:s6 @atom:o
@angle:c2-s6-c2 @atom:c2 @atom:s6 @atom:c2
@angle:c2-s6-c3 @atom:c2 @atom:s6 @atom:c3
@angle:c2-s6-o @atom:c2 @atom:s6 @atom:o
@angle:c3-s6-c3 @atom:c3 @atom:s6 @atom:c3
@angle:c3-s6-ca @atom:c3 @atom:s6 @atom:ca
@angle:c3-s6-cy @atom:c3 @atom:s6 @atom:cy
@angle:c3-s6-f @atom:c3 @atom:s6 @atom:f
@angle:c3-s6-hs @atom:c3 @atom:s6 @atom:hs
@angle:c3-s6-i @atom:c3 @atom:s6 @atom:i
@angle:c3-s6-n2 @atom:c3 @atom:s6 @atom:n2
@angle:c3-s6-n3 @atom:c3 @atom:s6 @atom:n3
@angle:c3-s6-n @atom:c3 @atom:s6 @atom:n
@angle:c3-s6-n4 @atom:c3 @atom:s6 @atom:n4
@angle:c3-s6-na @atom:c3 @atom:s6 @atom:na
@angle:c3-s6-nh @atom:c3 @atom:s6 @atom:nh
@angle:c3-s6-no @atom:c3 @atom:s6 @atom:no
@angle:c3-s6-o @atom:c3 @atom:s6 @atom:o
@angle:c3-s6-oh @atom:c3 @atom:s6 @atom:oh
@angle:c3-s6-os @atom:c3 @atom:s6 @atom:os
@angle:c3-s6-p2 @atom:c3 @atom:s6 @atom:p2
@angle:c3-s6-p3 @atom:c3 @atom:s6 @atom:p3
@angle:c3-s6-p4 @atom:c3 @atom:s6 @atom:p4
@angle:c3-s6-p5 @atom:c3 @atom:s6 @atom:p5
@angle:c3-s6-s4 @atom:c3 @atom:s6 @atom:s4
@angle:c3-s6-s @atom:c3 @atom:s6 @atom:s
@angle:c3-s6-s6 @atom:c3 @atom:s6 @atom:s6
@angle:c3-s6-sh @atom:c3 @atom:s6 @atom:sh
@angle:c3-s6-ss @atom:c3 @atom:s6 @atom:ss
@angle:ca-s6-ca @atom:ca @atom:s6 @atom:ca
@angle:ca-s6-o @atom:ca @atom:s6 @atom:o
@angle:c-s6-c3 @atom:c @atom:s6 @atom:c3
@angle:c-s6-c @atom:c @atom:s6 @atom:c
@angle:cc-s6-o @atom:cc @atom:s6 @atom:o
@angle:cl-s6-cl @atom:cl @atom:s6 @atom:cl
@angle:cl-s6-f @atom:cl @atom:s6 @atom:f
@angle:cl-s6-o @atom:cl @atom:s6 @atom:o
@angle:c-s6-o @atom:c @atom:s6 @atom:o
@angle:c-s6-os @atom:c @atom:s6 @atom:os
@angle:cx-s6-cx @atom:cx @atom:s6 @atom:cx
@angle:cy-s6-o @atom:cy @atom:s6 @atom:o
@angle:f-s6-f @atom:f @atom:s6 @atom:f
@angle:f-s6-o @atom:f @atom:s6 @atom:o
@angle:hs-s6-hs @atom:hs @atom:s6 @atom:hs
@angle:hs-s6-n1 @atom:hs @atom:s6 @atom:n1
@angle:hs-s6-o @atom:hs @atom:s6 @atom:o
@angle:i-s6-i @atom:i @atom:s6 @atom:i
@angle:i-s6-o @atom:i @atom:s6 @atom:o
@angle:n1-s6-n1 @atom:n1 @atom:s6 @atom:n1
@angle:n1-s6-o @atom:n1 @atom:s6 @atom:o
@angle:n2-s6-n2 @atom:n2 @atom:s6 @atom:n2
@angle:n2-s6-o @atom:n2 @atom:s6 @atom:o
@angle:n2-s6-oh @atom:n2 @atom:s6 @atom:oh
@angle:n2-s6-os @atom:n2 @atom:s6 @atom:os
@angle:n3-s6-n3 @atom:n3 @atom:s6 @atom:n3
@angle:n3-s6-o @atom:n3 @atom:s6 @atom:o
@angle:n3-s6-os @atom:n3 @atom:s6 @atom:os
@angle:n4-s6-n4 @atom:n4 @atom:s6 @atom:n4
@angle:n4-s6-o @atom:n4 @atom:s6 @atom:o
@angle:na-s6-na @atom:na @atom:s6 @atom:na
@angle:na-s6-o @atom:na @atom:s6 @atom:o
@angle:nh-s6-nh @atom:nh @atom:s6 @atom:nh
@angle:nh-s6-o @atom:nh @atom:s6 @atom:o
@angle:n-s6-n @atom:n @atom:s6 @atom:n
@angle:n-s6-o @atom:n @atom:s6 @atom:o
@angle:no-s6-no @atom:no @atom:s6 @atom:no
@angle:no-s6-o @atom:no @atom:s6 @atom:o
@angle:n-s6-os @atom:n @atom:s6 @atom:os
@angle:oh-s6-oh @atom:oh @atom:s6 @atom:oh
@angle:oh-s6-os @atom:oh @atom:s6 @atom:os
@angle:oh-s6-p2 @atom:oh @atom:s6 @atom:p2
@angle:o-s6-o @atom:o @atom:s6 @atom:o
@angle:o-s6-oh @atom:o @atom:s6 @atom:oh
@angle:o-s6-os @atom:o @atom:s6 @atom:os
@angle:o-s6-p2 @atom:o @atom:s6 @atom:p2
@angle:o-s6-p3 @atom:o @atom:s6 @atom:p3
@angle:o-s6-p4 @atom:o @atom:s6 @atom:p4
@angle:o-s6-p5 @atom:o @atom:s6 @atom:p5
@angle:o-s6-s4 @atom:o @atom:s6 @atom:s4
@angle:o-s6-s @atom:o @atom:s6 @atom:s
@angle:o-s6-s6 @atom:o @atom:s6 @atom:s6
@angle:o-s6-sh @atom:o @atom:s6 @atom:sh
@angle:os-s6-os @atom:os @atom:s6 @atom:os
@angle:o-s6-ss @atom:o @atom:s6 @atom:ss
@angle:p3-s6-p3 @atom:p3 @atom:s6 @atom:p3
@angle:p5-s6-p5 @atom:p5 @atom:s6 @atom:p5
@angle:s4-s6-s4 @atom:s4 @atom:s6 @atom:s4
@angle:s4-s6-s6 @atom:s4 @atom:s6 @atom:s6
@angle:s6-s6-s6 @atom:s6 @atom:s6 @atom:s6
@angle:sh-s6-sh @atom:sh @atom:s6 @atom:sh
@angle:sh-s6-ss @atom:sh @atom:s6 @atom:ss
@angle:s-s6-s @atom:s @atom:s6 @atom:s
@angle:ss-s6-ss @atom:ss @atom:s6 @atom:ss
@angle:br-sh-hs @atom:br @atom:sh @atom:hs
@angle:c1-sh-hs @atom:c1 @atom:sh @atom:hs
@angle:c2-sh-hs @atom:c2 @atom:sh @atom:hs
@angle:c3-sh-hs @atom:c3 @atom:sh @atom:hs
@angle:ca-sh-hs @atom:ca @atom:sh @atom:hs
@angle:cc-sh-hs @atom:cc @atom:sh @atom:hs
@angle:c-sh-hs @atom:c @atom:sh @atom:hs
@angle:f-sh-hs @atom:f @atom:sh @atom:hs
@angle:hs-sh-hs @atom:hs @atom:sh @atom:hs
@angle:hs-sh-i @atom:hs @atom:sh @atom:i
@angle:hs-sh-n1 @atom:hs @atom:sh @atom:n1
@angle:hs-sh-n2 @atom:hs @atom:sh @atom:n2
@angle:hs-sh-n @atom:hs @atom:sh @atom:n
@angle:hs-sh-n3 @atom:hs @atom:sh @atom:n3
@angle:hs-sh-n4 @atom:hs @atom:sh @atom:n4
@angle:hs-sh-na @atom:hs @atom:sh @atom:na
@angle:hs-sh-nh @atom:hs @atom:sh @atom:nh
@angle:hs-sh-no @atom:hs @atom:sh @atom:no
@angle:hs-sh-o @atom:hs @atom:sh @atom:o
@angle:hs-sh-oh @atom:hs @atom:sh @atom:oh
@angle:hs-sh-os @atom:hs @atom:sh @atom:os
@angle:hs-sh-p2 @atom:hs @atom:sh @atom:p2
@angle:hs-sh-p3 @atom:hs @atom:sh @atom:p3
@angle:hs-sh-p4 @atom:hs @atom:sh @atom:p4
@angle:hs-sh-p5 @atom:hs @atom:sh @atom:p5
@angle:hs-sh-s @atom:hs @atom:sh @atom:s
@angle:hs-sh-s4 @atom:hs @atom:sh @atom:s4
@angle:hs-sh-s6 @atom:hs @atom:sh @atom:s6
@angle:hs-sh-sh @atom:hs @atom:sh @atom:sh
@angle:hs-sh-ss @atom:hs @atom:sh @atom:ss
@angle:br-ss-br @atom:br @atom:ss @atom:br
@angle:br-ss-c3 @atom:br @atom:ss @atom:c3
@angle:c1-ss-c1 @atom:c1 @atom:ss @atom:c1
@angle:c1-ss-c3 @atom:c1 @atom:ss @atom:c3
@angle:c2-ss-c2 @atom:c2 @atom:ss @atom:c2
@angle:c2-ss-c3 @atom:c2 @atom:ss @atom:c3
@angle:c2-ss-cy @atom:c2 @atom:ss @atom:cy
@angle:c2-ss-n2 @atom:c2 @atom:ss @atom:n2
@angle:c2-ss-na @atom:c2 @atom:ss @atom:na
@angle:c2-ss-os @atom:c2 @atom:ss @atom:os
@angle:c2-ss-ss @atom:c2 @atom:ss @atom:ss
@angle:c3-ss-c3 @atom:c3 @atom:ss @atom:c3
@angle:c3-ss-ca @atom:c3 @atom:ss @atom:ca
@angle:c3-ss-cc @atom:c3 @atom:ss @atom:cc
@angle:c3-ss-cd @atom:c3 @atom:ss @atom:cd
@angle:c3-ss-cl @atom:c3 @atom:ss @atom:cl
@angle:c3-ss-cy @atom:c3 @atom:ss @atom:cy
@angle:c3-ss-f @atom:c3 @atom:ss @atom:f
@angle:c3-ss-i @atom:c3 @atom:ss @atom:i
@angle:c3-ss-n1 @atom:c3 @atom:ss @atom:n1
@angle:c3-ss-n2 @atom:c3 @atom:ss @atom:n2
@angle:c3-ss-n3 @atom:c3 @atom:ss @atom:n3
@angle:c3-ss-n @atom:c3 @atom:ss @atom:n
@angle:c3-ss-n4 @atom:c3 @atom:ss @atom:n4
@angle:c3-ss-na @atom:c3 @atom:ss @atom:na
@angle:c3-ss-nh @atom:c3 @atom:ss @atom:nh
@angle:c3-ss-no @atom:c3 @atom:ss @atom:no
@angle:c3-ss-o @atom:c3 @atom:ss @atom:o
@angle:c3-ss-oh @atom:c3 @atom:ss @atom:oh
@angle:c3-ss-os @atom:c3 @atom:ss @atom:os
@angle:c3-ss-p2 @atom:c3 @atom:ss @atom:p2
@angle:c3-ss-p3 @atom:c3 @atom:ss @atom:p3
@angle:c3-ss-p4 @atom:c3 @atom:ss @atom:p4
@angle:c3-ss-p5 @atom:c3 @atom:ss @atom:p5
@angle:c3-ss-s4 @atom:c3 @atom:ss @atom:s4
@angle:c3-ss-s @atom:c3 @atom:ss @atom:s
@angle:c3-ss-s6 @atom:c3 @atom:ss @atom:s6
@angle:c3-ss-sh @atom:c3 @atom:ss @atom:sh
@angle:c3-ss-ss @atom:c3 @atom:ss @atom:ss
@angle:ca-ss-ca @atom:ca @atom:ss @atom:ca
@angle:ca-ss-cc @atom:ca @atom:ss @atom:cc
@angle:ca-ss-cd @atom:ca @atom:ss @atom:cd
@angle:ca-ss-cl @atom:ca @atom:ss @atom:cl
@angle:ca-ss-n @atom:ca @atom:ss @atom:n
@angle:ca-ss-na @atom:ca @atom:ss @atom:na
@angle:ca-ss-nc @atom:ca @atom:ss @atom:nc
@angle:ca-ss-nd @atom:ca @atom:ss @atom:nd
@angle:ca-ss-ss @atom:ca @atom:ss @atom:ss
@angle:c-ss-c2 @atom:c @atom:ss @atom:c2
@angle:c-ss-c3 @atom:c @atom:ss @atom:c3
@angle:c-ss-c @atom:c @atom:ss @atom:c
@angle:c-ss-cc @atom:c @atom:ss @atom:cc
@angle:cc-ss-cc @atom:cc @atom:ss @atom:cc
@angle:cc-ss-cd @atom:cc @atom:ss @atom:cd
@angle:cc-ss-n @atom:cc @atom:ss @atom:n
@angle:cc-ss-na @atom:cc @atom:ss @atom:na
@angle:cc-ss-nc @atom:cc @atom:ss @atom:nc
@angle:cc-ss-os @atom:cc @atom:ss @atom:os
@angle:cc-ss-ss @atom:cc @atom:ss @atom:ss
@angle:cd-ss-cd @atom:cd @atom:ss @atom:cd
@angle:cd-ss-n @atom:cd @atom:ss @atom:n
@angle:cd-ss-na @atom:cd @atom:ss @atom:na
@angle:cd-ss-nd @atom:cd @atom:ss @atom:nd
@angle:cd-ss-os @atom:cd @atom:ss @atom:os
@angle:cd-ss-ss @atom:cd @atom:ss @atom:ss
@angle:cl-ss-cl @atom:cl @atom:ss @atom:cl
@angle:cx-ss-cx @atom:cx @atom:ss @atom:cx
@angle:f-ss-f @atom:f @atom:ss @atom:f
@angle:f-ss-ss @atom:f @atom:ss @atom:ss
@angle:i-ss-i @atom:i @atom:ss @atom:i
@angle:n1-ss-n1 @atom:n1 @atom:ss @atom:n1
@angle:n2-ss-n2 @atom:n2 @atom:ss @atom:n2
@angle:n3-ss-n3 @atom:n3 @atom:ss @atom:n3
@angle:n4-ss-n4 @atom:n4 @atom:ss @atom:n4
@angle:na-ss-na @atom:na @atom:ss @atom:na
@angle:nc-ss-nc @atom:nc @atom:ss @atom:nc
@angle:nd-ss-nd @atom:nd @atom:ss @atom:nd
@angle:nh-ss-nh @atom:nh @atom:ss @atom:nh
@angle:n-ss-n @atom:n @atom:ss @atom:n
@angle:no-ss-no @atom:no @atom:ss @atom:no
@angle:oh-ss-oh @atom:oh @atom:ss @atom:oh
@angle:o-ss-o @atom:o @atom:ss @atom:o
@angle:o-ss-p5 @atom:o @atom:ss @atom:p5
@angle:o-ss-s6 @atom:o @atom:ss @atom:s6
@angle:os-ss-os @atom:os @atom:ss @atom:os
@angle:o-ss-ss @atom:o @atom:ss @atom:ss
@angle:p2-ss-p2 @atom:p2 @atom:ss @atom:p2
@angle:p3-ss-p3 @atom:p3 @atom:ss @atom:p3
@angle:p5-ss-p5 @atom:p5 @atom:ss @atom:p5
@angle:s4-ss-s4 @atom:s4 @atom:ss @atom:s4
@angle:s4-ss-s6 @atom:s4 @atom:ss @atom:s6
@angle:s6-ss-s6 @atom:s6 @atom:ss @atom:s6
@angle:sh-ss-sh @atom:sh @atom:ss @atom:sh
@angle:sh-ss-ss @atom:sh @atom:ss @atom:ss
@angle:s-ss-s @atom:s @atom:ss @atom:s
@angle:ss-ss-ss @atom:ss @atom:ss @atom:ss
@angle:c3-sx-ca @atom:c3 @atom:sx @atom:ca
@angle:c3-sx-cc @atom:c3 @atom:sx @atom:cc
@angle:c3-sx-ce @atom:c3 @atom:sx @atom:ce
@angle:c3-sx-cf @atom:c3 @atom:sx @atom:cf
@angle:c3-sx-ne @atom:c3 @atom:sx @atom:ne
@angle:c3-sx-nf @atom:c3 @atom:sx @atom:nf
@angle:c3-sx-o @atom:c3 @atom:sx @atom:o
@angle:c3-sx-pe @atom:c3 @atom:sx @atom:pe
@angle:c3-sx-pf @atom:c3 @atom:sx @atom:pf
@angle:c3-sx-px @atom:c3 @atom:sx @atom:px
@angle:c3-sx-py @atom:c3 @atom:sx @atom:py
@angle:c3-sx-sx @atom:c3 @atom:sx @atom:sx
@angle:c3-sx-sy @atom:c3 @atom:sx @atom:sy
@angle:ca-sx-ca @atom:ca @atom:sx @atom:ca
@angle:ca-sx-o @atom:ca @atom:sx @atom:o
@angle:c-sx-c3 @atom:c @atom:sx @atom:c3
@angle:c-sx-c @atom:c @atom:sx @atom:c
@angle:cc-sx-o @atom:cc @atom:sx @atom:o
@angle:ce-sx-ce @atom:ce @atom:sx @atom:ce
@angle:ce-sx-o @atom:ce @atom:sx @atom:o
@angle:cf-sx-cf @atom:cf @atom:sx @atom:cf
@angle:cf-sx-o @atom:cf @atom:sx @atom:o
@angle:c-sx-o @atom:c @atom:sx @atom:o
@angle:ne-sx-ne @atom:ne @atom:sx @atom:ne
@angle:ne-sx-o @atom:ne @atom:sx @atom:o
@angle:nf-sx-nf @atom:nf @atom:sx @atom:nf
@angle:nf-sx-o @atom:nf @atom:sx @atom:o
@angle:o-sx-pe @atom:o @atom:sx @atom:pe
@angle:o-sx-pf @atom:o @atom:sx @atom:pf
@angle:o-sx-px @atom:o @atom:sx @atom:px
@angle:o-sx-py @atom:o @atom:sx @atom:py
@angle:o-sx-sx @atom:o @atom:sx @atom:sx
@angle:o-sx-sy @atom:o @atom:sx @atom:sy
@angle:pe-sx-pe @atom:pe @atom:sx @atom:pe
@angle:pf-sx-pf @atom:pf @atom:sx @atom:pf
@angle:py-sx-py @atom:py @atom:sx @atom:py
@angle:sx-sx-sx @atom:sx @atom:sx @atom:sx
@angle:sy-sx-sy @atom:sy @atom:sx @atom:sy
@angle:c3-sy-ca @atom:c3 @atom:sy @atom:ca
@angle:c3-sy-cc @atom:c3 @atom:sy @atom:cc
@angle:c3-sy-ce @atom:c3 @atom:sy @atom:ce
@angle:c3-sy-cf @atom:c3 @atom:sy @atom:cf
@angle:c3-sy-ne @atom:c3 @atom:sy @atom:ne
@angle:c3-sy-nf @atom:c3 @atom:sy @atom:nf
@angle:c3-sy-o @atom:c3 @atom:sy @atom:o
@angle:c3-sy-pe @atom:c3 @atom:sy @atom:pe
@angle:c3-sy-pf @atom:c3 @atom:sy @atom:pf
@angle:c3-sy-px @atom:c3 @atom:sy @atom:px
@angle:c3-sy-py @atom:c3 @atom:sy @atom:py
@angle:c3-sy-sx @atom:c3 @atom:sy @atom:sx
@angle:c3-sy-sy @atom:c3 @atom:sy @atom:sy
@angle:ca-sy-ca @atom:ca @atom:sy @atom:ca
@angle:ca-sy-cc @atom:ca @atom:sy @atom:cc
@angle:ca-sy-n3 @atom:ca @atom:sy @atom:n3
@angle:ca-sy-n @atom:ca @atom:sy @atom:n
@angle:ca-sy-ne @atom:ca @atom:sy @atom:ne
@angle:ca-sy-nh @atom:ca @atom:sy @atom:nh
@angle:ca-sy-o @atom:ca @atom:sy @atom:o
@angle:ca-sy-oh @atom:ca @atom:sy @atom:oh
@angle:ca-sy-os @atom:ca @atom:sy @atom:os
@angle:c-sy-c3 @atom:c @atom:sy @atom:c3
@angle:c-sy-c @atom:c @atom:sy @atom:c
@angle:cc-sy-n3 @atom:cc @atom:sy @atom:n3
@angle:cc-sy-o @atom:cc @atom:sy @atom:o
@angle:cd-sy-n3 @atom:cd @atom:sy @atom:n3
@angle:cd-sy-nh @atom:cd @atom:sy @atom:nh
@angle:cd-sy-o @atom:cd @atom:sy @atom:o
@angle:ce-sy-ce @atom:ce @atom:sy @atom:ce
@angle:ce-sy-o @atom:ce @atom:sy @atom:o
@angle:cf-sy-cf @atom:cf @atom:sy @atom:cf
@angle:cf-sy-o @atom:cf @atom:sy @atom:o
@angle:c-sy-o @atom:c @atom:sy @atom:o
@angle:f-sy-o @atom:f @atom:sy @atom:o
@angle:n2-sy-o @atom:n2 @atom:sy @atom:o
@angle:n3-sy-ne @atom:n3 @atom:sy @atom:ne
@angle:n3-sy-o @atom:n3 @atom:sy @atom:o
@angle:na-sy-na @atom:na @atom:sy @atom:na
@angle:nc-sy-nc @atom:nc @atom:sy @atom:nc
@angle:nd-sy-nd @atom:nd @atom:sy @atom:nd
@angle:ne-sy-ne @atom:ne @atom:sy @atom:ne
@angle:ne-sy-o @atom:ne @atom:sy @atom:o
@angle:nf-sy-nf @atom:nf @atom:sy @atom:nf
@angle:nf-sy-o @atom:nf @atom:sy @atom:o
@angle:nh-sy-o @atom:nh @atom:sy @atom:o
@angle:n-sy-o @atom:n @atom:sy @atom:o
@angle:o-sy-o @atom:o @atom:sy @atom:o
@angle:o-sy-oh @atom:o @atom:sy @atom:oh
@angle:o-sy-os @atom:o @atom:sy @atom:os
@angle:o-sy-pe @atom:o @atom:sy @atom:pe
@angle:o-sy-pf @atom:o @atom:sy @atom:pf
@angle:o-sy-px @atom:o @atom:sy @atom:px
@angle:o-sy-py @atom:o @atom:sy @atom:py
@angle:o-sy-sx @atom:o @atom:sy @atom:sx
@angle:o-sy-sy @atom:o @atom:sy @atom:sy
@angle:py-sy-py @atom:py @atom:sy @atom:py
@angle:sx-sy-sx @atom:sx @atom:sy @atom:sx
@angle:sy-sy-sy @atom:sy @atom:sy @atom:sy
@angle:c2-c1-cf @atom:c2 @atom:c1 @atom:cf
@angle:c3-c1-ch @atom:c3 @atom:c1 @atom:ch
@angle:nf-c1-s @atom:nf @atom:c1 @atom:s
@angle:br-c2-cf @atom:br @atom:c2 @atom:cf
@angle:cd-c2-h4 @atom:cd @atom:c2 @atom:h4
@angle:cd-c2-nh @atom:cd @atom:c2 @atom:nh
@angle:cd-c2-o @atom:cd @atom:c2 @atom:o
@angle:cf-c2-cl @atom:cf @atom:c2 @atom:cl
@angle:cf-c2-h4 @atom:cf @atom:c2 @atom:h4
@angle:cf-c2-na @atom:cf @atom:c2 @atom:na
@angle:cf-c2-nh @atom:cf @atom:c2 @atom:nh
@angle:cf-c2-no @atom:cf @atom:c2 @atom:no
@angle:cf-c2-o @atom:cf @atom:c2 @atom:o
@angle:cf-c2-oh @atom:cf @atom:c2 @atom:oh
@angle:cf-c2-os @atom:cf @atom:c2 @atom:os
@angle:h4-c2-nf @atom:h4 @atom:c2 @atom:nf
@angle:h5-c2-nf @atom:h5 @atom:c2 @atom:nf
@angle:nf-c2-os @atom:nf @atom:c2 @atom:os
@angle:nf-c2-ss @atom:nf @atom:c2 @atom:ss
@angle:n-c2-nf @atom:n @atom:c2 @atom:nf
@angle:ca-c3-cf @atom:ca @atom:c3 @atom:cf
@angle:cd-c3-cx @atom:cd @atom:c3 @atom:cx
@angle:c-c3-cf @atom:c @atom:c3 @atom:cf
@angle:cd-c3-hx @atom:cd @atom:c3 @atom:hx
@angle:cd-c3-n2 @atom:cd @atom:c3 @atom:n2
@angle:cd-c3-n4 @atom:cd @atom:c3 @atom:n4
@angle:cd-c3-na @atom:cd @atom:c3 @atom:na
@angle:cd-c3-p5 @atom:cd @atom:c3 @atom:p5
@angle:cf-c3-cf @atom:cf @atom:c3 @atom:cf
@angle:cf-c3-n @atom:cf @atom:c3 @atom:n
@angle:cf-c3-oh @atom:cf @atom:c3 @atom:oh
@angle:cf-c3-os @atom:cf @atom:c3 @atom:os
@angle:cf-c3-ss @atom:cf @atom:c3 @atom:ss
@angle:cd-ca-cq @atom:cd @atom:ca @atom:cq
@angle:cf-ca-na @atom:cf @atom:ca @atom:na
@angle:ch-ca-cq @atom:ch @atom:ca @atom:cq
@angle:cl-ca-cq @atom:cl @atom:ca @atom:cq
@angle:cq-ca-f @atom:cq @atom:ca @atom:f
@angle:cq-ca-h4 @atom:cq @atom:ca @atom:h4
@angle:cq-ca-na @atom:cq @atom:ca @atom:na
@angle:cq-ca-nb @atom:cq @atom:ca @atom:nb
@angle:cq-ca-nh @atom:cq @atom:ca @atom:nh
@angle:cq-ca-oh @atom:cq @atom:ca @atom:oh
@angle:cq-ca-ss @atom:cq @atom:ca @atom:ss
@angle:ca-c-nf @atom:ca @atom:c @atom:nf
@angle:br-cd-c @atom:br @atom:cd @atom:c
@angle:br-cd-cd @atom:br @atom:cd @atom:cd
@angle:br-cd-cc @atom:br @atom:cd @atom:cc
@angle:br-cd-na @atom:br @atom:cd @atom:na
@angle:ca-cd-cf @atom:ca @atom:cd @atom:cf
@angle:ca-cd-nh @atom:ca @atom:cd @atom:nh
@angle:cd-c-cf @atom:cd @atom:c @atom:cf
@angle:cd-cd-f @atom:cd @atom:cd @atom:f
@angle:c-cd-ch @atom:c @atom:cd @atom:ch
@angle:cd-cd-sy @atom:cd @atom:cd @atom:sy
@angle:cc-cd-f @atom:cc @atom:cd @atom:f
@angle:cc-cd-no @atom:cc @atom:cd @atom:no
@angle:c-cd-f @atom:c @atom:cd @atom:f
@angle:ch-cd-na @atom:ch @atom:cd @atom:na
@angle:ch-cd-ss @atom:ch @atom:cd @atom:ss
@angle:cd-c-h4 @atom:cd @atom:c @atom:h4
@angle:cl-cd-na @atom:cl @atom:cd @atom:na
@angle:cl-cd-ss @atom:cl @atom:cd @atom:ss
@angle:c-cd-nf @atom:c @atom:cd @atom:nf
@angle:cd-c-s @atom:cd @atom:c @atom:s
@angle:cd-c-ss @atom:cd @atom:c @atom:ss
@angle:cx-cd-nc @atom:cx @atom:cd @atom:nc
@angle:cx-cd-os @atom:cx @atom:cd @atom:os
@angle:cc-c-cx @atom:cc @atom:c @atom:cx
@angle:cc-c-nc @atom:cc @atom:c @atom:nc
@angle:cf-c-cx @atom:cf @atom:c @atom:cx
@angle:cf-c-h4 @atom:cf @atom:c @atom:h4
@angle:cf-c-ss @atom:cf @atom:c @atom:ss
@angle:na-cd-no @atom:na @atom:cd @atom:no
@angle:na-cd-oh @atom:na @atom:cd @atom:oh
@angle:na-cd-sx @atom:na @atom:cd @atom:sx
@angle:na-cd-sy @atom:na @atom:cd @atom:sy
@angle:nd-cd-no @atom:nd @atom:cd @atom:no
@angle:nc-cd-nc @atom:nc @atom:cd @atom:nc
@angle:nc-cd-nf @atom:nc @atom:cd @atom:nf
@angle:nc-cd-no @atom:nc @atom:cd @atom:no
@angle:nc-cd-sh @atom:nc @atom:cd @atom:sh
@angle:nc-cd-sx @atom:nc @atom:cd @atom:sx
@angle:nc-cd-sy @atom:nc @atom:cd @atom:sy
@angle:nf-cd-ss @atom:nf @atom:cd @atom:ss
@angle:n-cd-n2 @atom:n @atom:cd @atom:n2
@angle:no-cd-os @atom:no @atom:cd @atom:os
@angle:no-cd-ss @atom:no @atom:cd @atom:ss
@angle:ca-cc-cf @atom:ca @atom:cc @atom:cf
@angle:ca-cc-na @atom:ca @atom:cc @atom:na
@angle:cd-cc-cg @atom:cd @atom:cc @atom:cg
@angle:cd-cc-cy @atom:cd @atom:cc @atom:cy
@angle:cd-cc-nd @atom:cd @atom:cc @atom:nd
@angle:cc-cc-cy @atom:cc @atom:cc @atom:cy
@angle:cf-cc-nc @atom:cf @atom:cc @atom:nc
@angle:c-cc-h4 @atom:c @atom:cc @atom:h4
@angle:na-cc-nh @atom:na @atom:cc @atom:nh
@angle:na-cc-ss @atom:na @atom:cc @atom:ss
@angle:nc-cc-nc @atom:nc @atom:cc @atom:nc
@angle:oh-cc-os @atom:oh @atom:cc @atom:os
@angle:c2-cf-cl @atom:c2 @atom:cf @atom:cl
@angle:c2-cf-h4 @atom:c2 @atom:cf @atom:h4
@angle:c2-cf-n1 @atom:c2 @atom:cf @atom:n1
@angle:c2-cf-na @atom:c2 @atom:cf @atom:na
@angle:c2-cf-oh @atom:c2 @atom:cf @atom:oh
@angle:c3-cf-ch @atom:c3 @atom:cf @atom:ch
@angle:c3-cf-ne @atom:c3 @atom:cf @atom:ne
@angle:c3-cf-nh @atom:c3 @atom:cf @atom:nh
@angle:ca-cf-cf @atom:ca @atom:cf @atom:cf
@angle:ca-cf-cl @atom:ca @atom:cf @atom:cl
@angle:ca-cf-h4 @atom:ca @atom:cf @atom:h4
@angle:ca-cf-nh @atom:ca @atom:cf @atom:nh
@angle:ca-cf-os @atom:ca @atom:cf @atom:os
@angle:ca-cf-ss @atom:ca @atom:cf @atom:ss
@angle:c-cf-ca @atom:c @atom:cf @atom:ca
@angle:cd-cf-cc @atom:cd @atom:cf @atom:cc
@angle:c-cf-cf @atom:c @atom:cf @atom:cf
@angle:c-cf-ch @atom:c @atom:cf @atom:ch
@angle:cd-cf-h4 @atom:cd @atom:cf @atom:h4
@angle:c-cf-cl @atom:c @atom:cf @atom:cl
@angle:cd-cf-nh @atom:cd @atom:cf @atom:nh
@angle:c-cf-cy @atom:c @atom:cf @atom:cy
@angle:cf-cf-cl @atom:cf @atom:cf @atom:cl
@angle:cf-cf-oh @atom:cf @atom:cf @atom:oh
@angle:ce-cf-cy @atom:ce @atom:cf @atom:cy
@angle:ce-cf-h4 @atom:ce @atom:cf @atom:h4
@angle:ce-cf-n1 @atom:ce @atom:cf @atom:n1
@angle:ce-cf-nh @atom:ce @atom:cf @atom:nh
@angle:ch-cf-n2 @atom:ch @atom:cf @atom:n2
@angle:c-cf-oh @atom:c @atom:cf @atom:oh
@angle:c-cf-os @atom:c @atom:cf @atom:os
@angle:h4-cf-n1 @atom:h4 @atom:cf @atom:n1
@angle:h4-cf-nf @atom:h4 @atom:cf @atom:nf
@angle:n2-cf-os @atom:n2 @atom:cf @atom:os
@angle:n2-cf-ss @atom:n2 @atom:cf @atom:ss
@angle:nf-cf-nh @atom:nf @atom:cf @atom:nh
@angle:ne-cf-nh @atom:ne @atom:cf @atom:nh
@angle:ca-ce-cd @atom:ca @atom:ce @atom:cd
@angle:c-ce-cc @atom:c @atom:ce @atom:cc
@angle:c-ce-n2 @atom:c @atom:ce @atom:n2
@angle:h4-ce-nf @atom:h4 @atom:ce @atom:nf
@angle:c1-ch-cd @atom:c1 @atom:ch @atom:cd
@angle:ch-cg-cg @atom:ch @atom:cg @atom:cg
@angle:n-c-nf @atom:n @atom:c @atom:nf
@angle:ca-cq-na @atom:ca @atom:cq @atom:na
@angle:nb-cq-nb @atom:nb @atom:cq @atom:nb
@angle:cd-cx-hc @atom:cd @atom:cx @atom:hc
@angle:cf-cy-h2 @atom:cf @atom:cy @atom:h2
@angle:cf-cy-n @atom:cf @atom:cy @atom:n
@angle:cf-cy-ss @atom:cf @atom:cy @atom:ss
@angle:cd-n2-na @atom:cd @atom:n2 @atom:na
@angle:cd-n2-nh @atom:cd @atom:n2 @atom:nh
@angle:c3-n4-cd @atom:c3 @atom:n4 @atom:cd
@angle:c3-na-cq @atom:c3 @atom:na @atom:cq
@angle:ca-na-cq @atom:ca @atom:na @atom:cq
@angle:cd-na-cf @atom:cd @atom:na @atom:cf
@angle:cq-nb-nb @atom:cq @atom:nb @atom:nb
@angle:c-n-cf @atom:c @atom:n @atom:cf
@angle:ca-nc-nd @atom:ca @atom:nc @atom:nd
@angle:c2-nf-ch @atom:c2 @atom:nf @atom:ch
@angle:c-nf-sy @atom:c @atom:nf @atom:sy
@angle:c3-nh-ce @atom:c3 @atom:nh @atom:ce
@angle:cd-nh-n2 @atom:cd @atom:nh @atom:n2
@angle:cd-nh-sy @atom:cd @atom:nh @atom:sy
@angle:cf-nh-sy @atom:cf @atom:nh @atom:sy
@angle:hn-n-nd @atom:hn @atom:n @atom:nd
@angle:cd-no-o @atom:cd @atom:no @atom:o
@angle:n3-py-nf @atom:n3 @atom:py @atom:nf
@angle:cd-s6-o @atom:cd @atom:s6 @atom:o
@angle:cd-sh-hs @atom:cd @atom:sh @atom:hs
@angle:c-ss-cd @atom:c @atom:ss @atom:cd
@angle:c3-sx-cd @atom:c3 @atom:sx @atom:cd
@angle:cd-sx-o @atom:cd @atom:sx @atom:o
@angle:c3-sy-cd @atom:c3 @atom:sy @atom:cd
@angle:ca-sy-cd @atom:ca @atom:sy @atom:cd
@angle:ca-sy-nf @atom:ca @atom:sy @atom:nf
@angle:cc-sy-nh @atom:cc @atom:sy @atom:nh
@angle:n3-sy-nf @atom:n3 @atom:sy @atom:nf
} # (end of Angles By Type)
write_once("In Settings") {
dihedral_coeff @dihedral:X-c-c-X fourier 1 0.3 2 180.0 #
dihedral_coeff @dihedral:X-c-c1-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c-cg-X fourier 1 0.0 2 180.0 # same as X-c-c1-X
dihedral_coeff @dihedral:X-c-ch-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c-c2-X fourier 1 2.175 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c-cu-X fourier 1 2.175 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c-cv-X fourier 1 2.175 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c-ce-X fourier 1 2.175 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c-cf-X fourier 1 2.175 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c-c3-X fourier 1 0.0 2 180.0 # JCC, 7, (1986), 230
dihedral_coeff @dihedral:X-c-cx-X fourier 1 0.0 2 180.0 # JCC, 7, (1986), 230
dihedral_coeff @dihedral:X-c-cy-X fourier 1 0.0 2 180.0 # JCC, 7, (1986), 230
dihedral_coeff @dihedral:X-c-ca-X fourier 1 1.0 2 180.0 # optimized by Junmei Wang, Jan-2013
dihedral_coeff @dihedral:X-c-cc-X fourier 1 2.875 2 180.0 # statistic value
dihedral_coeff @dihedral:X-c-cd-X fourier 1 2.875 2 180.0 # statistic value
dihedral_coeff @dihedral:X-c-n-X fourier 1 2.5 2 180.0 # AA,NMA (no c-n3, c-n4, c-nh)
dihedral_coeff @dihedral:X-c-n2-X fourier 1 4.15 2 180.0 # double bond, same as X-c2-n2-X
dihedral_coeff @dihedral:X-c-nc-X fourier 1 4.0 2 180.0 # same as X-C-NC-X
dihedral_coeff @dihedral:X-c-nd-X fourier 1 4.0 2 180.0 # same as X-C-NC-X
dihedral_coeff @dihedral:X-c-ne-X fourier 1 0.2 2 180.0 # single bond
dihedral_coeff @dihedral:X-c-nf-X fourier 1 0.2 2 180.0 # single bond
dihedral_coeff @dihedral:X-c-na-X fourier 2 1.45 2 180.0 0.35 4 180.0 #
dihedral_coeff @dihedral:X-c-no-X fourier 1 0.45 2 180.0 #
dihedral_coeff @dihedral:X-c-oh-X fourier 1 2.3 2 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:X-c-os-X fourier 1 2.7 2 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:X-c-p2-X fourier 1 6.65 2 180.0 # double bond, same as X-c2-p2-X
dihedral_coeff @dihedral:X-c-pc-X fourier 1 2.0 2 180.0 # estimated
dihedral_coeff @dihedral:X-c-pd-X fourier 1 2.0 2 180.0 # estimated
dihedral_coeff @dihedral:X-c-pe-X fourier 1 0.0 2 180.0 # single bond
dihedral_coeff @dihedral:X-c-pf-X fourier 1 0.0 2 180.0 # single bond
dihedral_coeff @dihedral:X-c-p3-X fourier 1 1.55 2 180.0 #
dihedral_coeff @dihedral:X-c-p4-X fourier 1 1.35 2 180.0 #
dihedral_coeff @dihedral:X-c-px-X fourier 1 1.35 2 180.0 #
dihedral_coeff @dihedral:X-c-p5-X fourier 1 1.0 2 0.0 #
dihedral_coeff @dihedral:X-c-py-X fourier 1 1.0 2 0.0 #
dihedral_coeff @dihedral:X-c-sh-X fourier 1 2.25 2 180.0 #
dihedral_coeff @dihedral:X-c-ss-X fourier 1 3.1 2 180.0 #
dihedral_coeff @dihedral:X-c-s4-X fourier 1 0.2 2 180.0 #
dihedral_coeff @dihedral:X-c-sx-X fourier 1 0.2 2 180.0 #
dihedral_coeff @dihedral:X-c-s6-X fourier 1 0.5 2 0.0 #
dihedral_coeff @dihedral:X-c-sy-X fourier 1 0.5 2 0.0 #
dihedral_coeff @dihedral:X-c1-c1-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-c1-cg-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-c1-ch-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-cg-cg-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-ch-ch-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-cg-ch-X fourier 1 0.0 2 180.0 # for both triple and single bonds
dihedral_coeff @dihedral:X-c1-c2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-c3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-ca-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-ce-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cu-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cv-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cx-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-cy-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-n-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-n2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-n3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-n4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-na-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-nb-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-nc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-nd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-ne-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-nf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-nh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-no-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-oh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-os-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-p2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-pb-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-pc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-pd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-pe-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-pf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-p3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-p4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-px-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-p5-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-py-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-s2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-sh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-ss-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-s4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-sx-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-s6-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c1-sy-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-c2-c2-X fourier 1 6.65 2 180.0 # c2=c2 double bond, intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c2-ce-X fourier 1 6.65 2 180.0 # c2=c2 double bond, intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-c2-cf-X fourier 1 6.65 2 180.0 # c2=c2 double bond, intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-ce-cf-X fourier 1 6.65 2 180.0 # c2=c2 double bond, intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-ce-ce-X fourier 1 1.0 2 180.0 # c2-c2 single bond, parm99
dihedral_coeff @dihedral:X-cf-cf-X fourier 1 1.0 2 180.0 # c2-c2 single bond, parm99
dihedral_coeff @dihedral:X-cc-cd-X fourier 1 4.0 2 180.0 # statistic value of parm94
dihedral_coeff @dihedral:X-cc-cc-X fourier 1 4.0 2 180.0 # statistic value of parm94
dihedral_coeff @dihedral:X-cd-cd-X fourier 1 4.0 2 180.0 # statistic value of parm94
dihedral_coeff @dihedral:X-c2-c3-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c2-ca-X fourier 1 0.7 2 180.0 # optimized by Junmei Wang, March 2013
dihedral_coeff @dihedral:X-c2-n-X fourier 1 0.65 2 180.0 #
dihedral_coeff @dihedral:X-c2-n2-X fourier 1 4.15 2 180.0 # double bond, parm99
dihedral_coeff @dihedral:X-c2-ne-X fourier 1 4.15 2 180.0 # double bond, parm99
dihedral_coeff @dihedral:X-c2-nf-X fourier 1 4.15 2 180.0 # double bond, parm99
dihedral_coeff @dihedral:X-ce-ne-X fourier 1 0.8 2 180.0 # single bond
dihedral_coeff @dihedral:X-cf-nf-X fourier 1 0.8 2 180.0 # single bond
dihedral_coeff @dihedral:X-c2-nc-X fourier 1 4.75 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-c2-nd-X fourier 1 4.75 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-cc-nd-X fourier 1 4.75 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-cd-nc-X fourier 1 4.75 2 180.0 # statistiv value from parm94
dihedral_coeff @dihedral:X-cc-nc-X fourier 1 4.75 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-cd-nd-X fourier 1 4.75 2 180.0 # statistiv value from parm94
dihedral_coeff @dihedral:X-c2-n3-X fourier 1 0.3 2 180.0 # intrpol.
dihedral_coeff @dihedral:X-c2-n4-X fourier 1 0.0 3 180.0 # intrpol.
dihedral_coeff @dihedral:X-c2-na-X fourier 1 0.625 2 180.0 #
dihedral_coeff @dihedral:X-cc-na-X fourier 1 1.7 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-cd-na-X fourier 1 1.7 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-c2-nh-X fourier 1 0.675 2 180.0 #
dihedral_coeff @dihedral:X-c2-no-X fourier 1 0.75 2 180.0 #
dihedral_coeff @dihedral:X-c2-oh-X fourier 1 1.05 2 180.0 # parm99
dihedral_coeff @dihedral:X-c2-os-X fourier 1 1.05 2 180.0 # parm99
dihedral_coeff @dihedral:X-c2-p2-X fourier 1 6.65 2 180.0 # double bond
dihedral_coeff @dihedral:X-c2-pe-X fourier 1 6.65 2 180.0 # double bond
dihedral_coeff @dihedral:X-c2-pf-X fourier 1 6.65 2 180.0 # double bond
dihedral_coeff @dihedral:X-ce-pf-X fourier 1 6.65 2 180.0 # double bond
dihedral_coeff @dihedral:X-ce-pe-X fourier 1 0.95 2 180.0 # single bond
dihedral_coeff @dihedral:X-cf-pf-X fourier 1 0.95 2 180.0 # single bond
dihedral_coeff @dihedral:X-c2-pc-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-c2-pd-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-cc-pc-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-cc-pd-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-cd-pc-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-cd-pd-X fourier 1 4.75 2 180.0 # estimated
dihedral_coeff @dihedral:X-c2-p3-X fourier 1 0.45 2 180.0 #
dihedral_coeff @dihedral:X-c2-p4-X fourier 1 6.65 2 180.0 # c2=p4 double bond !!!
dihedral_coeff @dihedral:X-ce-p4-X fourier 1 6.65 2 180.0 # c2=p4 double bond !!!
dihedral_coeff @dihedral:X-cf-p4-X fourier 1 6.65 2 180.0 # c2=p4 double bond !!!
dihedral_coeff @dihedral:X-c2-px-X fourier 1 0.325 2 0.0 #
dihedral_coeff @dihedral:X-ce-px-X fourier 1 0.325 2 0.0 #
dihedral_coeff @dihedral:X-cf-px-X fourier 1 0.325 2 0.0 #
dihedral_coeff @dihedral:X-c2-p5-X fourier 1 6.65 2 180.0 # c2=p5 double bond !!!
dihedral_coeff @dihedral:X-ce-p5-X fourier 1 6.65 2 180.0 # c2=p5 double bond !!!
dihedral_coeff @dihedral:X-cf-p5-X fourier 1 6.65 2 180.0 # c2=p5 double bond !!!
dihedral_coeff @dihedral:X-c2-py-X fourier 1 1.43333333333 2 180.0 #
dihedral_coeff @dihedral:X-ce-py-X fourier 1 1.43333333333 2 180.0 #
dihedral_coeff @dihedral:X-cf-py-X fourier 1 1.43333333333 2 180.0 #
dihedral_coeff @dihedral:X-c2-sh-X fourier 1 0.5 2 180.0 #
dihedral_coeff @dihedral:X-c2-ss-X fourier 1 1.1 2 180.0 #
dihedral_coeff @dihedral:X-c2-s4-X fourier 1 6.65 2 180.0 # c2=s4 double bond !!!
dihedral_coeff @dihedral:X-ce-s4-X fourier 1 6.65 2 180.0 # c2=s4 double bond !!!
dihedral_coeff @dihedral:X-cf-s4-X fourier 1 6.65 2 180.0 # c2=s4 double bond !!!
dihedral_coeff @dihedral:X-c2-sx-X fourier 1 0.6 2 0.0 #
dihedral_coeff @dihedral:X-ce-sx-X fourier 1 0.6 2 0.0 #
dihedral_coeff @dihedral:X-cf-sx-X fourier 1 0.6 2 0.0 #
dihedral_coeff @dihedral:X-c2-s6-X fourier 1 6.65 2 180.0 # c2=s6 double bond !!!
dihedral_coeff @dihedral:X-ce-s6-X fourier 1 6.65 2 180.0 # c2=s6 double bond !!!
dihedral_coeff @dihedral:X-cf-s6-X fourier 1 6.65 2 180.0 # c2=s6 double bond !!!
dihedral_coeff @dihedral:X-c2-sy-X fourier 1 1.26666666667 2 180.0 #
dihedral_coeff @dihedral:X-ce-sy-X fourier 1 1.26666666667 2 180.0 #
dihedral_coeff @dihedral:X-cf-sy-X fourier 1 1.26666666667 2 180.0 #
dihedral_coeff @dihedral:X-c3-c3-X fourier 1 0.155555555556 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-cx-cx-X fourier 1 0.155555555556 3 0.0 # same as X-c3-c3-X
dihedral_coeff @dihedral:X-cy-cy-X fourier 1 0.155555555556 3 0.0 # same as X-c3-c3-X
dihedral_coeff @dihedral:X-c3-ca-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-n-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-cx-n-X fourier 1 0.0 2 0.0 # same as X-c3-n-X
dihedral_coeff @dihedral:X-cy-n-X fourier 1 0.0 2 0.0 # same as X-c3-n-X
dihedral_coeff @dihedral:X-c3-n2-X fourier 1 0.0 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-ne-X fourier 1 0.0 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-nf-X fourier 1 0.0 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-n3-X fourier 1 0.3 3 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:X-c3-n4-X fourier 1 0.155555555556 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-na-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-nh-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-no-X fourier 1 0.0 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-oh-X fourier 1 0.166666666667 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-os-X fourier 1 0.383333333333 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-p2-X fourier 1 0.266666666667 2 180.0 #
dihedral_coeff @dihedral:X-c3-pe-X fourier 1 0.266666666667 2 180.0 #
dihedral_coeff @dihedral:X-c3-pf-X fourier 1 0.266666666667 2 180.0 #
dihedral_coeff @dihedral:X-c3-p3-X fourier 1 0.133333333333 3 0.0 #
dihedral_coeff @dihedral:X-c3-p4-X fourier 1 0.133333333333 3 0.0 #
dihedral_coeff @dihedral:X-c3-px-X fourier 1 0.133333333333 3 0.0 #
dihedral_coeff @dihedral:X-c3-p5-X fourier 1 0.0222222222222 3 0.0 #
dihedral_coeff @dihedral:X-c3-py-X fourier 1 0.0222222222222 3 0.0 #
dihedral_coeff @dihedral:X-c3-sh-X fourier 1 0.25 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-ss-X fourier 1 0.333333333333 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:X-c3-s4-X fourier 1 0.2 3 0.0 #
dihedral_coeff @dihedral:X-c3-sx-X fourier 1 0.2 3 0.0 #
dihedral_coeff @dihedral:X-c3-s6-X fourier 1 0.144444444444 3 0.0 #
dihedral_coeff @dihedral:X-c3-sy-X fourier 1 0.144444444444 3 0.0 #
dihedral_coeff @dihedral:X-c3-cc-X fourier 1 0.0 3 0.0 # same as X-c3-ca-X
dihedral_coeff @dihedral:X-c3-cd-X fourier 1 0.0 3 0.0 # same as X-c3-ca-X
dihedral_coeff @dihedral:X-ca-ca-X fourier 1 3.625 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-ca-cp-X fourier 1 3.625 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-ca-cq-X fourier 1 3.625 2 180.0 # intrpol.bsd.on C6H6
dihedral_coeff @dihedral:X-cp-cp-X fourier 1 1.0 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-cq-cq-X fourier 1 1.0 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-ca-n-X fourier 1 0.45 2 180.0 #
dihedral_coeff @dihedral:X-ca-n2-X fourier 1 0.0 3 180.0 #
dihedral_coeff @dihedral:X-ca-ne-X fourier 1 0.0 3 180.0 #
dihedral_coeff @dihedral:X-ca-nf-X fourier 1 0.0 3 180.0 #
dihedral_coeff @dihedral:X-ca-n4-X fourier 1 1.75 2 0.0 #
dihedral_coeff @dihedral:X-ca-na-X fourier 1 0.3 2 180.0 #
dihedral_coeff @dihedral:X-ca-nb-X fourier 1 4.8 2 180.0 # same as X-CA-NC-X
dihedral_coeff @dihedral:X-ca-nc-X fourier 1 4.8 2 180.0 # same as X-CA-NC-X
dihedral_coeff @dihedral:X-ca-nd-X fourier 1 4.8 2 180.0 # same as X-CA-NC-X
dihedral_coeff @dihedral:X-ca-nh-X fourier 1 1.05 2 180.0 #
dihedral_coeff @dihedral:X-cc-nh-X fourier 1 1.05 2 180.0 # same as X-ca-nh-X
dihedral_coeff @dihedral:X-cd-nh-X fourier 1 1.05 2 180.0 # same as X-ca-nh-X
dihedral_coeff @dihedral:X-ca-no-X fourier 1 0.6 2 180.0 #
dihedral_coeff @dihedral:X-ca-oh-X fourier 1 0.9 2 180.0 # Junmei et al, 99
dihedral_coeff @dihedral:X-ca-os-X fourier 1 0.9 2 180.0 # same as X-ca-oh-X
dihedral_coeff @dihedral:X-ca-p2-X fourier 1 0.6 2 180.0 #
dihedral_coeff @dihedral:X-ca-pe-X fourier 1 0.6 2 180.0 # same as X-ca-p2-X
dihedral_coeff @dihedral:X-ca-pf-X fourier 1 0.6 2 180.0 # same as X-ca-p2-X
dihedral_coeff @dihedral:X-ca-pc-X fourier 1 4.8 2 180.0 # estimated, intrpol
dihedral_coeff @dihedral:X-ca-pd-X fourier 1 4.8 2 180.0 # estimated, intrpol
dihedral_coeff @dihedral:X-ca-p3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-ca-p4-X fourier 1 0.525 2 180.0 #
dihedral_coeff @dihedral:X-ca-px-X fourier 1 0.525 2 180.0 # estimated, same as X-ca-p4-X
dihedral_coeff @dihedral:X-ca-p5-X fourier 1 1.46666666667 2 180.0 #
dihedral_coeff @dihedral:X-ca-py-X fourier 1 1.46666666667 2 180.0 # estimated, same as X-ca-p5-X
dihedral_coeff @dihedral:X-ca-sh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-ca-ss-X fourier 1 0.4 2 180.0 #
dihedral_coeff @dihedral:X-ca-s4-X fourier 1 0.3 2 0.0 #
dihedral_coeff @dihedral:X-ca-sx-X fourier 1 0.3 2 0.0 # estimated, same as X-ca-s4-X
dihedral_coeff @dihedral:X-ca-s6-X fourier 1 1.3 2 180.0 #
dihedral_coeff @dihedral:X-ca-sy-X fourier 1 1.3 2 180.0 # estimated, same as X-ca-s6-X
dihedral_coeff @dihedral:X-n-cc-X fourier 1 1.65 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-n-cd-X fourier 1 1.65 2 180.0 # statistic value from parm94
dihedral_coeff @dihedral:X-n-n-X fourier 1 1.15 2 0.0 #
dihedral_coeff @dihedral:X-n-n2-X fourier 1 0.4 2 0.0 #
dihedral_coeff @dihedral:X-n-ne-X fourier 1 0.4 2 0.0 #
dihedral_coeff @dihedral:X-n-nf-X fourier 1 0.4 2 0.0 #
dihedral_coeff @dihedral:X-n-n3-X fourier 1 1.075 2 0.0 #
dihedral_coeff @dihedral:X-n-n4-X fourier 1 0.95 2 0.0 #
dihedral_coeff @dihedral:X-n-na-X fourier 1 0.7 2 0.0 #
dihedral_coeff @dihedral:X-n-nc-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n-nd-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n-nh-X fourier 1 1.1 2 0.0 #
dihedral_coeff @dihedral:X-n-no-X fourier 1 1.375 2 180.0 #
dihedral_coeff @dihedral:X-n-oh-X fourier 1 1.5 2 0.0 #
dihedral_coeff @dihedral:X-n-os-X fourier 1 1.1 2 0.0 #
dihedral_coeff @dihedral:X-n-p2-X fourier 1 1.0 2 180.0 #
dihedral_coeff @dihedral:X-n-pe-X fourier 1 1.0 2 180.0 #
dihedral_coeff @dihedral:X-n-pf-X fourier 1 1.0 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n-pc-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n-pd-X fourier 1 4.8 2 180.0 #
dihedral_coeff @dihedral:X-n-p3-X fourier 1 2.25 2 0.0 #
dihedral_coeff @dihedral:X-n-p4-X fourier 1 0.325 2 0.0 #
dihedral_coeff @dihedral:X-n-px-X fourier 1 0.325 2 0.0 #
dihedral_coeff @dihedral:X-n-p5-X fourier 1 2.2 2 180.0 #
dihedral_coeff @dihedral:X-n-py-X fourier 1 2.2 2 180.0 #
dihedral_coeff @dihedral:X-n-sh-X fourier 1 1.1 2 0.0 #
dihedral_coeff @dihedral:X-n-ss-X fourier 1 1.5 2 0.0 #
dihedral_coeff @dihedral:X-n-s4-X fourier 1 1.5 3 0.0 #
dihedral_coeff @dihedral:X-n-sx-X fourier 1 1.5 3 0.0 #
dihedral_coeff @dihedral:X-n-s6-X fourier 1 1.1 2 180.0 #
dihedral_coeff @dihedral:X-n-sy-X fourier 1 1.1 2 180.0 #
dihedral_coeff @dihedral:X-n1-c2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-c3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-ca-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-ce-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cu-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cv-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cx-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-cy-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-n-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-n1-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-n2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-n3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-n4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-na-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-nb-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-nc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-nd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-ne-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-nf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-nh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-no-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-oh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-os-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-p2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-pb-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-pc-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-pd-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-pe-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-pf-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-p3-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-p4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-px-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-p5-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-py-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-s2-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-sh-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-ss-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-s4-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-sx-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-s6-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n1-sy-X fourier 1 0.0 2 180.0 #
dihedral_coeff @dihedral:X-n2-n2-X fourier 2 3.0 2 180.0 2.8 1 0.0 # double bond
dihedral_coeff @dihedral:X-n2-ne-X fourier 2 3.0 2 180.0 2.8 1 0.0 # double bond
dihedral_coeff @dihedral:X-n2-nf-X fourier 2 3.0 2 180.0 2.8 1 0.0 # double bond
dihedral_coeff @dihedral:X-ne-nf-X fourier 2 3.0 2 180.0 2.8 1 0.0 # double bond
dihedral_coeff @dihedral:X-ne-ne-X fourier 1 1.2 2 180.0 # single bond, intrpol
dihedral_coeff @dihedral:X-nf-nf-X fourier 1 1.2 2 180.0 # single bond, intrpol
dihedral_coeff @dihedral:X-nc-nc-X fourier 1 4.0 2 180.0 # estimated, intrpol
dihedral_coeff @dihedral:X-nd-nd-X fourier 1 4.0 2 180.0 # estimated, intrpol
dihedral_coeff @dihedral:X-nc-nd-X fourier 1 4.0 2 180.0 # estimated, intrpol
dihedral_coeff @dihedral:X-n2-nc-X fourier 2 3.0 2 180.0 2.8 1 0.0 # same as X-n2-n2-X
dihedral_coeff @dihedral:X-n2-nd-X fourier 2 3.0 2 180.0 2.8 1 0.0 # same as X-n2-n2-X
dihedral_coeff @dihedral:X-n2-n3-X fourier 1 6.1 2 180.0 #
dihedral_coeff @dihedral:X-ne-n3-X fourier 1 6.1 2 180.0 #
dihedral_coeff @dihedral:X-nf-n3-X fourier 1 6.1 2 180.0 #
dihedral_coeff @dihedral:X-n2-n4-X fourier 1 8.0 2 180.0 #
dihedral_coeff @dihedral:X-ne-n4-X fourier 1 8.0 2 180.0 #
dihedral_coeff @dihedral:X-nf-n4-X fourier 1 8.0 2 180.0 #
dihedral_coeff @dihedral:X-n2-na-X fourier 1 1.7 2 180.0 #
dihedral_coeff @dihedral:X-ne-na-X fourier 1 1.7 2 180.0 #
dihedral_coeff @dihedral:X-nf-na-X fourier 1 1.7 2 180.0 #
dihedral_coeff @dihedral:X-na-nc-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-na-nd-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-nh-X fourier 1 2.8 2 180.0 #
dihedral_coeff @dihedral:X-ne-nh-X fourier 1 2.8 2 180.0 #
dihedral_coeff @dihedral:X-nf-nh-X fourier 1 2.8 2 180.0 #
dihedral_coeff @dihedral:X-n2-no-X fourier 1 0.75 2 180.0 #
dihedral_coeff @dihedral:X-ne-no-X fourier 1 0.75 2 180.0 #
dihedral_coeff @dihedral:X-nf-no-X fourier 1 0.75 2 180.0 #
dihedral_coeff @dihedral:X-n2-oh-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-ne-oh-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-nf-oh-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-n2-os-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-ne-os-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-nf-os-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-nc-os-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nc-ss-X fourier 1 4.8 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-p2-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-pe-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-pf-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-ne-pf-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-pc-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-n2-pd-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nc-p2-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nd-p2-X fourier 1 5.4 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nc-pc-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nd-pd-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nd-pc-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-nc-pd-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-ne-pe-X fourier 1 0.6 1 0.0 # single bond
dihedral_coeff @dihedral:X-nf-pf-X fourier 1 0.6 1 0.0 # single bond
dihedral_coeff @dihedral:X-n2-p3-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-n2-p4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-ne-p4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-nf-p4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-n2-p5-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-ne-p5-X fourier 1 1.0 3 180.0 #
dihedral_coeff @dihedral:X-nf-p5-X fourier 1 1.0 3 180.0 #
dihedral_coeff @dihedral:X-ne-px-X fourier 1 1.0 3 180.0 #
dihedral_coeff @dihedral:X-nf-px-X fourier 1 1.0 3 180.0 #
dihedral_coeff @dihedral:X-n2-sh-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-ne-sh-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-nf-sh-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-n2-ss-X fourier 2 2.8 2 180.0 1.3 1 180.0 #
dihedral_coeff @dihedral:X-ne-ss-X fourier 2 2.8 2 180.0 1.3 1 180.0 #
dihedral_coeff @dihedral:X-nf-ss-X fourier 2 2.8 2 180.0 1.3 1 180.0 #
dihedral_coeff @dihedral:X-n2-s4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-ne-sx-X fourier 1 1.5 3 180.0 #
dihedral_coeff @dihedral:X-nf-sx-X fourier 1 1.5 3 180.0 #
dihedral_coeff @dihedral:X-n2-s6-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-ne-sy-X fourier 2 0.5 3 180.0 6.8 1 180.0 #
dihedral_coeff @dihedral:X-nf-sy-X fourier 2 0.5 3 180.0 6.8 1 180.0 #
dihedral_coeff @dihedral:X-n3-n3-X fourier 1 2.25 2 0.0 #
dihedral_coeff @dihedral:X-n3-n4-X fourier 1 0.25 3 0.0 #
dihedral_coeff @dihedral:X-n3-na-X fourier 1 1.6 2 0.0 #
dihedral_coeff @dihedral:X-n3-nh-X fourier 1 1.9 2 0.0 #
dihedral_coeff @dihedral:X-n3-no-X fourier 1 4.0 2 180.0 #
dihedral_coeff @dihedral:X-n3-oh-X fourier 1 2.2 2 0.0 #
dihedral_coeff @dihedral:X-n3-os-X fourier 1 1.8 2 0.0 #
dihedral_coeff @dihedral:X-n3-p2-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-n3-pe-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-n3-pf-X fourier 1 3.2 2 180.0 #
dihedral_coeff @dihedral:X-n3-p3-X fourier 1 2.35 2 0.0 #
dihedral_coeff @dihedral:X-n3-p4-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-n3-px-X fourier 1 2.1 2 180.0 #
dihedral_coeff @dihedral:X-n3-p5-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-n3-py-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-n3-sh-X fourier 1 3.1 2 0.0 #
dihedral_coeff @dihedral:X-n3-ss-X fourier 1 2.6 2 0.0 #
dihedral_coeff @dihedral:X-n3-s4-X fourier 1 3.75 2 0.0 #
dihedral_coeff @dihedral:X-n3-sx-X fourier 1 3.75 2 0.0 #
dihedral_coeff @dihedral:X-n3-s6-X fourier 1 3.13333333333 2 0.0 #
dihedral_coeff @dihedral:X-n3-sy-X fourier 1 3.13333333333 2 0.0 #
dihedral_coeff @dihedral:X-n4-n4-X fourier 1 0.188888888889 3 0.0 #
dihedral_coeff @dihedral:X-n4-na-X fourier 1 0.233333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-nh-X fourier 1 0.183333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-no-X fourier 1 0.0833333333333 3 180.0 #
dihedral_coeff @dihedral:X-n4-oh-X fourier 1 0.333333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-os-X fourier 1 0.566666666667 3 0.0 #
dihedral_coeff @dihedral:X-n4-p2-X fourier 1 0.166666666667 3 180.0 #
dihedral_coeff @dihedral:X-n4-pe-X fourier 1 0.166666666667 3 180.0 #
dihedral_coeff @dihedral:X-n4-pf-X fourier 1 0.166666666667 3 180.0 #
dihedral_coeff @dihedral:X-n4-p3-X fourier 1 0.15 3 0.0 #
dihedral_coeff @dihedral:X-n4-p4-X fourier 1 0.05 3 0.0 #
dihedral_coeff @dihedral:X-n4-px-X fourier 1 0.05 3 0.0 #
dihedral_coeff @dihedral:X-n4-p5-X fourier 1 0.0888888888889 3 0.0 #
dihedral_coeff @dihedral:X-n4-py-X fourier 1 0.0888888888889 3 0.0 #
dihedral_coeff @dihedral:X-n4-sh-X fourier 1 0.666666666667 3 0.0 #
dihedral_coeff @dihedral:X-n4-ss-X fourier 1 0.333333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-s4-X fourier 1 0.283333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-sx-X fourier 1 0.283333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-s6-X fourier 1 0.133333333333 3 0.0 #
dihedral_coeff @dihedral:X-n4-sy-X fourier 1 0.133333333333 3 0.0 #
dihedral_coeff @dihedral:X-na-na-X fourier 1 0.9 2 0.0 #
dihedral_coeff @dihedral:X-na-nh-X fourier 1 1.2 2 0.0 #
dihedral_coeff @dihedral:X-na-no-X fourier 1 6.0 2 180.0 #
dihedral_coeff @dihedral:X-na-oh-X fourier 1 1.0 2 0.0 #
dihedral_coeff @dihedral:X-na-os-X fourier 1 0.65 2 0.0 #
dihedral_coeff @dihedral:X-na-p2-X fourier 1 1.0 2 180.0 #
dihedral_coeff @dihedral:X-na-pe-X fourier 1 1.0 2 180.0 #
dihedral_coeff @dihedral:X-na-pf-X fourier 1 1.0 2 180.0 #
dihedral_coeff @dihedral:X-na-p3-X fourier 1 1.45 2 0.0 #
dihedral_coeff @dihedral:X-na-p4-X fourier 1 1.1 3 0.0 #
dihedral_coeff @dihedral:X-na-px-X fourier 1 1.1 3 0.0 #
dihedral_coeff @dihedral:X-na-p5-X fourier 1 0.833333333333 2 180.0 #
dihedral_coeff @dihedral:X-na-py-X fourier 1 0.833333333333 2 180.0 #
dihedral_coeff @dihedral:X-na-sh-X fourier 1 1.8 2 0.0 #
dihedral_coeff @dihedral:X-na-ss-X fourier 1 7.8 2 0.0 #
dihedral_coeff @dihedral:X-na-s4-X fourier 1 1.05 2 0.0 #
dihedral_coeff @dihedral:X-na-sx-X fourier 1 1.05 2 0.0 #
dihedral_coeff @dihedral:X-na-s6-X fourier 1 3.66666666667 2 180.0 #
dihedral_coeff @dihedral:X-na-sy-X fourier 1 3.66666666667 2 180.0 #
dihedral_coeff @dihedral:X-nh-nh-X fourier 1 1.8 3 180.0 #
dihedral_coeff @dihedral:X-nh-no-X fourier 1 2.55 2 180.0 #
dihedral_coeff @dihedral:X-nh-oh-X fourier 1 1.5 2 0.0 #
dihedral_coeff @dihedral:X-nh-os-X fourier 1 1.5 1 0.0 #
dihedral_coeff @dihedral:X-nh-p2-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-nh-pe-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-nh-pf-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-nh-p3-X fourier 1 2.35 2 0.0 #
dihedral_coeff @dihedral:X-nh-p4-X fourier 1 1.175 3 0.0 #
dihedral_coeff @dihedral:X-nh-px-X fourier 1 1.175 3 0.0 #
dihedral_coeff @dihedral:X-nh-p5-X fourier 1 0.8 2 0.0 #
dihedral_coeff @dihedral:X-nh-py-X fourier 1 0.8 2 0.0 #
dihedral_coeff @dihedral:X-nh-sh-X fourier 1 1.6 2 0.0 #
dihedral_coeff @dihedral:X-nh-ss-X fourier 1 2.1 2 0.0 #
dihedral_coeff @dihedral:X-nh-s4-X fourier 2 0.75 2 0.0 0.1 3 180.0 #
dihedral_coeff @dihedral:X-nh-sx-X fourier 2 0.75 2 0.0 0.1 3 180.0 #
dihedral_coeff @dihedral:X-nh-s6-X fourier 1 0.1 2 180.0 #
dihedral_coeff @dihedral:X-nh-sy-X fourier 1 0.1 2 180.0 #
dihedral_coeff @dihedral:X-no-no-X fourier 2 0.4 4 180.0 1.8 2 180.0 #
dihedral_coeff @dihedral:X-no-oh-X fourier 1 3.9 2 180.0 #
dihedral_coeff @dihedral:X-no-os-X fourier 1 3.0 2 180.0 #
dihedral_coeff @dihedral:X-no-p2-X fourier 1 0.3 2 180.0 #
dihedral_coeff @dihedral:X-no-pe-X fourier 1 0.3 2 180.0 #
dihedral_coeff @dihedral:X-no-pf-X fourier 1 0.3 2 180.0 #
dihedral_coeff @dihedral:X-no-p3-X fourier 1 1.9 2 180.0 #
dihedral_coeff @dihedral:X-no-p4-X fourier 1 0.575 2 180.0 #
dihedral_coeff @dihedral:X-no-px-X fourier 1 0.575 2 180.0 #
dihedral_coeff @dihedral:X-no-p5-X fourier 2 2.4 2 0.0 0.4 3 0.0 #
dihedral_coeff @dihedral:X-no-py-X fourier 2 2.4 2 0.0 0.4 3 0.0 #
dihedral_coeff @dihedral:X-no-sh-X fourier 1 2.3 2 180.0 #
dihedral_coeff @dihedral:X-no-ss-X fourier 1 2.7 2 180.0 #
dihedral_coeff @dihedral:X-no-s4-X fourier 1 2.6 2 180.0 #
dihedral_coeff @dihedral:X-no-sx-X fourier 1 2.6 2 180.0 #
dihedral_coeff @dihedral:X-no-s6-X fourier 1 0.333333333333 2 0.0 #
dihedral_coeff @dihedral:X-no-sy-X fourier 1 0.333333333333 2 0.0 #
dihedral_coeff @dihedral:X-oh-oh-X fourier 1 1.6 2 0.0 #
dihedral_coeff @dihedral:X-oh-os-X fourier 1 1.6 2 0.0 #
dihedral_coeff @dihedral:X-oh-p2-X fourier 1 1.5 2 180.0 #
dihedral_coeff @dihedral:X-oh-pe-X fourier 1 1.5 2 180.0 #
dihedral_coeff @dihedral:X-oh-pf-X fourier 1 1.5 2 180.0 #
dihedral_coeff @dihedral:X-oh-p3-X fourier 1 0.4 3 180.0 #
dihedral_coeff @dihedral:X-oh-p4-X fourier 1 0.7 1 0.0 #
dihedral_coeff @dihedral:X-oh-px-X fourier 1 0.7 1 0.0 #
dihedral_coeff @dihedral:X-oh-p5-X fourier 1 0.533333333333 3 0.0 #
dihedral_coeff @dihedral:X-oh-py-X fourier 1 0.533333333333 3 0.0 #
dihedral_coeff @dihedral:X-oh-sh-X fourier 1 2.4 2 0.0 #
dihedral_coeff @dihedral:X-oh-ss-X fourier 1 2.4 2 0.0 #
dihedral_coeff @dihedral:X-oh-s4-X fourier 1 5.0 1 0.0 #
dihedral_coeff @dihedral:X-oh-sx-X fourier 1 5.0 1 0.0 #
dihedral_coeff @dihedral:X-oh-s6-X fourier 1 9.5 1 180.0 #
dihedral_coeff @dihedral:X-oh-sy-X fourier 1 9.5 1 180.0 #
dihedral_coeff @dihedral:X-os-os-X fourier 1 1.0 1 0.0 #
dihedral_coeff @dihedral:X-os-ss-X fourier 1 2.2 2 0.0 #
dihedral_coeff @dihedral:X-os-sh-X fourier 1 1.8 2 0.0 #
dihedral_coeff @dihedral:X-os-s4-X fourier 1 1.65 3 0.0 #
dihedral_coeff @dihedral:X-os-sx-X fourier 1 1.65 3 0.0 #
dihedral_coeff @dihedral:X-os-s6-X fourier 1 1.2 2 180.0 #
dihedral_coeff @dihedral:X-os-sy-X fourier 1 1.2 2 180.0 #
dihedral_coeff @dihedral:X-os-p2-X fourier 2 3.0 2 180.0 2.0 1 180.0 #
dihedral_coeff @dihedral:X-os-pe-X fourier 2 3.0 2 180.0 2.0 1 180.0 #
dihedral_coeff @dihedral:X-os-pf-X fourier 2 3.0 2 180.0 2.0 1 180.0 #
dihedral_coeff @dihedral:X-os-p3-X fourier 1 2.2 2 0.0 #
dihedral_coeff @dihedral:X-os-p4-X fourier 1 1.05 2 180.0 #
dihedral_coeff @dihedral:X-os-px-X fourier 1 1.05 2 180.0 #
dihedral_coeff @dihedral:X-os-p5-X fourier 1 0.8 2 0.0 #
dihedral_coeff @dihedral:X-os-py-X fourier 1 0.8 2 0.0 #
dihedral_coeff @dihedral:X-p2-p2-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-p2-pe-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-p2-pf-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-p2-pc-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-p2-pd-X fourier 1 6.6 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-pe-pe-X fourier 1 1.2 2 180.0 # single bond
dihedral_coeff @dihedral:X-pf-pf-X fourier 1 1.2 2 180.0 # single bond
dihedral_coeff @dihedral:X-pc-pc-X fourier 1 7.2 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-pd-pd-X fourier 1 7.2 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-pc-pd-X fourier 1 7.2 2 180.0 # estimated, intrpol.
dihedral_coeff @dihedral:X-p2-p3-X fourier 1 1.2 1 0.0 #
dihedral_coeff @dihedral:X-pe-p3-X fourier 1 1.2 1 0.0 #
dihedral_coeff @dihedral:X-pf-p3-X fourier 1 1.2 1 0.0 #
dihedral_coeff @dihedral:X-p2-p4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-pe-px-X fourier 1 2.45 2 0.0 #
dihedral_coeff @dihedral:X-pf-px-X fourier 1 2.45 2 0.0 #
dihedral_coeff @dihedral:X-p2-p5-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-pe-py-X fourier 1 1.9 1 0.0 #
dihedral_coeff @dihedral:X-pf-py-X fourier 1 1.9 1 0.0 #
dihedral_coeff @dihedral:X-p2-sh-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-pe-sh-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-pf-sh-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-p2-ss-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-pe-ss-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-pf-ss-X fourier 1 1.4 2 180.0 #
dihedral_coeff @dihedral:X-p2-s4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-pe-sx-X fourier 1 1.5 2 0.0 #
dihedral_coeff @dihedral:X-pf-sx-X fourier 1 1.5 2 0.0 #
dihedral_coeff @dihedral:X-p2-s6-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-pe-sy-X fourier 1 0.4 3 180.0 #
dihedral_coeff @dihedral:X-pf-sy-X fourier 1 0.4 3 180.0 #
dihedral_coeff @dihedral:X-p3-p3-X fourier 1 0.5 3 0.0 #
dihedral_coeff @dihedral:X-p3-p4-X fourier 1 0.9 1 0.0 #
dihedral_coeff @dihedral:X-p3-px-X fourier 1 0.9 1 0.0 #
dihedral_coeff @dihedral:X-p3-p5-X fourier 1 1.83333333333 2 180.0 #
dihedral_coeff @dihedral:X-p3-py-X fourier 1 1.83333333333 2 180.0 #
dihedral_coeff @dihedral:X-p3-sh-X fourier 1 4.6 2 0.0 #
dihedral_coeff @dihedral:X-p3-ss-X fourier 1 1.15 3 0.0 #
dihedral_coeff @dihedral:X-p3-s4-X fourier 1 3.85 2 0.0 #
dihedral_coeff @dihedral:X-p3-sx-X fourier 1 3.85 2 0.0 #
dihedral_coeff @dihedral:X-p3-s6-X fourier 1 0.266666666667 3 0.0 #
dihedral_coeff @dihedral:X-p3-sy-X fourier 1 0.266666666667 3 0.0 #
dihedral_coeff @dihedral:X-p4-p4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-px-px-X fourier 1 1.45 2 180.0 #
dihedral_coeff @dihedral:X-p4-p5-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-px-py-X fourier 1 0.316666666667 2 180.0 #
dihedral_coeff @dihedral:X-p4-s4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-px-sx-X fourier 1 0.85 1 0.0 #
dihedral_coeff @dihedral:X-p4-s6-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-px-sy-X fourier 1 0.116666666667 3 0.0 #
dihedral_coeff @dihedral:X-p4-sh-X fourier 1 0.25 1 180.0 #
dihedral_coeff @dihedral:X-px-sh-X fourier 1 0.25 1 180.0 #
dihedral_coeff @dihedral:X-p4-ss-X fourier 1 0.6 2 180.0 #
dihedral_coeff @dihedral:X-px-ss-X fourier 1 0.6 2 180.0 #
dihedral_coeff @dihedral:X-p5-p5-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-py-py-X fourier 1 0.6 2 0.0 #
dihedral_coeff @dihedral:X-p5-sh-X fourier 1 0.3 3 0.0 #
dihedral_coeff @dihedral:X-py-sh-X fourier 1 0.3 3 0.0 #
dihedral_coeff @dihedral:X-p5-ss-X fourier 1 3.8 2 180.0 #
dihedral_coeff @dihedral:X-py-ss-X fourier 1 3.8 2 180.0 #
dihedral_coeff @dihedral:X-p5-s4-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-py-sx-X fourier 1 0.266666666667 3 0.0 #
dihedral_coeff @dihedral:X-p5-s6-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-py-sy-X fourier 1 0.277777777778 3 0.0 #
dihedral_coeff @dihedral:X-sh-sh-X fourier 1 5.6 3 0.0 #
dihedral_coeff @dihedral:X-sh-ss-X fourier 1 5.3 3 0.0 #
dihedral_coeff @dihedral:X-sh-s4-X fourier 1 0.7 3 0.0 #
dihedral_coeff @dihedral:X-sh-sx-X fourier 1 0.7 3 0.0 #
dihedral_coeff @dihedral:X-sh-s6-X fourier 1 4.66666666667 2 180.0 #
dihedral_coeff @dihedral:X-sh-sy-X fourier 1 4.66666666667 2 180.0 #
dihedral_coeff @dihedral:X-ss-ss-X fourier 1 0.0 3 0.0 #
dihedral_coeff @dihedral:X-ss-s4-X fourier 1 0.3 3 0.0 #
dihedral_coeff @dihedral:X-ss-sx-X fourier 1 0.3 3 0.0 #
dihedral_coeff @dihedral:X-ss-s6-X fourier 1 3.06666666667 2 180.0 #
dihedral_coeff @dihedral:X-ss-sy-X fourier 1 3.06666666667 2 180.0 #
dihedral_coeff @dihedral:X-s4-s4-X fourier 1 6.65 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-sx-sx-X fourier 1 0.625 3 0.0 #
dihedral_coeff @dihedral:X-s4-s6-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-sx-sy-X fourier 1 4.33333333333 2 180.0 #
dihedral_coeff @dihedral:X-s6-s6-X fourier 1 6.66666666667 2 180.0 # estimated !!!
dihedral_coeff @dihedral:X-sy-sy-X fourier 1 0.155555555556 2 180.0 #
dihedral_coeff @dihedral:X-cf-pe-X fourier 1 6.65 2 180.0 # NEW
dihedral_coeff @dihedral:X-nd-os-X fourier 1 4.8 2 180.0 # NEW
dihedral_coeff @dihedral:X-nd-ss-X fourier 1 4.8 2 180.0 # NEW
dihedral_coeff @dihedral:X-nf-pe-X fourier 1 5.4 2 180.0 # NEW
dihedral_coeff @dihedral:c3-c-sh-hs fourier 2 2.25 2 180.0 1.3 1 180.0 #
dihedral_coeff @dihedral:c2-c2-ss-c3 fourier 2 1.1 2 180.0 0.7 3 180.0 #
dihedral_coeff @dihedral:c2-c2-n-c fourier 2 0.65 2 180.0 1.2 1 180.0 #
dihedral_coeff @dihedral:c-n-p2-c2 fourier 2 1.0 2 180.0 1.9 1 180.0 #
dihedral_coeff @dihedral:n-c3-c-n fourier 2 1.7 1 180.0 2.0 2 180.0 #
dihedral_coeff @dihedral:c-n-c3-c fourier 2 0.85 2 180.0 0.8 1 0.0 #
dihedral_coeff @dihedral:c3-c3-n-c fourier 3 0.5 4 180.0 0.15 3 180.0 0.53 1 0.0 # phi,psi,parm94
dihedral_coeff @dihedral:c3-c3-c-n fourier 2 0.1 4 0.0 0.07 2 0.0 # phi,psi,parm94
dihedral_coeff @dihedral:c2-ne-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:c2-nf-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:ce-ne-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:ce-nf-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:cf-ne-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:cf-nf-p5-o fourier 2 0.0 3 0.0 2.3 1 0.0 #
dihedral_coeff @dihedral:hn-n-c-o fourier 2 2.5 2 180.0 2.0 1 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:c3-ss-ss-c3 fourier 2 3.5 2 0.0 0.6 3 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:c3-n3-nh-ca fourier 2 1.9 2 0.0 1.9 3 0.0 #
dihedral_coeff @dihedral:c3-n3-p5-o fourier 2 3.0 2 180.0 2.3 3 0.0 #
dihedral_coeff @dihedral:ca-nh-oh-ho fourier 2 1.2 1 0.0 1.5 2 0.0 #
dihedral_coeff @dihedral:oh-p5-os-c3 fourier 2 0.25 3 0.0 1.2 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:os-p5-os-c3 fourier 2 0.25 3 0.0 1.2 2 0.0 # JCC,7,(1986),230
dihedral_coeff @dihedral:h1-c3-c-o fourier 2 0.8 1 0.0 0.08 3 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c-o fourier 2 0.8 1 0.0 0.08 3 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-hc fourier 1 0.15 3 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-c3 fourier 1 0.16 3 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c2-c2 fourier 2 0.38 3 180.0 1.15 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:ho-oh-c3-c3 fourier 2 0.16 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:ho-oh-c-o fourier 2 2.3 2 180.0 1.9 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c2-c2-c-o fourier 2 2.175 2 180.0 0.3 3 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-c2-c2-c3 fourier 2 6.65 2 180.0 1.9 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-c3-c3-c3 fourier 3 0.18 3 0.0 0.25 2 180.0 0.2 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-c3-n3-c3 fourier 2 0.3 3 0.0 0.48 2 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-c3-os-c3 fourier 2 0.383 3 0.0 0.1 2 180.0 #
dihedral_coeff @dihedral:c3-c3-os-c fourier 2 0.383 3 0.0 0.8 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-os-c3-os fourier 3 0.1 3 0.0 0.85 2 180.0 1.35 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:c3-os-c3-na fourier 2 0.383 3 0.0 0.65 2 0.0 # parm98.dat, TC,PC,PAK
dihedral_coeff @dihedral:o-c-os-c3 fourier 2 2.7 2 180.0 1.4 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:os-c3-na-c2 fourier 2 0.0 2 0.0 2.5 1 0.0 # parm98, TC,PC,PAK
dihedral_coeff @dihedral:os-c3-c3-os fourier 2 0.144 3 0.0 1.175 2 0.0 # parm98, TC,PC,PAK
dihedral_coeff @dihedral:os-c3-c3-oh fourier 2 0.144 3 0.0 1.175 2 0.0 # parm98, TC,PC,PAK
dihedral_coeff @dihedral:oh-c3-c3-oh fourier 2 0.144 3 0.0 1.175 2 0.0 # parm98, TC,PC,PAK
dihedral_coeff @dihedral:f-c3-c3-f fourier 2 0.0 3 0.0 1.2 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:cl-c3-c3-cl fourier 2 0.0 3 0.0 0.45 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:br-c3-c3-br fourier 2 0.0 3 0.0 0.0 1 180.0 # Junmei et al, 1999
dihedral_coeff @dihedral:h1-c3-c3-os fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:h1-c3-c3-oh fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:h1-c3-c3-f fourier 2 0.0 3 0.0 0.19 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:h1-c3-c3-cl fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:h1-c3-c3-br fourier 2 0.0 3 0.0 0.55 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-os fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-oh fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-f fourier 2 0.0 3 0.0 0.19 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-cl fourier 2 0.0 3 0.0 0.25 1 0.0 # Junmei et al, 1999
dihedral_coeff @dihedral:hc-c3-c3-br fourier 2 0.0 3 0.0 0.55 1 0.0 # Junmei et al, 1999
} # (end of dihedral_coeffs)
write_once("Data Dihedrals By Type") {
@dihedral:X-c-c-X @atom:* @atom:c @atom:c @atom:*
@dihedral:X-c-c1-X @atom:* @atom:c @atom:c1 @atom:*
@dihedral:X-c-cg-X @atom:* @atom:c @atom:cg @atom:*
@dihedral:X-c-ch-X @atom:* @atom:c @atom:ch @atom:*
@dihedral:X-c-c2-X @atom:* @atom:c @atom:c2 @atom:*
@dihedral:X-c-cu-X @atom:* @atom:c @atom:cu @atom:*
@dihedral:X-c-cv-X @atom:* @atom:c @atom:cv @atom:*
@dihedral:X-c-ce-X @atom:* @atom:c @atom:ce @atom:*
@dihedral:X-c-cf-X @atom:* @atom:c @atom:cf @atom:*
@dihedral:X-c-c3-X @atom:* @atom:c @atom:c3 @atom:*
@dihedral:X-c-cx-X @atom:* @atom:c @atom:cx @atom:*
@dihedral:X-c-cy-X @atom:* @atom:c @atom:cy @atom:*
@dihedral:X-c-ca-X @atom:* @atom:c @atom:ca @atom:*
@dihedral:X-c-cc-X @atom:* @atom:c @atom:cc @atom:*
@dihedral:X-c-cd-X @atom:* @atom:c @atom:cd @atom:*
@dihedral:X-c-n-X @atom:* @atom:c @atom:n @atom:*
@dihedral:X-c-n2-X @atom:* @atom:c @atom:n2 @atom:*
@dihedral:X-c-nc-X @atom:* @atom:c @atom:nc @atom:*
@dihedral:X-c-nd-X @atom:* @atom:c @atom:nd @atom:*
@dihedral:X-c-ne-X @atom:* @atom:c @atom:ne @atom:*
@dihedral:X-c-nf-X @atom:* @atom:c @atom:nf @atom:*
@dihedral:X-c-na-X @atom:* @atom:c @atom:na @atom:*
@dihedral:X-c-na-X @atom:* @atom:c @atom:na @atom:*
@dihedral:X-c-no-X @atom:* @atom:c @atom:no @atom:*
@dihedral:X-c-oh-X @atom:* @atom:c @atom:oh @atom:*
@dihedral:X-c-os-X @atom:* @atom:c @atom:os @atom:*
@dihedral:X-c-p2-X @atom:* @atom:c @atom:p2 @atom:*
@dihedral:X-c-pc-X @atom:* @atom:c @atom:pc @atom:*
@dihedral:X-c-pd-X @atom:* @atom:c @atom:pd @atom:*
@dihedral:X-c-pe-X @atom:* @atom:c @atom:pe @atom:*
@dihedral:X-c-pf-X @atom:* @atom:c @atom:pf @atom:*
@dihedral:X-c-p3-X @atom:* @atom:c @atom:p3 @atom:*
@dihedral:X-c-p4-X @atom:* @atom:c @atom:p4 @atom:*
@dihedral:X-c-px-X @atom:* @atom:c @atom:px @atom:*
@dihedral:X-c-p5-X @atom:* @atom:c @atom:p5 @atom:*
@dihedral:X-c-py-X @atom:* @atom:c @atom:py @atom:*
@dihedral:X-c-sh-X @atom:* @atom:c @atom:sh @atom:*
@dihedral:X-c-ss-X @atom:* @atom:c @atom:ss @atom:*
@dihedral:X-c-s4-X @atom:* @atom:c @atom:s4 @atom:*
@dihedral:X-c-sx-X @atom:* @atom:c @atom:sx @atom:*
@dihedral:X-c-s6-X @atom:* @atom:c @atom:s6 @atom:*
@dihedral:X-c-sy-X @atom:* @atom:c @atom:sy @atom:*
@dihedral:X-c1-c1-X @atom:* @atom:c1 @atom:c1 @atom:*
@dihedral:X-c1-cg-X @atom:* @atom:c1 @atom:cg @atom:*
@dihedral:X-c1-ch-X @atom:* @atom:c1 @atom:ch @atom:*
@dihedral:X-cg-cg-X @atom:* @atom:cg @atom:cg @atom:*
@dihedral:X-ch-ch-X @atom:* @atom:ch @atom:ch @atom:*
@dihedral:X-cg-ch-X @atom:* @atom:cg @atom:ch @atom:*
@dihedral:X-c1-c2-X @atom:* @atom:c1 @atom:c2 @atom:*
@dihedral:X-c1-c3-X @atom:* @atom:c1 @atom:c3 @atom:*
@dihedral:X-c1-ca-X @atom:* @atom:c1 @atom:ca @atom:*
@dihedral:X-c1-cc-X @atom:* @atom:c1 @atom:cc @atom:*
@dihedral:X-c1-cd-X @atom:* @atom:c1 @atom:cd @atom:*
@dihedral:X-c1-ce-X @atom:* @atom:c1 @atom:ce @atom:*
@dihedral:X-c1-cf-X @atom:* @atom:c1 @atom:cf @atom:*
@dihedral:X-c1-cu-X @atom:* @atom:c1 @atom:cu @atom:*
@dihedral:X-c1-cv-X @atom:* @atom:c1 @atom:cv @atom:*
@dihedral:X-c1-cx-X @atom:* @atom:c1 @atom:cx @atom:*
@dihedral:X-c1-cy-X @atom:* @atom:c1 @atom:cy @atom:*
@dihedral:X-c1-n-X @atom:* @atom:c1 @atom:n @atom:*
@dihedral:X-c1-n2-X @atom:* @atom:c1 @atom:n2 @atom:*
@dihedral:X-c1-n3-X @atom:* @atom:c1 @atom:n3 @atom:*
@dihedral:X-c1-n4-X @atom:* @atom:c1 @atom:n4 @atom:*
@dihedral:X-c1-na-X @atom:* @atom:c1 @atom:na @atom:*
@dihedral:X-c1-nb-X @atom:* @atom:c1 @atom:nb @atom:*
@dihedral:X-c1-nc-X @atom:* @atom:c1 @atom:nc @atom:*
@dihedral:X-c1-nd-X @atom:* @atom:c1 @atom:nd @atom:*
@dihedral:X-c1-ne-X @atom:* @atom:c1 @atom:ne @atom:*
@dihedral:X-c1-nf-X @atom:* @atom:c1 @atom:nf @atom:*
@dihedral:X-c1-nh-X @atom:* @atom:c1 @atom:nh @atom:*
@dihedral:X-c1-no-X @atom:* @atom:c1 @atom:no @atom:*
@dihedral:X-c1-oh-X @atom:* @atom:c1 @atom:oh @atom:*
@dihedral:X-c1-os-X @atom:* @atom:c1 @atom:os @atom:*
@dihedral:X-c1-p2-X @atom:* @atom:c1 @atom:p2 @atom:*
@dihedral:X-c1-pb-X @atom:* @atom:c1 @atom:pb @atom:*
@dihedral:X-c1-pc-X @atom:* @atom:c1 @atom:pc @atom:*
@dihedral:X-c1-pd-X @atom:* @atom:c1 @atom:pd @atom:*
@dihedral:X-c1-pe-X @atom:* @atom:c1 @atom:pe @atom:*
@dihedral:X-c1-pf-X @atom:* @atom:c1 @atom:pf @atom:*
@dihedral:X-c1-p3-X @atom:* @atom:c1 @atom:p3 @atom:*
@dihedral:X-c1-p4-X @atom:* @atom:c1 @atom:p4 @atom:*
@dihedral:X-c1-px-X @atom:* @atom:c1 @atom:px @atom:*
@dihedral:X-c1-p5-X @atom:* @atom:c1 @atom:p5 @atom:*
@dihedral:X-c1-py-X @atom:* @atom:c1 @atom:py @atom:*
@dihedral:X-c1-s2-X @atom:* @atom:c1 @atom:s2 @atom:*
@dihedral:X-c1-sh-X @atom:* @atom:c1 @atom:sh @atom:*
@dihedral:X-c1-ss-X @atom:* @atom:c1 @atom:ss @atom:*
@dihedral:X-c1-s4-X @atom:* @atom:c1 @atom:s4 @atom:*
@dihedral:X-c1-sx-X @atom:* @atom:c1 @atom:sx @atom:*
@dihedral:X-c1-s6-X @atom:* @atom:c1 @atom:s6 @atom:*
@dihedral:X-c1-sy-X @atom:* @atom:c1 @atom:sy @atom:*
@dihedral:X-c2-c2-X @atom:* @atom:c2 @atom:c2 @atom:*
@dihedral:X-c2-ce-X @atom:* @atom:c2 @atom:ce @atom:*
@dihedral:X-c2-cf-X @atom:* @atom:c2 @atom:cf @atom:*
@dihedral:X-ce-cf-X @atom:* @atom:ce @atom:cf @atom:*
@dihedral:X-ce-ce-X @atom:* @atom:ce @atom:ce @atom:*
@dihedral:X-cf-cf-X @atom:* @atom:cf @atom:cf @atom:*
@dihedral:X-cc-cd-X @atom:* @atom:cc @atom:cd @atom:*
@dihedral:X-cc-cc-X @atom:* @atom:cc @atom:cc @atom:*
@dihedral:X-cd-cd-X @atom:* @atom:cd @atom:cd @atom:*
@dihedral:X-c2-c3-X @atom:* @atom:c2 @atom:c3 @atom:*
@dihedral:X-c2-ca-X @atom:* @atom:c2 @atom:ca @atom:*
@dihedral:X-c2-n-X @atom:* @atom:c2 @atom:n @atom:*
@dihedral:X-c2-n2-X @atom:* @atom:c2 @atom:n2 @atom:*
@dihedral:X-c2-ne-X @atom:* @atom:c2 @atom:ne @atom:*
@dihedral:X-c2-nf-X @atom:* @atom:c2 @atom:nf @atom:*
@dihedral:X-ce-ne-X @atom:* @atom:ce @atom:ne @atom:*
@dihedral:X-cf-nf-X @atom:* @atom:cf @atom:nf @atom:*
@dihedral:X-c2-nc-X @atom:* @atom:c2 @atom:nc @atom:*
@dihedral:X-c2-nd-X @atom:* @atom:c2 @atom:nd @atom:*
@dihedral:X-cc-nd-X @atom:* @atom:cc @atom:nd @atom:*
@dihedral:X-cd-nc-X @atom:* @atom:cd @atom:nc @atom:*
@dihedral:X-cc-nc-X @atom:* @atom:cc @atom:nc @atom:*
@dihedral:X-cd-nd-X @atom:* @atom:cd @atom:nd @atom:*
@dihedral:X-c2-n3-X @atom:* @atom:c2 @atom:n3 @atom:*
@dihedral:X-c2-n4-X @atom:* @atom:c2 @atom:n4 @atom:*
@dihedral:X-c2-na-X @atom:* @atom:c2 @atom:na @atom:*
@dihedral:X-cc-na-X @atom:* @atom:cc @atom:na @atom:*
@dihedral:X-cd-na-X @atom:* @atom:cd @atom:na @atom:*
@dihedral:X-c2-nh-X @atom:* @atom:c2 @atom:nh @atom:*
@dihedral:X-c2-no-X @atom:* @atom:c2 @atom:no @atom:*
@dihedral:X-c2-oh-X @atom:* @atom:c2 @atom:oh @atom:*
@dihedral:X-c2-os-X @atom:* @atom:c2 @atom:os @atom:*
@dihedral:X-c2-p2-X @atom:* @atom:c2 @atom:p2 @atom:*
@dihedral:X-c2-pe-X @atom:* @atom:c2 @atom:pe @atom:*
@dihedral:X-c2-pf-X @atom:* @atom:c2 @atom:pf @atom:*
@dihedral:X-ce-pf-X @atom:* @atom:ce @atom:pf @atom:*
@dihedral:X-ce-pe-X @atom:* @atom:ce @atom:pe @atom:*
@dihedral:X-cf-pf-X @atom:* @atom:cf @atom:pf @atom:*
@dihedral:X-c2-pc-X @atom:* @atom:c2 @atom:pc @atom:*
@dihedral:X-c2-pd-X @atom:* @atom:c2 @atom:pd @atom:*
@dihedral:X-cc-pc-X @atom:* @atom:cc @atom:pc @atom:*
@dihedral:X-cc-pd-X @atom:* @atom:cc @atom:pd @atom:*
@dihedral:X-cd-pc-X @atom:* @atom:cd @atom:pc @atom:*
@dihedral:X-cd-pd-X @atom:* @atom:cd @atom:pd @atom:*
@dihedral:X-c2-p3-X @atom:* @atom:c2 @atom:p3 @atom:*
@dihedral:X-c2-p4-X @atom:* @atom:c2 @atom:p4 @atom:*
@dihedral:X-ce-p4-X @atom:* @atom:ce @atom:p4 @atom:*
@dihedral:X-cf-p4-X @atom:* @atom:cf @atom:p4 @atom:*
@dihedral:X-c2-px-X @atom:* @atom:c2 @atom:px @atom:*
@dihedral:X-ce-px-X @atom:* @atom:ce @atom:px @atom:*
@dihedral:X-cf-px-X @atom:* @atom:cf @atom:px @atom:*
@dihedral:X-c2-p5-X @atom:* @atom:c2 @atom:p5 @atom:*
@dihedral:X-ce-p5-X @atom:* @atom:ce @atom:p5 @atom:*
@dihedral:X-cf-p5-X @atom:* @atom:cf @atom:p5 @atom:*
@dihedral:X-c2-py-X @atom:* @atom:c2 @atom:py @atom:*
@dihedral:X-ce-py-X @atom:* @atom:ce @atom:py @atom:*
@dihedral:X-cf-py-X @atom:* @atom:cf @atom:py @atom:*
@dihedral:X-c2-sh-X @atom:* @atom:c2 @atom:sh @atom:*
@dihedral:X-c2-ss-X @atom:* @atom:c2 @atom:ss @atom:*
@dihedral:X-c2-s4-X @atom:* @atom:c2 @atom:s4 @atom:*
@dihedral:X-ce-s4-X @atom:* @atom:ce @atom:s4 @atom:*
@dihedral:X-cf-s4-X @atom:* @atom:cf @atom:s4 @atom:*
@dihedral:X-c2-sx-X @atom:* @atom:c2 @atom:sx @atom:*
@dihedral:X-ce-sx-X @atom:* @atom:ce @atom:sx @atom:*
@dihedral:X-cf-sx-X @atom:* @atom:cf @atom:sx @atom:*
@dihedral:X-c2-s6-X @atom:* @atom:c2 @atom:s6 @atom:*
@dihedral:X-ce-s6-X @atom:* @atom:ce @atom:s6 @atom:*
@dihedral:X-cf-s6-X @atom:* @atom:cf @atom:s6 @atom:*
@dihedral:X-c2-sy-X @atom:* @atom:c2 @atom:sy @atom:*
@dihedral:X-ce-sy-X @atom:* @atom:ce @atom:sy @atom:*
@dihedral:X-cf-sy-X @atom:* @atom:cf @atom:sy @atom:*
@dihedral:X-c3-c3-X @atom:* @atom:c3 @atom:c3 @atom:*
@dihedral:X-cx-cx-X @atom:* @atom:cx @atom:cx @atom:*
@dihedral:X-cy-cy-X @atom:* @atom:cy @atom:cy @atom:*
@dihedral:X-c3-ca-X @atom:* @atom:c3 @atom:ca @atom:*
@dihedral:X-c3-n-X @atom:* @atom:c3 @atom:n @atom:*
@dihedral:X-cx-n-X @atom:* @atom:cx @atom:n @atom:*
@dihedral:X-cy-n-X @atom:* @atom:cy @atom:n @atom:*
@dihedral:X-c3-n2-X @atom:* @atom:c3 @atom:n2 @atom:*
@dihedral:X-c3-ne-X @atom:* @atom:c3 @atom:ne @atom:*
@dihedral:X-c3-nf-X @atom:* @atom:c3 @atom:nf @atom:*
@dihedral:X-c3-n3-X @atom:* @atom:c3 @atom:n3 @atom:*
@dihedral:X-c3-n4-X @atom:* @atom:c3 @atom:n4 @atom:*
@dihedral:X-c3-na-X @atom:* @atom:c3 @atom:na @atom:*
@dihedral:X-c3-nh-X @atom:* @atom:c3 @atom:nh @atom:*
@dihedral:X-c3-no-X @atom:* @atom:c3 @atom:no @atom:*
@dihedral:X-c3-oh-X @atom:* @atom:c3 @atom:oh @atom:*
@dihedral:X-c3-os-X @atom:* @atom:c3 @atom:os @atom:*
@dihedral:X-c3-p2-X @atom:* @atom:c3 @atom:p2 @atom:*
@dihedral:X-c3-pe-X @atom:* @atom:c3 @atom:pe @atom:*
@dihedral:X-c3-pf-X @atom:* @atom:c3 @atom:pf @atom:*
@dihedral:X-c3-p3-X @atom:* @atom:c3 @atom:p3 @atom:*
@dihedral:X-c3-p4-X @atom:* @atom:c3 @atom:p4 @atom:*
@dihedral:X-c3-px-X @atom:* @atom:c3 @atom:px @atom:*
@dihedral:X-c3-p5-X @atom:* @atom:c3 @atom:p5 @atom:*
@dihedral:X-c3-py-X @atom:* @atom:c3 @atom:py @atom:*
@dihedral:X-c3-sh-X @atom:* @atom:c3 @atom:sh @atom:*
@dihedral:X-c3-ss-X @atom:* @atom:c3 @atom:ss @atom:*
@dihedral:X-c3-s4-X @atom:* @atom:c3 @atom:s4 @atom:*
@dihedral:X-c3-sx-X @atom:* @atom:c3 @atom:sx @atom:*
@dihedral:X-c3-s6-X @atom:* @atom:c3 @atom:s6 @atom:*
@dihedral:X-c3-sy-X @atom:* @atom:c3 @atom:sy @atom:*
@dihedral:X-c3-cc-X @atom:* @atom:c3 @atom:cc @atom:*
@dihedral:X-c3-cd-X @atom:* @atom:c3 @atom:cd @atom:*
@dihedral:X-ca-ca-X @atom:* @atom:ca @atom:ca @atom:*
@dihedral:X-ca-cp-X @atom:* @atom:ca @atom:cp @atom:*
@dihedral:X-ca-cq-X @atom:* @atom:ca @atom:cq @atom:*
@dihedral:X-cp-cp-X @atom:* @atom:cp @atom:cp @atom:*
@dihedral:X-cq-cq-X @atom:* @atom:cq @atom:cq @atom:*
@dihedral:X-ca-n-X @atom:* @atom:ca @atom:n @atom:*
@dihedral:X-ca-n2-X @atom:* @atom:ca @atom:n2 @atom:*
@dihedral:X-ca-ne-X @atom:* @atom:ca @atom:ne @atom:*
@dihedral:X-ca-nf-X @atom:* @atom:ca @atom:nf @atom:*
@dihedral:X-ca-n4-X @atom:* @atom:ca @atom:n4 @atom:*
@dihedral:X-ca-na-X @atom:* @atom:ca @atom:na @atom:*
@dihedral:X-ca-nb-X @atom:* @atom:ca @atom:nb @atom:*
@dihedral:X-ca-nc-X @atom:* @atom:ca @atom:nc @atom:*
@dihedral:X-ca-nd-X @atom:* @atom:ca @atom:nd @atom:*
@dihedral:X-ca-nh-X @atom:* @atom:ca @atom:nh @atom:*
@dihedral:X-cc-nh-X @atom:* @atom:cc @atom:nh @atom:*
@dihedral:X-cd-nh-X @atom:* @atom:cd @atom:nh @atom:*
@dihedral:X-ca-no-X @atom:* @atom:ca @atom:no @atom:*
@dihedral:X-ca-oh-X @atom:* @atom:ca @atom:oh @atom:*
@dihedral:X-ca-os-X @atom:* @atom:ca @atom:os @atom:*
@dihedral:X-ca-p2-X @atom:* @atom:ca @atom:p2 @atom:*
@dihedral:X-ca-pe-X @atom:* @atom:ca @atom:pe @atom:*
@dihedral:X-ca-pf-X @atom:* @atom:ca @atom:pf @atom:*
@dihedral:X-ca-pc-X @atom:* @atom:ca @atom:pc @atom:*
@dihedral:X-ca-pd-X @atom:* @atom:ca @atom:pd @atom:*
@dihedral:X-ca-p3-X @atom:* @atom:ca @atom:p3 @atom:*
@dihedral:X-ca-p4-X @atom:* @atom:ca @atom:p4 @atom:*
@dihedral:X-ca-px-X @atom:* @atom:ca @atom:px @atom:*
@dihedral:X-ca-p5-X @atom:* @atom:ca @atom:p5 @atom:*
@dihedral:X-ca-py-X @atom:* @atom:ca @atom:py @atom:*
@dihedral:X-ca-sh-X @atom:* @atom:ca @atom:sh @atom:*
@dihedral:X-ca-ss-X @atom:* @atom:ca @atom:ss @atom:*
@dihedral:X-ca-s4-X @atom:* @atom:ca @atom:s4 @atom:*
@dihedral:X-ca-sx-X @atom:* @atom:ca @atom:sx @atom:*
@dihedral:X-ca-s6-X @atom:* @atom:ca @atom:s6 @atom:*
@dihedral:X-ca-sy-X @atom:* @atom:ca @atom:sy @atom:*
@dihedral:X-n-cc-X @atom:* @atom:n @atom:cc @atom:*
@dihedral:X-n-cd-X @atom:* @atom:n @atom:cd @atom:*
@dihedral:X-n-n-X @atom:* @atom:n @atom:n @atom:*
@dihedral:X-n-n2-X @atom:* @atom:n @atom:n2 @atom:*
@dihedral:X-n-ne-X @atom:* @atom:n @atom:ne @atom:*
@dihedral:X-n-nf-X @atom:* @atom:n @atom:nf @atom:*
@dihedral:X-n-n3-X @atom:* @atom:n @atom:n3 @atom:*
@dihedral:X-n-n4-X @atom:* @atom:n @atom:n4 @atom:*
@dihedral:X-n-na-X @atom:* @atom:n @atom:na @atom:*
@dihedral:X-n-nc-X @atom:* @atom:n @atom:nc @atom:*
@dihedral:X-n-nd-X @atom:* @atom:n @atom:nd @atom:*
@dihedral:X-n-nh-X @atom:* @atom:n @atom:nh @atom:*
@dihedral:X-n-no-X @atom:* @atom:n @atom:no @atom:*
@dihedral:X-n-oh-X @atom:* @atom:n @atom:oh @atom:*
@dihedral:X-n-os-X @atom:* @atom:n @atom:os @atom:*
@dihedral:X-n-p2-X @atom:* @atom:n @atom:p2 @atom:*
@dihedral:X-n-pe-X @atom:* @atom:n @atom:pe @atom:*
@dihedral:X-n-pf-X @atom:* @atom:n @atom:pf @atom:*
@dihedral:X-n-pc-X @atom:* @atom:n @atom:pc @atom:*
@dihedral:X-n-pd-X @atom:* @atom:n @atom:pd @atom:*
@dihedral:X-n-p3-X @atom:* @atom:n @atom:p3 @atom:*
@dihedral:X-n-p4-X @atom:* @atom:n @atom:p4 @atom:*
@dihedral:X-n-px-X @atom:* @atom:n @atom:px @atom:*
@dihedral:X-n-p5-X @atom:* @atom:n @atom:p5 @atom:*
@dihedral:X-n-py-X @atom:* @atom:n @atom:py @atom:*
@dihedral:X-n-sh-X @atom:* @atom:n @atom:sh @atom:*
@dihedral:X-n-ss-X @atom:* @atom:n @atom:ss @atom:*
@dihedral:X-n-s4-X @atom:* @atom:n @atom:s4 @atom:*
@dihedral:X-n-sx-X @atom:* @atom:n @atom:sx @atom:*
@dihedral:X-n-s6-X @atom:* @atom:n @atom:s6 @atom:*
@dihedral:X-n-sy-X @atom:* @atom:n @atom:sy @atom:*
@dihedral:X-n1-c2-X @atom:* @atom:n1 @atom:c2 @atom:*
@dihedral:X-n1-c3-X @atom:* @atom:n1 @atom:c3 @atom:*
@dihedral:X-n1-ca-X @atom:* @atom:n1 @atom:ca @atom:*
@dihedral:X-n1-cc-X @atom:* @atom:n1 @atom:cc @atom:*
@dihedral:X-n1-cd-X @atom:* @atom:n1 @atom:cd @atom:*
@dihedral:X-n1-ce-X @atom:* @atom:n1 @atom:ce @atom:*
@dihedral:X-n1-cf-X @atom:* @atom:n1 @atom:cf @atom:*
@dihedral:X-n1-cu-X @atom:* @atom:n1 @atom:cu @atom:*
@dihedral:X-n1-cv-X @atom:* @atom:n1 @atom:cv @atom:*
@dihedral:X-n1-cx-X @atom:* @atom:n1 @atom:cx @atom:*
@dihedral:X-n1-cy-X @atom:* @atom:n1 @atom:cy @atom:*
@dihedral:X-n1-n-X @atom:* @atom:n1 @atom:n @atom:*
@dihedral:X-n1-n1-X @atom:* @atom:n1 @atom:n1 @atom:*
@dihedral:X-n1-n2-X @atom:* @atom:n1 @atom:n2 @atom:*
@dihedral:X-n1-n3-X @atom:* @atom:n1 @atom:n3 @atom:*
@dihedral:X-n1-n4-X @atom:* @atom:n1 @atom:n4 @atom:*
@dihedral:X-n1-na-X @atom:* @atom:n1 @atom:na @atom:*
@dihedral:X-n1-nb-X @atom:* @atom:n1 @atom:nb @atom:*
@dihedral:X-n1-nc-X @atom:* @atom:n1 @atom:nc @atom:*
@dihedral:X-n1-nd-X @atom:* @atom:n1 @atom:nd @atom:*
@dihedral:X-n1-ne-X @atom:* @atom:n1 @atom:ne @atom:*
@dihedral:X-n1-nf-X @atom:* @atom:n1 @atom:nf @atom:*
@dihedral:X-n1-nh-X @atom:* @atom:n1 @atom:nh @atom:*
@dihedral:X-n1-no-X @atom:* @atom:n1 @atom:no @atom:*
@dihedral:X-n1-oh-X @atom:* @atom:n1 @atom:oh @atom:*
@dihedral:X-n1-os-X @atom:* @atom:n1 @atom:os @atom:*
@dihedral:X-n1-p2-X @atom:* @atom:n1 @atom:p2 @atom:*
@dihedral:X-n1-pb-X @atom:* @atom:n1 @atom:pb @atom:*
@dihedral:X-n1-pc-X @atom:* @atom:n1 @atom:pc @atom:*
@dihedral:X-n1-pd-X @atom:* @atom:n1 @atom:pd @atom:*
@dihedral:X-n1-pe-X @atom:* @atom:n1 @atom:pe @atom:*
@dihedral:X-n1-pf-X @atom:* @atom:n1 @atom:pf @atom:*
@dihedral:X-n1-p3-X @atom:* @atom:n1 @atom:p3 @atom:*
@dihedral:X-n1-p4-X @atom:* @atom:n1 @atom:p4 @atom:*
@dihedral:X-n1-px-X @atom:* @atom:n1 @atom:px @atom:*
@dihedral:X-n1-p5-X @atom:* @atom:n1 @atom:p5 @atom:*
@dihedral:X-n1-py-X @atom:* @atom:n1 @atom:py @atom:*
@dihedral:X-n1-s2-X @atom:* @atom:n1 @atom:s2 @atom:*
@dihedral:X-n1-sh-X @atom:* @atom:n1 @atom:sh @atom:*
@dihedral:X-n1-ss-X @atom:* @atom:n1 @atom:ss @atom:*
@dihedral:X-n1-s4-X @atom:* @atom:n1 @atom:s4 @atom:*
@dihedral:X-n1-sx-X @atom:* @atom:n1 @atom:sx @atom:*
@dihedral:X-n1-s6-X @atom:* @atom:n1 @atom:s6 @atom:*
@dihedral:X-n1-sy-X @atom:* @atom:n1 @atom:sy @atom:*
@dihedral:X-n2-n2-X @atom:* @atom:n2 @atom:n2 @atom:*
@dihedral:X-n2-n2-X @atom:* @atom:n2 @atom:n2 @atom:*
@dihedral:X-n2-ne-X @atom:* @atom:n2 @atom:ne @atom:*
@dihedral:X-n2-ne-X @atom:* @atom:n2 @atom:ne @atom:*
@dihedral:X-n2-nf-X @atom:* @atom:n2 @atom:nf @atom:*
@dihedral:X-n2-nf-X @atom:* @atom:n2 @atom:nf @atom:*
@dihedral:X-ne-nf-X @atom:* @atom:ne @atom:nf @atom:*
@dihedral:X-ne-nf-X @atom:* @atom:ne @atom:nf @atom:*
@dihedral:X-ne-ne-X @atom:* @atom:ne @atom:ne @atom:*
@dihedral:X-nf-nf-X @atom:* @atom:nf @atom:nf @atom:*
@dihedral:X-nc-nc-X @atom:* @atom:nc @atom:nc @atom:*
@dihedral:X-nd-nd-X @atom:* @atom:nd @atom:nd @atom:*
@dihedral:X-nc-nd-X @atom:* @atom:nc @atom:nd @atom:*
@dihedral:X-n2-nc-X @atom:* @atom:n2 @atom:nc @atom:*
@dihedral:X-n2-nc-X @atom:* @atom:n2 @atom:nc @atom:*
@dihedral:X-n2-nd-X @atom:* @atom:n2 @atom:nd @atom:*
@dihedral:X-n2-nd-X @atom:* @atom:n2 @atom:nd @atom:*
@dihedral:X-n2-n3-X @atom:* @atom:n2 @atom:n3 @atom:*
@dihedral:X-ne-n3-X @atom:* @atom:ne @atom:n3 @atom:*
@dihedral:X-nf-n3-X @atom:* @atom:nf @atom:n3 @atom:*
@dihedral:X-n2-n4-X @atom:* @atom:n2 @atom:n4 @atom:*
@dihedral:X-ne-n4-X @atom:* @atom:ne @atom:n4 @atom:*
@dihedral:X-nf-n4-X @atom:* @atom:nf @atom:n4 @atom:*
@dihedral:X-n2-na-X @atom:* @atom:n2 @atom:na @atom:*
@dihedral:X-ne-na-X @atom:* @atom:ne @atom:na @atom:*
@dihedral:X-nf-na-X @atom:* @atom:nf @atom:na @atom:*
@dihedral:X-na-nc-X @atom:* @atom:na @atom:nc @atom:*
@dihedral:X-na-nd-X @atom:* @atom:na @atom:nd @atom:*
@dihedral:X-n2-nh-X @atom:* @atom:n2 @atom:nh @atom:*
@dihedral:X-ne-nh-X @atom:* @atom:ne @atom:nh @atom:*
@dihedral:X-nf-nh-X @atom:* @atom:nf @atom:nh @atom:*
@dihedral:X-n2-no-X @atom:* @atom:n2 @atom:no @atom:*
@dihedral:X-ne-no-X @atom:* @atom:ne @atom:no @atom:*
@dihedral:X-nf-no-X @atom:* @atom:nf @atom:no @atom:*
@dihedral:X-n2-oh-X @atom:* @atom:n2 @atom:oh @atom:*
@dihedral:X-ne-oh-X @atom:* @atom:ne @atom:oh @atom:*
@dihedral:X-nf-oh-X @atom:* @atom:nf @atom:oh @atom:*
@dihedral:X-n2-os-X @atom:* @atom:n2 @atom:os @atom:*
@dihedral:X-ne-os-X @atom:* @atom:ne @atom:os @atom:*
@dihedral:X-nf-os-X @atom:* @atom:nf @atom:os @atom:*
@dihedral:X-nc-os-X @atom:* @atom:nc @atom:os @atom:*
@dihedral:X-nc-ss-X @atom:* @atom:nc @atom:ss @atom:*
@dihedral:X-n2-p2-X @atom:* @atom:n2 @atom:p2 @atom:*
@dihedral:X-n2-pe-X @atom:* @atom:n2 @atom:pe @atom:*
@dihedral:X-n2-pf-X @atom:* @atom:n2 @atom:pf @atom:*
@dihedral:X-ne-pf-X @atom:* @atom:ne @atom:pf @atom:*
@dihedral:X-n2-pc-X @atom:* @atom:n2 @atom:pc @atom:*
@dihedral:X-n2-pd-X @atom:* @atom:n2 @atom:pd @atom:*
@dihedral:X-nc-p2-X @atom:* @atom:nc @atom:p2 @atom:*
@dihedral:X-nd-p2-X @atom:* @atom:nd @atom:p2 @atom:*
@dihedral:X-nc-pc-X @atom:* @atom:nc @atom:pc @atom:*
@dihedral:X-nd-pd-X @atom:* @atom:nd @atom:pd @atom:*
@dihedral:X-nd-pc-X @atom:* @atom:nd @atom:pc @atom:*
@dihedral:X-nc-pd-X @atom:* @atom:nc @atom:pd @atom:*
@dihedral:X-ne-pe-X @atom:* @atom:ne @atom:pe @atom:*
@dihedral:X-nf-pf-X @atom:* @atom:nf @atom:pf @atom:*
@dihedral:X-n2-p3-X @atom:* @atom:n2 @atom:p3 @atom:*
@dihedral:X-n2-p4-X @atom:* @atom:n2 @atom:p4 @atom:*
@dihedral:X-ne-p4-X @atom:* @atom:ne @atom:p4 @atom:*
@dihedral:X-nf-p4-X @atom:* @atom:nf @atom:p4 @atom:*
@dihedral:X-n2-p5-X @atom:* @atom:n2 @atom:p5 @atom:*
@dihedral:X-ne-p5-X @atom:* @atom:ne @atom:p5 @atom:*
@dihedral:X-nf-p5-X @atom:* @atom:nf @atom:p5 @atom:*
@dihedral:X-ne-px-X @atom:* @atom:ne @atom:px @atom:*
@dihedral:X-nf-px-X @atom:* @atom:nf @atom:px @atom:*
@dihedral:X-n2-sh-X @atom:* @atom:n2 @atom:sh @atom:*
@dihedral:X-ne-sh-X @atom:* @atom:ne @atom:sh @atom:*
@dihedral:X-nf-sh-X @atom:* @atom:nf @atom:sh @atom:*
@dihedral:X-n2-ss-X @atom:* @atom:n2 @atom:ss @atom:*
@dihedral:X-n2-ss-X @atom:* @atom:n2 @atom:ss @atom:*
@dihedral:X-ne-ss-X @atom:* @atom:ne @atom:ss @atom:*
@dihedral:X-ne-ss-X @atom:* @atom:ne @atom:ss @atom:*
@dihedral:X-nf-ss-X @atom:* @atom:nf @atom:ss @atom:*
@dihedral:X-nf-ss-X @atom:* @atom:nf @atom:ss @atom:*
@dihedral:X-n2-s4-X @atom:* @atom:n2 @atom:s4 @atom:*
@dihedral:X-ne-sx-X @atom:* @atom:ne @atom:sx @atom:*
@dihedral:X-nf-sx-X @atom:* @atom:nf @atom:sx @atom:*
@dihedral:X-n2-s6-X @atom:* @atom:n2 @atom:s6 @atom:*
@dihedral:X-ne-sy-X @atom:* @atom:ne @atom:sy @atom:*
@dihedral:X-ne-sy-X @atom:* @atom:ne @atom:sy @atom:*
@dihedral:X-nf-sy-X @atom:* @atom:nf @atom:sy @atom:*
@dihedral:X-nf-sy-X @atom:* @atom:nf @atom:sy @atom:*
@dihedral:X-n3-n3-X @atom:* @atom:n3 @atom:n3 @atom:*
@dihedral:X-n3-n4-X @atom:* @atom:n3 @atom:n4 @atom:*
@dihedral:X-n3-na-X @atom:* @atom:n3 @atom:na @atom:*
@dihedral:X-n3-nh-X @atom:* @atom:n3 @atom:nh @atom:*
@dihedral:X-n3-no-X @atom:* @atom:n3 @atom:no @atom:*
@dihedral:X-n3-oh-X @atom:* @atom:n3 @atom:oh @atom:*
@dihedral:X-n3-os-X @atom:* @atom:n3 @atom:os @atom:*
@dihedral:X-n3-p2-X @atom:* @atom:n3 @atom:p2 @atom:*
@dihedral:X-n3-pe-X @atom:* @atom:n3 @atom:pe @atom:*
@dihedral:X-n3-pf-X @atom:* @atom:n3 @atom:pf @atom:*
@dihedral:X-n3-p3-X @atom:* @atom:n3 @atom:p3 @atom:*
@dihedral:X-n3-p4-X @atom:* @atom:n3 @atom:p4 @atom:*
@dihedral:X-n3-px-X @atom:* @atom:n3 @atom:px @atom:*
@dihedral:X-n3-p5-X @atom:* @atom:n3 @atom:p5 @atom:*
@dihedral:X-n3-py-X @atom:* @atom:n3 @atom:py @atom:*
@dihedral:X-n3-sh-X @atom:* @atom:n3 @atom:sh @atom:*
@dihedral:X-n3-ss-X @atom:* @atom:n3 @atom:ss @atom:*
@dihedral:X-n3-s4-X @atom:* @atom:n3 @atom:s4 @atom:*
@dihedral:X-n3-sx-X @atom:* @atom:n3 @atom:sx @atom:*
@dihedral:X-n3-s6-X @atom:* @atom:n3 @atom:s6 @atom:*
@dihedral:X-n3-sy-X @atom:* @atom:n3 @atom:sy @atom:*
@dihedral:X-n4-n4-X @atom:* @atom:n4 @atom:n4 @atom:*
@dihedral:X-n4-na-X @atom:* @atom:n4 @atom:na @atom:*
@dihedral:X-n4-nh-X @atom:* @atom:n4 @atom:nh @atom:*
@dihedral:X-n4-no-X @atom:* @atom:n4 @atom:no @atom:*
@dihedral:X-n4-oh-X @atom:* @atom:n4 @atom:oh @atom:*
@dihedral:X-n4-os-X @atom:* @atom:n4 @atom:os @atom:*
@dihedral:X-n4-p2-X @atom:* @atom:n4 @atom:p2 @atom:*
@dihedral:X-n4-pe-X @atom:* @atom:n4 @atom:pe @atom:*
@dihedral:X-n4-pf-X @atom:* @atom:n4 @atom:pf @atom:*
@dihedral:X-n4-p3-X @atom:* @atom:n4 @atom:p3 @atom:*
@dihedral:X-n4-p4-X @atom:* @atom:n4 @atom:p4 @atom:*
@dihedral:X-n4-px-X @atom:* @atom:n4 @atom:px @atom:*
@dihedral:X-n4-p5-X @atom:* @atom:n4 @atom:p5 @atom:*
@dihedral:X-n4-py-X @atom:* @atom:n4 @atom:py @atom:*
@dihedral:X-n4-sh-X @atom:* @atom:n4 @atom:sh @atom:*
@dihedral:X-n4-ss-X @atom:* @atom:n4 @atom:ss @atom:*
@dihedral:X-n4-s4-X @atom:* @atom:n4 @atom:s4 @atom:*
@dihedral:X-n4-sx-X @atom:* @atom:n4 @atom:sx @atom:*
@dihedral:X-n4-s6-X @atom:* @atom:n4 @atom:s6 @atom:*
@dihedral:X-n4-sy-X @atom:* @atom:n4 @atom:sy @atom:*
@dihedral:X-na-na-X @atom:* @atom:na @atom:na @atom:*
@dihedral:X-na-nh-X @atom:* @atom:na @atom:nh @atom:*
@dihedral:X-na-no-X @atom:* @atom:na @atom:no @atom:*
@dihedral:X-na-oh-X @atom:* @atom:na @atom:oh @atom:*
@dihedral:X-na-os-X @atom:* @atom:na @atom:os @atom:*
@dihedral:X-na-p2-X @atom:* @atom:na @atom:p2 @atom:*
@dihedral:X-na-pe-X @atom:* @atom:na @atom:pe @atom:*
@dihedral:X-na-pf-X @atom:* @atom:na @atom:pf @atom:*
@dihedral:X-na-p3-X @atom:* @atom:na @atom:p3 @atom:*
@dihedral:X-na-p4-X @atom:* @atom:na @atom:p4 @atom:*
@dihedral:X-na-px-X @atom:* @atom:na @atom:px @atom:*
@dihedral:X-na-p5-X @atom:* @atom:na @atom:p5 @atom:*
@dihedral:X-na-py-X @atom:* @atom:na @atom:py @atom:*
@dihedral:X-na-sh-X @atom:* @atom:na @atom:sh @atom:*
@dihedral:X-na-ss-X @atom:* @atom:na @atom:ss @atom:*
@dihedral:X-na-s4-X @atom:* @atom:na @atom:s4 @atom:*
@dihedral:X-na-sx-X @atom:* @atom:na @atom:sx @atom:*
@dihedral:X-na-s6-X @atom:* @atom:na @atom:s6 @atom:*
@dihedral:X-na-sy-X @atom:* @atom:na @atom:sy @atom:*
@dihedral:X-nh-nh-X @atom:* @atom:nh @atom:nh @atom:*
@dihedral:X-nh-no-X @atom:* @atom:nh @atom:no @atom:*
@dihedral:X-nh-oh-X @atom:* @atom:nh @atom:oh @atom:*
@dihedral:X-nh-os-X @atom:* @atom:nh @atom:os @atom:*
@dihedral:X-nh-p2-X @atom:* @atom:nh @atom:p2 @atom:*
@dihedral:X-nh-pe-X @atom:* @atom:nh @atom:pe @atom:*
@dihedral:X-nh-pf-X @atom:* @atom:nh @atom:pf @atom:*
@dihedral:X-nh-p3-X @atom:* @atom:nh @atom:p3 @atom:*
@dihedral:X-nh-p4-X @atom:* @atom:nh @atom:p4 @atom:*
@dihedral:X-nh-px-X @atom:* @atom:nh @atom:px @atom:*
@dihedral:X-nh-p5-X @atom:* @atom:nh @atom:p5 @atom:*
@dihedral:X-nh-py-X @atom:* @atom:nh @atom:py @atom:*
@dihedral:X-nh-sh-X @atom:* @atom:nh @atom:sh @atom:*
@dihedral:X-nh-ss-X @atom:* @atom:nh @atom:ss @atom:*
@dihedral:X-nh-s4-X @atom:* @atom:nh @atom:s4 @atom:*
@dihedral:X-nh-s4-X @atom:* @atom:nh @atom:s4 @atom:*
@dihedral:X-nh-sx-X @atom:* @atom:nh @atom:sx @atom:*
@dihedral:X-nh-sx-X @atom:* @atom:nh @atom:sx @atom:*
@dihedral:X-nh-s6-X @atom:* @atom:nh @atom:s6 @atom:*
@dihedral:X-nh-sy-X @atom:* @atom:nh @atom:sy @atom:*
@dihedral:X-no-no-X @atom:* @atom:no @atom:no @atom:*
@dihedral:X-no-no-X @atom:* @atom:no @atom:no @atom:*
@dihedral:X-no-oh-X @atom:* @atom:no @atom:oh @atom:*
@dihedral:X-no-os-X @atom:* @atom:no @atom:os @atom:*
@dihedral:X-no-p2-X @atom:* @atom:no @atom:p2 @atom:*
@dihedral:X-no-pe-X @atom:* @atom:no @atom:pe @atom:*
@dihedral:X-no-pf-X @atom:* @atom:no @atom:pf @atom:*
@dihedral:X-no-p3-X @atom:* @atom:no @atom:p3 @atom:*
@dihedral:X-no-p4-X @atom:* @atom:no @atom:p4 @atom:*
@dihedral:X-no-px-X @atom:* @atom:no @atom:px @atom:*
@dihedral:X-no-p5-X @atom:* @atom:no @atom:p5 @atom:*
@dihedral:X-no-p5-X @atom:* @atom:no @atom:p5 @atom:*
@dihedral:X-no-py-X @atom:* @atom:no @atom:py @atom:*
@dihedral:X-no-py-X @atom:* @atom:no @atom:py @atom:*
@dihedral:X-no-sh-X @atom:* @atom:no @atom:sh @atom:*
@dihedral:X-no-ss-X @atom:* @atom:no @atom:ss @atom:*
@dihedral:X-no-s4-X @atom:* @atom:no @atom:s4 @atom:*
@dihedral:X-no-sx-X @atom:* @atom:no @atom:sx @atom:*
@dihedral:X-no-s6-X @atom:* @atom:no @atom:s6 @atom:*
@dihedral:X-no-sy-X @atom:* @atom:no @atom:sy @atom:*
@dihedral:X-oh-oh-X @atom:* @atom:oh @atom:oh @atom:*
@dihedral:X-oh-os-X @atom:* @atom:oh @atom:os @atom:*
@dihedral:X-oh-p2-X @atom:* @atom:oh @atom:p2 @atom:*
@dihedral:X-oh-pe-X @atom:* @atom:oh @atom:pe @atom:*
@dihedral:X-oh-pf-X @atom:* @atom:oh @atom:pf @atom:*
@dihedral:X-oh-p3-X @atom:* @atom:oh @atom:p3 @atom:*
@dihedral:X-oh-p4-X @atom:* @atom:oh @atom:p4 @atom:*
@dihedral:X-oh-px-X @atom:* @atom:oh @atom:px @atom:*
@dihedral:X-oh-p5-X @atom:* @atom:oh @atom:p5 @atom:*
@dihedral:X-oh-py-X @atom:* @atom:oh @atom:py @atom:*
@dihedral:X-oh-sh-X @atom:* @atom:oh @atom:sh @atom:*
@dihedral:X-oh-ss-X @atom:* @atom:oh @atom:ss @atom:*
@dihedral:X-oh-s4-X @atom:* @atom:oh @atom:s4 @atom:*
@dihedral:X-oh-sx-X @atom:* @atom:oh @atom:sx @atom:*
@dihedral:X-oh-s6-X @atom:* @atom:oh @atom:s6 @atom:*
@dihedral:X-oh-sy-X @atom:* @atom:oh @atom:sy @atom:*
@dihedral:X-os-os-X @atom:* @atom:os @atom:os @atom:*
@dihedral:X-os-ss-X @atom:* @atom:os @atom:ss @atom:*
@dihedral:X-os-sh-X @atom:* @atom:os @atom:sh @atom:*
@dihedral:X-os-s4-X @atom:* @atom:os @atom:s4 @atom:*
@dihedral:X-os-sx-X @atom:* @atom:os @atom:sx @atom:*
@dihedral:X-os-s6-X @atom:* @atom:os @atom:s6 @atom:*
@dihedral:X-os-sy-X @atom:* @atom:os @atom:sy @atom:*
@dihedral:X-os-p2-X @atom:* @atom:os @atom:p2 @atom:*
@dihedral:X-os-p2-X @atom:* @atom:os @atom:p2 @atom:*
@dihedral:X-os-pe-X @atom:* @atom:os @atom:pe @atom:*
@dihedral:X-os-pe-X @atom:* @atom:os @atom:pe @atom:*
@dihedral:X-os-pf-X @atom:* @atom:os @atom:pf @atom:*
@dihedral:X-os-pf-X @atom:* @atom:os @atom:pf @atom:*
@dihedral:X-os-p3-X @atom:* @atom:os @atom:p3 @atom:*
@dihedral:X-os-p4-X @atom:* @atom:os @atom:p4 @atom:*
@dihedral:X-os-px-X @atom:* @atom:os @atom:px @atom:*
@dihedral:X-os-p5-X @atom:* @atom:os @atom:p5 @atom:*
@dihedral:X-os-py-X @atom:* @atom:os @atom:py @atom:*
@dihedral:X-p2-p2-X @atom:* @atom:p2 @atom:p2 @atom:*
@dihedral:X-p2-pe-X @atom:* @atom:p2 @atom:pe @atom:*
@dihedral:X-p2-pf-X @atom:* @atom:p2 @atom:pf @atom:*
@dihedral:X-p2-pc-X @atom:* @atom:p2 @atom:pc @atom:*
@dihedral:X-p2-pd-X @atom:* @atom:p2 @atom:pd @atom:*
@dihedral:X-pe-pe-X @atom:* @atom:pe @atom:pe @atom:*
@dihedral:X-pf-pf-X @atom:* @atom:pf @atom:pf @atom:*
@dihedral:X-pc-pc-X @atom:* @atom:pc @atom:pc @atom:*
@dihedral:X-pd-pd-X @atom:* @atom:pd @atom:pd @atom:*
@dihedral:X-pc-pd-X @atom:* @atom:pc @atom:pd @atom:*
@dihedral:X-p2-p3-X @atom:* @atom:p2 @atom:p3 @atom:*
@dihedral:X-pe-p3-X @atom:* @atom:pe @atom:p3 @atom:*
@dihedral:X-pf-p3-X @atom:* @atom:pf @atom:p3 @atom:*
@dihedral:X-p2-p4-X @atom:* @atom:p2 @atom:p4 @atom:*
@dihedral:X-pe-px-X @atom:* @atom:pe @atom:px @atom:*
@dihedral:X-pf-px-X @atom:* @atom:pf @atom:px @atom:*
@dihedral:X-p2-p5-X @atom:* @atom:p2 @atom:p5 @atom:*
@dihedral:X-pe-py-X @atom:* @atom:pe @atom:py @atom:*
@dihedral:X-pf-py-X @atom:* @atom:pf @atom:py @atom:*
@dihedral:X-p2-sh-X @atom:* @atom:p2 @atom:sh @atom:*
@dihedral:X-pe-sh-X @atom:* @atom:pe @atom:sh @atom:*
@dihedral:X-pf-sh-X @atom:* @atom:pf @atom:sh @atom:*
@dihedral:X-p2-ss-X @atom:* @atom:p2 @atom:ss @atom:*
@dihedral:X-pe-ss-X @atom:* @atom:pe @atom:ss @atom:*
@dihedral:X-pf-ss-X @atom:* @atom:pf @atom:ss @atom:*
@dihedral:X-p2-s4-X @atom:* @atom:p2 @atom:s4 @atom:*
@dihedral:X-pe-sx-X @atom:* @atom:pe @atom:sx @atom:*
@dihedral:X-pf-sx-X @atom:* @atom:pf @atom:sx @atom:*
@dihedral:X-p2-s6-X @atom:* @atom:p2 @atom:s6 @atom:*
@dihedral:X-pe-sy-X @atom:* @atom:pe @atom:sy @atom:*
@dihedral:X-pf-sy-X @atom:* @atom:pf @atom:sy @atom:*
@dihedral:X-p3-p3-X @atom:* @atom:p3 @atom:p3 @atom:*
@dihedral:X-p3-p4-X @atom:* @atom:p3 @atom:p4 @atom:*
@dihedral:X-p3-px-X @atom:* @atom:p3 @atom:px @atom:*
@dihedral:X-p3-p5-X @atom:* @atom:p3 @atom:p5 @atom:*
@dihedral:X-p3-py-X @atom:* @atom:p3 @atom:py @atom:*
@dihedral:X-p3-sh-X @atom:* @atom:p3 @atom:sh @atom:*
@dihedral:X-p3-ss-X @atom:* @atom:p3 @atom:ss @atom:*
@dihedral:X-p3-s4-X @atom:* @atom:p3 @atom:s4 @atom:*
@dihedral:X-p3-sx-X @atom:* @atom:p3 @atom:sx @atom:*
@dihedral:X-p3-s6-X @atom:* @atom:p3 @atom:s6 @atom:*
@dihedral:X-p3-sy-X @atom:* @atom:p3 @atom:sy @atom:*
@dihedral:X-p4-p4-X @atom:* @atom:p4 @atom:p4 @atom:*
@dihedral:X-px-px-X @atom:* @atom:px @atom:px @atom:*
@dihedral:X-p4-p5-X @atom:* @atom:p4 @atom:p5 @atom:*
@dihedral:X-px-py-X @atom:* @atom:px @atom:py @atom:*
@dihedral:X-p4-s4-X @atom:* @atom:p4 @atom:s4 @atom:*
@dihedral:X-px-sx-X @atom:* @atom:px @atom:sx @atom:*
@dihedral:X-p4-s6-X @atom:* @atom:p4 @atom:s6 @atom:*
@dihedral:X-px-sy-X @atom:* @atom:px @atom:sy @atom:*
@dihedral:X-p4-sh-X @atom:* @atom:p4 @atom:sh @atom:*
@dihedral:X-px-sh-X @atom:* @atom:px @atom:sh @atom:*
@dihedral:X-p4-ss-X @atom:* @atom:p4 @atom:ss @atom:*
@dihedral:X-px-ss-X @atom:* @atom:px @atom:ss @atom:*
@dihedral:X-p5-p5-X @atom:* @atom:p5 @atom:p5 @atom:*
@dihedral:X-py-py-X @atom:* @atom:py @atom:py @atom:*
@dihedral:X-p5-sh-X @atom:* @atom:p5 @atom:sh @atom:*
@dihedral:X-py-sh-X @atom:* @atom:py @atom:sh @atom:*
@dihedral:X-p5-ss-X @atom:* @atom:p5 @atom:ss @atom:*
@dihedral:X-py-ss-X @atom:* @atom:py @atom:ss @atom:*
@dihedral:X-p5-s4-X @atom:* @atom:p5 @atom:s4 @atom:*
@dihedral:X-py-sx-X @atom:* @atom:py @atom:sx @atom:*
@dihedral:X-p5-s6-X @atom:* @atom:p5 @atom:s6 @atom:*
@dihedral:X-py-sy-X @atom:* @atom:py @atom:sy @atom:*
@dihedral:X-sh-sh-X @atom:* @atom:sh @atom:sh @atom:*
@dihedral:X-sh-ss-X @atom:* @atom:sh @atom:ss @atom:*
@dihedral:X-sh-s4-X @atom:* @atom:sh @atom:s4 @atom:*
@dihedral:X-sh-sx-X @atom:* @atom:sh @atom:sx @atom:*
@dihedral:X-sh-s6-X @atom:* @atom:sh @atom:s6 @atom:*
@dihedral:X-sh-sy-X @atom:* @atom:sh @atom:sy @atom:*
@dihedral:X-ss-ss-X @atom:* @atom:ss @atom:ss @atom:*
@dihedral:X-ss-s4-X @atom:* @atom:ss @atom:s4 @atom:*
@dihedral:X-ss-sx-X @atom:* @atom:ss @atom:sx @atom:*
@dihedral:X-ss-s6-X @atom:* @atom:ss @atom:s6 @atom:*
@dihedral:X-ss-sy-X @atom:* @atom:ss @atom:sy @atom:*
@dihedral:X-s4-s4-X @atom:* @atom:s4 @atom:s4 @atom:*
@dihedral:X-sx-sx-X @atom:* @atom:sx @atom:sx @atom:*
@dihedral:X-s4-s6-X @atom:* @atom:s4 @atom:s6 @atom:*
@dihedral:X-sx-sy-X @atom:* @atom:sx @atom:sy @atom:*
@dihedral:X-s6-s6-X @atom:* @atom:s6 @atom:s6 @atom:*
@dihedral:X-sy-sy-X @atom:* @atom:sy @atom:sy @atom:*
@dihedral:X-cf-pe-X @atom:* @atom:cf @atom:pe @atom:*
@dihedral:X-nd-os-X @atom:* @atom:nd @atom:os @atom:*
@dihedral:X-nd-ss-X @atom:* @atom:nd @atom:ss @atom:*
@dihedral:X-nf-pe-X @atom:* @atom:nf @atom:pe @atom:*
@dihedral:c3-c-sh-hs @atom:c3 @atom:c @atom:sh @atom:hs
@dihedral:c3-c-sh-hs @atom:c3 @atom:c @atom:sh @atom:hs
@dihedral:c2-c2-ss-c3 @atom:c2 @atom:c2 @atom:ss @atom:c3
@dihedral:c2-c2-ss-c3 @atom:c2 @atom:c2 @atom:ss @atom:c3
@dihedral:c2-c2-n-c @atom:c2 @atom:c2 @atom:n @atom:c
@dihedral:c2-c2-n-c @atom:c2 @atom:c2 @atom:n @atom:c
@dihedral:c-n-p2-c2 @atom:c @atom:n @atom:p2 @atom:c2
@dihedral:c-n-p2-c2 @atom:c @atom:n @atom:p2 @atom:c2
@dihedral:n-c3-c-n @atom:n @atom:c3 @atom:c @atom:n
@dihedral:n-c3-c-n @atom:n @atom:c3 @atom:c @atom:n
@dihedral:c-n-c3-c @atom:c @atom:n @atom:c3 @atom:c
@dihedral:c-n-c3-c @atom:c @atom:n @atom:c3 @atom:c
@dihedral:c3-c3-n-c @atom:c3 @atom:c3 @atom:n @atom:c
@dihedral:c3-c3-n-c @atom:c3 @atom:c3 @atom:n @atom:c
@dihedral:c3-c3-n-c @atom:c3 @atom:c3 @atom:n @atom:c
@dihedral:c3-c3-c-n @atom:c3 @atom:c3 @atom:c @atom:n
@dihedral:c3-c3-c-n @atom:c3 @atom:c3 @atom:c @atom:n
@dihedral:c2-ne-p5-o @atom:c2 @atom:ne @atom:p5 @atom:o
@dihedral:c2-ne-p5-o @atom:c2 @atom:ne @atom:p5 @atom:o
@dihedral:c2-nf-p5-o @atom:c2 @atom:nf @atom:p5 @atom:o
@dihedral:c2-nf-p5-o @atom:c2 @atom:nf @atom:p5 @atom:o
@dihedral:ce-ne-p5-o @atom:ce @atom:ne @atom:p5 @atom:o
@dihedral:ce-ne-p5-o @atom:ce @atom:ne @atom:p5 @atom:o
@dihedral:ce-nf-p5-o @atom:ce @atom:nf @atom:p5 @atom:o
@dihedral:ce-nf-p5-o @atom:ce @atom:nf @atom:p5 @atom:o
@dihedral:cf-ne-p5-o @atom:cf @atom:ne @atom:p5 @atom:o
@dihedral:cf-ne-p5-o @atom:cf @atom:ne @atom:p5 @atom:o
@dihedral:cf-nf-p5-o @atom:cf @atom:nf @atom:p5 @atom:o
@dihedral:cf-nf-p5-o @atom:cf @atom:nf @atom:p5 @atom:o
@dihedral:hn-n-c-o @atom:hn @atom:n @atom:c @atom:o
@dihedral:hn-n-c-o @atom:hn @atom:n @atom:c @atom:o
@dihedral:c3-ss-ss-c3 @atom:c3 @atom:ss @atom:ss @atom:c3
@dihedral:c3-ss-ss-c3 @atom:c3 @atom:ss @atom:ss @atom:c3
@dihedral:c3-n3-nh-ca @atom:c3 @atom:n3 @atom:nh @atom:ca
@dihedral:c3-n3-nh-ca @atom:c3 @atom:n3 @atom:nh @atom:ca
@dihedral:c3-n3-p5-o @atom:c3 @atom:n3 @atom:p5 @atom:o
@dihedral:c3-n3-p5-o @atom:c3 @atom:n3 @atom:p5 @atom:o
@dihedral:ca-nh-oh-ho @atom:ca @atom:nh @atom:oh @atom:ho
@dihedral:ca-nh-oh-ho @atom:ca @atom:nh @atom:oh @atom:ho
@dihedral:oh-p5-os-c3 @atom:oh @atom:p5 @atom:os @atom:c3
@dihedral:oh-p5-os-c3 @atom:oh @atom:p5 @atom:os @atom:c3
@dihedral:os-p5-os-c3 @atom:os @atom:p5 @atom:os @atom:c3
@dihedral:os-p5-os-c3 @atom:os @atom:p5 @atom:os @atom:c3
@dihedral:h1-c3-c-o @atom:h1 @atom:c3 @atom:c @atom:o
@dihedral:h1-c3-c-o @atom:h1 @atom:c3 @atom:c @atom:o
@dihedral:hc-c3-c-o @atom:hc @atom:c3 @atom:c @atom:o
@dihedral:hc-c3-c-o @atom:hc @atom:c3 @atom:c @atom:o
@dihedral:hc-c3-c3-hc @atom:hc @atom:c3 @atom:c3 @atom:hc
@dihedral:hc-c3-c3-c3 @atom:hc @atom:c3 @atom:c3 @atom:c3
@dihedral:hc-c3-c2-c2 @atom:hc @atom:c3 @atom:c2 @atom:c2
@dihedral:hc-c3-c2-c2 @atom:hc @atom:c3 @atom:c2 @atom:c2
@dihedral:ho-oh-c3-c3 @atom:ho @atom:oh @atom:c3 @atom:c3
@dihedral:ho-oh-c3-c3 @atom:ho @atom:oh @atom:c3 @atom:c3
@dihedral:ho-oh-c-o @atom:ho @atom:oh @atom:c @atom:o
@dihedral:ho-oh-c-o @atom:ho @atom:oh @atom:c @atom:o
@dihedral:c2-c2-c-o @atom:c2 @atom:c2 @atom:c @atom:o
@dihedral:c2-c2-c-o @atom:c2 @atom:c2 @atom:c @atom:o
@dihedral:c3-c2-c2-c3 @atom:c3 @atom:c2 @atom:c2 @atom:c3
@dihedral:c3-c2-c2-c3 @atom:c3 @atom:c2 @atom:c2 @atom:c3
@dihedral:c3-c3-c3-c3 @atom:c3 @atom:c3 @atom:c3 @atom:c3
@dihedral:c3-c3-c3-c3 @atom:c3 @atom:c3 @atom:c3 @atom:c3
@dihedral:c3-c3-c3-c3 @atom:c3 @atom:c3 @atom:c3 @atom:c3
@dihedral:c3-c3-n3-c3 @atom:c3 @atom:c3 @atom:n3 @atom:c3
@dihedral:c3-c3-n3-c3 @atom:c3 @atom:c3 @atom:n3 @atom:c3
@dihedral:c3-c3-os-c3 @atom:c3 @atom:c3 @atom:os @atom:c3
@dihedral:c3-c3-os-c3 @atom:c3 @atom:c3 @atom:os @atom:c3
@dihedral:c3-c3-os-c @atom:c3 @atom:c3 @atom:os @atom:c
@dihedral:c3-c3-os-c @atom:c3 @atom:c3 @atom:os @atom:c
@dihedral:c3-os-c3-os @atom:c3 @atom:os @atom:c3 @atom:os
@dihedral:c3-os-c3-os @atom:c3 @atom:os @atom:c3 @atom:os
@dihedral:c3-os-c3-os @atom:c3 @atom:os @atom:c3 @atom:os
@dihedral:c3-os-c3-na @atom:c3 @atom:os @atom:c3 @atom:na
@dihedral:c3-os-c3-na @atom:c3 @atom:os @atom:c3 @atom:na
@dihedral:o-c-os-c3 @atom:o @atom:c @atom:os @atom:c3
@dihedral:o-c-os-c3 @atom:o @atom:c @atom:os @atom:c3
@dihedral:os-c3-na-c2 @atom:os @atom:c3 @atom:na @atom:c2
@dihedral:os-c3-na-c2 @atom:os @atom:c3 @atom:na @atom:c2
@dihedral:os-c3-c3-os @atom:os @atom:c3 @atom:c3 @atom:os
@dihedral:os-c3-c3-os @atom:os @atom:c3 @atom:c3 @atom:os
@dihedral:os-c3-c3-oh @atom:os @atom:c3 @atom:c3 @atom:oh
@dihedral:os-c3-c3-oh @atom:os @atom:c3 @atom:c3 @atom:oh
@dihedral:oh-c3-c3-oh @atom:oh @atom:c3 @atom:c3 @atom:oh
@dihedral:oh-c3-c3-oh @atom:oh @atom:c3 @atom:c3 @atom:oh
@dihedral:f-c3-c3-f @atom:f @atom:c3 @atom:c3 @atom:f
@dihedral:f-c3-c3-f @atom:f @atom:c3 @atom:c3 @atom:f
@dihedral:cl-c3-c3-cl @atom:cl @atom:c3 @atom:c3 @atom:cl
@dihedral:cl-c3-c3-cl @atom:cl @atom:c3 @atom:c3 @atom:cl
@dihedral:br-c3-c3-br @atom:br @atom:c3 @atom:c3 @atom:br
@dihedral:br-c3-c3-br @atom:br @atom:c3 @atom:c3 @atom:br
@dihedral:h1-c3-c3-os @atom:h1 @atom:c3 @atom:c3 @atom:os
@dihedral:h1-c3-c3-os @atom:h1 @atom:c3 @atom:c3 @atom:os
@dihedral:h1-c3-c3-oh @atom:h1 @atom:c3 @atom:c3 @atom:oh
@dihedral:h1-c3-c3-oh @atom:h1 @atom:c3 @atom:c3 @atom:oh
@dihedral:h1-c3-c3-f @atom:h1 @atom:c3 @atom:c3 @atom:f
@dihedral:h1-c3-c3-f @atom:h1 @atom:c3 @atom:c3 @atom:f
@dihedral:h1-c3-c3-cl @atom:h1 @atom:c3 @atom:c3 @atom:cl
@dihedral:h1-c3-c3-cl @atom:h1 @atom:c3 @atom:c3 @atom:cl
@dihedral:h1-c3-c3-br @atom:h1 @atom:c3 @atom:c3 @atom:br
@dihedral:h1-c3-c3-br @atom:h1 @atom:c3 @atom:c3 @atom:br
@dihedral:hc-c3-c3-os @atom:hc @atom:c3 @atom:c3 @atom:os
@dihedral:hc-c3-c3-os @atom:hc @atom:c3 @atom:c3 @atom:os
@dihedral:hc-c3-c3-oh @atom:hc @atom:c3 @atom:c3 @atom:oh
@dihedral:hc-c3-c3-oh @atom:hc @atom:c3 @atom:c3 @atom:oh
@dihedral:hc-c3-c3-f @atom:hc @atom:c3 @atom:c3 @atom:f
@dihedral:hc-c3-c3-f @atom:hc @atom:c3 @atom:c3 @atom:f
@dihedral:hc-c3-c3-cl @atom:hc @atom:c3 @atom:c3 @atom:cl
@dihedral:hc-c3-c3-cl @atom:hc @atom:c3 @atom:c3 @atom:cl
@dihedral:hc-c3-c3-br @atom:hc @atom:c3 @atom:c3 @atom:br
@dihedral:hc-c3-c3-br @atom:hc @atom:c3 @atom:c3 @atom:br
} # (end of Dihedrals By Type)
write_once("In Settings") {
improper_coeff @improper:X-o-c-o cvff 1.1 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-X-c-o cvff 10.5 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-X-ca-ha cvff 1.1 -1 2 # bsd.on C6H6 nmodes
improper_coeff @improper:X-X-n-hn cvff 1.1 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-X-n2-hn cvff 1.1 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-X-na-hn cvff 1.1 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-c3-n-c3 cvff 1.1 -1 2 # JCC,7,(1986),230
improper_coeff @improper:X-n2-ca-n2 cvff 10.5 -1 2 # JCC,7,(1986),230
improper_coeff @improper:c-c2-c2-c3 cvff 1.1 -1 2 # dac guess, 9/94
improper_coeff @improper:c-ca-ca-c3 cvff 1.1 -1 2 # dac guess, 9/94
improper_coeff @improper:c-c3-n-hn cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:c-c3-n-o cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:c2-c2-na-c3 cvff 1.1 -1 2 #
improper_coeff @improper:c2-c-c2-c3 cvff 1.1 -1 2 #
improper_coeff @improper:c2-c3-c2-hc cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:c2-c3-ca-hc cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:c2-hc-c-o cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:c3-o-c-oh cvff 1.1 -1 2 #
improper_coeff @improper:c3-c2-c2-n2 cvff 1.1 -1 2 #
improper_coeff @improper:c3-c2-c2-na cvff 1.1 -1 2 #
improper_coeff @improper:c3-ca-ca-n2 cvff 1.1 -1 2 #
improper_coeff @improper:c3-ca-ca-na cvff 1.1 -1 2 #
improper_coeff @improper:ca-ca-ca-c2 cvff 1.1 -1 2 #
improper_coeff @improper:ca-ca-ca-c3 cvff 1.1 -1 2 #
improper_coeff @improper:ca-ca-ca-f cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:ca-ca-ca-cl cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:ca-ca-ca-br cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:ca-ca-ca-i cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:ca-ca-c-oh cvff 1.1 -1 2 # (not used in tyr!)
improper_coeff @improper:ca-ca-na-c3 cvff 1.1 -1 2 #
improper_coeff @improper:ca-c-ca-c3 cvff 1.1 -1 2 #
improper_coeff @improper:ca-hc-c-o cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:ca-n2-ca-n2 cvff 1.1 -1 2 # dac, 10/94
improper_coeff @improper:hc-o-c-oh cvff 1.1 -1 2 # Junmei et al.1999
improper_coeff @improper:hc-o-c-os cvff 1.1 -1 2 #
improper_coeff @improper:n2-c2-ca-n2 cvff 1.1 -1 2 # dac guess, 9/94
improper_coeff @improper:n2-ca-ca-n2 cvff 1.1 -1 2 # dac guess, 9/94
improper_coeff @improper:na-n2-ca-n2 cvff 1.1 -1 2 # dac, 10/94
} # (end of improper_coeffs)
write_once("Data Impropers By Type (gaff_imp.py)") {
@improper:X-o-c-o @atom:* @atom:o @atom:c @atom:o
@improper:X-X-c-o @atom:* @atom:* @atom:c @atom:o
@improper:X-X-ca-ha @atom:* @atom:* @atom:ca @atom:ha
@improper:X-X-n-hn @atom:* @atom:* @atom:n @atom:hn
@improper:X-X-n2-hn @atom:* @atom:* @atom:n2 @atom:hn
@improper:X-X-na-hn @atom:* @atom:* @atom:na @atom:hn
@improper:X-c3-n-c3 @atom:* @atom:c3 @atom:n @atom:c3
@improper:X-n2-ca-n2 @atom:* @atom:n2 @atom:ca @atom:n2
@improper:c-c2-c2-c3 @atom:c @atom:c2 @atom:c2 @atom:c3
@improper:c-ca-ca-c3 @atom:c @atom:ca @atom:ca @atom:c3
@improper:c-c3-n-hn @atom:c @atom:c3 @atom:n @atom:hn
@improper:c-c3-n-o @atom:c @atom:c3 @atom:n @atom:o
@improper:c2-c2-na-c3 @atom:c2 @atom:c2 @atom:na @atom:c3
@improper:c2-c-c2-c3 @atom:c2 @atom:c @atom:c2 @atom:c3
@improper:c2-c3-c2-hc @atom:c2 @atom:c3 @atom:c2 @atom:hc
@improper:c2-c3-ca-hc @atom:c2 @atom:c3 @atom:ca @atom:hc
@improper:c2-hc-c-o @atom:c2 @atom:hc @atom:c @atom:o
@improper:c3-o-c-oh @atom:c3 @atom:o @atom:c @atom:oh
@improper:c3-c2-c2-n2 @atom:c3 @atom:c2 @atom:c2 @atom:n2
@improper:c3-c2-c2-na @atom:c3 @atom:c2 @atom:c2 @atom:na
@improper:c3-ca-ca-n2 @atom:c3 @atom:ca @atom:ca @atom:n2
@improper:c3-ca-ca-na @atom:c3 @atom:ca @atom:ca @atom:na
@improper:ca-ca-ca-c2 @atom:ca @atom:ca @atom:ca @atom:c2
@improper:ca-ca-ca-c3 @atom:ca @atom:ca @atom:ca @atom:c3
@improper:ca-ca-ca-f @atom:ca @atom:ca @atom:ca @atom:f
@improper:ca-ca-ca-cl @atom:ca @atom:ca @atom:ca @atom:cl
@improper:ca-ca-ca-br @atom:ca @atom:ca @atom:ca @atom:br
@improper:ca-ca-ca-i @atom:ca @atom:ca @atom:ca @atom:i
@improper:ca-ca-c-oh @atom:ca @atom:ca @atom:c @atom:oh
@improper:ca-ca-na-c3 @atom:ca @atom:ca @atom:na @atom:c3
@improper:ca-c-ca-c3 @atom:ca @atom:c @atom:ca @atom:c3
@improper:ca-hc-c-o @atom:ca @atom:hc @atom:c @atom:o
@improper:ca-n2-ca-n2 @atom:ca @atom:n2 @atom:ca @atom:n2
@improper:hc-o-c-oh @atom:hc @atom:o @atom:c @atom:oh
@improper:hc-o-c-os @atom:hc @atom:o @atom:c @atom:os
@improper:n2-c2-ca-n2 @atom:n2 @atom:c2 @atom:ca @atom:n2
@improper:n2-ca-ca-n2 @atom:n2 @atom:ca @atom:ca @atom:n2
@improper:na-n2-ca-n2 @atom:na @atom:n2 @atom:ca @atom:n2
} # (end of Impropers By Type)
write_once("In Init") {
# Default styles and settings for AMBER based force-fields:
units real
atom_style full
bond_style hybrid harmonic
angle_style hybrid harmonic
dihedral_style hybrid fourier
improper_style hybrid cvff
pair_style hybrid lj/charmm/coul/long 9.0 10.0 10.0
kspace_style pppm 0.0001
# NOTE: If you do not want to use long-range coulombic forces,
# comment out the two lines above and uncomment this line:
# pair_style hybrid lj/charmm/coul/charmm 9.0 10.0
pair_modify mix arithmetic
special_bonds amber
}
}
diff --git a/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/README_realistic_junctions.txt b/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/README_realistic_junctions.txt
new file mode 100644
index 000000000..432a7b7ad
--- /dev/null
+++ b/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/README_realistic_junctions.txt
@@ -0,0 +1,22 @@
+ WARNING: A reader has emailed me to point out:
+
+ THIS IS NOT A REALISTIC MODEL OF A GRAPHENE-NANOTUBE JUNCTION.
+ A real junction would likely be curved near the boundary,
+ not a 90 degree junction. (Although both graphene and nanotubes
+ consist of hexagons of carbon atoms, you would need 6 heptagons
+ near the junction between the nanotube and the graphene
+ to account for the negative Gaussian curvature there).
+
+ To solve this problem:
+ Moltemplate allows you to move, add, customize or delete individual
+ atoms near the boundary. You can move atoms by overwriting their
+ coordinates using additional write("Data Atoms") statements (after
+ the walls and tube are created). You can also adjust their partial charge.
+
+ Alternately, you could start with the structure provided here, add or delete
+ atoms if necessary, and relax/minimize the coordinates of the carbon
+ atoms using LAMMPS. You could also run a high temperature annealing
+ simulation to relax their positions. If it helps, the AIREBO
+ force-field has used in LAMMPS to simulate carbon nanotubes breaking:
+ http://scitation.aip.org/content/aip/journal/jcp/134/20/10.1063/1.3594197
+ http://lammps.sandia.gov/pictures.html#cnt
diff --git a/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/moltemplate_files/graphene_walls.lt b/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/moltemplate_files/graphene_walls.lt
index 249449ce6..888b9cce8 100644
--- a/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/moltemplate_files/graphene_walls.lt
+++ b/tools/moltemplate/examples/all_atom_examples/force_field_explicit/nanotube+water/moltemplate_files/graphene_walls.lt
@@ -1,55 +1,57 @@
import "graphene.lt"
# -------------- graphene sheet -----------------
# Notes:
# Hexagonal lattice with:
# d = length of each hexagonal side = 1.42 Angstroms
# L = length of each hexagon = 2*d = 2.84 Angstroms
# W = width of each hexagon = 2*d*sqrt(3)/2 = 2.4595121467478 Angstroms
# w = width of hexagon rows = 1.5*d = 2.13 Angstroms
Wall {
unitcells = new Graphene [14].move(1.2297560733739, 2.13, 0)
[13].move(2.4595121467478, 0, 0)
unitcells[*][*].move(-24.595121467478, -14.91, 0.000)
# Now cut a hole in the graphene sheet roughly where the nanotube is located
delete unitcells[5][7-8] # delete 2 unit cells (2 atoms each, 4 atoms total)
delete unitcells[6][6-8] # delete 3 unit cells (2 atoms each, 6 atoms total)
delete unitcells[7][5-8] # delete 4 unit cells (2 atoms each, 8 atoms total)
delete unitcells[8][5-7] # delete 3 unit cells (2 atoms each, 6 atoms total)
delete unitcells[9][5-6] # delete 2 unit cells (2 atoms each, 4 atoms total)
# Optional fine tuning: delete a few additional atoms around the edges
delete unitcells[5][6]/C2 # delete a single atom
delete unitcells[6][5]/C2 # delete a single atom
delete unitcells[6][9]/C1 # delete a single atom
delete unitcells[8][4]/C2 # delete a single atom
delete unitcells[8][8]/C1 # delete a single atom
delete unitcells[9][7]/C1 # delete a single atom
}
# Make two copies of the wall, and place them on either end of the nanotube
wall1 = new Wall.move(0, 0, 32.0)
wall2 = new Wall.move(0, 0, 58.26)
-
-# WARNING: A reader has emailed me to point out that:
-# THIS IS NOT A REALISTIC MODEL OF A GRAPHENE-NANOTUBE JUNCTION.
-# A real junction would be curved and deformed near the boundary,
-# (not 90 degrees) and it would not be built entirely from hexagons.
-# (This is not a problem in this example because the carbon atoms
-# are immobilized.) If you want to simulate the behavior of
-# real graphene or nanotube junctions, you must be more careful.
-# To solve this problem:
-# Moltemplate allows you to move, customize or delete individual
-# atoms near the boundary. You can move atoms by overwriting their
-# coordinates using additional write("Data Atoms") statements (after
-# the walls and tube are created). You can also change their charge.
-# Alternately, you could start with the structure provided here, and
-# relax/minimize the coordinates of the carbon atoms using LAMMPS
-# before using it in other simulations.
-# Or you could do both (customization & minimization).
+# WARNING: A reader has pointed out :
+# THIS IS NOT A REALISTIC MODEL OF A GRAPHENE-NANOTUBE JUNCTION.
+# A real junction would likely be curved near the boundary,
+# not a 90 degree junction. (Although both graphene and nanotubes
+# consist of hexagons of carbon atoms, you would need 6 heptagons
+# near the junction between the nanotube and the graphene
+# to account for the negative Gaussian curvature there).
+# To solve this problem:
+# Moltemplate allows you to move, add, customize or delete individual
+# atoms near the boundary. You can move atoms by overwriting their
+# coordinates using additional write("Data Atoms") statements (after
+# the walls and tube are created). You can also adjust their partial charge.
+# Alternately, you could start with the structure provided here, add or delete
+# atoms if necessary, and relax/minimize the coordinates of the carbon
+# atoms using LAMMPS. You could also run a high temperature annealing
+# simulation to relax their positions. If it helps, the AIREBO
+# force-field has used in LAMMPS to simulate carbon nanotubes breaking:
+# http://scitation.aip.org/content/aip/journal/jcp/134/20/10.1063/1.3594197
+# http://lammps.sandia.gov/pictures.html#cnt
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/README_WARNING.TXT b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/README_WARNING.TXT
index f60da6c3f..8864c3e04 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/README_WARNING.TXT
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/README_WARNING.TXT
@@ -1,12 +1,10 @@
WARNING:
- This is not a realistic simulation of a protein in a lipid membrane.
- When I released this example in 2013, the simulations ran without crashing and produced no obvious visual flaws. However recently (2015) I've noticed that there are some serious problems: Currently, the protein no-longer remains perpendicular to the membrane during the simulations. (In some cases, it also unfolds.) The original version of this example did not behave this way. I'm not sure what changed since then.
+ This is not a realistic simulation of proteins in a lipid membrane. This
+example was only intented to be a technical demonstration to show how to
+combine totally different kinds of coarse-grained molecules (with different
+kinds of force-fields) together in the same simulation in LAMMPS. Tuning the
+force-field parameters to get realistic results was not the goal. I did
+not take the extra time to do this. If you have suggestions for changes,
+please email me (jewett.aij at gmail dot com).
- This example was created to demonstrate how to combine totally different kinds of coarse-grained molecules (with different kinds of force-fields) together in the same simulation in LAMMPS. Tuning the force-field parameters to get realistic results was not the goal.
-
- One day I might tinker with the shape of the protein and the force-field parameters to try and avoid this unsightly outcome. (Probably shortening the length of the helices would help.) Either way, I doubt it would make the simulations any more accurate.
-
- I apologize that the simulations no longer produce the same pretty images shown on the web page.
-
-Andrew 2015-8-02
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010.lt b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010.lt
index d2aa805a5..2e510ebd9 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010.lt
@@ -1,233 +1,233 @@
# This file defines a 4-helix bundle coarse-grained protein model (AUF2) used in
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
#
# Strategy:
#
#1) First I'll define some building blocks (A16, B16, T3)
# which are helices, sheets and turns of a predetermined length)
#
#2) Then I'll copy and paste them together to build
# a 4-helix bundle (or a 4-strand beta-barrel).
# This approach is optional. If your protein has helices which are not
# identical, you should probably just include all 4 helices in a single
# "Data Atoms" section and don't try to subdivide the protein into pieces.)
1beadProtSci2010 { # <-- enclose definitions in a namespace for portability
# A16 is a coarse-grained alpha-helix containing 16 residues (one "atom" each)
A16 {
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../sL 0.0 -2.4 -2.4 0.0
$atom:a2 $mol:... @atom:../sL 0.0 2.4 -2.4 3.6
$atom:a3 $mol:... @atom:../sH 0.0 2.4 2.4 7.2
$atom:a4 $mol:... @atom:../sH 0.0 -2.4 2.4 10.8
$atom:a5 $mol:... @atom:../sL 0.0 -2.4 -2.4 14.4
$atom:a6 $mol:... @atom:../sL 0.0 2.4 -2.4 18.0
$atom:a7 $mol:... @atom:../sH 0.0 2.4 2.4 21.6
$atom:a8 $mol:... @atom:../sH 0.0 -2.4 2.4 25.2
$atom:a9 $mol:... @atom:../sL 0.0 -2.4 -2.4 28.8
$atom:a10 $mol:... @atom:../sL 0.0 2.4 -2.4 32.4
$atom:a11 $mol:... @atom:../sH 0.0 2.4 2.4 36.0
$atom:a12 $mol:... @atom:../sH 0.0 -2.4 2.4 39.6
$atom:a13 $mol:... @atom:../sL 0.0 -2.4 -2.4 43.2
$atom:a14 $mol:... @atom:../sL 0.0 2.4 -2.4 46.8
$atom:a15 $mol:... @atom:../sH 0.0 2.4 2.4 50.4
$atom:a16 $mol:... @atom:../sH 0.0 -2.4 2.4 54.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
$bond:b3 @bond:../backbone $atom:a3 $atom:a4
$bond:b4 @bond:../backbone $atom:a4 $atom:a5
$bond:b5 @bond:../backbone $atom:a5 $atom:a6
$bond:b6 @bond:../backbone $atom:a6 $atom:a7
$bond:b7 @bond:../backbone $atom:a7 $atom:a8
$bond:b8 @bond:../backbone $atom:a8 $atom:a9
$bond:b9 @bond:../backbone $atom:a9 $atom:a10
$bond:b10 @bond:../backbone $atom:a10 $atom:a11
$bond:b11 @bond:../backbone $atom:a11 $atom:a12
$bond:b12 @bond:../backbone $atom:a12 $atom:a13
$bond:b13 @bond:../backbone $atom:a13 $atom:a14
$bond:b14 @bond:../backbone $atom:a14 $atom:a15
$bond:b15 @bond:../backbone $atom:a15 $atom:a16
}
} # A16
T3 { # T3 is a "turn" region consisting of 3 beads
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../tN 0.0 -4.8 0.0 0.0
$atom:a2 $mol:... @atom:../tN 0.0 0.0 3.3 -1.44
$atom:a3 $mol:... @atom:../tN 0.0 4.8 0.0 0.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
}
} # T3
# ----- Now build a larger molecule using A16 and T3 -------
# Create a 4-Helix bundle.
# In this version, the hydrophobic beads are poing outward.
# I oriented them this way because I want to place this protein in a membrane.
# (There is another file in this directory containing alternate version
# of this same molecule with the hydrophobic beads pointing inward.)
4HelixInsideOut {
helix1 = new A16.rot(-225, 0,0,1).move(-5.70,-5.70,-32.4)
helix2 = new A16.rot(-135, 0,0,1).move( 5.70,-5.70,-28.8)
helix3 = new A16.rot( -45, 0,0,1).move( 5.70, 5.70,-25.2)
helix4 = new A16.rot( 45, 0,0,1).move(-5.70, 5.70,-21.6)
turn1 = new T3.rot(180,1,0,0).rot(-20,0,1,0).rot( 10,0,0,1).move(0.78,-4.2, 27.9)
turn2 = new T3.rot(-10,1,0,0).rot( 20,0,1,0).rot(-70,0,0,1).move(4.55, 2.4,-33.0)
turn3 = new T3.rot(180,1,0,0).rot(-20,0,1,0).rot(190,0,0,1).move(-0.78,4.2, 34.2)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixInsideOut
# -------- Minor coordinates adjustment: -----------
# Those coordinates in the commands above are a little too large.
# To make it easier to type them in, I was using sigma=6.0 Angstroms.
- # Instead, here I'll try using sigma=5.5 Angstroms. 5.5/6 = 0.916667)
+ # Instead, here I'll try using sigma=4.8 Angstroms. 4.8/6 = 0.8)
- 4HelixInsideOut.scale(0.9166666666666666)
+ 4HelixInsideOut.scale(0.8)
# Note: "scale()" only effects the initial coordinates of
# the molecule, not the force field parameters.
# (If you plan to minimize the molecule, you don't need to
# be so careful about the initial coordinates. In that case,
# you don't have worry about "scale()". Feel free to remove.)
# -------------- Force-Field Parameters ------------
# Units and force-field styles for this protein model
# (These can be overridden later.)
write_once("In Init") {
units real
atom_style full
bond_style hybrid harmonic
angle_style hybrid harmonic
dihedral_style hybrid fourier
pair_style hybrid lj/charmm/coul/charmm/inter es4k4l maxmax 21.0 24.0
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 #(turn on "1-4" interactions)
}
# --- Distance Units ---
# In this version of the model, sigma (the bond-length
- # and particle diameter) is rounded to 5.5 Angstroms.
+ # and particle diameter) is rounded to 4.8 Angstroms.
#
# --- Energy & Temperature Units ---
# In this protein model, "epsilon" represents the free energy
# bonus for bringing two hydrophobic amino acids together.
# Here I choose to set epsilon to 1.806551818181818 kCal/mole.
# This value was chosen so that a temperature of 300 Kelvin lies at
# 0.33 epsilon, which is the unfolding temperature of the marginally stable
# "ASF1" protein model from the Bellesia et al 2010 paper.
# This choice insures that both the "ASF1" model from that paper,
# as well as the much more stable "AUF2" protein we use here (which
# unfolds at 0.42*eps) should definitely remain stable at 300 degrees Kelvin,
# in the bulk at least. (However it's not clear that these energy
# parameters will work well for a protein in membrane. Perhaps I'll
# run some tests and fine tune these parameters for this scenario.)
# 2-body (non-bonded) interactions:
#
# Uij(r) = 4*eps_ij * (K*(sig_ij/r)^12 + L*(sig_ij/r)^6)
#
# i j pairstylename eps sig K L
#
write_once("In Settings") {
- pair_coeff @atom:sH @atom:sH lj/charmm/coul/charmm/inter 1.8065518 5.5 1 -1
- pair_coeff @atom:sL @atom:sL lj/charmm/coul/charmm/inter 1.8065518 5.5 1 0
- pair_coeff @atom:tN @atom:tN lj/charmm/coul/charmm/inter 1.8065518 5.5 1 0
+ pair_coeff @atom:sH @atom:sH lj/charmm/coul/charmm/inter 1.8065518 4.8 1 -1
+ pair_coeff @atom:sL @atom:sL lj/charmm/coul/charmm/inter 1.8065518 4.8 1 0
+ pair_coeff @atom:tN @atom:tN lj/charmm/coul/charmm/inter 1.8065518 4.8 1 0
}
# The exact value of the bond_coeff does not matter too much as long as
# it is "stiff enough". Here I use a softer bond spring than the one
# used in the paper so that I can increase the time step.
# I also use a relatively soft spring to constrain the bond angles.
# bond_coeff bondType bondstylename k r0
write_once("In Settings") {
- bond_coeff @bond:1beadProtSci2010/backbone harmonic 10.0 5.5
+ bond_coeff @bond:1beadProtSci2010/backbone harmonic 10.0 4.8
}
# angleType atomtypes1 2 3 bondtypes1 2
write_once("Data Angles By Type") {
@angle:backbone @atom:* @atom:* @atom:* @bond:* @bond:*
}
# angle_coeff angleType anglestylename k theta0
write_once("In Settings") {
angle_coeff @angle:backbone harmonic 100.0 105.0
}
# dihedralType atomtypes1 2 3 4 bondtypes1 2 3
write_once("Data Dihedrals By Type") {
# For a chain of sH and sL atoms, use the @dihedral:delta65_0
# parameters. (This corresponds to the "AUF2" model from the
# Bellesia et. al 2010 paper.)
@dihedral:delta65_0 @atom:s* @atom:s* @atom:s* @atom:s* * * *
# If "tN" (turn) atoms are present, use the @dihedral:turn parameters
@dihedral:turn @atom:tN @atom:* @atom:* @atom:* * * *
}
write_once("In Settings") {
dihedral_coeff @dihedral:delta60_0 fourier 2 2.167862 3 0 2.167862 1 -60.0
dihedral_coeff @dihedral:delta65_0 fourier 2 2.167862 3 0 2.167862 1 -65.0
dihedral_coeff @dihedral:turn fourier 1 0.361310 3 0
# Note: 2.167862=1.2*epsilon and 0.361310=0.2*epsilon.
}
# --- Mass Units ---
# Typical amino acids weigh approximately 110.0 grams/mole. (Rounding down):
write_once("Data Masses") {
@atom:1beadProtSci2010/sH 100.0
@atom:1beadProtSci2010/sL 100.0
@atom:1beadProtSci2010/tN 100.0
}
} # 1beadProtSci2010 (namespace)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010_variations.lt b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010_variations.lt
index e6e6bced7..38b1b48f8 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010_variations.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/1beadProtSci2010_variations.lt
@@ -1,225 +1,225 @@
### THIS FILE IS OPTIONAL AND IS NOT NECESSARY. IN THIS FILE, I DEFINED SOME ##
### ADDITIONAL PROTEIN TYPES FROM THE PAPER THAT I DID NOT USE IN THIS EXAMPLE##
#
# This file defines a family of coarse-grained protein models used in:
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
#
# Strategy:
#
#1) First I'll define some building blocks (A16, B16, T3)
# which are helices, sheets and turns of a predetermined length)
import "1beadProtSci2010.lt"
# We defined A16 and T3 earlier in "1beadPRotSci2010.lt" Will define B16 below
#
#2) Then I'll copy and paste them together to build
# a 4-helix bundle or a 4-strand beta-barrel.
1beadProtSci2010 { #<-- Add new molecules to existing namespace defined earlier
# This way we don't have to start from scratch. We can
# use all the atom types and angle settings defined earlier
# B16 is a coarse-grained beta-strand containing 16 residues (one "atom" each)
B16 {
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../sL 0.0 -1.8 0.0 0.0
$atom:a2 $mol:... @atom:../sH 0.0 1.8 0.0 4.8
$atom:a3 $mol:... @atom:../sL 0.0 -1.8 0.0 9.6
$atom:a4 $mol:... @atom:../sH 0.0 1.8 0.0 14.4
$atom:a5 $mol:... @atom:../sL 0.0 -1.8 0.0 19.2
$atom:a6 $mol:... @atom:../sH 0.0 1.8 0.0 24.0
$atom:a7 $mol:... @atom:../sL 0.0 -1.8 0.0 28.8
$atom:a8 $mol:... @atom:../sH 0.0 1.8 0.0 33.6
$atom:a9 $mol:... @atom:../sL 0.0 -1.8 0.0 38.4
$atom:a10 $mol:... @atom:../sH 0.0 1.8 0.0 43.2
$atom:a11 $mol:... @atom:../sL 0.0 -1.8 0.0 48.0
$atom:a12 $mol:... @atom:../sH 0.0 1.8 0.0 52.8
$atom:a13 $mol:... @atom:../sL 0.0 -1.8 0.0 57.6
$atom:a14 $mol:... @atom:../sH 0.0 1.8 0.0 62.4
$atom:a15 $mol:... @atom:../sL 0.0 -1.8 0.0 67.2
$atom:a16 $mol:... @atom:../sH 0.0 1.8 0.0 72.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
$bond:b3 @bond:../backbone $atom:a3 $atom:a4
$bond:b4 @bond:../backbone $atom:a4 $atom:a5
$bond:b5 @bond:../backbone $atom:a5 $atom:a6
$bond:b6 @bond:../backbone $atom:a6 $atom:a7
$bond:b7 @bond:../backbone $atom:a7 $atom:a8
$bond:b8 @bond:../backbone $atom:a8 $atom:a9
$bond:b9 @bond:../backbone $atom:a9 $atom:a10
$bond:b10 @bond:../backbone $atom:a10 $atom:a11
$bond:b11 @bond:../backbone $atom:a11 $atom:a12
$bond:b12 @bond:../backbone $atom:a12 $atom:a13
$bond:b13 @bond:../backbone $atom:a13 $atom:a14
$bond:b14 @bond:../backbone $atom:a14 $atom:a15
$bond:b15 @bond:../backbone $atom:a15 $atom:a16
}
} # B16
# ----- Now build larger molecules using B16 and T3 -------
4SheetBarrel {
sheet1 = new B16.rot( 45, 0,0,1).move(-4.762203156,-4.762203156, -36.0)
sheet2 = new B16.rot( 135, 0,0,1).move( 4.762203156,-4.762203156, -36.0)
sheet3 = new B16.rot( 225, 0,0,1).move( 4.762203156, 4.762203156, -36.0)
sheet4 = new B16.rot( 315, 0,0,1).move(-4.762203156, 4.762203156, -36.0)
turn1 = new T3.rot(180,1,0,0).rot( 0, 0,0,1).move( 0, -7.8, 39.6)
turn2 = new T3.rot( 0,1,0,0).rot(-90,0,0,1).move(4.2, 0.0,-41.4)
turn3 = new T3.rot(180,1,0,0).rot(-180,0,0,1).move( 0, 7.8, 39.6)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:sheet1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:sheet2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:sheet3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:sheet2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:sheet3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:sheet4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
}
# Below I define several alternate conformations of the"4HelixBundleInsideOut"
# molecule I defined earlier in "1beadProtSci2010.lt". Same molecule however.
4HelixBundle {
helix1 = new A16.rot( -45, 0,0,1).move(-5.70,-5.70,-32.4)
helix2 = new A16.rot( 45, 0,0,1).move( 5.70,-5.70,-28.8)
helix3 = new A16.rot( 135, 0,0,1).move( 5.70, 5.70,-25.2)
helix4 = new A16.rot( 225, 0,0,1).move(-5.70, 5.70,-21.6)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
turn1 = new T3.rot(150,1,0,0).rot(-23,0,1,0).rot( 8,0,0,1).move(-3.6,-4.8,28.2)
turn2 = new T3.rot(-5,1,0,0).rot( 21,0,1,0).rot(-100,0,0,1).move(4.2,-0.66,-30.9)
turn3 = new T3.rot(150,1,0,0).rot(-23,0,1,0).rot(188,0,0,1).move(3.6,4.8,35.4)
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixBundle
# --- alternate conformations (same molecule) ----
# In the following version, the helices are oriented in a similar way,
# but they are separated a little further away from eachother.
4HelixBundleLoose {
helix1 = new A16.rot( -45, 0,0,1).move(-6.7347723,-6.7347723, -27.0)
helix2 = new A16.rot( 45, 0,0,1).move( 6.7347723,-6.7347723, -27.0)
helix3 = new A16.rot( 135, 0,0,1).move( 6.7347723, 6.7347723, -27.0)
helix4 = new A16.rot( 225, 0,0,1).move(-6.7347723, 6.7347723, -27.0)
turn1 = new T3.rot(180,1,0,0).rot(-17,0,0,1).move(-1.2,-4.2,32.4)
turn2 = new T3.rot( 0,1,0,0).rot(-100,0,0,1).move(4.2,-0.9,-28.8)
turn3 = new T3.rot(180,1,0,0).rot(163,0,0,1).move(1.2,4.2,32.4)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
}
# In following version, the helices are oriented in a similar way,
# but they are separated a little further away from eachother.
4HelixInsideOutLoose {
helix1 = new A16.rot(-225, 0,0,1).move(-6.7347723,-6.7347723, -27.0)
helix2 = new A16.rot(-135, 0,0,1).move( 6.7347723,-6.7347723, -27.0)
helix3 = new A16.rot( -45, 0,0,1).move( 6.7347723, 6.7347723, -27.0)
helix4 = new A16.rot( 45, 0,0,1).move(-6.7347723, 6.7347723, -27.0)
turn1 = new T3.rot(180,1,0,0).rot( 10,0,0,1).move( 0.78,-4.2,28.8)
turn2 = new T3.rot( 70,1,0,0).rot(-70,0,0,1).move( 10.8,2.4,-28.2)
turn3 = new T3.rot(180,1,0,0).rot(190,0,0,1).move(-0.78,4.2,28.8)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixInsideOutLoose
# In the following version, the 4 helices are arranged next to each other,
# side-by-side, in a planar conformation (instead of a compact bundle).
4HelixPlanar {
helix1 = new A16.rot(-00, 0,0,1).move(0, 0, -27.0)
helix2 = new A16.rot( 00, 0,0,1).move(14.4, 0, -27.0)
helix3 = new A16.rot(-00, 0,0,1).move(28.8, 0, -27.0)
helix4 = new A16.rot( 00, 0,0,1).move(43.2, 0, -27.0)
turn1 = new T3.rot(180,1,0,0).rot( 0,0,0,1).move( 4.8, 0, 31.8)
turn2 = new T3.rot( 0,1,0,0).rot(180,0,0,1).move(19.2, 0,-31.8)
turn3 = new T3.rot(180,1,0,0).rot( 0,0,0,1).move(34.6, 0, 31.8)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixPlanar
# -------- Minor coordinates adjustment: -----------
# Those coordinates in the commands above are a little too large.
# To make it easier to type them in, I was using sigma=6.0 Angstroms.
- # Instead, here I'll try using sigma=5.5 Angstroms. 5.5/6 = 0.916667)
+ # Instead, here I'll try using sigma=4.8 Angstroms. 4.8/6.0 = 0.8)
- 4SheetBarrel.scale(0.9166666666666666)
- 4HelixBundle.scale(0.9166666666666666)
- 4HelixBundleLoose.scale(0.9166666666666666)
- 4HelixInsideOutLoose.scale(0.9166666666666666)
- 4HelixPlanar.scale(0.9166666666666666)
+ 4SheetBarrel.scale(0.8)
+ 4HelixBundle.scale(0.8)
+ 4HelixBundleLoose.scale(0.8)
+ 4HelixInsideOutLoose.scale(0.8)
+ 4HelixPlanar.scale(0.8)
# Note: "scale()" only effects the initial coordinates of
# the molecule, not the force field parameters.
# (If you plan to minimize the molecule, you don't need to
# be so careful about the initial coordinates. In that case,
# you don't have worry about "scale()". Feel free to remove.)
} # 1beadProtSci2010 (namespace)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/system.lt b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/system.lt
index 6ffe9a58b..3e521b0f9 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/system.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/moltemplate_files/system.lt
@@ -1,178 +1,178 @@
# Description:
# This example shows how to put a protein (inclusion) in a
# lipid bilayer mixture composed of two different lipids (DPPC and DLPC).
# The DPPC lipid model is described here:
# G. Brannigan, P.F. Philips, and F.L.H. Brown,
# Physical Review E, Vol 72, 011915 (2005)
# The protein model is described here:
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
# The new DLPC model is a truncated version of DPPC,
# (Its behaviour has not been rigorously tested.)
# Note that 50%/50% mixtures of DPPC & DLPC are commonly used to
# build liposomes http://www.ncbi.nlm.nih.gov/pubmed/10620293
# Note:
# This example may require additional features to be added to LAMMPS.
# If LAMMPS complains about an "Invalid pair_style", then copy the code
# in the "additional_lammps_code" directory into your LAMMPS "src" directory
# and recompile LAMMPS.
import "CGLipidBr2005.lt"
using namespace CGLipidBr2005
# The "= new random" syntax chooses one of several molecules at random
lipids = new random([DPPC, DLPC], [0.5,0.5], 1234) #"1234"=random_seed
[13].move(7.5, 0, 0)
[15].move(3.75, 6.49519, 0) # <-- hexagonal lattice
[2].rot(180, 1, 0, 0) # <-- 2 monolayers
# Move all the lipds up to the center of the box
lipids[*][*][*].move(0,0,75.0)
# Although this patch of lipids is not square or rectangular, (it looks
# like a parallelogram), this is no longer the case after rectangular
# periodic boundary conditions are applied. (Check by visualising in VMD.)
write_once("Data Boundary") {
0 97.5 xlo xhi
0 97.42785792 ylo yhi
0 150.0 zlo zhi
}
# A note on geometry:
# We want to create a bilayer arranged in a hexagonal lattice consisting of
# 15 rows (each row is aligned with the x-axis)
# 13 columns (aligned at a 60 degree angle from the x axis)
# The lattice spacing is 7.5 Angstroms.
# When wrapped onto a rectangular box, the dimensions of the system are:
# 13 * 7.5 Angstroms in the X direction
# 15 * 7.5*sqrt(3)/2 Angstroms in the Y direction
# ------------------- protein inclusion ---------------------
import "1beadProtSci2010.lt"
using namespace 1beadProtSci2010
protein = new 4HelixInsideOut
protein.move(45.0, 25.98076211, 75.0)
# Delete a hole in the membrane to create space for the protein.
# (In the future moltemplate will be able to avoid occlusion automatically.)
delete lipids[4][2][*]
delete lipids[6][2][*]
delete lipids[3-6][3][*]
delete lipids[3-5][4][*]
delete lipids[2-5][5][*]
delete lipids[2][6][*]
delete lipids[4][6][*]
# -------- interactions between protein and lipids ----------
# Note: All atom types must include the full path (the name of
# the namespace which defined them as well as the atom type name).
# (This is because we are no longer inside that namespace.)
write_once("In Settings") {
# Interactions between the protein and lipid atoms are usually
- # determined by mixing rules. (However this is not possible some
- # for atoms, such as the "int" atoms in the lipid model which
- # interact using -1/r^2 attraction.) Mixing rules do not make
- # sense for these atoms so we must explicitly define their
- # interaction with all other atoms.
+ # determined by mixing rules. However this is not possible some
+ # for atoms (such as the "int" atoms in the lipid model which
+ # interact using -1/r^2 attraction). Lorentz-Berthelot mixing
+ # rules do not make sense for these atoms so we must explicitly
+ # define their interaction with all other atoms.
# i j pairstylename eps sig K L
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 -1
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
# We want the interactions between hydrophobic residues and atoms in
- # the interior of the lipd to be energetically similar to the attractive
+ # the interior of the lipid to be energetically similar to the attractive
# interactions between hydrophobic residues. (See 1beadProtSci2010.)
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 -1
+
+ # All other interactions between proteins and lipids are steric.
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+
# We also add an artificial attractive interaction between the
# turn residues of the protein and the lipid head groups in
- # order to keep the protein upright. Probably not necessary.
-
+ # order to keep the protein upright. This might not be necessary
+
pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
- # All other interactions between proteins and lipids are steric.
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
- pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 6.0 1 0
-
-
# Add a weak attractive interaction between hydrophilic "sL" beads
# (Whose strength mimics the strength of interaction between tail beads
# in the lipid. This was absent from the original protein model.
# However without some kind of weak attraction between residues,
# the negative pressure in the interior of the bilayer membrane
# allways pulls the protein apart. Recall that in the membrane,
# the hydrophobic beads in the protein will face outwards towards the lipid
# tails leaving the hydrophilic amino acids of the protein in the interior.
# In reality, these polar groups form hydrogen bonds with each other.)
- pair_coeff @atom:1beadProtSci2010/sL @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.3286 7.5 0.4 -1
+ pair_coeff @atom:1beadProtSci2010/sL @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.3286 6.0 0.4 -1
# However these hydrophilic amino acids are not attrected to
# the bilayer interior.
pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
}
# Finally, we must combine the two force-field styles which were used for
# the coarse-grained lipid and protein. To do that, we write one last time
# to the "In Init" section. When reading the "Init" section LAMMPS will
# read these commands last and this will override any earlier settings.
write_once("In Init") {
# -- These styles override earlier settings --
units real
atom_style full
# (Hybrid force field styles were used for portability.)
bond_style hybrid harmonic
angle_style hybrid cosine/delta harmonic
dihedral_style hybrid fourier
improper_style none
pair_style hybrid table linear 1001 lj/charmm/coul/charmm/inter es4k4l 14.5 15
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 # turn off pairs if "less than 3 bonds"
}
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.npt b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.npt
index 2dc4bbe03..cbf76ac2d 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.npt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.npt
@@ -1,65 +1,66 @@
# PREREQUISITES:
#
# You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh, or run it using ./README_sh.)
#
# -------- REQUIREMENTS: ---------
# 1) This example requires the "USER-MISC" package. (Use "make yes-USER-MISC")
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# 2) It also may require additional features and bug fixes for LAMMPS.
# So, after typing "make yes-user-misc" in to the shell, ...
# be sure to download and copy the "additional_lammps_code" from
# http://moltemplate.org (upper-left corner menu)
# 3) Unpack it
# 4) copy the .cpp and .h files to the src folding of your lammps installation.
# 5) Compile LAMMPS.
#
# If LAMMPS complains about an "Invalid pair_style", or "Invalid dihedral_style"
# then you made a mistake in the instructions above.
#
# -- Init Section --
include system.in.init
# -- Atom Definition Section --
-read_data system.data
+#read_data system.data
+read_data system_after_min.data
# -- Settings Section --
include system.in.settings
# -- Run Section --
#minimize 1.0e-5 1.0e-7 500 2000
timestep 10.0 # The time-step in Watson et. al 2011 was 0.002*3ps = 6fs
dump 1 all custom 10000 traj_npt.lammpstrj id mol type x y z ix iy iz
thermo_style custom step temp pe etotal vol epair ebond eangle
thermo 1000 # time interval for printing out "thermo" data
fix fxlan all langevin 300.0 300.0 120 48279
fix fxnph all nph x 0 0 1000 y 0 0 1000 couple xy
# Note: The temperature 300.0 K corresponds to 0.907033536873*epsilon
# (for the "epsilon" used by the coarse-grained lipid), and
# to 0.33*epsilon (for the "epsilon" used in the coarse-grained protein)
# Note: The langevin damping parameter "120" corresponds to
# the 0.12ps damping time used in Watson et. al JCP 2011.
# Note: We maintain the system system at constant (zero) tention
# using a barostat damping parameter Pdamp=1000 ("0 0 1000")
# optional (not sure if this helps):
# balance x uniform y uniform
run 100000
write_data system_after_npt.data
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.nvt b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.nvt
index c9195b4e6..05f533339 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.nvt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane+protein/run.in.nvt
@@ -1,71 +1,71 @@
# PREREQUISITES:
#
# 1) You must use moltemplate.sh to create 3 files:
# system.data system.in.init system.in.settings
# (Follow the instructions in README_setup.sh, or run it using ./README_sh.)
# 2) You must equilibrate the system beforehand using "run.in.npt".
# This will create the file "system_after_npt.data" which this file reads.
# (Note: I have not verified that this equilibration protocol works well.)
#
# -------- LAMMPS REQUIREMENTS: ---------
# 1) This example requires the "USER-MISC" package. (Use "make yes-USER-MISC")
# http://lammps.sandia.gov/doc/Section_start.html#start_3
# 2) It also may require additional features and bug fixes for LAMMPS.
# So, after typing "make yes-user-misc" in to the shell, ...
# be sure to download and copy the "additional_lammps_code" from
# http://moltemplate.org (upper-left corner menu)
# 3) Unpack it
# 4) copy the .cpp and .h files to the src folding of your lammps installation.
# 5) Compile LAMMPS.
#
# If LAMMPS complains about an "Invalid pair_style", or "Invalid dihedral_style"
# then you made a mistake in the instructions above.
#
# ------------------------------- Initialization Section --------------------
include system.in.init
# ------------------------------- Atom Definition Section -------------------
# Read the coordinates generated by an earlier NPT simulation
read_data system_after_npt.data
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also. I prefer "write_data" and "read_data".)
# ------------------------------- Settings Section --------------------------
include system.in.settings
# ------------------------------- Run Section -------------------------------
timestep 10.0 # The time-step in Watson et. al 2011 was 0.002*3ps = 6fs
dump 1 all custom 10000 traj_nvt.lammpstrj id mol type x y z ix iy iz
thermo_style custom step temp pe etotal vol epair ebond eangle
thermo 1000 # time interval for printing out "thermo" data
fix fxlan all langevin 300.0 300.0 120 48279
fix fxnve all nve
# Note: The energy scale "epsilon" = 2.75kJ/mole = 330.7485200981 Kelvin*kB.
# So a temperature of 300.0 Kelvin corresponds to 0.907033536873*epsilon.
# Note: The langevin damping parameter "120" corresponds to
# the 0.12ps damping time used in Watson et. al JCP 2011.
#restart 500000
-run 10000000
+run 50000000
write_data system_after_nvt.data
# (The "write_restart" and "read_restart" commands were buggy in 2012,
# but they should work also.)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/membrane_BranniganPRE2005/moltemplate_files/CGLipidBr2005Orig.lt b/tools/moltemplate/examples/coarse_grained_examples/membrane_BranniganPRE2005/moltemplate_files/CGLipidBr2005Orig.lt
index a12eb0681..aabf2bcc8 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/membrane_BranniganPRE2005/moltemplate_files/CGLipidBr2005Orig.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/membrane_BranniganPRE2005/moltemplate_files/CGLipidBr2005Orig.lt
@@ -1,188 +1,208 @@
# Note:
#
# This example may require additional features to be added to LAMMPS. If
# LAMMPS complains about an "Invalid pair_style", then download copy the
# "additional_lammps_code" from moltemplate.org, unpack it into your LAMMPS
# "src" directory and recompile LAMMPS.
#
# -------- Description --------
#
# This example contains an implementation of the DPPC lipid bilayer described in
# G. Brannigan, P.F. Philips, and F.L.H. Brown,
# Physical Review E, Vol 72, 011915 (2005)
# and:
# M.C. Watson, E.S. Penev, P.M. Welch, and F.L.H. Brown
# J. Chem. Phys. 135, 244701 (2011)
#
# As in Watson(JCP 2011), rigid bond-length constraints have been replaced
# by harmonic bonds.
#
# --- DLPC lipids ---
# A truncated version of the DPPC lipid (named "DLPC") has also been added.
# Unlike the original "DPPC" molecule model, "DLPC" has not been carefully
# parameterized to reproduce the correct behavior in a lipid bilayer/mixture.
# (You may need to stiffen the bond-angle forces to make it behave correctly,
# but I did not do this here.)
#
# Units:
#
# The "epsilon" parameter in their model is approximately 2.75 kJ/mole
# ( = 0.657265774378585 kCal/mole, using 1kCal=4.184kJ)
# The "sigma" parameter corresponds to 7.5 angstroms.
#
#
# The new DLPC model is a truncated version of DPPC,
# (Its behaviour has not been rigorously tested.)
+
CGLipidBr2005 {
write_once("In Init") {
# -- Default styles for "CGLipidBr2005" --
units real
atom_style full
# (Hybrid force field styles were used for portability.)
bond_style hybrid harmonic
- angle_style hybrid cosine/delta
+
+ angle_style hybrid cosine/delta # <- used in the original article
+ #angle_style hybrid harmonic # <- prevents unphysical acute angle turns
+ # Explanation:
+ # angle_style cosine/delta: U(theta) = k*(1-cos(theta-theta0))
+ # angle_style harmonic: U(theta) = k*(theta-theta0)^2
+
dihedral_style none
improper_style none
+
pair_style hybrid table linear 1130 &
lj/charmm/coul/charmm/inter es4k4l 14.5 15
+
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 # turn off pairs if "less than 3 bonds"
}
DPPC {
write("Data Atoms") {
$atom:h $mol:. @atom:head 0.0 0.00 0.00 33.75 # DPPC head atom
$atom:i $mol:. @atom:../int 0.0 -1.00 0.00 26.25
$atom:t1 $mol:. @atom:../tail 0.0 1.00 0.00 18.75
$atom:t2 $mol:. @atom:../tail 0.0 -1.00 0.00 11.25
$atom:t3 $mol:. @atom:../tail 0.0 1.00 0.00 3.75
}
write("Data Bonds") {
$bond:b1 @bond:../backbone $atom:h $atom:i
$bond:b2 @bond:../backbone $atom:i $atom:t1
$bond:b3 @bond:../backbone $atom:t1 $atom:t2
$bond:b4 @bond:../backbone $atom:t2 $atom:t3
}
write("Data Angles") {
$angle:a1 @angle:../backbone $atom:h $atom:i $atom:t1
$angle:a2 @angle:../backbone $atom:i $atom:t1 $atom:t2
$angle:a3 @angle:../backbone $atom:t1 $atom:t2 $atom:t3
}
# Define properties of the local (lipid-specific) atom:head type atom:
write_once("Data Masses") {
@atom:head 200.0
}
write_once("In Settings") {
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
pair_coeff @atom:../int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:../tail @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
}
} #DPPC
DLPC {
write("Data Atoms") {
$atom:h $mol:. @atom:head 0.0 0.00 0.00 30.00 # DLPC head atom
$atom:i $mol:. @atom:../int 0.0 -1.00 0.00 22.50
$atom:t1 $mol:. @atom:../tail 0.0 1.00 0.00 15.00
$atom:t2 $mol:. @atom:../tail 0.0 -1.00 0.00 7.50
}
write("Data Bonds") {
$bond:b1 @bond:../backbone $atom:h $atom:i
$bond:b2 @bond:../backbone $atom:i $atom:t1
$bond:b3 @bond:../backbone $atom:t1 $atom:t2
}
write("Data Angles") {
$angle:a1 @angle:../backbone $atom:h $atom:i $atom:t1
$angle:a2 @angle:../backbone $atom:i $atom:t1 $atom:t2
}
# Define properties of the local (lipid-specific) atom:head type atom:
write_once("Data Masses") {
@atom:head 200.0
}
write_once("In Settings") {
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
pair_coeff @atom:../int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:../tail @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
}
} #DLPC
- # Particles shared by all lipid types
+ # Particles and properties shared by all lipid types:
+
write_once("Data Masses") {
@atom:int 200.0
@atom:tail 200.0
- @atom:head 200.0 #<- Default head type. We may override it later.
}
write_once("In Settings") {
# -- Default settings/parameters for "CGLipidBr2005" --
# (Hybrid bond & angle styles were used for portability.)
# As in Watson(JCP 2011), rigid bond-length constraints
# have been replaced by harmonic bonds.
# The k_theta parameter should lie in between 5*epsilon and 10*epsilon.
bond_coeff @bond:backbone harmonic 116.847 7.5 #<--2*5000*eps/sig^2
}
write_once("In Settings") {
- angle_coeff @angle:backbone cosine/delta 4.60086042 180 #<-- 7*eps
- #angle_coeff @angle:backbone cosine/delta 6.57265774 180 #<-- 10*eps
+
+ # cosine/delta: U(theta) = k*(1-cos(theta-theta0))
+ angle_coeff @angle:backbone cosine/delta 4.60086042 180 #<-- 7*eps
+
+ ## Alternately, to stiffen the bond-angles, try this:
+ ##angle_coeff @angle:backbone cosine/delta 6.57265774 180 #<-- 10*eps
+ ## harmonic: U(theta) = k*(theta-theta0)^2 not (k/2)*(theta-theta0)^2
+ ##angle_coeff @angle:backbone harmonic 9.85898661 180 #<-->30*eps
}
+ # Note: You may want to use a stiffer bond-angle than the original
+ # Brannigan&Brown 2005 paper if you want to mix two different lipids together.
+ # (The mixture of lipids introduces a great deal of disorder into the bilayer
+ # which would not be present in a DPPC bilayer. This caused pores to form
+ # in my simulations. But increasing the angle stiffness prevents this.)
write_once("In Settings") {
# The interaction of "atom:int" with other "atom:int" atoms is given by
# epsilon*(0.4*(sigma/r)^12 - 3.0*(sigma/r)^2), shifted and cutoff at
# r=3*sigma. This was implemented using pair_style table.
# Unfortunately, mixing lj/charmm and "table" pair styles in the same
# simulation is very inneficient.
- pair_coeff @atom:int @atom:int table table_int.dat INT
+ pair_coeff @atom:int @atom:int table table_int.dat INT
# The interaction of tail beads with eachother is given by the formula below
# and with other atoms ...using Lorenz-Berthelot and "repulsive wins" rules:
# epsilon*(0.4*(sigma/r)^12 - 1.0*(sigma/r)^6),
- pair_coeff @atom:tail @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
- pair_coeff @atom:int @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
-
- # The interaction of head beads which all other beads is given by:
- # epsilon*(0.4*(sigma/r)^12 - 0.0*(sigma/r)^6),
-
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:tail @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
+ pair_coeff @atom:int @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
+ # The interaction between head beads from different types of lipids
+ # is (currently) repulsive:
+ pair_coeff @atom:DPPC/head @atom:DLPC/head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
} # write_once("In Settings")
+
# Note: I divided epsilon by 4 to get "0.1643" because we are using the
# "es4k4l" coeffstyle, corresponding to U(r)=eps(4*K*(s/r)^12 + 4*L*(s/r)^6)
# (The "es4k4l" coeffstyle is the default.) Using this convention makes it
# easier to mix this coarse-grained lipid model with other molecular models.
} # CGLipidBr2005
# Note: This example has not been optimized for speed.
#
# Unfortunately, using both lj/charmm and "table" pair styles in the same
# simulation seems to be very inneficient. (The simulation is twice as slow
# as using only the "lj/charmm" pair styles for every pairwise interaction,
# ...and about 25% slower than using "table" for every pairwise interaction.
# However the lennard-jones pair styles support mixing, so we use them to
# make it easier to run these molecules with other molecules which don't use
# pair_table. I felt that portability was worth the extra 25% slow down.)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_WARNING.TXT b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_WARNING.TXT
index 1a4ecd094..f11c438ad 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_WARNING.TXT
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_WARNING.TXT
@@ -1,14 +1,20 @@
WARNING:
- This is not a realistic simulation of proteins in a lipid membrane.
- When I released this example in 2013, the simulations ran without crashing and produced no obvious visual flaws. However recently (2015) I've noticed that there are some serious problems: Currently, the protein no-longer remains perpendicular to the membrane during the simulations. (In some cases, it also unfolds.) The original version of this example did not behave this way. I'm not sure what changed since then.
+ This is not a realistic simulation of proteins in a lipid membrane. This
+example was only intented to be a technical demonstration to show how to
+combine totally different kinds of coarse-grained molecules (with different
+kinds of force-fields) together in the same simulation in LAMMPS. Tuning the
+force-field parameters to get realistic results was not the goal. I did
+not take the extra time to do this. If you have suggestions for changes,
+please email me (jewett.aij at gmail dot com).
- In addition, I have also noticed that newer versions of PACKMOL do not always succeed at generating a spherical vesicle in a reasonable amount of time. (You will probably have to play with the .inp files in the packmol_files directory to get PACKMOL to produce any files at all.)
+ In addition, I have noticed that newer versions of PACKMOL do not
+always succeed at generating a spherical vesicle in a reasonable amount of time.
+(You may have to play with the .inp files in the packmol_files directory
+ to get PACKMOL to produce any files at all.
- This example was created to demonstrate how to combine totally different kinds of coarse-grained molecules (with different kinds of force-fields) together in the same simulation in LAMMPS. Tuning the force-field parameters to get realistic results was not the goal.
+(NOTE: This example also demonstrantes how to use an external program
+ ("packmol") to generate the coordinates for the atoms in the system.
+ PLEASE USE "packmol", NOT "ppackmol". -the parallel version of "packmol".
+ This is because "ppackmol" is more likely to get caught in infinite loops.)
- One day I might tinker with the shape of the protein and the force-field parameters to try and avoid this unsightly outcome. (Probably shortening the length of the helices would help.) Either way, I doubt it would make the simulations any more accurate.
-
- I apologize that the simulations no longer produce the same pretty images shown on the web page.
-
-Andrew 2015-8-02
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_setup.sh b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_setup.sh
index 37c4e88f1..f695f6d0e 100755
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_setup.sh
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/README_setup.sh
@@ -1,51 +1,65 @@
# Use these commands to generate the LAMMPS input script and data file
# (and other auxilliary files):
-# First, generate the coordinates (the "system.xyz" file) this way
+# First, generate the coordinates (the "system.xyz" file).
# (This can be a very slow process.)
+
+
+
cd packmol_files
- # You must run each packmol commend one after the other
+ # You must run each packmol commend one after the other.
# NOTE: If PACKMOL gets stuck in an endless loop, then edit the corresponding
# "inp" file. This should not happen. You can also usually interrupt
- # packmol after 30 minutes, and the solution at that point should be good
- # enough for use.
+ # packmol after 30 minutes, and the solution at that point (an .xyz file)
+ # should be good enough for use.
packmol < step1_proteins.inp # This step determines the protein's location
# It takes ~20 minutes (on an intel i7)
packmol < step2_innerlayer.inp # this step builds the inner monolayer
# It takes ~90 minutes
packmol < step3_outerlayer.inp # this step builds the outer monolayer
# It takes ~4 hours
- # Running these three commands will probably take about an hour.
- # (It depends on how uniformly you need the packing to be.)
- #mv -f step3_outerlayer.xyz ../system.xyz
- mv -f system.xyz ../
+ # NOTE: PLEASE USE "packmol", NOT "ppackmol". ("ppackmol" is the parallel
+ # version of packmol using OpemMP. This example has NOT been tested
+ # with "ppackmol". Our impression was that the "ppackmol" version
+ # is more likely to get stuck in an infinite loop. -Andrew 2015-8)
+
+
+ # Step3 creates a file named "step3_outerlayer.xyz" containing the coordinates
+ # in all the atoms of all the molecules. Later we will run moltemplate.sh
+ # using the "-xyz ../system.xyz" command line argument. That will instruct
+ # moltemplate to look for a file named "system.xyz" in the parent directory.
+ # So I rename the "step3_outerlayer.xyz" file to "system.xyz", and move it
+ # to this directory so that later moltemplate.sh can find it.
+
+ mv -f step3_outerlayer.xyz ../system.xyz
cd ..
+
# Create LAMMPS input files this way:
cd moltemplate_files
# run moltemplate
moltemplate.sh -xyz ../system.xyz system.lt
# This will generate various files with names ending in *.in* and *.data.
# These files are the input files directly read by LAMMPS. Move them to
# the parent directory (or wherever you plan to run the simulation).
mv -f system.in* system.data ../
# The "table_int.dat" file contains tabular data for the lipid INT-INT atom
# 1/r^2 interaction. We need it too. (This slows down the simulation by x2,
# so I might look for a way to get rid of it later.)
cp -f table_int.dat ../
# Optional:
# The "./output_ttree/" directory is full of temporary files generated by
# moltemplate. They can be useful for debugging, but are usually thrown away.
rm -rf output_ttree/
cd ../
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010.lt b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010.lt
index d2aa805a5..2e510ebd9 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010.lt
@@ -1,233 +1,233 @@
# This file defines a 4-helix bundle coarse-grained protein model (AUF2) used in
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
#
# Strategy:
#
#1) First I'll define some building blocks (A16, B16, T3)
# which are helices, sheets and turns of a predetermined length)
#
#2) Then I'll copy and paste them together to build
# a 4-helix bundle (or a 4-strand beta-barrel).
# This approach is optional. If your protein has helices which are not
# identical, you should probably just include all 4 helices in a single
# "Data Atoms" section and don't try to subdivide the protein into pieces.)
1beadProtSci2010 { # <-- enclose definitions in a namespace for portability
# A16 is a coarse-grained alpha-helix containing 16 residues (one "atom" each)
A16 {
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../sL 0.0 -2.4 -2.4 0.0
$atom:a2 $mol:... @atom:../sL 0.0 2.4 -2.4 3.6
$atom:a3 $mol:... @atom:../sH 0.0 2.4 2.4 7.2
$atom:a4 $mol:... @atom:../sH 0.0 -2.4 2.4 10.8
$atom:a5 $mol:... @atom:../sL 0.0 -2.4 -2.4 14.4
$atom:a6 $mol:... @atom:../sL 0.0 2.4 -2.4 18.0
$atom:a7 $mol:... @atom:../sH 0.0 2.4 2.4 21.6
$atom:a8 $mol:... @atom:../sH 0.0 -2.4 2.4 25.2
$atom:a9 $mol:... @atom:../sL 0.0 -2.4 -2.4 28.8
$atom:a10 $mol:... @atom:../sL 0.0 2.4 -2.4 32.4
$atom:a11 $mol:... @atom:../sH 0.0 2.4 2.4 36.0
$atom:a12 $mol:... @atom:../sH 0.0 -2.4 2.4 39.6
$atom:a13 $mol:... @atom:../sL 0.0 -2.4 -2.4 43.2
$atom:a14 $mol:... @atom:../sL 0.0 2.4 -2.4 46.8
$atom:a15 $mol:... @atom:../sH 0.0 2.4 2.4 50.4
$atom:a16 $mol:... @atom:../sH 0.0 -2.4 2.4 54.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
$bond:b3 @bond:../backbone $atom:a3 $atom:a4
$bond:b4 @bond:../backbone $atom:a4 $atom:a5
$bond:b5 @bond:../backbone $atom:a5 $atom:a6
$bond:b6 @bond:../backbone $atom:a6 $atom:a7
$bond:b7 @bond:../backbone $atom:a7 $atom:a8
$bond:b8 @bond:../backbone $atom:a8 $atom:a9
$bond:b9 @bond:../backbone $atom:a9 $atom:a10
$bond:b10 @bond:../backbone $atom:a10 $atom:a11
$bond:b11 @bond:../backbone $atom:a11 $atom:a12
$bond:b12 @bond:../backbone $atom:a12 $atom:a13
$bond:b13 @bond:../backbone $atom:a13 $atom:a14
$bond:b14 @bond:../backbone $atom:a14 $atom:a15
$bond:b15 @bond:../backbone $atom:a15 $atom:a16
}
} # A16
T3 { # T3 is a "turn" region consisting of 3 beads
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../tN 0.0 -4.8 0.0 0.0
$atom:a2 $mol:... @atom:../tN 0.0 0.0 3.3 -1.44
$atom:a3 $mol:... @atom:../tN 0.0 4.8 0.0 0.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
}
} # T3
# ----- Now build a larger molecule using A16 and T3 -------
# Create a 4-Helix bundle.
# In this version, the hydrophobic beads are poing outward.
# I oriented them this way because I want to place this protein in a membrane.
# (There is another file in this directory containing alternate version
# of this same molecule with the hydrophobic beads pointing inward.)
4HelixInsideOut {
helix1 = new A16.rot(-225, 0,0,1).move(-5.70,-5.70,-32.4)
helix2 = new A16.rot(-135, 0,0,1).move( 5.70,-5.70,-28.8)
helix3 = new A16.rot( -45, 0,0,1).move( 5.70, 5.70,-25.2)
helix4 = new A16.rot( 45, 0,0,1).move(-5.70, 5.70,-21.6)
turn1 = new T3.rot(180,1,0,0).rot(-20,0,1,0).rot( 10,0,0,1).move(0.78,-4.2, 27.9)
turn2 = new T3.rot(-10,1,0,0).rot( 20,0,1,0).rot(-70,0,0,1).move(4.55, 2.4,-33.0)
turn3 = new T3.rot(180,1,0,0).rot(-20,0,1,0).rot(190,0,0,1).move(-0.78,4.2, 34.2)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixInsideOut
# -------- Minor coordinates adjustment: -----------
# Those coordinates in the commands above are a little too large.
# To make it easier to type them in, I was using sigma=6.0 Angstroms.
- # Instead, here I'll try using sigma=5.5 Angstroms. 5.5/6 = 0.916667)
+ # Instead, here I'll try using sigma=4.8 Angstroms. 4.8/6 = 0.8)
- 4HelixInsideOut.scale(0.9166666666666666)
+ 4HelixInsideOut.scale(0.8)
# Note: "scale()" only effects the initial coordinates of
# the molecule, not the force field parameters.
# (If you plan to minimize the molecule, you don't need to
# be so careful about the initial coordinates. In that case,
# you don't have worry about "scale()". Feel free to remove.)
# -------------- Force-Field Parameters ------------
# Units and force-field styles for this protein model
# (These can be overridden later.)
write_once("In Init") {
units real
atom_style full
bond_style hybrid harmonic
angle_style hybrid harmonic
dihedral_style hybrid fourier
pair_style hybrid lj/charmm/coul/charmm/inter es4k4l maxmax 21.0 24.0
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 #(turn on "1-4" interactions)
}
# --- Distance Units ---
# In this version of the model, sigma (the bond-length
- # and particle diameter) is rounded to 5.5 Angstroms.
+ # and particle diameter) is rounded to 4.8 Angstroms.
#
# --- Energy & Temperature Units ---
# In this protein model, "epsilon" represents the free energy
# bonus for bringing two hydrophobic amino acids together.
# Here I choose to set epsilon to 1.806551818181818 kCal/mole.
# This value was chosen so that a temperature of 300 Kelvin lies at
# 0.33 epsilon, which is the unfolding temperature of the marginally stable
# "ASF1" protein model from the Bellesia et al 2010 paper.
# This choice insures that both the "ASF1" model from that paper,
# as well as the much more stable "AUF2" protein we use here (which
# unfolds at 0.42*eps) should definitely remain stable at 300 degrees Kelvin,
# in the bulk at least. (However it's not clear that these energy
# parameters will work well for a protein in membrane. Perhaps I'll
# run some tests and fine tune these parameters for this scenario.)
# 2-body (non-bonded) interactions:
#
# Uij(r) = 4*eps_ij * (K*(sig_ij/r)^12 + L*(sig_ij/r)^6)
#
# i j pairstylename eps sig K L
#
write_once("In Settings") {
- pair_coeff @atom:sH @atom:sH lj/charmm/coul/charmm/inter 1.8065518 5.5 1 -1
- pair_coeff @atom:sL @atom:sL lj/charmm/coul/charmm/inter 1.8065518 5.5 1 0
- pair_coeff @atom:tN @atom:tN lj/charmm/coul/charmm/inter 1.8065518 5.5 1 0
+ pair_coeff @atom:sH @atom:sH lj/charmm/coul/charmm/inter 1.8065518 4.8 1 -1
+ pair_coeff @atom:sL @atom:sL lj/charmm/coul/charmm/inter 1.8065518 4.8 1 0
+ pair_coeff @atom:tN @atom:tN lj/charmm/coul/charmm/inter 1.8065518 4.8 1 0
}
# The exact value of the bond_coeff does not matter too much as long as
# it is "stiff enough". Here I use a softer bond spring than the one
# used in the paper so that I can increase the time step.
# I also use a relatively soft spring to constrain the bond angles.
# bond_coeff bondType bondstylename k r0
write_once("In Settings") {
- bond_coeff @bond:1beadProtSci2010/backbone harmonic 10.0 5.5
+ bond_coeff @bond:1beadProtSci2010/backbone harmonic 10.0 4.8
}
# angleType atomtypes1 2 3 bondtypes1 2
write_once("Data Angles By Type") {
@angle:backbone @atom:* @atom:* @atom:* @bond:* @bond:*
}
# angle_coeff angleType anglestylename k theta0
write_once("In Settings") {
angle_coeff @angle:backbone harmonic 100.0 105.0
}
# dihedralType atomtypes1 2 3 4 bondtypes1 2 3
write_once("Data Dihedrals By Type") {
# For a chain of sH and sL atoms, use the @dihedral:delta65_0
# parameters. (This corresponds to the "AUF2" model from the
# Bellesia et. al 2010 paper.)
@dihedral:delta65_0 @atom:s* @atom:s* @atom:s* @atom:s* * * *
# If "tN" (turn) atoms are present, use the @dihedral:turn parameters
@dihedral:turn @atom:tN @atom:* @atom:* @atom:* * * *
}
write_once("In Settings") {
dihedral_coeff @dihedral:delta60_0 fourier 2 2.167862 3 0 2.167862 1 -60.0
dihedral_coeff @dihedral:delta65_0 fourier 2 2.167862 3 0 2.167862 1 -65.0
dihedral_coeff @dihedral:turn fourier 1 0.361310 3 0
# Note: 2.167862=1.2*epsilon and 0.361310=0.2*epsilon.
}
# --- Mass Units ---
# Typical amino acids weigh approximately 110.0 grams/mole. (Rounding down):
write_once("Data Masses") {
@atom:1beadProtSci2010/sH 100.0
@atom:1beadProtSci2010/sL 100.0
@atom:1beadProtSci2010/tN 100.0
}
} # 1beadProtSci2010 (namespace)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010_variations.lt b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010_variations.lt
index e6e6bced7..38b1b48f8 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010_variations.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/1beadProtSci2010_variations.lt
@@ -1,225 +1,225 @@
### THIS FILE IS OPTIONAL AND IS NOT NECESSARY. IN THIS FILE, I DEFINED SOME ##
### ADDITIONAL PROTEIN TYPES FROM THE PAPER THAT I DID NOT USE IN THIS EXAMPLE##
#
# This file defines a family of coarse-grained protein models used in:
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
#
# Strategy:
#
#1) First I'll define some building blocks (A16, B16, T3)
# which are helices, sheets and turns of a predetermined length)
import "1beadProtSci2010.lt"
# We defined A16 and T3 earlier in "1beadPRotSci2010.lt" Will define B16 below
#
#2) Then I'll copy and paste them together to build
# a 4-helix bundle or a 4-strand beta-barrel.
1beadProtSci2010 { #<-- Add new molecules to existing namespace defined earlier
# This way we don't have to start from scratch. We can
# use all the atom types and angle settings defined earlier
# B16 is a coarse-grained beta-strand containing 16 residues (one "atom" each)
B16 {
# AtomID MoleculeID AtomType Charge X Y Z
write('Data Atoms') {
$atom:a1 $mol:... @atom:../sL 0.0 -1.8 0.0 0.0
$atom:a2 $mol:... @atom:../sH 0.0 1.8 0.0 4.8
$atom:a3 $mol:... @atom:../sL 0.0 -1.8 0.0 9.6
$atom:a4 $mol:... @atom:../sH 0.0 1.8 0.0 14.4
$atom:a5 $mol:... @atom:../sL 0.0 -1.8 0.0 19.2
$atom:a6 $mol:... @atom:../sH 0.0 1.8 0.0 24.0
$atom:a7 $mol:... @atom:../sL 0.0 -1.8 0.0 28.8
$atom:a8 $mol:... @atom:../sH 0.0 1.8 0.0 33.6
$atom:a9 $mol:... @atom:../sL 0.0 -1.8 0.0 38.4
$atom:a10 $mol:... @atom:../sH 0.0 1.8 0.0 43.2
$atom:a11 $mol:... @atom:../sL 0.0 -1.8 0.0 48.0
$atom:a12 $mol:... @atom:../sH 0.0 1.8 0.0 52.8
$atom:a13 $mol:... @atom:../sL 0.0 -1.8 0.0 57.6
$atom:a14 $mol:... @atom:../sH 0.0 1.8 0.0 62.4
$atom:a15 $mol:... @atom:../sL 0.0 -1.8 0.0 67.2
$atom:a16 $mol:... @atom:../sH 0.0 1.8 0.0 72.0
}
write('Data Bonds') {
$bond:b1 @bond:../backbone $atom:a1 $atom:a2
$bond:b2 @bond:../backbone $atom:a2 $atom:a3
$bond:b3 @bond:../backbone $atom:a3 $atom:a4
$bond:b4 @bond:../backbone $atom:a4 $atom:a5
$bond:b5 @bond:../backbone $atom:a5 $atom:a6
$bond:b6 @bond:../backbone $atom:a6 $atom:a7
$bond:b7 @bond:../backbone $atom:a7 $atom:a8
$bond:b8 @bond:../backbone $atom:a8 $atom:a9
$bond:b9 @bond:../backbone $atom:a9 $atom:a10
$bond:b10 @bond:../backbone $atom:a10 $atom:a11
$bond:b11 @bond:../backbone $atom:a11 $atom:a12
$bond:b12 @bond:../backbone $atom:a12 $atom:a13
$bond:b13 @bond:../backbone $atom:a13 $atom:a14
$bond:b14 @bond:../backbone $atom:a14 $atom:a15
$bond:b15 @bond:../backbone $atom:a15 $atom:a16
}
} # B16
# ----- Now build larger molecules using B16 and T3 -------
4SheetBarrel {
sheet1 = new B16.rot( 45, 0,0,1).move(-4.762203156,-4.762203156, -36.0)
sheet2 = new B16.rot( 135, 0,0,1).move( 4.762203156,-4.762203156, -36.0)
sheet3 = new B16.rot( 225, 0,0,1).move( 4.762203156, 4.762203156, -36.0)
sheet4 = new B16.rot( 315, 0,0,1).move(-4.762203156, 4.762203156, -36.0)
turn1 = new T3.rot(180,1,0,0).rot( 0, 0,0,1).move( 0, -7.8, 39.6)
turn2 = new T3.rot( 0,1,0,0).rot(-90,0,0,1).move(4.2, 0.0,-41.4)
turn3 = new T3.rot(180,1,0,0).rot(-180,0,0,1).move( 0, 7.8, 39.6)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:sheet1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:sheet2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:sheet3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:sheet2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:sheet3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:sheet4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
}
# Below I define several alternate conformations of the"4HelixBundleInsideOut"
# molecule I defined earlier in "1beadProtSci2010.lt". Same molecule however.
4HelixBundle {
helix1 = new A16.rot( -45, 0,0,1).move(-5.70,-5.70,-32.4)
helix2 = new A16.rot( 45, 0,0,1).move( 5.70,-5.70,-28.8)
helix3 = new A16.rot( 135, 0,0,1).move( 5.70, 5.70,-25.2)
helix4 = new A16.rot( 225, 0,0,1).move(-5.70, 5.70,-21.6)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
turn1 = new T3.rot(150,1,0,0).rot(-23,0,1,0).rot( 8,0,0,1).move(-3.6,-4.8,28.2)
turn2 = new T3.rot(-5,1,0,0).rot( 21,0,1,0).rot(-100,0,0,1).move(4.2,-0.66,-30.9)
turn3 = new T3.rot(150,1,0,0).rot(-23,0,1,0).rot(188,0,0,1).move(3.6,4.8,35.4)
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixBundle
# --- alternate conformations (same molecule) ----
# In the following version, the helices are oriented in a similar way,
# but they are separated a little further away from eachother.
4HelixBundleLoose {
helix1 = new A16.rot( -45, 0,0,1).move(-6.7347723,-6.7347723, -27.0)
helix2 = new A16.rot( 45, 0,0,1).move( 6.7347723,-6.7347723, -27.0)
helix3 = new A16.rot( 135, 0,0,1).move( 6.7347723, 6.7347723, -27.0)
helix4 = new A16.rot( 225, 0,0,1).move(-6.7347723, 6.7347723, -27.0)
turn1 = new T3.rot(180,1,0,0).rot(-17,0,0,1).move(-1.2,-4.2,32.4)
turn2 = new T3.rot( 0,1,0,0).rot(-100,0,0,1).move(4.2,-0.9,-28.8)
turn3 = new T3.rot(180,1,0,0).rot(163,0,0,1).move(1.2,4.2,32.4)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
}
# In following version, the helices are oriented in a similar way,
# but they are separated a little further away from eachother.
4HelixInsideOutLoose {
helix1 = new A16.rot(-225, 0,0,1).move(-6.7347723,-6.7347723, -27.0)
helix2 = new A16.rot(-135, 0,0,1).move( 6.7347723,-6.7347723, -27.0)
helix3 = new A16.rot( -45, 0,0,1).move( 6.7347723, 6.7347723, -27.0)
helix4 = new A16.rot( 45, 0,0,1).move(-6.7347723, 6.7347723, -27.0)
turn1 = new T3.rot(180,1,0,0).rot( 10,0,0,1).move( 0.78,-4.2,28.8)
turn2 = new T3.rot( 70,1,0,0).rot(-70,0,0,1).move( 10.8,2.4,-28.2)
turn3 = new T3.rot(180,1,0,0).rot(190,0,0,1).move(-0.78,4.2,28.8)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixInsideOutLoose
# In the following version, the 4 helices are arranged next to each other,
# side-by-side, in a planar conformation (instead of a compact bundle).
4HelixPlanar {
helix1 = new A16.rot(-00, 0,0,1).move(0, 0, -27.0)
helix2 = new A16.rot( 00, 0,0,1).move(14.4, 0, -27.0)
helix3 = new A16.rot(-00, 0,0,1).move(28.8, 0, -27.0)
helix4 = new A16.rot( 00, 0,0,1).move(43.2, 0, -27.0)
turn1 = new T3.rot(180,1,0,0).rot( 0,0,0,1).move( 4.8, 0, 31.8)
turn2 = new T3.rot( 0,1,0,0).rot(180,0,0,1).move(19.2, 0,-31.8)
turn3 = new T3.rot(180,1,0,0).rot( 0,0,0,1).move(34.6, 0, 31.8)
write('Data Bonds') {
$bond:turn1a @bond:../backbone $atom:turn1/a1 $atom:helix1/a16
$bond:turn1b @bond:../backbone $atom:turn1/a3 $atom:helix2/a16
$bond:turn2a @bond:../backbone $atom:turn2/a1 $atom:helix3/a1
$bond:turn2b @bond:../backbone $atom:turn2/a3 $atom:helix2/a1
$bond:turn3a @bond:../backbone $atom:turn3/a1 $atom:helix3/a16
$bond:turn3b @bond:../backbone $atom:turn3/a3 $atom:helix4/a16
}
create_var { $mol } # molecule ID number shared by all atoms in this protein
} # 4HelixPlanar
# -------- Minor coordinates adjustment: -----------
# Those coordinates in the commands above are a little too large.
# To make it easier to type them in, I was using sigma=6.0 Angstroms.
- # Instead, here I'll try using sigma=5.5 Angstroms. 5.5/6 = 0.916667)
+ # Instead, here I'll try using sigma=4.8 Angstroms. 4.8/6.0 = 0.8)
- 4SheetBarrel.scale(0.9166666666666666)
- 4HelixBundle.scale(0.9166666666666666)
- 4HelixBundleLoose.scale(0.9166666666666666)
- 4HelixInsideOutLoose.scale(0.9166666666666666)
- 4HelixPlanar.scale(0.9166666666666666)
+ 4SheetBarrel.scale(0.8)
+ 4HelixBundle.scale(0.8)
+ 4HelixBundleLoose.scale(0.8)
+ 4HelixInsideOutLoose.scale(0.8)
+ 4HelixPlanar.scale(0.8)
# Note: "scale()" only effects the initial coordinates of
# the molecule, not the force field parameters.
# (If you plan to minimize the molecule, you don't need to
# be so careful about the initial coordinates. In that case,
# you don't have worry about "scale()". Feel free to remove.)
} # 1beadProtSci2010 (namespace)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/CGLipidBr2005.lt b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/CGLipidBr2005.lt
index 2388f3afd..24be50ace 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/CGLipidBr2005.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/CGLipidBr2005.lt
@@ -1,195 +1,196 @@
# Note:
#
# This example may require additional features to be added to LAMMPS. If
# LAMMPS complains about an "Invalid pair_style", then download copy the
# "additional_lammps_code" from moltemplate.org, unpack it into your LAMMPS
# "src" directory and recompile LAMMPS.
#
# -------- Description --------
#
# This example contains an implementation of the DPPC lipid bilayer described in
# G. Brannigan, P.F. Philips, and F.L.H. Brown,
# Physical Review E, Vol 72, 011915 (2005)
# and:
# M.C. Watson, E.S. Penev, P.M. Welch, and F.L.H. Brown
# J. Chem. Phys. 135, 244701 (2011)
#
# As in Watson(JCP 2011), rigid bond-length constraints have been replaced
# by harmonic bonds.
#
# A truncated version of this lipid (named "DLPC") has also been added.
# Unlike the original "DPPC" molecule model, "DLPC" has not been carefully
# parameterized to reproduce the correct behavior in a lipid bilayer mixture.
#
# Units:
#
# The "epsilon" parameter in their model is approximately 2.75 kJ/mole
# ( = 0.657265774378585 kCal/mole, using 1kCal=4.184kJ)
# The "sigma" parameter corresponds to 7.5 angstroms.
CGLipidBr2005 {
write_once("In Init") {
# -- Default styles for "CGLipidBr2005" --
units real
atom_style full
# (Hybrid force field styles were used for portability.)
bond_style hybrid harmonic
#angle_style hybrid cosine/delta # <- used in the original article
angle_style hybrid harmonic # <- prevents unphysical acute angle turns
# Explanation:
# angle_style cosine/delta: U(theta) = k*(1-cos(theta-theta0))
# angle_style harmonic: U(theta) = k*(theta-theta0)^2
dihedral_style none
improper_style none
+
pair_style hybrid table linear 1130 &
lj/charmm/coul/charmm/inter es4k4l 14.5 15
+
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 # turn off pairs if "less than 3 bonds"
}
DPPC {
write("Data Atoms") {
$atom:h $mol:. @atom:head 0.0 0.00 0.00 33.75 # DPPC head atom
$atom:i $mol:. @atom:../int 0.0 -1.00 0.00 26.25
$atom:t1 $mol:. @atom:../tail 0.0 1.00 0.00 18.75
$atom:t2 $mol:. @atom:../tail 0.0 -1.00 0.00 11.25
$atom:t3 $mol:. @atom:../tail 0.0 1.00 0.00 3.75
}
write("Data Bonds") {
$bond:b1 @bond:../backbone $atom:h $atom:i
$bond:b2 @bond:../backbone $atom:i $atom:t1
$bond:b3 @bond:../backbone $atom:t1 $atom:t2
$bond:b4 @bond:../backbone $atom:t2 $atom:t3
}
write("Data Angles") {
$angle:a1 @angle:../backbone $atom:h $atom:i $atom:t1
$angle:a2 @angle:../backbone $atom:i $atom:t1 $atom:t2
$angle:a3 @angle:../backbone $atom:t1 $atom:t2 $atom:t3
}
# Define properties of the local (lipid-specific) atom:head type atom:
write_once("Data Masses") {
@atom:head 200.0
}
write_once("In Settings") {
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
pair_coeff @atom:../int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:../tail @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
}
} #DPPC
DLPC {
write("Data Atoms") {
$atom:h $mol:. @atom:head 0.0 0.00 0.00 30.00 # DLPC head atom
$atom:i $mol:. @atom:../int 0.0 -1.00 0.00 22.50
$atom:t1 $mol:. @atom:../tail 0.0 1.00 0.00 15.00
$atom:t2 $mol:. @atom:../tail 0.0 -1.00 0.00 7.50
}
write("Data Bonds") {
$bond:b1 @bond:../backbone $atom:h $atom:i
$bond:b2 @bond:../backbone $atom:i $atom:t1
$bond:b3 @bond:../backbone $atom:t1 $atom:t2
}
write("Data Angles") {
$angle:a1 @angle:../backbone $atom:h $atom:i $atom:t1
$angle:a2 @angle:../backbone $atom:i $atom:t1 $atom:t2
}
# Define properties of the local (lipid-specific) atom:head type atom:
write_once("Data Masses") {
@atom:head 200.0
}
write_once("In Settings") {
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
pair_coeff @atom:../int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:../tail @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
}
} #DLPC
# Particles and properties shared by all lipid types:
write_once("Data Masses") {
@atom:int 200.0
@atom:tail 200.0
- @atom:head 200.0 #<- Default head type. We may override it later.
}
write_once("In Settings") {
# -- Default settings/parameters for "CGLipidBr2005" --
# (Hybrid bond & angle styles were used for portability.)
# As in Watson(JCP 2011), rigid bond-length constraints
# have been replaced by harmonic bonds.
# The k_theta parameter should lie in between 5*epsilon and 10*epsilon.
bond_coeff @bond:backbone harmonic 116.847 7.5 #<--2*5000*eps/sig^2
}
write_once("In Settings") {
# cosine/delta: U(theta) = k*(1-cos(theta-theta0))
#angle_coeff @angle:backbone cosine/delta 4.60086042 180 #<-- 7*eps
# harmonic: U(theta) = k*(theta-theta0)^2 not (k/2)*(theta-theta0)^2
angle_coeff @angle:backbone harmonic 9.85898661 180 #<-->30*eps
}
# I use a stiffer bond-angle than the original Brannigan & Brown 2005 paper
# to attempt to compensate for the fact that here we are using a lipid
# mixture of DPPC and DLPC. (The mixture of lipids introduces a great deal
# of disorder into the bilayer which would not be present in a DPPC bilayer.
# This causes pores to form. Increasing the angle stiffness prevents this.)
write_once("In Settings") {
# The interaction of "atom:int" with other "atom:int" atoms is given by
# epsilon*(0.4*(sigma/r)^12 - 3.0*(sigma/r)^2), shifted and cutoff at
# r=3*sigma. This was implemented using pair_style table.
# Unfortunately, mixing lj/charmm and "table" pair styles in the same
# simulation is very inneficient.
- pair_coeff @atom:int @atom:int table table_int.dat INT
+ pair_coeff @atom:int @atom:int table table_int.dat INT
# The interaction of tail beads with eachother is given by the formula below
# and with other atoms ...using Lorenz-Berthelot and "repulsive wins" rules:
# epsilon*(0.4*(sigma/r)^12 - 1.0*(sigma/r)^6),
- pair_coeff @atom:tail @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
- pair_coeff @atom:int @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
-
- # The interaction of head beads which all other beads is given by:
- # epsilon*(0.4*(sigma/r)^12 - 0.0*(sigma/r)^6),
-
- pair_coeff @atom:head @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:int @atom:head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:tail @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
+ pair_coeff @atom:int @atom:tail lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
+ # The interaction between head beads from different types of lipids
+ # is (currently) repulsive:
+ pair_coeff @atom:DPPC/head @atom:DLPC/head lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
} # write_once("In Settings")
+
# Note: I divided epsilon by 4 to get "0.1643" because we are using the
# "es4k4l" coeffstyle, corresponding to U(r)=eps(4*K*(s/r)^12 + 4*L*(s/r)^6)
# (The "es4k4l" coeffstyle is the default.) Using this convention makes it
# easier to mix this coarse-grained lipid model with other molecular models.
} # CGLipidBr2005
# Note: This example has not been optimized for speed.
#
# Unfortunately, using both lj/charmm and "table" pair styles in the same
# simulation seems to be very inneficient. (The simulation is twice as slow
# as using only the "lj/charmm" pair styles for every pairwise interaction,
# ...and about 25% slower than using "table" for every pairwise interaction.
# However the lennard-jones pair styles support mixing, so we use them to
# make it easier to run these molecules with other molecules which don't use
# pair_table. I felt that portability was worth the extra 25% slow down.)
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/README.sh b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/README.sh
index df70396a7..b0de63737 100755
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/README.sh
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/README.sh
@@ -1,22 +1,22 @@
# This example shows how to build a multicomponent spherical vesicle.
# The lipid bilayer is composed of two different lipids (DPPC and DLPC),
# The vesicle contains 120 trans-membrane protein inclusions.
#
# ---------------- Prerequisites: ------------------
# You must run packmol to generate the coordinates beforehand.
# Afterwards, move and rename the final coordinate file to "../system.xyz"
# To do this, check the README.sh file in the ../packmol_files directory.
# (or follow these instructions below)
#
# cd ../packmol_files
# packmol < step1_proteins.inp
# packmol < step2_innerlayer.inp
# packmol < step3_outerlayer.inp
# cp step3_outerlayer.xyz ../system.xyz
#
# These steps could take a few hours.
#
# --- After you have done that, you can run moltemplate using this command: ---
-moltemplate.sh -xyz ../system.xyz system.lt
+moltemplate.sh system.lt -xyz ../system.xyz
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/system.lt b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/system.lt
index a470e1bf8..f73c0d5f1 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/system.lt
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/moltemplate_files/system.lt
@@ -1,191 +1,166 @@
# Description:
#
# This example shows how to build a multicomponent spherical vesicle.
# The lipid bilayer is composed of two different lipids (DPPC and DLPC),
# The vesicle contains 120 trans-membrane protein inclusions.
#
# The DPPC lipid model is described here:
# G. Brannigan, P.F. Philips, and F.L.H. Brown,
# Physical Review E, Vol 72, 011915 (2005)
# The protein model is described here:
# G. Bellesia, AI Jewett, and J-E Shea,
# Protein Science, Vol19 141-154 (2010)
# The new DLPC model is a truncated version of DPPC,
# (Its behaviour has not been rigorously tested.)
# Note that 50%/50% mixtures of DPPC & DLPC are commonly used to
# build liposomes http://www.ncbi.nlm.nih.gov/pubmed/10620293
#
# NOTE: THE COORDINATES FOR THESE MOLECULES ARE GENERATED BY PACKMOL (see below)
#
# NOTE:
# This example may require additional features to be added to LAMMPS.
# If LAMMPS complains about an "Invalid pair_style", then copy the code
# in the "additional_lammps_code" directory into your LAMMPS "src" directory
# and recompile LAMMPS.
# First, load the definitions of the molecules we will need:
import "CGLipidBr2005.lt"
using namespace CGLipidBr2005
import "1beadProtSci2010.lt"
using namespace 1beadProtSci2010
# PREREQUISITES:
# Coordinates for the molecules in this example are loaded from an .XYZ file
# created by PACKMOL. This must be done in advance. (See ../packmol_files/)
#
# The XYZ file was created by PACKMOL in 3 steps:
# (Add the proteins, then pack lipids in the inner & outer layers around them.)
#
# step1) Creae 120 proteins. Distribute them on the surface of the sphere.
#
# step2) Keeping the coordinates from step1 fixed,
# a) first we add 9500 DPPC lipids to the inner monolayer
# b) then we add 9500 DLPC lipids to the inner monolayer
#
# step3) Keeping the coordinates from steps 1 and 2 fixed,
-# a) first we add 12700 DPPC lipids to the outer monolayer
-# b) then we add 12700 DLPC lipids to the outer monolayer
+# a) first we add 12500 DPPC lipids to the outer monolayer
+# b) then we add 12500 DLPC lipids to the outer monolayer
#
# The order that molecules are created in moltemplate should match the order
# they appear in the final XYZ file created by PACKMOL. (See above.)
# Consequently I instantiate the molecules in the same order here:
# Step 1) ---- protein inclusions ----
proteins = new 4HelixInsideOut [120]
# Step 2a) ---- inner monolayer ----
dppc_in = new DPPC [9500]
# Step 2b)
dlpc_in = new DLPC [9500]
# Step 3a) ---- outer monolayer ----
-dppc_out = new DPPC [12700]
+dppc_out = new DPPC [12500]
# Step 3b)
-dlpc_out = new DLPC [12700]
+dlpc_out = new DLPC [12500]
# ------------------ boundary conditions --------------------
write_once("Data Boundary") {
-500.0 500.0 xlo xhi
-500.0 500.0 ylo yhi
-500.0 500.0 zlo zhi
}
-write_once("In Settings") {
-
- # -----------------------------------------------------------
- # -------- interactions between protein and lipids ----------
- # -----------------------------------------------------------
-
- # Interactions between the protein and lipid atoms are usually
- # determined by mixing rules. (However this is not possible some
- # for atoms, such as the "int" atoms in the lipid model which
- # interact using -1/r^2 attraction.) Mixing rules do not make
- # sense for these atoms so we must explicitly define their
- # interaction with all other atoms.
-
- # We want the hydrophobic interactions between hydrophobic residues in
- # the protein and beads the interior of the lipid to be energetically
- # similar to the attractive interactions between the lipid tails.
- #
- # Note: I made the width of the outward-facing protein beads slightly larger
- # ("12.5") whenever they interact with the "tail" beads in each lipid
- # (in order to make the protein wider there).
- # This hopefully relieves some of the internal negative pressure in the center
- # of the bilayer which can otherwise rip apart the protein or suck it into
- # the bilaer. (This is a hack, and I'm not sure if it is necessary.
- # For different protein or lipid models, you probably don't need this.)
- #
- # i j pairstylename eps sig K L
-
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 0.1643 12.5 0.4 -1
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 -1
-
- # To help keep the protein from tilting 90 degrees and burying itself
- # within the lipid bilayer, we make the turn regions at either
- # end of the protein (strongly) attracted to the head groups
- # of the lipid. (In reality, they would probably be attracted
- # to the water as well.)
-
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 5.5 1 -1
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 5.5 1 -1
-
- # All other interactions between proteins and lipids are steric.
+# -------- interactions between protein and lipids ----------
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+# Note: All atom types must include the full path (the name of
+# the namespace which defined them as well as the atom type name).
+# (This is because we are no longer inside that namespace.)
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+write_once("In Settings") {
- pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ # Interactions between the protein and lipid atoms are usually
+ # determined by mixing rules. However this is not possible some
+ # for atoms (such as the "int" atoms in the lipid model which
+ # interact using -1/r^2 attraction). Lorentz-Berthelot mixing
+ # rules do not make sense for these atoms so we must explicitly
+ # define their interaction with all other atoms.
+ # i j pairstylename eps sig K L
- # -----------------------------------------------------------
- # -------- Modifications to the protein model: --------------
- # -----------------------------------------------------------
- #
- # Turn off attraction between the hydrophobic "@atom:sH" beads:
- # (These beads are located in the outside of a trans-membrane protein.)
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 -1
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
- pair_coeff @atom:1beadProtSci2010/sH @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 5.5 1 0
+ # We want the interactions between hydrophobic residues and atoms in
+ # the interior of the lipid to be energetically similar to the attractive
+ # interactions between hydrophobic residues. (See 1beadProtSci2010.)
- # (Why: These beads are only attracted to
- # each other in an aqueous environment)
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 -1
- # ... and
- # Turn ON attraction between the hydrophilic "@atom:sL" beads.
- # (These beads are located in the interior of a trans-membrane protein.)
+ # All other interactions between proteins and lipids are steric.
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sH lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+ pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 7.5 1 0
+
+
+ # We also add an artificial attractive interaction between the
+ # turn residues of the protein and the lipid head groups in
+ # order to keep the protein upright. This might not be necessary
+
+ pair_coeff @atom:CGLipidBr2005/DPPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
+ pair_coeff @atom:CGLipidBr2005/DLPC/head @atom:1beadProtSci2010/tN lj/charmm/coul/charmm/inter 1.8065518 6.0 1 -1
+
+ # Add a weak attractive interaction between hydrophilic "sL" beads
+ # (Whose strength mimics the strength of interaction between tail beads
+ # in the lipid. This was absent from the original protein model.
+ # However without some kind of weak attraction between residues,
+ # the negative pressure in the interior of the bilayer membrane
+ # allways pulls the protein apart. Recall that in the membrane,
+ # the hydrophobic beads in the protein will face outwards towards the lipid
+ # tails leaving the hydrophilic amino acids of the protein in the interior.
+ # In reality, these polar groups form hydrogen bonds with each other.)
+
+ pair_coeff @atom:1beadProtSci2010/sL @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.3286 6.0 0.4 -1
+
+ # However these hydrophilic amino acids are not attracted to
+ # the bilayer interior.
+
+ pair_coeff @atom:CGLipidBr2005/int @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
+ pair_coeff @atom:CGLipidBr2005/tail @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 0.1643 7.5 0.4 0
- pair_coeff @atom:1beadProtSci2010/sL @atom:1beadProtSci2010/sL lj/charmm/coul/charmm/inter 1.8065518 5.5 1 -1
+}
- # Why?
- # In reality, polar groups in the interior of trans-membrane
- # proteins do form hydrogen bonds with each other. This was
- # absent from the original protein model because, in an aqueous
- # environment, these groups preferentially interact with the water.
- #
- # Why is this necessary?
- # Shouldn't attraction between lipid tails and the protein create
- # an effective force which brings the hydrophilic beads together?
- # (similar to the hydrophobic effect, but in reverse?).
- # Answer:
- # Unlike an aqueous environment (~zero pressure, or +1atm), there is
- # a large negative pressure in the interior of some bilayer membrane
- # models (such as this one). Without some kind of direct attraction
- # between interior residues, the protein will get pulled apart.
- # (Perhaps the attractive force I am using is too strong?)
-}
# Finally, we must combine the two force-field styles which were used for
# the coarse-grained lipid and protein. To do that, we write one last time
# to the "In Init" section. When reading the "Init" section LAMMPS will
# read these commands last and this will override any earlier settings.
write_once("In Init") {
# -- These styles override earlier settings --
units real
atom_style full
# (Hybrid force field styles were used for portability.)
bond_style hybrid harmonic
angle_style hybrid cosine/delta harmonic
dihedral_style hybrid fourier
improper_style none
- pair_style hybrid table linear 1130 lj/charmm/coul/charmm/inter es4k4l 14.5 15
+ pair_style hybrid table linear 1001 lj/charmm/coul/charmm/inter es4k4l 14.5 15
pair_modify mix arithmetic
special_bonds lj 0.0 0.0 1.0 # turn off pairs if "less than 3 bonds"
}
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DLPC.xyz b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DLPC.xyz
deleted file mode 100644
index 8ebfd8ef0..000000000
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DLPC.xyz
+++ /dev/null
@@ -1,6 +0,0 @@
-4
- DLPC coarse-grained lipid
- 4 0.000000 0.000000 30.000000
- 2 0.000000 0.000000 22.500000
- 3 0.000000 0.000000 15.000000
- 3 0.000000 0.000000 7.500000
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DPPC.xyz b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DPPC.xyz
deleted file mode 100644
index c25a2dbd1..000000000
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/DPPC.xyz
+++ /dev/null
@@ -1,7 +0,0 @@
-5
- DPPC coarse-grained lipid
- 1 0.000000 0.000000 33.750000
- 2 0.000000 0.000000 26.250000
- 3 0.000000 0.000000 18.750000
- 3 0.000000 0.000000 11.250000
- 3 0.000000 0.000000 3.750000
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/README.sh b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/README.sh
index 8df6285ca..2fe282995 100755
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/README.sh
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/README.sh
@@ -1,18 +1,33 @@
# Here we generate the starting coordinates of the simulation
-# using PACKMOL
+# using PACKMOL.
-# Running these three commands will probably take hours or even days.
-# (It depends on how dense and how uniformly you need the packing to be.)
+
+
+# You must run each packmol commend one after the other.
# NOTE: If PACKMOL gets stuck in an endless loop, then edit the corresponding
# "inp" file. This should not happen. You can also usually interrupt
-# packmol after 30 minutes, and the solution at that point should be good
-# enough for use.
-
+# packmol after 30 minutes, and the solution at that point (an .xyz file)
+# should be good enough for use.
packmol < step1_proteins.inp # This step determines the protein's location
# It takes ~20 minutes (on an intel i7)
-packmol < step2_innerlayer.inp # This step builds the inner monolayer
+packmol < step2_innerlayer.inp # this step builds the inner monolayer
# It takes ~90 minutes
-packmol < step3_outerlayer.inp # This step builds the outer monolayer
+packmol < step3_outerlayer.inp # this step builds the outer monolayer
# It takes ~4 hours
-# This should create a file named "system.xyz" (which moltemplate will read).
+
+# NOTE: PLEASE USE "packmol", NOT "ppackmol". ("ppackmol" is the
+# parallel-version of packmol using OpemMP. This example has NOT been
+# tested with "ppackmol". Our impression was that the "ppackmol"
+# version is more likely to get stuck in an infinite loop. -Andrew 2015-8)
+
+
+# Step3 creates a file named "step3_outerlayer.xyz" containing the coordinates
+# in all the atoms of all the molecules. Later we will run moltemplate.sh
+# using the "-xyz ../system.xyz" command line argument. That will instruct
+# moltemplate to look for a file named "system.xyz" in the parent directory.
+# So I rename the "step3_outerlayer.xyz" file to "system.xyz", and move it
+# to this directory so that later moltemplate.sh can find it.
+
+mv -f step3_outerlayer.xyz ../system.xyz
+
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/protein.xyz b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/protein.xyz
deleted file mode 100644
index 75557e6ff..000000000
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/protein.xyz
+++ /dev/null
@@ -1,75 +0,0 @@
-73
-
-6 -2.11383 -5.225 -29.7
-6 -5.225 -2.11383 -26.4
-7 -8.33617 -5.225 -23.1
-7 -5.225 -8.33617 -19.8
-6 -2.11383 -5.225 -16.5
-6 -5.225 -2.11383 -13.2
-7 -8.33617 -5.225 -9.9
-7 -5.225 -8.33617 -6.6
-6 -2.11383 -5.225 -3.3
-6 -5.225 -2.11383 0
-7 -8.33617 -5.225 3.3
-7 -5.225 -8.33617 6.6
-6 -2.11383 -5.225 9.9
-6 -5.225 -2.11383 13.2
-7 -8.33617 -5.225 16.5
-7 -5.225 -8.33617 19.8
-6 5.225 -2.11383 -26.4
-6 2.11383 -5.225 -23.1
-7 5.225 -8.33617 -19.8
-7 8.33617 -5.225 -16.5
-6 5.225 -2.11383 -13.2
-6 2.11383 -5.225 -9.9
-7 5.225 -8.33617 -6.6
-7 8.33617 -5.225 -3.3
-6 5.225 -2.11383 0
-6 2.11383 -5.225 3.3
-7 5.225 -8.33617 6.6
-7 8.33617 -5.225 9.9
-6 5.225 -2.11383 13.2
-6 2.11383 -5.225 16.5
-7 5.225 -8.33617 19.8
-7 8.33617 -5.225 23.1
-6 2.11383 5.225 -23.1
-6 5.225 2.11383 -19.8
-7 8.33617 5.225 -16.5
-7 5.225 8.33617 -13.2
-6 2.11383 5.225 -9.9
-6 5.225 2.11383 -6.6
-7 8.33617 5.225 -3.3
-7 5.225 8.33617 0
-6 2.11383 5.225 3.3
-6 5.225 2.11383 6.6
-7 8.33617 5.225 9.9
-7 5.225 8.33617 13.2
-6 2.11383 5.225 16.5
-6 5.225 2.11383 19.8
-7 8.33617 5.225 23.1
-7 5.225 8.33617 26.4
-6 -5.225 2.11383 -19.8
-6 -2.11383 5.225 -16.5
-7 -5.225 8.33617 -13.2
-7 -8.33617 5.225 -9.9
-6 -5.225 2.11383 -6.6
-6 -2.11383 5.225 -3.3
-7 -5.225 8.33617 0
-7 -8.33617 5.225 3.3
-6 -5.225 2.11383 6.6
-6 -2.11383 5.225 9.9
-7 -5.225 8.33617 13.2
-7 -8.33617 5.225 16.5
-6 -5.225 2.11383 19.8
-6 -2.11383 5.225 23.1
-7 -5.225 8.33617 26.4
-7 -8.33617 5.225 29.7
-8 -3.35683 -4.56775 24.0698
-8 0.795667 -6.90708 26.8152
-8 4.78683 -3.13225 27.0802
-8 2.75642 6.08575 -28.7448
-8 6.54133 3.72717 -31.9651
-8 5.58525 -1.68575 -31.7552
-8 3.35683 4.56775 29.8448
-8 -0.795667 6.90708 32.5903
-8 -4.78683 3.13225 32.8552
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step2_innerlayer.inp b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step2_innerlayer.inp
index 7564f116c..9f61960f2 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step2_innerlayer.inp
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step2_innerlayer.inp
@@ -1,70 +1,70 @@
# NOTE: YOU MUST COMPLETE STEP 1 BEFORE RUNNING PACKMOL ON THIS FILE
# Step 2: Pack the lipids in the inner monolayer around the proteins from step1.
#
# ----- Run using: -----
# packmol < step2_innerlayer.inp
# (This takes about 90 minutes on an Intel i7 processor)
# ----- Settings: -----
# All the atoms from diferent molecules will be at least 5.5 Angstrons apart
tolerance 5.5
# (Setting "discale" to 1.4 increases the typical separation
# distance to approximately 1.4*5.5 = 7.7 Angstroms.)
discale 1.4
# The other parameters below are optional:
nloop 10000
maxit 20
seed 12345
sidemax 3000.0
# What fraction of the molecules are moved during "large moves"? (default 0.05)
movefrac 0.05
# The output file name
output step2_innerlayer.xyz
# File types are in xyz format
filetype xyz
# The proteins whose position we determined earlier in step 1
# will be frozen in place during this step.
structure step1_proteins.xyz
number 1
fixed 0. 0. 0. 0. 0. 0.
end structure
# 9500 DPPC lipids will be put in a shell with their hydrophilic heads
# (atom 1) pointing inwards, and their tails (atom 5) pointing outwards.
structure DPPC.xyz
number 9500
atoms 1
inside sphere 0. 0. 0. 270.0
end atoms
atoms 5
- outside sphere 0. 0. 0. 292.0
+ outside sphere 0. 0. 0. 295.0
end atoms
end structure
# 9500 DLPC lipids will be put in a shell with their hydrophilic heads
# (atom 1) pointing inwards, and their tails (atom 4) pointing outwards.
structure DLPC.xyz
number 9500
atoms 1
- inside sphere 0. 0. 0. 272.0
+ inside sphere 0. 0. 0. 273.0
end atoms
atoms 4
- outside sphere 0. 0. 0. 294.0
+ outside sphere 0. 0. 0. 295.0
end atoms
end structure
diff --git a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step3_outerlayer.inp b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step3_outerlayer.inp
index 52d27d5a8..bed1c0424 100644
--- a/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step3_outerlayer.inp
+++ b/tools/moltemplate/examples/coarse_grained_examples/vesicle_Brannigan2005+Bellesia2010/packmol_files/step3_outerlayer.inp
@@ -1,73 +1,70 @@
# NOTE: YOU MUST COMPLETE STEPS 1 AND 2 BEFORE RUNNING PACKMOL ON THIS FILE
# Step 3: Pack the lipids in the outer monolayer around the proteins from step1.
#
# ----- Run using: -----
# packmol < step3_outerlayer.inp
# (This takes about 4 hours on an Intel i7 processor)
# ----- Settings: -----
# All the atoms from diferent molecules will be at least 5.5 Angstrons apart
tolerance 5.5
# (Setting "discale" to 1.4 increases the typical separation
# distance to approximately 1.4*5.5 = 7.7 Angstroms.)
discale 1.4
# The other parameters below are optional:
nloop 10000
maxit 20
seed 12345
sidemax 3000.0
# What fraction of the molecules are moved during "large moves"? (default 0.05)
movefrac 0.05
# The output file name
-#output step3_outerlayer.xyz
-# Give it this name instead:
-
-output system.xyz
+output step3_outerlayer.xyz
# File types are in xyz format
filetype xyz
# The proteins and lipids whose position we determined earlier in steps 1-2
# will be frozen in place during this step.
structure step2_innerlayer.xyz
number 1
fixed 0. 0. 0. 0. 0. 0.
end structure
# 12500 DPPC lipids will be put in a shell with their hydrophilic heads
# (atom 1) pointing outwards, and their tails (atom 5) pointing inwards.
structure DPPC.xyz
number 12500
atoms 5
- inside sphere 0. 0. 0. 315.0
+ inside sphere 0. 0. 0. 310.0
end atoms
atoms 1
outside sphere 0. 0. 0. 336.0
end atoms
end structure
# 12500 DLPC lipids will be put in a shell with their hydrophilic heads
# (atom 1) pointing outwards, and their tails (atom 4) pointing inwards.
structure DLPC.xyz
number 12500
atoms 4
- inside sphere 0. 0. 0. 318.0
+ inside sphere 0. 0. 0. 313.0
end atoms
atoms 1
outside sphere 0. 0. 0. 332.0
end atoms
end structure
diff --git a/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/README.TXT b/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/README.TXT
index 3e985be85..68f7c2ab0 100644
--- a/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/README.TXT
+++ b/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/README.TXT
@@ -1,23 +1,23 @@
Description:
This is a simulation of pyramid-shaped objects resting on an immobile surface
(resembling graphene). Each pyramid is built from spherical particles stacked
-like cannon-balls, or stacked fruit. Ordinarily, the stack does not move
+like cannon-balls (or fruit). Ordinarily, the stack does not move
because the particles at the ground layer are immobilized. However,
given an initial (small) perturbation the pyramids collapse in an avalanche.
(In this example, the perturbation is due to shock because we (intentionally)
did not minimize the system before starting the simulation. This shock
- causes an avalanche to occur approximately 5000 timesteps later.)
+ causes an avalanche to begin approximately 5000 timesteps later.)
The particles roll down the pyramid and bounce off the "ground". The bouncing
is due to a repulsive external force which is added artificially.
(See the "run.in" file.) The simulation looks weird without something
to bounce off of. So I added a graphene surface at the bottom as scenery.
(It does not exert any force on the atoms.)
(Random comment: This could be a fun example to illustrate the Boltzmann
distribution. Because there is no damping, in a small region, I'm guessing
the particle heights should eventually approach the Boltzmann distribution
for some temperature consistent with the initial potential energy of the
system.)
diff --git a/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/run.in b/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/run.in
index 27b1e21af..a99dfda28 100644
--- a/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/run.in
+++ b/tools/moltemplate/examples/misc_examples/pyramids_vs_gravity/run.in
@@ -1,64 +1,68 @@
# -- Init Section --
include system.in.init
boundary p p f
# -- Atom Definition Section --
read_data system.data
# -- Settings Section --
include system.in.settings
# -- Run Section --
timestep 0.0025
-dump 1 all custom 200 traj_nvt.lammpstrj id mol type x y z ix iy iz
+dump 1 all custom 200 traj.lammpstrj id mol type x y z ix iy iz
thermo_style custom step temp pe etotal
thermo 100 # time interval for printing out "thermo" data
# ---- Set up the physical environment ----
# Add gravity:
fix fxGrav gMobile gravity 0.05 vector 0 0 -1
# Create a "ground" surface.
# This is a repulsive "wall" which particles can bounce off of:
fix fxWall gMobile wall/lj126 zlo EDGE 1.0 0.8908987181403393 1.0
# ---- Evolve the system: ----
# Evolve the (mobile) atoms using ordinary Newton's laws (NVE)
fix fxNVE gMobile nve
# IF YOU WANT TO ADD DAMPING, THEN UNCOMMENT THE NEXT LINE:
#fix fxLan gMobile langevin 0.001 0.001 10000.0 48279
# To use Langevin dynamics in LAMMPS you need both "fix langevin" and "fix nve"
# (See http://lammps.sandia.gov/doc/fix_langevin.html for details.)
# This was not tested.
+# OPTIONAL:
# For efficient simulation in parallel, try using "fix balance":
# (This will adjust the spatial decomposition as the distribution of
# particles changes over time.)
+# http://lammps.sandia.gov/doc/fix_balance.html
+# fix fxBalance gMobile balance 1000 1.1 shift 1000 xy 20 1.1
+# Alternatiely, try this:
+#fix fxBalance gMobile balance 1000 1.2 rcb
-fix fxBalance gMobile balance 1000 xy 20 1.3
-# Optional: Improve efficiency by omitting the calcuation of interactions
+# OPTIONAL: Improve efficiency by omitting the calcuation of interactions
# between immobile atoms:
neigh_modify exclude group gImmobile gImmobile
restart 50000 restart_nvt
run 200000
write_data system_after_nvt.data
diff --git a/tools/moltemplate/moltemplate_manual.pdf b/tools/moltemplate/moltemplate_manual.pdf
index 6c23a2986..24ebb0815 100644
Binary files a/tools/moltemplate/moltemplate_manual.pdf and b/tools/moltemplate/moltemplate_manual.pdf differ
diff --git a/tools/moltemplate/src/dump2data.py b/tools/moltemplate/src/dump2data.py
index 553a164c3..adcb5a036 100755
--- a/tools/moltemplate/src/dump2data.py
+++ b/tools/moltemplate/src/dump2data.py
@@ -1,1286 +1,1290 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
dump2data.py
Extract dynamical degrees of freedom from a lammps DUMP file (from the stdin)
and construct a new DATA file (to the stdout).
A reference DATA file is needed (argument).
basic usage
./dump2data.py orig_file.data < dump.lammpstrj > new_file.data
(This extract last frame, uses "full" atom_style.)
options:
./dump2data.py [-t t -atomstyle style] orig.data < dump.lammpstrj > new.data
"""
# Authors: Andrew Jewett
# License: New BSD License
# Copyright (c) 2014
# All rights reserved.
import sys
from collections import defaultdict
from operator import itemgetter, attrgetter
class InputError(Exception):
def __init__(self, err_msg):
self.err_msg = err_msg
def __str__(self):
return self.err_msg
def ErrorLeader(infile, lineno):
return '\"'+infile+'\", line '+str(lineno)+': '
class MiscSettings(object):
def __init__(self):
self.tstart = None
self.tstop = None
self.timestep_str = ''
self.last_frame = False
self.center_frame = False
self.output_format = 'data'
self.input_format = 'dump'
self.multi = True
self.skip_interval = 1
self.scale = None
class AtomStyleSettings(object):
def __init__(self):
# The following new member data indicate which columns store
# LAMMPS-specific information.
# The next 6 members store keep track of the different columns
# of the "Atoms" section of a LAMMPS data file:
self.column_names = [] #<--A list of column names (optional)
self.i_coords=[] #<--A triplet of integers indicating which columns store coordinate data
#self.ii_coords= [] #<--A list of triplets of column indexes storing coordinate data
self.ii_vects=[] #<--A list of triplets of column indexes storing directional data
# (such as dipole or ellipsoid orientations)
self.i_atomid=None #<--An integer indicating which column has the atomid
self.i_atomtype=None #<--An integer indicating which column has the atomtype
self.i_molid=None #<--An integer indicating which column has the molid, if applicable
class DataSettings(AtomStyleSettings):
def __init__(self):
AtomStyleSettings.__init__(self)
self.contents = ''
self.file_name = ''
# Atom Styles in LAMMPS as of 2011-7-29
g_style_map = {'angle': ['atom-ID','molecule-ID','atom-type','x','y','z'],
'atomic': ['atom-ID','atom-type','x','y','z'],
'bond': ['atom-ID','molecule-ID','atom-type','x','y','z'],
'charge': ['atom-ID','atom-type','q','x','y','z'],
'colloid': ['atom-ID','atom-type','x','y','z'],
'dipole': ['atom-ID','atom-type','q','x','y','z','mux','muy','muz'],
'electron': ['atom-ID','atom-type','q','spin','eradius','x','y','z'],
'ellipsoid':['atom-ID','atom-type','x','y','z','quatw','quati','quatj','quatk'],
'full': ['atom-ID','molecule-ID','atom-type','q','x','y','z'],
'granular': ['atom-ID','atom-type','diameter','density','x','y','z'],
'molecular':['atom-ID','molecule-ID','atom-type','x','y','z'],
'peri': ['atom-ID','atom-type','volume','density','x','y','z'],
'hybrid': ['atom-ID','atom-type','x','y','z']}
def AtomStyle2ColNames(atom_style_string):
atom_style_string = atom_style_string.strip()
if len(atom_style_string) == 0:
raise InputError('Error(dump2data): Invalid atom_style\n'
' (The atom_style command was followed by an empty string.)\n')
atom_style_args = atom_style_string.split()
atom_style = atom_style_args[0]
hybrid_args = atom_style_args[1:]
if (atom_style not in g_style_map):
if (len(atom_style_args) >= 2):
# If the atom_style_string includes at least 2 words, then we
# interpret this as a list of the individual column names
return atom_style_args
else:
raise InputError('Error(dump2data): Unrecognized atom_style: \"'+atom_style+'\"\n')
if (atom_style != 'hybrid'):
return g_style_map[atom_style]
else:
column_names = ['atom-ID','atom-type','x','y','z']
if (len(hybrid_args)==0):
raise InputError('Error(dump2data): atom_style hybrid must be followed by a sub_style.\n')
for sub_style in hybrid_args:
if (sub_style not in g_style_map):
raise InputError('Error(dump2data): Unrecognized atom_style: \"'+sub_style+'\"\n')
for cname in g_style_map[sub_style]:
if cname not in column_names:
column_names.append(cname)
return column_names
def ColNames2AidAtypeMolid(column_names):
# Because of the diversity of ways that these
# numbers are referred to in the LAMMPS documentation,
# we have to be flexible and allow the user to refer
# to these quantities in a variety of ways.
# Hopefully this covers everything:
i_atomid = None
if 'atom-ID' in column_names:
i_atomid = column_names.index('atom-ID')
elif 'atom−ID' in column_names: # (− is the character used in the manual)
i_atomid = column_names.index('atom−ID')
elif 'atomID' in column_names:
i_atomid = column_names.index('atomID')
elif 'atomid' in column_names:
i_atomid = column_names.index('atomid')
elif 'id' in column_names:
i_atomid = column_names.index('id')
elif 'atom' in column_names:
i_atomid = column_names.index('atom')
elif '$atom' in column_names:
i_atomid = column_names.index('$atom')
else:
raise InputError('Error(dump2data): List of column names lacks an \"atom-ID\"\n')
i_atomtype = None
if 'atom-type' in column_names:
i_atomtype = column_names.index('atom-type')
elif 'atom−type' in column_names: # (− hyphen character used in manual)
i_atomtype = column_names.index('atom−type')
elif 'atomtype' in column_names:
i_atomtype = column_names.index('atomtype')
elif 'type' in column_names:
i_atomtype = column_names.index('type')
elif '@atom' in column_names:
i_atomtype = column_names.index('@atom')
else:
raise InputError('Error(dump2data): List of column names lacks an \"atom-type\"\n')
i_molid = None
if 'molecule-ID' in column_names:
i_molid = column_names.index('molecule-ID')
elif 'molecule−ID' in column_names: # (− hyphen character used in manual)
i_molid = column_names.index('molecule−ID')
elif 'moleculeID' in column_names:
i_molid = column_names.index('moleculeID')
elif 'moleculeid' in column_names:
i_molid = column_names.index('moleculeid')
elif 'molecule' in column_names:
i_molid = column_names.index('molecule')
elif 'molID' in column_names:
i_molid = column_names.index('molID')
elif 'molid' in column_names:
i_molid = column_names.index('molid')
elif 'mol' in column_names:
i_molid = column_names.index('mol')
elif '$mol' in column_names:
i_molid = column_names.index('$mol')
else:
pass # some atom_types do not have a valid molecule-ID
return i_atomid, i_atomtype, i_molid
def ColNames2Coords(column_names):
""" Which of the columns correspond to coordinates
which must be transformed using rigid-body
(affine: rotation + translation) transformations?
This function outputs a list of lists of triplets of integers.
"""
i_x = None
i_y = None
i_z = None
if 'x' in column_names:
i_x = column_names.index('x')
if 'y' in column_names:
i_y = column_names.index('y')
if 'z' in column_names:
i_z = column_names.index('z')
if (((i_x != None) != (i_y != None)) or
((i_y != None) != (i_z != None)) or
((i_z != None) != (i_x != None))):
raise InputError('Error(dump2data): columns must include \"x\", \"y\", and \"z\".\n')
return [[i_x, i_y, i_z]]
def ColNames2Vects(column_names):
""" Which of the columns correspond to coordinates
which must be transformed using rotations?
Some coordinates like dipole moments and
ellipsoid orientations should only be rotated
(not translated).
This function outputs a list of lists of triplets of integers.
"""
vects = []
i_mux = None
i_muy = None
i_muz = None
if 'mux' in column_names:
i_mux = column_names.index('mux')
if 'muy' in column_names:
i_muy = column_names.index('muy')
if 'muz' in column_names:
i_muz = column_names.index('muz')
if (((i_mux != None) != (i_muy != None)) or
((i_muy != None) != (i_muz != None)) or
((i_muz != None) != (i_mux != None))):
raise InputError('Error(dump2data): custom atom_style list must define mux, muy, and muz or none.\n')
if i_mux != None:
vects.append([i_mux, i_muy, i_muz])
i_quati = None
i_quatj = None
i_quatk = None
if 'quati' in column_names:
i_quati = column_names.index('quati')
if 'quatj' in column_names:
i_quatj = column_names.index('quatj')
if 'quatk' in column_names:
i_quatk = column_names.index('quatk')
if (((i_quati != None) != (i_quatj != None)) or
((i_quatj != None) != (i_quatk != None)) or
((i_quatk != None) != (i_quati != None))):
raise InputError('Error(dump2data): custom atom_style list must define quati, quatj, and quatk or none.\n')
if i_quati != None:
vects.append([i_quati, i_quatj, i_quatk])
return vects
def ParseArgs(argv,
misc_settings,
data_settings,
warning_strings=None):
# Loop over the remaining arguments not processed yet.
# These arguments are specific to the lttree.py program
# and are not understood by this program.
i = 1
while i < len(argv):
#sys.stderr.write('argv['+str(i)+'] = \"'+argv[i]+'\"\n')
if ((argv[i].lower() == '-atomstyle') or
(argv[i].lower() == '-atom_style') or
(argv[i].lower() == '-atom-style')):
in_init = []
if i+1 >= len(argv):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by a an atom_style name.\n'
' (Or single quoted string which includes a space-separated\n'
' list of column names.)\n')
data_settings.column_names = AtomStyle2ColNames(argv[i+1])
sys.stderr.write(' \"Atoms\" column format:\n')
sys.stderr.write(' '+(' '.join(data_settings.column_names))+'\n')
# ColNames2Coords() and ColNames2Vects() generate lists of
# triplets of integers, storing the column numbers containing
# x, y, and z coordinate values, and vx,vy,vz direction vectors.
data_settings.ii_vects = ColNames2Vects(data_settings.column_names)
ii_coords = ColNames2Coords(data_settings.column_names)
# This program assumes that there is only one coordinate triplet
# (x,y,z) for each atom. Hence we assume that len(ii_coords)==1
assert(len(ii_coords) == 1)
data_settings.i_coords = ii_coords[0]
# Now figure out which columns correspond to atomid, atomtype, molid
data_settings.i_atomid, data_settings.i_atomtype, data_settings.i_molid = ColNames2AidAtypeMolid(data_settings.column_names)
del(argv[i:i+2])
elif (argv[i].lower() == '-icoord'):
if i+1 >= len(argv):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by list of integers\n'
' corresponding to column numbers for coordinates in\n'
' the \"Atoms\" section of a LAMMPS data file.\n')
ilist = argv[i+1].split()
if (len(ilist) % 3) != 0:
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by list of integers.\n'
' This is usually a list of 3 intebers, but it can contain more.\n'
' The number of cooridnate columns must be divisible by 3,\n'
' (even if the simulation is in 2 dimensions)\n')
#ii_coords = []
#for i in range(0, len(ilist)/3):
# cols = [ilist[3*i]+1, ilist[3*i+1]+1, ilist[3*i+2]+1]
# ii_coords.append(cols)
#if ((len(ii_coords) != 0) or (len(ii_coords[0]) != 3)):
# raise InputError('Error(dump2data): Argument \"'+argv[i]+'\" must be followed by exactly 3 integers.\n')
data_settings.i_coords = ilist
if (len(i_coords) != 3):
raise InputError('Error(dump2data): Argument \"'+argv[i]+'\" must be followed by exactly 3 integers.\n')
data_settings.i_coords = ii_coords[0]
del(argv[i:i+2])
elif (argv[i].lower() == '-ivect'):
if i+1 >= len(argv):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by list of integers\n'
' corresponding to column numbers for direction vectors in\n'
' the \"Atoms\" section of a LAMMPS data file.\n')
ilist = argv[i+1].split()
if (len(ilist) % 3) != 0:
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by list of integers.\n'
' This is usually a list of 3 intebers, but it can contain more.\n'
' The number of cooridnate columns must be divisible by 3,\n'
' (even if the simulation is in 2 dimensions)\n')
data_settings.ii_vects = []
for i in range(0, len(ilist)/3):
cols = [ilist[3*i]+1, ilist[3*i+1]+1, ilist[3*i+2]+1]
setting.ii_vects.append(cols)
# This should override any earlier settings as a result of the
# -atomstyle argument. So you can specify a custom list of column
# names using -atomstyle "list of column names", and then afterwards
# specify which of these columns correspond to direction vectors
# using the "-ivect" command line argument later on.
# This way, in theory you should be able to read columns from
# new custom atom-styles that have not been invented yet.
# (Although I haven't tested this.)
del(argv[i:i+2])
# i_atomid is not really needed for this program, but I load it anyway
elif ((argv[i].lower() == '-iatomid') or
(argv[i].lower() == '-iid') or
(argv[i].lower() == '-iatom-id')):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an integer\n'
' (>=1) indicating which column in the \"Atoms\" section of a\n'
' LAMMPS data file contains the atom id number (typically 1).\n'
' (This argument is unnecessary if you use the -atomstyle argument.)\n')
i_atomid = int(argv[i+1])-1
del(argv[i:i+2])
# i_atomtype is not really needed for this program, but I load it anyway
elif ((argv[i].lower() == '-iatomtype') or
(argv[i].lower() == '-itype') or
(argv[i].lower() == '-iatom-type')):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an integer\n'
' (>=1) indicating which column in the \"Atoms\" section of a\n'
' LAMMPS data file contains the atom type.\n'
' (This argument is unnecessary if you use the -atomstyle argument.)\n')
i_atomtype = int(argv[i+1])-1
del(argv[i:i+2])
# i_molid is not really needed for this program, but I load it anyway
elif ((argv[i].lower() == '-imolid') or
(argv[i].lower() == '-imol') or
(argv[i].lower() == '-imol-id') or
(argv[i].lower() == '-imoleculeid') or
(argv[i].lower() == '-imolecule-id')):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an integer\n'
' (>=1) indicating which column in the \"Atoms\" section of a\n'
' LAMMPS data file contains the molecule id number.\n'
' (This argument is unnecessary if you use the -atomstyle argument.)\n')
del(argv[i:i+2])
# Which frame do we want?
elif (argv[i].lower() == '-t'):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an integer indicating\n'
' the frame you want to extract from the dump file (trajectory).\n'
' This integer should match the timestep corresponding to the frame\n'
' whose coordinates you wish to extract.\n')
misc_settings.timestep_str = argv[i+1]
del(argv[i:i+2])
misc_settings.multi = False
misc_settings.last_frame = False
elif (argv[i].lower() == '-tstart'):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an integer indicating\n'
' the first frame you want to extract from the dump file (trajectory).\n'
' This integer should match the timestep corresponding to the frame\n'
' (after which) you wish to extract coordinates.\n')
misc_settings.tstart = float(argv[i+1])
del(argv[i:i+2])
misc_settings.multi = True
elif (argv[i].lower() == '-tstop'):
if ((i+1 >= len(argv)) or (not str.isdigit(argv[i+1]))):
raise InputError('Error(dump2data): '+argv[i]+' flag should be followed by an number indicating\n'
' the first frame you want to extract from the dump file (trajectory).\n'
' Frames after this timestep will be ignored.\n')
misc_settings.tstop = float(argv[i+1])
del(argv[i:i+2])
misc_settings.multi = True
elif (argv[i].lower() == '-center'):
misc_settings.center_frame = True
del(argv[i:i+1])
elif ((argv[i].lower() == '-raw') or (argv[i].lower() == '-rawout')):
misc_settings.output_format = 'raw'
del(argv[i:i+1])
elif (argv[i].lower() == '-rawin'):
misc_settings.input_format = 'raw'
misc_settings.multi = False
del(argv[i:i+1])
elif ((argv[i].lower() == '-xyz') or (argv[i].lower() == '-xyzout')):
misc_settings.output_format = 'xyz'
del(argv[i:i+1])
elif (argv[i].lower() == '-xyzin'):
misc_settings.input_format = 'xyz'
misc_settings.multi = False
del(argv[i:i+1])
elif (argv[i].lower() == '-multi'):
misc_settings.multi = True
del(argv[i:i+1])
elif (argv[i].lower() == '-last'):
misc_settings.last_frame = True
misc_settings.multi = False
del(argv[i:i+1])
elif (argv[i].lower() == '-interval'):
misc_settings.skip_interval = int(argv[i+1])
del(argv[i:i+2])
elif (argv[i].lower() == '-scale'):
misc_settings.scale = float(argv[i+1])
del(argv[i:i+2])
elif ((argv[i][0] == '-') and (__name__ == "__main__")):
raise InputError('Error(dump2data): Unrecogized command line argument \"'+argv[i]+'\"\n')
else:
i += 1
usage_examples = \
""" Typical usage:
dump2data.py orig_file.data < dump.lammpstrj > new_file.data
(This extracts last frame, uses "full" atom_style.)
Additional options:
dump2data.py -t t -atomstyle style orig.data < dump.lammpstrj > new.data
"""
#if __name__ == "__main__":
if (len(argv) > 2):
# if there are more than 2 remaining arguments,
# AND
# no other function will process the remaining argument list
# (ie. if __name__ == "__main__")
# THEN
raise InputError(' ----\n'
'ERROR(dump2data): You have too many arguments (or unrecognized arguments):\n'
' \"'+(' '.join(argv))+'\"\n'
' ----\n'
+usage_examples)
elif (len(argv) < 2):
if misc_settings.output_format == 'data':
raise InputError(' ----\n'
'ERROR(dump2data): Problem with argument list:\n'
' Expected a LAMMPS .data file as an argument.\n'
' ----\n'
+usage_examples)
else:
in_data_file = open(argv[1], 'r')
data_settings.file_name = argv[1];
data_settings.contents = in_data_file.readlines()
in_data_file.close()
#end of if-then statement for "if __name__ == "__main__""
if len(data_settings.i_coords) == 0:
if warning_strings != None:
warning_strings.append('WARNING(dump2data): atom_style unknown. (Use -atomstyle style. Assuming \"full\")')
warn_atom_style_unspecified = True
# The default atom_style is "full"
data_settings.column_names = AtomStyle2ColNames('full')
ii_coords = ColNames2Coords(data_settings.column_names)
# This program assumes that there is only one coordinate triplet
# (x,y,z) for each atom. Hence we assume that len(ii_coords)==1
assert(len(ii_coords) == 1)
data_settings.i_coords = ii_coords[0]
data_settings.ii_vects = ColNames2Vects(data_settings.column_names)
data_settings.i_atomid, data_settings.i_atomtype, data_settings.i_molid = ColNames2AidAtypeMolid(data_settings.column_names)
### sys.stderr.write('########################################################\n'
### '## WARNING: atom_style unspecified ##\n'
### '## --> \"Atoms\" column data has an unknown format. ##\n'
### '## Assuming atom_style = \"full\" ##\n'
### '########################################################\n'
### '## To specify the \"Atoms\" column format you can: ##\n'
### '## 1) Use the -atom_style \"STYLE\" argument ##\n'
### '## where \"STYLE\" is a string indicating a LAMMPS ##\n'
### '## atom_style, including hybrid styles.(Standard ##\n'
### '## atom styles defined in 2011 are supported.) ##\n'
### '## 2) Use the -atom_style \"COL_LIST\" argument ##\n'
### '## where \"COL_LIST" is a quoted list of strings ##\n'
### '## indicating the name of each column. ##\n'
### '## Names \"x\",\"y\",\"z\" are interpreted as ##\n'
### '## atomic coordinates. \"mux\",\"muy\",\"muz\" ##\n'
### '## and \"quati\",\"quatj\",\"quatk\" are ##\n'
### '## interpreted as direction vectors. ##\n'
### '## 3) Use the -icoord \"cx cy cz...\" argument ##\n'
### '## where \"cx cy cz\" is a list of integers ##\n'
### '## indicating the column numbers for the x,y,z ##\n'
### '## coordinates of each atom. ##\n'
### '## 4) Use the -ivect \"cmux cmuy cmuz...\" argument ##\n'
### '## where \"cmux cmuy cmuz...\" is a list of ##\n'
### '## integers indicating the column numbers for ##\n'
### '## the vector that determines the direction of a ##\n'
### '## dipole or ellipsoid (ie. a rotateable vector).##\n'
### '## (More than one triplet can be specified. The ##\n'
### '## number of entries must be divisible by 3.) ##\n'
### '## 5) Include a ##\n'
### '## write(\"in_init.txt\"){atom_style ...} ##\n'
### '## statement in your .ttree file. ##\n'
### '########################################################\n')
def GetIntAtomID(pair):
return int(pair[0])
def WriteFrameToData(out_file,
descr_str,
misc_settings,
data_settings,
natoms,
coords,
coords_ixiyiz,
vects,
velocities,
atomtypes,
molids,
xlo_str, xhi_str,
ylo_str, yhi_str,
zlo_str, zhi_str,
xy_str, xz_str, yz_str):
"""
Open a data file. Read the LAMMPS DATA file line by line.
When the line contains information which is also in the dump file,
replace that information with information from the dump file.
(Information from a dump file is stored in the arguments to this function.)
The resulting file also has LAMMPS DATA format.
"""
section = ''
firstline = True
for line in data_settings.contents:
- line = line.strip()
ic = line.find('#')
if ic != -1:
line = line[:ic]
+ line = line.strip()
+
if firstline: # Construct a new descriptive header line:
if descr_str != None:
line = descr_str
firstline = False
if (len(line) > 0):
# The initial section (section='') is assumed to be
# the "LAMMPS Description" section. This is where the
# box boundaries are specified.
if section == '':
tokens = line.split()
if ((len(tokens) >= 2) and
((tokens[-2] == 'xlo') and (tokens[-1] == 'xhi')) and
((xlo_str != None) and (xhi_str != None))):
tokens[0] = xlo_str
tokens[1] = xhi_str
line = ' '.join(tokens)
elif ((len(tokens) >= 2) and
((tokens[-2] == 'ylo') and (tokens[-1] == 'yhi')) and
((ylo_str != None) and (yhi_str != None))):
tokens[0] = ylo_str
tokens[1] = yhi_str
line = ' '.join(tokens)
elif ((len(tokens) >= 2) and
((tokens[-2] == 'zlo') and (tokens[-1] == 'zhi')) and
((zlo_str != None) and (zhi_str != None))):
tokens[0] = zlo_str
tokens[1] = zhi_str
line = ' '.join(tokens)
elif ((len(tokens) >= 3) and
((tokens[-3] == 'xy') and
(tokens[-2] == 'xz') and
(tokens[-1] == 'yz')) and
((xy_str != None) and
(xz_str != None) and
(yz_str != None))):
tokens[0] = xy_str
tokens[1] = xz_str
tokens[2] = yz_str
line = ' '.join(tokens)
if (line in set(['Masses', 'Velocities', 'Atoms',
'Bond Coeffs', 'Angle Coeffs',
'Dihedral Coeffs', 'Improper Coeffs',
'Bonds', 'Angles', 'Dihedrals', 'Impropers'])):
section = line
else:
if (section == 'Atoms'):
tokens = line.split()
atomid = tokens[0]
# update the atomtype and molID
# (which may change during the simulation)
if atomtypes:
tokens[data_settings.i_atomtype] = atomtypes[atomid]
if molids and data_settings.i_molid:
tokens[data_settings.i_molid] = molids[atomid]
if atomid in coords:
# Loop over all of the vector degrees of
# freedom of the particle, excluding coords
# (for example: mu_x, mu_y, mu_z,
# or quat_i, quat_j, quat_k)
# In principle, depending on the atom_style,
# there could be multiple vectors per atom.
for I in range(0,len(data_settings.ii_vects)):
vxvyvz = vects[atomid][I]
i_vx = data_settings.ii_vects[I][0]
i_vy = data_settings.ii_vects[I][1]
i_vz = data_settings.ii_vects[I][2]
if ((i_vx >= len(tokens)) or
(i_vy >= len(tokens)) or
(i_vz >= len(tokens))):
raise InputError('Error(dump2data): Atom style incompatible with data file.\n'
' Specify the atom_style using -atomstyle style.\n')
if ((vxvyvz == None) or
(type(vxvyvz) is not tuple)):
assert(data_settings.column_names[i_vx] not in dump_column_names)
raise InputError('Error(dump2data): You have a vector coordinate in your DATA file named \"'+data_settings.column_names[i_vx]+'\"\n'
' However there are no columns with this name in your DUMP file\n'
' (or the column was not in the expected place).\n'
' Hence, the atom styles in the dump and data files do not match.')
# Replace the vector components with numbers
# from the dump file
tokens[i_vx] = vxvyvz[0]
tokens[i_vy] = vxvyvz[1]
tokens[i_vz] = vxvyvz[2]
# Now loop over the coordinates of each atom.
#for I in range(0,len(data_settings.ii_coords)):
# xyz = coords[atomid][I]
# THIS LOOP IS SILLY.
# EACH ATOM ONLY HAS ONE SET OF X,Y,Z
# COORDINATES. COMMENTING OUT THIS LOOP:
# i_x = data_settings.ii_coords[I][0]
# i_y = data_settings.ii_coords[I][1]
# i_z = data_settings.ii_coords[I][2]
# USING THIS INSTEAD:
xyz = coords[atomid]
i_x = data_settings.i_coords[0]
i_y = data_settings.i_coords[1]
i_z = data_settings.i_coords[2]
if ((i_x >= len(tokens)) or
(i_y >= len(tokens)) or
(i_z >= len(tokens))):
raise InputError('Error(dump2data): Atom style incompatible with data file.\n'
' Specify the atom_style using -atomstyle style.\n')
# Replace the coordinates with coordinates from
# the dump file into tokens[i_x]...
tokens[i_x] = str(xyz[0])
tokens[i_y] = str(xyz[1])
tokens[i_z] = str(xyz[2])
# Are there there any integer coords
# (ix, iy, iz) in the dump file?
if coords_ixiyiz[atomid]:
assert(len(coords_ixiyiz[atomid]) == 3)
# Integer coords stored in the DATA file too?
if len(tokens)==(len(data_settings.column_names)+3):
# Then replace the last 3 columns of the
# line in the data file with: ix iy iz
tokens[-3] = coords_ixiyiz[atomid][0]
tokens[-2] = coords_ixiyiz[atomid][1]
tokens[-1] = coords_ixiyiz[atomid][2]
else:
if (not misc_settings.center_frame):
# Append them to the end of the line:
tokens.append(coords_ixiyiz[atomid][0])
tokens.append(coords_ixiyiz[atomid][1])
tokens.append(coords_ixiyiz[atomid][2])
# Now finally paste all the tokens together:
line = ' '.join(tokens)
elif (section == 'Velocities'):
tokens = line.split()
atomid = tokens[0]
if atomid in velocities:
vxvyvz = velocities[atomid]
if len(tokens) < 4:
raise InputError('Error(dump2data): Not enough columns in the \"Velocities\" file.\n')
# Replace the coordinates with coordinates from
# the dump file into tokens[i_x]...
tokens[1] = str(vxvyvz[0])
tokens[2] = str(vxvyvz[1])
tokens[3] = str(vxvyvz[2])
# Now finally paste all the tokens together:
line = ' '.join(tokens)
out_file.write(line+'\n')
if __name__ == "__main__":
g_program_name = 'dump2data.py'
- g_date_str = '2014-12-19'
- g_version_str = 'v0.50'
+ g_date_str = '2015-8-11'
+ g_version_str = 'v0.51'
####### Main Code Below: #######
sys.stderr.write(g_program_name+' '+g_version_str+' '+g_date_str+' ')
#if sys.version < '3':
# sys.stderr.write(' (python version < 3)\n')
#else:
sys.stderr.write('\n')
try:
data_settings = DataSettings()
misc_settings = MiscSettings()
warning_strings = []
ParseArgs(sys.argv,
misc_settings,
data_settings,
warning_strings)
# Open the lammps dump file (trajectory file)
# Skip to the line containing the correct frame/timestep.
# (this is the last frame by default).
# Read the "BOX BOUNDS" and the "ATOMS" sections.
# Store the x,y,z coordinates in the "coords" associative array
# (indexed by atom id, which could be non-numeric in general).
section = ''
#coords = defaultdict(list)
#coords_ixiyiz = defaultdict(list)
#vects = defaultdict(list)
#xlo_str = xhi_str = ylo_str = yhi_str = zlo_str = zhi_str = None
#xy_str = xz_str = yz_str = None
#natoms = -1
#timestep_str = ''
frame_coords = defaultdict(list)
frame_coords_ixiyiz = defaultdict(list)
frame_vects = defaultdict(list)
frame_velocities = defaultdict(list)
frame_atomtypes = defaultdict(list)
frame_molid = defaultdict(list)
frame_xlo_str = frame_xhi_str = None
frame_ylo_str = frame_yhi_str = None
frame_zlo_str = frame_zhi_str = None
frame_xy_str = frame_xz_str = frame_yz_str = None
frame_natoms = -1
frame_timestep_str = ''
i_atomid = i_atomtype = i_molid = -1
i_x = i_y = i_z = i_xu = i_yu = i_zu = -1
i_xs = i_ys = i_zs = i_xsu = i_ysu = i_zsu = -1
dump_column_names = []
#num_frames_in = -1
num_frames_out = 0
finished_reading_frame = False
read_last_frame = False
#in_coord_file = open('traj_nvt.lammpstrj','r')
#in_coord_file = open('deleteme.lammpstrj','r')
in_coord_file = sys.stdin
while True:
line = in_coord_file.readline()
if line == '': # if EOF
if len(frame_coords) > 0:
finished_reading_frame = True
read_last_frame = True
line = line.strip()
if (line.find('ITEM:') == 0):
section = line
if (section.find('ITEM: ATOMS ') == 0):
dump_column_names = line[12:].split()
i_atomid, i_atomtype, i_molid = \
ColNames2AidAtypeMolid(dump_column_names)
#ii_coords = ColNames2Coords(dump_column_names)
x_already_unwrapped = False
y_already_unwrapped = False
z_already_unwrapped = False
if 'x' in dump_column_names:
i_x = dump_column_names.index('x')
elif 'xu' in dump_column_names:
i_xu = dump_column_names.index('xu')
x_already_unwrapped = True
elif 'xs' in dump_column_names:
i_xs = dump_column_names.index('xs')
elif 'xsu' in dump_column_names:
i_xsu = dump_column_names.index('xsu')
x_already_unwrapped = True
else:
raise InputError('Error(dump2data): \"ATOMS\" section of dump file lacks a \"x\" column.\n'+
' (excerpt below)\n' + line)
if 'y' in dump_column_names:
i_y = dump_column_names.index('y')
elif 'yu' in dump_column_names:
i_yu = dump_column_names.index('yu')
y_already_unwrapped = True
elif 'ys' in dump_column_names:
i_ys = dump_column_names.index('ys')
elif 'ysu' in dump_column_names:
i_ysu = dump_column_names.index('ysu')
y_already_unwrapped = True
else:
raise InputError('Error(dump2data): \"ATOMS\" section of dump file lacks a \"y\" column.\n'+
' (excerpt below)\n' + line)
if 'z' in dump_column_names:
i_z = dump_column_names.index('z')
elif 'zu' in dump_column_names:
i_zu = dump_column_names.index('zu')
z_already_unwrapped = True
elif 'zs' in dump_column_names:
i_zs = dump_column_names.index('zs')
elif 'zsu' in dump_column_names:
i_zsu = dump_column_names.index('zsu')
z_already_unwrapped = True
else:
raise InputError('Error(dump2data): \"ATOMS\" section of dump file lacks a \"z\" column.\n'+
' (excerpt below)\n' + line)
ii_vects = ColNames2Vects(dump_column_names)
if (len(ii_vects) != len(data_settings.ii_vects)):
raise InputError('Error(dump2data): atom styles in data and dump files differ.\n'
' Some needed columns from the atom_styles are missing in the dump file.')
i_ix = i_iy = i_iz = -1
if 'ix' in dump_column_names:
i_ix = dump_column_names.index('ix')
if 'iy' in dump_column_names:
i_iy = dump_column_names.index('iy')
if 'iz' in dump_column_names:
i_iz = dump_column_names.index('iz')
i_vx = i_vy = i_vz = -1
if 'vx' in dump_column_names:
i_vx = dump_column_names.index('vx')
if 'vy' in dump_column_names:
i_vy = dump_column_names.index('vy')
if 'vz' in dump_column_names:
i_vz = dump_column_names.index('vz')
elif (section.find('ITEM: BOX BOUNDS') == 0):
avec=[1.0, 0.0, 0.0]
bvec=[0.0, 1.0, 0.0]
cvec=[0.0, 0.0, 1.0]
elif (section.find('ITEM: TIMESTEP') == 0):
if len(frame_coords) > 0:
finished_reading_frame = True
elif ((len(line) > 0) and (line[0] != '#')):
if (section.find('ITEM: TIMESTEP') == 0):
finished_reading_frame = False
frame_timestep_str = line
frame_coords = defaultdict(list)
frame_coords_ixiyiz = defaultdict(list)
frame_vects = defaultdict(list)
frame_velocities = defaultdict(list)
frame_atomtypes = defaultdict(list)
frame_molids = defaultdict(list)
frame_xlo_str = frame_xhi_str = None
frame_ylo_str = frame_yhi_str = None
frame_zlo_str = frame_zhi_str = None
frame_xy_str = frame_xz_str = frame_yz_str = None
elif (section == 'ITEM: NUMBER OF ATOMS'):
frame_natoms = int(line)
elif (section.find('ITEM: BOX BOUNDS') == 0):
is_triclinic = (section.find('xy xz yz') == 0)
tokens = line.split()
if not frame_xlo_str:
assert(not frame_xhi_str)
frame_xlo_str = tokens[0]
frame_xhi_str = tokens[1]
avec[0] = float(frame_xhi_str) - float(frame_xlo_str)
if (is_triclinic and (len(tokens) > 2)):
frame_xy_str = tokens[2]
bvec[0] = float(frame_xy_str)
- #See http://lammps.sandia.gov/doc/Section_howto.html#howto-12
+ #See http://lammps.sandia.gov/doc/Section-howto.html#howto_12
#sys.stderr.write('avec='+str(avec)+'\n')
elif not frame_ylo_str:
assert(not frame_yhi_str)
frame_ylo_str = tokens[0]
frame_yhi_str = tokens[1]
bvec[1] = float(frame_yhi_str) - float(frame_ylo_str)
if (is_triclinic and (len(tokens) > 2)):
frame_xz_str = tokens[2]
cvec[0] = float(frame_xz_str)
- #See http://lammps.sandia.gov/doc/Section_howto.html#howto-12
+ #See http://lammps.sandia.gov/doc/Section-howto.html#howto_12
#sys.stderr.write('bvec='+str(bvec)+'\n')
elif not frame_zlo_str:
assert(not frame_zhi_str)
frame_zlo_str = tokens[0]
frame_zhi_str = tokens[1]
cvec = [0.0, 0.0, float(frame_zhi_str) - float(frame_zlo_str)]
if (is_triclinic and (len(tokens) > 2)):
frame_yz_str = tokens[2]
cvec[1] = float(frame_yz_str)
- #See http://lammps.sandia.gov/doc/Section_howto.html#howto-12
+ #See http://lammps.sandia.gov/doc/Section-howto.html#howto_12
#sys.stderr.write('cvec='+str(cvec)+'\n')
elif (section.find('ITEM: ATOMS') == 0):
tokens = line.split()
atomid = tokens[i_atomid]
atomtype = tokens[i_atomtype]
frame_atomtypes[atomid] = atomtype
if i_molid:
molid = tokens[i_molid]
frame_molids[atomid] = molid
if ((i_x != -1) and (i_y != -1) and (i_z != -1)):
x = float(tokens[i_x]) #i_x determined above
y = float(tokens[i_y])
z = float(tokens[i_z])
elif ((i_xu != -1) and (i_yu != -1) and (i_zu != -1)):
x = float(tokens[i_xu]) #i_x determined above
y = float(tokens[i_yu])
z = float(tokens[i_zu])
elif ((i_xs != -1) and (i_ys != -1) and (i_zs != -1)):
xs = float(tokens[i_xs]) #i_xs determined above
ys = float(tokens[i_ys])
zs = float(tokens[i_zs])
x = float(xlo_str) + xs*avec[0] + ys*bvec[0] + zs*cvec[0]
y = float(ylo_str) + xs*avec[1] + ys*bvec[1] + zs*cvec[1]
z = float(zlo_str) + xs*avec[2] + ys*bvec[2] + zs*cvec[2]
+ # avec, bvec, cvec described here:
+ #http://lammps.sandia.gov/doc/Section-howto.html#howto_12
+
elif ((i_xsu != -1) and (i_ysu != -1) and (i_zsu != -1)):
xsu = float(tokens[i_xsu]) #i_xs determined above
ysu = float(tokens[i_ysu])
zsu = float(tokens[i_zsu])
x = float(xlo_str) + xsu*avec[0] + ysu*bvec[0] + zsu*cvec[0]
y = float(ylo_str) + xsu*avec[1] + ysu*bvec[1] + zsu*cvec[1]
z = float(zlo_str) + xsu*avec[2] + ysu*bvec[2] + zsu*cvec[2]
# Now deal with ix, iy, iz
if (i_ix != -1) and (not x_already_unwrapped):
ix = int(tokens[i_ix])
if (misc_settings.center_frame or
(misc_settings.output_format != 'data')):
#sys.stderr.write('atomid='+str(atomid)+', ix = '+str(ix)+', avec='+str(avec)+'\n')
x += ix*avec[0]
y += ix*avec[1]
z += ix*avec[2]
else:
if atomid not in frame_coords_ixiyiz:
frame_coords_ixiyiz[atomid] = ["0", "0", "0"]
frame_coords_ixiyiz[atomid][0] = str(ix)
if (i_iy != -1) and (not y_already_unwrapped):
iy = int(tokens[i_iy])
if (misc_settings.center_frame or
(misc_settings.output_format != 'data')):
#sys.stderr.write('atomid='+str(atomid)+', iy = '+str(iy)+', bvec='+str(bvec)+'\n')
x += iy*bvec[0]
y += iy*bvec[1]
z += iy*bvec[2]
else:
if atomid not in frame_coords_ixiyiz:
frame_coords_ixiyiz[atomid] = ["0", "0", "0"]
frame_coords_ixiyiz[atomid][1] = str(iy)
if (i_iz != -1) and (not z_already_unwrapped):
iz = int(tokens[i_iz])
if (misc_settings.center_frame or
(misc_settings.output_format != 'data')):
#sys.stderr.write('atomid='+str(atomid)+', iz = '+str(iz)+', cvec='+str(cvec)+'\n')
x += iz*cvec[0]
y += iz*cvec[1]
z += iz*cvec[2]
else:
if atomid not in frame_coords_ixiyiz:
frame_coords_ixiyiz[atomid] = ["0", "0", "0"]
frame_coords_ixiyiz[atomid][2] = str(iz)
#frame_coords[atomid] = [str(x), str(y), str(z)]
frame_coords[atomid] = [x, y, z]
vx = 0.0
vy = 0.0
vz = 0.0
if i_vx != -1:
vx = float(tokens[i_vx])
if i_vy != -1:
vy = float(tokens[i_vy])
if i_vz != -1:
vz = float(tokens[i_vz])
frame_velocities[atomid] = [vx, vy, vz]
# Ugly detail:
# There can be multiple "vects" associated with each atom
# (for example, dipole moments, ellipsoid directions, etc..)
if atomid not in frame_vects:
frame_vects[atomid] = [None for I in range(0,len(ii_vects))]
for I in range(0, len(ii_vects)):
i_vx = ii_vects[I][0]
i_vy = ii_vects[I][1]
i_vz = ii_vects[I][2]
vx_str = tokens[i_vx]
vy_str = tokens[i_vy]
vz_str = tokens[i_vz]
# Now the annoying part:
# Which vect is it (mux,muy,muz) or (quati,quatj,quatk)?
# The columns could be listed in a different order
# in the data file and in the dump file.
# Figure out which vector it is in the data file (stored
# in the integer "I_data") so that column names match.
name_vx = dump_column_names[i_vx]
name_vy = dump_column_names[i_vy]
name_vz = dump_column_names[i_vz]
i_vx_data = 0
I_data = -1
# This code is ugly and inneficient.
# I never want to touch this code again. (Hope it works)
while i_vx_data < len(data_settings.column_names):
if name_vx == data_settings.column_names[i_vx_data]:
I_data = 0
while I_data < len(data_settings.ii_vects):
if ii_vects[I] == data_settings.ii_vects[I_data]:
break
I_data += 1
if (0<I_data) and (I_data < len(data_settings.ii_vects)):
break
i_vx_data += 1
if (0 <= I_data) and (I_data < len(data_settings.ii_vects)):
frame_vects[atomid][I_data] = (vx_str,vy_str,vz_str)
else:
raise InputError('Error(dump2data): You have a vector coordinate in your dump file named \"'+name_vx+'\"\n'
' However there are no columns with this name in your data file\n'
' (or the column was not in the expected place).\n'
' Hence, the atom styles in the dump and data files do not match.')
if finished_reading_frame:
if misc_settings.scale != None:
for atomid in frame_coords:
for d in range(0,3):
crd = float(frame_coords[atomid][d])
frame_coords[atomid][d] = str(crd*misc_settings.scale)
if len(frame_coords) != frame_natoms:
err_msg = 'Number of lines in \"ITEM: ATOMS\" section disagrees with\n' \
+ ' \"ITEM: NUMBER OF ATOMS\" declared earlier in this file.\n'
raise InputError(err_msg)
if misc_settings.center_frame:
cm = [0.0, 0.0, 0.0]
for atomid in frame_coords:
for d in range(0,3):
cm[d] += float(frame_coords[atomid][d])
for d in range(0,3):
cm[d] /= float(len(frame_coords))
for atomid in frame_coords:
for d in range(0,3):
frame_coords[atomid][d] = "%.7g" % (float(frame_coords[atomid][d]) - cm[d])
frame_coords_ixiyiz[atomid] = ["0","0","0"]
if misc_settings.output_format != 'data':
frame_coords_ixiyiz[atomid] = ["0","0","0"]
#if (num_frames_in == -1):
# if (misc_settings.timestep_str != ''):
# if (float(frame_timestep_str) >=
# float(misc_settings.timestep_str)):
# num_frames_in = 1
# if not misc_settings.multi:
# read_last_frame = True
# else:
# num_frames_in = 1
# Should we write out the coordinates in this frame?
write_this_frame = False
if misc_settings.multi:
write_this_frame = True
if (misc_settings.tstart and
(int(frame_timestep_str) < misc_settings.tstart)):
write_this_frame = False
if (misc_settings.tstop and
(int(frame_timestep_str) > misc_settings.tstop)):
write_this_frame = False
read_last_frame = True
if misc_settings.tstart:
tstart = misc_settings.tstart
else:
tstart = 0
if ((int(frame_timestep_str) - tstart)
%
misc_settings.skip_interval) != 0:
write_this_frame = False
else:
if misc_settings.last_frame:
if read_last_frame:
write_this_frame = True
else:
assert(misc_settings.timestep_str)
if (int(frame_timestep_str) >=
int(misc_settings.timestep_str)):
write_this_frame = True
read_last_frame = True
if write_this_frame:
num_frames_out += 1
sys.stderr.write(' (writing frame '+str(num_frames_out)+
' at timestep '+frame_timestep_str+')\n')
# Print the frame
# First check which format to output the data:
if misc_settings.output_format == 'raw':
# Print out the coordinates in simple 3-column text format
for atomid, xyz in iter(sorted(frame_coords.items(), key=GetIntAtomID)):
if misc_settings.scale == None:
sys.stdout.write(str(xyz[0])+' '+str(xyz[1])+' '+str(xyz[2])+'\n')
else:
# Only convert to float and back if misc_settings.scale != None
sys.stdout.write(str(misc_settings.scale*float(xyz[0]))+' '+
str(misc_settings.scale*float(xyz[1]))+' '+
str(misc_settings.scale*float(xyz[2]))+'\n')
sys.stdout.write('\n')
elif misc_settings.output_format == 'xyz':
# Print out the coordinates in simple 3-column text format
sys.stdout.write(str(len(frame_coords))+'\n')
descr_str = 'LAMMPS data from timestep '+frame_timestep_str
sys.stdout.write(descr_str+'\n')
for atomid, xyz in iter(sorted(frame_coords.items(), key=GetIntAtomID)):
if misc_settings.scale == None:
sys.stdout.write(str(atomid)+' '+
str(xyz[0])+' '+
str(xyz[1])+' '+
str(xyz[2])+'\n')
else:
# Only convert to float and back if misc_settings.scale != None
sys.stdout.write(str(atomid)+' '+
str(misc_settings.scale*float(xyz[0]))+' '+
str(misc_settings.scale*float(xyz[1]))+' '+
str(misc_settings.scale*float(xyz[2]))+'\n')
else:
# Parse the DATA file specified by the user
# and replace appropriate lines or fields with
# the corresponding text from the DUMP file.
descr_str = 'LAMMPS data from timestep '+frame_timestep_str
if misc_settings.multi and (misc_settings.output_format == 'data'):
out_file_name = data_settings.file_name + '.'\
+ str(num_frames_out)
sys.stderr.write(' (creating file \"'+out_file_name+'\")\n')
out_file = open(out_file_name, 'w')
else:
out_file = sys.stdout
WriteFrameToData(out_file,
descr_str,
misc_settings,
data_settings,
frame_natoms,
frame_coords,
frame_coords_ixiyiz,
frame_vects,
frame_velocities,
frame_atomtypes,
frame_molids,
frame_xlo_str, frame_xhi_str,
frame_ylo_str, frame_yhi_str,
frame_zlo_str, frame_zhi_str,
frame_xy_str, frame_xz_str, frame_yz_str)
#if misc_settings.multi:
# out_file.close()
#if num_frames_in >= 0:
# num_frames_in += 1
if read_last_frame:
exit(0)
for warning_str in warning_strings:
sys.stderr.write(warning_str+'\n')
except (ValueError, InputError) as err:
sys.stderr.write('\n'+str(err)+'\n')
sys.exit(-1)
diff --git a/tools/moltemplate/src/ltemplify.py b/tools/moltemplate/src/ltemplify.py
index 97ee00e9f..01ca815c5 100755
--- a/tools/moltemplate/src/ltemplify.py
+++ b/tools/moltemplate/src/ltemplify.py
@@ -1,3347 +1,3354 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Andrew Jewett (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2012, Regents of the University of California
# All rights reserved.
"""
ltemplify.py
The "ltemplify.py" script can be used to convert existing LAMMPS
input script and data files into a single .lt file
(which includes both topology and force-field information
for a single molecule in your system).
Example:
ltemplify.py -name Mol file.in file.data > mol.lt
This creates a template for a new type of molecule (named "Mol"),
consisting of all the atoms in the lammps files you included,
and saves this data in a single ttree file ("mol.lt").
This file can be used with moltemplate (ttree) to
define large systems containing this molecule.
"""
import sys
from ttree_lex import *
from lttree_styles import *
def Intify(s):
if s.isdigit():
return int(s)
elif s[0:2] == 'id':
return int(s[2:])
elif s[0:4] == 'type':
return int(s[4:])
else:
return s
def IsNumber(s):
try:
float(s)
return True
except ValueError, TypeError:
return False
def StringToInterval(sel_str, slice_delim='*'):
# Split a string into 1-3 tokens using the slice_delim and convert to int.
# What a mess. I should rewrite this function
i_slice = sel_str.find(slice_delim)
if i_slice == -1:
a = sel_str
b = sel_str
c = ''
else:
a = sel_str[:i_slice]
bc = sel_str[i_slice+len(slice_delim):]
b = ''
c = ''
i_slice = bc.find(slice_delim)
if i_slice == -1:
b = bc
c = ''
else:
b = bc[:i_slice]
c = bc[i_slice+len(slice_delim):]
if a == '':
a = None
elif a.isdigit():
a = int(a)
else:
raise InputError('Error: invalid selection string \"'+
sel_str+'\"\n')
if b == '':
b = None
elif b.isdigit():
b = int(b)
else:
raise InputError('Error: invalid selection string \"'+
sel_str+'\"\n')
if c == '':
c = None
elif c.isdigit():
c = int(c)
else:
raise InputError('Error: invalid selection string \"'+
sel_str+'\"\n')
if c == None:
return (a,b)
else:
return (a,b,c)
# Selections are simply lists of 2-tuples (pairs)
def LammpsSelectToIntervals(sel_str, slice_delim='*', or_delim=', '):
"""
This function converts a string such as "1*4 6 9*12 50*70*10" into
a list of tuples, for example: [(1,4), (6,6), (9,12), (50,50), (60,60), (70,70)]
In general, the of intervals has the form:
[(a1,b1), (a2,b2), (a3,b3), ... ]
An atom is considered to belong to this selection
if it happens to lie within the closed interval [a,b]
for any pair of a,b values in the list of intervals.
If for a given pair a,b, either a or b is "None", then that a or b
value is not used to disqualify membership in the interval.
(Similar to -infinity or +infinity. In other words if a is set to None,
then to belong to the interval it is enough to be less than b.)
"""
selection_list = []
#tokens = sel_str.split(or_delim) <-- Not what we want when len(or_delim)>1
tokens = LineLex.TextBlock2Lines(sel_str, or_delim, keep_delim=False)
for token in tokens:
token = token.strip()
interval = StringToInterval(token, slice_delim)
if len(interval)==2:
# Normally, "interval" should be a tuple containing 2 entries
selection_list.append(interval)
else:
assert(len(interval)==3)
# Handle 1000:2000:10 notation
# (corresponding to 1000, 1010, 1020, 1030, ..., 1990, 2000)
a=interval[0]
b=interval[1]
incr=interval[2]
i=a
while i<=b:
selection_list.append((i,i))
i += incr
return selection_list
def IntervalListToMinMax(interval_list):
min_a = None
max_b = None
for (a,b) in interval_list:
if ((not (type(a) is int)) or (not (type(b) is int))):
return None,None #only integer min/max makes sense. otherwise skip
if (min_a == None) or (a < min_a):
min_a = a
if (max_b == None) or (b > max_b):
max_b = b
return min_a, max_b
def MergeIntervals(interval_list):
"""
A crude simple function that merges consecutive intervals in the list
whenever they overlap. (This function does not bother to compare
non-consecutive entries in the interval_list.)
"""
i = 1
while i < len(interval_list):
if ((interval_list[i-1][1] == None) or
(interval_list[i-1][1]+1 >= interval_list[i][0])):
interval_list[i-1] = (interval_list[i-1][0], interval_list[i][1])
del interval_list[i]
else:
i += 1
def BelongsToSel(i, sel):
if (i == None) or (sel == None) or (len(sel) == 0):
# If the user has not specified a selection for this category,
# then by default all objects are accepted
return True
elif (type(i) is str):
if i.isdigit():
i = int(i)
else:
return True
belongs = False
for interval in sel:
assert(len(interval) == 2)
if interval[0]:
if i >= interval[0]:
if (interval[1] == None) or (i <= interval[1]):
belongs = True
break
elif interval[1]:
if i <= interval[1]:
belongs = True
break
else:
# In that case, the user entered something like "*"
# which covers all possible numbers
belongs = True
break
return belongs
try:
g_program_name = __file__.split('/')[-1] # = 'ltemplify.py'
- g_version_str = '0.48'
- g_date_str = '2015-8-02'
+ g_version_str = '0.49'
+ g_date_str = '2015-8-11'
sys.stderr.write(g_program_name+' v'+g_version_str+' '+g_date_str+'\n')
non_empty_output = False
no_warnings = True
indent = 2
cindent = 0
atomid_selection = []
atomtype_selection = []
molid_selection = []
mol_name = ''
min_sel_atomid = None
min_sel_atomtype = None
min_sel_bondid = None
min_sel_bondtype = None
min_sel_angleid = None
min_sel_angletype = None
min_sel_dihedralid = None
min_sel_dihedraltype = None
min_sel_improperid = None
min_sel_impropertype = None
max_sel_atomid = None
max_sel_atomtype = None
max_sel_bondid = None
max_sel_bondtype = None
max_sel_angleid = None
max_sel_angletype = None
max_sel_dihedralid = None
max_sel_dihedraltype = None
max_sel_improperid = None
max_sel_impropertype = None
needed_atomids = set([])
needed_atomtypes = set([])
needed_molids = set([])
needed_bondids = set([])
needed_bondtypes = set([])
needed_angleids = set([])
needed_angletypes = set([])
needed_dihedralids = set([])
needed_dihedraltypes = set([])
needed_improperids = set([])
needed_impropertypes = set([])
min_needed_atomtype = None
max_needed_atomtype = None
min_needed_bondtype = None
max_needed_bondtype = None
min_needed_angletype = None
max_needed_angletype = None
min_needed_dihedraltype = None
max_needed_dihedraltype = None
min_needed_impropertype = None
max_needed_impropertype = None
min_needed_atomid = None
max_needed_atomid = None
min_needed_molid = None
max_needed_molid = None
min_needed_bondid = None
max_needed_bondid = None
min_needed_angleid = None
max_needed_angleid = None
min_needed_dihedralid = None
max_needed_dihedralid = None
min_needed_improperid = None
max_needed_improperid = None
# To process the selections, we need to know the atom style:
atom_style_undefined = True
i_atomid = None
i_atomtype = None
i_molid = None
i_x = None
i_y = None
i_z = None
l_in_init = []
l_in_settings = []
l_in_masses = []
l_in_pair_coeffs = []
l_in_bond_coeffs = []
l_in_angle_coeffs = []
l_in_dihedral_coeffs = []
l_in_improper_coeffs = []
l_in_group = []
l_in_fix_shake = []
l_in_fix_rigid = []
l_in_fix_poems = []
l_in_fix_qeq = []
l_in_fix_qmmm = []
l_data_masses = []
l_data_bond_coeffs = []
l_data_angle_coeffs = []
l_data_dihedral_coeffs = []
l_data_improper_coeffs = []
l_data_pair_coeffs = []
l_data_pairij_coeffs = []
l_data_atoms = []
l_data_velocities = []
l_data_bonds = []
l_data_angles = []
l_data_dihedrals = []
l_data_impropers = []
# class2 force fields
#l_in_bondbond_coeffs = [] <--not needed, included in l_in_angle_coeff
#l_in_bondangle_coeffs = [] <--not needed, included in l_in_angle_coeff
#l_in_middlebondtorsion_coeffs = [] not needed, included in l_in_dihedral_coeff
#l_in_endbondtorsion_coeffs = [] <--not needed, included in l_in_dihedral_coeff
#l_in_angletorsion_coeffs = [] <--not needed, included in l_in_dihedral_coeff
#l_in_angleangletorsion_coeffs = [] not needed, included in l_in_dihedral_coeff
#l_in_bondbond13_coeffs = [] <--not needed, included in l_in_dihedral_coeff
#l_in_angleangle_coeffs = [] <--not needed, included in l_in_improper_coeff
l_data_bondbond_coeffs = []
l_data_bondangle_coeffs = []
l_data_middlebondtorsion_coeffs = []
l_data_endbondtorsion_coeffs = []
l_data_angletorsion_coeffs = []
l_data_angleangletorsion_coeffs = []
l_data_bondbond13_coeffs = []
l_data_angleangle_coeffs = []
# non-point-like particles:
l_data_ellipsoids = []
l_data_lines = []
l_data_triangles = []
# automatic generation of bonded interactions by type:
l_data_angles_by_type = []
l_data_dihedrals_by_type = []
l_data_impropers_by_type = []
atoms_already_read = False
some_pair_coeffs_read = False
complained_atom_style_mismatch = False
infer_types_from_comments = False
remove_coeffs_from_data_file = True
argv = sys.argv
i = 1
while i < len(argv):
#sys.stderr.write('argv['+str(i)+'] = \"'+argv[i]+'\"\n')
if argv[i] == '-columns':
if i+1 >= len(argv):
raise InputError('Error: the \"'+argv[i]+'\" argument should be followed by a quoted\n'
' string which contains a space-delimited list of the names of\n'
' of columns in the \"Atoms\" section of the LAMMPS data file.\n'
' If the list contains the symbols:\n'
' \"atom-ID\" or \"atomid\", they are interpreted\n'
' as unique atom ID numbers, and columns named\n'
' \"atom-type\" or \"atomtype\" are interpreted\n'
' as atom types. Finally, columns named\n'
' \"molecule-ID\", \"molecule\", or \"mol-ID\", or \"mol\"\n'
' are interpreted as unique molecule id numbers.\n'
'Example:\n'
' '+argv[i]+' \'atom-ID atom-type q polarizability molecule-ID x y z\'\n'
' defines a custom atom_style containing the properties\n'
' atom-ID atom-type q polarizability molecule-ID x y z\n'
' Make sure you enclose the entire list in quotes.\n');
column_names = argv[i+1].strip('\"\'').strip().split()
del argv[i:i+2]
elif (argv[i] == '-ignore-comments'):
infer_types_from_comments = False
del argv[i:i+1]
elif (argv[i] == '-infer-comments'):
infer_types_from_comments = True
del argv[i:i+1]
elif ((argv[i] == '-name') or
(argv[i] == '-molname') or
(argv[i] == '-molecule-name') or
(argv[i] == '-molecule_name')):
if i+1 >= len(argv):
raise InputError('Error: '+argv[i]+' flag should be followed by a a molecule type name.\n')
cindent = 2
indent += cindent
mol_name = argv[i+1]
del argv[i:i+2]
elif ((argv[i].lower() == '-atomstyle') or
(argv[i].lower() == '-atom_style') or
(argv[i].lower() == '-atom-style')):
if i+1 >= len(argv):
raise InputError('Error: '+argv[i]+' flag should be followed by a an atom_style name.\n'
' (or single quoted string which includes a space-separated\n'
' list of column names).\n')
atom_style_undefined = False
column_names = AtomStyle2ColNames(argv[i+1])
if (argv[i+1].strip().split()[0] in g_style_map):
l_in_init.append((' '*indent) + 'atom_style ' + argv[i+1] + '\n')
sys.stderr.write('\n \"Atoms\" column format:\n')
sys.stderr.write(' '+(' '.join(column_names))+'\n')
i_atomid, i_atomtype, i_molid = ColNames2AidAtypeMolid(column_names)
# Which columns contain the coordinates?
ii_coords = ColNames2Coords(column_names)
assert(len(ii_coords) == 1)
i_x = ii_coords[0][0]
i_y = ii_coords[0][1]
i_z = ii_coords[0][2]
if i_molid:
sys.stderr.write(' (i_atomid='+str(i_atomid+1)+', i_atomtype='+str(i_atomtype+1)+', i_molid='+str(i_molid+1)+')\n\n')
else:
sys.stderr.write(' (i_atomid='+str(i_atomid+1)+', i_atomtype='+str(i_atomtype+1)+')\n')
del argv[i:i+2]
elif ((argv[i].lower() == '-id') or
#(argv[i].lower() == '-a') or
#(argv[i].lower() == '-atoms') or
(argv[i].lower() == '-atomid') or
#(argv[i].lower() == '-atomids') or
(argv[i].lower() == '-atom-id')
#(argv[i].lower() == '-atom-ids') or
#(argv[i].lower() == '-$atom') or
#(argv[i].lower() == '-$atoms')
):
if i+1 >= len(argv):
raise InputError('Error: '+argv[i]+' flag should be followed by a list of integers\n'
' (or strings). These identify the group of atoms you want to\n'
' to include in the template you are creating.\n')
atomid_selection += LammpsSelectToIntervals(argv[i+1])
min_sel_atomid, max_sel_atomid = IntervalListToMinMax(atomid_selection)
del argv[i:i+2]
+ elif ((argv[i].lower() == '-datacoeffs') or
+ (argv[i].lower() == '-datacoeff') or
+ (argv[i].lower() == '-Coeff') or
+ (argv[i].lower() == '-Coeffs')):
+ remove_coeffs_from_data_file = False
+ del argv[i:i+1]
elif ((argv[i].lower() == '-type') or
#(argv[i].lower() == '-t') or
(argv[i].lower() == '-atomtype') or
(argv[i].lower() == '-atom-type')
#(argv[i].lower() == '-atomtypes') or
#(argv[i].lower() == '-atom-types') or
#(argv[i].lower() == '-@atom') or
#(argv[i].lower() == '-@atoms') or
#(argv[i].lower() == '-@atomtype') or
#(argv[i].lower() == '-@atomtypes')
):
if i+1 >= len(argv):
raise InputError('Error: '+argv[i]+' flag should be followed by a list of integers.\n'
' (or strings). These identify the group of atom types you want to\n'
' to include in the template you are creating.\n')
atomtype_selection += LammpsSelectToIntervals(argv[i+1])
min_sel_atomtype, max_sel_atomtype = IntervalListToMinMax(atomtype_selection)
del argv[i:i+2]
elif ((argv[i].lower() == '-mol') or
#(argv[i].lower() == '-m') or
(argv[i].lower() == '-molid') or
#(argv[i].lower() == '-molids') or
(argv[i].lower() == '-mol-id') or
#(argv[i].lower() == '-mol-ids') or
#(argv[i].lower() == '-molecule') or
(argv[i].lower() == '-moleculeid') or
(argv[i].lower() == '-molecule-id')
#(argv[i].lower() == '-molecules') or
#(argv[i].lower() == '-molecule-ids') or
#(argv[i].lower() == '-$mol') or
#(argv[i].lower() == '-$molecule')
):
if i+1 >= len(argv):
sys.stderr.write('Error: '+argv[i]+' flag should be followed by a list of integers.\n'
' (or strings). These identify the group of molecules you want to\n'
' include in the template you are creating.\n')
molid_selection += LammpsSelectToIntervals(argv[i+1])
del argv[i:i+2]
else:
i += 1
# We might need to parse the simulation boundary-box.
# If so, use these variables. (None means uninitialized.)
boundary_xlo = None
boundary_xhi = None
boundary_ylo = None
boundary_yhi = None
boundary_zlo = None
boundary_zhi = None
boundary_xy = None
boundary_yz = None
boundary_xz = None
# atom type names
atomtypes_name2int = {}
atomtypes_int2name = {}
#atomids_name2int = {} not needed
atomids_int2name = {}
atomids_by_type = {}
if atom_style_undefined:
# The default atom_style is "full"
column_names = AtomStyle2ColNames('full')
i_atomid, i_atomtype, i_molid = ColNames2AidAtypeMolid(column_names)
# Which columns contain the coordinates?
ii_coords = ColNames2Coords(column_names)
assert(len(ii_coords) == 1)
i_x = ii_coords[0][0]
i_y = ii_coords[0][1]
i_z = ii_coords[0][2]
#---------------------------------------------------------
#-- The remaining arguments are files that the user wants
#-- us to read and convert. It is typical to have
#-- multiple input files, because LAMMPS users often
#-- store their force field parameters in either the LAMMPS
#-- data files and input script files, or both.
#-- We want to search all of the LAMMPS input files in
#-- order to make sure we extracted all the force field
#-- parameters (coeff commands).
#---------------------------------------------------------
for i_arg in range(1,len(argv)):
fname = argv[i_arg]
try:
lammps_file = open(fname, 'r')
except IOError:
raise InputError('Error: unrecognized argument (\"'+fname+'\"),\n'
' OR unable to open file:\n'
'\n'
' \"'+fname+'\"\n'
' for reading.\n'
'\n'
' (If you were not trying to open a file with this name,\n'
' then there is a problem in your argument list.)\n')
sys.stderr.write('reading file \"'+fname+'\"\n')
atomid2type = {}
atomid2mol = {}
data_file_header_names = set(['LAMMPS Description',
'Atoms', 'Masses', 'Velocities', 'Bonds',
'Angles', 'Dihedrals', 'Impropers',
'Pair Coeffs',
'Bond Coeffs', 'Angle Coeffs',
'Dihedral Coeffs', 'Improper Coeffs',
#class2 force fields:
'BondBond Coeffs', 'BondAngle Coeffs',
'MiddleBondTorsion Coeffs', 'EndBondTorsion Coeffs',
'AngleTorsion Coeffs', 'AngleAngleTorsion Coeffs',
'BondBond13 Coeffs',
'AngleAngle Coeffs',
# non-point-like particles:
'Ellipsoids', 'Triangles', 'Lines',
#specifying bonded interactions by type:
'Angles By Type', 'Dihedrals By Type', 'Impropers By Type'
])
lex=LineLex(lammps_file, fname)
lex.source_triggers = set(['include','import'])
# set up lex to accept most characters in file names:
lex.wordterminators = '(){}' + lex.whitespace
# set up lex to understand the "include" statement:
lex.source = 'include'
lex.escape = '\\'
while lex:
infile = lex.infile
lineno = lex.lineno
line = lex.ReadLine()
if (lex.infile != infile):
infile = lex.infile
lineno = lex.lineno
#sys.stderr.write(' processing \"'+line.strip()+'\", (\"'+infile+'\":'+str(lineno)+')\n')
if line == '':
break
tokens = line.strip().split()
if (len(tokens) > 0):
if ((tokens[0] == 'atom_style') and
atom_style_undefined):
sys.stderr.write(' Atom Style found. Processing: \"'+line.strip()+'\"\n')
if atoms_already_read:
raise InputError('Error: The file containing the \"atom_style\" command must\n'
' come before the data file in the argument list.\n'
' (The templify program needs to know the atom style before reading\n'
' the data file. Either change the order of arguments so that the\n'
' LAMMPS input script file is processed before the data file, or use\n'
' the \"-atom_style\" command line argument to specify the atom_style.)\n')
column_names = AtomStyle2ColNames(line.split()[1])
i_atomid, i_atomtype, i_molid = ColNames2AidAtypeMolid(column_names)
# Which columns contain the coordinates?
ii_coords = ColNames2Coords(column_names)
assert(len(ii_coords) == 1)
i_x = ii_coords[0][0]
i_y = ii_coords[0][1]
i_z = ii_coords[0][2]
sys.stderr.write('\n \"Atoms\" column format:\n')
sys.stderr.write(' '+(' '.join(column_names))+'\n')
if i_molid:
sys.stderr.write(' (i_atomid='+str(i_atomid+1)+', i_atomtype='+str(i_atomtype+1)+', i_molid='+str(i_molid+1)+')\n\n')
else:
sys.stderr.write(' (i_atomid='+str(i_atomid+1)+', i_atomtype='+str(i_atomtype+1)+')\n\n')
l_in_init.append((' '*indent)+line.lstrip())
elif (tokens[0] in set(['units',
'angle_style',
'bond_style',
'dihedral_style',
'improper_style',
'min_style',
'pair_style',
'pair_modify',
'special_bonds',
'kspace_style',
'kspace_modify'])):
l_in_init.append((' '*indent)+line.lstrip())
#if (line.strip() == 'LAMMPS Description'):
# sys.stderr.write(' reading \"'+line.strip()+'\"\n')
# # skip over this section
# while lex:
# line = lex.ReadLine()
# if line.strip() in data_file_header_names:
# lex.push_raw_text(line) # <- Save line for later
# break
elif (line.strip() == 'Atoms'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
atoms_already_read = True
# Before attempting to read atomic coordinates, first find
# the lattice vectors of the simulation's boundary box:
# Why do we care about the Simulation Boundary?
# Some LAMMPS data files store atomic coordinates in a
# complex format with 6 numbers, 3 floats, and 3 integers.
# The 3 floats are x,y,z coordinates. Any additional numbers
# following these are integers which tell LAMMPS which cell
# the particle belongs to, (in case it has wandered out of
# the original periodic boundary box). In order to find
# the true location of the particle, we need to offset that
# particle's position with the unit-cell lattice vectors:
# avec, bvec, cvec (or multiples thereof)
# avec, bvec, cvec are the axis of the parallelepiped which
# define the simulation's boundary. They are described here:
#http://lammps.sandia.gov/doc/Section_howto.html#howto-12
if ((not boundary_xlo) or (not boundary_xhi) or
(not boundary_ylo) or (not boundary_yhi) or
(not boundary_zlo) or (not boundary_zhi)):
raise InputError('Error: The DATA file lacks a boundary-box header. You must specify:\n'
' xlo xhi ylo yhi zlo zhi (and xy xz yz if triclinic)\n'
' These numbers should appear before the \"Atoms\" section.\n'
' Use this format (example):\n'
' -100.0 100.0 xhi xlo\n'
' 0.0 200.0 yhi ylo\n'
' -25.0 50.0 zhi zlo\n'
'\n'
'For details, see http://lammps.sandia.gov/doc/read_data.html\n'
'\n'
' (NOTE: If the atom coordinates are NOT followed by integers, then\n'
' these numbers are all ignored, however you must still specify\n'
' xlo, xhi, ylo, yhi, zlo, zhi. You can set them all to 0.0.)\n')
if not (boundary_xy and boundary_yz and boundary_xz):
# Then use a simple rectangular boundary box:
avec = (boundary_xhi-boundary_xlo, 0.0, 0.0)
bvec = (0.0, boundary_yhi-boundary_ylo, 0.0)
cvec = (0.0, 0.0, boundary_zhi-boundary_zlo)
else:
# Triclinic geometry in LAMMPS is explained here:
# http://lammps.sandia.gov/doc/Section_howto.html#howto-12
# http://lammps.sandia.gov/doc/read_data.html
avec = (boundary_xhi-boundary_xlo, 0.0, 0.0)
bvec = (boundary_xy, boundary_yhi-boundary_ylo, 0.0)
cvec = (boundary_xz, boundary_yz, boundary_zhi-boundary_zlo)
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if ((len(tokens) <= i_atomid) or
(len(tokens) <= i_atomtype) or
((i_molid != None) and
(len(tokens) <= i_molid))):
raise InputError('Error: The number of columns in the \"Atoms\" section does\n'
' not match the atom_style (see column name list above).\n')
elif ((len(tokens) != len(column_names)) and
(len(tokens) != len(column_names)+3) and
(not complained_atom_style_mismatch)):
complained_atom_style_mismatch = True
sys.stderr.write('Warning: The number of columns in the \"Atoms\" section does\n'
' not match the atom_style (see column name list above).\n')
# this is not a very serious warning.
#no_warnings = False <--no need. commenting out
atomid = Intify(tokens[i_atomid])
atomtype = Intify(tokens[i_atomtype])
molid = None
if i_molid:
molid = Intify(tokens[i_molid])
atomid2type[atomid] = atomtype
if i_molid:
atomid2mol[atomid] = molid
if (BelongsToSel(atomid, atomid_selection) and
BelongsToSel(atomtype, atomtype_selection) and
BelongsToSel(molid, molid_selection)):
tokens[i_atomid] = '$atom:id'+tokens[i_atomid]
#tokens[i_atomid] = '$atom:'+atomids_int2name[atomid]
# fill atomtype_int2str[] with a default name (change later):
#tokens[i_atomtype] = '@atom:type'+tokens[i_atomtype]
atomtype_name = 'type'+tokens[i_atomtype]
atomtypes_int2name[atomtype] = atomtype_name
tokens[i_atomtype] = '@atom:'+atomtype_name
# Interpreting unit-cell counters
# If present, then unit-cell "flags" must be
# added to the x,y,z coordinates.
#
# For more details on unit-cell "flags", see:
# http://lammps.sandia.gov/doc/read_data.html
# "In the data file, atom lines (all lines or
# none of them) can optionally list 3 trailing
# integer values (nx,ny,nz), which are used to
# initialize the atom’s image flags.
# If nx,ny,nz values are not listed in the
# data file, LAMMPS initializes them to 0.
# Note that the image flags are immediately
# updated if an atom’s coordinates need to
# wrapped back into the simulation box."
if (len(tokens) == len(column_names)+3):
nx = int(tokens[-3])
ny = int(tokens[-2])
nz = int(tokens[-1])
x = float(tokens[i_x]) + nx*avec[0]+ny*bvec[0]+nz*cvec[0]
y = float(tokens[i_y]) + nx*avec[1]+ny*bvec[1]+nz*cvec[1]
z = float(tokens[i_z]) + nx*avec[2]+ny*bvec[2]+nz*cvec[2]
tokens[i_x] = str(x)
tokens[i_y] = str(y)
tokens[i_z] = str(z)
# Now get rid of them:
del tokens[-3:]
# I can't use atomids_int2name or atomtypes_int2name yet
# because they probably have not been defined yet.
# (Instead assign these names in a later pass.)
if i_molid:
tokens[i_molid] = '$mol:id'+tokens[i_molid]
l_data_atoms.append((' '*indent)+(' '.join(tokens)+'\n'))
needed_atomids.add(atomid)
needed_atomtypes.add(atomtype)
needed_molids.add(molid)
for atomtype in needed_atomtypes:
assert(type(atomtype) is int)
if ((min_needed_atomtype == None) or
(min_needed_atomtype > atomtype)):
min_needed_atomtype = atomtype
if ((max_needed_atomtype == None) or
(max_needed_atomtype < atomtype)):
max_needed_atomtype = atomtype
for atomid in needed_atomids:
assert(type(atomid) is int)
if ((min_needed_atomid == None) or
(min_needed_atomid > atomid)):
min_needed_atomid = atomid
if ((max_needed_atomid == None) or
(max_needed_atomid < atomid)):
max_needed_atomid = atomid
for molid in needed_molids:
assert(type(molid) is int)
if ((min_needed_molid == None) or
(min_needed_molid > molid)):
min_needed_molid = molid
if ((max_needed_molid == None) or
(max_needed_molid < molid)):
max_needed_molid = molid
elif (line.strip() == 'Masses'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
# Read the next line of text but don't skip comments
comment_char_backup = lex.commenters
lex.commenters = ''
line_orig = lex.ReadLine()
lex.commenters = comment_char_backup
comment_text = ''
ic = line_orig.find('#')
- line = line_orig[:ic]
if ic != -1:
+ line = line_orig[:ic]
comment_text = line_orig[ic+1:].strip()
-
+ line = line.rstrip()
+
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
atomtype = Intify(tokens[0])
atomtype_name = str(atomtype)
if comment_text != '':
comment_tokens = comment_text.split()
# Assume the first word after the # is the atom type name
atomtype_name = comment_tokens[0]
if BelongsToSel(atomtype, atomtype_selection):
#tokens[0] = '@atom:type'+tokens[0]
l_data_masses.append((' '*indent)+(' '.join(tokens)+'\n'))
# infer atom type names from comment strings?
if infer_types_from_comments:
if atomtype_name in atomtypes_name2int:
raise InputError('Error: duplicate atom type names in mass section: \"'+atomtype_name+'\"\n'
' (By default '+g_program_name+' attempts to infer atom type names from\n'
' comments which appear in the \"Masses\" section of your data file.)\n'
' You can avoid this error by adding the \"-ignore-comments\" argument.\n')
atomtypes_name2int[atomtype_name] = atomtype
atomtypes_int2name[atomtype] = atomtype_name
else:
atomtypes_int2name[atomtype] = 'type'+str(atomtype)
elif (line.strip() == 'Velocities'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
atomid = Intify(tokens[0])
atomtype = None
if atomid in atomid2type:
atomtype = atomid2type[atomid]
moldid = None
if atomid in atomid2mol:
molid = atomid2mol[atomid]
if (BelongsToSel(atomid, atomid_selection) and
BelongsToSel(atomtype, atomtype_selection) and
BelongsToSel(molid, molid_selection)):
tokens[0] = '$atom:id'+tokens[0]
#tokens[0] = '$atom:'+atomids_int2name[atomid]
#NOTE:I can't use "atomids_int2name" yet because
# they probably have not been defined yet.
# (Instead assign these names in a later pass.)
l_data_velocities.append((' '*indent)+(' '.join(tokens)+'\n'))
# non-point-like-particles:
elif (line.strip() == 'Ellipsoids'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
atomid = Intify(tokens[0])
atomtype = None
if atomid in atomid2type:
atomtype = atomid2type[atomid]
moldid = None
if atomid in atomid2mol:
molid = atomid2mol[atomid]
if (BelongsToSel(atomid, atomid_selection) and
BelongsToSel(atomtype, atomtype_selection) and
BelongsToSel(molid, molid_selection)):
tokens[0] = '$atom:id'+tokens[0]
#tokens[0] = '$atom:'+atomids_int2name[atomid]
#NOTE:I can't use "atomids_int2name" yet because
# they probably have not been defined yet.
# (Instead assign these names in a later pass.)
l_data_ellipsoids.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Lines'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
atomid = Intify(tokens[0])
atomtype = None
if atomid in atomid2type:
atomtype = atomid2type[atomid]
moldid = None
if atomid in atomid2mol:
molid = atomid2mol[atomid]
if (BelongsToSel(atomid, atomid_selection) and
BelongsToSel(atomtype, atomtype_selection) and
BelongsToSel(molid, molid_selection)):
tokens[0] = '$atom:id'+tokens[0]
#tokens[0] = '$atom:'+atomids_int2name[atomid]
#NOTE:I can't use "atomids_int2name" yet because
# they probably have not been defined yet.
# (Instead assign these names in a later pass.)
l_data_lines.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Triangles'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
atomid = Intify(tokens[0])
atomtype = None
if atomid in atomid2type:
atomtype = atomid2type[atomid]
moldid = None
if atomid in atomid2mol:
molid = atomid2mol[atomid]
if (BelongsToSel(atomid, atomid_selection) and
BelongsToSel(atomtype, atomtype_selection) and
BelongsToSel(molid, molid_selection)):
tokens[0] = '$atom:id'+tokens[0]
#tokens[0] = '$atom:'+atomids_int2name[atomid]
#NOTE:I can't use "atomids_int2name" yet because
# they probably have not been defined yet.
# (Instead assign these names in a later pass.)
l_data_triangles.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Bonds'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 4):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Bonds section:\n'
' \"'+line.strip()+'\"\n')
#tokens[0] = '$bond:id'+tokens[0]
#tokens[1] = '@bond:type'+tokens[1]
atomids = [None, None]
atomtypes = [None, None]
molids = [None, None]
in_selections = True
some_in_selection = False
for n in range(0,2):
atomids[n] = Intify(tokens[2+n])
if atomids[n] in atomid2type:
atomtypes[n] = atomid2type[atomids[n]]
if atomids[n] in atomid2mol:
molids[n] = atomid2mol[atomids[n]]
if (BelongsToSel(atomids[n], atomid_selection) and
BelongsToSel(atomtypes[n], atomtype_selection) and
BelongsToSel(molids[n], molid_selection)):
#tokens[2+n] = '$atom:id'+tokens[2+n]
#tokens[2+n] = '$atom:'+atomids_int2name[atomids[n]]
some_in_selection = True
else:
in_selections = False
if in_selections:
l_data_bonds.append((' '*indent)+(' '.join(tokens)+'\n'))
elif some_in_selection:
sys.stderr.write('WARNING: SELECTION BREAKS BONDS\n')
sys.stderr.write(' (between atom ids: ')
for n in range(0,2):
sys.stderr.write(str(atomids[n])+' ')
sys.stderr.write(')\n'
' The atoms you selected are bonded\n'
' to other atoms you didn\'t select.\n'
' Are you sure you selected the correct atoms?\n')
no_warnings = False
elif (line.strip() == 'Angles'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line == '':
break
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 5):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Angles section:\n'
' \"'+line.strip()+'\"\n')
#tokens[0] = '$angle:id'+tokens[0]
#tokens[1] = '@angle:type'+tokens[1]
atomids = [None, None, None]
atomtypes = [None, None, None]
molids = [None, None, None]
in_selections = True
some_in_selection = False
for n in range(0,3):
atomids[n] = Intify(tokens[2+n])
if atomids[n] in atomid2type:
atomtypes[n] = atomid2type[atomids[n]]
if atomids[n] in atomid2mol:
molids[n] = atomid2mol[atomids[n]]
if (BelongsToSel(atomids[n], atomid_selection) and
BelongsToSel(atomtypes[n], atomtype_selection) and
BelongsToSel(molids[n], molid_selection)):
#tokens[2+n] = '$atom:id'+tokens[2+n]
#tokens[2+n] = '$atom:'+atomids_int2name[atomids[n]]
some_in_selection = True
else:
in_selections = False
if in_selections:
l_data_angles.append((' '*indent)+(' '.join(tokens)+'\n'))
elif some_in_selection:
sys.stderr.write('WARNING: SELECTION BREAKS ANGLES\n')
sys.stderr.write(' (between atom ids: ')
for n in range(0,3):
sys.stderr.write(str(atomids[n])+' ')
sys.stderr.write(')\n'
' The atoms you selected participate in 3-body \"Angle\"\n'
' interactions with other atoms you didn\'t select.\n'
' (They will be ignored.)\n'
' Are you sure you selected the correct atoms?\n')
no_warnings = False
elif (line.strip() == 'Dihedrals'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 6):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Dihedrals section:\n'
' \"'+line.strip()+'\"\n')
#tokens[0] = '$dihedral:id'+tokens[0]
#tokens[1] = '@dihedral:type'+tokens[1]
atomids = [None, None, None, None]
atomtypes = [None, None, None, None]
molids = [None, None, None, None]
in_selections = True
some_in_selection = False
for n in range(0,4):
atomids[n] = Intify(tokens[2+n])
if atomids[n] in atomid2type:
atomtypes[n] = atomid2type[atomids[n]]
if atomids[n] in atomid2mol:
molids[n] = atomid2mol[atomids[n]]
if (BelongsToSel(atomids[n], atomid_selection) and
BelongsToSel(atomtypes[n], atomtype_selection) and
BelongsToSel(molids[n], molid_selection)):
#tokens[2+n] = '$atom:id'+tokens[2+n]
#tokens[2+n] = '$atom:'+atomids_int2name[atomids[n]]
some_in_selection = True
else:
in_selections = False
if in_selections:
l_data_dihedrals.append((' '*indent)+(' '.join(tokens)+'\n'))
elif some_in_selection:
sys.stderr.write('WARNING: SELECTION BREAKS DIHEDRALS\n')
sys.stderr.write(' (between atom ids: ')
for n in range(0,4):
sys.stderr.write(str(atomids[n])+' ')
sys.stderr.write(')\n'
' The atoms you selected participate in 4-body \"Dihedral\"\n'
' interactions with other atoms you didn\'t select.\n'
' (They will be ignored.)\n'
' Are you sure you selected the correct atoms?\n')
no_warnings = False
elif (line.strip() == 'Impropers'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 6):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Impropers section:\n'
' \"'+line.strip()+'\"\n')
#tokens[0] = '$improper:id'+tokens[0]
#tokens[1] = '@improper:type'+tokens[1]
atomids = [None, None, None, None]
atomtypes = [None, None, None, None]
molids = [None, None, None, None]
in_selections = True
some_in_selection = False
for n in range(0,4):
atomids[n] = Intify(tokens[2+n])
if atomids[n] in atomid2type:
atomtypes[n] = atomid2type[atomids[n]]
if atomids[n] in atomid2mol:
molids[n] = atomid2mol[atomids[n]]
if (BelongsToSel(atomids[n], atomid_selection) and
BelongsToSel(atomtypes[n], atomtype_selection) and
BelongsToSel(molids[n], molid_selection)):
#tokens[2+n] = '$atom:id'+tokens[2+n]
#tokens[2+n] = '$atom:'+atomids_int2name[atomids[n]]
some_in_selection = True
else:
in_selections = False
if in_selections:
l_data_impropers.append((' '*indent)+(' '.join(tokens)+'\n'))
elif some_in_selection:
sys.stderr.write('WARNING: SELECTION BREAKS IMPROPERS\n')
sys.stderr.write(' (between atom ids: ')
for n in range(0,4):
sys.stderr.write(str(atomids[n])+' ')
sys.stderr.write(')\n'
' The atoms you selected participate in 4-body \"Improper\"\n'
' interactions with other atoms you didn\'t select.\n'
' (They will be ignored.)\n'
' Are you sure you selected the correct atoms?\n')
no_warnings = False
elif (line.strip() == 'Bond Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@bond:type'+tokens[0]
l_data_bond_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Angle Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@angle:type'+tokens[0]
l_data_angle_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Dihedral Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_dihedral_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Improper Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@improper:type'+tokens[0]
l_data_improper_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Pair Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
some_pair_coeffs_read = True
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Pair Coeffs section:\n'
' \"'+line.strip()+'\"\n')
atomtype_i_str = tokens[0]
if '*' in atomtype_i_str:
raise InputError('PROBLEM near or before '+ErrorLeader(infile, lineno)+'\n'
' As of 2015-8, moltemplate forbids use of the "\*\" wildcard\n'
' character in the \"Pair Coeffs\" section.\n')
else:
i = int(atomtype_i_str)
if ((not i) or
BelongsToSel(i, atomtype_selection)):
i_str = '@atom:type'+str(i)
tokens[0] = i_str
l_data_pair_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'PairIJ Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
some_pair_coeffs_read = True
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical line in Pair Coeffs section:\n'
' \"'+line.strip()+'\"\n')
atomtype_i_str = tokens[0]
atomtype_j_str = tokens[1]
if (('*' in atomtype_i_str) or ('*' in atomtype_j_str)):
raise InputError('PROBLEM near or before '+ErrorLeader(infile, lineno)+'\n'
' As of 2015-8, moltemplate forbids use of the "\*\" wildcard\n'
' character in the \"PairIJ Coeffs\" section.\n')
else:
i = int(atomtype_i_str)
j = int(atomtype_j_str)
if (((not i) or BelongsToSel(i, atomtype_selection)) and
((not j) or BelongsToSel(j, atomtype_selection))):
i_str = '@atom:type'+str(i)
j_str = '@atom:type'+str(j)
tokens[0] = i_str
tokens[1] = j_str
l_data_pair_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[0] == 'pair_coeff'):
some_pair_coeffs_read = True
if (len(tokens) < 3):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical pair_coeff command:\n'
' \"'+line.strip()+'\"\n')
l_in_pair_coeffs.append(' '*indent+line.strip())
elif (tokens[0] == 'mass'):
some_pair_coeffs_read = True
if (len(tokens) < 3):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical \"mass\" command:\n'
' \"'+line.strip()+'\"\n')
l_in_masses.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[0] == 'bond_coeff'):
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical bond_coeff command:\n'
' \"'+line.strip()+'\"\n')
#tokens[1] = '@bond:type'+tokens[1]
l_in_bond_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[0] == 'angle_coeff'):
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical angle_coeff command:\n'
' \"'+line.strip()+'\"\n')
#tokens[1] = '@angle:type'+tokens[1]
l_in_angle_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[0] == 'dihedral_coeff'):
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical dihedral_coeff command:\n'
' \"'+line.strip()+'\"\n')
#tokens[1] = '@dihedral:type'+tokens[1]
l_in_dihedral_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[0] == 'improper_coeff'):
if (len(tokens) < 2):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical improper_coeff command:\n'
' \"'+line.strip()+'\"\n')
#tokens[1] = '@improper:type'+tokens[1]
l_in_improper_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
# -- class2 force fields --
elif (line.strip() == 'BondBond Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@angle:type'+tokens[0]
l_data_bondbond_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'BondAngle Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@angle:type'+tokens[0]
l_data_bondangle_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'MiddleBondTorsion Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_middlebondtorsion_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'EndBondTorsion Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_endbondtorsion_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'AngleTorsion Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_angletorsion_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'AngleAngleTorsion Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_angleangletorsion_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'BondBond13 Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@dihedral:type'+tokens[0]
l_data_bondbond13_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'AngleAngle Coeffs'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
#tokens[0] = '@improper:type'+tokens[0]
l_data_angleangle_coeffs.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Angles By Type'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
tokens[0] = '@angle:type'+tokens[0]
l_data_angles_by_type.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Dihedrals By Type'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
tokens[0] = '@dihedral:type'+tokens[0]
l_data_dihedrals_by_type.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (line.strip() == 'Impropers By Type'):
sys.stderr.write(' reading \"'+line.strip()+'\"\n')
while lex:
line = lex.ReadLine()
if line.strip() in data_file_header_names:
lex.push_raw_text(line) # <- Save line for later
break
tokens = line.strip().split()
if len(tokens) > 0:
tokens[0] = '@improper:type'+tokens[0]
l_data_impropers_by_type.append((' '*indent)+(' '.join(tokens)+'\n'))
# Figure out the size of the simulation box boundary:
elif ((len(tokens)==4) and
(tokens[2] == 'xlo') and
(tokens[3] == 'xhi') and
IsNumber(tokens[0]) and
IsNumber(tokens[1])):
boundary_xlo = float(tokens[0])
boundary_xhi = float(tokens[1])
elif ((len(tokens)==4) and
(tokens[2] == 'ylo') and
(tokens[3] == 'yhi') and
IsNumber(tokens[0]) and
IsNumber(tokens[1])):
boundary_ylo = float(tokens[0])
boundary_yhi = float(tokens[1])
elif ((len(tokens)==4) and
(tokens[2] == 'zlo') and
(tokens[3] == 'zhi') and
IsNumber(tokens[0]) and
IsNumber(tokens[1])):
boundary_zlo = float(tokens[0])
boundary_zhi = float(tokens[1])
elif ((len(tokens)==6) and
(tokens[3] == 'xy') and
(tokens[4] == 'xz') and
(tokens[5] == 'yz') and
IsNumber(tokens[0]) and
IsNumber(tokens[1]) and
IsNumber(tokens[2])):
boundary_xy = float(tokens[0])
boundary_xz = float(tokens[1])
boundary_yz = float(tokens[2])
elif (tokens[0] == 'group'):
if (len(tokens) < 3):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical group command:\n'
' \"'+line.strip()+'\"\n')
l_in_group.append((' '*indent)+(' '.join(tokens)+'\n'))
elif ((tokens[0] == 'fix') and (len(tokens) >= 4)):
if (tokens[3].find('rigid') == 0):
if (len(tokens) < 6):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical '+tokens[0]+' '+tokens[3]+' command:\n'
' \"'+line.strip()+'\"\n')
l_in_fix_rigid.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[3].find('shake') == 0):
if (len(tokens) < 7):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical '+tokens[0]+' '+tokens[3]+' command:\n'
' \"'+line.strip()+'\"\n')
l_in_fix_shake.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[3].find('poems') == 0):
if (len(tokens) < 4):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical '+tokens[0]+' '+tokens[3]+' command:\n'
' \"'+line.strip()+'\"\n')
l_in_fix_poems.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[3].find('qeq') == 0):
if (len(tokens) < 8):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical '+tokens[0]+' '+tokens[3]+' command:\n'
' \"'+line.strip()+'\"\n')
l_in_fix_qeq.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[3].find('qmmm') == 0):
if (len(tokens) < 8):
raise InputError('Error: near or before '+ErrorLeader(infile, lineno)+'\n'
' Nonsensical '+tokens[0]+' '+tokens[3]+' command:\n'
' \"'+line.strip()+'\"\n')
l_in_fix_qmmm.append((' '*indent)+(' '.join(tokens)+'\n'))
elif (tokens[3].find('restrain') == 0):
sys.stderr('WARNING: fix \"'+tokens[3]+'\" commands are NOT understood by '+g_program_name+'.\n'
' If you need restraints, add them to your final .LT file (eg. \"system.lt\"),\n'
' (And be sure to use unique (full, long) moltemplate names for each $atom:.)\n'
' Ignoring line \"'+line.strip()+'\"\n')
else:
sys.stderr.write(' Ignoring line \"'+line.strip()+'\"\n')
sys.stderr.write('\n\n')
sys.stderr.write(' processing \"Atoms\" section (')
# post-processing:
if len(l_data_masses) == 0:
infer_types_from_comments = False
# Pass 1 through l_data_atoms:
# Now do a second-pass throught the "l_data_atoms" section, and
# finish dealing with "infer_types_from_comments".
# During this pass, peplace the atomtype names and atomid names with
# atom type names which were inferred from comments read earlier.
sys.stderr.write('pass1')
for i in range(0, len(l_data_atoms)):
tokens = l_data_atoms[i].split()
atomid = tokens[i_atomid]
if atomid.find('$atom:') == 0:
atomid = atomid[6:]
# convert to an integer
atomid = Intify(atomid)
if infer_types_from_comments:
atomtype = tokens[i_atomtype]
# remove the "@atom:" prefix (we will put it back later)
if atomtype.find('@atom:') == 0:
atomtype = atomtype[6:]
# convert to an integer
atomtype = Intify(atomtype)
atomtype_name = atomtypes_int2name[atomtype]
if atomtype in atomids_by_type:
l_atomids = atomids_by_type[atomtype]
prev_count = len(l_atomids)
# lookup the most recently added atom of this type:
#prev_atomid_name = l_atomids[-1]
#ic = prev_atomid_name.rfind('_')
#prev_count = int(prev_atomid_name[ic+1:])
atomid_name = atomtype_name+'_'+str(prev_count+1)
atomids_by_type[atomtype].append(atomid)
else:
atomids_by_type[atomtype] = [atomid]
atomid_name = atomtype_name+'_1'
atomids_int2name[atomid] = atomid_name
#atomids_name2str[atomid_name] = atomid
else:
atomids_int2name[atomid] = 'id'+str(atomid)
sys.stderr.write(', pass2')
# Pass 2: If any atom types only appear once, simplify their atomid names.
for i in range(0, len(l_data_atoms)):
tokens = l_data_atoms[i].split()
# remove the "@atom:" prefix (we will put it back later)
atomtype = tokens[i_atomtype]
if atomtype.find('@atom:') == 0:
atomtype = atomtype[6:]
atomtype = Intify(atomtype)
if infer_types_from_comments:
if len(atomids_by_type[atomtype]) == 1:
atomid = tokens[i_atomid]
if atomid.find('$atom:') == 0:
atomid = atomid[6:]
atomid = Intify(atomid)
atomtype_name = atomtypes_int2name[atomtype]
atomids_int2name[atomid] = atomtype_name
sys.stderr.write(', pass3')
# Pass 3: substitute the atomid names and atom type names into l_data_atoms
for i in range(0, len(l_data_atoms)):
tokens = l_data_atoms[i].split()
atomid = tokens[i_atomid]
if atomid.find('$atom:') == 0:
atomid = atomid[6:]
# convert to an integer
atomid = Intify(atomid)
atomtype = tokens[i_atomtype]
if atomtype.find('@atom:') == 0:
atomtype = atomtype[6:]
atomtype = Intify(atomtype)
tokens = l_data_atoms[i].split()
tokens[i_atomid] = '$atom:'+atomids_int2name[atomid]
tokens[i_atomtype] = '@atom:'+atomtypes_int2name[atomtype]
l_data_atoms[i] = (' '*indent)+(' '.join(tokens)+'\n')
sys.stderr.write(')\n')
if len(l_data_atoms) == 0:
raise InputError('Error('+g_program_name+'): You have no atoms in you selection!\n'
'\n'
' Either you have chosen a set of atoms, molecules, or atom types which\n'
' does not exist, or there is a problem with (the format of) your\n'
' arguments. Check the documentation and examples.\n')
# --- Now delete items that were not selected from the other lists ---
# --- MASSES ---
# delete masses for atom types we don't care about anymore:
i_line = 0
while i_line < len(l_data_masses):
line = l_data_masses[i_line]
tokens = line.strip().split()
atomtype = Intify(tokens[0])
if ((not (atomtype in needed_atomtypes)) and
(not ((len(atomtype_selection) > 0) and
BelongsToSel(atomtype, atomtype_selection)))):
del l_data_masses[i_line]
else:
atomtype_name = atomtypes_int2name[atomtype]
tokens[0] = '@atom:'+atomtype_name
l_data_masses[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- PAIR COEFFS ---
# delete data_pair_coeffs for atom types we don't care about anymore:
i_line = 0
while i_line < len(l_data_pair_coeffs):
line = l_data_pair_coeffs[i_line]
tokens = line.strip().split()
assert(len(tokens) > 0)
split_colon = tokens[0].split(':')
assert(len(split_colon) == 2)
atomtype = Intify(split_colon[1])
if ((not (atomtype in needed_atomtypes)) and
(not ((len(atomtype_selection) > 0) and
BelongsToSel(atomtype, atomtype_selection)))):
del l_data_pair_coeffs[i_line]
else:
i_line += 1
# delete data_pairij_coeffs for atom types we don't care about anymore:
i_line = 0
while i_line < len(l_data_pairij_coeffs):
line = l_data_pairij_coeffs[i_line]
tokens = line.strip().split()
assert(len(tokens) > 0)
split_colon_I = tokens[0].split(':')
assert(len(split_colon_I) == 2)
atomtype_I = Intify(split_colon_I[1])
split_colon_J = tokens[1].split(':')
assert(len(split_colon_J) == 2)
atomtype_J = Intify(split_colon_J[1])
if (((not (atomtype_I in needed_atomtypes)) and
(not ((len(atomtype_selection) > 0) and
BelongsToSel(atomtype_I, atomtype_selection))))
or
((not (atomtype_J in needed_atomtypes)) and
(not ((len(atomtype_selection) > 0) and
BelongsToSel(atomtype_J, atomtype_selection))))):
del l_data_pairij_coeffs[i_line]
else:
i_line += 1
# delete in_pair_coeffs for atom we don't care about anymore:
i_line = 0
while i_line < len(l_in_pair_coeffs):
line = l_in_pair_coeffs[i_line]
tokens = line.strip().split()
atomtype_i_str = tokens[1]
atomtype_j_str = tokens[2]
#if (('*' in atomtype_i_str) or
# ('*' in atomtype_j_str)):
# sys.stderr.write('WARNING: near or before '+ErrorLeader(infile, lineno)+'\n'
# ' pair_coeff command contains a \"*\" character.\n'
# ' Keep in mind that using moltemplate.sh you can manually change the\n'
# ' numbers assigned to each atom type (when using -a or -b). Make sure\n'
# ' nor to accidentally change the order of atom types in one of these\n'
# ' pair_coeff commands. For example, commands like\n'
# ' pair_coeff 10*4 20*10 0.15 3.6\n'
# ' can be generated by moltemplate.sh, however\n'
# ' they may be rejected by LAMMPS (because LAMMPS prefers this\n'
# ' pair_coeff 4*10 10*20 0.15 3.6)\n'
# ' Later on, you may want to check to make sure moltemplate.sh\n'
# ' is not doing this. (Fortunately you never have to worry unless\n'
# ' you are using the -a or -b arguments with moltemplate.sh)\n')
if ('*' in atomtype_i_str):
atomtype_i_tokens = atomtype_i_str.split('*')
if atomtype_i_tokens[0] == '':
if (min_sel_atomtype and
(min_sel_atomtype < min_needed_atomtype)):
i_a = min_sel_atomtype
else:
i_a = min_needed_atomtype
else:
i_a = Intify(atomtype_i_tokens[0])
if atomtype_i_tokens[1] == '':
if (max_sel_atomtype and
(max_sel_atomtype > max_needed_atomtype)):
i_b = max_sel_atomtype
else:
i_b = max_needed_atomtype
else:
i_b = Intify(atomtype_i_tokens[1])
else:
i_a = i_b = Intify(atomtype_i_str)
i_a_final = None
i_b_final = None
for i in range(i_a, i_b+1):
if ((i in needed_atomtypes) or (min_sel_atomtype <= i)):
i_a_final = i
break
for i in reversed(range(i_a, i_b+1)):
if ((i in needed_atomtypes) or (max_sel_atomtype >= i)):
i_b_final = i
break
#if i_a_final and i_b_final:
# if i_a_final == i_b_final:
# i_str = '@atom:type'+str(i_a_final)
# tokens[1] = i_str
# else:
# i_str = '@{atom:type'+str(i_a_final)+'}*@{atom:type'+str(i_b_final)+'}'
if ('*' in atomtype_j_str):
atomtype_j_tokens = atomtype_j_str.split('*')
if atomtype_j_tokens[0] == '':
if (min_sel_atomtype and
(min_sel_atomtype < min_needed_atomtype)):
j_a = min_sel_atomtype
else:
j_a = min_needed_atomtype
else:
j_a = Intify(atomtype_j_tokens[0])
if atomtype_j_tokens[1] == '':
if (max_sel_atomtype and
(max_sel_atomtype > max_needed_atomtype)):
j_b = max_sel_atomtype
else:
j_b = max_needed_atomtype
else:
j_b = Intify(atomtype_j_tokens[1])
else:
j_a = j_b = Intify(atomtype_j_str)
j_a_final = None
j_b_final = None
for j in range(j_a, j_b+1):
if ((j in needed_atomtypes) or (min_sel_atomtype <= j)):
j_a_final = j
break
for j in reversed(range(j_a, j_b+1)):
if ((j in needed_atomtypes) or (max_sel_atomtype >= j)):
j_b_final = j
break
#if j_a_final and j_b_final:
# if j_a_final == j_b_final:
# j_str = '@atom:type'+str(j_a_final)
# tokens[1] = j_str
# else:
# j_str = '@{atom:type'+str(j_a_final)+'}*@{atom:type'+str(j_b_final)+'}'
if not (i_a_final and i_b_final and j_a_final and j_b_final):
del l_in_pair_coeffs[i_line]
elif (('*' in atomtype_i_str) or ('*' in atomtype_j_str)):
del l_in_pair_coeffs[i_line]
for i in range(i_a_final, i_b_final+1):
for j in range(j_a_final, j_b_final+1):
if j >= i:
#tokens[1] = '@atom:type'+str(i)
#tokens[2] = '@atom:type'+str(j)
tokens[1] = '@atom:'+atomtypes_int2name[i]
tokens[2] = '@atom:'+atomtypes_int2name[j]
l_in_pair_coeffs.insert(i_line,
(' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
#tokens[1] = '@atom:type'+tokens[1]
#tokens[2] = '@atom:type'+tokens[2]
tokens[1] = '@atom:'+atomtypes_int2name[int(tokens[1])]
tokens[2] = '@atom:'+atomtypes_int2name[int(tokens[2])]
l_in_pair_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete mass commands for atom types we don't care about anymore:
i_line = 0
while i_line < len(l_in_masses):
line = l_in_masses[i_line]
tokens = line.strip().split()
atomtype_i_str = tokens[1]
#if (('*' in atomtype_i_str) or
# ('*' in atomtype_j_str)):
# sys.stderr.write('WARNING: near or before '+ErrorLeader(infile, lineno)+'\n'
# ' pair_coeff command contains a \"*\" character.\n'
# ' Keep in mind that using moltemplate.sh you can manually change the\n'
# ' numbers assigned to each atom type (when using -a or -b). Make sure\n'
# ' nor to accidentally change the order of atom types in one of these\n'
# ' pair_coeff commands. For example, commands like\n'
# ' pair_coeff 10*4 20*10 0.15 3.6\n'
# ' can be generated by moltemplate.sh, however\n'
# ' they may be rejected by LAMMPS (because LAMMPS prefers this\n'
# ' pair_coeff 4*10 10*20 0.15 3.6)\n'
# ' Later on, you may want to check to make sure moltemplate.sh\n'
# ' is not doing this. (Fortunately you never have to worry unless\n'
# ' you are using the -a or -b arguments with moltemplate.sh)\n')
if ('*' in atomtype_i_str):
atomtype_i_tokens = atomtype_i_str.split('*')
if atomtype_i_tokens[0] == '':
if (min_sel_atomtype and
(min_sel_atomtype < min_needed_atomtype)):
i_a = min_sel_atomtype
else:
i_a = min_needed_atomtype
else:
i_a = Intify(atomtype_i_tokens[0])
if atomtype_i_tokens[1] == '':
if (max_sel_atomtype and
(max_sel_atomtype > max_needed_atomtype)):
i_b = max_sel_atomtype
else:
i_b = max_needed_atomtype
else:
i_b = Intify(atomtype_i_tokens[1])
else:
i_a = i_b = Intify(atomtype_i_str)
i_a_final = None
i_b_final = None
for i in range(i_a, i_b+1):
if ((i in needed_atomtypes) or (min_sel_atomtype <= i)):
i_a_final = i
break
for i in reversed(range(i_a, i_b+1)):
if ((i in needed_atomtypes) or (max_sel_atomtype >= i)):
i_b_final = i
break
#if i_a_final and i_b_final:
# if i_a_final == i_b_final:
# i_str = '@atom:type'+str(i_a_final)
# tokens[1] = i_str
# else:
# i_str = '@{atom:type'+str(i_a_final)+'}*@{atom:type'+str(i_b_final)+'}'
if not (i_a_final and i_b_final and j_a_final and j_b_final):
del l_in_masses[i_line]
elif ('*' in atomtype_i_str):
del l_in_masses[i_line]
for i in range(i_a_final, i_b_final+1):
#tokens[1] = '@atom:type'+str(i)
tokens[1] = '@atom:'+atomtypes_int2name[i]
# CONTINUEHERE: CHECK THAT THIS IS WORKING
l_in_masses.insert(i_line, (' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
assert(i_a == i_b)
#tokens[1] = '@atom:type'+str(i_a)
tokens[1] = '@atom:'+atomtypes_int2name[i_a]
# CONTINUEHERE: CHECK THAT THIS IS WORKING
l_in_masses[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- BONDS AND BOND COEFFS ---
# delete lines from data_bonds if they involve atoms we don't care about
i_line = 0
while i_line < len(l_data_bonds):
line = l_data_bonds[i_line]
tokens = line.strip().split()
assert(len(tokens) == 4)
bondid = Intify(tokens[0])
bondtype = Intify(tokens[1])
atomid1 = Intify(tokens[2])
atomid2 = Intify(tokens[3])
#if ((atomid1 in needed_atomids) and
# (atomid2 in needed_atomids)):
tokens[0] = '$bond:id'+str(bondid)
tokens[1] = '@bond:type'+str(bondtype)
#tokens[2] = '$atom:id'+str(atomid1)
#tokens[3] = '$atom:id'+str(atomid2)
tokens[2] = '$atom:'+atomids_int2name[atomid1]
tokens[3] = '$atom:'+atomids_int2name[atomid2]
needed_bondids.add(bondid)
needed_bondtypes.add(bondtype)
l_data_bonds[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
#else:
# del l_data_bonds[i_line]
# delete data_bond_coeffs for bondtypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_bond_coeffs):
line = l_data_bond_coeffs[i_line]
tokens = line.strip().split()
bondtype = Intify(tokens[0])
if (not (bondtype in needed_bondtypes)):
del l_data_bond_coeffs[i_line]
else:
tokens[0] = '@bond:type'+str(bondtype)
l_data_bond_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete in_bond_coeffs for bondtypes we don't care about anymore:
for bondtype in needed_bondtypes:
assert(type(bondtype) is int)
if ((min_needed_bondtype == None) or
(min_needed_bondtype > bondtype)):
min_needed_bondtype = bondtype
if ((max_needed_bondtype == None) or
(max_needed_bondtype < bondtype)):
max_needed_bondtype = bondtype
for bondid in needed_bondids:
assert(type(bondid) is int)
if ((min_needed_bondid == None) or
(min_needed_bondid > bondid)):
min_needed_bondid = bondid
if ((max_needed_bondid == None) or
(max_needed_bondid < bondid)):
max_needed_bondid = bondid
i_line = 0
while i_line < len(l_in_bond_coeffs):
line = l_in_bond_coeffs[i_line]
tokens = line.strip().split()
bondtype_str = tokens[1]
if ('*' in bondtype_str):
bondtype_tokens = bondtype_str.split('*')
if bondtype_tokens[0] == '':
i_a = min_needed_bondtype
else:
i_a = Intify(bondtype_tokens[0])
if bondtype_tokens[1] == '':
i_b = max_needed_bondtype
else:
i_b = Intify(bondtype_tokens[1])
else:
i_a = Intify(bondtype_str)
i_b = i_a
if i_a < min_needed_bondtype:
i_a = min_needed_bondtype
if i_b > max_needed_bondtype:
i_b = max_needed_bondtype
#if i_a == i_b:
# i_str = '@bond:type'+str(i_a)
# tokens[1] = i_str
#else:
# i_str = '@{bond:type'+str(j_a)+'}*@{bond:type'+str(j_b)+'}'
if ('*' in bondtype_str):
del l_in_bond_coeffs[i_line]
for i in range(i_a, i_b+1):
if (i in needed_bondtypes):
tokens[1] = '@bond:type'+str(i)
l_in_bond_coeffs.insert(i_line,
(' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
if i_a < i_b:
raise InputError('Error: number of bond types in data file is not consistent with the\n'
' number of bond types you have define bond_coeffs for.\n')
if (i_a == i_b) and (i_a in needed_bondtypes):
tokens[1] = '@bond:type'+str(i_a)
l_in_bond_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
else:
del l_in_bond_coeffs[i_line]
# --- ANGLES AND ANGLE COEFFS ---
# delete lines from data_angles if they involve atoms we don't care about
i_line = 0
while i_line < len(l_data_angles):
line = l_data_angles[i_line]
tokens = line.strip().split()
assert(len(tokens) == 5)
angleid = Intify(tokens[0])
angletype = Intify(tokens[1])
atomid1 = Intify(tokens[2])
atomid2 = Intify(tokens[3])
atomid3 = Intify(tokens[4])
#if ((atomid1 in needed_atomids) and
# (atomid2 in needed_atomids)):
tokens[0] = '$angle:id'+str(angleid)
tokens[1] = '@angle:type'+str(angletype)
#tokens[2] = '$atom:id'+str(atomid1)
#tokens[3] = '$atom:id'+str(atomid2)
#tokens[4] = '$atom:id'+str(atomid3)
tokens[2] = '$atom:'+atomids_int2name[atomid1]
tokens[3] = '$atom:'+atomids_int2name[atomid2]
tokens[4] = '$atom:'+atomids_int2name[atomid3]
needed_angleids.add(angleid)
needed_angletypes.add(angletype)
l_data_angles[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
#else:
# del l_data_angles[i_line]
# delete data_angle_coeffs for angletypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_angle_coeffs):
line = l_data_angle_coeffs[i_line]
tokens = line.strip().split()
angletype = Intify(tokens[0])
if (not (angletype in needed_angletypes)):
del l_data_angle_coeffs[i_line]
else:
tokens[0] = '@angle:type'+str(angletype)
l_data_angle_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- class2specific ----
# Do the same for BondBond and BondAngle Coeffs:
# NOTE: LAMMPS INPUT SCRIPTS, ALL CLASS2 COEFFS are represented by:
# angle_coeff, dihedral_coeff, and improper_coeff commands.
# THERE ARE NO bondbond_coeff commands, or bondangle_coeff commands,
# etc..., so we dont have to worry about l_in_bondbond_coeffs,...
# delete data_bondbond_coeffs for angletypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_bondbond_coeffs):
line = l_data_bondbond_coeffs[i_line]
tokens = line.strip().split()
angletype = Intify(tokens[0])
if (not (angletype in needed_angletypes)):
del l_data_bondbond_coeffs[i_line]
else:
tokens[0] = '@angle:type'+str(angletype)
l_data_bondbond_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete data_bondangle_coeffs for angletypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_bondangle_coeffs):
line = l_data_bondangle_coeffs[i_line]
tokens = line.strip().split()
angletype = Intify(tokens[0])
if (not (angletype in needed_angletypes)):
del l_data_bondangle_coeffs[i_line]
else:
tokens[0] = '@angle:type'+str(angletype)
l_data_bondangle_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- end of class2specific ----
# delete in_angle_coeffs for angletypes we don't care about anymore:
for angletype in needed_angletypes:
assert(type(angletype) is int)
if ((min_needed_angletype == None) or
(min_needed_angletype > angletype)):
min_needed_angletype = angletype
if ((max_needed_angletype == None) or
(max_needed_angletype < angletype)):
max_needed_angletype = angletype
for angleid in needed_angleids:
assert(type(angleid) is int)
if ((min_needed_angleid == None) or
(min_needed_angleid > angleid)):
min_needed_angleid = angleid
if ((max_needed_angleid == None) or
(max_needed_angleid < angleid)):
max_needed_angleid = angleid
i_line = 0
while i_line < len(l_in_angle_coeffs):
line = l_in_angle_coeffs[i_line]
tokens = line.strip().split()
angletype_str = tokens[1]
if ('*' in angletype_str):
angletype_tokens = angletype_str.split('*')
if angletype_tokens[0] == '':
i_a = min_needed_angletype
else:
i_a = Intify(angletype_tokens[0])
if angletype_tokens[1] == '':
i_b = max_needed_angletype
else:
i_b = Intify(angletype_tokens[1])
else:
i_a = i_b = Intify(angletype_str)
if i_a < min_needed_angletype:
i_a = min_needed_angletype
if i_b > max_needed_angletype:
i_b = max_needed_angletype
#if i_a == i_b:
# i_str = '@angle:type'+str(i_a)
# tokens[1] = i_str
#else:
# i_str = '@{angle:type'+str(j_a)+'}*@{angle:type'+str(j_b)+'}'
if ('*' in angletype_str):
del l_in_angle_coeffs[i_line]
for i in range(i_a, i_b+1):
if (i in needed_angletypes):
tokens[1] = '@angle:type'+str(i)
l_in_angle_coeffs.insert(i_line,
(' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
if i_a < i_b:
raise InputError('Error: number of angle types in data file is not consistent with the\n'
' number of angle types you have define angle_coeffs for.\n')
if (i_a == i_b) and (i_a in needed_angletypes):
tokens[1] = '@angle:type'+str(i_a)
l_in_angle_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
else:
del l_in_angle_coeffs[i_line]
# --- DIHEDRALS AND DIHEDRAL COEFFS ---
# delete lines from data_dihedrals if they involve atoms we don't care about
i_line = 0
while i_line < len(l_data_dihedrals):
line = l_data_dihedrals[i_line]
tokens = line.strip().split()
assert(len(tokens) == 6)
dihedralid = Intify(tokens[0])
dihedraltype = Intify(tokens[1])
atomid1 = Intify(tokens[2])
atomid2 = Intify(tokens[3])
atomid3 = Intify(tokens[4])
atomid4 = Intify(tokens[5])
#if ((atomid1 in needed_atomids) and
# (atomid2 in needed_atomids)):
tokens[0] = '$dihedral:id'+str(dihedralid)
tokens[1] = '@dihedral:type'+str(dihedraltype)
#tokens[2] = '$atom:id'+str(atomid1)
#tokens[3] = '$atom:id'+str(atomid2)
#tokens[4] = '$atom:id'+str(atomid3)
#tokens[5] = '$atom:id'+str(atomid4)
tokens[2] = '$atom:'+atomids_int2name[atomid1]
tokens[3] = '$atom:'+atomids_int2name[atomid2]
tokens[4] = '$atom:'+atomids_int2name[atomid3]
tokens[5] = '$atom:'+atomids_int2name[atomid4]
needed_dihedralids.add(dihedralid)
needed_dihedraltypes.add(dihedraltype)
l_data_dihedrals[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
#else:
# del l_data_dihedrals[i_line]
# delete data_dihedral_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_dihedral_coeffs):
line = l_data_dihedral_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_dihedral_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_dihedral_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- class2specific ----
# Do the same for MiddleBondTorsion, EndBondTorsion, AngleTorsion,
# AngleAngleTorsion, and BondBond13 Coeffs
# NOTE: LAMMPS INPUT SCRIPTS, ALL CLASS2 COEFFS are represented by:
# angle_coeff, dihedral_coeff, and improper_coeff commands.
# THERE ARE NO "middlebondtorsion_coeff" commands, etc...so we don't
# have to worry about dealing with "l_in_middlebondtorsion_coeffs",...
# delete data_middlebondtorsion_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_middlebondtorsion_coeffs):
line = l_data_middlebondtorsion_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_middlebondtorsion_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_middlebondtorsion_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete data_endbondtorsion_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_endbondtorsion_coeffs):
line = l_data_endbondtorsion_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_endbondtorsion_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_endbondtorsion_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete data_angletorsion_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_angletorsion_coeffs):
line = l_data_angletorsion_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_angletorsion_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_angletorsion_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete data_angleangletorsion_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_angleangletorsion_coeffs):
line = l_data_angleangletorsion_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_angleangletorsion_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_angleangletorsion_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# delete data_bondbond13_coeffs for dihedraltypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_bondbond13_coeffs):
line = l_data_bondbond13_coeffs[i_line]
tokens = line.strip().split()
dihedraltype = Intify(tokens[0])
if (not (dihedraltype in needed_dihedraltypes)):
del l_data_bondbond13_coeffs[i_line]
else:
tokens[0] = '@dihedral:type'+str(dihedraltype)
l_data_bondbond13_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- end of class2specific ----
# delete in_dihedral_coeffs for dihedraltypes we don't care about anymore:
for dihedraltype in needed_dihedraltypes:
assert(type(dihedraltype) is int)
if ((min_needed_dihedraltype == None) or
(min_needed_dihedraltype > dihedraltype)):
min_needed_dihedraltype = dihedraltype
if ((max_needed_dihedraltype == None) or
(max_needed_dihedraltype < dihedraltype)):
max_needed_dihedraltype = dihedraltype
for dihedralid in needed_dihedralids:
assert(type(dihedralid) is int)
if ((min_needed_dihedralid == None) or
(min_needed_dihedralid > dihedralid)):
min_needed_dihedralid = dihedralid
if ((max_needed_dihedralid == None) or
(max_needed_dihedralid < dihedralid)):
max_needed_dihedralid = dihedralid
i_line = 0
while i_line < len(l_in_dihedral_coeffs):
line = l_in_dihedral_coeffs[i_line]
tokens = line.strip().split()
dihedraltype_str = tokens[1]
if ('*' in dihedraltype_str):
dihedraltype_tokens = dihedraltype_str.split('*')
if dihedraltype_tokens[0] == '':
i_a = min_needed_dihedraltype
else:
i_a = Intify(dihedraltype_tokens[0])
if dihedraltype_tokens[1] == '':
i_b = max_needed_dihedraltype
else:
i_b = Intify(dihedraltype_tokens[1])
else:
i_a = i_b = Intify(dihedraltype_str)
if i_a < min_needed_dihedraltype:
i_a = min_needed_dihedraltype
if i_b > max_needed_dihedraltype:
i_b = max_needed_dihedraltype
#if i_a == i_b:
# i_str = '@dihedral:type'+str(i_a)
# tokens[1] = i_str
#else:
# i_str = '@{dihedral:type'+str(j_a)+'}*@{dihedral:type'+str(j_b)+'}'
if ('*' in dihedraltype_str):
del l_in_dihedral_coeffs[i_line]
for i in range(i_a, i_b+1):
if (i in needed_dihedraltypes):
tokens[1] = '@dihedral:type'+str(i)
l_in_dihedral_coeffs.insert(i_line,
(' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
if i_a < i_b:
raise InputError('Error: number of dihedral types in data file is not consistent with the\n'
' number of dihedral types you have define dihedral_coeffs for.\n')
if (i_a == i_b) and (i_a in needed_dihedraltypes):
tokens[1] = '@dihedral:type'+str(i_a)
l_in_dihedral_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
else:
del l_in_dihedral_coeffs[i_line]
# --- IMPROPERS AND IMPROPER COEFFS ---
# delete lines from data_impropers if they involve atoms we don't care about
i_line = 0
while i_line < len(l_data_impropers):
line = l_data_impropers[i_line]
tokens = line.strip().split()
assert(len(tokens) == 6)
improperid = Intify(tokens[0])
impropertype = Intify(tokens[1])
atomid1 = Intify(tokens[2])
atomid2 = Intify(tokens[3])
atomid3 = Intify(tokens[4])
atomid4 = Intify(tokens[5])
#if ((atomid1 in needed_atomids) and
# (atomid2 in needed_atomids)):
tokens[0] = '$improper:id'+str(improperid)
tokens[1] = '@improper:type'+str(impropertype)
#tokens[2] = '$atom:id'+str(atomid1)
#tokens[3] = '$atom:id'+str(atomid2)
#tokens[4] = '$atom:id'+str(atomid3)
#tokens[5] = '$atom:id'+str(atomid4)
tokens[2] = '$atom:'+atomids_int2name[atomid1]
tokens[3] = '$atom:'+atomids_int2name[atomid2]
tokens[4] = '$atom:'+atomids_int2name[atomid3]
tokens[5] = '$atom:'+atomids_int2name[atomid4]
needed_improperids.add(improperid)
needed_impropertypes.add(impropertype)
l_data_impropers[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
#else:
# del l_data_impropers[i_line]
# delete data_improper_coeffs for impropertypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_improper_coeffs):
line = l_data_improper_coeffs[i_line]
tokens = line.strip().split()
impropertype = Intify(tokens[0])
if (not (impropertype in needed_impropertypes)):
del l_data_improper_coeffs[i_line]
else:
tokens[0] = '@improper:type'+str(impropertype)
l_data_improper_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- class2specific ----
# Do the same for AngleAngle Coeffs
# NOTE: LAMMPS INPUT SCRIPTS, ALL CLASS2 COEFFS are represented by:
# angle_coeff, dihedral_coeff, and improper_coeff commands.
# THERE ARE NO "angleangle_coeff" commands, etc...so we don't
# have to worry about dealing with "l_in_angleangle_coeffs",...
# delete data_middlebondtorsion_coeffs for dihedraltypes we don't care about anymore:
# delete data_angleangle_coeffs for impropertypes we don't care about anymore:
i_line = 0
while i_line < len(l_data_angleangle_coeffs):
line = l_data_angleangle_coeffs[i_line]
tokens = line.strip().split()
impropertype = Intify(tokens[0])
if (not (impropertype in needed_impropertypes)):
del l_data_angleangle_coeffs[i_line]
else:
tokens[0] = '@improper:type'+str(impropertype)
l_data_angleangle_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
# --- end of class2specific ----
# delete in_improper_coeffs for impropertypes we don't care about anymore:
for impropertype in needed_impropertypes:
assert(type(impropertype) is int)
if ((min_needed_impropertype == None) or
(min_needed_impropertype > impropertype)):
min_needed_impropertype = impropertype
if ((max_needed_impropertype == None) or
(max_needed_impropertype < impropertype)):
max_needed_impropertype = impropertype
for improperid in needed_improperids:
assert(type(improperid) is int)
if ((min_needed_improperid == None) or
(min_needed_improperid > improperid)):
min_needed_improperid = improperid
if ((max_needed_improperid == None) or
(max_needed_improperid < improperid)):
max_needed_improperid = improperid
i_line = 0
while i_line < len(l_in_improper_coeffs):
line = l_in_improper_coeffs[i_line]
tokens = line.strip().split()
impropertype_str = tokens[1]
if ('*' in impropertype_str):
impropertype_tokens = impropertype_str.split('*')
if impropertype_tokens[0] == '':
i_a = min_needed_impropertype
else:
i_a = Intify(impropertype_tokens[0])
if impropertype_tokens[1] == '':
i_b = max_needed_impropertype
else:
i_b = Intify(impropertype_tokens[1])
else:
i_a = i_b = Intify(impropertype_str)
if i_a < min_needed_impropertype:
i_a = min_needed_impropertype
if i_b > max_needed_impropertype:
i_b = max_needed_impropertype
#if i_a == i_b:
# i_str = '@improper:type'+str(i_a)
# tokens[1] = i_str
#else:
# i_str = '@{improper:type'+str(j_a)+'}*@{improper:type'+str(j_b)+'}'
if ('*' in impropertype_str):
del l_in_improper_coeffs[i_line]
for i in range(i_a, i_b+1):
if (i in needed_impropertypes):
tokens[1] = '@improper:type'+str(i)
l_in_improper_coeffs.insert(i_line,
(' '*indent)+(' '.join(tokens)+'\n'))
i_line += 1
else:
if i_a < i_b:
raise InputError('Error: number of improper types in data file is not consistent with the\n'
' number of improper types you have define improper_coeffs for.\n')
if (i_a == i_b) and (i_a in needed_impropertypes):
tokens[1] = '@improper:type'+str(i_a)
l_in_improper_coeffs[i_line] = (' '*indent)+(' '.join(tokens)+'\n')
i_line += 1
else:
del l_in_improper_coeffs[i_line]
# --- GROUPS ---
# Now parse through all of the "group" commands and try and figure
# out if any of these groups contain any of the atoms we are keeping.
# If so, then save the group and write it out.
# (I hate trying to parse this kind of text.)
#if len(l_in_group) > 0:
# sys.stderr.write('\n'
# ' --groups-- Attempting to parse \"group\" commands.\n'
# ' This may cause '+g_program_name+' to crash.\n'
# ' If so, comment out all group commands in your input script(s), and\n'
# ' try again. (And please report the error. -Andrew 2014-10-30)\n')
i_line = 0
groups_needed = set(['all'])
while i_line < len(l_in_group):
line = l_in_group[i_line]
tokens = line.strip().split()
delete_this_command = False
explicit_definition = False
if len(tokens) < 3:
delete_this_command = True
group_name = tokens[1]
specifier_style = tokens[2]
str_logical = ''
str_selection = ''
if specifier_style[0:4] == 'type':
str_logical+=specifier_style[4:]
explicit_definition = True
specifier_style = 'type'
elif specifier_style == 'id':
str_logical+=specifier_style[2:]
explicit_definition = True
specifier_style = 'id'
elif specifier_style == 'molecule':
str_logical+=specifier_style[8:]
specifier_style = 'molecule'
explicit_definition = True
if explicit_definition:
i_token_sel_min = 3
if len(tokens) <= i_token_sel_min:
sys.stderr.write('WARNING: possible syntax error on this line:\n'
+' '+l_in_group[i_line]+'\n')
delete_this_command = True
if str_logical == '':
str_logical = tokens[i_token_sel_min]
if not str_logical[0].isdigit():
i_token_sel_min += 1
if len(tokens) <= i_token_sel_min:
tokens.append('')
else:
tokens.insert(i_token_sel_min, str_logical)
i_token_sel_max = len(tokens)-1
for i in range(i_token_sel_min, len(tokens)):
if tokens[i].isdigit():
break
else:
i_token_sel_max = i
assert(len(tokens) > i_token_sel_min)
if str_logical[0:2] in ('<=','>=','==','!=','<>'):
tokens[i_token_sel_min] = str_logical[2:] + tokens[i_token_sel_min]
str_logical = str_logical[0:2]
if str_logical == '<=':
l_group_selection = [ (None,int(tokens[i_token_sel_min])) ]
elif str_logical == '>=':
l_group_selection = [ (int(tokens[i_token_sel_min]),None) ]
elif str_logical == '==':
l_group_selection = [ (int(tokens[i_token_sel_min]),
int(tokens[i_token_sel_min])) ]
elif str_logical == '!=':
l_group_selection = [ (None,int(tokens[i_token_sel_min])-1),
(int(tokens[i_token_sel_min])+1,None)]
elif str_logical == '<>':
l_group_selection = [ (int(tokens[i_token_sel_min]),
int(tokens[i_token_sel_max])) ]
elif str_logical[0:1] in ('<','>'):
tokens[i_token_sel_min] = str_logical[1:] + tokens[i_token_sel_min]
str_logical = str_logical[0:1]
if str_logical == '<':
l_group_selection = [(None,int(tokens[i_token_sel_min])-1)]
elif str_logical == '>':
l_group_selection = [(int(tokens[i_token_sel_min])+1,None)]
else:
str_selection = ' '.join(tokens[i_token_sel_min:i_token_sel_max+1])
l_group_selection = LammpsSelectToIntervals(str_selection,
slice_delim=':',
or_delim=' ')
mn, mx = IntervalListToMinMax(l_group_selection)
if mn == None:
mn = 1
filtered_selection=[]
if specifier_style == 'type':
if mx == None:
mx = max_needed_atomtype
for i in range(mn, mx+1):
if (BelongsToSel(i, l_group_selection)
and (i in needed_atomtypes)):
filtered_selection.append((i,i))
elif specifier_style == 'id':
if mx == None:
mx = max_needed_atomid
for i in range(mn, mx+1):
if (BelongsToSel(i, l_group_selection)
and (i in needed_atomids)):
filtered_selection.append((i,i))
elif specifier_style == 'molecule':
if mx == None:
mx = max_needed_molid
for i in range(mn, mx+1):
if (BelongsToSel(i, l_group_selection)
and (i in needed_molids)):
filtered_selection.append((i,i))
MergeIntervals(filtered_selection)
if len(filtered_selection) > 0:
tokens = ['group', group_name, specifier_style]
for interval in filtered_selection:
a = interval[0]
b = interval[1]
if specifier_style == 'type':
if a == b:
tokens.append('@atom:type'+str(a))
else:
tokens.append('@{atom:type'+str(a)+
'}:@{atom:type'+str(b)+'}')
if specifier_style == 'id':
if a == b:
tokens.append('$atom:id'+str(a))
else:
tokens.append('${atom:id'+str(a)
+'}:${atom:id'+str(b)+'}')
if specifier_style == 'molecule':
if a == b:
tokens.append('$mol:id'+str(a))
else:
tokens.append('${mol:id'+str(a)+
'}:${mol:id'+str(b)+'}')
# Commenting out next two lines. (This is handled later.)
#l_in_group[i_line] = ' '.join(tokens)
#groups_needed.add(group_name)
else:
delete_this_command = True
else:
if len(tokens) > 3:
if tokens[2] == 'union':
i_token = 3
while i_token < len(tokens):
if not (tokens[i_token] in groups_needed):
del tokens[i_token]
else:
i_token += 1
# if none of the groups contain atoms we need,
# then delete the entire command
if len(tokens) <= 3:
delete_this_command = True
elif tokens[2] == 'intersect':
i_token = 3
while i_token < len(tokens):
if not (tokens[i_token] in groups_needed):
# if any of the groups we need are empty
# then delete the command
delete_this_command = True
break
i_token += 1
elif (tokens[2] == 'subtract') and (len(tokens) >= 5):
if not (tokens[3] in groups_needed):
delete_this_command = True
i_token = 4
while i_token < len(tokens):
if not (tokens[i_token] in groups_needed):
del tokens[i_token]
else:
i_token += 1
else:
# Otherwise I don't recongize the syntax of this
# group command. In that case, I just delete it.
delete_this_command = True
elif tokens[2] == 'clear':
pass
elif tokens[2] == 'delete':
pass
else:
delete_this_command = True
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_group[i_line].rstrip()+'\"\n')
del l_in_group[i_line]
else:
groups_needed.add(group_name)
l_in_group[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
# --- fix rigid ---
i_line = 0
while i_line < len(l_in_fix_rigid):
line = l_in_fix_rigid[i_line]
tokens = line.strip().split()
if len(tokens) < 4:
break
fixid = tokens[1]
group_name = tokens[2]
delete_this_command = True
assert(tokens[3].find('rigid') == 0)
if group_name in groups_needed:
delete_this_command = False
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_fix_rigid[i_line].rstrip()+'\"\n')
del l_in_fix_rigid[i_line]
else:
l_in_fix_rigid[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
# --- fix shake ---
i_line = 0
while i_line < len(l_in_fix_shake):
line = l_in_fix_shake[i_line]
tokens = line.strip().split()
if len(tokens) < 4:
break
fixid = tokens[1]
group_name = tokens[2]
delete_this_command = True
assert(tokens[3].find('shake') == 0)
# parse the list of angle types
#i_token = tokens.index('a')
for i_token in range(0, len(tokens)):
if tokens[i_token] == 'a':
break
if i_token != len(tokens):
i_token += 1
while (i_token < len(tokens)) and tokens[i_token].isdigit():
# delete angle types from the list which
# do not belong to the selection
btype=int(tokens[i_token])
if int(tokens[i_token]) in needed_angletypes:
tokens[i_token] = '@angle:type'+tokens[i_token]
i_token += 1
delete_this_command = False
else:
del tokens[i_token]
# parse the list of bond types
#i_token = tokens.index('b')
for i_token in range(0, len(tokens)):
if tokens[i_token] == 'b':
break
if i_token != len(tokens):
i_token += 1
while (i_token < len(tokens)) and tokens[i_token].isdigit():
# delete bond types from the list which
# do not belong to the selection
btype=int(tokens[i_token])
if int(tokens[i_token]) in needed_bondtypes:
tokens[i_token] = '@bond:type'+tokens[i_token]
i_token += 1
delete_this_command = False
else:
del tokens[i_token]
# parse the list of atom types
# i_token = tokens.index('t')
for i_token in range(0, len(tokens)):
if tokens[i_token] == 't':
break
if i_token != len(tokens):
i_token += 1
while (i_token < len(tokens)) and tokens[i_token].isdigit():
# delete atom types from the list which
# do not belong to the selection
btype=int(tokens[i_token])
if int(tokens[i_token]) in needed_atomtypes:
tokens[i_token] = '@atom:type'+tokens[i_token]
i_token += 1
delete_this_command = False
else:
del tokens[i_token]
# Selecting atoms by mass feature should still work, so we
# don't need to delete or ignore these kinds of commands.
#for i_token in range(0, len(tokens)):
# if tokens[i_token] == 'm':
# break
#if i_token != len(tokens):
# delete_this_command = True
if 'mol' in tokens:
delete_this_command = True
if not (group_name in groups_needed):
delete_this_command = True
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_fix_shake[i_line].rstrip()+'\"\n')
del l_in_fix_shake[i_line]
else:
l_in_fix_shake[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
# --- fix poems ---
i_line = 0
while i_line < len(l_in_fix_poems):
line = l_in_fix_poems[i_line]
tokens = line.strip().split()
if len(tokens) < 4:
break
fixid = tokens[1]
group_name = tokens[2]
delete_this_command = True
assert(tokens[3].find('poems') == 0)
if group_name in groups_needed:
delete_this_command = False
if tokens[4] != 'molecule':
delete_this_command = True
sys.stderr.write('WARNING: '+g_program_name+' ONLY supports \"fix poems\" commands\n'
' which use the \"molecule\" keyword.\n')
if tokens[4] == 'file':
sys.stderr.write(' If you want use external files with fix poems, then you will have to\n'
' generate the file yourself. You ask use moltemplate to generate\n'
' this file for you, by manually adding a section at the end of your\n'
' final .LT file (eg. \"system.lt\") which resembles the following:\n\n'
'write(\"poems_file.txt\") {\n'
' 1 1 $atom:idname1a $atom:idname2a $atom:idname3a ...\n'
' 2 1 $atom:idname1b $atom:idname2b $atom:idname3b ...\n'
' 3 1 $atom:idname1c $atom:idname2c $atom:idname3c ...\n'
' : : etc...\n'
'}\n\n'
' ...where $atom:idname1a, $atom:idname2a, ... are moltemplate-compatible\n'
' unique (full,long) id-names for the atoms in each rigid body.\n'
' This will insure the atom-id numbers in this file are correct.\n'
' See the documentation for fix poems for details.\n')
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_fix_poems[i_line].rstrip()+'\"\n')
del l_in_fix_poems[i_line]
else:
l_in_fix_poems[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
# --- fix qeq ---
i_line = 0
while i_line < len(l_in_fix_qeq):
line = l_in_fix_qeq[i_line]
tokens = line.strip().split()
if len(tokens) < 4:
break
fixid = tokens[1]
group_name = tokens[2]
delete_this_command = True
assert(tokens[3].find('qeq') == 0)
if group_name in groups_needed:
delete_this_command = False
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_fix_qeq[i_line].rstrip()+'\"\n')
del l_in_fix_qeq[i_line]
else:
l_in_fix_qeq[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
# --- fix qmmm ---
i_line = 0
while i_line < len(l_in_fix_qmmm):
line = l_in_fix_qmmm[i_line]
tokens = line.strip().split()
if len(tokens) < 4:
break
fixid = tokens[1]
group_name = tokens[2]
delete_this_command = True
assert(tokens[3].find('qmmm') == 0)
if group_name in groups_needed:
delete_this_command = False
if delete_this_command:
sys.stderr.write('WARNING: Ignoring line \n\"'+l_in_fix_qmmm[i_line].rstrip()+'\"\n')
del l_in_fix_qmmm[i_line]
else:
l_in_fix_qmmm[i_line] = (' '*indent) + ' '.join(tokens) + '\n'
i_line += 1
########################################
### Now begin writing the template. ###
########################################
if not some_pair_coeffs_read:
sys.stderr.write('Warning: No \"pair coeffs\" set.\n'
' (No interactions between non-bonded atoms defined.)\n')
no_warnings = False
#sys.stderr.write('Writing ttree data to standard out.\n'
# ' You can redirect this to a file using:\n'+
# ' '+' '.join(sys.argv)+' > filename.ttree\n'
# ' ----------------------\n')
if mol_name != '':
sys.stdout.write(mol_name + ' {\n')
if len(l_in_init) > 0:
sys.stdout.write('\n### LAMMPS commands for initialization\n'
'### (These can be overridden later.)\n\n')
l_in_init.insert(0, (' '*cindent)+'write_once(\"'+in_init+'\") {\n')
l_in_init.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_init))
if len(l_in_settings) > 0:
sys.stdout.write('\n### LAMMPS commands for settings\n'
'### (These can be overridden later.)\n\n')
l_in_settings.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_settings.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_settings))
non_empty_output = True
if len(l_in_masses) > 0:
l_in_masses.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_masses.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_masses))
non_empty_output = True
if remove_coeffs_from_data_file:
if len(l_data_pair_coeffs) > 0:
for line in l_data_pair_coeffs:
tokens = line.strip().split()
atomtype_str = tokens[0]
l_in_pair_coeffs.append((' '*cindent)+' pair_coeff '+atomtype_str+' '+atomtype_str+' '+' '.join(tokens[1:])+'\n')
l_data_pair_coeffs = []
if len(l_data_pairij_coeffs) > 0:
for line in l_data_pairij_coeffs:
l_in_pair_coeffs.append((' '*cindent)+' pair_coeff '+line.strip()+'\n')
l_data_pairij_coeffs = []
if len(l_in_pair_coeffs) > 0:
l_in_pair_coeffs.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_pair_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_pair_coeffs))
non_empty_output = True
if (remove_coeffs_from_data_file and (len(l_data_bond_coeffs) > 0)):
for line in l_data_bond_coeffs:
l_in_bond_coeffs.append((' '*cindent)+' bond_coeff '+line.strip()+'\n')
l_data_bond_coeffs = []
if len(l_in_bond_coeffs) > 0:
l_in_bond_coeffs.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_bond_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_bond_coeffs))
non_empty_output = True
if (remove_coeffs_from_data_file and (len(l_data_angle_coeffs) > 0)):
for line in l_data_angle_coeffs:
l_in_angle_coeffs.append((' '*cindent)+' angle_coeff '+line.strip()+'\n')
l_data_angle_coeffs = []
for line in l_data_bondbond_coeffs:
tokens = line.strip().split()
l_in_angle_coeffs.append((' '*cindent)+' angle_coeff '+tokens[0]+' bb '+' '.join(tokens[1:])+'\n')
l_data_bondbond_coeffs = []
for line in l_data_bondangle_coeffs:
tokens = line.strip().split()
l_in_angle_coeffs.append((' '*cindent)+' angle_coeff '+tokens[0]+' ba '+' '.join(tokens[1:])+'\n')
l_data_bondangle_coeffs = []
if len(l_in_angle_coeffs) > 0:
l_in_angle_coeffs.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_angle_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_angle_coeffs))
non_empty_output = True
if (remove_coeffs_from_data_file and (len(l_data_dihedral_coeffs) > 0)):
for line in l_data_dihedral_coeffs:
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+line.strip()+'\n')
l_data_dihedral_coeffs = []
for line in l_data_middlebondtorsion_coeffs:
tokens = line.strip().split()
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+tokens[0]+' mbt '+' '.join(tokens[1:])+'\n')
l_data_middlebondtorsion_coeffs = []
for line in l_data_endbondtorsion_coeffs:
tokens = line.strip().split()
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+tokens[0]+' ebt '+' '.join(tokens[1:])+'\n')
l_data_endbondtorsion_coeffs = []
for line in l_data_angletorsion_coeffs:
tokens = line.strip().split()
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+tokens[0]+' at '+' '.join(tokens[1:])+'\n')
l_data_angletorsion_coeffs = []
for line in l_data_angleangletorsion_coeffs:
tokens = line.strip().split()
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+tokens[0]+' aat '+' '.join(tokens[1:])+'\n')
l_data_angleangletorsion_coeffs = []
for line in l_data_bondbond13_coeffs:
tokens = line.strip().split()
l_in_dihedral_coeffs.append((' '*cindent)+' dihedral_coeff '+tokens[0]+' bb13 '+' '.join(tokens[1:])+'\n')
l_data_bondbond13_coeffs = []
if len(l_in_dihedral_coeffs) > 0:
l_in_dihedral_coeffs.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_dihedral_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_dihedral_coeffs))
non_empty_output = True
if (remove_coeffs_from_data_file and (len(l_data_improper_coeffs) > 0)):
for line in l_data_improper_coeffs:
l_in_improper_coeffs.append((' '*cindent)+' improper_coeff '+line.strip()+'\n')
l_data_improper_coeffs = []
for line in l_data_angleangle_coeffs:
tokens = line.strip().split()
l_in_improper_coeffs.append((' '*cindent)+' improper_coeff '+tokens[0]+' aa '+' '.join(tokens[1:])+'\n')
l_data_angleangle_coeffs = []
if len(l_in_improper_coeffs) > 0:
l_in_improper_coeffs.insert(0, (' '*cindent)+'write_once(\"'+in_settings+'\") {\n')
l_in_improper_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_improper_coeffs))
non_empty_output = True
if non_empty_output:
sys.stdout.write('\n\n### DATA sections\n\n')
if len(l_data_masses) > 0:
l_data_masses.insert(0, (' '*cindent)+'write_once(\"'+data_masses+'\") {\n')
l_data_masses.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_masses))
non_empty_output = True
if len(l_data_bond_coeffs) > 0:
l_data_bond_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_bond_coeffs+'\") {\n')
l_data_bond_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_bond_coeffs))
non_empty_output = True
if len(l_data_angle_coeffs) > 0:
l_data_angle_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_angle_coeffs+'\") {\n')
l_data_angle_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angle_coeffs))
non_empty_output = True
if len(l_data_dihedral_coeffs) > 0:
l_data_dihedral_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_dihedral_coeffs+'\") {\n')
l_data_dihedral_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_dihedral_coeffs))
non_empty_output = True
if len(l_data_improper_coeffs) > 0:
l_data_improper_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_improper_coeffs+'\") {\n')
l_data_improper_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_improper_coeffs))
non_empty_output = True
if len(l_data_pair_coeffs) > 0:
l_data_pair_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_pair_coeffs+'\") {\n')
l_data_pair_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_pair_coeffs))
non_empty_output = True
if len(l_data_pairij_coeffs) > 0:
l_data_pairij_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_pairij_coeffs+'\") {\n')
l_data_pairij_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_pairij_coeffs))
non_empty_output = True
# class2 force fields:
if len(l_data_bondbond_coeffs) > 0:
l_data_bondbond_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_bondbond_coeffs+'\") {\n')
l_data_bondbond_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_bondbond_coeffs))
non_empty_output = True
if len(l_data_bondangle_coeffs) > 0:
l_data_bondangle_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_bondangle_coeffs+'\") {\n')
l_data_bondangle_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_bondangle_coeffs))
non_empty_output = True
if len(l_data_middlebondtorsion_coeffs) > 0:
l_data_middlebondtorsion_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_middlebondtorsion_coeffs+'\") {\n')
l_data_middlebondtorsion_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_middlebondtorsion_coeffs))
non_empty_output = True
if len(l_data_endbondtorsion_coeffs) > 0:
l_data_endbondtorsion_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_endbondtorsion_coeffs+'\") {\n')
l_data_endbondtorsion_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_endbondtorsion_coeffs))
non_empty_output = True
if len(l_data_angletorsion_coeffs) > 0:
l_data_angletorsion_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_angletorsion_coeffs+'\") {\n')
l_data_angletorsion_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angletorsion_coeffs))
non_empty_output = True
if len(l_data_angleangletorsion_coeffs) > 0:
l_data_angleangletorsion_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_angleangletorsion_coeffs+'\") {\n')
l_data_angleangletorsion_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angleangletorsion_coeffs))
non_empty_output = True
if len(l_data_bondbond13_coeffs) > 0:
l_data_bondbond13_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_bondbond13_coeffs+'\") {\n')
l_data_bondbond13_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_bondbond13_coeffs))
non_empty_output = True
if len(l_data_angleangle_coeffs) > 0:
l_data_angleangle_coeffs.insert(0, (' '*cindent)+'write_once(\"'+data_angleangle_coeffs+'\") {\n')
l_data_angleangle_coeffs.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angleangle_coeffs))
non_empty_output = True
# automatic generation of bonded interactions by type:
if len(l_data_angles_by_type) > 0:
l_data_angles_by_type.insert(0, (' '*cindent)+'write_once(\"'+data_angles_by_type+'\") {\n')
l_data_angles_by_type.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angles_by_type))
non_empty_output = True
if len(l_data_dihedrals_by_type) > 0:
l_data_dihedrals_by_type.insert(0, (' '*cindent)+'write_once(\"'+data_dihedrals_by_type+'\") {\n')
l_data_dihedrals_by_type.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_dihedrals_by_type))
non_empty_output = True
if len(l_data_impropers_by_type) > 0:
l_data_impropers_by_type.insert(0, (' '*cindent)+'write_once(\"'+data_impropers_by_type+'\") {\n')
l_data_impropers_by_type.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_impropers_by_type))
non_empty_output = True
if len(l_data_atoms) > 0:
l_data_atoms.insert(0, (' '*cindent)+'write(\"'+data_atoms+'\") {\n')
l_data_atoms.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_atoms))
non_empty_output = True
else:
sys.stderr.write('Warning: missing \"Atoms\" section.\n'
' (Did you include a LAMMPS data file in your argument list?)\n')
no_warnings = False
# non-point-like particles
if len(l_data_ellipsoids) > 0:
l_data_ellipsoids.insert(0, (' '*cindent)+'write(\"'+data_ellipsoids+'\") {\n')
l_data_ellipsoids.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_ellipsoids))
if len(l_data_lines) > 0:
l_data_lines.insert(0, (' '*cindent)+'write(\"'+data_lines+'\") {\n')
l_data_lines.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_lines))
if len(l_data_triangles) > 0:
l_data_triangles.insert(0, (' '*cindent)+'write(\"'+data_triangles+'\") {\n')
l_data_triangles.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_triangles))
# DO NOT WRITE OUT VELOCITY DATA
# (Why: because it makes it difficult to combine this molecular template
# with molecule templates from other sources which lack velocity data.
# LAMMPS (and topotools) will crash if the number of entries in the
# Velocities section of a data file does not match the number of atoms.)
# COMMENTING OUT:
#if len(l_data_velocities) > 0:
# l_data_velocities.insert(0, (' '*cindent)+'write(\"'+data_velocities+'\") {\n')
# l_data_velocities.append((' '*cindent)+'}\n')
# sys.stdout.write('\n')
# sys.stdout.write(''.join(l_data_velocities))
if len(l_data_bonds) > 0:
l_data_bonds.insert(0, (' '*cindent)+'write(\"'+data_bonds+'\") {\n')
l_data_bonds.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_bonds))
non_empty_output = True
if len(l_data_angles) > 0:
l_data_angles.insert(0, (' '*cindent)+'write(\"'+data_angles+'\") {\n')
l_data_angles.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_angles))
non_empty_output = True
if len(l_data_dihedrals) > 0:
l_data_dihedrals.insert(0, (' '*cindent)+'write(\"'+data_dihedrals+'\") {\n')
l_data_dihedrals.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_dihedrals))
non_empty_output = True
if len(l_data_impropers) > 0:
l_data_impropers.insert(0, (' '*cindent)+'write(\"'+data_impropers+'\") {\n')
l_data_impropers.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_data_impropers))
non_empty_output = True
if len(l_in_group) > 0:
no_warnings = False
l_in_group.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_group.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_group))
#sys.stderr.write('######################################################\n'
# 'WARNING: One or more \"group\" commands appear to refer to relevant atoms.\n'
# ' Please check to make sure that the group(s) generated by\n'
# ' '+g_program_name+' contain the correct atoms. (-Andrew 2014-10-30)\n'
# '######################################################\n')
assert(non_empty_output)
if len(l_in_fix_rigid) > 0:
no_warnings = False
l_in_fix_rigid.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_fix_rigid.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_fix_rigid))
sys.stderr.write('WARNING: \"fix rigid\" style command(s) applied to selected atoms.\n'
' Please make sure that the fix group(s) are defined correctly.\n'
'######################################################\n')
assert(non_empty_output)
if len(l_in_fix_shake) > 0:
no_warnings = False
l_in_fix_shake.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_fix_shake.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_fix_shake))
sys.stderr.write('WARNING: \"fix shake\" style command(s) applied to selected atoms.\n'
' Please check to make sure that the fix group(s) are defined correctly,\n'
' and also check that the atom, bond, and angle types are correct.\n'
'######################################################\n')
assert(non_empty_output)
if len(l_in_fix_poems) > 0:
no_warnings = False
l_in_fix_poems.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_fix_poems.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_fix_poems))
sys.stderr.write('WARNING: \"fix poems\" style command(s) applied to selected atoms.\n'
' Please make sure that the fix group(s) are defined correctly.\n'
'######################################################\n')
assert(non_empty_output)
if len(l_in_fix_qeq) > 0:
no_warnings = False
l_in_fix_qeq.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_fix_qeq.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_fix_qeq))
sys.stderr.write('WARNING: \"fix qeq\" style command(s) applied to selected atoms.\n'
' Please make sure that the fix group(s) are defined correctly.\n'
'######################################################\n')
assert(non_empty_output)
if len(l_in_fix_qmmm) > 0:
no_warnings = False
l_in_fix_qmmm.insert(0, (' '*cindent)+'write(\"'+in_settings+'\") {\n')
l_in_fix_qmmm.append((' '*cindent)+'}\n')
sys.stdout.write('\n')
sys.stdout.write(''.join(l_in_fix_qmmm))
sys.stderr.write('WARNING: \"fix qmmm\" style command(s) applied to selected atoms.\n'
' Please make sure that the fix group(s) are defined correctly.\n'
'######################################################\n')
assert(non_empty_output)
if mol_name != '':
sys.stdout.write('\n} # end of \"'+mol_name+'\" type definition\n')
#if non_empty_output and no_warnings:
if non_empty_output:
sys.stderr.write('WARNING: The '+g_program_name+' script has not been rigorously tested.\n'
' Exotic (many-body) pair-styles and pair-styles with\n'
' unusual syntax (such hbond/dreiding) are not understood\n'
' by '+g_program_name+' (...although they are supported by moltemplate).\n'
' Please look over the resulting LT file and check for errors.\n'
' Convert any remaining atom, bond, angle, dihedral, or improper id\n'
' or type numbers to the corresponding $ or @-style counter variables.\n'
' Feel free to report any bugs you find. (-Andrew Jewett 2015-8-02)\n')
except (ValueError, InputError) as err:
sys.stderr.write('\n'+str(err)+'\n')
sys.exit(-1)
diff --git a/tools/moltemplate/src/moltemplate.sh b/tools/moltemplate/src/moltemplate.sh
index 2e04cb17e..d42202a86 100755
--- a/tools/moltemplate/src/moltemplate.sh
+++ b/tools/moltemplate/src/moltemplate.sh
@@ -1,2019 +1,2021 @@
#!/usr/bin/env bash
# (note: Classic Bourne shell (#!/bin/sh) also worked at some point.)
# Author: Andrew Jewett (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2012, Regents of the University of California
# All rights reserved.
G_PROGRAM_NAME="moltemplate.sh"
-G_VERSION="1.31"
-G_DATE="2015-8-02"
+G_VERSION="1.32"
+G_DATE="2015-8-17"
echo "${G_PROGRAM_NAME} v${G_VERSION} ${G_DATE}" >&2
echo "" >&2
# Check for python:
# I prefer python over python3 because python3 requires slightly
# more memory. Use regular python (ie 2.7) when available.
if which python > /dev/null; then
PYTHON_COMMAND='python'
elif which python3 > /dev/null; then
PYTHON_COMMAND='python3'
else
echo "Error: $G_PROGRAM_NAME requires python or python3" >&2
exit 1
fi
# First, determine the directory in which this shell script is located.
# (The python script files should also be located here as well.)
#SCRIPT_DIR=$(dirname $0)
SCRIPT_DIR=`dirname "$0"`
MSG_BAD_INSTALL=$(cat <<EOF
INSTALLATION ERROR:
Follow the instructions in the "Installation" chapter of the moltemplate manual.
(Note: You may need to log out and log in again before the changes take effect.)
EOF
)
ERR_BAD_INSTALL()
{
echo "$MSG_BAD_INSTALL" >&2
exit 1
}
ERR_INTERNAL()
{
echo " !!!!!! Possible internal error !!!!!!" >&2
echo "This could be a bug in moltemplate." >&2
echo "Please report this error." >&2
echo "(And please include the last few lines of moltemplate output preceeding this.)" >&2
echo " Thank you." >&2
exit 100
}
MOLTEMPLATE_FILES_NEEDED=$(cat <<EOF
ttree.py
lttree.py
lttree_check.py
lttree_postprocess.py
nbody_by_type.py
nbody_fix_ttree_assignments.py
nbody_reorder_atoms.py
pdbsort.py
postprocess_input_script.py
remove_duplicate_atoms.py
remove_duplicates_nbody.py
renumber_DATA_first_column.py
ttree_render.py
dump2data.py
raw2data.py
EOF
)
OIFS=$IFS
#IFS=$'\n'
IFS="
"
for f in $MOLTEMPLATE_FILES_NEEDED; do
if [ ! -s "${SCRIPT_DIR}/$f" ]; then
echo "Error: Missing file \"${SCRIPT_DIR}/$f\"" >&2
ERR_BAD_INSTALL
fi
done
IFS=$OIFS
IMOLPATH=""
if [ -n "${MOLTEMPLATE_PATH}" ]; then
IMOLPATH="-importpath \"${MOLTEMPLATE_PATH}\""
fi
# command that invokes lttree.py
LTTREE_COMMAND="$PYTHON_COMMAND \"${SCRIPT_DIR}/lttree.py\" ${IMOLPATH}"
# command that invokes lttree_check.py
LTTREE_CHECK_COMMAND="$PYTHON_COMMAND \"${SCRIPT_DIR}/lttree_check.py\" ${IMOLPATH}"
# command that invokes lttree_postprocess.py
LTTREE_POSTPROCESS_COMMAND="$PYTHON_COMMAND \"${SCRIPT_DIR}/lttree_postprocess.py\" ${IMOLPATH}"
# -----------------------------------------------------------
# If everything worked, then running ttree usually
# generates the following files:
#
# Users of lttree typically generate the following files:
# The variable below refer to file names generated by
# write() and write_once() commands in a lttree-file.
# (I keep changing my mind what I want these names to be.)
data_prefix="Data "
data_prefix_no_space="Data"
data_header="Data Header"
data_atoms="Data Atoms"
data_masses="Data Masses"
data_velocities="Data Velocities"
data_bonds="Data Bonds"
data_bond_list="Data Bond List"
data_angles="Data Angles"
data_dihedrals="Data Dihedrals"
data_impropers="Data Impropers"
data_bond_coeffs="Data Bond Coeffs"
data_angle_coeffs="Data Angle Coeffs"
data_dihedral_coeffs="Data Dihedral Coeffs"
data_improper_coeffs="Data Improper Coeffs"
data_pair_coeffs="Data Pair Coeffs"
data_pairij_coeffs="Data PairIJ Coeffs"
# interactions-by-type (not id. This is not part of the LAMMPS standard.)
data_bonds_by_type="Data Bonds By Type"
data_angles_by_type="Data Angles By Type"
data_dihedrals_by_type="Data Dihedrals By Type"
data_impropers_by_type="Data Impropers By Type"
# class2 data sections
data_bondbond_coeffs="Data BondBond Coeffs"
data_bondangle_coeffs="Data BondAngle Coeffs"
data_middlebondtorsion_coeffs="Data MiddleBondTorsion Coeffs"
data_endbondtorsion_coeffs="Data EndBondTorsion Coeffs"
data_angletorsion_coeffs="Data AngleTorsion Coeffs"
data_angleangletorsion_coeffs="Data AngleAngleTorsion Coeffs"
data_bondbond13_coeffs="Data BondBond13 Coeffs"
data_angleangle_coeffs="Data AngleAngle Coeffs"
# sections for non-point-like particles:
data_ellipsoids="Data Ellipsoids"
data_lines="Data Lines"
data_triangles="Data Triangles"
# periodic boundary conditions
data_boundary="Data Boundary"
# (for backward compatibility), an older version of this file was named:
data_pbc="Data PBC"
# ---------------------------------------------------------------
# Note: The files above are fragments of a LAMMPS data file.
# In addition, moltemplate will probably also generate the following files:
# (These files represent different sections of the LAMMPS input script.)
# ---------------------------------------------------------------
in_prefix="In "
in_prefix_no_space="In"
in_init="In Init"
in_settings="In Settings"
in_coords="In Coords"
# If present, the various "In " files contain commands which should be
# included by the user in their LAMMPS input script. (This task is left
# to the user.) However, the "Data " files are processed and pasted together
# automatically in order to build a LAMMPS data file.
# ---------------------------------------------------------------
tmp_atom_coords="tmp_atom_coords.dat" #<-temporary file for storing coordinates
MOLTEMPLATE_TEMP_FILES=$(cat <<EOF
*.template
ttree_assignments.txt
$tmp_atom_coords
$data_masses
$data_pair_coeffs
$data_pairij_coeffs
$data_bond_coeffs
$data_angle_coeffs
$data_dihedral_coeffs
$data_improper_coeffs
$data_atoms
$data_velocities
$data_bonds
$data_bond_list
$data_angles
$data_dihedrals
$data_impropers
$data_bondbond_coeffs
$data_bondangle_coeffs
$data_middlebondtorsion_coeffs
$data_endbondtorsion_coeffs
$data_angletorsion_coeffs
$data_angleangletorsion_coeffs
$data_bondbond13_coeffs
$data_angleangle_coeffs
$data_ellipsoids
$data_lines
$data_triangles
$data_boundary
$data_bonds_by_type
${data_angles_by_type}*
${data_dihedrals_by_type}*
${data_impropers_by_type}*
$in_init
$in_settings
EOF
)
OIFS=$IFS
#IFS=$'\n'
IFS="
"
for f in $MOLTEMPLATE_TEMP_FILES; do
#echo "removing [$f]"
rm -f "$f"
done
IFS=$OIFS
rm -rf output_ttree
SYNTAX_MSG=$(cat <<EOF
Syntax example:
Usage:
moltemplate.sh [-atomstyle style] \
[-pdb/-xyz coord_file] \
[-a assignments.txt] file.lt
Optional arguments:
-atomstyle style By default, moltemplate.sh assumes you are using the "full"
atom style in LAMMPS. You can change the atom style to "dipole"
using -atomstyle dipole. If you are using a hybrid style,
you must enclose the list of styles in quotes. For example:
-atomstyle "hybrid full dipole"
For custom atom styles, you can also specify the
list of column names manually (enclosed in quotes):
-atomstyle "molid x y z atomid atomtype mux muy muz"
-xyz xyz_file An optional xyz_file argument can be supplied as an argument
following "-xyz".
This file should contain the atomic coordinates in xyz format.
(The atoms must appear in the same order in the data file.)
-pdb pdb_file An optional pdb_file argument can be supplied as an argument
following "-pdb".
This should be a PDB file (with ATOM or HETATM records) with
the coordinates you wish to appear in the LAMMPS data file.
(The atoms must appear in the same order in the data file.)
If the PDB file contains periodic boundary box information
(ie., a "CRYST1" record), this information is also copied
to the LAMMPS data file.
(Support for triclinic cells is experimental as of 2012-2-13.
Other molecular structure formats may be supported later.)
-a "@atom:x 1"
-a assignments.txt
The user can customize the numbers assigned to atom, bond,
angle, dihedral, and improper types or id numbers by using
-a "VARIABLE_NAME VALUE"
for each variable you want to modify. If there are many
variables you want to modify, you can save them in a file
(one variable per line). For an example of the file format
run moltemplat.sh once and search for a file named
"ttree_assignments.txt". (This file is often located in
the "output_ttree/" directory.) Once assigned, the remaining
variables in the same category will be automatically assigned
to values which do not overlap with your chosen values.
-b assignments.txt
"-b" is similar to "-a". However, in this case, no attempt
is made to assign exclusive (unique) values to each variable.
-nocheck
Normally moltemplate.sh checks for common errors and typos and
halts if it thinks it has found one. This forces the variables
and categories as well as write(file) and write_once(file)
commands to obey standard naming conventions. The "-nocheck"
argument bypasses these checks and eliminates these restrictions.
-overlay-angles Normally, moltemplate.sh checks to see if multiple angle
-overlay-dihedrals interactions are defined for the same triplet of atoms.
-overlay-impropers If so, it deletes the redundant ones (keeping the last one).
-overlay-bonds (It does the same thing for bonds, dihedrals, and impropers.)
Use these options to prevent that behavoir.
EOF
)
# --- Periodic boundary box information (default) ---
# We will determine these numbers later.
TRICLINIC=""
BOXSIZE_MINX=0.0
BOXSIZE_MINY=0.0
BOXSIZE_MINZ=0.0
BOXSIZE_MAXX=""
BOXSIZE_MAXY=""
BOXSIZE_MAXZ=""
BOXSIZE_XY=0.0
BOXSIZE_XZ=0.0
BOXSIZE_YZ=0.0
if [ "$1" = "--help" ]; then
echo "$SYNTAX_MSG" >&2
exit 0
fi
# --- Did the user specify a file containing atomic coordinates?
rm -f "$tmp_atom_coords"
# Optional files containing atom coordinates:
PDB_FILE=""
XYZ_FILE=""
RAW_FILE=""
LT_FILE=""
OUT_FILE_BASE="system"
# REMOVE_DUPLICATE variables:
# ...If true (default), then any duplicate entries in the lists of bonds
# bonds, angles, dihedrals, or impropers in the LAMMPS DATA file
# are removed, giving priority to the most recent entry in the list.
# (This might not be necessary, but I want to be careful.)
REMOVE_DUPLICATE_BONDS="true"
REMOVE_DUPLICATE_ANGLES="true"
REMOVE_DUPLICATE_DIHEDRALS="true"
REMOVE_DUPLICATE_IMPROPERS="true"
RUN_VMD_AT_END=""
ARGC=0
for A in "$@"; do
A_FIRSTCHAR="$(echo $A| cut -c 1)"
# (Note to self: this next line only works in bash, not classic sh.)
if [ "$A_FIRSTCHAR" = "\$" ]; then
A="\\$A" # put an extra slash in front to prevent expansion later
fi
ARGC=$((ARGC+1))
eval ARGV${ARGC}=\"$A\"
done
TTREE_ARGS=""
ATOM_STYLE=""
ATOM_STYLE_ARG=""
i=0
while [ "$i" -lt "$ARGC" ]; do
i=$((i+1))
eval A=\${ARGV${i}}
if [ "$A" = "-nocheck" ]; then
# Disable syntax checking by undefining LTTREE_CHECK_COMMAND
unset LTTREE_CHECK_COMMAND
unset LTTREE_POSTPROCESS_COMMAND
elif [ "$A" = "-overlay-bonds" ]; then
# In that case, do not remove duplicate bond interactions
unset REMOVE_DUPLICATE_BONDS
elif [ "$A" = "-overlay-angles" ]; then
# In that case, do not remove duplicate angle interactions
unset REMOVE_DUPLICATE_ANGLES
elif [ "$A" = "-overlay-dihedrals" ]; then
# In that case, do not remove duplicate dihedral interactions
unset REMOVE_DUPLICATE_DIHEDRALS
elif [ "$A" = "-overlay-impropers" ]; then
# In that case, do not remove duplicate improper interactions
unset REMOVE_DUPLICATE_IMPROPERS
elif [ "$A" = "-vmd" ]; then
RUN_VMD_AT_END="true"
elif [ "$A" = "-raw" ]; then
if [ "$i" -eq "$ARGC" ]; then
echo "$SYNTAX_MSG" >&2
exit 7
fi
i=$((i+1))
eval A=\${ARGV${i}}
RAW_FILE=$A
if [ ! -s "$RAW_FILE" ]; then
echo "$SYNTAX_MSG" >&2
echo "-----------------------" >&2
echo "" >&2
echo "Error: Unable to open RAW-file \"$RAW_FILE\"." >&2
echo " (File is empty or does not exist.)" >&2
exit 8
fi
#echo " (extracting coordinates from \"$RAW_FILE\")" >&2
awk '{if (NF==3) {print $0}}' < "$RAW_FILE" > "$tmp_atom_coords"
elif [ "$A" = "-xyz" ]; then
if [ "$i" -eq "$ARGC" ]; then
echo "$SYNTAX_MSG" >&2
exit 7
fi
i=$((i+1))
eval A=\${ARGV${i}}
XYZ_FILE=$A
if [ ! -s "$XYZ_FILE" ]; then
echo "$SYNTAX_MSG" >&2
echo "-----------------------" >&2
echo "" >&2
echo "Error: Unable to open XYZ-file \"$XYZ_FILE\"." >&2
echo " (File is empty or does not exist.)" >&2
exit 8
fi
#echo " (extracting coordinates from \"$XYZ_FILE\")" >&2
# "isnum(x)" returns 1 or 0 depending upon whether or not
# a string is numeric.
#http://rosettacode.org/wiki/Determine_if_a_string_is_numeric#AWK
awk 'function isnum(x){return(x==x+0)} BEGIN{targetframe=1;framecount=0} {if (isnum($0)) {framecount++} else{if (framecount==targetframe){ if (NF>0) { if ((NF==3) && isnum($1)) {print $1" "$2" "$3} else if ((NF==4) && isnum($2)) {print $2" "$3" "$4} }}}}' < "$XYZ_FILE" > "$tmp_atom_coords"
elif [ "$A" = "-pdb" ]; then
if [ "$i" -eq "$ARGC" ]; then
echo "$SYNTAX_MSG" >&2
exit 9
fi
i=$((i+1))
eval A=\${ARGV${i}}
PDB_FILE=$A
if [ ! -s "$PDB_FILE" ]; then
echo "$SYNTAX_MSG" >&2
echo "-----------------------" >&2
echo "" >&2
echo "Error: Unable to open PDB-file \"$PDB_FILE\"." >&2
echo " (File is empty or does not exist.)" >&2
exit 10
fi
#echo " (extracting coordinates from \"$PDB_FILE\")" >&2
if grep -q '^ATOM \|^HETATM' "$PDB_FILE"; then
# Extract the coords from the "ATOM" records in the PDB file
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/pdbsort.py" < "$PDB_FILE" \
| awk '/^ATOM |^HETATM/{print substr($0,31,8)" "substr($0,39,8)" "substr($0,47,8)}' > "$tmp_atom_coords"; then
ERR_INTERNAL
fi
else
echo "$SYNTAX_MSG" >&2
echo "-----------------------" >&2
echo "" >&2
echo "Error: File \"$PDB_FILE\" is not a valid PDB file." >&2
exit 11
fi
# Now extract the periodic bounding-box informatio from the PDB file
# The CRYST1 records are described at:
# http://deposit.rcsb.org/adit/docs/pdb_atom_format.html
BOXSIZE_A=-1.0
BOXSIZE_B=-1.0
BOXSIZE_C=-1.0
ALPHA=" 90.00" #Note: The space before the number in " 90.00" is intentional.
BETA=" 90.00" # Later we will check to see if the system is triclinic
GAMMA=" 90.00" # by comparing these strings for equality with " 90.00"
if grep -qF "CRYST1" "$PDB_FILE"; then
BOXSIZE_A=`awk '/CRYST1/{print substr($0,8,8)}' < "$PDB_FILE"`
BOXSIZE_B=`awk '/CRYST1/{print substr($0,17,8)}' < "$PDB_FILE"`
BOXSIZE_C=`awk '/CRYST1/{print substr($0,26,8)}' < "$PDB_FILE"`
ALPHA=`awk '/CRYST1/{print substr($0,35,6)}' < "$PDB_FILE"`
BETA=`awk '/CRYST1/{print substr($0,42,6)}' < "$PDB_FILE"`
GAMMA=`awk '/CRYST1/{print substr($0,49,6)}' < "$PDB_FILE"`
fi
if [ `echo "$ALPHA!=90.0"|bc` -eq 1 ] || [ `echo "$BETA!=90.0"|bc` -eq 1 ] || [ `echo "$GAMMA!=90.0"|bc` -eq 1 ]; then
# I transform the parameters from one format to the other by inverting
# the transformation formula from the LAMMPS documentation (which matches
# http://www.ccl.net/cca/documents/molecular-modeling/node4.html)
# Disclaimer:
# As of September 2012, I have not tested the code below. I think the
# equations are correct, but I don't know if their are special cases
# that require the coordinates to be rotated or processed beforehand.
# This is an experimental feature.
TRICLINIC="True"
PI=3.1415926535897931
BOXSIZE_X=$BOXSIZE_A
BOXSIZE_Y=`awk "BEGIN{print $BOXSIZE_B*sin($GAMMA*$PI/180.0)}"`
BOXSIZE_XY=`awk "BEGIN{print $BOXSIZE_B*cos($GAMMA*$PI/180.0)}"`
BOXSIZE_XZ=`awk "BEGIN{print $BOXSIZE_C*cos($BETA*$PI/180.0)}"`
BOXSIZE_YZ=`awk "BEGIN{ca=cos($ALPHA*$PI/180.0); cb=cos($BETA*$PI/180.0); cg=cos($GAMMA*$PI/180.0); sg=sin($GAMMA*$PI/180.0); c=$BOXSIZE_C; print c*(ca-(cg*cb))/sg}"`
BOXSIZE_Z=`awk "BEGIN{print sqrt(($BOXSIZE_C**2)-(($BOXSIZE_XZ**2)+($BOXSIZE_YZ**2)))}"`
else
BOXSIZE_X=$BOXSIZE_A
BOXSIZE_Y=$BOXSIZE_B
BOXSIZE_Z=$BOXSIZE_C
BOXSIZE_XY=0.0
BOXSIZE_XZ=0.0
BOXSIZE_YZ=0.0
fi
BOXSIZE_MINX=0.0
BOXSIZE_MINY=0.0
BOXSIZE_MINZ=0.0
BOXSIZE_MAXX=$BOXSIZE_X
BOXSIZE_MAXY=$BOXSIZE_Y
BOXSIZE_MAXZ=$BOXSIZE_Z
elif [ "$A" = "-atomstyle" ] || [ "$A" = "-atom-style" ] || [ "$A" = "-atom_style" ]; then
if [ "$i" -eq "$ARGC" ]; then
echo "$SYNTAX_MSG" >&2
exit 7
fi
i=$((i+1))
eval A=\${ARGV${i}}
if [ -z "$A" ]; then
echo "$SYNTAX_MSG" >&2
echo "-----------------------" >&2
echo "" >&2
echo "Error: The \"-atomstyle\" argument should be followed by an atom style." >&2
echo " (See the \"atom_style\" command in the LAMMPS documentation.\n" >&2
echo " Note: hybrid atom styles are allowed but should be enclosed in quotes.)\n" >&2
exit 8
fi
#echo " (atom_style=\"$A\")" >&2
#echo "" >&2
ATOM_STYLE="$A"
ATOM_STYLE_ARG="-atomstyle \"$A\""
# (minor detail: $ATOM_STYLE_ARG should also be appended to TTREE_ARGS)
if [ -z "$TTREE_ARGS" ]; then
TTREE_ARGS="$ATOM_STYLE_ARG"
else
TTREE_ARGS="${TTREE_ARGS} $ATOM_STYLE_ARG"
fi
#else: If the arguments are not understood in this script, then
# pass them on to "lttree.py"
else
A_FIRSTCHAR="$(echo $A| cut -c 1)"
if [ "$A_FIRSTCHAR" = "\$" ]; then
A="\\$A" # put an extra slash in front to prevent expansion later
fi
if [ -z "$TTREE_ARGS" ]; then
TTREE_ARGS="\"$A\""
else
TTREE_ARGS="${TTREE_ARGS} \"$A\""
fi
# Check to see if this string ($A) ends in .lt or .LT
# If so, then set the base name of the output files
# to equal the base name of the .LT file being read.
# (Being careful here.
# Sometimes the last argument is not the .lt or .LT file.
# Sometimes that file appears earlier in the argument list.
# I want to supply a default value.)
#
# Note, in bash you can use:
# if [ "${LAST_ARG/%.lt/}" -neq "$LAST_ARG" ]; then
# OUT_FILE_BASE="${LAST_ARG/%.lt/}"
# But in the original bourn shell (sh), this does not work.
# Instead we use a hack involving basename and dirname:
if [ "$A_FIRSTCHAR" != "-" ]; then
DN=`dirname "$A"`
if [ "$DN" = "." ]; then
DN=""
else
DN="${DN}/"
fi
BN=`basename "$A" .lt`
if [ "${DN}${BN}" != "$A" ]; then
OUT_FILE_BASE="$BN"
else
BN=`basename "$A" .LT`
if [ "${DN}${BN}" != "$A" ]; then
OUT_FILE_BASE="$BN"
fi
fi
fi
fi
done
OUT_FILE_INPUT_SCRIPT="${OUT_FILE_BASE}.in"
OUT_FILE_INIT="${OUT_FILE_BASE}.in.init"
OUT_FILE_SETTINGS="${OUT_FILE_BASE}.in.settings"
OUT_FILE_DATA="${OUT_FILE_BASE}.data"
OUT_FILE_COORDS="${OUT_FILE_BASE}.in.coords"
rm -f "$OUT_FILE_INPUT_SCRIPT" "$OUT_FILE_INIT" "$OUT_FILE_SETTINGS" "$OUT_FILE_DATA" "$OUT_FILE_COORDS"
# --------------------------------------------------------------------
# --- Now run ttree/lttree to generate the file fragments we need. ---
# ------ (Afterwards, we will paste these fragments together.) -----
# --------------------------------------------------------------------
# If checking is not disabled, then first check for common spelling errors.
if [ -n "$LTTREE_CHECK_COMMAND" ]; then
if ! eval $LTTREE_CHECK_COMMAND $TTREE_ARGS; then
exit 1
fi
fi
# --- Run ttree. ---
#
# 3, 2, 1, ...
if ! eval $LTTREE_COMMAND $TTREE_ARGS; then
exit 2
fi
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# > Traceback (most recent call last):
# > File "./lttree.py", line...
# .-.
# (0.0)
# '=.|m|.='
# .='`"``=.
#
# Hopefully this does not happen.
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo "" >&2
# Attempt to remove any the DOS return-cairrage characters
# from inside the standard LAMMPS files generated by the user:
# (Users are free to put whatever weird characters they want in other
# (custom) auxilliary files. But not in the standard LAMMPS files.)
OIFS=$IFS
#IFS=$'\n'
IFS="
"
for file in $MOLTEMPLATE_TEMP_FILES; do
if [ -e "$file" ]; then
#dos2unix < "$file" > "$file.dos2unix"
tr -d '\r' < "$file" > "$file.dos2unix"
rm -f "$file" >/dev/null 2>&1 || true
mv -f "$file.dos2unix" "$file"
fi
done
IFS=$OIFS
if [ -s "${data_atoms}" ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicate_atoms.py" \
< "${data_atoms}" \
> "${data_atoms}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_atoms}.tmp" "${data_atoms}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicate_atoms.py" \
< "${data_atoms}.template" \
> "${data_atoms}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_atoms}.tmp" "${data_atoms}.template"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/renumber_DATA_first_column.py" \
< "${data_atoms}" \
> "${data_atoms}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_atoms}.tmp" "${data_atoms}"
else
echo "Error: There are no atoms in your system." >&2
echo "" >&2
echo " Make sure that the object(s) you created are indeed molecules." >&2
echo " (Molecule objects must contain at least one" >&2
echo " write(\"${data_atoms}\") command.)" >&2
echo "" >&2
echo " (This error often occurs if you instantiated an object" >&2
echo " which you thought was a molecule, but it is actually" >&2
echo " only a namespace, a force-field name or category" >&2
echo " containing the definitions of other molecules.)" >&2
echo "" >&2
exit 200
fi
# ---------------- Interactions By Type -----------------
# At the time of writing, bonded-interactions-by-atom-type were not
# understood by LAMMPS. These features require auxilliary python scripts.
# These data sections must be processed before everything else (because
# they effect the other data sections, and the ttree_assignments.txt file.)
# -------------------------------------------------------
if [ -s "${data_bond_list}.template" ]; then
if [ ! -s "$data_bonds_by_type" ]; then
echo "Error: You have a \"Data Bond List\", section somewhere\n"
echo " without a \"Data Bonds By Type\" section to support it.\n"
echo " (Did you mean to use \"Data Bonds\" instead?)\n"
echo "Details:"
echo " Unlike the \"Data Bonds\" section, the \"Data Bond List\" section\n"
echo " allows the user to omit the bond types. Instead moltemplate attempts\n"
echo " to infer the type of bond by considering the pair of atom types.\n"
echo " However you must define a \"Data Bonds By Type\" section\n"
echo " to make this feature work (or use \"Data Bonds\" instead).\n"
exit 15
fi
echo "Looking up bond types according to atom type" >&2
#-- Generate a file containing bondid bondtype atomid1 atomid2 --
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/bonds_by_type.py" \
-atoms "${data_atoms}.template" \
-bond-list "${data_bond_list}.template" \
-bondsbytype "${data_bonds_by_type}.template" \
-prefix '$/bond:bytype' > gen_bonds.template.tmp; then
exit 4
#WARNING: DO NOT REPLACE THIS WITH
#if ! $NBODY_COMMAND ...<-this sometimes causes a shell quotes-related error
fi
# ---- cleanup: ----
# ---- Create or re-build the "${data_bonds}.template" file ----
# Instert these lines into the "${data_bonds}.template" file which includes
# the newly generated interactions. (Note: these are in .template format)
cp gen_bonds.template.tmp new_bonds.template.tmp
if [ -s "${data_bonds}.template" ]; then
# Then append existing "Bonds" to the end of the generated interactions
# (Hopefully this way they will override those interactions.)
cat "${data_bonds}.template" >> new_bonds.template.tmp
fi
mv -f new_bonds.template.tmp "${data_bonds}.template"
# ------ THE NEXT STEP IS NOT CURRENTLY NEEDED ------
# All of the $bond variables have already been created, they just lack types
# However we will need to do this if the user wants to omits the bond-ids.
# In case I plan to allow the user to omit bond-ids, I leave this code here.
#
#echo "(Repairing ttree_assignments.txt file after bonds added.)" >&2
#
## ---- Repair the ttree_assignments.txt file ----
## The next 2 lines extract the variable names from data_new.template.tmp
## and instert them into the appropriate place in ttree_assignments.txt
## (renumbering the relevant variable-assignments to avoid clashes).
#if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_fix_ttree_assignments.py" \
# '/bond' gen_bonds.template.tmp \
# < ttree_assignments.txt \
# > ttree_assignments.tmp; then
# exit 5
#fi
#
#echo "(Rendering ttree_assignments.tmp file after bonds added.)" >&2
#mv -f ttree_assignments.tmp ttree_assignments.txt
# ----------------------------------------------------
# ---- Re-build (render) the "$data_bonds" file ----
# Now substitute these variable values (assignments) into the variable
# names present in the .template file. (We want to convert the file from
# a .template format into an ordinary (numeric) LAMMPS data-section format.)
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/ttree_render.py" \
ttree_assignments.txt \
< "${data_bonds}.template" \
> "$data_bonds"; then
exit 6
fi
echo "" >&2
rm -f gen_bonds.template.tmp new_bonds.template.tmp
fi
for FILE in "$data_angles_by_type"*.template; do
if [ ! -s "$FILE" ] || [ ! -s "$data_bonds" ]; then
break; # This handles with the special cases that occur when
# 1) There are no bonds in your system
# 2) "$data_angles_by_type"*.template matches nothing
fi
echo "Generating 3-body angle interactions by atom/bond type" >&2
# Extract the text between parenthesis (if present, empty-str otherwise)
# Example: FILE="Data Angles By Type (gaff_angle.py)"
SUBGRAPH_SCRIPT=`echo "$FILE" | awk '/\(.*\)/ {print $0}' | cut -d'(' -f2-| cut -d')' -f 1`
# Example: (continued) SUBGRAPH_SCRIPT should equal "gaff_angle.py"
if [ -z "$SUBGRAPH_SCRIPT" ]; then
SUBGRAPH_SCRIPT="nbody_Angles.py"
else
echo "(using the rules in \"$SUBGRAPH_SCRIPT\")" >&2
if [ ! -s "${SCRIPT_DIR}/nbody_alternate_symmetry/$SUBGRAPH_SCRIPT" ]; then
echo "Error: File \"$SUBGRAPH_SCRIPT\" not found.\n" >&2
echo " It should be located in this directory:\n" >&2
echo " ${SCRIPT_DIR}/nbody_alternate_symmetry/\n" >&2
exit 4
fi
fi
#-- Generate a file containing the list of interactions on separate lines --
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_by_type.py" \
-subgraph "${SUBGRAPH_SCRIPT}" \
-section "Angles" \
-sectionbytype "Angles By Type" \
-atoms "${data_atoms}.template" \
-bonds "${data_bonds}.template" \
-nbodybytype "${FILE}" \
-prefix '$/angle:bytype' > gen_angles.template.tmp; then
exit 4
#WARNING: DO NOT REPLACE THIS WITH
#if ! $NBODY_COMMAND ...<-this sometimes causes a shell quotes-related error
fi
# ---- cleanup: ----
# ---- Re-build the "${data_angles}.template" file ----
# Instert these lines into the "${data_angles}.template" file which includes
# the newly generated interactions. (Note: these are in .template format)
cp gen_angles.template.tmp new_angles.template.tmp
if [ -s "${data_angles}.template" ]; then
# Then append existing "Angles" to the end of the generated interactions
# (Hopefully this way they will override those interactions.)
cat "${data_angles}.template" >> new_angles.template.tmp
fi
mv -f new_angles.template.tmp "${data_angles}.template"
echo "(Repairing ttree_assignments.txt file after angles added.)" >&2
# ---- Repair the ttree_assignments.txt file ----
# The next 2 lines extract the variable names from data_new.template.tmp
# and instert them into the appropriate place in ttree_assignments.txt
# (renumbering the relevant variable-assignments to avoid clashes).
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_fix_ttree_assignments.py" \
'/angle' gen_angles.template.tmp \
< ttree_assignments.txt \
> ttree_assignments.tmp; then
exit 5
fi
echo "(Rendering ttree_assignments.tmp file after angles added.)" >&2
# ---- Re-build (render) the "$data_angles" file ----
# Now substitute these variable values (assignments) into the variable
# names present in the .template file. (We want to convert the file from
# a .template format into an ordinary (numeric) LAMMPS data-section format.)
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/ttree_render.py" \
ttree_assignments.tmp \
< "${data_angles}.template" \
> "$data_angles"; then
exit 6
fi
echo "" >&2
mv -f ttree_assignments.tmp ttree_assignments.txt
rm -f gen_angles.template.tmp new_angles.template.tmp
done
FILE_dihedrals_by_type1=""
FILE_dihedrals_by_type2=""
for FILE in "$data_dihedrals_by_type"*.template; do
if [ ! -s "$FILE" ] || [ ! -s "$data_bonds" ]; then
break; # This handles with the special cases that occur when
# 1) There are no bonds in your system
# 2) "$data_dihedrals_by_type"*.template matches nothing
fi
echo "Generating 4-body dihedral interactions by atom/bond type" >&2
# Extract the text between parenthesis (if present, empty-str otherwise)
# Example: FILE="Data Dihedrals By Type (gaff_dih.py)"
SUBGRAPH_SCRIPT=`echo "$FILE" | awk '/\(.*\)/ {print $0}' | cut -d'(' -f2-| cut -d')' -f 1`
# Example: (continued) SUBGRAPH_SCRIPT should equal "gaff_dih.py"
if [ -z "$SUBGRAPH_SCRIPT" ]; then
SUBGRAPH_SCRIPT="nbody_Dihedrals.py"
else
echo "(using the rules in \"$SUBGRAPH_SCRIPT\")" >&2
if [ ! -s "${SCRIPT_DIR}/nbody_alternate_symmetry/$SUBGRAPH_SCRIPT" ]; then
echo "Error: File \"$SUBGRAPH_SCRIPT\" not found.\n" >&2
echo " It should be located in this directory:\n" >&2
echo " ${SCRIPT_DIR}/nbody_alternate_symmetry/\n" >&2
exit 4
fi
fi
FILE_dihedrals_by_type2="$FILE_impropers_by_type1"
FILE_dihedrals_by_type1="$FILE"
#-- Generate a file containing the list of interactions on separate lines --
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_by_type.py" \
-subgraph "${SUBGRAPH_SCRIPT}" \
-section "Dihedrals" \
-sectionbytype "Dihedrals By Type" \
-atoms "${data_atoms}.template" \
-bonds "${data_bonds}.template" \
-nbodybytype "${FILE}" \
-prefix '$/dihedral:bytype' > gen_dihedrals.template.tmp; then
exit 4
#WARNING: DO NOT REPLACE THIS WITH
#if ! $NBODY_COMMAND ...<-this sometimes causes a shell quotes-related error
fi
# ---- cleanup: ----
# ---- Re-build the "${data_dihedrals}.template" file ----
# Instert these lines into the "${data_dihedrals}.template" file which includes
# the newly generated interactions. (Note: these are in .template format)
cp gen_dihedrals.template.tmp new_dihedrals.template.tmp
if [ -s "${data_dihedrals}.template" ]; then
# Then append existing "Dihedrals" to the end of the generated interactions
# (Hopefully this way they will override those interactions.)
cat "${data_dihedrals}.template" >> new_dihedrals.template.tmp
fi
mv -f new_dihedrals.template.tmp "${data_dihedrals}.template"
echo "(Repairing ttree_assignments.txt file after dihedrals added.)" >&2
# ---- Repair the ttree_assignments.txt file ----
# The next 2 lines extract the variable names from data_new.template.tmp
# and instert them into the appropriate place in ttree_assignments.txt
# (renumbering the relevant variable-assignments to avoid clashes).
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_fix_ttree_assignments.py" \
'/dihedral' gen_dihedrals.template.tmp \
< ttree_assignments.txt \
> ttree_assignments.tmp; then
exit 5
fi
echo "(Rendering ttree_assignments.tmp file after dihedrals added.)" >&2
# ---- Re-build (render) the "$data_dihedrals" file ----
# Now substitute these variable values (assignments) into the variable
# names present in the .template file. (We want to convert the file from
# a .template format into an ordinary (numeric) LAMMPS data-section format.)
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/ttree_render.py" \
ttree_assignments.tmp \
< "${data_dihedrals}.template" \
> "$data_dihedrals"; then
exit 6
fi
echo "" >&2
mv -f ttree_assignments.tmp ttree_assignments.txt
rm -f gen_dihedrals.template.tmp new_dihedrals.template.tmp
done
FILE_impropers_by_type1=""
FILE_impropers_by_type2=""
for FILE in "$data_impropers_by_type"*.template; do
if [ ! -s "$FILE" ] || [ ! -s "$data_bonds" ]; then
break; # This handles with the special cases that occur when
# 1) There are no bonds in your system
# 2) "$data_impropers_by_type"*.template matches nothing
fi
echo "Generating 4-body improper interactions by atom/bond type" >&2
# Extract the text between parenthesis (if present, empty-str otherwise)
# Example: FILE="Data Impropers By Type (gaff_impr.py)"
SUBGRAPH_SCRIPT=`echo "$FILE" | awk '/\(.*\)/ {print $0}' | cut -d'(' -f2-| cut -d')' -f 1`
# Example: (continued) SUBGRAPH_SCRIPT should equal "gaff_impr.py"
if [ -z "$SUBGRAPH_SCRIPT" ]; then
SUBGRAPH_SCRIPT="nbody_Impropers.py"
else
echo "(using the rules in \"$SUBGRAPH_SCRIPT\")" >&2
if [ ! -s "${SCRIPT_DIR}/nbody_alternate_symmetry/$SUBGRAPH_SCRIPT" ]; then
echo "Error: File \"$SUBGRAPH_SCRIPT\" not found.\n" >&2
echo " It should be located in this directory:\n" >&2
echo " ${SCRIPT_DIR}/nbody_alternate_symmetry/\n" >&2
exit 4
fi
fi
FILE_impropers_by_type2="$FILE_impropers_by_type1"
FILE_impropers_by_type1="$FILE"
#-- Generate a file containing the list of interactions on separate lines --
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_by_type.py" \
-subgraph "${SUBGRAPH_SCRIPT}" \
-section "Impropers" \
-sectionbytype "Impropers By Type" \
-atoms "${data_atoms}.template" \
-bonds "${data_bonds}.template" \
-nbodybytype "${FILE}" \
-prefix '$/improper:bytype' > gen_impropers.template.tmp; then
exit 4
#WARNING: DO NOT REPLACE THIS WITH
#if ! $NBODY_COMMAND ...<-this sometimes causes a shell quotes-related error
fi
# ---- cleanup: ----
# ---- Re-build the "${data_impropers}.template" file ----
# Instert these lines into the "${data_impropers}.template" file which includes
# the newly generated interactions. (Note: these are in .template format)
cp gen_impropers.template.tmp new_impropers.template.tmp
if [ -s "${data_impropers}.template" ]; then
# Then append existing "Impropers" to the end of the generated interactions
# (Hopefully this way they will override those interactions.)
cat "${data_impropers}.template" >> new_impropers.template.tmp
fi
mv -f new_impropers.template.tmp "${data_impropers}.template"
echo "(Repairing ttree_assignments.txt file after impropers added.)" >&2
# ---- Repair the ttree_assignments.txt file ----
# The next 2 lines extract the variable names from data_new.template.tmp
# and instert them into the appropriate place in ttree_assignments.txt
# (renumbering the relevant variable-assignments to avoid clashes).
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_fix_ttree_assignments.py" \
'/improper' gen_impropers.template.tmp \
< ttree_assignments.txt \
> ttree_assignments.tmp; then
exit 5
fi
echo "(Rendering ttree_assignments.tmp file after impropers added.)" >&2
# ---- Re-build (render) the "$data_impropers" file ----
# Now substitute these variable values (assignments) into the variable
# names present in the .template file. (We want to convert the file from
# a .template format into an ordinary (numeric) LAMMPS data-section format.)
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/ttree_render.py" \
ttree_assignments.tmp \
< "${data_impropers}.template" \
> "$data_impropers"; then
exit 6
fi
echo "" >&2
mv -f ttree_assignments.tmp ttree_assignments.txt
rm -f gen_impropers.template.tmp new_impropers.template.tmp
done
if [ -n "$LTTREE_POSTPROCESS_COMMAND" ]; then
echo "" >&2
if ! eval $LTTREE_POSTPROCESS_COMMAND $TTREE_ARGS; then
exit 3
fi
echo "" >&2
fi
# -------------------------------------------------------
# If present, then remove duplicate bonds, angles, dihedrals, and impropers
# (unless overridden by the user).
# -------------------------------------------------------
if [ -s "${data_masses}" ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicate_atoms.py" \
< "${data_masses}" \
> "${data_masses}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_masses}.tmp" "${data_masses}"
fi
if [ -s "${data_bonds}" ]; then
if [ ! -z $REMOVE_DUPLICATE_BONDS ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_reorder_atoms.py" \
Bonds \
nbody_Bonds.py \
< "${data_bonds}" \
> "${data_bonds}.tmp"; then
ERR_INTERNAL
fi
cp -f "${data_bonds}.tmp" "${data_bonds}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 2 \
< "${data_bonds}" \
> "${data_bonds}.tmp"; then
ERR_INTERNAL
fi
mv "${data_bonds}.tmp" "${data_bonds}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 2 \
< "${data_bonds}.template" \
> "${data_bonds}.tmp"; then
ERR_INTERNAL
fi
mv "${data_bonds}.tmp" "${data_bonds}.template"
fi
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/renumber_DATA_first_column.py" \
< "${data_bonds}" \
> "${data_bonds}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_bonds}.tmp" "${data_bonds}"
fi
if [ -s "${data_angles}" ]; then
if [ ! -z $REMOVE_DUPLICATE_ANGLES ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_reorder_atoms.py" \
Angles \
nbody_Angles.py \
< "${data_angles}" \
> "${data_angles}.tmp"; then
ERR_INTERNAL
fi
cp -f "${data_angles}.tmp" "${data_angles}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 3 \
< "${data_angles}" \
> "${data_angles}.tmp"; then
ERR_INTERNAL
fi
mv "${data_angles}.tmp" "${data_angles}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 3 \
< "${data_angles}.template" \
> "${data_angles}.tmp"; then
ERR_INTERNAL
fi
mv "${data_angles}.tmp" "${data_angles}".template
fi
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/renumber_DATA_first_column.py" \
< "${data_angles}" \
> "${data_angles}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_angles}.tmp" "${data_angles}"
fi
if [ -s "${data_dihedrals}" ]; then
if [ ! -z $REMOVE_DUPLICATE_DIHEDRALS ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_reorder_atoms.py" \
Dihedrals \
nbody_Dihedrals.py \
< "${data_dihedrals}" \
> "${data_dihedrals}.tmp"; then
ERR_INTERNAL
fi
cp -f "${data_dihedrals}.tmp" "${data_dihedrals}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 4 \
< "${data_dihedrals}" \
> "${data_dihedrals}.tmp"; then
ERR_INTERNAL
fi
mv "${data_dihedrals}.tmp" "${data_dihedrals}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 4 \
< "${data_dihedrals}.template" \
> "${data_dihedrals}.tmp"; then
ERR_INTERNAL
fi
mv "${data_dihedrals}.tmp" "${data_dihedrals}.template"
fi
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/renumber_DATA_first_column.py" \
< "${data_dihedrals}" \
> "${data_dihedrals}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_dihedrals}.tmp" "${data_dihedrals}"
if [ ! -z $FILE_dihedrals_by_type2 ]; then
MSG_MULTIPLE_DIHEDRAL_RULES=$(cat <<EOF
#############################################################################
WARNING:
It appears as though multiple conflicting rules were used to generate
DIHEDRAL interactions. (This can occur when combining molecules built with
different force-field rules). In your case, you are using rules defined here:
"$FILE_dihedrals_by_type2"
"$FILE_dihedrals_by_type1"
(Files ending in .py are located here:
$SCRIPT_DIR/nbody_alternate_symmetry/)
If the molecules built using these two different force-field settings are not
connected, AND if you do NOT override force-field dihedrals with explicitly
defined dihedrals, then you can probably ignore this warning message. Otherwise
please check the list of dihedral interactions to make sure they are correct!
(It might help to build a much smaller system using the same molecule types.)
#############################################################################
EOF
)
echo "$MSG_MULTIPLE_DIHEDRAL_RULES" >&2
fi
fi
if [ -s "${data_impropers}" ]; then
if [ ! -z $REMOVE_DUPLICATE_IMPROPERS ]; then
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/nbody_reorder_atoms.py" \
Impropers \
nbody_Impropers.py \
< "${data_impropers}" \
> "${data_impropers}.tmp"; then
ERR_INTERNAL
fi
cp -f "${data_impropers}.tmp" "${data_impropers}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 4 \
< "${data_impropers}" \
> "${data_impropers}.tmp"; then
ERR_INTERNAL
fi
mv "${data_impropers}.tmp" "${data_impropers}"
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/remove_duplicates_nbody.py" 4 \
< "${data_impropers}.template" \
> "${data_impropers}.tmp"; then
ERR_INTERNAL
fi
mv "${data_impropers}.tmp" "${data_impropers}.template"
fi
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/renumber_DATA_first_column.py" \
< "${data_impropers}" \
> "${data_impropers}.tmp"; then
ERR_INTERNAL
fi
mv -f "${data_impropers}.tmp" "${data_impropers}"
if [ ! -z $FILE_impropers_by_type2 ]; then
MSG_MULTIPLE_IMPROPER_RULES=$(cat <<EOF
#############################################################################
WARNING:
It appears as though multiple conflicting rules were used to generate
IMPROPER interactions. (This can occur when combining molecules built with
different force-field rules.) In your case, you are using rules defined here:
"$FILE_impropers_by_type2"
"$FILE_impropers_by_type1"
(Files ending in .py are located here:
$SCRIPT_DIR/nbody_alternate_symmetry/)
If the molecules built using these two different force-field settings are not
connected, AND if you do NOT override force-field imrpopers with explicitly
defined impropers, then you can probably ignore this warning message. Otherwise
please check the list of improper interactions to make sure they are correct!
(It might help to build a much smaller system using the same molecule types.)
#############################################################################
EOF
)
echo "$MSG_MULTIPLE_IMPROPER_RULES" >&2
fi
fi
# -------------------------------------------------------
NATOMTYPES=`awk '/^@\/atom:/{n++}END{print n}' < ttree_assignments.txt`
NBONDTYPES=`awk '/^@\/bond:/{n++}END{print n}' < ttree_assignments.txt`
NANGLETYPES=`awk '/^@\/angle:/{n++}END{print n}' < ttree_assignments.txt`
NDIHEDRALTYPES=`awk '/^@\/dihedral:/{n++}END{print n}' < ttree_assignments.txt`
NIMPROPERTYPES=`awk '/^@\/improper:/{n++}END{print n}' < ttree_assignments.txt`
#NATOMS=`awk '/^\$\/atom:/{n++}END{print n}' < ttree_assignments.txt`
#NBONDS=`awk '/^\$\/bond:/{n++}END{print n}' < ttree_assignments.txt`
#NANGLES=`awk '/^\$\/angle:/{n++}END{print n}' < ttree_assignments.txt`
#NDIHEDRALS=`awk '/^\$\/dihedral:/{n++}END{print n}' < ttree_assignments.txt`
#NIMPROPERS=`awk '/^\$\/improper:/{n++}END{print n}' < ttree_assignments.txt`
NATOMS="0"
NBONDS="0"
NANGLES="0"
NDIHEDRALS="0"
NIMPROPERS="0"
if [ -s "${data_atoms}" ]; then
NATOMS=`awk 'END{print NR}' < "${data_atoms}"`
fi
if [ -s "${data_bonds}" ]; then
NBONDS=`awk 'END{print NR}' < "${data_bonds}"`
fi
if [ -s "${data_angles}" ]; then
NANGLES=`awk 'END{print NR}' < "${data_angles}"`
fi
if [ -s "${data_dihedrals}" ]; then
NDIHEDRALS=`awk 'END{print NR}' < "${data_dihedrals}"`
fi
if [ -s "${data_impropers}" ]; then
NIMPROPERS=`awk 'END{print NR}' < "${data_impropers}"`
fi
rm -f "$OUT_FILE_DATA"
echo "LAMMPS Description" > "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
echo " $NATOMS atoms" >> "$OUT_FILE_DATA"
if [ -n "$NBONDS" ]; then
echo " $NBONDS bonds" >> "$OUT_FILE_DATA"
fi
if [ -n "$NANGLES" ]; then
echo " $NANGLES angles" >> "$OUT_FILE_DATA"
fi
if [ -n "$NDIHEDRALS" ]; then
echo " $NDIHEDRALS dihedrals" >> "$OUT_FILE_DATA"
fi
if [ -n "$NIMPROPERS" ]; then
echo " $NIMPROPERS impropers" >> "$OUT_FILE_DATA"
fi
echo "" >> "$OUT_FILE_DATA"
echo " $NATOMTYPES atom types" >> "$OUT_FILE_DATA"
if [ -n "$NBONDTYPES" ]; then
echo " $NBONDTYPES bond types" >> "$OUT_FILE_DATA"
fi
if [ -n "$NANGLETYPES" ]; then
echo " $NANGLETYPES angle types" >> "$OUT_FILE_DATA"
fi
if [ -n "$NDIHEDRALTYPES" ]; then
echo " $NDIHEDRALTYPES dihedral types" >> "$OUT_FILE_DATA"
fi
if [ -n "$NIMPROPERTYPES" ]; then
echo " $NIMPROPERTYPES improper types" >> "$OUT_FILE_DATA"
fi
echo "" >> "$OUT_FILE_DATA"
# --- PERIODIC BOUNDARY CONDITIONS ---
# Note: If there is a "$data_boundary" file present, it overrides any settings
# which may have been stored in a pdb file or other external file.
if [ -s "$data_pbc" ] && [ ! -s "$data_boundary" ]; then
mv -f "$data_pbc" "$data_boundary"
echo "WARNING: write_once(\"$data_pbc\") is depreciated" >&2
echo " Use write_once(\"$data_boundary\") instead" >&2
fi
if [ -s "$data_boundary" ]; then
# Copy the boundary conditions from the "$data_boundary" file.
# Don't assume there is only one line containing "xlo xhi", for example.
# It's possible the user wrote the boundary conditions multiple times.
# As always, the most recent setting overrides the earlier settings.
BOXSIZE_MINX=`tr -d '\015' < "$data_boundary" | awk '{if ($3=="xlo") {xlo=$1}} END{print xlo}'`
BOXSIZE_MAXX=`tr -d '\015' < "$data_boundary" | awk '{if ($4=="xhi") {xhi=$2}} END{print xhi}'`
BOXSIZE_MINY=`tr -d '\015' < "$data_boundary" | awk '{if ($3=="ylo") {ylo=$1}} END{print ylo}'`
BOXSIZE_MAXY=`tr -d '\015' < "$data_boundary" | awk '{if ($4=="yhi") {yhi=$2}} END{print yhi}'`
BOXSIZE_MINZ=`tr -d '\015' < "$data_boundary" | awk '{if ($3=="zlo") {zlo=$1}} END{print zlo}'`
BOXSIZE_MAXZ=`tr -d '\015' < "$data_boundary" | awk '{if ($4=="zhi") {zhi=$2}} END{print zhi}'`
if [ -z "$BOXSIZE_MINX" ] || [ -z "$BOXSIZE_MAXX" ]; then
echo "Error: Problem with box boundary format (\"xlo xhi\") in \"$data_boundary\"" >&2
exit 12
fi
if [ -z "$BOXSIZE_MINY" ] || [ -z "$BOXSIZE_MAXY" ]; then
echo "Error: Problem with box boundary format (\"ylo yhi\") in \"$data_boundary\"" >&2
exit 12
fi
if [ -z "$BOXSIZE_MINZ" ] || [ -z "$BOXSIZE_MAXZ" ]; then
echo "Error: Problem with box boundary format (\"zlo zhi\") in \"$data_boundary\"" >&2
exit 12
fi
BOXSIZE_XY=`awk '{if ($4=="xy") {xy=$1}} END{print xy}' < "$data_boundary"`
BOXSIZE_XZ=`awk '{if ($5=="xz") {xz=$2}} END{print xz}' < "$data_boundary"`
BOXSIZE_YZ=`awk '{if ($6=="yz") {yz=$3}} END{print yz}' < "$data_boundary"`
if [ -n "$BOXSIZE_XY" ] || [ -n "$BOXSIZE_XZ" ] || [ -n "$BOXSIZE_YZ" ]; then
if [ -n "$BOXSIZE_XY" ] && [ -n "$BOXSIZE_XZ" ] && [ -n "$BOXSIZE_YZ" ]; then
#echo "triclinic_parameters: XY XZ YZ = $BOXSIZE_XY $BOXSIZE_XZ $BOXSIZE_YZ" >&2
TRICLINIC="True"
else
echo "Error: Problem with triclinic format (\"xy xz yz\") in \"$data_boundary\"" >&2
exit 13
fi
fi
fi
if [ -z "$BOXSIZE_MINX" ] || [ -z "$BOXSIZE_MAXX" ] || [ -z "$BOXSIZE_MINY" ] || [ -z "$BOXSIZE_MAXY" ] || [ -z "$BOXSIZE_MINZ" ] || [ -z "$BOXSIZE_MAXZ" ]; then
echo "Periodic boundary conditions unspecified. Attempting to generate automatically." >&2
# By default, disable triclinic
BOXSIZE_XY=""
BOXSIZE_XZ=""
BOXSIZE_YZ=""
TRICLINIC=""
if [ -s "$tmp_atom_coords" ]; then
# Estimate the minimimum, maximum x,y,z values
# from the coordinate data.
MINMAX_BOUNDS=`awk 'BEGIN{first=1}{if (NF>=3){x=$1; y=$2; z=$3; if (first) {first=0; xmin=x; xmax=x; ymin=y; ymax=y; zmin=z; zmax=z;} else {if (x<xmin) xmin=x; if (x>xmax) xmax=x; if (y<ymin) ymin=y; if (y>ymax) ymax=y; if (z<zmin) zmin=z; if (z>zmax) zmax=z;}}} END{print xmin" "xmax" "ymin" "ymax" "zmin" "zmax;}' < "$tmp_atom_coords"`
# ...and add a narrow margin (10%) around the boundaries:
BOXSIZE_MINX=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$2-$1; print $1-0.5*margin*width}"`
BOXSIZE_MAXX=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$2-$1; print $2+0.5*margin*width}"`
BOXSIZE_MINY=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$4-$3; print $3-0.5*margin*width}"`
BOXSIZE_MAXY=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$4-$3; print $4+0.5*margin*width}"`
BOXSIZE_MINZ=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$6-$5; print $5-0.5*margin*width}"`
BOXSIZE_MAXZ=`echo $MINMAX_BOUNDS | awk "{margin=0.1; width=$6-$5; print $6+0.5*margin*width}"`
else
# By default, choose some reasonably large box:
BOXSIZE_MINX="-100.0"
BOXSIZE_MAXX="100.0"
BOXSIZE_MINY="-100.0"
BOXSIZE_MAXY="100.0"
BOXSIZE_MINZ="-100.0"
BOXSIZE_MAXZ="100.0"
# ...and print message scolding the user for being lazy
echo "----------------------------------------------------------------------" >&2
echo "---- WARNING: Unable to determine periodic boundary conditions. ----" >&2
echo "---- (A default cube of volume=(200.0)^3 was used. ----" >&2
echo "---- This is probably not what you want!) ----" >&2
echo "---- It is recommended that you specify your periodic boundary ----" >&2
echo "---- by adding a write_once(\"Boundary\") command to your .lt file. ----" >&2
echo "---- For example: ----" >&2
#echo "----------------------------------------------------------------------" >&2
echo "---- ----" >&2
echo "---- write_once(\"Boundary\") { ----" >&2
echo "---- 2.51 46.79 xlo xhi ----" >&2
echo "---- -4.38 35.824 ylo yhi ----" >&2
echo "---- 0.3601 42.95 zlo zhi ----" >&2
echo "---- } ----" >&2
echo "----------------------------------------------------------------------" >&2
fi
fi
if [ -z "$TRICLINIC" ]; then
echo " $BOXSIZE_MINX $BOXSIZE_MAXX xlo xhi" >> "$OUT_FILE_DATA"
echo " $BOXSIZE_MINY $BOXSIZE_MAXY ylo yhi" >> "$OUT_FILE_DATA"
echo " $BOXSIZE_MINZ $BOXSIZE_MAXZ zlo zhi" >> "$OUT_FILE_DATA"
else
echo "triclinic parameters: XY XZ YZ = $BOXSIZE_XY $BOXSIZE_XZ $BOXSIZE_YZ" >&2
echo "" >&2
# Otherwise, this is a triclinic (non orthoganal) crystal basis.
# LAMMPS represents triclinic symmetry using a different set of parameters
# (lx,ly,lz,xy,xz,yz) than the PDB file format (alpha,beta,gamma).
echo " $BOXSIZE_MINX $BOXSIZE_MAXX xlo xhi" >> "$OUT_FILE_DATA"
echo " $BOXSIZE_MINY $BOXSIZE_MAXY ylo yhi" >> "$OUT_FILE_DATA"
echo " $BOXSIZE_MINZ $BOXSIZE_MAXZ zlo zhi" >> "$OUT_FILE_DATA"
#echo " 0.000000 $BOXSIZE_X xlo xhi" >> "$OUT_FILE_DATA"
#echo " 0.000000 $BOXSIZE_Y ylo yhi" >> "$OUT_FILE_DATA"
#echo " 0.000000 $BOXSIZE_Z zlo zhi" >> "$OUT_FILE_DATA"
echo " $BOXSIZE_XY $BOXSIZE_XZ $BOXSIZE_YZ xy xz yz" >> "$OUT_FILE_DATA"
#echo "a,b,c,alpha,beta,gamma = $BOXSIZE_A,$BOXSIZE_B,$BOXSIZE_C,$ALPHA,$BETA,$GAMMA"
fi
echo "" >> "$OUT_FILE_DATA"
if [ -s "$data_header" ]; then
cat "$data_header" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_masses" ]; then
echo "Masses" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_masses" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
echo "WARNING: missing file \"$data_masses\"" >&2
fi
if [ -s "$data_pair_coeffs" ]; then
echo "Pair Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_pair_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
PAIR_COEFFS_IN_DATA="true"
fi
if [ -s "$data_pairij_coeffs" ]; then
echo "PairIJ Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_pairij_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
PAIR_COEFFS_IN_DATA="true"
fi
if [ -n "$PAIR_COEFFS_IN_DATA" ]; then
if [ ! -s "$in_settings" ] || (! grep -q pair_coeff "$in_settings"); then
echo "WARNING: no pair coeffs have been set!" >&2
fi
fi
if [ -s "$data_bond_coeffs" ]; then
echo "Bond Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_bond_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
if [ -n "$NBONDTYPES" ] && ( [ ! -s "$in_settings" ] || (! grep -q bond_coeff "$in_settings") ); then
echo "WARNING: no bond coeff have been set!" >&2
fi
fi
if [ -s "$data_angle_coeffs" ]; then
echo "Angle Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_angle_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
if [ -n "$NANGLETYPES" ] && ( [ ! -s "$in_settings" ] || (! grep -q angle_coeff "$in_settings") ); then
echo "WARNING: no angle coeffs have been set!" >&2
fi
fi
if [ -s "$data_dihedral_coeffs" ]; then
echo "Dihedral Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_dihedral_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
if [ -n "$NDIHEDRALTYPES" ] && ( [ ! -s "$in_settings" ] || (! grep -q dihedral_coeff "$in_settings") ); then
echo "WARNING: no dihedral coeffs have been set!" >&2
fi
fi
if [ -s "$data_improper_coeffs" ]; then
echo "Improper Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_improper_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
if [ -n "$NIMPROPERTYPES" ] && ( [ ! -s "$in_settings" ] || (! grep -q improper_coeff "$in_settings") ); then
echo "WARNING: no improper coeffs have been set!" >&2
fi
fi
# data file sections specific to class2 force-fields:
if [ -s "$data_bondbond_coeffs" ]; then
echo "BondBond Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_bondbond_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_bondangle_coeffs" ]; then
echo "BondAngle Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_bondangle_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_middlebondtorsion_coeffs" ]; then
echo "MiddleBondTorsion Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_middlebondtorsion_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_endbondtorsion_coeffs" ]; then
echo "EndBondTorsion Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_endbondtorsion_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_angletorsion_coeffs" ]; then
echo "AngleTorsion Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_angletorsion_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_angleangletorsion_coeffs" ]; then
echo "AngleAngleTorsion Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_angleangletorsion_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_bondbond13_coeffs" ]; then
echo "BondBond13 Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_bondbond13_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_angleangle_coeffs" ]; then
echo "AngleAngle Coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_angleangle_coeffs" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_atoms" ]; then
if [ -n "$ATOM_STYLE" ]; then
echo "Atoms # $ATOM_STYLE" >> "$OUT_FILE_DATA"
else
echo "Atoms # full" >> "$OUT_FILE_DATA"
fi
- if [ -s "$tmp_atom_coords" ]; then
- echo "# (Note: x,y,z coordinates may overlap and can be modified later.)" >> "$OUT_FILE_DATA"
- else
- echo "" >> "$OUT_FILE_DATA"
- fi
+ #if [ -s "$tmp_atom_coords" ]; then
+ # echo "# (Note: x,y,z coordinates may overlap and can be modified later.)" >> "$OUT_FILE_DATA"
+ #else
+ # echo "" >> "$OUT_FILE_DATA"
+ #fi
+ echo "" >> "$OUT_FILE_DATA"
cat "$data_atoms" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
else
echo "WARNING: missing file \"$data_atoms\"" >&2
fi
if [ -s "$data_ellipsoids" ]; then
echo "Ellipsoids" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_ellipsoids" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_triangles" ]; then
echo "Triangles" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_triangles" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_lines" ]; then
echo "Lines" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_lines" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_velocities" ]; then
echo "Velocities" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_velocities" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
#else
# echo "Velocities" >> "$OUT_FILE_DATA"
# echo "" >> "$OUT_FILE_DATA"
# awk '{print $1 " 0.0 0.0 0.0"}' < "$data_atoms" >> "$OUT_FILE_DATA"
# echo "" >> "$OUT_FILE_DATA"
fi
if [ -s "$data_bonds" ]; then
echo "Bonds" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_bonds" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
#else
# echo "WARNING: missing file \"$data_bonds\"" >&2
fi
if [ -s "$data_angles" ]; then
echo "Angles" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_angles" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
#else
# echo "WARNING: missing file \"$data_angles\"" >&2
fi
if [ -s "$data_dihedrals" ]; then
echo "Dihedrals" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_dihedrals" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
#else
# echo "WARNING: missing file \"$data_dihedrals\"" >&2
fi
if [ -s "$data_impropers" ]; then
echo "Impropers" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$data_impropers" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
#else
# echo "WARNING: missing file \"$data_impropers\"" >&2
fi
rm -f $OUT_FILE_INPUT_SCRIPT
if [ -s "$in_init" ]; then
echo "" >> $OUT_FILE_INPUT_SCRIPT
cp -f "$in_init" $OUT_FILE_INIT
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# ----------------- Init Section -----------------" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "include \"$OUT_FILE_INIT\"" >> $OUT_FILE_INPUT_SCRIPT
#echo "# \"$in_init\" typically contains various styles, dimensions, and units:" >> $OUT_FILE_INPUT_SCRIPT
#echo "include \"$in_init\"" >> $OUT_FILE_INPUT_SCRIPT
#cat "$in_init" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
fi
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# ----------------- Atom Definition Section -----------------" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "read_data \"$OUT_FILE_DATA\"" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# ----------------- Settings Section -----------------" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
if [ -s "$in_settings" ]; then
#echo "# \"$in_settings\" typically contains coeffs, fixes, groups & modify commands:" >> $OUT_FILE_INPUT_SCRIPT
#echo "include \"$in_settings\"" >> $OUT_FILE_INPUT_SCRIPT
#cat "$in_settings" >> $OUT_FILE_INPUT_SCRIPT
cp -f "$in_settings" $OUT_FILE_SETTINGS
echo "include \"$OUT_FILE_SETTINGS\"" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
fi
if [ -s "$tmp_atom_coords" ]; then
NATOMS=`awk '/^\\\$\/atom:/{n++}END{print n}' < ttree_assignments.txt`
NATOMCRDS=`awk '{if (NF>=3) natom+=1} END{print(natom)}' < "$tmp_atom_coords"`
if [ $NATOMS -ne $NATOMCRDS ]; then
echo "Error: Number of atoms in coordinate file provided by user ($NATOMCRDS)" >&2
echo "does not match the number of atoms generated in ttree file ($NATOMS)" >&2
exit 14
fi
# Copy the coordinates in $tmp_atom_coords into $OUT_FILE_DATA
rm -f "$OUT_FILE_COORDS"
if ! eval $PYTHON_COMMAND "${SCRIPT_DIR}/raw2data.py" $ATOM_STYLE_ARG "$OUT_FILE_DATA" < "$tmp_atom_coords" > "$OUT_FILE_COORDS"; then
ERR_INTERNAL
fi
mv -f "$OUT_FILE_COORDS" "$OUT_FILE_DATA"
+ echo "copied atomic coordinates into $OUT_FILE_DATA"
# Previously, in earlier versions of moltemplate, we used to
# create a new input script containing "set" commands which the
# user was supposed to tell LAMMPS to read using an "include" command.
# If for some reason, you want to go back to doing it that way, then
# uncomment the following 6 lines:
#
#rm -f "$OUT_FILE_COORDS"
#awk '{if (NF>=3) {natom++; print "set atom "natom" x "$1" y "$2" z "$3" image 0 0 0"}}' < "$tmp_atom_coords" >> "$OUT_FILE_COORDS"
#echo "# Load the atom coordinates:" >> $OUT_FILE_INPUT_SCRIPT
#echo "" >> $OUT_FILE_INPUT_SCRIPT
#echo "include \"$OUT_FILE_COORDS\"" >> $OUT_FILE_INPUT_SCRIPT
#echo "" >> $OUT_FILE_INPUT_SCRIPT
else
rm -f "$OUT_FILE_COORDS"
# echo "Warning: (moltemplate.sh)" >&2
# echo " Atomic coordinates were not supplied externally" >&2
# echo " (for example using the \"-pdb\" or \"-xyz\" arguments)." >&2
# echo " Hopefully you used rot(), trans() lttree commands to move" >&2
# echo " molecules to non-overlapping positions." >&2
fi
# ############## CLEAN UP ################
# A lot of files have been created along the way.
# However only a few of them are actually useful.
#
# Optional: clean up some non-essential temporary
# files created by running ttree
# We move the non-essential files into a different directory
# (but we don't delete them).
if [ ! -d output_ttree ]; then
mkdir output_ttree
fi
# Move temporary files into the "output_ttree/" directory:
OIFS=$IFS
#IFS=$'\n'
IFS="
"
for file in $MOLTEMPLATE_TEMP_FILES; do
if [ -e "$file" ]; then
rm -f "output_ttree/$file" >/dev/null 2>&1 || true
#echo "file=\"$file\""
mv "$file" output_ttree/ >/dev/null 2>&1 || true
fi
done
IFS=$OIFS
# ############## DEAL WITH CUSTOM NON-STANDARD SECTIONS ################
# N_data_prefix=`expr length "$data_prefix"` <-- not posix compliant. AVOID
N_data_prefix=${#data_prefix} #<-- works even if $data_prefix contains spaces
ls "${data_prefix}"* 2> /dev/null | while read file_name; do
#If using bash:
#SECTION_NAME="${file_name:$N_data_prefix}"
#If using sh:
#SECTION_NAME=`expr substr "$file_name" $(($N_data_prefix+1)) 1000000` <-- not posix compliant. AVOID
SECTION_NAME=`echo "" | awk "END{print substr(\"$file_name\",$((N_data_prefix+1)),1000000)}"`
# Create a new section in the data file
# matching the portion of the name of
# the file after the data_prefix.
echo "" >> "$OUT_FILE_DATA"
echo "$SECTION_NAME" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
cat "$file_name" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
mv -f "$file_name" output_ttree/
done
if [ -e "$data_prefix_no_space" ]; then
echo "" >> "$OUT_FILE_DATA"
cat "$data_prefix_no_space" >> "$OUT_FILE_DATA"
echo "" >> "$OUT_FILE_DATA"
mv -f "$data_prefix_no_space" output_ttree/
fi
if [ -e "$OUT_FILE_DATA" ]; then
mv -f "$OUT_FILE_DATA" "$OUT_FILE_DATA.tmp" >/dev/null 2>&1 || true
#dos2unix < "$OUT_FILE_DATA.tmp" > "$OUT_FILE_DATA"
tr -d '\r' < "$OUT_FILE_DATA.tmp" > "$OUT_FILE_DATA"
rm -f "$OUT_FILE_DATA.tmp" >/dev/null 2>&1 || true
fi
#N_in_prefix=`expr length "$in_prefix"` <-- not posix compliant. AVOID.
N_in_prefix=${#in_prefix} #<-- works even if $in_prefix contains spaces
ls "${in_prefix}"* 2> /dev/null | while read file_name; do
#If using bash:
#SECTION_NAME="${file_name:$N_in_prefix}"
#If using sh:
#SECTION_NAME=`expr substr "$file_name" $(($N_in_prefix+1)) 1000000` <-- not posix compliant. AVOID
SECTION_NAME=`echo "" | awk "END{print substr(\"$file_name\",$((N_in_prefix+1)),1000000)}"`
FILE_SUFFIX=`echo "$SECTION_NAME" | awk '{print tolower($0)}'`
# Create a new section in the lammps input script
# matching the portion of the name of
# the file after the in_prefix.
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# ----------------- $SECTION_NAME Section -----------------" >> $OUT_FILE_INPUT_SCRIPT
cp -f "$file_name" ${OUT_FILE_INPUT_SCRIPT}.${FILE_SUFFIX}
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "include \"${OUT_FILE_INPUT_SCRIPT}.${FILE_SUFFIX}\"" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
mv -f "$file_name" output_ttree/
done
if [ -e "$in_prefix_no_space" ]; then
echo "" >> $OUT_FILE_INPUT_SCRIPT
cat "$in_prefix_no_space" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
mv -f "$in_prefix_no_space" output_ttree/
fi
# Swap the order of atom types I, J in all "pair_coeff I J ..." commands
# whenever I > J. Do this for every input script file generated by moltemplate.
# (Perhaps later I'll check to make sure the user did not specify contradictory
# "pair_coeff I J ..." and "pair_coeff J I ..." commands, but I won't do it
# here, because at this point we've thrown away the original atom type names,
# so there's no easy way to explain the problem to the user if there is one.)
echo "" > input_scripts_so_far.tmp
for file_name in "$OUT_FILE_INIT" "$OUT_FILE_INPUT_SCRIPT" "$OUT_FILE_SETTINGS"; do
if [ -s "$file_name" ]; then
echo "postprocessing file \"$file_name\"" >&2
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/postprocess_input_script.py" input_scripts_so_far.tmp < "$file_name" > "$file_name.tmp"; then
ERR_INTERNAL
fi
echo "" >&2
mv -f "$file_name.tmp" "$file_name"
#cat "$file_name" >> input_scripts_so_far.tmp
#dos2unix < "$file_name" >> input_scripts_so_far.tmp
tr -d '\r' < "$file_name" >> input_scripts_so_far.tmp
# Delete all "bond_style" statements when no bond types are defined
if [ -z "$NBONDTYPES" ]; then
awk '{if ($1!="bond_style") print $0}' < "$file_name" > "${file_name}.tmp"
mv -f "$file_name.tmp" "$file_name"
fi
# Delete all "angle_style" statements when no angle types are defined
if [ -z "$NANGLETYPES" ]; then
awk '{if ($1!="angle_style") print $0}' < "$file_name" > "${file_name}.tmp"
mv -f "$file_name.tmp" "$file_name"
fi
# Delete all "dihedral_style" statements when no dihedral types are defined
if [ -z "$NDIHEDRALTYPES" ]; then
awk '{if ($1!="dihedral_style") print $0}' < "$file_name" > "${file_name}.tmp"
mv -f "$file_name.tmp" "$file_name"
fi
# Delete all "improper_style" statements when no improper types are defined
if [ -z "$NIMPROPERTYPES" ]; then
awk '{if ($1!="improper_style") print $0}' < "$file_name" > "${file_name}.tmp"
mv -f "$file_name.tmp" "$file_name"
fi
fi
done
ls "${in_prefix}"* 2> /dev/null | while read file_name; do
echo "postprocessing file \"$file_name\"" >&2
if ! $PYTHON_COMMAND "${SCRIPT_DIR}/postprocess_input_script.py" input_scripts_so_far.tmp < "$file_name" > "$file_name".tmp; then
ERR_INTERNAL
fi
echo "" >&2
mv "$file_name".tmp "$file_name"
cat "$file_name" >> input_scripts_so_far.tmp
done
rm -f input_scripts_so_far.tmp
# ############ Optional: Add a fake run section as an example ############
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# ----------------- Run Section -----------------" >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
echo "# The lines above define the system you want to simulate." >> $OUT_FILE_INPUT_SCRIPT
echo "# What you do next is up to you." >> $OUT_FILE_INPUT_SCRIPT
echo "# Typically a user would minimize and equilibrate" >> $OUT_FILE_INPUT_SCRIPT
echo "# the system using commands similar to the following:" >> $OUT_FILE_INPUT_SCRIPT
echo "# ---- examples ----" >> $OUT_FILE_INPUT_SCRIPT
echo "#" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- minimize --" >> $OUT_FILE_INPUT_SCRIPT
echo "# minimize 1.0e-5 1.0e-7 1000 10000" >> $OUT_FILE_INPUT_SCRIPT
echo "# (Note: Some fixes, for example \"shake\", interfere with the minimize command," >> $OUT_FILE_INPUT_SCRIPT
echo "# You can use the \"unfix\" command to disable them before minimization.)" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- declare time step for normal MD --" >> $OUT_FILE_INPUT_SCRIPT
echo "# timestep 1.0" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- run at constant pressure (Nose-Hoover)--" >> $OUT_FILE_INPUT_SCRIPT
#echo "# timestep 1.0" >> $OUT_FILE_INPUT_SCRIPT
echo "# fix fxnpt all npt temp 300.0 300.0 100.0 iso 1.0 1.0 1000.0 drag 1.0">>$OUT_FILE_INPUT_SCRIPT
echo "# -- ALTERNATELY, run at constant volume (Nose-Hoover) --" >> $OUT_FILE_INPUT_SCRIPT
echo "# fix fxnvt all nvt temp 300.0 300.0 500.0 tchain 1" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- ALTERNATELY, run at constant volume using Langevin dynamics. --" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- (This is good for sparse CG polymers in implicit solvent.) --" >> $OUT_FILE_INPUT_SCRIPT
echo "# fix fxLAN all langevin 300.0 300.0 5000 48279" >> $OUT_FILE_INPUT_SCRIPT
echo "# fix fxNVE all nve #(<--needed by fix langevin)" >> $OUT_FILE_INPUT_SCRIPT
echo "# -- Now, finally run the simulation --" >> $OUT_FILE_INPUT_SCRIPT
echo "# run 50000" >> $OUT_FILE_INPUT_SCRIPT
#echo "# write_restart system_after_nvt.rst" >> $OUT_FILE_INPUT_SCRIPT
#echo "# run 50000" >> $OUT_FILE_INPUT_SCRIPT
#echo "# write_restart system_after_npt.rst" >> $OUT_FILE_INPUT_SCRIPT
echo "# ---- (end of examples) ----">> $OUT_FILE_INPUT_SCRIPT
#echo "# It is the responsibility of the user to learn LAMMPS and specify these">>$OUT_FILE_INPUT_SCRIPT
#echo "# these commands." >> $OUT_FILE_INPUT_SCRIPT
echo "" >> $OUT_FILE_INPUT_SCRIPT
# Finally, if the -vmd argument was included, start up VMD and
# view the system (using topotools to convert the
if [ ! -z $RUN_VMD_AT_END ]; then
echo "topo readlammpsdata $OUT_FILE_DATA full" > vmd_viz_moltemplate.tcl.tmp
bn=`basename $OUT_FILE_DATA .data`
echo "animate write psf $bn.psf" >> vmd_viz_moltemplate.tcl.tmp
vmd -e vmd_viz_moltemplate.tcl.tmp
rm -rf vmd_viz_moltemplate.tcl.tmp
fi
diff --git a/tools/moltemplate/src/nbody_by_type_backup.py b/tools/moltemplate/src/nbody_by_type_backup.py
deleted file mode 100755
index 020954985..000000000
--- a/tools/moltemplate/src/nbody_by_type_backup.py
+++ /dev/null
@@ -1,651 +0,0 @@
-#!/usr/bin/env python
-
-# Author: Andrew Jewett (jewett.aij at g mail)
-# http://www.chem.ucsb.edu/~sheagroup
-# License: 3-clause BSD License (See LICENSE.TXT)
-# Copyright (c) 2011, Regents of the University of California
-# All rights reserved.
-
-man_page_text = """
-
- nbody_by_type.py reads a LAMMPS data file (or an excerpt of a LAMMPS)
- data file containing bonded many-body interactions by atom type
- (and bond type), and generates a list of additional interactions
- in LAMMPS format consistent with those type (to the standard out).
-
- Typical Usage:
-
- nbody_by_type.py X < old.data > new.data
-
- --or--
-
- nbody_by_type.py X \\
- -atoms atoms.data \\
- -bonds bonds.data \\
- -nbody X.data \\
- -nbodybytype X_by_type.data \\
- > new_X.data
-
- In both cases "X" denotes the interaction type, which
- is either "Angles", "Dihedrals", or "Impropers".
- (Support for other interaction types can be added by the user. See below.)
-
- -------- Example 1 -------
-
- nbody_by_type.py X < old.data > new.data
-
- In this example, nbody_by_type.py reads a LAMMPS data file
- "orig.data", and extracts the relevant section ("Angles",
- "Dihedrals", or "Impropers"). It also looks a section named "X By Type",
- (eg. "Angles By type", "Impropers By type", "Impropers By type")
- which contains a list of criteria for automatically defining additional
- interactions of that type. For example, this file might contain:
-
- Angle By Type
-
- 7 1 2 1 * *
- 8 2 2 * * *
- 9 3 4 3 * *
-
- The first column is an interaction type ID.
- The next 3 columns are atom type identifiers.
- The final 2 columns are bond type identifiers.
- The * is a wildcard symbol indicating there is no preference for bond types
- in this example. (Optionally, regular expressions can also be used to
- define a type match, by enclosing the atom or bond type in / slashes.)
-
- The first line tells us to that there should be a 3-body "Angle"
- interaction of type "7" whenever an atom of type 1 is bonded to an atom
- of type "2", which is bonded to another atom of type "1" again.
- The second line tells us that an angle is defined whenever three atoms
- are bonded together and the first two are of type "2".
- (Redundant angle interactions are filtered.)
-
- New interactions are created for every group of bonded
- atoms which match these criteria if they are bonded together
- in the relevant way for that interaction type (as determined by
- nbody_X.py), and printed to the standard output. For example,
- suppose you are automatically generating 3-body "Angle" interactions using:
-
- nbody_by_type Angles < old.data > new.data
-
- The file "new.data" will be identical to "old.data", however the
- "Angles By Type" section will be deleted, and the following lines of
- text will be added to the "Angles" section:
-
- 394 7 5983 5894 5895
- 395 7 5984 5895 5896
- 396 7 5985 5896 5897
- : : : : :
- 847 9 14827 14848 14849
-
- The numbers in the first column are counters which assign a ID to
- every interaction of that type, and start where the original "Angles"
- data left off (New angle ID numbers do not overlap with old ID numbers).
- The text in the second column ("7", "9", ...) matches the text from the
- first column of the "Angle By Type" section of the input file.
-
- -------- Example 2 -------
-
- nbody_by_type.py X \\
- -atoms atoms.data \\
- -bonds bonds.data \\
- -nbody X.data \\
- -nbodybytype X_by_type.data \\
- -prefix "SOMESTRING" -suffix "ANOTHERSTRING" \\
- > new_X.data
-
- In particular, for Angle interactions:
-
- nbody_by_type.py Angles \\
- -atoms atoms.data \\
- -bonds bonds.data \\
- -nbody angles.data \\
- -nbodybytype angles_by_type.data \\
- > new_Angles.data
-
- When run this way, nbody_by_type.py behaves exactly the same way
- as in Example 1, however only the lines of text corresponding to
- the new generated interactions are printed, (not the entire data file).
- Also note, that when run this way, nbody_by_type.py does not read the
- LAMMPS data from the standard input. Instead, it reads each section of
- the data file from a different file indicated by the arguments following
- the "-atoms", "-bonds", "-nbody", and "-nbodybytype" flags.
-
- "Angles" is a 3-body interaction style. So when run this way,
- nbody_by_type.py will create a 5 (=3+2) column file (new_Angles.data).
-
-Note: the atom, bond and other IDs/types in need not be integers.
-
-Note: This program must be distributed with several python modules, including:
- nbody_Angles.py, nbody_Dihedrals.py, and nbody_Impropers.py. These
- contain bond definitions for angular, dihedral, and improper interactions.
- (In case any new interaction types are ever added to LAMMPS, with only
- a few lines of python it is easy to edit to define new bonded
- interaction types by supplying new "nbody_X.py" python module.
- Refer to the modules listed above for examples.)
-
-Note: Optional "-prefix" and "-suffix" arguments can be included to decorate
- the interaction IDs (first column). For example, -prefix "auto_" and
- -suffix "_angle", causes "new_Angles.data" to contain the following text:
-
- auto_394_angle 7 5983 5894 5895
- auto_395_angle 7 5984 5895 5896
- auto_396_angle 7 5985 5896 5897
- : : : : :
- auto_847_angle 9 14827 14848 14849
-
-"""
-
-
-import sys
-from extract_lammps_data import *
-from nbody_by_type_lib import GenInteractions_str
-from ttree_lex import *
-from lttree_styles import AtomStyle2ColNames, ColNames2AidAtypeMolid
-
-
-if sys.version < '2.6':
- raise InputError('Error: Using python '+sys.version+'\n'
- ' Alas, you must upgrade to a newer version of python (2.6 or later).')
-elif sys.version < '2.7':
- sys.stderr.write('--------------------------------------------------------\n'
- '----------------- WARNING: OLD PYTHON VERSION ----------\n'
- ' This program is untested on your python version ('+sys.version+').\n'
- ' PLEASE LET ME KNOW IF THIS PROGRAM CRASHES (and upgrade python).\n'
- ' -Andrew 2013-10-25\n'
- '--------------------------------------------------------\n'
- '--------------------------------------------------------\n')
- from ordereddict import OrderedDict
-else:
- from collections import OrderedDict
-
-
-
-def GenInteractions_lines(lines_atoms,
- lines_bonds,
- lines_nbody,
- lines_nbodybytype,
- atom_style,
- g_bond_pattern,
- canonical_order, #function to sort atoms and bonds
- prefix='',
- suffix='',
- report_progress = False):
-
- column_names = AtomStyle2ColNames(atom_style)
- i_atomid, i_atomtype, i_molid = ColNames2AidAtypeMolid(column_names)
-
- atomids_str = []
- atomtypes_str = []
-
- for iv in range(0, len(lines_atoms)):
- line = lines_atoms[iv].strip()
- if '#' in line:
- icomment = line.find('#')
- line = (line[:icomment]).strip()
- if len(line) > 0:
- tokens = SplitQuotedString(line)
- if ((len(tokens) <= i_atomid) or (len(tokens) <= i_atomtype)):
- raise(InputError('Error not enough columns on line '+str(iv+1)+' of \"Atoms\" section.'))
- tokens = SplitQuotedString(line)
- atomids_str.append(EscCharStrToChar(tokens[i_atomid]))
- atomtypes_str.append(EscCharStrToChar(tokens[i_atomtype]))
-
- bondids_str = []
- bondtypes_str = []
- bond_pairs = []
- for ie in range(0, len(lines_bonds)):
- line = lines_bonds[ie].strip()
- if '#' in line:
- icomment = line.find('#')
- line = (line[:icomment]).strip()
- if len(line) > 0:
- tokens = SplitQuotedString(line)
- if len(tokens) < 4:
- raise(InputError('Error not enough columns on line '+str(ie+1)+' of \"Bonds\" section.'))
- bondids_str.append(EscCharStrToChar(tokens[0]))
- bondtypes_str.append(EscCharStrToChar(tokens[1]))
- bond_pairs.append( (EscCharStrToChar(tokens[2]),
- EscCharStrToChar(tokens[3])) )
-
- typepattern_to_coefftypes = []
-
- for i in range(0, len(lines_nbodybytype)):
- line = lines_nbodybytype[i].strip()
- if '#' in line:
- icomment = line.find('#')
- line = (line[:icomment]).strip()
- if len(line) > 0:
- tokens = SplitQuotedString(line)
-
- if ((len(tokens) != 1 + g_bond_pattern.GetNumVerts()) and
- (len(tokens) != 1 + g_bond_pattern.GetNumVerts()
- + g_bond_pattern.GetNumEdges())):
- raise(InputError('Error: Wrong number of columns in \"By Type\" section of data file.\n'
- 'Offending line:\n'+
- '\"'+line+'\"\n'
- 'Expected either '+
- str(1 + g_bond_pattern.GetNumVerts()) + ' or ' +
- str(1 + g_bond_pattern.GetNumVerts() +
- g_bond_pattern.GetNumEdges())
- + ' colunms.'))
-
- coefftype = EscCharStrToChar(tokens[0])
- typepattern = []
-
- for typestr in tokens[1:]:
- if ((len(typestr) >= 2) and
- (typestr[0] == '/') and (typestr[-1] == '/')):
- regex_str = typestr[1:-1]
- typepattern.append( re.compile(regex_str) )
- else:
- typepattern.append(EscCharStrToChar(typestr))
-
- # If the user neglected to specify the bond types, assume '*'
- if len(tokens) == 1 + g_bond_pattern.GetNumVerts():
- typepattern += ['*'] * g_bond_pattern.GetNumEdges()
-
- typepattern_to_coefftypes.append([typepattern, coefftype])
-
- coefftype_to_atomids_str = GenInteractions_str(bond_pairs,
- g_bond_pattern,
- typepattern_to_coefftypes,
- canonical_order,
- atomids_str,
- atomtypes_str,
- bondids_str,
- bondtypes_str,
- report_progress)
- lines_nbody_new = []
- for coefftype, atomids_list in coefftype_to_atomids_str.items():
- for atomids_found in atomids_list:
- n = len(lines_nbody) + len(lines_nbody_new) + 1
- line = prefix+str(n)+suffix+' '+ \
- coefftype+' '+(' '.join(atomids_found))+'\n'
- lines_nbody_new.append(line)
-
- return lines_nbody_new
-
-
-
-def GenInteractions_files(lines_data,
- src_bond_pattern,
- fname_atoms,
- fname_bonds,
- fname_nbody,
- fname_nbodybytype,
- section_name,
- section_name_bytype,
- atom_style,
- prefix='',
- suffix='',
- report_progress = False):
-
- if fname_atoms == None:
- lines_atoms = [line for line in ExtractDataSection(lines_data, 'Atoms')]
- else:
- try:
- f = open(fname_atoms, 'r')
- except:
- sys.stderr.write('Error: Unable to open file \"'+fname_atoms+'\" for reading.\n')
- sys.exit(-1)
- lines_atoms = [line for line in f.readlines()
- if ((len(line.strip())>0) and (line.strip()[0] != '#'))]
- f.close()
-
-
- if fname_bonds == None:
- lines_bonds = [line for line in ExtractDataSection(lines_data, 'Bonds')]
- else:
- try:
- f = open(fname_bonds, 'r')
- except IOError:
- sys.stderr.write('Error: Unable to open file \"'+fname_bonds+'\" for reading.\n')
- sys.exit(-1)
- lines_bonds = [line for line in f.readlines()
- if ((len(line.strip())>0) and (line.strip()[0] != '#'))]
- f.close()
-
-
- if fname_nbody == None:
- lines_nbody = [line for line in ExtractDataSection(lines_data, section_name)]
- else:
- try:
- f = open(fname_nbody, 'r')
- lines_nbody = [line for line in f.readlines()
- if ((len(line.strip())>0) and (line.strip()[0] != '#'))]
- f.close()
- except IOError:
- #sys.stderr.write(' (omitting optional file \"'+fname_nbody+'\")\n')
- lines_nbody = []
-
-
- if fname_nbodybytype == None:
- lines_nbodybytype=[line for
- line in ExtractDataSection(lines_data,
- section_name_bytype)]
-
- else:
- try:
- f = open(fname_nbodybytype, 'r')
- except:
- sys.stderr.write('Error: Unable to open file \"'+fname_nbodybytype+'\" for reading.\n')
- sys.exit(-1)
- lines_nbodybytype = [line for line in f.readlines()
- if((len(line.strip())>0)and(line.strip()[0]!='#'))]
- f.close()
-
-
- g = __import__(src_bond_pattern) #defines g.bond_pattern, g.canonical_order
-
-
- return GenInteractions_lines(lines_atoms,
- lines_bonds,
- lines_nbody,
- lines_nbodybytype,
- atom_style,
- g.bond_pattern,
- g.canonical_order,
- prefix,
- suffix,
- report_progress)
-
-
-
-
-
-
-if __name__ == "__main__":
-
- g_program_name = __file__.split('/')[-1] # = 'nbody_by_type.py'
- g_date_str = '2014-11-22'
- g_version_str = '0.17'
-
- bond_pattern_module_name = ""
-
- ####### Main Code Below: #######
- sys.stderr.write(g_program_name+' v'+g_version_str+' '+g_date_str+' ')
- if sys.version < '3':
- sys.stderr.write(' (python version < 3)\n')
- else:
- sys.stderr.write('\n')
-
- try:
-
- fname_atoms = None
- fname_bonds = None
- fname_nbody = None
- fname_nbodybytype = None
- atom_style = 'full'
- prefix=''
- suffix=''
-
- argv = [arg for arg in sys.argv]
-
- if len(argv) == 1:
- raise InputError('Error: Missing argument required.\n'
- ' The \"'+g_program_name+'\" program requires an argument containing the\n'
- ' name of a section from a LAMMPS data file storing bonded interactions.\n'
- ' (For example: "Angles", "Dihedrals", or "Impropers".)\n'
- #' Note: The first letter of each section is usually capitalized.)\n'
- '\n'
- '--------------- general documentation -------------\n'
- '\n' + man_page_text + '\n')
-
- section_name = '' # (This will be replaced later.)
- section_name_bytype = '' # (This will be replaced later.)
-
- # Loop over the remaining arguments not processed yet.
- # These arguments are specific to the lttree.py program
- # and are not understood by ttree.py:
- i = 1
- while i < len(argv):
- #sys.stderr.write('argv['+str(i)+'] = \"'+argv[i]+'\"\n')
- if ((argv[i].lower() == '-?') or
- (argv[i].lower() == '--?') or
- (argv[i].lower() == '-help') or
- (argv[i].lower() == '-help')):
- if i+1 >= len(argv):
- sys.stdout.write(man_page_text+'\n')
- sys.exit(0)
-
- elif argv[i].lower() == '-atoms':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a file name containing lines of\n'
- ' text which might appear in the "Atoms" section of a LAMMPS data file.\n')
- fname_atoms = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-bonds':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a file name containing lines of\n'
- ' text which might appear in the "Bonds" section of a LAMMPS data file.\n')
- fname_bonds = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-nbody':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a file name\n')
-
- #raise InputError('Error: '+argv[i]+' flag should be followed by a file name containing lines of\n'
- # ' text which might appear in the "'+section_name+' section of a LAMMPS data file.\n')
- fname_nbody = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-nbodybytype':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a file name\n')
-
- #raise InputError('Error: '+argv[i]+' flag should be followed by a file name containing\n'
- # ' text which might appear in the "'+section_name+' By Type" section\n'
- # ' of a LAMMPS data file.\n')
- fname_nbodybytype = argv[i+1]
- del(argv[i:i+2])
-
- elif ((argv[i].lower() == '-atom-style') or
- (argv[i].lower() == '-atom_style')):
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a an atom_style name.\n'
- ' (Or single quoted string which includes a space-separated\n'
- ' list of column names.)\n')
- atom_style = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-prefix':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a prefix string\n'
- ' (a string you want to appear to the left of the integer\n'
- ' which counts the bonded interactions you have generated.)\n')
- prefix = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-suffix':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by a suffix string\n'
- ' (a string you want to appear to the right of the integer\n'
- ' which counts the bonded interactions you have generated.)\n')
- prefix = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-subgraph':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by the name of a python file\n'
- ' containing the definition of the subgraph you are searching for\n'
- ' and it\'s symmetry properties.\n'
- ' (See nbody_Dihedrals.py for example.)\n')
- bond_pattern_module_name = argv[i+1]
-
- # If the file name ends in ".py", then strip off this suffix.
- # For some reason, the next line does not work:
- #bond_pattern_module_name=bond_pattern_module_name.rstrip('.py')
- # Do this instead
- pc = bond_pattern_module_name.rfind('.py')
- if pc != -1:
- bond_pattern_module_name = bond_pattern_module_name[0:pc]
-
- print(argv[i+1])
- del(argv[i:i+2])
-
- elif argv[i].lower() == '-section':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by the name of the LAMMPS\n'
- ' Data section describing the type of interaction being generated.\n'
- ' (For example: \"Angles\", \"Dihedrals\", \"Impropers\", etc...)\n')
- section_name = argv[i+1]
- del(argv[i:i+2])
-
-
- elif argv[i].lower() == '-sectionbytype':
- if i+1 >= len(argv):
- raise InputError('Error: '+argv[i]+' flag should be followed by the name of the\n'
-
- ' write_once(\"???? By Type\") section describing how to create the\n'
- ' interactions. (For example: \"Angles By Type\", \"Dihedrals By Type\",\n'
- ' \"Impropers By Type\", etc... Note that this argument\n'
- ' will contain spaces, so surround it with quotes.)\n')
-
- section_name_bytype = argv[i+1]
- del(argv[i:i+2])
-
- elif argv[i][0] == '-':
- raise InputError('Error('+g_program_name+'):\n'
- 'Unrecogized command line argument \"'+argv[i]+'\"\n')
- else:
- i += 1
-
- #if len(argv) == 1:
- # raise InputError('Error: Missing argument required.\n'
- # ' The \"'+g_program_name+'\" program requires an argument containing the\n'
- # ' name of a section from a LAMMPS data file storing bonded interactions.\n'
- # ' (For example: "Angles", "Dihedrals", or "Impropers".)\n')
- # #' Note: The first letter of each section is usually capitalized.)\n'
-
- if len(argv) == 1:
- pass
- elif len(argv) == 2:
- section_name = argv[1]
- section_name_bytype = section_name + ' By Type'
- # default bond_pattern_module name
- if bond_pattern_module_name == "": #<--if not set by user
- bond_pattern_module_name = 'nbody_'+section_name
- del(argv[1:2])
- else:
- # if there are more than 2 remaining arguments,
- problem_args = ['\"'+arg+'\"' for arg in argv[1:]]
- raise InputError('Syntax Error('+g_program_name+'):\n\n'
- ' Problem with argument list.\n'
- ' The remaining arguments are:\n\n'
- ' '+(' '.join(problem_args))+'\n\n'
- ' (The actual problem may be earlier in the argument list.)\n')
-
- if ((section_name == '') or
- (section_name_bytype == '') or
- (bond_pattern_module_name == '')):
- raise InputError('Syntax Error('+g_program_name+'):\n\n'
- ' You have not defined the following arguments:\n'
- ' -section name\n'
- ' -sectionbytype namebytype\n'
- ' -subgraph pythonfile.py\n')
-
- # ------------ Done parsing argument list ----------
-
- if (fname_atoms or fname_bonds or fname_nbody or fname_nbodybytype):
- output_full_DATA_file = False
- lines_data = []
- else:
- output_full_DATA_file = True
- lines_data = sys.stdin.readlines()
-
- # Calculate the interactions and generate a list of lines of text
-
- lines_new_interactions = \
- GenInteractions_files(lines_data,
- bond_pattern_module_name,
- fname_atoms,
- fname_bonds,
- fname_nbody,
- fname_nbodybytype,
- section_name,
- section_name_bytype,
- atom_style,
- prefix,
- suffix,
- report_progress=True)
-
- # Print this text to the standard out.
-
- # Question: Do we write out the entire DATA file,
- # or just the portion that was generated by this program?
-
- if not output_full_DATA_file:
- # ...then only print out the interactions which were generated
- # by this program, omitting any lines from the original data file:
-
- # (This is the way I usually run this program.)
- for line in lines_new_interactions:
- sys.stdout.write(line)
-
-
- else:
-
-
- # ...then print out the entire data file, deleting the "By Type"
- # section, and adding the generated lines of text to the corresponding
-
- # If present, update the interaction counter at the beginning
- # of the LAMMPS data file. (For example, if if 100 new "Angles"
- # interactions were generated, replace "2 Angles" with "102 Angles")
- #
- for i in range(0, len(lines_data)):
- line = lines_data[i].strip()
- tokens = SplitQuotedString(line)
-
- # updating the interaction counter
- if ((len(tokens) == 2) and (tokens[1] == (section_name).lower())):
- tokens[0] = str(int(tokens[0]) + len(lines_new_interactions))
- lines_data[i] = ' '.join(tokens) + '\n'
-
- # stop when you come to a section header
- elif line in lammps_data_sections:
- #"lammps_data_sections" is defined in "extract_lammps_data.py"
- break
-
-
- # locate the appropriate section of the data file
- # (storing the type of interactions we just created)
- i_nbody_a, i_nbody_b = \
- FindDataSection(lines_data, section_name)
-
- if i_nbody_a == -1:
- if len(lines_new_interactions) > 0:
- # If not found, create a new section at the end of the file,
- # containing a section name followed by the list of lines
- lines_data += ['\n', section_name+'\n', '\n'] + \
- lines_new_interactions + ['\n']
- else:
- # Insert the new lines into the existing section
- lines_data[i_nbody_b:i_nbody_b] = lines_new_interactions
-
- # Figure out where the "By Type" section is located
- # (so we skip over it)
- i_bytype_a, i_bytype_b = \
- FindDataSection(lines_data, section_name_bytype)
-
- in_bytype_section = False
- for i in range(0, len(lines_data)):
- line = lines_data[i].strip()
- # Omit all lines of text in the 'By Type' section (including the
- # header and commments or blank lines which immediately follow it.)
- if line == section_name_bytype:
- in_bytype_section = True
- elif i == i_bytype_b:
- in_bytype_section = False
-
- if not in_bytype_section:
- sys.stdout.write(lines_data[i])
-
- except (ValueError, InputError) as err:
- sys.stderr.write('\n'+str(err)+'\n')
- sys.exit(-1)
-
diff --git a/tools/moltemplate/src/raw2data.py b/tools/moltemplate/src/raw2data.py
index 4a4a90e72..5f9149d6f 100755
--- a/tools/moltemplate/src/raw2data.py
+++ b/tools/moltemplate/src/raw2data.py
@@ -1,98 +1,103 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from dump2data import *
g_program_name = 'raw2data.py'
g_date_str = '2014-12-19'
g_version_str = 'v0.43'
####### Main Code Below: #######
sys.stderr.write(g_program_name+' '+g_version_str+' '+g_date_str)
sys.stderr.write('\n')
try:
data_settings = DataSettings()
misc_settings = MiscSettings()
misc_settings.multi = False
warning_strings = []
ParseArgs(sys.argv,
misc_settings,
data_settings,
warning_strings)
frame_coords = defaultdict(list)
frame_coords_ixiyiz = defaultdict(list)
frame_vects = defaultdict(list)
frame_velocities = defaultdict(list)
frame_xlo_str = frame_xhi_str = None
frame_ylo_str = frame_yhi_str = None
frame_zlo_str = frame_zhi_str = None
frame_xy_str = frame_xz_str = frame_yz_str = None
frame_natoms = -1
frame_timestep_str = ''
i_atomid = i_atomtype = i_molid = -1
i_x = i_y = i_z = i_xu = i_yu = i_zu = -1
i_xs = i_ys = i_zs = i_xsu = i_ysu = i_zsu = -1
dump_column_names = []
#num_frames_in = -1
num_frames_out = 0
finished_reading_frame = False
read_last_frame = False
#in_coord_file = open('traj.raw','r')
#in_coord_file = open('tmp_atom_coords.dat','r')
in_coord_file = sys.stdin
read_last_frame = False
while True:
line = '\n'
while (line != '') and (line.strip() == ''):
line = in_coord_file.readline()
if line == '': # if EOF
break
frame_coords = defaultdict(list)
while line.strip() != '':
n_crds = len(frame_coords)
#sys.stdout.write("n_crds="+str(n_crds)+": \""+line.strip()+"\"\n")
frame_coords[str(n_crds+1)] = line.split()
line = in_coord_file.readline()
+ # Check to see if there are any blank lines at this location in the file
+ # If there are, it means we are at a new "frame" (in the trajectory).
+ # Skip over any blank line(s) separating this frame from the next frame
+ # so that the next time we enter the loop, we are at the beginning
+ # of a new frame.
while (line != '') and (line.strip() == ''):
line = in_coord_file.readline()
# Parse the DATA file specified by the user
# and replace appropriate lines or fields with
# the corresponding text from the input file.
if misc_settings.multi:
out_file_name = data_settings.file_name + '.'\
+ str(num_frames_out)
sys.stderr.write(' (creating file \"'+out_file_name+'\")\n')
out_file = open(out_file_name, 'w')
else:
out_file = sys.stdout
WriteFrameToData(out_file,
None,
misc_settings,
data_settings,
frame_natoms,
frame_coords,
frame_coords_ixiyiz,
frame_vects,
frame_velocities,
None,
None,
frame_xlo_str, frame_xhi_str,
frame_ylo_str, frame_yhi_str,
frame_zlo_str, frame_zhi_str,
frame_xy_str, frame_xz_str, frame_yz_str)
except (ValueError, InputError) as err:
sys.stderr.write('\n'+str(err)+'\n')
sys.exit(-1)
diff --git a/tools/moltemplate/src/ttree.py b/tools/moltemplate/src/ttree.py
index 8e29c01d7..611a61684 100755
--- a/tools/moltemplate/src/ttree.py
+++ b/tools/moltemplate/src/ttree.py
@@ -1,5055 +1,5063 @@
#!/usr/bin/env python
# Authors: Andrew Jewett (jewett.aij at g mail)
# http://www.chem.ucsb.edu/~sheagroup
# License: 3-clause BSD License (See LICENSE.TXT)
# Copyright (c) 2011, Regents of the University of California
# All rights reserved.
"""
ttree Ttree is a simple program for recursively composing and generating
large redundant text files from small template files.
By default, the large number of unique template variables generated
in the process are automatically substituted with integers
(or other numeric counters, all of which can be overridden),
rendered, and the rendered templates are written to a file.
ttree was designed to be useful for generating input files for
molecular simulation software like LAMMPS or NAMD.
BasicUI This section of the code contains the user interface for ttree
when run as a stand-alone program, as described above. (This
section of code contains the "if __name__ == __main__:" code block.)
-- Data Types --
StaticObj Static nodes are data structures used to store ttree class definitions.
(Static nodes are useful for defining molecule types or
namespaces in LAMMPS or other molecular simulation programs.)
The nodes themselves are stored in a tree of nested class definitions.
Static variables (such as "@atom:C") are also associated with
StaticObjs.
InstanceObj Instance nodes are created when a user creates one (or many)
copies of a class, using the "new" command.
These classes in turn may instantiate other classes.
(Example: A user may manually instantiate several copies of a
molecule, such as a protein, however each of those
molecules may contain molecular subunits, such as
amino acids, which are automatically instantiated.)
Instance variables (such as "$atom:CA") are also associated with
InstanceObjs.
"""
import sys
from collections import defaultdict
import operator
import random
#import gc
try:
unicode
except NameError:
# Python 3
basestring = unicode = str
# -- ttree_lex.py --
# TtreeShlex is a backwards-compatible version of python's standard shlex module.
# It has the additional member: "self.wordterminators", which overrides
# the "self.wordchars" member. This enables better handling of unicode
# characters by allowing a much larger variety of characters to appear
# in words or tokens parsed by TtreeShlex. Otherwise it is identical to shlex.
from ttree_lex import *
if sys.version < '2.6':
raise InputError('Error: Using python '+sys.version+'\n'
' Alas, you must upgrade to a newer version of python (2.7 or later).')
elif sys.version < '2.7':
sys.stderr.write('--------------------------------------------------------\n'
'----------------- WARNING: OLD PYTHON VERSION ----------\n'
' This program is untested on your python version ('+sys.version+').\n'
' PLEASE LET ME KNOW IF THIS PROGRAM CRASHES (and upgrade python).\n'
' -Andrew 2014-11-28\n'
'--------------------------------------------------------\n'
'--------------------------------------------------------\n')
from ordereddict import OrderedDict
else:
from collections import OrderedDict
if sys.version > '3':
import io
else:
import cStringIO
# We keep track of the program name and version.
# (This is only used for generating error messages.)
#g_filename = 'ttree.py'
g_filename = __file__.split('/')[-1]
g_module_name = g_filename
if g_filename.rfind('.py') != -1:
g_module_name = g_filename[:g_filename.rfind('.py')]
-g_date_str = '2014-12-19'
-g_version_str = '0.79'
+g_date_str = '2015-8-17'
+g_version_str = '0.80'
class ClassReference(object):
""" Every class defined by the user (stored in an StaticObj data structure)
may contain references to other classes (ie. other StaticObjs).
(Note: All of these StaticObjs are stored in the same tree, the
global static tree.)
Examples:
Whenever an instance of a class is created, this may automatically spawn
the creation of additional classes (which are instantiated because a 'new'
command appeared within the first class's definition). These are stored in
the "StaticObj.instance_commands[i].class_ref" attribute.
Similarly, each class (StaticObj) can optionally inherit some of its
traits (consisting of write() and new commands) from one or more
"class_parents" (also StaticObjs). A list of these parents is stored in the
"StaticObj.class_parents" attribute. In both cases (self.instance_commands
or self.class_parents) we need to storea pointer to the StaticObj(s)
corresponding to the instance-childen or class-parents.
(This stored in self.statobj).
However, for the purposes of debugging and interactivity, it is also
convenient to permanently keep track of the string that the user used to
specify the name/location of that class/StaticObj
(stored in self.statobj_str), in addition to the location
in the file where that string occurs (stored in self.srcloc)."""
__slots__=["statobj_str","srcloc","statobj"]
def __init__(self,
statobj_str=None,
srcloc=None,
statobj=None):
self.statobj_str = statobj_str
if srcloc is None:
self.srcloc = OSrcLoc('', -1)
else:
self.srcloc = srcloc
self.statobj = statobj
#def __repr__(self):
# return repr((self.statobj_str, self.srcloc))
# "Command"s are tasks to carry out.
# (...either immediately, or later during instantiation)
# Commands are used to write to files, create new instances, delete instances,
# or custom commands to modify an instance of a class.
# (For example "instance = new Class.move(1,0,0).rot(45,0,0,1)"
# The ".move(1,0,0)" and ".rot(45,0,0,1)" commands are "stackable" and
# have similar syntax to member functions in C++, JAVA, Python.)
class Command(object):
__slots__=["srcloc"]
def __init__(self, srcloc=None):
self.srcloc = srcloc
# COMMENTING OUT: "COUNT" AND "ORDER" ARE NO LONGER NEEDED
#count = 0
#def __init__(self, srcloc=None):
# self.srcloc = srcloc
# # The "order" member is a counter that keeps track of the order
# # in which the Command data types are created (issued by the user).
# Command.count += 1
# self.order = Command.count
#def __lt__(self, x):
# return self.order < x.order
class WriteFileCommand(Command):
""" WriteFileCommand
filename This is the name of the file that will be written to
when the command is executed.
tmpl_list This is the contents of what will be written to the file.
Text strings are often simple strings, however more
generally, they can be strings which include other variables
(ie templates). In general, templates are lists of alternating
TextBlocks and VarRefs, (with additional tags and data to
identify where they occur in in the original user's files).
"""
__slots__=["filename", "tmpl_list"]
def __init__(self,
filename = None,
tmpl_list = None,
srcloc = None):
self.filename = filename
if tmpl_list is None:
self.tmpl_list = []
else:
Command.__init__(self, srcloc)
self.tmpl_list = tmpl_list
def __str__(self):
if self.filename:
return 'WriteFileCommand(\"'+self.filename+'\")'
else:
return 'WriteFileCommand(NULL)'
def __copy__(self):
tmpl_list = []
CopyTmplList(self.tmpl_list, tmpl_list) #CHECK:IS_MEMORY_WASTED_HERE?
return WriteFileCommand(self.filename, tmpl_list, self.srcloc)
class InstantiateCommand(Command):
""" InstantiateCommand is a simple tuple-like datatype used to
store pairs of names (strings, stored in self.name),
and ClassReferences (see above, stored in self.class_ref).n
The "suffix" argument is an optional string which may contain
additional instructions how to instantiate the object.
"""
__slots__=["name",
"class_ref",
"instobj"]
def __init__(self,
name = None,
class_ref = None,
srcloc = None,
instobj = None):
Command.__init__(self, srcloc)
self.name = name
#if class_ref is None:
# self.class_ref = ClassReference()
#else:
self.class_ref = class_ref
self.instobj = instobj
def __str__(self):
return 'InstantiateCommand('+self.name+')'
def __copy__(self):
return InstantiateCommand(self.name,
self.class_ref,
self.srcloc,
self.instobj)
class DeleteCommand(Command):
__slots__=[]
def __init__(self,
srcloc = None):
Command.__init__(self, srcloc)
def __str__(self):
return 'DeleteCommand()'
def __copy__(self):
return DeleteCommand(self.srcloc)
class StackableCommand(Command):
""" StackableCommand is a class for storing commands
that effect the environment of the object being created.
The combined effect of these commands can be thought of as a "stack"
Commands can be pushed on the stack, or popped off
The actual commands themselves are represented by the "contents" member
which is usually a text string.
ttree.py does not attempt to understand the content of these commands.
That job is left up to the __main___ module. (IE. whatever script that
happens to be importing ttree.py. If there is no script, and
ttree.py IS the main module, then it simply ignores these commands.)
"""
__slots__=["context_node"]
def __init__(self,
srcloc,
context_node=None):
Command.__init__(self, srcloc)
self.context_node = context_node # if multiple stacks are present, then use "context_node"
# as a key to identify which stack you want
# the command to modify
class PushCommand(StackableCommand):
__slots__=["contents"]
def __init__(self,
contents,
srcloc,
context_node=None):
StackableCommand.__init__(self, srcloc, context_node)
self.contents = contents
def __copy__(self):
return PushCommand(self.contents, self.srcloc, self.context_node)
def __str__(self):
return 'PushCommand('+str(self.contents)+')'
class PushRightCommand(PushCommand):
__slots__=[]
def __init__(self,
contents,
srcloc,
context_node=None):
PushCommand.__init__(self, contents, srcloc, context_node)
def __copy__(self):
return PushRightCommand(self.contents, self.srcloc, self.context_node)
def __str__(self):
return 'PushRightCommand('+str(self.contents)+')'
class PushLeftCommand(PushCommand):
__slots__=[]
def __init__(self,
contents,
srcloc,
context_node=None):
PushCommand.__init__(self, contents, srcloc, context_node)
def __copy__(self):
return PushLeftCommand(self.contents, self.srcloc, self.context_node)
def __str__(self):
return 'PushLeftCommand('+str(self.contents)+')'
class PopCommand(StackableCommand):
__slots__=["partner"]
def __init__(self,
partner,
srcloc,
context_node=None):
StackableCommand.__init__(self, srcloc, context_node)
self.partner = partner
def __copy__(self):
return PopCommand(self.partner, self.srcloc, self.context_node)
def __str__(self):
return 'PopCommand('+str(self.partner.contents)+')'
class PopRightCommand(PopCommand):
__slots__=[]
def __init__(self,
partner,
srcloc,
context_node=None):
PopCommand.__init__(self, partner, srcloc, context_node)
assert((partner is None) or isinstance(partner, PushRightCommand))
def __copy__(self):
return PopRightCommand(self.partner, self.srcloc, self.context_node)
def __str__(self):
return 'PopRightCommand('+str(self.partner.contents)+')'
class PopLeftCommand(PopCommand):
__slots__=[]
def __init__(self,
partner,
srcloc,
context_node=None):
PopCommand.__init__(self, partner, srcloc, context_node)
assert((partner is None) or isinstance(partner, PushLeftCommand))
def __copy__(self):
return PopLeftCommand(self.partner, self.srcloc, self.context_node)
def __str__(self):
return 'PopLeftCommand('+str(self.partner.contents)+')'
# The ScopeCommand, ScopeBegin, and ScopeEnd commands are useful to designate
# which commands belong to a particular class definition (or class instance).
# (This is useful later on, when a linear list of commands has been created.)
# They are simply markers an do not do anything. These classes can be ignored.
class ScopeCommand(Command):
__slots__=["node"]
def __init__(self,
node,
srcloc):
Command.__init__(self, srcloc)
self.node = node
#self.srcloc = srcloc
def __copy__(self):
return ScopeCommand(self.node, self.srcloc)
def __str__(self):
if self.node:
return 'ScopeCommand('+self.node.name+')'
else:
return 'ScopeCommand(None)'
class ScopeBegin(ScopeCommand):
__slots__=[]
def __init__(self, node, srcloc):
ScopeCommand.__init__(self, node, srcloc)
def __copy__(self):
return ScopeBegin(self.node, self.srcloc)
def __str__(self):
if self.node:
return 'ScopeBegin('+NodeToStr(self.node)+')'
else:
return 'ScopeBegin(None)'
class ScopeEnd(ScopeCommand):
__slots__=[]
def __init__(self, node, srcloc):
ScopeCommand.__init__(self, node, srcloc)
def __copy__(self):
return ScopeEnd(self.node, self.srcloc)
def __str__(self):
if self.node:
return 'ScopeEnd('+NodeToStr(self.node)+')'
else:
return 'ScopeEnd(None)'
# COMMENTING OUT: NOT NEEDED AT THE MOMENT
#class VarAssignCommand(Command):
# """ VarAssignCommand
#
# This class is used whenever the user makes an explicit request to assign
# a variable to a value (values are text strings).
#
# var_ref The variable name (tecnically speaking, I call this
# a variable descriptor string and it includes at least one of
# the following: the name of a leaf node, a category node name,
# and category name)
# the location in the file where variable appears, and (eventually
# after subsequent lookup), references to the leaf_node, cat_node,
# "Category", and "VarBinding" data structures associated with it.
# text_tmpl Text strings are often simple strings, however more
# generally, they can be strings which include other variables
# (ie templates). In general, templates are lists of alternating
# TextBlocks and VarRefs, (with additional tags and data to
# identify where they occur in in the original user's files).
#
# """
# __slots__=["var_ref","text_tmpl"]
#
# def __init__(self,
# #command_name = '=', <-- ?!?
# var_ref = None,
# text_tmpl=None):
# Command.__init__(self, srcloc)
# self.var_ref = var_ref
# self.text_tmpl = text_tmpl
class ModCommand(object):
__slots__=["command","multi_descr_str"]
def __init__(self,
command,
multi_descr_str):
self.command = command
self.multi_descr_str = multi_descr_str
def __str__(self):
return 'ModCommand('+str(self.command)+')'
def __copy__(self):
return ModCommand(self.command.__copy__(), self.multi_descr_str)
def CopyTmplList(source_tmpl_list, dest_cpy):
for entry in source_tmpl_list:
if isinstance(entry, TextBlock):
dest_cpy.append(entry) # Then make a shallow copy
# (pointer assignment) to the text
# block (Text blocks do not change
# during instantiation.)
elif isinstance(entry, VarRef):
assert(len(entry.prefix)>0)
if entry.prefix[0] == '@': # '@' vars refer to static data
dest_cpy.append(entry) # Then make a shallow copy
# pointer assignment) to the static
# variable. (Static variables do
# not change during instantiation.)
elif entry.prefix[0] == '$': # new '$' vars are created
# during every instantiation.
# var_refs do change when you instantiate them. So
# create a new VarRef object, and copy the attributes.
var_ref = VarRef(entry.prefix,
entry.descr_str,
entry.suffix,
entry.srcloc)
# Note: for instance variables ('$' vars)
# "entry.nptr" should not contain
# any data yet, so we just ignore it.
# I assert this below:
assert((entry.nptr.cat_node is None) and
(entry.nptr.leaf_node is None))
dest_cpy.append(var_ref)
else:
assert(False) # prefix[0] should be either '@' or '$'
else:
assert(False) # type(entry) should be either TextBlock or VarRef
def RecursiveJoin(tokens_expr, delimiter = ''):
""" RecursiveJoin() converts a tree-like list/tuple of tokens, for example:
['a ', ('tree', '-', ['like', 'container']), [[' '], 'of'], ' strings']
to an ordinary string, eg:
'a tree-like container of strings'
This behavees similarly to "reduce(lambda a, b: a+b, tokens)",
except that it works with arbitrarily nested lists/tuples."""
text = ''
if isinstance(tokens_expr, basestring):
return tokens_expr
else:
text_lstr = []
for i in range(0, len(tokens_expr)):
text.append( TokensToStr(tokens_expr[i]) )
return ''.join(text_lstr, delimiter)
#----------------------------------------------------------
#----------------------------------------------------------
# The following code is specific to ttree.
#
# (Up until this point, we have only defined
# a few simple general text parsing routines.)
#----------------------------------------------------------
#----------------------------------------------------------
def PtknsToStr(path_tokens):
"""
There are three ways to store paths:
As a single string: '/Protein/Phe/Ca' <- the format entered by the user
As a list of tokens ['Protein', 'Phe', 'Ca'] <- split into tokens
As a list of nodes in a tree (pointers to nodes in a tree hierarchy)
This function converts between the first two formats.
"""
text = ''
if len(path_tokens) > 0:
text = path_tokens[0]
for i in range(1, len(path_tokens)):
text += '/' + path_tokens[i]
else:
text = ''
return text
def StrToPtkns(path_string):
""" The inverse of PtknsToStr(), this function splits a string like
'/usr/local/../bin/awk' into ['usr','local','..','bin','awk'].
For illustrative purposes only. Use text.split('/') directly instead."""
return orig_text.split('/')
def FindChild(name, node, dbg_loc):
""" FindChild looks over the list of node.children to find a child
which matches the name given in the first argument.
If it is not found, it returns None.
Note: I have not yet specified what kind of nodes FindChild() operates
on. Both StaticObjs and InstanceObjs have self.children and self.parent.
However only StaticObjs have "self.class_parents".
("class_parents" are "parents" in the object-oriented sense.)
If "node" (2nd argument) happens t be an StaticObj, this means it also
We must search over the children of these class_parents as well.
Terminology used here differs from Object Oriented Programming
Children in node.children are not children in the object-oriented
programming sense. However, in OOP, "children" are objects that share all
of the traits of their ancestors (and may have additionl traits as well).
I have implemented OOP style children and parents, but this informtion
is stored in "node.class_parents", instead of "node.parents".
For comparison, instantiated nodes (InstanceObjs) are different. Altough
instantiated classes (InstanceObjs) have access to the attributes of the
class_parents of the StaticObjs that define them, they do not remember the
ownership of that data. (It just gets merged with their own member data,
including their .children.)
Hence we must treat StaticObjs carefully because their are two ways we can
access child data. We should loop over both of them. We do that below:
"""
child = node.children.get(name)
if child:
return child
if isinstance(node, StaticObj):
# The object-oriented inheritance stuff appears here.
# If you don't care about OOP or inheritance,
# then comment out the loop that follows:
# Search recursively over the "children" (ie attributes or members)
# belonging to any OOP ancestors of this node.
for class_parent in node.class_parents:
child = FindChild(name, class_parent, dbg_loc)
if child != None:
return child
for namespace_node in node.namespaces:
child = FindChild(name, namespace_node, dbg_loc)
if child != None:
return child
else:
assert(isinstance(node, InstanceObjBasic))
# Otherwise, a child name match was not found
return None
def FollowPath(path_tokens, starting_node, dbg_loc):
""" FollowPath() returns the "last_node", a node whose position in the
tree is indicated by a list of path_tokens, describing the names
of nodes connecting "starting_node" to "last_node".
If it one of the strings in the list of path_tokens turns out
not to match then names of classes in the tree, then this function
returns the last_node that did match before the error occurred,
as well as an integer which stores the number of tokens in
the path_tokens list which were successfully processed.
In other words, the list of node naes is not a full path, but the
relative path that takes you from one node (not necessarily the root)
to another. Return Value:
Ideally, each node in the list should be a parent or a child of the
previous node. (See comment for PathTokensToStr(), for more details.)
This function returns the number of path_tokens successfully
parsed. Under normal termination, this is len(path_tokens).
If the path can not be followed (because at some point, a child
or parent does not exist), then this function returns a number
smaller than len(path_tokens).
We let the caller handle undefined paths. """
#print(' FollowPath() invoked on: ', path_tokens)
if len(path_tokens) == 0:
return 0, starting_node
node = starting_node
# Is this path a relative path, or a full path?
# If the path-string began with '/', then it's a full path. This means
# that after processing by split('/'), the first token will be ''
# Example: path_tokens='/Prot/Alanine'.split('/')
# --> path_tokens[0] == ''
if path_tokens[0] == '':
# In that case, then take us to the root node:
while node.parent != None:
node = node.parent
#sys.stdout.write('FollowPath(): Retreating to node \"'+node.name+'\"\n')
i0 = 1 # <- We've just processed the first token. Skip over it later.
else:
i0 = 0
i = i0
while i < len(path_tokens):
if path_tokens[i] == '..':
if node.parent is None:
return i, node # <-return the index into the token list
# Caller will know that something went awry
# if the return value is not equal to the
# length of the token list
else:
node = node.parent
i += 1
elif path_tokens[i] == '...':
node_before_ellipsis = node
if i == len(path_tokens)-1:
return i, node_before_ellipsis
search_target = path_tokens[i+1]
# Now search over the "children" of this node
# for one who's name matches path_tokens[i].
# If not found, then move up to the parent node's children.
# (This is not an exhaustive tree search. Only the nodes which
# are immediate children of this node's parents are searched.)
while node != None:
child = FindChild(search_target, node, dbg_loc)
if child is None:
node = node.parent
else:
node = child
break
if node is None:
# Caller will know that something went awry if the return
# value is not equal to the length of the token list.
return i, node_before_ellipsis
i += 2
elif path_tokens[i] in ('','.'): # <-Note we ignore empty tokens from now on.
# (Same convention is used in specifying a
# directory in a filesystem, eg. using /usr/local
# or /usr//local or /usr/./local. These are all equivalent.)
i += 1
else:
# Now search over the "children" of this
# node for one who's name matches path_tokens[i].
child = FindChild(path_tokens[i], node, dbg_loc)
if child is None:
# In that case, return with the node_list incomplete.
# Let the caller check to see if something went wrong.
return i, node # <-return the index into the token list (i)
# Caller will know that something went awry
# if the return value is not equal to the
# length of the token list
else:
node = child
i += 1
if node.IsDeleted():
#sys.stderr.write('(debug_msg: encountered deleted node: \"'+node.name+'\")\n')
break
return len(path_tokens), node
def PtknsToNode(path_tokens, starting_node, dbg_loc):
""" PtknsToNode() is identical to def FollowPath() except
that it raises syntax-error exceptions if the path is undefined."""
i_last_ptkn, last_node = FollowPath(path_tokens, starting_node, dbg_loc)
if i_last_ptkn < len(path_tokens):
#assert(isinstance(last_node,StaticObj)) <--why did I assert this? seems wrong
if (last_node.parent is None) and (path_tokens[i_last_ptkn] == '..'):
#In that case, we tried to back out beyond the root of the tree.
raise InputError('Error('+g_module_name+'.PtknsToNode()):\n'
' Invalid variable/class name:\n'
' \"'+PtknsToStr(path_tokens)+'\" located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' There are too many \"..\" tokens in the path string.')
elif path_tokens[i_last_ptkn] == '...':
if i_last_ptkn+1 == len(path_tokens):
raise InputError('Error('+g_module_name+'.PtknsToNode()):\n'
' Error in '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' Expected name following \"...\"\n')
else:
search_target = path_tokens[i_last_ptkn+1]
#In that case, we were unable to find the node referenced by "..."
raise InputError('Error('+g_module_name+'.PtknsToNode()):\n'
' Class or variable \"'+search_target+'\" not found\n'
' in this context: \"'+PtknsToStr(path_tokens)+'\"\n'
' located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno))
else:
#Then the reason is: The string in path_tokens[i_last_ptkn]
#was supposed to be a child of last_node but a child
#of that name was not found.
err_msg = 'Error('+g_module_name+'.PtknsToNode()):\n'+\
' Undefined variable/class name:\n'+\
' \"'+PtknsToStr(path_tokens)+'\",\n'+\
' This occured near or before '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'+\
' (Specifically \"'+path_tokens[i_last_ptkn]+\
'\" is not a subordinate of \"'+MaxLenStr(last_node.name,'/')+'\".)\n'+\
' This may be due to a typo located here or earlier.\n'+\
' It may also occur if you deleted the object earlier. (Referring to a\n'+\
' deleted object is only forgiven when using [0-9] or [0:10] notation.)\n'+\
' If this object refers to an array you must use brackets []\n'+\
' to explicitly specify the element(s) you want from that array.\n'+\
' (To select multiple elements, you can use [*] or [0-9] or [0:10].)\n'
if (path_tokens[i_last_ptkn] in NodeToPtkns(last_node)):
err_msg += '\nIn this case:\n'+\
' It seems like you may have omitted a } character somewhere before:\n'+\
' '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)
raise InputError(err_msg)
assert(False) # One of the two conditions above should be true.
return last_node
def StrToNode(obj_name, starting_node, dbg_loc):
path_tokens = obj_name.split('/')
return PtknsToNode(path_tokens, starting_node, dbg_loc)
def NodeListToPtkns(node_list, dbg_loc=None):
assert(len(node_list) > 0) #The path must contain at least the starting node
path_tokens = [node_list[0].name]
for i in range(1, len(node_list)):
if node_list[i] == node_list[i-1].parent:
path_tokens.append('..')
else:
path_tokens.append(node_list[i].name)
# Now check to make sure the user supplied consistent information:
if (node_list[i] not in node_list[i-1].children.values()):
raise InputError('Error('+g_module_name+'.NodeListToPtkns()):\n'
' Undefined variable/class name:\n'
' \"'+PtknsToStr(path_tokens)+'\" located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' (\"'+path_tokens[i]+'\" is not subordinate to \"'+MaxLenStr(node_list[i-1].name,'/')+'\")\n'
' This could be an internal error.')
return path_tokens
def NodeListToStr(node_list, dbg_loc=None):
assert(len(node_list) > 0) #The path must contain at least the starting node
path_str = node_list[0].name
for i in range(1, len(node_list)):
if node_list[i] == node_list[i-1].parent:
path_str += '/..'
else:
path_str += '/' + node_list[i].name
# Now check to make sure the user supplied consistent information:
if (node_list[i] not in node_list[i-1].children.values()):
err_msg = 'Error('+g_module_name+'.NodeListToStr()):\n'+\
' Invalid variable/class name:\n' +\
' \"'+PtknsToStr(path_tokens)+'\"'
if dbg_loc != None:
err_msg += ' located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)
err_msg += '\n' +\
' (\"'+node_list[i].name+'\" is not a subordinate of \"'+MaxLenStr(node_list[i-1].name,'/')+'\")\n'+\
' This could be an internal error.'
raise InputError(err_msg)
return path_str
def NodeToPtkns(node):
ptkns = []
nd = node
while nd != None:
ptkns.append(nd.name)
nd = nd.parent
ptkns.reverse()
return ptkns
def NodeToStr(node):
ptkns = NodeToPtkns(node)
assert(len(ptkns) > 0)
if node.parent is None:
assert(node.name == '')
return '/'
path_str = ptkns[0]
i = 1
while i < len(ptkns):
path_str += '/'+ptkns[i]
i += 1
return path_str
def CatLeafNodesToTkns(cat_name, cat_node, leaf_node, dbg_loc):
assert((cat_node != None) and (leaf_node != None))
assert((cat_name != None) and (cat_name != ''))
# Determine the path of the cat node
cat_node_ptkns = NodeToPtkns(cat_node)
cat_node_ptkns.append(cat_name+':')
# Determine the path of the leaf node (which should inherit from cat)
deleted = False
leaf_node_ptkns = []
if cat_node != leaf_node:
node = leaf_node
while node.parent != None:
if node.IsDeleted():
deleted = True
leaf_node_ptkns.append('DELETED_'+node.name)
break
leaf_node_ptkns.append(node.name)
if node.parent == cat_node:
break
node = node.parent
leaf_node_ptkns.reverse()
if not deleted:
# Check that leaf inherits from cat. If not, print error.
if ((node.parent != cat_node) and (node != cat_node)):
err_msg = 'Error('+g_module_name+'.CatLeafNodesToPtkns()):\n'+\
' Invalid variable (category:leaf) pair\n'
if dbg_loc != None:
cat_node_str = NodeToStr(cat_node)
leaf_node_str = NodeToStr(leaf_node)
err_msg += ' located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'+\
' (\"'+leaf_node.name+'\" is not in the scope of \"'+cat_node_str+'/'+cat_name+':\")\n'+\
' This will happen if you used the \"category\" command to manually\n'+\
' create a category/counter which is not defined globally.\n'+\
'\n'+\
' Note: Using the analogy of a unix style file system, \n'+\
' the problem is that \"'+leaf_node_str+'\"\n'+\
' is not a subdirectory of \"'+cat_node_str+'\".\n'+\
'\n'+\
' Note: This often occurs when \".../\" is used. In that case, you may\n'+\
' be able to avoid this error by referring to your variable explicitly\n'+\
' by using chains of \"../\" tokens in the path instead of \".../\".\n'
#' Make sure that your variable you are using is defined in \n'+\
#' an environment (currently \"'+leaf_node_str+'\")\n'+\
#' which lies WITHIN the environment where the category was defined.\n'+\
#' (currently \"'+cat_node_str+'\").\n'
raise InputError(err_msg)
else:
err_msg = 'Warning: Strange variable path'
if dbg_loc != None:
err_msg += ' near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)
err_msg += '\n' +\
' The category and leaf nodes for variable \"'+cat_name+':'+leaf_node.name+'\" are the same.\n'+\
' Check to see that this variable is behaving the way you intended.\n'+\
' (It\'s possible this could be an internal error in the program.)\n'
sys.stderr.write(err_msg)
# Merge the list of strings together into a single string:
return cat_node_ptkns + leaf_node_ptkns
def CanonicalCatName(cat_name, cat_node, dbg_loc=None):
# Determine the path of the cat node
tkns = NodeToPtkns(cat_node)
tkns.append(cat_name)
#full_cat_name = tkns[0]
#for i in range(1,len(tkns)):
# full_cat_name += '/'+tkns[i]
# better way:
return '/'.join(tkns)
def CanonicalDescrStr(cat_name, cat_node, leaf_node, dbg_loc=None):
tkns = CatLeafNodesToTkns(cat_name, cat_node, leaf_node, dbg_loc)
descr_str = tkns[0]
for i in range(1, len(tkns)):
if (len(descr_str)>0) and (descr_str[-1] == ':'):
descr_str += tkns[i]
else:
descr_str += '/'+tkns[i]
return descr_str
def CollapsePath(path_tokens):
"""
CollapsePath() takes a list of Strings argument representing a
directory-like path string
(for example '/SUB1A/Sub2A/../Sub2B/sub3b/../sub3c/entry'),
and replaces it with a version which should contain no '..' patterns.
(In the example above, it returns /SUB1A/Sub2B/sub3c/entry')
"""
new_ptkns = []
ndelete = 0
i = len(path_tokens)-1
while i >= 0:
if path_tokens[i] == '..':
ndelete += 1
else:
if (ndelete > 0) and (path_tokens[i] != ''):
# Note: "path_tokens[i] != '')" means "/a/b//c" <-> "/a/b/c"
ndelete -= 1
else:
if len(path_tokens[i]) > 0:
new_ptkns.append(path_tokens[i])
i -= 1
new_ptkns.reverse()
if ndelete > 0:
return ndelete # <-- useful to let caller know an error ocurred
return new_ptkns
def FindCatNode(category_name, current_node, srcloc):
""" Search upwards (toward the ancester nodes), looking for a node
containing a category matching category_name (first argument).
Useful when the user specifies a category name, but neglects to
specify which node it was defined in.
Note: there is no gaurantee that the category node returned by this function
contains an entry in it's "categories" list corresponding to this
category name. You must check for this condition and handle it."""
cat_node = None
node = current_node
while True:
if category_name in node.categories:
cat_node = node
break
elif node.parent != None:
node = node.parent
else:
# node.parent is None, ... we're done
break
if cat_node is None:
assert(node.parent is None)
#sys.stderr.write('Warning near ' +
# ErrorLeader(srcloc.infile,
# srcloc.lineno)+'\n'+
# ' no category named \"'+category_name+'\" found.\n'+
# ' Creating a new global category: /'+
# category_name+':\n')
cat_node = node # the global node
assert(cat_node != None)
return cat_node
def RemoveNullTokens(in_ptkns):
"""This function just gets rid of useless empty tokens in the path ('', '.')
(However if '' appears at the beginning of a path, we leave it alone.)
"""
out_ptkns = []
for i in range(0,len(in_ptkns)):
if ((in_ptkns[i] != '.') and
((in_ptkns[i] != '') or (i==0))):
out_ptkns.append(in_ptkns[i])
# (I'm sure there are ways to write this in python
# using fewer lines of code. Sigh.)
return out_ptkns
def DescrToCatLeafPtkns(descr_str, dbg_loc):
"""
Review: Variables in this program have three parts:
1) A variable category name (designating the type of variable).
2) A variable category path, which consists of a node which is an ancestor
of the variable leaf (1) in the tree
3) A variable name ("leaf"), which refers to a node in the tree
(either a static type tree or instance tree)
DescrToCatLeafPtkns() takes a string describing a variable,
as it appears in a template (ie, a write() command, once it has been
stripped of it's '$' or '@' prefix, and surrounding {} brackets)
...and divides it into strings which specify the location of that leaf in
a static or instance tree, in addition to the name and location of the
category node. Descriptor examples for atoms in water:
"AtomType:/Water/O", There are only 2 --types-- of atoms in
"AtomType:/Water/H", a water molecule. We identify them this way.
"AtomID:O" However each water molecule has 3 atoms, and we
"AtomID:H1" can give each atom in each water molecule a unique
"AtomID:H2" AtomID number. "AtomID:H2" is the id number of the
second hydrogen atom in the current water molecule.
---- Output: This function returns a 3-tuple: ----
leaf_ptkns The name of the variable's leaf node, as well as the list of
tokens denoting the path (named list of nodes) which lead to it.
cat_name The name of the variable category (no path information)
cat_ptkns A --suggestion-- for where to find the node containing the
category mentioned in "cat_name". Same format as leaf_ptkns.
Examples:
"AtomType:/Water/O" cat_name='AtomType', cat_path=[], leaf_ptkns=['','Water','O']
"AtomType:/Water/H" cat_name='AtomType', cat_path=[], leaf_ptkns=['','Water','H']
"AtomID:O" cat_name='AtomID', cat_path=[], leaf_ptkns=['O']
"AtomID:H1" cat_name='AtomID', cat_path=[], leaf_ptkns=['H1']
"AtomID:H2" cat_name='AtomID', cat_path=[], leaf_ptkns=['H2']
"mol:/" cat_name='mol', cat_path=[], leaf_ptkns=['']
"mol:" cat_name='mol', cat_path=[], leaf_ptkns=[]
"mol:../" cat_name='mol', cat_path=[], leaf_ptkns=['..']
"../mol" cat_name='mol', cat_path=[], leaf_ptkns=['..']
"$/peptide[3]/ResID:res[25]" cat_name='ResID', cat_path=['', 'peptide[3]'], leaf_ptkns=['res[25]']
"""
split_colon = descr_str.split(':')
if len(split_colon) > 2:
raise InputError('Error('+g_module_name+'.DescrToCatLeafPtkns())\n'
' Error near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n\n'
' Bad variable descriptor: \"'+descr_str+'\"\n'+
' There can be at most one \':\' character in a variable descriptor.\n')
# ---- Are we using colon syntax (example '$atom:H1')?
elif len(split_colon) == 2:
# The category name = text after the last '/' (if present)and before ':'
cat_ptkns = split_colon[0].split('/')
cat_name = cat_ptkns[-1]
# The text before that is the suggested (category) path
cat_ptkns = cat_ptkns[:-1]
# if len(cat_ptkns) == 0:
# cat_ptkns.append('.')
# The remaining text is the path leading to the leaf node.
if split_colon[1] != '':
leaf_ptkns = split_colon[1].split('/')
else:
leaf_ptkns = []
if (cat_name == ''):
raise InputError('Error('+g_module_name+'.DescrToCatLeafPtkns()):\n'
' Error near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n\n'
' Bad variable descriptor: \"'+descr_str+'\"\n')
else:
# ---- Are we using colon-less syntax (example: "$../mol") ?
ptkns = split_colon[0].split('/')
cat_name = ptkns[-1] # last token (eg. "mol") is the cat_name
leaf_ptkns = ptkns[:-1] # the rest is the leaf's path ("..")
if len(leaf_ptkns) == 0:
leaf_ptkns.append('.')
#cat_ptkns = ptkns[:-1] # the same goes for the cat path suggestion
#if len(cat_ptkns) == 0:
# cat_ptkns.append('.')
cat_ptkns = []
# On 2012-8-22, I commented out this line:
#return cat_name, RemoveNullTokens(cat_ptkns), RemoveNullTokens(leaf_ptkns)
# and replaced it with:
return cat_name, RemoveNullTokens(cat_ptkns), leaf_ptkns
def DescrToCatLeafNodes(descr_str,
context_node,
dbg_loc,
create_missing_nodes=False):
"""
Variables in ttree correspond to nodes in a tree
(and also categories to which they belong).
DescrToCatLeafNodes() reads the name of a variable,
(its descriptor) and determines where in the tree
does this variable reside, and what is it's category?
This function is the heart of ttree because it is
the function used to interpret ttree variable syntax.
(It is very messy right now. I will clean up the code later. AJ 2011-9-06)
Arguments:
descr_str The complete name that the user gave
to the variable. (Excluding '$' or '@')
context_node The class (node) in which the variable
was used. descr_str is interpeted
relative to this context. (This argument
is similar to the current directory
in which a command was issued in unix.)
dbg_loc The location in the user's input file(s)
where this variable is referred to.
create_missing_nodes
If we lookup a variable whose leaf node
does not exist yet, should we create it?
Setting this argument to "True" allows
us to augment the tree to add nodes
corresponding to variables.
-- Here is a greatly simplified version of DescrToCatLeafNodes(): --
def DescrToCatLeafNodes(descr_str, context_node, dbg_loc):
cat_name, cat_ptkns, leaf_ptkns = DescrToCatLeafPtkns(descr_str, dbg_loc)
cat_node = PtknsToNode(cat_ptkns, context_node, dbg_loc)
if len(cat_ptkns) > 0:
leaf_node = PtknsToNode(leaf_ptkns, cat_node, dbg_loc)
else:
leaf_node = PtknsToNode(leaf_ptkns, context_node, dbg_loc)
return cat_name, cat_node, leaf_node
(This version works, but it does not handle "..." corectly,
and it does not create missing nodes when needed.)
-- Here is a (probably unnecessary) review of terminology: --
Descriptor String:
The first argument ("descr_str") is a descriptor string.
A descriptor string typically contains ":" and "/"
characters to to divide the string into pieces in order
to identify a category name, category node, and leaf node.
Conceptually, the variable's NAME is the leaf node.
The variable's TYPE is the category (node and name).
Node:
Nodes are used to represent both class objects and variable names
1) class objects
Each type of class objects is represented by an StaticObj.
Each instantiated object is represented by an InstanceObj.
2) variable names (leaf nodes)
However variable names are also represented using either
StaticObjs (for @ static variables) or
InstanceObjs (for $ instance variables)
Again, all variables in ttree are members of a class object.
In this case, the name of the node corresponds to the variable's
name, and it's position in the tree refers to the class to which
it belongs.
However "leaf nodes" do not uniquely identify the
actual variable itself. A single node can refer to two different
variables if they are in different categories.
All 3 identifiers (leaf node, category node, category name)
are needed to uniquely identify a ttree variable. See below.
Ptkn (Path Token)
Strings containing multiple '/' characters are typically used
to identify the location of the category and leaf nodes in the
tree (ie the path to the node). The '/' characters are
delimiters which break up the string into small pieces, (which
are usually the names of classes).
These pieces are called "path tokens" or "ptkns"
Leaf Node:
It exists as a node in a tree (instead of a simple string)
because, just like member variables in a class in an
object oriented programming language (or in a C struct)
language, variables in ttree belong to the class in
which they are defined. The node's location in the
tree represents which class it belongs to.
If a variable's leaf node name
refers to a node which does no exist yet, then we create it
(assuming the "create_missing_nodes" argument is "True").
Category Node/Name:
Categories are a peculiar feature of ttree. Categories
are groups of variables that share the same counter when
numeric values are automatically given to each variable.
So you can think of a category as a counter with a name.
Variables in different categories have different counters,
and are assigned numeric values independently.
Consequently two variables in different categories
may be assigned the same number. But two variables
in the same category are always given unique values.
Counters are typically global, but can have local scope.
(ie, only defined within a Class, or an instantiated
class, and whatever other classes are nested or
instantiated beneath it.)
Therefore to identify a counter/category you must specify
both a name AND a node. The node identifies the class where
the scope is defined. It is assumed that the Leaf Node
(see above) lies within this scope (ie. somewhere after
it in the tree).
Example: local counters are used to keep track of the
residues within in a protein chain. If we use a class to
represent the protein, we can create a local residue-
counter (category) within that protein. Then when we
instantiate the protein multiple times, this counter
is reset for every new instance of of the protein.
"""
cat_name, cat_ptkns, leaf_ptkns = DescrToCatLeafPtkns(descr_str, dbg_loc)
# ---- ellipsis hack ----
#
# Search for class:
# Most users expect ttree.py to behave like a
# standard programming language: If the class they are
# instantiating was not defined in this specific
# location, they expect ttree.py to search for
# it outwards, first in the parent's environment,
# and then in the parent's parent's environment,
# and so on, until the object is found.
# For example, most users expect this to work:
# class Res{
# write("Atoms") {
# $atom:CA @atom:CA 0.123 1.234 2.345
# $atom:CB @atom:CB 1.234 2.345 3.456
# }
# }
# class Protein{
# write_once("AnglesByType") {
# @angle:backbone @atom:Res/CA @atom:Res/CA @atom:Res/CA
# }
# Notice that in class Protein, we did not have to specify
# where "Res" was defined because it is defined in the parent
# environment (ie. immediately outside Proteins's environment).
# The general way to do this in ttree.py, is to
# use ellipsis syntax "@atom:.../Res/CA" symbol. The
# ellipsis ".../" tells ttree.py to search upwards
# for the object to the right of it ("Res")
# In order to make ttree.py behave the way
# most users are expecting, we artificially insert a
# ".../" before the class name here. (Later on, the
# code that processes the ".../" symbol will take
# care of finding A. We don't have to worry about
# about doing that now.)
#
# I think we only want to do this for variables with path information
# such as "@atom:Res/CA" (which means that leaf_ptkns = ['Res', 'CA']).
# For simple variables like "@atom:CA", we don't automatically look upwards
# unless the user eplicitly requests it.
# (That's why we check to make sure that len(leaf_ptkns) > 1 below
# before we insert '...' into the leaf_ptkns.)
# In other words, the two variables "@atom:CA" below are treated differently
#
# A {
# write("Atoms") {
# @atom:CA
# }
# class B {
# write("Atoms") {
# @atom:CA
# }
# }
# }
#
if ((descr_str.find(':') != -1) and
#(not ((len(leaf_ptkns) == 1) and
# (leaf_ptkns[0] == context_node.name))) and
#(len(leaf_ptkns) > 0) and
(len(leaf_ptkns) > 1) and
(len(leaf_ptkns[0]) > 0) and
(leaf_ptkns[0][0] not in ('.','*','?'))):
leaf_ptkns.insert(0, '...')
# ---- Done with "ellipsis hack" -----
#sys.stderr.write(' DescrToCatLeafNodes(): (cat_ptkns, cat_name, lptkns) = ('+
# str(cat_ptkns)+', \"'+cat_name+'\", '+str(leaf_ptkns)+')\n')
cat_node = None
cat_start_node = context_node
leaf_start_node = context_node
if (len(cat_ptkns) > 0):
if cat_ptkns[-1] == '...':
# The "..." in this position means trace the path from the
# current node (context_node) up to cat_ptkns[:-1].
cat_start_node = PtknsToNode(cat_ptkns[:-1], context_node, dbg_loc)
# Later on, we will search upwards until we find an ancestor
# node containing a category matching cat_name. This will
# be taken care of later. (See "if cat_node is None:" below.)
else:
# In this case, the user supplied an explicit path
# for the category node. Find it now.
cat_node = PtknsToNode(cat_ptkns, context_node, dbg_loc)
# Whenever the user supplies an explicit path, then
# the cat node should be the starting location from
# which the leaf path is interpreted. This nearly
# insures that the leaf node will be an ancestor
# of the category node, which is what we want.
leaf_start_node = cat_node
if cat_node is None:
# Otherwise, the user did not indicate where the category
# node is defined, but only supplied the category name.
# (This is the most common scenario.)
# In this case, climb up the tree to the parent
# until you find an ancestor with a category whose
# name matches cat_name.
cat_node = FindCatNode(cat_name, cat_start_node, dbg_loc)
if (cat_name not in cat_node.categories):
if create_missing_nodes:
# If this is the first time we encountered a variable in this
# category (ie if it's the first time we encountered a variable
# with this category's name and node), then we must create a
# new entry in the cat_node.categories associative container
# (using cat_name as the dictionary key).
cat_node.categories[cat_name] = Category(cat_name)
else:
raise InputError('Error('+g_module_name+'.DescrToCatLeafNodes()):\n'
' Error near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' Category named \"'+cat_name+'\" not found at\n'
' position '+NodeToStr(cat_node)+'\n')
# ---------- Now look up the leaf node -----------
if (len(leaf_ptkns) > 0) and (leaf_ptkns[-1] == 'query()'):
# Special case: "query()"
# Variables named "query()" are not really variables.
# (They are a way for users to query a category's counter.)
# But we treat them as such internally. Consequently we
# give them unique names to avoid clashes (just in case
# "query()" appears multiple times in the same context).
#leaf_ptkns[-1] = '__query__'+dbg_loc.infile+'_'+str(dbg_loc.lineno)
leaf_ptkns[-1] = '__query__' + str(dbg_loc.order)
# Lookup the path for the leaf:
#
# Often, the leaf that the path refers to does not
# exist yet. For example, it is common for a template to
# contain a reference to "$atom:CA". If the current context_node
# is "/protein1/res22", this means that the leaf should be
# at "/protein1/res22/CA". (However in this example, "CA"
# is not a class that has been defined yet. It is the name
# of a variable which which may not have even been mentioned
# before. Think of "CA" as a variable placeholder.
#
# So we follow the path tokens as far as we can:
i_last_ptkn, last_node = FollowPath(leaf_ptkns,
leaf_start_node,
dbg_loc)
# Did we find the node?
if i_last_ptkn == len(leaf_ptkns):
leaf_node = last_node
else:
# If we are here, then we did not find the node.
# The unrecognized token is stored in
# leaf_ptkns[i_last_ptkn]
if leaf_ptkns[i_last_ptkn] == '...':
# ----------------------------------------------
# ---- UGHH I hate dealing with '...' ----
# ----(Messy code to follow in this section)----
# ----------------------------------------------
# The "..." means different things depending on
# whether or not it is the last token in leaf_ptkns.
if i_last_ptkn+1 < len(leaf_ptkns):
# If "..." is NOT the last token in leaf_ptkns, we
# should search for an ancestor of this node who has
# a child whose name matches a the requested target
# string (located in leaf_ptkns[i_last_ptkn+1])
search_target = leaf_ptkns[i_last_ptkn+1]
# If such an ancestor exists, then FollowPath()
# should have already found it for us.
# This means it was not found.
# So if there is only one more token in the
# list of tokens, then create the needed node
if (create_missing_nodes and
(i_last_ptkn+1 == len(leaf_ptkns)-1)):
# Create a new leaf node and link it:
new_leaf_name = leaf_ptkns[-1]
parent_node = last_node
# Is this parent_node an StaticObj? (..or inherit from StaticObj?)
if isinstance(parent_node, StaticObj):
parent_node.children[new_leaf_name] = StaticObj(new_leaf_name, parent_node)
elif isinstance(parent_node, InstanceObj):
parent_node.children[new_leaf_name] = InstanceObjBasic(new_leaf_name, parent_node)
else:
assert(False) # (only 2 types of nodes are possible)
# Now assign the pointer
leaf_node = parent_node.children[new_leaf_name]
else:
#In that case, we were unable to find the node referenced by "..."
raise InputError('Error('+g_module_name+'.DescrToCatLeafNodes()):\n'
' Broken path.\n' # containing ellipsis (...)\n'
' class/variable \"'+search_target+'\" not found in this\n'
' context: \"'
#+var_ref.prefix + var_ref.descr_str + var_ref.suffix+'\"\n'
+descr_str+'\"\n'
' located near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno))
else: # if i_last_ptkn+1 < len(leaf_ptkns):
# If "..." IS the last token, then it means:
# we want to search for the CATEGORY NAME,
# This is very different.
# It means we need to:
# search backwards up the ancestor tree until
# we find an ancestor variable (of last_node)
# which has the right category, (ie until you
# find an ancestor node with a variable (VarRef)
# pointing to it with belonging to the correct
# category node and name (determined above).)
# If not found, then use the current context_node.
assert(cat_name in cat_node.categories)
var_bindings = cat_node.categories[cat_name].bindings
node = last_node
while (node != None):
# Recall that cat_node.categories[cat_name]
# is a dictionary whose keys are leaf nodes
# corresponding to the variables in this category.
if node in var_bindings:
# then we found it, and we're done
break
else:
node = node.parent
if node != None:
leaf_node = node
else:
# If not found, have it point to the
# current (context) node.
leaf_node = context_node
# -----------------------------------------------
# -- Finished dealing with '...' in leaf_ptkns --
# -----------------------------------------------
elif (create_missing_nodes and
((i_last_ptkn == len(leaf_ptkns)-1) or
HasWildCard('/'.join(leaf_ptkns)))):
#elif (create_missing_nodes and
# (i_last_ptkn == len(leaf_ptkns)-1)):
# Again, another reason the leaf-node was not found is
# that it refers to a leaf node which has not yet been
# created. If the path was valid until up to the last
# token, then we sould create a new node with this name.
# -- This is a common scenario. --
# -- This is how all new variables are created. --
# Anyway, we handle that here:
# Create a new leaf node and link it:
new_leaf_name = leaf_ptkns[-1]
new_leaf_name = '/'.join(leaf_ptkns[i_last_ptkn:])
parent_node = last_node
# Is this parent_node an StaticObj? (..or does it inherit from StaticObj?)
if isinstance(parent_node, StaticObj):
parent_node.children[new_leaf_name] = StaticObj(new_leaf_name, parent_node)
elif isinstance(parent_node, InstanceObj):
parent_node.children[new_leaf_name] = InstanceObjBasic(new_leaf_name, parent_node)
else:
assert(False) # (only 2 types of nodes are possible)
# Now assign the pointer
leaf_node = parent_node.children[new_leaf_name]
else:
# Otherwise, the user made a mistake in the path.
# Figure out which kind of mistake and print an error.
if (last_node.parent is None) and (leaf_ptkns[i_last_ptkn] == '..'):
#In that case, we tried to back out beyond the root of the tree.
raise InputError('Error('+g_module_name+'.DescrToCatLeafNodes()):\n'
' Broken path in variable:\n'
#' \"'+var_ref.prefix + var_ref.descr_str + var_ref.suffix+'\"\n'
' \"'+ descr_str + '\"\n'
' located near '+
ErrorLeader(dbg_loc.infile,
dbg_loc.lineno)+'\n'
' There are too many \"..\" tokens in the path string.')
else:
#Then the reason is: The string in leaf_ptkns[i_last_ptkn]
#was supposed to be a child of last_node but a child
#of that name was not found.
raise InputError('Error('+g_module_name+'.DescrToCatLeafNodes()):\n'
' Broken path / Undefined variable:\n'
#' \"'+var_ref.prefix + var_ref.descr_str + var_ref.suffix+'\"\n'
' \"'+ descr_str + '\"\n'
' located near '+
ErrorLeader(dbg_loc.infile,
dbg_loc.lineno)+'\n'
' Undefined: \"'+PtknsToStr(leaf_ptkns)+'\"\n'
' (Specifically \"'+leaf_ptkns[i_last_ptkn]+
'\" is not a subordinate of \"'+MaxLenStr(last_node.name,'/')+'\")')
#'\n This could be a typo or spelling error.')
return cat_name, cat_node, leaf_node
def DescrToVarBinding(descr_str, context_node, dbg_loc):
""" DescrToVarBinding() is identical to LookupVar(), but it has a name
that is harder to remember. See comment for LookupVar() below.
"""
cat_name, cat_node, leaf_node = DescrToCatLeafNodes(descr_str,
context_node,
dbg_loc)
if cat_name in cat_node.categories:
category = cat_node.categories[cat_name]
var_bindings = category.bindings
if leaf_node in var_bindings:
var_binding = var_bindings[leaf_node]
else:
raise InputError('Error('+g_module_name+'.DescrToVarBinding()):\n'
' Error near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' Bad variable reference: \"'+descr_str+'\". There is\n'
' There no category named \"'+cat_name+'\" defined for "'+NodeToStr(cat_node)+'\".\n')
else:
raise InputError('Error('+g_module_name+'.DescrToVarBinding()):\n'
' Error near '+ErrorLeader(dbg_loc.infile, dbg_loc.lineno)+'\n'
' Bad variable reference: \"'+descr_str+'\". There is\n'
' no category named \"'+cat_name+'\" defined for "'+NodeToStr(cat_node)+'\".\n')
return var_binding
# Wrappers:
def LookupVar(descr_str, context_node, dbg_loc):
""" LookupVar() looks up a string (a variable descriptor, which is the
variable's name, excluding the '$', '@' prefixes and any '{}' brackets.)
This function returns the variable's "VarBinding" (the variable-name:value
pair). This is useful for querying or changing the value of a variable.
Because nearly all variables are local, you must specify the starting
node (ie. the node corresponding to the class in which this class
or variable was referred to). This is typically the global node.
"""
return DescrToVarBinding(descr_str, context_node, dbg_loc)
def LookupNode(obj_name, starting_node, dbg_loc):
""" LookupNode() parses through a string like
'../ClassA/NestedClassB'
and returns the corresponding node.
Nodes are data types used for representing a class or class instance.
They are also used for storing variables.
'ClassA/NestedClassB/VariableC'
Because nearly all variables are local, you must specify the starting
node (ie. the node corresponding to the class in which this class
or variable was referred to). This is typically the global node.
"""
return StrToNode(obj_name, starting_node, dbg_loc)
class SimpleCounter(object):
__slots__=["n","nincr"]
def __init__(self, n0 = 1, nincr = 1):
self.n = n0 - nincr
self.nincr = nincr
def query(self):
return self.n
def incr(self):
self.n += self.nincr
def __copy__(self): #makes a (deep) copy of the counter in its current state
return SimpleCounter(self.n + self.nincr, self.nincr)
class Category(object):
"""
Category contains a list of all of the variables which belong
to the same category, as well as some supporting information.
Attributes:
name The name of the category (a string)
bindings An OrderedDict() containing leaf_node:VarBinding
(key:value) pairs. Variables are looked up by their leaf node.
The actual variable name (which simply refers to the leaf node)
and values are both stored in the VarBinding data structure.
counter A counter object like "SimpleCounter". Each time counter.incr()
is invoked it should return a unique string (typically this is
simply a string representing an integer which is incremented).
"""
__slots__=["name","bindings","counter","manual_assignments","reserved_values"]
def __init__(self,
name = '',
bindings = None,
counter = None,
manual_assignments = None,
reserved_values = None):
self.name = name
if bindings is None:
self.bindings = OrderedDict()
else:
self.bindings = bindings
if counter is None:
self.counter = SimpleCounter(1,1)
else:
self.counter = counter
if manual_assignments is None:
self.manual_assignments = OrderedDict()
else:
self.manual_assignments = manual_assignments
if reserved_values is None:
self.reserved_values = OrderedDict()
else:
self.reserved_values = reserved_values
class StaticObj(object):
""" StaticObjs and InstanceObjs:
The state of the system is stored in two different trees:
1) The static tree:
StaticObj trees are similar "class" definitions in an OOP language.
These trees contains class definitions, and their nested classes,
and instructions for how to create new instances (copies) of this class.
Nodes in this tree are stored using StaticObjs:
2) The instance tree:
This tree contains classes that have been instantiated, and any sub-
classes (members or attributes) that are instantiated as a result.
This tree is automatically generated by instantiating the root
StaticObj. Nodes in this tree are stored using InstanceObjs.
StaticObjs and InstanceObjs both contain
"commands" (commands which usually involve instructions
for writing templates)
"categories" (local counters used to assign variables. See below.)
"children" (Nested class definitions -NOT- OOP child classes. See below.)
StaticObjs also contain
"instance_commands"
"instance_categories"
These three members contain information to create a new instance/copy
of this class (how to construct an InstanceObj from an StaticObj).
StaticObj contains the member function Parse() which builds the global static
tree by parsing the contents of a text file supplied by the user.
The external function BuildInstanceTree(), creates the global instance tree
from the global static tree (a tree of StaticObjs).
----- CLASS MEMBERS OF StaticObj: ----
0) Name:
Every class (object type) has a name. It is stored in self.name.
To make it easier to distinguish the names of classes from the names of
individual instances of that class, I recommend using a capital letter
for the name of a class type (and lower-case letters for instances).
1) Commands
Commands are usually instructions for writing templates.
Templates are blocks of ordinary text which contain variables.
(Variables in this program consist of variable names, categories,
and (eventually) bound values (usually generated automatically),
which will be substituted into the template to generate a text file.)
A class can contain multiple templates, each one having a unique name
which also happens to be the name of the file that will be created when
the template is written.
Variants:
self.commands:
Some templates are written immediate after the class is defined
(stored in "self.commands").
Example: The "write_once()" command.
self.instance_commands:
Other templates are written when an instance/copy of the class is created
(stored in "self.instance_commands".
Example: The "write()" command.
2) Children
self.children:
Class definitions can be defined from within the definition of other
("parent") classes. These nested classes are referred to as "children".
These sub-classes are not "children" in the OOP sense of the word at
all (they do not have any of the the traits of their "parents").
However in the source code I refer to them as "children" because here
they are implemented as "child" nodes (branches) in the tree-like
data-structure used to store class definitions (the static tree).
3) Categories
This is a new concept and is difficult to explain.
Recall that each class contains a list of templates containing raw text,
interspersed with variables (whose values will determined later).
In most cases, variables are assigned to integer values which are
automatically generated by incrementing a counter. Simply put,
"categories" are collections of variables which share the same counter.
Within a category, the goal is to assign a unique integer (or other
symbol) to each distinct variable in this category.
To avoid name-clashes, variable names have local "scope".
This scope is the "leaf_token"
Categories can be specific to a particular class (node), and any of the
classes (nodes) which are nested within it, but by default are global.
(This means they "belong" to the global (outermost) node by default.)
All the various categories which are defined within a particular
StaticObj are stored in self.categories.
Static variables (ie. variables with a '@' prefix) are stored this way.
"self.categories"
If a class contains a new category, it means that if any nested
classes defined within that class definition contain (static, '@')
variables whose categories match the category name, their values will
be determined by looking up the couter associated with this category
stored locally (here) in self.categories. All variables belonging
to this category are stored in "self.categories[category_name]".
"self.instance_categories"
Recall that creating a new copy (instance) of a class automatically
creates an InstanceObj in the instance-tree. InstanceObj's have a
".categories" attribute of their own, the contents of which are
copied from this StaticObj's "self.instance_categories" attribute.
Instantiating a new class also spawns the instantiation of any
sub-classes.
If any of these "instance children" contain variables whose category
names match a category stored in the parent InstanceObj's .categories
dictionary, then their values will be determined by that InstanceObj's
counter for that category name.
4) Parent:
A link to the parent StaticObj is stored in self.parent.
"""
__slots__=["name",
"parent",
"children",
"categories",
"commands",
"srcloc_begin",
"srcloc_end",
"deleted",
"class_parents",
"namespaces",
"instname_refs",
"instance_categories",
"instance_commands_push",
"instance_commands",
"instance_commands_pop"]
def __init__(self,
name='',
parent=None):
"""
The members/attributes of StaticObj are defined in the comment
for StaticObj above. """
# The following members are shared by both InstanceObj and StaticObj:
self.name = name
self.parent = parent #For traversing the global static template tree
self.children = OrderedDict() # Nested class definitions.
self.categories=OrderedDict() #<- new variable categories that are only defined
# in the context of this molecule's type definition
self.commands=[] # Commands to carry out (only once)
##vb##self.var_bindings=[] # List of variables assigned to this object.
self.srcloc_begin = None # Keep track of location in user files
self.srcloc_end = None # (useful for error message reporting)
self.deleted = False # Users can delete static objects?
# (why not?)
# The following members are not shared with InstanceObj:
self.class_parents = [] # classes we inherit traits from (this is
# similar to the parent/child relationship
# in an object-oriented-programming language)
self.namespaces = [] # A list of classes we also look in when searching
# for other static nodes or variables. (similar to
# class_parents, but only used for searches.)
self.instname_refs = {} # <-- used for debugging to insure that
# two instances do not have the same name
self.instance_categories=OrderedDict()#<-new variable categories that are defined
#within the scope of this molecule's instance
self.instance_commands_push=[] #1)process these commands first by adding
# these commands to InstanceObj.commands
# (before you deal with class_parents)
self.instance_commands=[] #2) then add this to InstanceObj.commands
self.instance_commands_pop=[] #3) finally add these commands
def DeleteSelf(self):
for child in self.children.values():
child.DeleteSelf()
self.deleted = True
def IsDeleted(self):
return self.deleted
##vb##def AddVarBinding(self, var_binding):
##vb## if self.var_bindings is None:
##vb## self.var_bindings = [var_binding]
##vb## else:
##vb## self.var_bindings.append(var_binding)
def Parse(self, lex):
""" Parse() builds a static tree of StaticObjs by parsing text file.
-The "lex" argument is a file or input stream which has been converted
to a "TemplateLexer" object (similar to the python's built-in shlex lexer).
"""
#sys.stdout.write(' -- Parse() invoked --\n')
# Keep track of the location in the users' input files where this
# class object is first defined. (Keep in mind that the user might
# augment their original class definition, adding new content to an
# existing class. In that case self.srcloc_begin will have already
# been assigned. We don't want to overwrite it in that case.)
if self.srcloc_begin is None: # <-- not defined yet?
self.srcloc_begin = lex.GetSrcLoc()
while True:
cmd_token = lex.get_token()
#print('Parse(): token = \"'+cmd_token+'\", '+lex.error_leader())
if cmd_token == lex.eof:
#print('Parse(): EOF encountered\n')
break
if ((cmd_token == 'write') or
(cmd_token == 'write_once') or
(cmd_token == 'create_var') or
(cmd_token == 'create_vars')):
open_paren = lex.get_token()
#print('Parse(): open_paren=\"'+open_paren+'\"')
if open_paren=='{':
# ..then the user neglected to specify the "dest" file-name
# argument. In that case, supply the default, ''.
# (which is shorthand for the standard out in this case)
open_curly = open_paren[0]
open_paren = ''
close_paren = ''
tmpl_filename = ''
srcloc = lex.GetSrcLoc()
else:
tmpl_filename = lex.get_token()
if tmpl_filename == ')':
tmpl_filename = ''
close_paren = ')'
else:
close_paren = lex.get_token()
open_curly = lex.get_token()
srcloc = lex.GetSrcLoc()
if ((cmd_token == 'create_var') or
(cmd_token == 'create_vars')):
tmpl_filename = None
# This means: define the template without attaching
# a file name to it. (IE., don't write the contents
# of what's enclosed in the curly brackets { } to a file.)
if ((open_curly != '{') or
((open_paren == '') and (close_paren != '')) or
((open_paren == '(') and (close_paren != ')'))):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error in '+lex.error_leader()+'\n\n'
'Syntax error at the beginning of the \"'+cmd_token+'\" command.')
if tmpl_filename != None:
tmpl_filename = RemoveOuterQuotes(tmpl_filename, lex.quotes)
# ( The previous line is similar to:
# tmpl_filename = tmpl_filename.strip(lex.quotes) )
tmpl_contents = lex.ReadTemplate()
StaticObj.CleanupReadTemplate(tmpl_contents, lex)
#sys.stdout.write(' Parse() after ReadTemplate, tokens:\n\n')
#print(tmpl_contents)
#sys.stdout.write('\n----------------\n')
if cmd_token == 'write_once':
# Check for a particular bug:
# Ordinary instance variables (preceded by a '$')
# should never appear in a write_once() statement.
for entry in tmpl_contents:
if (isinstance(entry, VarRef) and
(entry.prefix[0]=='$')):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+ErrorLeader(entry.srcloc.infile,
entry.srcloc.lineno)+'\n'
' Illegal variable: \"'+entry.prefix+entry.descr_str+entry.suffix+'\"\n'
' All variables in a \"write_once()\" statement must be statically\n'
' defined, and hence they must begin with a \'@\' prefix character.\n'
' (not a \'$\' character).\n'
' Suggestion: Use the \"write()\" command instead.\n')
if cmd_token == 'write':
commands = self.instance_commands
elif cmd_token == 'write_once':
commands = self.commands
elif ((cmd_token == 'create_var') or
(cmd_token == 'create_vars')):
commands = self.instance_commands
else:
assert(False)
command = WriteFileCommand(tmpl_filename,
tmpl_contents,
srcloc)
commands.append(command)
# end of "if (cmd_token == 'write') or (cmd_token == 'write_once'):"
elif cmd_token == 'delete':
instobj_descr_str = lex.get_token()
instobj_srcloc = lex.GetSrcLoc()
delete_command = DeleteCommand(instobj_srcloc)
mod_command = ModCommand(delete_command,
instobj_descr_str)
self.instance_commands.append(mod_command)
elif cmd_token == 'using':
namespacecom_str = lex.get_token()
if namespacecom_str != 'namespace':
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' The \"'+cmd_token+'\" command must be followed by the \"namespace\" keyword.')
namespace_str = lex.get_token()
stnode = StrToNode(namespace_str,
self,
lex.GetSrcLoc())
self.namespaces.append(stnode)
elif cmd_token == 'category':
cat_name = lex.get_token()
cat_count_start = 1
cat_count_incr = 1
open_paren = lex.get_token()
if (open_paren == '('):
token = lex.get_token()
if token == ',':
token = lex.get_token()
if token != ')':
# Interpret token as an integer, float, or string
try:
cat_count_start = int(token)
except ValueError:
try:
cat_count_start = float(token)
except ValueError:
cat_count_start = RemoveOuterQuotes(token, '\'\"')
token = lex.get_token()
if token == ',':
token = lex.get_token()
if token != ')':
# Interpret token as an integer,float,or string
try:
cat_count_incr = int(token)
except ValueError:
try:
cat_count_incr = float(token)
except ValueError:
cat_count_incr = RemoveOuterQuotes(token, '\'\"')
token = lex.get_token()
if token != ')':
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+cmd_token+' '+cat_name+'...\" has too many arguments,\n'
' or lacks a close-paren \')\'.\n')
else:
lex.push_token(open_paren)
if (isinstance(cat_count_start, basestring) or
isinstance(cat_count_incr, basestring)):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+cmd_token+' '+cat_name+'('+
str(cat_count_start)+','+
str(cat_count_incr)+')\"\n'
' Only numeric counters are currently supported.\n')
# check for really stupid and unlikely errors:
if type(cat_count_start) is not type(cat_count_incr):
if ((isinstance(cat_count_start, int) or
isinstance(cat_count_start, float))
and
(isinstance(cat_count_incr, int) or
isinstance(cat_count_incr, float))):
cat_count_start = float(cat_count_start)
cat_count_incr = float(cat_count_incr)
else:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' Problem with \"'+cmd_token+'\" command.\n')
prefix = cat_name[0]
cat_name = cat_name[1:]
# Add this category to the list.
if prefix == '@':
self.categories[cat_name] = Category(cat_name)
self.categories[cat_name].counter=SimpleCounter(cat_count_start,
cat_count_incr)
elif prefix == '$':
self.instance_categories[cat_name] = Category(cat_name)
self.instance_categories[cat_name].counter=SimpleCounter(cat_count_start,
cat_count_incr)
else:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' category name = \"'+cat_name+'\" lacks a \'$\' or \'&\' prefix.\n'
' This one-character prefix indicates whether the variables in this\n'
' new category will be static or dynamics variables\n')
elif (cmd_token == '}') or (cmd_token == ''):
# a '}' character means we have reached the end of our scope.
# Stop parsing and let the caller deal with the remaining text.
# (And a '' means we reached the end of the file... I think.)
break
#elif (cmd_token == 'include'):
# "include filename" loads a file (adds it to the file stack)
# The "TtreeShlex" class (from which "lex" inherits) handles
# "include" statements (ie. "source" statements) automatically.
else:
# Otherwise, 'cmd_token' is not a command at all.
# Instead it's the name of an object which needs to be
# defined or instantiated.
# First, let's figure out which.
# (small detail: The "class" keyword is optional
# and can be skipped.)
if cmd_token == 'class':
object_name = lex.get_token()
else:
object_name = cmd_token
next_symbol = lex.get_token()
#print('Parse(): next_token=\"'+next_symbol+'\"')
class_parents = []
if next_symbol == 'inherits':
# Then read in the list of classes which are parents of
# of this class. (Multiple inheritance is allowed.)
# (We don't yet check to insure that these are valid class
# names. We'll do this later in LookupStaticRefs().)
syntax_err_inherits = False
while True:
next_symbol = lex.get_token()
if ((next_symbol == '{') or
(next_symbol == lex.eof)):
break
elif (next_symbol == '='):
syntax_err_inherits = True
break
else:
class_parents.append(StrToNode(next_symbol,
self,
lex.GetSrcLoc()))
if len(class_parents) == 0:
syntax_err_inherits = True
if syntax_err_inherits:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"inherits\" should be followed by one or more class names.\n')
if next_symbol == '{':
child_name = object_name
# Check to see if this class has already been defined.
# (IE. check if it present in the list of children.)
# If the name (child_name) matches another class (child),
# then the contents of the new class will be appended to
# the old. This way, class definitions can be augmented
# later. (This is the way "namespaces" work in C++.)
child = self.children.get(child_name)
# If found, we refer to it as "child".
# If not, then we create a new StaticObj named "child".
if child is None:
child = StaticObj(child_name, self)
self.children[child_name] = child
assert(child.name == child_name)
# Either way we invoke child.Parse(), to
# add contents (class commands) to child.
child.Parse(lex)
child.class_parents += class_parents
elif next_symbol == '=':
next_symbol = lex.get_token()
if next_symbol == 'new':
base_name = object_name
base_srcloc = lex.GetSrcLoc()
array_slice_str = ''
if base_name.find('/') != -1:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+ErrorLeader(base_srcloc.infile,
base_srcloc.lineno)+'\n'
' (You can not instantiate some other object\'s members.)\n'
' Invalid instance name: \"'+base_name+'\"\n')
elif base_name in self.instname_refs:
ref_srcloc = self.instname_refs[base_name]
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Duplicate class/array \"'+base_name+'\"\n'
' This occurs near:\n'
' '+ErrorLeader(ref_srcloc.infile,
ref_srcloc.lineno)+'\n'
' and also near:\n'
' '+ErrorLeader(base_srcloc.infile,
base_srcloc.lineno)+'\n')
else:
self.instname_refs[base_name] = base_srcloc
# Check for syntax allowing the user to instantiate
# PART of an array. For example, check for this syntax:
# "monomers[20-29] = new ...". This only fills in a
# portion of the array from: monomers[20]...monomers[29]
#
# We also have to deal with multidimensional syntax
# like this: "cells[3][2-3][1][4-7] = new..."
# Split the "cells[3][2-3][2][4-7][2]" string into
# "cells[3][", "][1][", and "]".
# Later, we will instantiate InstanceObjs with names:
# "cells[3][2][1][4]"
# "cells[3][2][1][5]"
# "cells[3][2][1][6]"
# "cells[3][2][1][7]"
# "cells[3][3][1][4]"
# "cells[3][3][1][5]"
# "cells[3][3][1][6]"
# "cells[3][3][1][7]"
p1 = base_name.find('[')
if p1 == -1:
p1 = len(base_name)
else:
p1 += 1
array_name_tkns = [ base_name[0:p1] ]
array_name_offsets = []
p2 = -1
p4 = p1
while p4 < len(base_name):
p3 = base_name.find(']', p1)
if p3 == -1:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Expected a \']\' character following:\n'
' \"'+base_name[0:p1]+'\", located near:\n'
' '+ErrorLeader(ref_srcloc.infile,
ref_srcloc.lineno)+'\n')
# Search for a '-', ':', or '*' character between []
# For example "monomers[20-29] = "
# If present, the user wants us to fill a range
# inside an array. This could be a multi-dimensional
# array, (eg "cells[3][2-6][4-11] = "), so we must
# figure out which entries in the array the user
# wants us to fill (in this case, "[2-6][4-11]")
p2 = base_name.find('-', p1)
if p2 == -1:
p2 = len(base_name)
if p2 > p3:
p2 = base_name.find(':', p1)
if p2 == -1:
p2 = len(base_name)
if p2 > p3:
p2 = base_name.find('*', p1)
if p2 == -1:
p2 = len(base_name)
p4 = p3 + 1
if p4 < len(base_name):
if base_name[p4] == '[':
p4 += 1 # skip over it
else:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Expected a \'[\' character forllowing a \']\' character in\n'
' \"'+base_name[0:p2+1]+'\", located near:\n'
' '+ErrorLeader(ref_srcloc.infile,
ref_srcloc.lineno)+'\n')
if p2 > p3:
# Then no '-', ':', or '*' character was found
# between '[' and the subsequent ']' character
# In that case, ignore this token
token = base_name[p1:p4]
# append all this text to the previous token
if len(array_name_tkns) == 0:
array_name_tkns.append(token)
else:
array_name_tkns[-1] = array_name_tkns[-1]+token
array_slice_str = 'slice '
else:
assert((p1 < p2) and (p2 < p3))
index_offset_str = base_name[p1:p2]
if len(index_offset_str) == 0:
index_offset = 0
elif (not str.isdigit(index_offset_str)):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Expected a nonnegative integer preceding the \''+base_name[p2]+'\' character in:\n'
' \"'+base_name[0:p2+1]+'\", located near:\n'
' '+ErrorLeader(ref_srcloc.infile,
ref_srcloc.lineno)+'\n')
else:
index_offset = int(index_offset_str)
token=base_name[p3:p4]
array_name_tkns.append(token)
array_name_offsets.append(index_offset)
p1 = p4
# If the statobj_str token contains a ']' character
# then this means the user wants us to make multiple
# copies of this template. The number of copies
# to instantiate is enclosed in the [] characters
# (Example wat = new Water[3000] creates
# 3000 instantiations of the Water template
# named wat[1], wat[2], wat[3], ... wat[3000]).
# Note: Here '[' and ']' have a special meaning.
# So lex.get_token() should not treat them as
# ordinary word characters. To prevent this:
orig_wordterminators = lex.wordterminators
lex.wordterminators += '[],'
class_name_str = lex.get_token()
if ((class_name_str == lex.eof) or
(class_name_str == '}')):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
'Class ends prematurely. (Incomplete \"new\" statement.)')
assert(len(class_name_str) > 0)
if (class_name_str[0] == '['):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' new '+class_name_str+'\n'
'Bracketed number should be preceeded by a class name.')
class_names = []
weights = []
num_by_type = []
if class_name_str == 'random':
class_names, weights, num_by_type = self._ParseRandom(lex)
tmp_token = lex.get_token()
if len(tmp_token)>0:
if tmp_token[0]=='.':
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+tmp_token+'\" should not follow random()\n'
'\n'
' Coordinate transformations and other commands (such as \"'+tmp_token+'\")\n'
' should appear after each class name inside the random() statement,\n'
' not after it. For example, do not use:\n'
' \"lipids=new random([DPPC,DLPC],[0.5,0.5]).move(0,0,23.6)\"\n'
' Use this instead:\n'
' \"lipids=new random([DPPC.move(0,0,23.6),DLPC.move(0,0,23.6)],[0.5,0.5])\"\n')
lex.push_token(tmp_token)
else:
class_name, class_suffix, class_suffix_srcloc = \
self._ProcessClassName(class_name_str, lex)
array_size = []
array_suffixes = []
array_srclocs = []
# A general "new" statement could look like this:
# "m = new Mol.scale(3) [2].trans(0,4.5,0).rotate(30,0,0,1)
# [3].trans(0,0,4.5)"
# So far we have processed "m = new Mol.scale(3)".
# Now, we need to deal with:
# "[2].trans(0,4.5,0).rotate(30,0,0,1) [3].trans(0,0,4.5)"
while True:
new_token = lex.get_token()
#if ((new_token == '') or (new_token == lex.eof)):
# break
if new_token == '[':
number_str = lex.get_token()
close_bracket = lex.get_token()
if ((not str.isdigit(number_str)) or
(close_bracket != ']')):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error in \"new\" statement near '+lex.error_leader()+'\n'
' A \'[\' character should be followed by a number and a \']\' character.')
array_size.append(int(number_str))
suffix = lex.get_token()
if ((suffix == '') or (suffix == lex.eof)):
array_suffixes.append('')
array_srclocs.append(base_srcloc)
break
if suffix[0] == '.':
lex.push_token(suffix[1:])
suffix_func = lex.GetParenExpr()
suffix = '.' + suffix_func
array_suffixes.append(suffix)
array_srclocs.append(lex.GetSrcLoc())
else:
array_suffixes.append('')
array_srclocs.append(base_srcloc)
lex.push_token(suffix)
if suffix != '[':
break
else:
lex.push_token(new_token)
break
srcloc_final = lex.GetSrcLoc()
lex.wordterminators = orig_wordterminators
assert(len(array_size) == len(array_suffixes))
if len(array_size) > 0:
if len(array_name_offsets) == 0:
assert(len(array_name_tkns) == 1)
array_name_offsets = [0] * len(array_size)
array_name_tkns[0] = array_name_tkns[0] + '['
for d in range(0, len(array_size)-1):
array_name_tkns.append('][')
array_name_tkns.append(']')
if len(array_name_offsets) != len(array_size):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error in \"new\" statement near/before '+lex.error_leader()+'\n'
' Array '+array_slice_str+'dimensionality on the left side of the \'=\' character ('+str(len(array_name_offsets))+')\n'
' does not match the array dimensionality on the right side ('+str(len(array_size))+').\n')
# If the user wants us to instantiate a
# multidimensional array of class instances
# then we must loop through this multidimensional
# array and create a new instance for each entry.
# For example fill a 3 dimensional volume
# with 1000 water molecules
# Example 1:
# solvent = new Water [10][10][10]
# (The coordinates must be read separately.)
# In this example array_size = [10,10,10]
# array_suffixes = ['','','']
# Example 2:
# solvent = new Water.transcm(0,0,0)
# [10].trans(0,0,4)
# [10].trans(0,4,0).rot(45,0,0,1)
# [10].trans(4,0,0)
# (This command generates a 10x10x10 lattice
# simple cubic lattice of regularly spaced
# water molecules pointing the same direction.)
# In this example array_size = [10,10,10]
# and
# class_suffix = 'transcm(0,0,0)'
# and
# array_suffixes = ['trans(0,0,4)',
# 'trans(0,4,0).rot(45,0,0,1)',
# 'trans(4,0,0)']
# Note that tree ignores the "trans()"
# commands, it stores them so that inherited
# classes can attempt to process them.
D = len(array_size)
if D > 0:
i_elem = 0 #(used to look up selection_list[])
if len(num_by_type) > 0:
selection_list = []
for i in range(0, len(num_by_type)):
selection_list += [i]*num_by_type[i]
random.shuffle(selection_list)
num_elements = 1
for d in range(0,D):
num_elements *= array_size[d]
err_msg_str = str(array_size[0])
for d in range(1,D):
err_msg_str += '*'+str(array_size[d])
if num_elements != len(selection_list):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near or before '+lex.error_leader()+'\n'
' The sum of the numbers in the \"new random([],[])\" command ('+str(len(selection_list))+')\n'
' does not equal the number of elements in the array ('+err_msg_str+')\n')
digits = [0 for d in range(0, D)]
table_filled = False
pushed_commands = []
while (not table_filled):
instance_name = array_name_tkns[0]
for d in range(0, D):
i = digits[d]
instance_name+=str(i+
array_name_offsets[d])+\
array_name_tkns[d+1]
# Does the user want us to select
# a class at random?
if len(class_names) > 0:
if len(num_by_type) > 0:
class_name_str = class_names[selection_list[i_elem]]
else:
class_name_str = RandomSelect(class_names,
weights)
class_name, class_suffix, class_suffix_srcloc= \
self._ProcessClassName(class_name_str, lex)
if class_suffix != '':
class_suffix_command = \
PushRightCommand(class_suffix.lstrip('.'),
class_suffix_srcloc)
self.instance_commands.append(class_suffix_command)
command = \
InstantiateCommand(instance_name,
ClassReference(class_name,
base_srcloc),
base_srcloc)
self.instance_commands.append(command)
if class_suffix != '':
command = \
PopRightCommand(class_suffix_command,
srcloc_final)
self.instance_commands.append(command)
# Now go to the next entry in the table.
# The indices of this table are similar to
# a D-digit integer. We increment this d-digit number now.
d_carry = D-1
while True:
digits[d_carry] += 1
if digits[d_carry] >= array_size[d_carry]:
digits[d_carry] = 0
if array_suffixes[d_carry] != '':
for i in range(0, array_size[d_carry]-1):
partner = pushed_commands.pop()
command = PopRightCommand(partner,
srcloc_final)
self.instance_commands.append(command)
d_carry -= 1
else:
if array_suffixes[d_carry] != '':
command = PushRightCommand(array_suffixes[d_carry].lstrip('.'),
array_srclocs[d_carry])
pushed_commands.append(command)
self.instance_commands.append(command)
break
if d_carry < 0:
table_filled = True
break
i_elem += 1 #(used to look up selection_list[])
pass
else:
if len(class_names) > 0:
assert(len(num_by_type) == 0)
#if len(num_by_type) > 0:
# class_name_str = class_names[selection_list[i_elem]]
#else:
# class_name_str = RandomSelect(class_names,
# weights)
class_name_str = RandomSelect(class_names,
weights)
class_name, class_suffix, class_suffix_srcloc= \
self._ProcessClassName(class_name_str, lex)
if class_suffix != '':
class_suffix_command = \
PushRightCommand(class_suffix.lstrip('.'),
class_suffix_srcloc)
self.instance_commands.append(class_suffix_command)
command = \
InstantiateCommand(base_name,
ClassReference(class_name,
base_srcloc),
base_srcloc)
self.instance_commands.append(command)
if class_suffix != '':
command = \
PopRightCommand(class_suffix_command,
srcloc_final)
self.instance_commands.append(command)
else:
# Now check for commands using this syntax:
#
# "MolNew = MolOld.rot(45,1,0,0).scale(100.0)"
# /|\ /|\ `-----------.------------'
# | | |
# child_name parent_name optional suffix
child_name = object_name
parent_name_str = next_symbol
child = StaticObj(child_name, self)
parent_name, suffix, suffix_srcloc = \
self._ProcessClassName(parent_name_str, lex)
child.class_parents.append(StrToNode(parent_name,
self,
lex.GetSrcLoc()))
if suffix != '':
# Assume the command is a StackableCommand. (This
# way it will enclose the commands of the parents.)
# Stackable commands come in (Push...Pop) pairs.
push_command = PushLeftCommand(suffix,
suffix_srcloc)
pop_command = PopLeftCommand(push_command,
suffix_srcloc)
push_mod_command = ModCommand(push_command, './')
pop_mod_command = ModCommand(pop_command, './')
child.instance_commands_push.append(push_mod_command)
child.instance_commands_pop.insert(0,pop_mod_command)
#sys.stderr.write('child.instance_commands_push = '+str(child.instance_commands_push)+'\n')
#sys.stderr.write('child.instance_commands_pop = '+str(child.instance_commands_pop)+'\n')
# Check to see if this class has already been defined.
if self.children.get(child_name) is not None:
if self.children[i].IsDeleted():
del self.children[child_name]
else:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' The name \"'+child_name+'\" is already in use.')
self.children[child_name] = child
else:
# Otherwise hopefully this is a post-instance command
# (a command applied to a class which has been instantiated)
# In that case, the object_name would be followed by
# a dot and a function-call containing a '(' paren (which
# would have ended up stored in the next_symbol variable).
open_paren_encountered = False
if (next_symbol == '('):
open_paren_encountered = True
lex.push_token(next_symbol) #put '(' back in the stream
i_dot = object_name.rfind('.')
i_slash = object_name.rfind('/')
dot_encountered = ((i_dot != -1) and
((i_slash == -1) or (i_slash < i_dot)))
if (open_paren_encountered and dot_encountered and
(object_name[:1] != '[')):
obj_descr_str, suffix, suffix_srcloc = \
self._ExtractSuffix(object_name, lex)
path_tokens = obj_descr_str.split('/')
i_last_ptkn, staticobj = FollowPath(path_tokens,
self,
lex.GetSrcLoc())
instobj_descr_str = './'+'/'.join(path_tokens[i_last_ptkn:])
# I still support the "object_name.delete()" syntax for
# backwards compatibility. (However newer input files
# use this equivalent syntax: "delete object_name")
if suffix == 'delete()':
delete_command = DeleteCommand(suffix_srcloc)
mod_command = ModCommand(delete_command,
instobj_descr_str)
staticobj.instance_commands.append(mod_command)
else:
push_command = PushLeftCommand(suffix,
suffix_srcloc,
'.')
pop_command = PopLeftCommand(push_command,
suffix_srcloc,
'.')
push_mod_command = ModCommand(push_command,
instobj_descr_str)
pop_mod_command = ModCommand(pop_command,
instobj_descr_str)
if instobj_descr_str != './':
#sys.stderr.write('DEBUG: Adding '+str(push_command)+' to '+
# staticobj.name+'.instance_commands\n')
staticobj.instance_commands.append(push_mod_command)
staticobj.instance_commands.append(pop_mod_command)
else:
#sys.stderr.write('DEBUG: Adding '+str(push_command)+' to '+
# staticobj.name+'.instance_commands_push\n')
# CONTINUEHERE: should I make these PushRight commands and
# append them in the opposite order?
# If so I also have to worry about the case above.
staticobj.instance_commands_push.append(push_mod_command)
staticobj.instance_commands_pop.insert(0,pop_mod_command)
else:
# Otherwise, the cmd_token is not any of these:
# "write", "write_once", "create_vars"
# "delete", or "category".
# ... and it is ALSO not any of these:
# the name of a class (StaticObj), or
# the name of an instance (InstanceObj)
# followed by either a '.' or "= new"
#
# In that case, it is a syntax error:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Syntax error at or before '+lex.error_leader()+'\n'
' \"'+object_name+' '+next_symbol+'\".')
# Keep track of the location in the user's input files
# where the definition of this object ends.
self.srcloc_end = lex.GetSrcLoc()
@staticmethod
def CleanupReadTemplate(tmpl_contents, lex):
#1) Remove any newlines at the beginning of the first text block
# in tmpl_content.(Sometimes they cause ugly extra blank lines)
assert(len(tmpl_contents) > 0)
if isinstance(tmpl_contents[0], TextBlock):
first_token_strip = tmpl_contents[0].text.lstrip(' ')
if ((len(first_token_strip) > 0) and
(first_token_strip[0] in lex.newline)):
tmpl_contents[0].text = first_token_strip[1:]
tmpl_contents[0].srcloc.lineno += 1
#2) Remove any trailing '}' characters, and complain if absent.
# The last token
assert(isinstance(tmpl_contents[-1], TextBlock))
assert(tmpl_contents[-1].text in ['}',''])
if tmpl_contents[-1].text == '}':
del tmpl_contents[-1]
else:
tmpl_begin = None
if isinstance(tmpl_contents[0], TextBlock):
tmpl_begin = tmpl_contents[0].srcloc
elif isinstance(tmpl_contents[0], VarRef):
tmpl_begin = tmpl_contents[0].srcloc
else:
assert(False)
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n\n'
' Premature end to template.\n'
'(Missing terminator character, usually a \'}\'.) The\n'
'incomplete template begins near '+ErrorLeader(tmpl_begin.infile, tmpl_begin.lineno)+'\n')
#3) Finally, if there is nothing but whitespace between the
# last newline and the end, then strip that off too.
if isinstance(tmpl_contents[-1], TextBlock):
i = len(tmpl_contents[-1].text)-1
if i >= 0:
while ((i >= 0) and
(tmpl_contents[-1].text[i] in lex.whitespace) and
(tmpl_contents[-1].text[i] not in lex.newline)):
i -= 1
if (tmpl_contents[-1].text[i] in lex.newline):
tmpl_contents[-1].text = tmpl_contents[-1].text[0:i+1]
def LookupStaticRefs(self):
""" Whenever the user requests to instantiate a new copy of a class,
the name of that class is stored in self.instance_commands.
This name is stored as a string. After all of the classes have been
defined, then we go back through the tree and replace these names
with pointers to actual StaticObjs which correspond to those classes.
(This was deferred until all of the classes have been defined so
that users can refer to classes that they will define later on.)
"""
# Now do the same for any children which
# are created during instantiation:
for command in self.instance_commands:
# Does this command create/instantiate a new copy of a class?
if isinstance(command, InstantiateCommand):
# If so, figure out which statobj is referred to by statobj_str.
assert(isinstance(command.class_ref.statobj_str, basestring))
command.class_ref.statobj = StrToNode(command.class_ref.statobj_str,
self,
command.class_ref.srcloc)
# Now recursively resolve StaticObj pointers for the "children"
# (in this case, "children" refers to classes whose definitions
# are nested within this one).
for child in self.children.values():
child.LookupStaticRefs()
def _ExtractSuffix(self, class_name_str, lex):
"""
This ugly function helps process "new" commands such as:
mola = new ForceFieldA/../MoleculeA.move(30,0,0).rot(45,0,0,1)
This function expects a string,
(such as "ForceFieldA/../MoleculeA.move(30,0,0).rot(45,0,0,1)")
It extracts the class name "ForceFieldA/../MoleculeA"
and suffix "move(30,0,0).rot(45,0,0,1)"
"""
# Dots in class names can appear for 2 reasons:
# 1) as part of a path like "../" describing the location
# where this class was defined relative to the caller.
# In that case it will be preceeded or followed by
# either another dot '.', or a slash '/'
# 2) as part of a "suffix" which appears after the name
# containing instructions which modify how to
# instantiate that class.
# Case 1 is handled elsewhere. Case 2 is handled here.
i_dot = 0
while i_dot < len(class_name_str):
i_dot = class_name_str.find('.', i_dot)
if i_dot == -1:
break
# Is the '.' character followed by another '.', as in ".."?
# If so, it's part of a path such as "../Parent/Mol', (if
# so, it's not what we're looking for, so keep searching)
if i_dot < len(class_name_str)-1:
if class_name_str[i_dot+1] == '.':
i_dot += 1
#otherwise, check to see if it is followed by a '/'?
elif class_name_str[i_dot+1] != '/':
# if not, then it must be part of a function name
break;
class_suffix = ''
class_name = class_name_str
class_suffix_srcloc = None
if ((i_dot != -1) and
(i_dot < len(class_name_str))):
class_suffix = class_name_str[i_dot:]
class_name = class_name_str[:i_dot]
if class_name_str[-1] != ')':
# If it does not already contains the parenthesis?
class_suffix += lex.GetParenExpr()
class_suffix_srcloc = lex.GetSrcLoc()
#sys.stderr.write(' splitting class name into class_name.suffix\n'
# ' class_name=\"'+class_name+'\"\n'
# ' suffix=\"'+class_suffix+'\"\n')
return class_name, class_suffix.lstrip('.'), class_suffix_srcloc
def _ProcessClassName(self, class_name_str, lex):
"""
This function does some additional
processing (occasionaly inserting "..." before class_name).
"""
class_name, class_suffix, class_suffix_srcloc = \
self._ExtractSuffix(class_name_str, lex)
# ---- ellipsis hack ----
# (Note-to-self 2012-4-15)
# Most users expect ttree.py to behave like a
# standard programming language: If the class they are
# instantiating was not defined in this specific
# location, they expect ttree.py to search for
# it outwards, first in the parent's environment,
# and then in the parent's parent's environment,
# and so on, until the object is found.
# For example, most users expect this to work:
# class A{
# <definition_of_a_goes_here...>
# }
# class B{
# a = new A
# }
# Notice in the example above we did not have to specify where "A"
# was defined, because it is defined in the parent's
# environment (ie. immediately outside B's environment).
#
# One can obtain the equivalent behavior in ttree.py
# using ellipsis syntax: "a = new .../A" symbol.
# The ellipsis ".../" tells ttree.py to search upwards
# for the object to the right of it ("A")
# In order to make ttree.py behave the way
# most users are expecting, we artificially insert a
# ".../" before the class name here. (Later on, the
# code that processes the ".../" symbol will take
# care of finding A.)
if (len(class_name)>0) and (class_name[0] not in ('.','/','*','?')):
class_name = '.../' + class_name
return class_name, class_suffix, class_suffix_srcloc
def _ParseRandom(self, lex):
bracket1 = lex.get_token()
bracket2 = lex.get_token()
if ((bracket1 != '(') and (bracket1 != '[')):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
'Expected a \"([\" following '+class_name+'.')
class_names = []
token = ''
prev_token = '['
while True:
token = lex.get_token()
if (token == '('):
lex.push_token(token)
token = lex.GetParenExpr()
if (prev_token not in (',','[','(')):
assert(len(class_names) > 0)
class_names[-1] = prev_token + token
prev_token = prev_token + token
else:
class_names.append(token)
prev_token = token
else:
if ((token == ']') or
(token == lex.eof) or
(token == '}') or
((token in lex.wordterminators) and
(token != ','))):
if (prev_token in (',','[','(')):
class_names.append('')
break
if token != ',':
class_names.append(token)
elif (prev_token in (',','[','(')):
class_names.append('')
prev_token = token
token_comma = lex.get_token()
bracket1 = lex.get_token()
if ((token != ']') or
(token_comma != ',') or
(bracket1 != '[')):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
'Expected a list of class names enclosed in [] brackets, followed by\n'
'a comma, and then a list of probabilities also enclosed in [] brackets.\n'
'(A random-seed following another comma is optional.)')
weights = []
while True:
token = lex.get_token()
if ((token == ']') or
(token == lex.eof) or
(token == '}') or
((token in lex.wordterminators) and
(token != ','))):
break
if token != ',':
try:
weight = float(token)
except ValueError:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+token+'\"\n'
'Expected a list of numbers enclosed in [] brackets.')
if (weight < 0.0):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' Negative numbers are not allowed in \"random(\" argument list.\n')
weights.append(weight)
bracket2 = lex.get_token()
if ((token != ']') or
(bracket2 not in (')',','))):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
'Expected a \")\" or a \",\" following the list of numeric weights.')
if len(class_names) != len(weights):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
'Unequal number of entries in object list and probability list.\n')
# Are all the entries in the "weights" array integers?
# If they are then, treat them as molecule counters,
# ot probabilities
num_by_type = []
for i in range(0, len(weights)):
# are the weights all positive integers?
n = int(weights[i])
if n == weights[i]:
num_by_type.append(n)
if len(num_by_type) < len(weights):
num_by_type = []
tot_weight = sum(weights)
if (tot_weight <= 0.0):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' The numbers in the \"random(\" argument list can not all be zero.\n')
for i in range(0,len(weights)):
weights[i] /= tot_weight
if bracket2 == ',':
try:
token = lex.get_token()
seed = int(token)
random.seed(seed)
except ValueError:
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+token+'\"\n'
'Expected an integer (a seed) following the list of weights.')
bracket2 = lex.get_token()
if (bracket2 != ')'):
raise InputError('Error('+g_module_name+'.StaticObj.Parse()):\n'
' Error near '+lex.error_leader()+'\n'
' \"'+token+'\"\n'
'Expected a \")\".')
else:
random.seed()
return (class_names, weights, num_by_type)
def BuildCommandList(self, command_list):
"""
Search the commands in the tree and make a linear list of commands
in the order they should be carried out.
"""
if self.IsDeleted():
return
# Add a special note to the list of commands to indicate which object
# the commands refer to. (This might be useful one day.)
# Later we can loop through this command list and still be able to tell
# whether or not we are within the scope of a particular class or instance
# (by seeing if we are between a "ScopeBegin" and "ScopeEnd" pair).
command_list.append(ScopeBegin(self, self.srcloc_begin))
# We want to append commands to the command_list in the same order
# that these commands appear in the user's input files.
# Unfortunately the commands may be interspersed with the creation of
# new StaticObjs which have their own commands which we have to explore
# recursively.
# Fortunately each child (StaticObj) has a srcloc_begin member, so we
# can infer the correct order of all the commands belonging to the
# children and correctly insert them into the correct place in between
# the commands of the parent.
srcloc2command_or_child = {}
for command in self.commands:
srcloc2command_or_child[command.srcloc] = command
for child in self.children.values():
srcloc = child.srcloc_begin
# special case: Some children do not have a srcloc because
# they were generated automatically. These children should
# not have any commands either so we can ignore them.
if srcloc != None:
srcloc2command_or_child[srcloc] = child
else:
assert(len(child.commands) == 0)
for srcloc in sorted(srcloc2command_or_child.keys()):
entry = srcloc2command_or_child[srcloc]
if isinstance(entry, StaticObj):
child = entry
child_commands = []
child.BuildCommandList(child_commands)
command_list += child_commands
else:
command_list.append(entry)
command_list.append(ScopeEnd(self, self.srcloc_end))
def __str__(self):
out_str = self.name
if len(self.children) > 0:
out_str += '('
i = 0
for child in self.children.values():
if i+1 < len(self.children):
out_str += str(child)+', '
else:
out_str += str(child)+')'
i += 1
return out_str
def RandomSelect(entries, weights):
""" Return an entry from a list at random using
a (normalized) list of probabilities. """
assert(len(entries) == len(weights))
x = random.random()
i = 0
tot_probability = 0.0
while i < len(weights)-1:
tot_probability += weights[i]
if x <= tot_probability:
break
i += 1
return entries[i]
class InstanceObjBasic(object):
""" A simplified version of InstanceObj.
See the documentation/comments for InstanceObj for more details.
(Leaf nodes (variables) are typically stored as InstanceObjBasic objects
More general, non-leaf nodes are stored using InstanceObj objects.)
"""
__slots__=["name","parent"]
def __init__(self,
name = '',
parent = None):
self.parent = parent # the environment/object which created this object
# Example:
# Suppose this "molecule" is an amino acid monomer
# belonging to a protein. The "parent" refers to
# the InstanceObj for the protein. ".parent" is
# useful for traversing the global instance tree.
# (use InstanceObj.statobj.parent for
# traversing the global static tree)
self.name = name # A string uniquely identifying this object in
# in it's "parent" environment.
# (It is always the same for every instance
# of the parent object. It would save memory to
# get rid of this member. Andrew 2012/9/13)
#self.deleted = False
##vb##self.var_bindings=None # List of variables assigned to this object
##vb## # or None (None takes up less space than an
##vb## # empty list.)
##vb##def AddVarBinding(self, var_binding):
##vb## if self.var_bindings is None:
##vb## self.var_bindings = [var_binding]
##vb## else:
##vb## self.var_bindings.append(var_binding)
#def DeleteSelf(self):
# self.deleted = True
def DeleteSelf(self):
#self.Dealloc()
self.parent = self # This condition (normally never true)
# flags the node as "deleted". (Nodes are never
# actually deleted, just flagged.)
# I used to have a separate boolean member variable
# which was set True when deleted, but I started
# eliminated unnecessary data members to save space.
#def IsDeleted(self):
# return self.deleted
def IsDeleted(self):
# Return true if self.deleted == True or self.parent == self
# for this node (or for any ancestor node).
node = self
while node.parent != None:
if hasattr(node, 'deleted'):
if node.deleted:
return True
elif node.parent == node:
return True
node = node.parent
return False
#def Dealloc(self):
# pass
##vb##if self.var_bindings is None:
##vb## return
##vb##N = len(self.var_bindings)-1
##vb##for i in range(0,len(self.var_bindings)):
##vb## vb = self.var_bindings[N-i]
##vb## cat = vb.category
##vb## assert(self in cat.bindings)
##vb## del cat.bindings[self]
##vb## del self.var_bindings[N-i]
##vb##self.var_bindings = None
class InstanceObj(InstanceObjBasic):
""" InstanceObjs are used to store nodes in the global
"instance tree", the tree of all classes (molecules) which have
been instantiated. Recall that whenever a class is instantiated,
it's members will be instantiated as well. Since these
members can also be classes, this relationship is hierarchical,
and can be represented as a tree.
"InstanceObjs" are the data type used to store the nodes in that tree."""
__slots__=["statobj",
"children",
"categories",
"commands",
"commands_push",
"commands_pop",
"srcloc_begin",
"srcloc_end",
"deleted"]
#"LookupMultiDescrStr",
##"Dealloc",
##"DeleteSelf",
##"IsDeleted",
##"UndeleteSelf",
##"DeleteProgeny",
#"BuildInstanceTree",
#"ProcessCommand",
#"ProcessContextNodes",
#"BuildCommandList"]
def __init__(self,
name = '',
parent = None):
InstanceObjBasic.__init__(self, name, parent)
self.statobj = None # The statobj node refered to by this instance
self.children = {} # A list of statobjs corresponding to
# constituent parts (members) of the
# current class instance.
# The typical example is to consider the
# multiple amino acids (child-molecules)
# which must be created in order to create a
# new protein (instance) to which they belong
# (which would be "self" in this example)
self.categories = {} # This member stores the same data as the
# Instance variables (ie. variables
# with a '$' prefix) are stored in a
# category belonging to node.categories
# where "node" is of type InstanceObj.
# (There is a long explanation of
# "categories" in the comments
# of class StaticObj.)
self.commands = [] # An ordered list of commands to carry out
# during instantiation
self.commands_push = [] # Stackable commands to carry out (first, before children)
self.commands_pop = [] # Stackable commands to carry out (last, after children)
self.srcloc_begin = None # Keep track of location in user files
self.srcloc_end = None # (useful for error message reporting)
self.deleted = False
def LookupMultiDescrStr(self,
multi_descr_str,
srcloc,
null_list_warning=False,
null_list_error=False):
"""
Post-Instance (PI) modifiers/commands are commands which modify
an instance of a class after it has already been instantiated.
Simple Example:
class A {
...
}
class B {
a = new A.command_1()
a.command_2()
}
In the example above "command_2()" is a ModCommand, and
"a" is the multi_descr_str (string describing the correspond InstanceObj).
The "command_2()" command will be retroactively pushed onto the
list of commands to execute once "a" is instantiated.
(This is somewhat counter-intuitive.)
When array brackets [] and wildcards are used, a single ModCommand
can modify many different instances, for example suppose:
a = new A [2][5][3]
then "a[1][2][*].command_3()" is equivalent to
a[0][2][0].command_3()
a[0][2][1].command_3()
a[0][2][2].command_3()
In this example "a[1][2][*]" is the multi_descr_str
"a[*][3][*].command_4()" is equivalent to
a[0][3][0].command_4()
a[0][3][1].command_4()
a[1][3][0].command_4()
a[1][3][1].command_4()
In this function, we interpret strings like "a" and "a[*][3][*]"
in the examples above, and figure out which InstanceObjs they refer to,
and push the corresponding command into that InstanceObjs instance
command stack retroactively.
In addition to [*], you can use [a-b] and [a:b] syntax. For example:
"a[0][1-2][0-1].command_3()" and
"a[0][1:3][0:2].command_3()" are both equivalent to:
a[0][1][0].command_3()
a[0][1][1].command_3()
a[0][2][0].command_3()
a[0][2][1].command_3()
"""
pattern_str = multi_descr_str
# Suppose pattern_str = 'a[1][*][3]/b[**][2]'
# We want to split this string into a list of string fragments
# which omits the '*' characters: [ 'a[', '][3]/b', '][2]' ]
# However, we only want to do this when * is enclosed in [].
pattern_fragments = []
ranges_ab = []
i_close_prev = 0
i_close = 0
i_open = 0
while True:
i_open = pattern_str.find('[', i_open+1)
if i_open == -1:
pattern_fragments.append(pattern_str[i_close_prev:])
break
else:
i_close = pattern_str.find(']', i_open+1)
if i_close == -1:
pattern_fragments.append(pattern_str[i_close_prev:])
break
# If there is a '*' or a ':' character between
# the [] brackets, then split the string at '['
# (at i_open) and resume reading again at ']'
# (at i_close) (and create a new entry in the
# pattern_fragments[] and ranges_ab[] lists)
wildcard_here = True
range_ab = [0,-1]
for j in range(i_open+1, i_close):
if ((pattern_str[j] == ':') or
((pattern_str[j] == '-') and (j > i_open+1)) or
(pattern_str[j] == '*')):
i_wildcard = len(pattern_fragments)
range_a_str = pattern_str[i_open+1 : j]
range_b_str = pattern_str[j+1 : i_close]
if (range_a_str != ''):
if str.isdigit(range_a_str):
range_ab[0] = int(range_a_str)
else:
raise InputError('Error near '+
ErrorLeader(srcloc.infile,
srcloc.lineno)+'\n'
' Expected colon-separated integers.\n')
if (range_b_str != ''):
if str.isdigit(range_b_str):
range_ab[1] = int(range_b_str)
# special case: When [a-b] type syntax is
# used, it selects from a to b inclusive.
# (IE. b is not a strict upper bound.)
if pattern_str[j] == '-':
range_ab[1] += 1
else:
raise InputError('Error near '+
ErrorLeader(srcloc.infile,
srcloc.lineno)+'\n'
' Expected colon-separated integers.\n')
break
elif j == i_close-1:
wildcard_here = False
if wildcard_here:
pattern_fragments.append(pattern_str[i_close_prev:i_open+1])
ranges_ab.append(range_ab)
i_close_prev = i_close
assert(len(pattern_fragments)-1==len(ranges_ab))
# Now figure out which InstanceObj or InstanceObjs correspond to
# the name or set of names suggested by the multi_descr_str,
# (after wildcard characters have been substituted with integers).
instobj_list = []
if len(pattern_fragments) == 1:
# commenting out:
# instobj_list.append(StrToNode(pattern_str, self, srcloc))
#
# Line above will print an error message if the node is not found.
# However sometimes we don't want this. Use this code instead:
path_tokens = pattern_str.split('/')
i_last_ptkn, instobj = FollowPath(path_tokens,
self,
srcloc)
# If found add to instobj_list
if ((i_last_ptkn == len(path_tokens))
and (not instobj.IsDeleted())):
instobj_list.append(instobj)
else:
# num_counters equals the number of bracket-enclosed wildcards
num_counters= len(pattern_fragments)-1
multi_counters = [ranges_ab[i][0] for i in range(0, num_counters)]
all_matches_found = False
d_carry = 0
while d_carry < num_counters:
# Find the next InstanceObj in the set of InstanceObjs which
# satisfy the wild-card pattern in pattern_fragments.
while d_carry < num_counters:
candidate_descr_str = ''.join([pattern_fragments[i] +
str(multi_counters[i])
for i in range(0,num_counters)] \
+ \
[pattern_fragments[num_counters]])
#sys.stderr.write('DEBUG: /'+self.name+
# '.LookupMultiDescrStr()\n'
# ' looking up \"'+
# candidate_descr_str+'\"\n')
path_tokens = candidate_descr_str.split('/')
i_last_ptkn, instobj = FollowPath(path_tokens,
self,
srcloc)
# If there is an InstanceObj with that name,
# then add it to the list of InstanceObjs to
# which we will apply this modifier function,
# and increment the counters
# If found (and if the counter is within the range)...
if ((i_last_ptkn == len(path_tokens)) and
((ranges_ab[d_carry][1] == -1) or
(multi_counters[d_carry]<ranges_ab[d_carry][1]))):
# (make sure it has not yet been "deleted")
if (not instobj.IsDeleted()):
instobj_list.append(instobj)
d_carry = 0
multi_counters[0] += 1
#sys.stderr.write('DEBUG: InstanceObj found.\n')
break
# If there is no InstanceObj with that name,
# then perhaps it is because we have incremented
# the counter too high. If there are multiple
# counters, increment the next most significant
# counter, and reset this counter to 0.
# Keep looking
# (We only do this if the user neglected to explicitly
# specify an upper bound --> ranges_ab[d_carry[1]==-1)
elif ((ranges_ab[d_carry][1] == -1) or
(multi_counters[d_carry]>=ranges_ab[d_carry][1])):
#sys.stderr.write('DEBUG: InstanceObj not found.\n')
multi_counters[d_carry] = ranges_ab[d_carry][0]
d_carry += 1
if d_carry >= num_counters:
break
multi_counters[d_carry] += 1
else:
# Object was not found but we keep going. Skip
# to the next entry in the multi-dimensional list.
d_carry = 0
multi_counters[0] += 1
break
if (null_list_warning and (len(instobj_list) == 0)):
sys.stderr.write('WARNING('+g_module_name+'.LookupMultiDescrStr()):\n'
' Potential problem near '+
ErrorLeader(srcloc.infile,
srcloc.lineno)+'\n'
' No objects (yet) matching name \"'+pattern_str+'\".\n')
if (null_list_error and
(len(instobj_list) == 0)):
if len(pattern_fragments) == 1:
raise InputError('Error('+g_module_name+'.LookupMultiDescrStr()):\n'
' Syntax error near '+
ErrorLeader(srcloc.infile,
srcloc.lineno)+'\n'
' No objects matching name \"'+pattern_str+'\".')
else:
sys.stderr.write('WARNING('+g_module_name+'.LookupMultiDescrStr()):\n'
' Potential problem near '+
ErrorLeader(srcloc.infile,
srcloc.lineno)+'\n'
' No objects (yet) matching name \"'+pattern_str+'\".\n')
return instobj_list
def __str__(self):
out_str = self.name
if len(self.children) > 0:
out_str += '('
i = 0
for child in self.children.values():
if i+1 < len(self.children):
out_str += str(child)+', '
else:
out_str += str(child)+')'
i += 1
return out_str
def DeleteSelf(self):
self.deleted = True
# COMMENT1: Don't get rid of pointers to yourself. Knowing which
# objects you instantiated and destroyed might be useful
# in case you want to apply multiple delete [*] commands
# COMMENT2: Don't delete all the child nodes, and commands. These are
# needed later (so that text-templates containing references
# to these nodes don't cause moltemplate to crash.)
#def UndeleteSelf(self):
# self.deleted = False
#
#
#def DeleteProgeny(self):
# for child in self.children.values():
# if hasattr(child, 'DeleteProgeny'):
# child.DeleteProgeny()
# else:
# child.DeleteSelf()
# self.DeleteSelf();
def BuildInstanceTree(self,
statobj,
class_parents_in_use):
"""
This takes care of the details of copying relevant data from an StaticObj
into a newly-created InstanceObj. It allocates space for and performs
a deep-copy of any instance variables (and new instance categories), but
it performs a shallow copy of everything else (template text, etc..).
This is done recursively for every child that this class instantiates.
"""
if self.IsDeleted():
return
#sys.stderr.write(' DEBUG: '+self.name+
# '.BuildInstanceTree('+statobj.name+')\n')
#instance_refs = {}
# Keep track of which line in the file (and which file) we were
# in when we began parsing the class which defines this instance,
# as well as when we stopped parsing.
# (Don't do this if you are recusively searching class_parents because
# in that case you would be overwritting .statobj with with the parent.)
if len(class_parents_in_use) == 0:
self.statobj = statobj
self.srcloc_begin = statobj.srcloc_begin
self.srcloc_end = statobj.srcloc_end
# Make copies of the class_parents' StaticObj data.
# First deal with the "self.instance_commands_push"
# These commands should be carried out before any of the commands
# in "self.instance_commands".
for command in statobj.instance_commands_push:
#self.commands.append(command)
self.ProcessCommand(command)
# Then deal with class parents
for class_parent in statobj.class_parents:
# Avoid the "Diamond of Death" multiple inheritance problem
if class_parent not in class_parents_in_use:
#sys.stderr.write(' DEBUG: '+self.name+'.class_parent = '+
# class_parent.name+'\n')
self.BuildInstanceTree(class_parent,
class_parents_in_use)
class_parents_in_use.add(class_parent)
# Now, deal with the data in THIS object and its children
assert((self.commands != None) and (self.categories != None))
# "instance_categories" contains a list of new "categories" (ie new
# types of variables) to create whenever this class is instantiated.
# (This is used whenever we create a local counter variable: Suppose we
# want to count the residues within a particular protein, when there
# are multiple copies of the same protein in the simulation.)
for cat_name, cat in statobj.instance_categories.items():
assert(len(cat.bindings) == 0)
self.categories[cat_name] = Category(cat_name)
self.categories[cat_name].counter = cat.counter.__copy__()
# Note: Later on we will generate leaf nodes corresponding to
# variables, and put references to them in this category.
# Deal with the "instance_commands",
for command in statobj.instance_commands:
#self.commands.append(command)
self.ProcessCommand(command)
# Finally deal with the "self.instance_commands_pop"
# These commands should be carried out after all of the commands
# in "self.instance_commands".
for command in statobj.instance_commands_pop:
#self.commands.append(command)
self.ProcessCommand(command)
def ProcessCommand(self, command):
if isinstance(command, ModCommand):
sys.stderr.write(' processing command \"'+str(command)+'\"\n')
mod_command = command
instobj_list = self.LookupMultiDescrStr(mod_command.multi_descr_str,
mod_command.command.srcloc)
if isinstance(mod_command.command, DeleteCommand):
# Delete any objects we have created so far
# whose name matches mod_command.multi_descr_str:
for instobj in instobj_list:
instobj.DeleteSelf()
#instobj.DeleteProgeny()
elif len(instobj_list) == 0:
raise InputError('Error('+g_module_name+'.ProcessCommand()):\n'
' Syntax error at or before '+
ErrorLeader(mod_command.command.srcloc.infile,
mod_command.command.srcloc.lineno)+'\n'
' No objects matching name \"'+
mod_command.multi_descr_str+'\"\n'
' (If the object is an array, include brackets. Eg. \"molecules[*][*][*]\")')
else:
for instobj in instobj_list:
assert(not isinstance(mod_command.command, DeleteCommand))
command = mod_command.command.__copy__()
self.ProcessContextNodes(command)
if isinstance(command, PushCommand):
instobj.commands_push.append(command)
elif isinstance(mod_command.command, PopCommand):
instobj.commands_pop.insert(0, command)
else:
# I don't know if any other types commands will ever
# occur but I handle them below, just in case...
assert(not isinstance(command, InstantiateCommand))
instobj.commands.append(command.__copy__())
return # ends "if isinstance(command, ModCommand):"
# Otherwise:
command = command.__copy__()
self.ProcessContextNodes(command)
if isinstance(command, InstantiateCommand):
sys.stderr.write(' processing command \"'+str(command)+'\"\n')
self.commands.append(command) #<- useful later to keep track of the
# order that children were created
# check to make sure no child of that name was previously defined
prev_child = self.children.get(command.name)
if ((prev_child != None) and (not prev_child.IsDeleted())):
raise InputError('Error near '+
ErrorLeader(command.srcloc.infile,
command.srcloc.lineno)+'\n'
' Object \"'+command.name+'\" is already defined.\n')
child = InstanceObj(command.name, self)
command.instobj = child
if command.class_ref.statobj_str == '':
child.DeleteSelf()
# Why? This if-then check handles the case when the user
# wants to create an array of molecules with random vacancies.
# When this happens, some of the instance commands will
# contain instructions to create a copy of a molecule with
# an empty molecule-type-string (class_ref.statobj_str).
# Counter-intuitively, ...
# ...we DO want to create something here so that the user can
# safely loop over the array without generating an error.
# (Such as to delete elements, or move the remaining
# members in the array.) We just want to mark it as
# 'deleted'. (That's what "DeleteSelf()" does.)
else:
# This is the heart of "BuildInstanceTree()"
# (which implements object composition)
new_class_parents_in_use = set([])
child.BuildInstanceTree(command.class_ref.statobj,
new_class_parents_in_use)
self.children[child.name] = child
elif isinstance(command, WriteFileCommand):
#sys.stderr.write(' processing command \"'+str(command)+'\"\n')
self.commands.append(command)
for var_ref in command.tmpl_list:
# Process the VarRef entries in the tmpl_list,
# (and check they have the correct prefix: either '$' or '@')
# Ignore other entries (for example, ignore TextBlocks).
if (isinstance(var_ref, VarRef) and (var_ref.prefix[0] == '$')):
if (var_ref.descr_str[:4] == 'mol:'):
pass
var_ref.nptr.cat_name, var_ref.nptr.cat_node, var_ref.nptr.leaf_node = \
DescrToCatLeafNodes(var_ref.descr_str,
self,
var_ref.srcloc,
True)
categories = var_ref.nptr.cat_node.categories
# "categories" is a dictionary storing "Category" objects
# indexed by category names.
# Note to self: Always use the ".categories" member,
# (never the ".instance_categories" member.
# ".instance_categories" are only used temporarilly before
# we instantiate, ie. before we build the tree of InstanceObjs.)
category = categories[var_ref.nptr.cat_name]
# "category" is a Category object containing a
# dictionary of VarBinding objects, and an internal counter.
var_bindings = category.bindings
# "var_bindings" is a dictionary storing "VarBinding"
# objects, indexed by leaf nodes. Each leaf node
# corresponds to a unique variable in this category.
# --- Now update "var_bindings" ---
# Search for the "VarBinding" object that
# corresponds to this leaf node.
# If not found, then create one.
if var_ref.nptr.leaf_node in var_bindings:
var_binding = var_bindings[var_ref.nptr.leaf_node]
# "var_binding" stores the information for a variable,
# including pointers to all of the places the variable
# is rerefenced, the variable's (full) name, and value.
#
# Keep track of all the places that varible is
# referenced by updating the ".refs" member
var_binding.refs.append(var_ref)
else:
# Not found, so we create a new binding.
var_binding = VarBinding()
# var_binding.refs contains a list of all the places
# this variable is referenced. Start with this var_ref:
var_binding.refs = [var_ref]
# keep track of the cat_node, cat_name, leaf_node:
var_binding.nptr = var_ref.nptr
# "var_binding.full_name" stores a unique string like
# '@/atom:Water/H' or '$/atom:water[1423]/H2',
# which contains the full path for the category and leaf
# nodes, and uniquely identifies this variable globally.
# Thus these strings correspond uniquely (ie. in a
# one-to-one fashion) with the nodes they represent.
var_binding.full_name = var_ref.prefix[0] + \
CanonicalDescrStr(var_ref.nptr.cat_name,
var_ref.nptr.cat_node,
var_ref.nptr.leaf_node,
var_ref.srcloc)
# (These names can always be generated later when needed
# but it doesn't hurt to keep track of it here too.)
# Now add this binding to the other
# bindings in this category:
var_bindings[var_ref.nptr.leaf_node] = var_binding
##vb## var_ref.nptr.leaf_node.AddVarBinding(var_binding)
var_binding.category = category
# It's convenient to add a pointer in the opposite direction
# so that later if we find the var_ref, we can find its
# binding and visa-versa. (Ie. two-way pointers)
var_ref.binding = var_binding
assert(var_ref.nptr.leaf_node in var_bindings)
else:
# Otherwise, we don't know what this command is yet.
# Append it to the list of commands and process it/ignore it later.
self.commands.append(command)
def ProcessContextNodes(self, command):
if hasattr(command, 'context_node'):
# Lookup any nodes pointers to instobjs
if command.context_node != None:
if type(command.context_node) is str:
command.context_node = StrToNode(command.context_node,
self,
command.srcloc)
# (Otherwise, just leave it as None)
def BuildCommandList(self, command_list):
"""
Search the commands in the tree and make a linear list of commands
in the order they should be carried out.
"""
if self.IsDeleted():
return
if (len(self.commands) == 0):
assert(len(self.children) == 0)
# To save memory don't generate any commands
# for trivial (leaf) nodes
return
# Add a special note to the list of commands to indicate which object
# the commands refer to. (This might be useful one day.)
# Later we can loop through this command list and still be able to tell
# whether or not we are within the scope of a particular class or instance
# (by seeing if we are between a "ScopeBegin" and "ScopeEnd" pair).
command_list.append(ScopeBegin(self, self.srcloc_begin))
# Note:
# The previous version looped over all commands in this node, and then
# recursively invoke BuildCommandList() on all the children of this node
# We don't do that anymore because it does not take into account the
# order that various child objects were created/instantiated
# which potentially could occur in-between other commands. Instead,
# now we loop through the command_list and recursively visit child
# nodes only when we encounter them in the command list.
for command in self.commands_push:
assert(isinstance(command, InstantiateCommand) == False)
command_list.append(command)
for command in self.commands:
if isinstance(command, InstantiateCommand):
#child = self.children[command.name]
# the above line does not work because you may have
# deleted that child after you created and then
# replaced it by somebody else. Store the node.
child = command.instobj
child.BuildCommandList(command_list)
else:
command_list.append(command)
for command in self.commands_pop:
assert(isinstance(command, InstantiateCommand) == False)
command_list.append(command)
command_list.append(ScopeEnd(self, self.srcloc_begin))
def AssignTemplateVarPtrs(tmpl_list, context_node):
"""
Now scan through all the variables within the templates defined
for this context_node (either static or dynamic depending on var_filter).
Each reference to a variable in the template has a descriptor which
indicates the variable's type, and in which molecule it is defined (ie
where it is located in the molecule instance tree or type definition tree).
(See comments for "class VarNPtr(object):" above for details.)
Eventually we want to assign a value to each variable.
This same variable (node) may appear multiple times in diffent templates.
So we also create a place to store this variable's value, and also assign
(two-way) pointers from the VarRef in the template, to this storage area so
that later on when we write out the contents of the template to a file, we
can substitute this variable with it's value, in all the places it appears.
"""
for var_ref in tmpl_list:
# Process the VarRef entries in the tmpl_list,
# (and check they have the correct prefix: either '$' or '@')
# Ignore other entries (for example, ignore TextBlocks).
if (isinstance(var_ref, VarRef) and
((isinstance(context_node, StaticObj) and
(var_ref.prefix[0] == '@'))
or
(isinstance(context_node, InstanceObjBasic) and
(var_ref.prefix[0] == '$')))):
var_ref.nptr.cat_name, var_ref.nptr.cat_node, var_ref.nptr.leaf_node = \
DescrToCatLeafNodes(var_ref.descr_str,
context_node,
var_ref.srcloc,
True)
categories = var_ref.nptr.cat_node.categories
# "categories" is a dictionary storing "Category" objects
# indexed by category names.
# Note to self: Always use the ".categories" member,
# (never the ".instance_categories" member.
# ".instance_categories" are only used temporarilly before
# we instantiate, ie. before we build the tree of InstanceObjs.)
category = categories[var_ref.nptr.cat_name]
# "category" is a Category object containing a
# dictionary of VarBinding objects, and an internal counter.
var_bindings = category.bindings
# "var_bindings" is a dictionary storing "VarBinding"
# objects, indexed by leaf nodes. Each leaf node
# corresponds to a unique variable in this category.
# --- Now update "var_bindings" ---
# Search for the "VarBinding" object that
# corresponds to this leaf node.
# If not found, then create one.
if var_ref.nptr.leaf_node in var_bindings:
var_binding = var_bindings[var_ref.nptr.leaf_node]
# "var_binding" stores the information for a variable,
# including pointers to all of the places the variable
# is rerefenced, the variable's (full) name, and value.
#
# Keep track of all the places that varible is
# referenced by updating the ".refs" member
var_binding.refs.append(var_ref)
else:
# Not found, so we create a new binding.
var_binding = VarBinding()
# var_binding.refs contains a list of all the places
# this variable is referenced. Start with this var_ref:
var_binding.refs = [var_ref]
# keep track of the cat_node, cat_name, leaf_node:
var_binding.nptr = var_ref.nptr
# "var_binding.full_name" stores a unique string like
# '@/atom:Water/H' or '$/atom:water[1423]/H2',
# which contains the full path for the category and leaf
# nodes, and uniquely identifies this variable globally.
# Thus these strings correspond uniquely (ie. in a
# one-to-one fashion) with the nodes they represent.
var_binding.full_name = var_ref.prefix[0] + \
CanonicalDescrStr(var_ref.nptr.cat_name,
var_ref.nptr.cat_node,
var_ref.nptr.leaf_node,
var_ref.srcloc)
# (These names can always be generated later when needed
# but it doesn't hurt to keep track of it here too.)
# Now add this binding to the other
# bindings in this category:
var_bindings[var_ref.nptr.leaf_node] = var_binding
##vb## var_ref.nptr.leaf_node.AddVarBinding(var_binding)
var_binding.category = category
# It's convenient to add a pointer in the opposite direction
# so that later if we find the var_ref, we can find its
# binding and visa-versa. (Ie. two-way pointers)
var_ref.binding = var_binding
assert(var_ref.nptr.leaf_node in var_bindings)
def AssignStaticVarPtrs(context_node, search_instance_commands = False):
#sys.stdout.write('AssignVarPtrs() invoked on node: \"'+NodeToStr(context_node)+'\"\n')
if search_instance_commands:
assert(isinstance(context_node, StaticObj))
commands = context_node.instance_commands
else:
# Note: Leaf nodes contain no commands, so skip them
if (not hasattr(context_node, 'commands')):
return
# Otherwise process their commands
commands = context_node.commands
for command in commands:
if isinstance(command, WriteFileCommand):
AssignTemplateVarPtrs(command.tmpl_list, context_node)
# Recursively invoke AssignVarPtrs() on all (non-leaf) child nodes:
for child in context_node.children.values():
AssignStaticVarPtrs(child, search_instance_commands)
+def AssignVarOrderByCommand(command_list, prefix_filter):
+ """
+ For each category in context_node, and each variable in that category,
+ set the order of each variable according to the position of the
+ write(), write_once(), or other command that created it.
+ Only variables with the correct prefix ('$' or '@') are affected.
+
+ """
+ count = 0
+ for command in command_list:
+ if isinstance(command, WriteFileCommand):
+ tmpl_list = command.tmpl_list
+ for var_ref in tmpl_list:
+ if isinstance(var_ref, VarRef):
+ if var_ref.prefix in prefix_filter:
+ count += 1
+ if ((var_ref.binding.order is None) or
+ (var_ref.binding.order > count)):
+ var_ref.binding.order = count
+
-#def AssignVarOrderByFile(context_node, search_instance_commands=False):
+#def AssignVarOrderByFile(command_list, prefix_filter):
# """
# For each category in context_node, and each variable in that category,
# set the order of each variable equal to the position of that variable
# in the user's input file.
#
# """
#
-# if search_instance_commands:
-# assert(isinstance(context_node, StaticObj))
-# commands = context_node.instance_commands_push + \
-# context_node.instance_commands + \
-# context_node.instance_commands_pop
-# else:
-# commands = context_node.commands
-# for command in commands:
+# for command in command_list:
# if isinstance(command, WriteFileCommand):
# tmpl_list = command.tmpl_list
# for var_ref in tmpl_list:
# if isinstance(var_ref, VarRef):
-# if (((var_ref.prefix == '@') and
-# isinstance(context_node, StaticObj)) or
-# ((var_ref.prefix == '$') and
-# isinstance(context_node, InstanceObjBasic))):
-# #if ((var_ref.prefix == '@') or
-# # (not search_instance_commands)):
-# if ((var_ref.binding.order == -1) or
+# if var_ref.prefix in prefix_filter:
+# if ((var_ref.binding.order is None) or
# (var_ref.binding.order > var_ref.srcloc.order)):
# var_ref.binding.order = var_ref.srcloc.order
-#
-# for child in context_node.children.values():
-# AssignVarOrderByFile(child, search_instance_commands)
-
-
-
-def AssignVarOrderByCommand(command_list, prefix_filter):
+def AssignVarOrderByFile(context_node, prefix_filter, search_instance_commands=False):
"""
For each category in context_node, and each variable in that category,
- set the order of each variable according to the position of the
- write(), write_once(), or other command that created it.
- Only variables with the correct prefix ('$' or '@') are affected.
+ set the order of each variable equal to the position of that variable
+ in the user's input file.
"""
- count = 0
- for command in command_list:
+
+ commands = context_node.commands
+ if search_instance_commands:
+ assert(isinstance(context_node, StaticObj))
+ commands.append(context_node.instance_commands_push + \
+ context_node.instance_commands + \
+ context_node.instance_commands_pop)
+
+ for command in commands:
if isinstance(command, WriteFileCommand):
tmpl_list = command.tmpl_list
for var_ref in tmpl_list:
- if isinstance(var_ref, VarRef):
- if var_ref.prefix in prefix_filter:
- count += 1
- if ((var_ref.binding.order is None) or
- (var_ref.binding.order > count)):
- var_ref.binding.order = count
+ if (isinstance(var_ref, VarRef) and
+ (var_ref.prefix in prefix_filter)):
+ if ((var_ref.binding.order == -1) or
+ (var_ref.binding.order > var_ref.srcloc.order)):
+ var_ref.binding.order = var_ref.srcloc.order
+
+ for child in context_node.children.values():
+ AssignVarOrderByFile(child, prefix_filter, search_instance_commands)
def AutoAssignVals(cat_node,
sort_variables,
reserved_values = None,
ignore_prior_values = False):
"""
This function automatically assigns all the variables
belonging to all the categories in cat_node.categories.
Each category has its own internal counter. For every variable in that
category, query the counter (which usually returns an integer),
and assign the variable to it. Exceptions can be made if the integer
is reserved by some other variable, or if it has been already assigned.
Afterwards, we recursively search the child nodes recursively
(in a depth-first-search order).
sort_variables: Sorting the variables according to their "binding.order"
counters is optional.
"""
if (not hasattr(cat_node, 'categories')):
# (sometimes leaf nodes lack a 'categories' member, to save memory)
return
# Search the tree in a depth-first-search manner.
# For each node, examine the "categories" associated with that node
# (ie the list of variables whose counters lie within that node's scope).
for cat_name, cat in cat_node.categories.items():
# Loop through all the variables in this category.
if sort_variables:
# Sort the list of variables according to var_binding.order
# First, print a progress indicator (this could be slow)
prefix = '$'
# Is this parent_node an StaticObj? (..or inherit from StaticObj?)
if isinstance(cat_node, StaticObj):
prefix = '@'
sys.stderr.write(' sorting variables in category: '+prefix+
CanonicalCatName(cat_name, cat_node)+':\n')
var_bind_iter = iter(sorted(cat.bindings.items(),
key=operator.itemgetter(1)))
else:
# Just iterate through them in the order that they were added
# to the category list. (This happens to be the same order as
# we found it earlier when searching the tree.)
var_bind_iter = iter(cat.bindings.items())
for leaf_node,var_binding in var_bind_iter:
if ((var_binding.value is None) or ignore_prior_values):
if var_binding.nptr.leaf_node.name[:9] == '__query__':
# -- THE "COUNT" HACK --
# '__query__...' variables are not really variables.
# They are a mechanism to allow the user to query the
# category counter without incrementing it.
var_binding.value = str(cat.counter.query())
elif HasWildCard(var_binding.full_name):
# -- The wildcard hack ---
# Variables containing * or ? characters in their names
# are not allowed. These are not variables, but patterns
# to match with other variables. Represent them by the
# (full-path-expanded) string containing the * or ?.
var_binding.value = var_binding.full_name
else:
if (not var_binding.nptr.leaf_node.IsDeleted()):
# For each (regular) variable, query this category's counter
# (convert it to a string), and see if it is already in use
# (in this category). If not, then set this variable's value
# to the counter's value. Either way, increment the counter.
while True:
cat.counter.incr()
value = str(cat.counter.query())
if ((reserved_values is None) or
((cat, value) not in reserved_values)):
break
var_binding.value = value
# Recursively invoke AssignVarValues() on all child nodes
for child in cat_node.children.values():
AutoAssignVals(child,
sort_variables,
reserved_values,
ignore_prior_values)
# Did the user ask us to reformat the output string?
# This information is encoded in the variable's suffix.
def ExtractFormattingCommands(suffix):
if (len(suffix) <= 1):
return None, None
if suffix[-1] == '}': # Get rid of any trailing '}' characters
suffix = suffix[:-1]
if suffix[-1] != ')': # Format functions are always followed by parens
return None, None
else:
idot = suffix.find('.') # Format functions usually preceeded by '.'
ioparen = suffix.find('(')
icparen = suffix.find(')')
format_fname = suffix[idot+1:ioparen]
args = suffix[ioparen+1:icparen]
args = args.split(',')
for i in range(0, len(args)):
args[i] = RemoveOuterQuotes(args[i].strip(), '\"\'')
return format_fname, args
def Render(tmpl_list, substitute_vars=True):
"""
This function converts a TextBlock,VarRef list into a string.
It is invoked by WriteTemplatesValue() in order to print
out the templates stored at each node of the tree.
"""
out_str_list = []
i = 0
while i < len(tmpl_list):
entry = tmpl_list[i]
if isinstance(entry, VarRef):
var_ref = entry
var_bindings = var_ref.nptr.cat_node.categories[var_ref.nptr.cat_name].bindings
#if var_ref.nptr.leaf_node not in var_bindings:
#assert(var_ref.nptr.leaf_node in var_bindings)
if var_ref.nptr.leaf_node.IsDeleted():
raise InputError('Error near '+
ErrorLeader(var_ref.srcloc.infile,
var_ref.srcloc.lineno)+'\n'
' The variable you referred to does not exist:\n\n'
' '+var_ref.prefix+var_ref.descr_str+var_ref.suffix+'\n\n'
' (You probably deleted it or something it belonged to earlier.)\n')
else:
if substitute_vars:
value = var_bindings[var_ref.nptr.leaf_node].value
format_fname, args = ExtractFormattingCommands(var_ref.suffix)
if format_fname == 'ljust':
if len(args) == 1:
value = value.ljust(int(args[0]))
else:
value = value.ljust(int(args[0]), args[1])
elif format_fname == 'rjust':
if len(args) == 1:
value = value.rjust(int(args[0]))
else:
value = value.rjust(int(args[0]), args[1])
out_str_list.append(value)
else:
out_str_list.append(var_ref.prefix +
SafelyEncodeString(var_bindings[var_ref.nptr.leaf_node].full_name[1:]) +
var_ref.suffix)
else:
assert(isinstance(entry, TextBlock))
out_str_list.append(entry.text)
i += 1
return ''.join(out_str_list)
def MergeWriteCommands(command_list):
""" Write commands are typically to the same file.
We can improve performance by appending all of
commands that write to the same file together before
carrying out the write commands.
"""
file_templates = defaultdict(list)
for command in command_list:
if isinstance(command, WriteFileCommand):
if command.filename != None:
file_templates[command.filename] += \
command.tmpl_list
return file_templates
def WriteTemplatesValue(file_templates):
""" Carry out the write() and write_once() commands (which
write out the contents of the templates contain inside them).
"""
for filename, tmpl_list in file_templates.items():
if filename == '':
out_file = sys.stdout
else:
out_file = open(filename, 'a')
out_file.write(Render(tmpl_list, substitute_vars=True))
if filename != '':
out_file.close()
# Alternate (old method):
#for command in command_list:
# if isinstance(command, WriteFileCommand):
# if command.filename != None:
# if command.filename == '':
# out_file = sys.stdout
# else:
# out_file = open(command.filename, 'a')
#
# out_file.write(Render(command.tmpl_list))
#
# if command.filename != '':
# out_file.close()
def WriteTemplatesVarName(file_templates):
""" Carry out the write() and write_once() commands (which
write out the contents of the templates contain inside them).
However variables within the templates are represented by their
full name instead of their assigned value.
"""
for filename, tmpl_list in file_templates.items():
if filename != '':
out_file = open(filename + '.template', 'a')
out_file.write(Render(tmpl_list, substitute_vars=False))
out_file.close()
def EraseTemplateFiles(command_list):
filenames = set([])
for command in command_list:
if isinstance(command, WriteFileCommand):
if (command.filename != None) and (command.filename != ''):
if command.filename not in filenames:
filenames.add(command.filename)
# Openning the files (in mode 'w') and closing them again
# erases their contents.
out_file = open(command.filename, 'w')
out_file.close()
out_file = open(command.filename + '.template', 'w')
out_file.close()
#def ClearTemplates(file_templates):
# for filename in file_templates:
# if filename != '':
# out_file = open(filename, 'w')
# out_file.close()
# out_file = open(filename + '.template', 'w')
# out_file.close()
def WriteVarBindingsFile(node):
""" Write out a single file which contains a list of all
of the variables defined (regardless of which class they
were defined in). Next to each variable name is the corresponding
information stored in that variable (a number) that variable.
"""
if (not hasattr(node, 'categories')):
# (sometimes leaf nodes lack a 'categories' member, to save memory)
return
out = open('ttree_assignments.txt', 'a')
for cat_name in node.categories:
var_bindings = node.categories[cat_name].bindings
for nd, var_binding in var_bindings.items():
if nd.IsDeleted():
continue # In that case, skip this variable
#if type(node) is type(nd):
if ((isinstance(node, InstanceObjBasic) and isinstance(nd, InstanceObjBasic))
or
(isinstance(node, StaticObj) and isinstance(nd, StaticObj))):
# Now omit variables whos names contain "*" or "?"
# (these are actually not variables, but wildcard patterns)
if not HasWildCard(var_binding.full_name):
if len(var_binding.refs) > 0:
usage_example = ' #'+\
ErrorLeader(var_binding.refs[0].srcloc.infile, \
var_binding.refs[0].srcloc.lineno)
else:
usage_example = ''
out.write(SafelyEncodeString(var_binding.full_name) +' '+
SafelyEncodeString(var_binding.value)
+usage_example+'\n')
out.close()
for child in node.children.values():
WriteVarBindingsFile(child)
def CustomizeBindings(bindings,
g_objectdefs,
g_objects):
var_assignments = set()
for name,vlpair in bindings.items():
prefix = name[0]
var_descr_str = name[1:]
value = vlpair.val
dbg_loc = vlpair.loc
if prefix == '@':
var_binding = LookupVar(var_descr_str,
g_objectdefs,
dbg_loc)
elif prefix == '$':
var_binding = LookupVar(var_descr_str,
g_objects,
dbg_loc)
else:
# If the user neglected a prefix, this should have generated
# an error earlier on.
assert(False)
# Change the assignment:
var_binding.value = value
var_assignments.add((var_binding.category, value))
#sys.stderr.write(' CustomizeBindings: descr=' + var_descr_str +
# ', value=' + value + '\n')
return var_assignments
##############################################################
##################### BasicUI functions #####################
# These functions are examples of how to use the StaticObj
# and InstanceObj data structures above, and to read a ttree file.
# These are examples only. New programs based on ttree_lib.py
# will probably require their own settings and functions.
##############################################################
def BasicUIReadBindingsFile(bindings_so_far, filename):
try:
f = open(filename, 'r')
except IOError:
sys.stderr.write('Error('+g_filename+'):\n'' : unable to open file\n'
'\n'
' \"'+filename+'\"\n'
' for reading.\n'
'\n'
' (If you were not trying to open a file with this name, then this could\n'
' occur if you forgot to enclose your command-line-argument in quotes,\n'
' For example, use: \'$atom:wat[2]/H1 20\' or "\$atom:wat[2]/H1 to 20"\n'
' to set the variable $atom:wat[2]/H1 to 20.)\n')
sys.exit(1)
BasicUIReadBindingsStream(bindings_so_far, f, filename)
f.close()
def BasicUIReadBindingsText(bindings_so_far, text, source_name=''):
if sys.version > '3':
in_stream = io.StringIO(text)
else:
in_stream = cStringIO.StringIO(text)
return BasicUIReadBindingsStream(bindings_so_far, in_stream, source_name)
class ValLocPair(object):
__slots__=["val","loc"]
def __init__(self,
val = None,
loc = None):
self.val = val
self.loc = loc
def BasicUIReadBindingsStream(bindings_so_far, in_stream, source_name=''):
# EXAMPLE (simple version)
# The simple version of this function commented out below
# does not handle variable whose names or values
# contain strange or escaped characters, quotes or whitespace.
# But I kept it in for illustrative purposes:
#
#for line in f:
# line = line.strip()
# tokens = line.split()
# if len(tokens) == 2:
# var_name = tokens[0]
# var_value = tokens[1]
# var_assignments[var_name] = var_value
#f.close()
lex = TemplateLexer(in_stream, source_name)
tmpllist = lex.ReadTemplate()
i = 0
if isinstance(tmpllist[0], TextBlock):
i += 1
while i+1 < len(tmpllist):
# process one line at a time (2 entries per line)
var_ref = tmpllist[i]
text_block = tmpllist[i+1]
assert(isinstance(var_ref, VarRef))
if (not isinstance(text_block, TextBlock)):
raise InputError('Error('+g_filename+'):\n'
' This is not a valid name-value pair:\n'
' \"'+var_ref.prefix+var_ref.descr_str+' '+text_block.text.rstrip()+'\"\n'
' Each variable asignment should contain a variable name (beginning with\n'
' @ or $) followed by a space, and then a string you want to assign to it.\n'
' (Surrounding quotes are optional and will be removed.)\n')
# Variables in the ttree_assignments.txt file use "full-path" style.
# In other words, the full name of the variable, (including all
# path information) is stored var_ref.descr_str,
# and the first character of the prefix stores either a @ or $
var_name = var_ref.prefix[:1] + var_ref.descr_str
text = SplitQuotedString(text_block.text.strip())
var_value = EscCharStrToChar(RemoveOuterQuotes(text, '\'\"'))
bindings_so_far[var_name] = ValLocPair(var_value, lex.GetSrcLoc())
i += 2
class BasicUISettings(object):
"""
BasicUISettings() contains several run-time user customisations
for ttree. (These effect the order and values assigned to variables
in a ttreee file).
This object, along with the other "UI" functions below are examples only.
(New programs based on ttree_lib.py will probably have their own settings
and functions.)
Members:
user_bindings
user_bindings_x
These are lists containing pairs of variable names,
and the string values they are bound to (which are typically numeric).
Values specified in the "user_bindings_x" list are "exclusive".
This means their values are reserved, so that later on, when other
variables (in the same category) are automatically assigned to values, care
care will be taken to avoid duplicating the values in user_bindings_x.
However variables in the "user_bindings" list are assigned without regard
to the values assigned to other variables, and may or may not be unique.
order_method
The order_method specifies the order in which values will be automatically
assigned to variables. (In the context of building molecular simulation
input files, this helps the user to insure that the order of the atoms
created by the ttree file matches the order they appear in other files
created by other programs.)
"""
def __init__(self,
user_bindings_x=None,
user_bindings=None,
order_method='by_command',
lex=None):
if user_bindings_x:
self.user_bindings_x = user_bindings_x
else:
self.user_bindings_x = OrderedDict()
if user_bindings:
self.user_bindings = user_bindings
else:
self.user_bindings = OrderedDict()
self.order_method = order_method
self.lex = lex
def BasicUIParseArgs(argv, settings):
"""
BasicUIParseArgs()
The following function contains part of the user interface for a
typical ttree-based program. This function processes an argument list
and extracts the common ttree user settings.
This function, along with the other "UI" functions below are examples only.
(New programs based on ttree_lib.py will probably have their own UI.)
"""
#argv = [arg for arg in orig_argv] # (make a deep copy of "orig_argv")
# This error message is used in multiple places:
bind_err_msg = 'should either be followed by a 2-column\n'+\
' file (containing variable-value pairs on each line).\n'+\
' --OR-- a quoted string (such as \"@atom:x 2\")\n'+\
' with the full variable name and its desired value.'
bind_err_msg_var = 'Missing value, or space needed separating variable\n'+\
' and value. (Remember to use quotes to surround the argument\n'+\
' containing the variable name, and it\'s assigned value.)'
i = 1
while i < len(argv):
#sys.stderr.write('argv['+str(i)+'] = \"'+argv[i]+'\"\n')
if argv[i] == '-a':
if ((i+1 >= len(argv)) or (argv[i+1][:1] == '-')):
raise InputError('Error('+g_filename+'):\n'
' Error in -a \"'+argv[i+1]+' argument.\"\n'
' The -a flag '+bind_err_msg)
if (argv[i+1][0] in '@$'):
#tokens = argv[i+1].strip().split(' ')
tokens = SplitQuotedString(argv[i+1].strip())
if len(tokens) < 2:
raise InputError('Error('+g_filename+'):\n'
' Error in -a \"'+argv[i+1]+'\" argument.\n'
' '+bind_err_msg_var)
BasicUIReadBindingsText(settings.user_bindings_x,
argv[i+1],
'__command_line_argument__')
else:
BasicUIReadBindingsFile(settings.user_bindings_x,
argv[i+1])
#i += 2
del(argv[i:i+2])
elif argv[i] == '-b':
if ((i+1 >= len(argv)) or (argv[i+1][:1] == '-')):
raise InputError('Error('+g_filename+'):\n'
' Error in -b \"'+argv[i+1]+' argument.\"\n'
' The -b flag '+bind_err_msg)
if (argv[i+1][0] in '@$'):
#tokens = argv[i+1].strip().split(' ')
tokens = SplitQuotedString(argv[i+1].strip())
if len(tokens) < 2:
raise InputError('Error('+g_filename+'):\n'
' Error in -b \"'+argv[i+1]+'\" argument.\n'
' '+bind_err_msg_var)
BasicUIReadBindingsText(settings.user_bindings,
argv[i+1],
'__command_line_argument__')
else:
BasicUIReadBindingsFile(settings.user_bindings,
argv[i+1])
#i += 2
del(argv[i:i+2])
elif argv[i] == '-order-command':
settings.order_method = 'by_command'
#i += 1
del(argv[i:i+1])
elif argv[i] == '-order-file':
settings.order_method = 'by_file'
#i += 1
del(argv[i:i+1])
elif ((argv[i] == '-order-tree') or (argv[i] == '-order-dfs')):
settings.order_method = 'by_tree'
del(argv[i:i+1])
elif ((argv[i] == '-importpath') or
(argv[i] == '-import-path') or
(argv[i] == '-import_path')):
if ((i+1 >= len(argv)) or (argv[i+1][:1] == '-')):
raise InputError('Error('+g_filename+'):\n'
' Error in \"'+argv[i]+'\" argument.\"\n'
' The \"'+argv[i]+'\" argument should be followed by the name of\n'
' an environment variable storing a path for including/importing files.\n')
TtreeShlex.custom_path = RemoveOuterQuotes(argv[i+1])
del(argv[i:i+2])
elif ((argv[i][0] == '-') and (__name__ == "__main__")):
#elif (__name__ == "__main__"):
raise InputError('Error('+g_filename+'):\n'
'Unrecogized command line argument \"'+argv[i]+'\"\n')
else:
i += 1
if __name__ == "__main__":
# Instantiate the lexer we will be using.
# (The lexer's __init__() function requires an openned file.
# Assuming __name__ == "__main__", then the name of that file should
# be the last remaining (unprocessed) argument in the argument list.
# Otherwise, then name of that file will be determined later by the
# python script which imports this module, so we let them handle it.)
if len(argv) == 1:
raise InputError('Error('+g_filename+'):\n'
' This program requires at least one argument\n'
' the name of a file containing ttree template commands\n')
elif len(argv) == 2:
try:
settings.lex = TemplateLexer(open(argv[1], 'r'), argv[1]) # Parse text from file
except IOError:
sys.stderr.write('Error('+g_filename+'):\n'
' unable to open file\n'
' \"'+argv[1]+'\"\n'
' for reading.\n')
sys.exit(1)
del(argv[1:2])
else:
# if there are more than 2 remaining arguments,
problem_args = ['\"'+arg+'\"' for arg in argv[1:]]
raise InputError('Syntax Error ('+g_filename+'):\n'
' Problem with argument list.\n'
' The remaining arguments are:\n\n'
' '+(' '.join(problem_args))+'\n\n'
' (The actual problem may be earlier in the argument list.\n'
' If these arguments are source files, then keep in mind\n'
' that this program can not parse multiple source files.)\n'
' Check the syntax of the entire argument list.\n')
def BasicUI(settings,
static_tree_root,
instance_tree_root,
static_commands,
instance_commands):
"""
BasicUI()
This function loads a ttree file and optional custom bindings for it,
creates a "static" tree (of defined ttree classes),
creates an "instance" tree (of instantiated ttree objects),
automatically assigns values to unbound variables,
substitutes them into text templates (renders the template).
The actual writing of the templates to a file is not handled here.
"""
# Parsing, and compiling is a multi-pass process.
# Step 1: Read in the StaticObj (class) defintions, without checking
# whether or not the instance_children refer to valid StaticObj types.
sys.stderr.write('parsing the class definitions...')
static_tree_root.Parse(settings.lex)
#gc.collect()
#sys.stderr.write('static = ' + str(static_tree_root) + '\n')
# Step 2: Now that the static tree has been constructed, lookup
# any references to classes (StaticObjs), contained within
# the instance_children or class_parents of each node in
# static_tree_root. Replace them with (pointers to)
# the StaticObjs they refer to (and check validity).
# (Note: Variables stored within the templates defined by write()
# and write_once() statements may also refer to StaticObjs in
# the tree, but we leave these references alone. We handle
# these assignments later using "AssignVarPtrs()" below.)
sys.stderr.write(' done\nlooking up classes...')
static_tree_root.LookupStaticRefs()
#gc.collect()
# Step 3: Now scan through all the (static) variables within the templates
# and replace the (static) variable references to pointers
# to nodes in the StaticObj tree:
sys.stderr.write(' done\nlooking up @variables...')
# Here we assign pointers for variables in "write_once(){text}" templates:
AssignStaticVarPtrs(static_tree_root, search_instance_commands=False)
# Here we assign pointers for variables in "write(){text}" templates:
AssignStaticVarPtrs(static_tree_root, search_instance_commands=True)
sys.stderr.write(' done\nconstructing the tree of class definitions...')
sys.stderr.write(' done\n\nclass_def_tree = ' + str(static_tree_root) + '\n\n')
#gc.collect()
# Step 4: Construct the instance tree (the tree of instantiated
# classes) from the static tree of type definitions.
sys.stderr.write('constructing the instance tree...\n')
class_parents_in_use = set([])
instance_tree_root.BuildInstanceTree(static_tree_root, class_parents_in_use)
#sys.stderr.write('done\n garbage collection...')
#gc.collect()
sys.stderr.write(' done\n')
#sys.stderr.write('instance_tree = ' + str(instance_tree_root) + '\n')
# Step 5: The commands must be carried out in a specific order.
# (for example, the "write()" and "new" commands).
# Search through the tree, and append commands to a command list.
# Then re-order the list in the order the commands should have
# been executed in. (We don't carry out the commands yet,
# we just store them and sort them.)
class_parents_in_use = set([])
static_tree_root.BuildCommandList(static_commands)
instance_tree_root.BuildCommandList(instance_commands)
#sys.stderr.write('static_commands = '+str(static_commands)+'\n')
#sys.stderr.write('instance_commands = '+str(instance_commands)+'\n')
# Step 6: We are about to assign numbers to the variables.
# We need to decide the order in which to assign them.
# By default static variables (@) are assigned in the order
# they appear in the file.
# And, by default instance variables ($)
# are assigned in the order they are created during instantiation.
#sys.stderr.write(' done\ndetermining variable count order...')
- AssignVarOrderByCommand(static_commands, '@')
- #AssignVarOrderByFile(static_tree_root, search_instance_commands=False)
- #AssignVarOrderByFile(static_tree_root, search_instance_commands=True)
+ AssignVarOrderByFile(static_tree_root, '@', search_instance_commands=True)
AssignVarOrderByCommand(instance_commands, '$')
# Step 7: Assign the variables.
# (If the user requested any customized variable bindings,
# load those now.)
if len(settings.user_bindings_x) > 0:
reserved_values = CustomizeBindings(settings.user_bindings_x,
static_tree_root,
instance_tree_root)
else:
reserved_values = None
sys.stderr.write('sorting variables...\n')
AutoAssignVals(static_tree_root,
(settings.order_method != 'by_tree'),
reserved_values)
AutoAssignVals(instance_tree_root,
(settings.order_method != 'by_tree'),
reserved_values)
if len(settings.user_bindings) > 0:
CustomizeBindings(settings.user_bindings,
static_tree_root,
instance_tree_root)
sys.stderr.write(' done\n')
if __name__ == "__main__":
"""
This is is a "main module" wrapper for invoking ttree.py
as a stand alone program. This program:
1)reads a ttree file,
2)constructs a tree of class definitions (g_objectdefs)
3)constructs a tree of instantiated class objects (g_objects),
4)automatically assigns values to the variables,
5)and carries out the "write" commands to write the templates a file(s).
"""
####### Main Code Below: #######
g_program_name = g_filename
sys.stderr.write(g_program_name+' v'+g_version_str+' '+g_date_str+' ')
sys.stderr.write('\n(python version '+str(sys.version)+')\n')
try:
settings = BasicUISettings()
BasicUIParseArgs(sys.argv, settings)
# Data structures to store the class definitionss and instances
g_objectdefs = StaticObj('', None) # The root of the static tree
# has name '' (equivalent to '/')
g_objects = InstanceObj('', None) # The root of the instance tree
# has name '' (equivalent to '/')
# A list of commands to carry out
g_static_commands = []
g_instance_commands = []
BasicUI(settings,
g_objectdefs,
g_objects,
g_static_commands,
g_instance_commands)
# Now write the files
# (Finally carry out the "write()" and "write_once()" commands.)
# Optional: Multiple commands to write to the same file can be merged to
# reduce the number of times the file is openned and closed.
sys.stderr.write('writing templates...\n')
# Erase the files that will be written to:
EraseTemplateFiles(g_static_commands)
EraseTemplateFiles(g_instance_commands)
g_static_commands = MergeWriteCommands(g_static_commands)
g_instance_commands = MergeWriteCommands(g_instance_commands)
# Write the files with the original variable names present
WriteTemplatesVarName(g_static_commands)
WriteTemplatesVarName(g_instance_commands)
# Write the files with the variable names substituted by values
WriteTemplatesValue(g_static_commands)
WriteTemplatesValue(g_instance_commands)
sys.stderr.write(' done\n')
# Step 11: Now write the variable bindings/assignments table.
sys.stderr.write('writing \"ttree_assignments.txt\" file...')
open('ttree_assignments.txt', 'w').close() # <-- erase previous version.
WriteVarBindingsFile(g_objectdefs)
WriteVarBindingsFile(g_objects)
sys.stderr.write(' done\n')
except (ValueError, InputError) as err:
sys.stderr.write('\n\n'+str(err)+'\n')
sys.exit(-1)

Event Timeline