Metadata-Version: 2.4
Name: thermal_conductivity_step
Version: 2026.10.16
Summary: A SEAMM plug-in for Thermal Conductivity
Home-page: https://github.com/molssi-seamm/thermal_conductivity_step
Author: Paul Saxe
Author-email: psaxe@molssi.org
License: BSD-3-Clause
Keywords: SEAMM,SEAMMplugin,flowchart
Platform: Linux
Platform: Mac OS-X
Platform: Unix
Platform: Windows
Classifier: Environment :: Plugins
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
License-File: AUTHORS.rst
Requires-Dist: numpy
Requires-Dist: seamm
Requires-Dist: seamm-md-analysis>=2026.10.16
Requires-Dist: tabulate
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: requires-dist
Dynamic: summary

==================================
SEAMM Thermal Conductivity Plug-in
==================================

.. image:: https://img.shields.io/github/issues-pr-raw/molssi-seamm/thermal_conductivity_step
   :target: https://github.com/molssi-seamm/thermal_conductivity_step/pulls
   :alt: GitHub pull requests

.. image:: https://github.com/molssi-seamm/thermal_conductivity_step/workflows/CI/badge.svg
   :target: https://github.com/molssi-seamm/thermal_conductivity_step/actions
   :alt: Build Status

.. image:: https://codecov.io/gh/molssi-seamm/thermal_conductivity_step/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/molssi-seamm/thermal_conductivity_step
   :alt: Code Coverage

.. image:: https://github.com/molssi-seamm/thermal_conductivity_step/workflows/CodeQL/badge.svg
   :target: https://github.com/molssi-seamm/thermal_conductivity_step/security/code-scanning
   :alt: Code Quality

.. image:: https://github.com/molssi-seamm/thermal_conductivity_step/workflows/Release/badge.svg
   :target: https://molssi-seamm.github.io/thermal_conductivity_step/index.html
   :alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/thermal_conductivity_step.svg
   :target: https://pypi.python.org/pypi/thermal_conductivity_step
   :alt: PyPi VERSION

A SEAMM plug-in for Thermal Conductivity

* Free software: BSD-3-Clause
* Documentation: https://molssi-seamm.github.io/thermal_conductivity_step/index.html
* Code: https://github.com/molssi-seamm/thermal_conductivity_step

Features
--------

* Please edit this section!

Acknowledgements
----------------

This package was created with the `molssi-seamm/cookiecutter-seamm-plugin`_ tool, which
is based on the excellent Cookiecutter_.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`molssi-seamm/cookiecutter-seamm-plugin`: https://github.com/molssi-seamm/cookiecutter-seamm-plugin

Developed by the Molecular Sciences Software Institute (MolSSI_),
which receives funding from the `National Science Foundation`_ under
award CHE-2136142.

.. _MolSSI: https://molssi.org
.. _`National Science Foundation`: https://www.nsf.gov


=======
History
=======
2026.10.16 -- Bugfix: a short run stopped the analysis with an error
    * A run, or block of a run, shorter than about 10 ps stopped the analysis with an
      IndexError. Each must now be at least 10 ps long, and the step says so.

2026.10.15.2 -- Analyze MD run earlier in the flowchart
    * New "MD to analyze" choice: run the MD in the sub-flowchart (as before), the last
      MD run earlier in the flowchart, the last MD run of each loop iteration, or
      md.h5md files, including other jobs'. A single run is divided into blocks to
      estimate the errors.
    * Before the job runs, the step checks that the MD will sample the heat flux every
      two timesteps, and the job does not start if it does not.
    * The dialog shows only the settings that apply, and hides the sub-flowchart when
      it is not used.
    * When the run (or block) is too short to fit the Helfand moments, the output now
      says so; before, those rows were silently missing.

2026.10.15.1 -- Reads the H5MD files; needs a periodic system
    * Reads the heat flux, temperature and volume from the ``md.h5md`` files that the
      LAMMPS step now writes, and from the older text files for runs made before.
    * Stops before running any MD if the system is not periodic, since the heat flux is
      divided by the volume of the cell.
    * The temperature is now averaged over the same samples as the heat flux, the whole
      run. It was averaged only after the equilibration detected in the run, while the
      heat flux was used whole. The thermal conductivity changes very little, e.g. by
      0.05% for liquid argon.
    * Bugfix: a run whose temperature and volume were missing stopped with an obscure
      error; the message now says what is missing. The sampling interval was taken to be
      in fs even when the file gave it in ps.

2026.10.15 -- Bugfix: crash with coarse sampling; unreliable fits
    * The Green–Kubo fit failed when the heat flux was sampled less often than every
      0.4 ps. It no longer fails.
    * The Green–Kubo fit could accept a second exponential with a negative amplitude,
      or one too slow to level off within the data, and give a value far from the
      plateau of the integral. Such fits are now rejected in favour of a single
      exponential. The error of a two-exponential fit, which could be enormous when
      the two time constants were nearly equal, now accounts for their correlation.
    * The errors were from the fits to the curves averaged over the runs, which
      treat their strongly correlated points as independent: the Green-Kubo and
      Helfand-moment errors were far too small (e.g. +/- 0.0004 W/m/K where the runs
      differed by 0.03), and the Helfand-derivative errors too large. The error of
      each value is now the standard error of the values fitted to each run, and the
      95% interval is twice that.
    * With a single run the Helfand-moment fits failed and printed 1.00; they now give
      the slope. With a single run there is no spread between runs to estimate
      errors from, so none are printed.
    * The slope of the Helfand moments ("Helfand Derivative") was shifted by one
      sample, and its errors were in the wrong units. Both are corrected.
    * The analysis now uses the shared ``seamm_md_analysis`` library, also used by the
      Diffusivity step, instead of its own copy. The Helfand moments are computed much
      faster (by FFT): for a million samples, 0.4 s instead of about 2 minutes.
    * Thermal conductivities from the LAMMPS Heat Flux sub-step need lammps-step
      2026.10.15 or later: earlier versions computed the heat flux wrongly.
    * The step no longer needs pandas or statsmodels, and its tests run with uv in CI
      using the package's declared dependencies.

2026.3.1 -- Internal: switching from deprecated library pkg_resources to importlib

2024.6.3 -- Bugfix: handling of options for subflowchart
    * Fixed a bug where the options for the subflowchart were not being parsed
      correctly.
      
2024.3.22 -- Updated for new scheme for running background tasks.

2024.1.5 -- Bugfix: Thermal conductivity
    * If the Helfand moments fit in the thermal conductivity step failed it stopped the
      entire job. This is fixed, as well as some of the underlying causes for
      convergence issues.
      
2023.5.29 -- Converged with general approach for trajectory analysis

2023.5.6 -- Bugfix
    * Fixed an error handling Nan's and Inf's that caused a crash
    * Added the predictions from the derivatives of the Helfand moments to the output to
      give a better feel for the quality of the results.
      
2023.5.5 -- Improved analysis
    * Considerable improvements to the analysis, results now seem solid
    * Fixed issues with fitting the linear portion of the Helfand moments
    * Added plot of the slope from the Helfand moments, which is similar to the
      Green-Kubo integral.
    * Cleaned up both the output and graphs.
      
2023.4.24 -- Initial working version
    * Initial tests seem to work but needs more thorough testing.
    * Needs documentation!
      
2023.4.18 (2023-04-18)
    * Plug-in created using the SEAMM plug-in cookiecutter.
