gracklepy

The Grackle chemistry and cooling library for astrophysical simulations and models.

https://github.com/grackle-project/grackle

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

The Grackle chemistry and cooling library for astrophysical simulations and models.

Basic Info
Statistics
  • Stars: 28
  • Watchers: 11
  • Forks: 54
  • Open Issues: 74
  • Releases: 5
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.rst

Grackle
=======


.. image:: https://img.shields.io/badge/Users-List-lightgrey.svg
   :target: https://groups.google.com/forum/#!forum/grackle-cooling-users

.. image:: https://circleci.com/gh/grackle-project/grackle/tree/main.svg?style=shield
   :target: https://circleci.com/gh/grackle-project/grackle/tree/main

.. image:: https://results.pre-commit.ci/badge/github/grackle-project/grackle/main.svg
   :target: https://results.pre-commit.ci/latest/github/grackle-project/grackle/main

.. image:: https://readthedocs.org/projects/grackle/badge/?version=latest
   :target: https://grackle.readthedocs.io/en/latest/?badge=latest)

.. image:: https://img.shields.io/pypi/v/gracklepy?label=gracklepy%40pypi
   :target: https://pypi.org/project/gracklepy/

.. image:: https://img.shields.io/pypi/pyversions/gracklepy
   :target: https://pypi.org/project/gracklepy/

`Documentation `__ |
`Installation `__ |
`Gracklepy Installation `__ |
`Usage Guide `__ |
`Integration Guide `__ |
`Contributing `__ |
`Getting Help `__

.. COMMENT:  README-MAIN-BODY-START-ANCHOR

Grackle is a chemistry and radiative cooling library for astrophysical simulations and models.
The core library provides interfaces for C, C++ and Fortran simulation codes.
The project also offers the Gracklepy package to provide Python bindings.

Features
--------

Grackle provides functions to update chemistry species; solve radiative
cooling and update internal energy; and calculate cooling time, temperature,
pressure, and ratio of specific heats (γ).
The library offers

- two options for primordial chemistry and cooling. It can (i) evolve a non-equilibrium chemistry network  **OR** (ii) use tabulated cooling rates calculated with the photo-ionization code, `Cloudy `__.

- tabulated metal cooling rates calculated with `Cloudy `__.

- photo-heating and photo-ionization (with optional self-shielding corrections) from either the `Faucher-Giguere et al. (2009) `__ or `Haardt & Madau (2012) `__ UV backgrounds.

- support for user-provided arrays of volumetric and specific heating rates.

Our `method paper `__ provides more information.

Projects that provide out-of-the-box support for Grackle
--------------------------------------------------------

Grackle is a popular tool (the `method paper `__ has over 300 citations) and has been used in a wide variety of calculations.
Below, we list open source projects that provide out-of-the-box support for Grackle:

`ChaNGa `__,
`Cholla `__,
`Enzo `__,
`Enzo-E `__,
`Gamer `__,
`Gasoline `__,
`GIZMO `__,
`Swift `__

   We welcome PRs to add your simulation code (or python package) to this list.

Getting Grackle
---------------

Currently, the core Grackle library must be built from source.
If you only need Grackle as a dependency of a simulation code and that code is built with CMake, then that code's build system might be configured to automatically fetch, build, and link Grackle into the code for you (`Enzo-E `__ is an example of a code configured in this manner).

If you contribute to a simulation code, our `Integration Guide `__ provides guidance on simplifying the process (for you and your users) of configuring your code to use Grackle.

Building the Core Grackle Library From Source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Grackle requires a C99 compiler, a Fortran compiler, and HDF5 (1.6 or newer).
On most platforms, compilation with the CMake build system (3.16 or newer) is as simple as:

.. code-block:: shell-session

   cmake -B build          # configure the build-directory
   cmake --build ./build   # perform the build

You can invoke the examples from within the ``build/examples`` directory (`we're adding support `__ to let you run them from anywhere).
To build Grackle as a shared lib, replace the first command with ``cmake -DBUILD_SHARED_LIBS=ON -Bbuild``.
To install Grackle, invoke ``cmake --install ./build [--prefix ]`` (the optional part lets you specify an install-path).

For more details **(especially if you encounter any errors),** see our comprehensive `Installation Guide `__.
It provides more context for inexperienced CMake users, describes additional configuration options (relevant if you encounter issues), and describes Grackle's "classic" build-system.

Installing Gracklepy
~~~~~~~~~~~~~~~~~~~~

The easiest way to get Gracklepy is to invoke the following command

.. code-block:: shell-session

   ~/grackle $ pip install gracklepy

This will download a pre-built version (called a wheel) of Gracklepy from PyPI. This should "just work," unless you use a highly unusual system (if it fails please let us know).

Be aware that the vast majority of Grackle calculation requires Grackle's data files.
At this time you must download manually download these files (see the installation guide); we're working on streamlining this in the future.

For more about installation (and downloading data files), see our `Gracklepy installation guide `__ .

**NOTE:** Gracklepy was formerly known as Pygrackle.
If you previously installed Pygrackle, you should uninstall it before you install GracklePy.

Getting Started
---------------

To help you start using Grackle, we provide:

- a `Usage Guide `__
- example Grackle programs written in `C, C++, and Fortran `__
- an `Integration Guide `__ (for linking Grackle)
- a curated `guide `__ for the Gracklepy examples

Contributing
------------

Grackle is a community project!
We welcome patches, features, and bugfixes from any member of the community!
For more details, please see our `Constribution Guide `__ and our `Code of Conduct `__

Citing Grackle
--------------

If you use Grackle please cite it.
More instructions are provided `here `__.

Owner

  • Name: grackle-project
  • Login: grackle-project
  • Kind: organization

Citation (CITATION.rst)

Citing Grackle
--------------

The Grackle library was born out of the chemistry and cooling routines of the 
`Enzo <http://enzo-project.org/>`__ simulation code.  As such, all of those who 
have contributed to Enzo development, and especially to the chemistry and 
cooling, have contributed to the Grackle.

If you used the Grackle library in your work, please cite it as "the Grackle chemistry and cooling library (`Smith et al. 2017 <http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S>`__)"

    Smith, B.D., Bryan, G.L., Glover, S.C.O., et al. 2017, MNRAS, 466, 2217

Additionally, please add a footnote to: `https://grackle.readthedocs.io/ <https://grackle.readthedocs.io/>`_

For LaTex and BibTex users, here is a copy of the bibitem entry

.. code-block:: latex

   \bibitem[Smith et al.(2017)]{2017MNRAS.466.2217S} Smith, B.~D., Bryan, G.~L., Glover, S.~C.~O., et al.\ 2017, \mnras, 466, 2217

and here is a copy of the Bibtext entry:

.. code-block:: bibtex

   @ARTICLE{2017MNRAS.466.2217S,
      author = {{Smith}, B.~D. and {Bryan}, G.~L. and {Glover}, S.~C.~O. and 
           {Goldbaum}, N.~J. and {Turk}, M.~J. and {Regan}, J. and {Wise}, J.~H. and 
           {Schive}, H.-Y. and {Abel}, T. and {Emerick}, A. and {O'Shea}, B.~W. and 
           {Anninos}, P. and {Hummels}, C.~B. and {Khochfar}, S.},
       title = "{GRACKLE: a chemistry and cooling library for astrophysics}",
     journal = {\mnras},
   archivePrefix = "arXiv",
      eprint = {1610.09591},
    keywords = {astrochemistry, methods: numerical, galaxies: formation},
        year = 2017,
       month = apr,
      volume = 466,
       pages = {2217-2234},
         doi = {10.1093/mnras/stw3291},
      adsurl = {http://adsabs.harvard.edu/abs/2017MNRAS.466.2217S},
     adsnote = {Provided by the SAO/NASA Astrophysics Data System}
   }

GitHub Events

Total
  • Create event: 18
  • Release event: 3
  • Issues event: 21
  • Watch event: 3
  • Delete event: 8
  • Issue comment event: 88
  • Push event: 83
  • Pull request event: 189
  • Pull request review comment event: 72
  • Pull request review event: 96
  • Fork event: 6
Last Year
  • Create event: 18
  • Release event: 3
  • Issues event: 21
  • Watch event: 3
  • Delete event: 8
  • Issue comment event: 88
  • Push event: 83
  • Pull request event: 189
  • Pull request review comment event: 72
  • Pull request review event: 96
  • Fork event: 6

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 30
  • Total pull requests: 173
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 5
  • Total pull request authors: 12
  • Average comments per issue: 0.9
  • Average comments per pull request: 0.46
  • Merged pull requests: 85
  • Bot issues: 0
  • Bot pull requests: 6
Past Year
  • Issues: 14
  • Pull requests: 128
  • Average time to close issues: 4 days
  • Average time to close pull requests: 16 days
  • Issue authors: 3
  • Pull request authors: 10
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.2
  • Merged pull requests: 55
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • mabruzzo (22)
  • brittonsmith (5)
  • alexmyczko (1)
  • EricTittley (1)
  • mladenivkovic (1)
Pull Request Authors
  • mabruzzo (134)
  • brittonsmith (22)
  • dependabot[bot] (5)
  • ChristopherBignamini (4)
  • KeiganM (2)
  • genchiaki (1)
  • mcsmithastro (1)
  • pre-commit-ci[bot] (1)
  • hsinhaoHHuang (1)
  • chakraman (1)
  • tiapac (1)
  • thinhhn2 (1)
Top Labels
Issue Labels
testing (6) documentation (5) proposal (4) bug (1) code style (1) ci (1) enhancement (1)
Pull Request Labels
refactor (20) documentation (16) build-system (15) testing (13) enhancement (11) trivial (10) bug (9) python (8) ci (8) dependencies (5) github_actions (5) minor (3) major (3) proposal (3) releases (2) code style (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 645 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 2
pypi.org: gracklepy

A wrapper for the Grackle chemistry library

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 645 Last month
Rankings
Forks count: 6.9%
Dependent packages count: 8.7%
Stargazers count: 13.4%
Average: 19.4%
Dependent repos count: 48.7%
Maintainers (2)
Last synced: 6 months ago

Dependencies

src/python/setup.py pypi
  • cython *
  • h5py *
  • matplotlib *
  • numpy *
  • yt >=4.0.2