Skip to content

Commit

Permalink
Merge pull request #1 from RandomDefaultUser/multi-gpu
Browse files Browse the repository at this point in the history
Adjustments to multiple GPU implementation
  • Loading branch information
nerkulec authored Apr 25, 2024
2 parents 3b0f7b2 + e4f2eed commit 0400bff
Show file tree
Hide file tree
Showing 114 changed files with 9,962 additions and 5,111 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.0
current_version = 1.2.1
commit = True
tag = True
sign_tags = True
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
conda env export -n mala-cpu > env_1.yml
# install mala package
pip --no-cache-dir install -e .[opt,test]
pip --no-cache-dir install -e .[opt,test] --no-build-isolation
- name: Check if Conda environment meets the specified requirements
shell: 'bash -c "docker exec -i mala-cpu bash < {0}"'
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://black.readthedocs.io/en/stable/integrations/source_version_control.html

repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.12
22 changes: 11 additions & 11 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# YAML 1.2
cff-version: 1.1.0
cff-version: 1.2.1
message: "If you use this software, please cite it using these metadata."
authors:
- affiliation: "Center for Advanced Systems Understanding (CASUS), Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)"
family-names: Cangi
given-names: Attila
orcid: https://orcid.org/0000-0001-9162-262X
- affiliation: "Sandia National Laboratories (SNL)"
family-names: Rajamanickam
given-names: Sivasankaran
orcid: https://orcid.org/0000-0002-5854-409X
- affiliation: "Center for Advanced Systems Understanding (CASUS), Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)"
family-names: Brzoza
given-names: Bartosz
- affiliation: "Center for Advanced Systems Understanding (CASUS), Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)"
family-names: Callow
given-names: Timothy J.
- affiliation: "Center for Advanced Systems Understanding (CASUS), Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)"
family-names: Cangi
given-names: Attila
orcid: https://orcid.org/0000-0001-9162-262X
- affiliation: "Oak Ridge National Laboratory (ORNL)"
family-names: Ellis
given-names: J. Austin
Expand Down Expand Up @@ -54,10 +58,6 @@ authors:
- affiliation: "Center for Advanced Systems Understanding (CASUS), Helmholtz-Zentrum Dresden-Rossendorf e.V. (HZDR)"
family-names: Pöschel
given-names: Franz
- affiliation: "Sandia National Laboratories (SNL)"
family-names: Rajamanickam
given-names: Sivasankaran
orcid: https://orcid.org/0000-0002-5854-409X
- affiliation: "Nvidia Corporation"
family-names: Romero
given-names: Josh
Expand All @@ -83,12 +83,12 @@ authors:
given-names: D. Jon


date-released: 2022-10-18
date-released: 2024-02-01
keywords:
- "machine-learning"
- "dft"
license: "BSD-3-Clause"
repository-code: "https://github.com/mala-project/mala"
title: MALA
doi: 10.5281/zenodo.5557254 # This DOI represents all versions, and will always resolve to the latest one.
version: 1.1.0
version: 1.2.1
2 changes: 1 addition & 1 deletion Copyright.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
************************************************************************

MALA v. 1.1.0
MALA v. 1.2.1

Under the terms of Contract DE-NA0003525 with NTESS,
the U.S. Government retains certain rights in this software.
Expand Down
18 changes: 17 additions & 1 deletion docs/source/CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ the core development team.
* If you're adding code that should be tested, add tests
* If you're adding or modifying examples, make sure to add them to `test_examples.py`

### Formatting code

* MALA uses [`black`](https://github.com/psf/black) for code formatting
* The `black` configuration is located in `pyproject.toml`, the `black` version
is specified in `.pre-commit-config.yaml`
* Currently, no automatic code reformatting will be done in the CI, thus
please ensure that your code is properly formatted before creating a pull
request. We suggest to use [`pre-commit`](https://pre-commit.com/). You can

* manually run `pre-commit run -a` at any given time
* configure it to run before each commit by executing `pre-commit install`
once locally

Without `pre-commit`, please install the `black` version named in
`.pre-commit-config.yaml` and run `find -name "*.py" | xargs black` or just
`black my_modified_file.py`.

### Adding dependencies

If you add additional dependencies, make sure to add them to `requirements.txt`
Expand All @@ -98,7 +115,6 @@ they are not.
Further, in order for them to be available during the CI tests, make sure to
add _required_ dependencies to the appropriate environment files in folder `install/` and _extra_ requirements directly in the `Dockerfile` for the `conda` environment build.


## Pull Requests
We actively welcome pull requests.
1. Fork the repo and create your branch from `develop`
Expand Down
5 changes: 5 additions & 0 deletions docs/source/advanced_usage/descriptors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Improved data conversion
========================

As a general remark please be reminded that if you have not used LAMMPS
for your first steps in MALA, and instead used the python-based descriptor
calculation methods, we highly advise switching to LAMMPS for advanced/more
involved examples (see :ref:`installation instructions for LAMMPS <lammpsinstallation>`).

Tuning descriptors
******************

Expand Down
5 changes: 5 additions & 0 deletions docs/source/advanced_usage/predictions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Predictions at scale in principle work just like the predictions shown
in the basic guide. One has to set a few additional parameters to make
optimal use of the hardware at hand.

As a general remark please be reminded that if you have not used LAMMPS
for your first steps in MALA, and instead used the python-based descriptor
calculation methods, we highly advise switching to LAMMPS for advanced/more
involved examples (see :ref:`installation instructions for LAMMPS <lammpsinstallation>`).

MALA ML-DFT models can be used for predictions at system sizes and temperatures
larger resp. different from the ones they were trained on. If you want to make
a prediction at a larger length scale then the ML-DFT model was trained on,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/basic_usage/more_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Data generation and conversion
MALA operates on volumetric data. Volumetric data is stored in binary files.
By default - and discussed here, in the introductory guide - this
means ``numpy`` files (``.npy`` files). Advanced data storing techniques
are :ref:`also available <openpmd data>`
are :ref:`also available <openpmd data>`.

Data generation
###############
Expand Down
17 changes: 13 additions & 4 deletions docs/source/citing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,19 @@ range, please cite the respective transferability studies:
@article{MALA_temperaturetransfer,
title={Machine learning the electronic structure of matter across temperatures},
author={Fiedler, Lenz and Modine, Normand A and Miller, Kyle D and Cangi, Attila},
journal={arXiv preprint arXiv:2306.06032},
year={2023}
title = {Machine learning the electronic structure of matter across temperatures},
author = {Fiedler, Lenz and Modine, Normand A. and Miller, Kyle D. and Cangi, Attila},
journal = {Phys. Rev. B},
volume = {108},
issue = {12},
pages = {125146},
numpages = {16},
year = {2023},
month = {Sep},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.108.125146},
url = {https://link.aps.org/doi/10.1103/PhysRevB.108.125146}
}
112 changes: 58 additions & 54 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,31 @@
import os
import subprocess
import sys

# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath("../../"))


# -- Project information -----------------------------------------------------

project = 'Materials Learning Algorithms (MALA)'
copyright = '2021 National Technology & Engineering Solutions of Sandia, ' \
'LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, ' \
'the U.S. Government retains certain rights in this software. ' \
'Attila Cangi, J. Austin Ellis, Lenz Fiedler, Daniel Kotik, ' \
'Normand Modine, Sivasankaran Rajamanickam, Steve Schmerler, Aidan Thompson'
project = "Materials Learning Algorithms (MALA)"
copyright = (
"2021 National Technology & Engineering Solutions of Sandia, "
"LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, "
"the U.S. Government retains certain rights in this software. "
"Attila Cangi, J. Austin Ellis, Lenz Fiedler, Daniel Kotik, "
"Normand Modine, Sivasankaran Rajamanickam, Steve Schmerler, Aidan Thompson"
)

author = 'Attila Cangi, J. Austin Ellis, Lenz Fiedler, Daniel Kotik, ' \
'Normand Modine, Sivasankaran Rajamanickam, Steve Schmerler, Aidan Thompson'
author = (
"Attila Cangi, J. Austin Ellis, Lenz Fiedler, Daniel Kotik, "
"Normand Modine, Sivasankaran Rajamanickam, Steve Schmerler, Aidan Thompson"
)

# The version info for the project
tag = subprocess.run(['git', 'describe', '--tags'], capture_output=True,
text=True)
tag = subprocess.run(
["git", "describe", "--tags"], capture_output=True, text=True
)
version = tag.stdout.strip()


Expand All @@ -41,46 +47,47 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'myst_parser',
'sphinx_markdown_tables',
'sphinx_copybutton',
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
"myst_parser",
"sphinx_markdown_tables",
"sphinx_copybutton",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
]

napoleon_google_docstring = False
napoleon_numpy_docstring = True

autodoc_mock_imports = [
'ase',
'optuna',
'mpmath',
'torch',
'numpy',
'scipy',
'oapackage',
'matplotlib',
'horovod',
'lammps',
'total_energy',
'pqkmeans',
'dftpy',
'asap3',
'openpmd_io'
"ase",
"optuna",
"mpmath",
"torch",
"numpy",
"scipy",
"oapackage",
"matplotlib",
"horovod",
"lammps",
"total_energy",
"pqkmeans",
"dftpy",
"asap3",
"openpmd_io",
"skspatial",
]

myst_heading_anchors = 3

autodoc_member_order = 'groupwise'
autodoc_member_order = "groupwise"

# Add any paths that contain templates here, relative to this directory.
templates_path = ['templates']
templates_path = ["templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -93,30 +100,30 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_logo = "./img/logos/mala_horizontal_white.png"

html_context = {
'display_github': True,
'github_repo': 'mala-project/mala',
'github_version': 'develop',
'conf_py_path': '/docs/source/',
"display_github": True,
"github_repo": "mala-project/mala",
"github_version": "develop",
"conf_py_path": "/docs/source/",
}

html_theme_options = {
'logo_only': True,
'display_version': False,
"logo_only": True,
"display_version": False,
}
html_static_path = ['_static']
html_static_path = ["_static"]
# html_static_path = []
html_css_files = ["css/custom.css"]
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = "./img/logos/mala_vertical.png"
# html_logo = "./img/logos/mala_vertical.png"

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand All @@ -125,12 +132,9 @@

# The suffix of source file names.
source_suffix = {
'.rst': 'restructuredtext',
'.txt': 'markdown',
'.md': 'markdown',
".rst": "restructuredtext",
".txt": "markdown",
".md": "markdown",
}

add_module_names = False



Binary file modified docs/source/img/logos/mala_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/img/logos/mala_horizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/img/logos/mala_horizontal_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/img/logos/mala_vertical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ MALA has been employed in various publications, showcasing its versatility and e
data calculated for hundreds of atoms, MALA can predict the electronic
structure of up to 100'000 atoms.

- [Machine learning the electronic structure of matter across temperatures](https://doi.org/10.48550/arXiv.2306.06032) (arXiv preprint)
- [Machine learning the electronic structure of matter across temperatures](https://doi.org/10.1103/PhysRevB.108.125146) (Phys. Rev. B)
by L. Fiedler, N. A. Modine, K. D. Miller, A. Cangi

- Currently in the preprint stage. Shown here is the temperature
tranferability of MALA models.
- This publication shows how MALA models can be employed across temperature
ranges. It is demonstrated how such models account for both ionic and
electronic temperature effects of materials.



Expand Down
2 changes: 2 additions & 0 deletions docs/source/install/installing_lammps.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _lammpsinstallation:

Installing LAMMPS
==================

Expand Down
Loading

0 comments on commit 0400bff

Please sign in to comment.