Skip to content

Commit

Permalink
Merge pull request SPARC-X#34 from alchem0x2A/master
Browse files Browse the repository at this point in the history
Brand renaming
  • Loading branch information
alchem0x2A authored Sep 28, 2023
2 parents 8a60d8b + b7d0445 commit 459b3a8
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 38 deletions.
10 changes: 5 additions & 5 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set name = "sparc-dft-api" %}
{% set name = "SPARC-X-API" %}
{% set version = "1.0.0" %}
{% set file_ext = "tar.gz" %}
{% set readme = load_file_regex(load_file="README.md", regex_pattern=".*")[0] %}
Expand All @@ -12,7 +12,7 @@ source:

build:
noarch: python
# Install sparc-dft-api and include the psp files
# Install and include the psp files
script: "{{ PYTHON }} -m pip install . --no-deps -vv && cd .. && {{ PYTHON }} -m sparc.download_data"
entry_points:
- "sparc-ase = sparc.cli:main"
Expand All @@ -33,14 +33,14 @@ requirements:
- "ase>=3.22"

about:
home: https://github.com/SPARC-X/sparc-dft-api
home: https://github.com/SPARC-X/{{ name }}
license: GNU General Public License v3.0
license_family: GPL3
license_file: LICENSE
summary: A Python API for the SPARC DFT Code
description: {{ readme }}
doc_url: https://github.com/SPARC-X/sparc-dft-api/blob/v0.2-alpha/README.md
dev_url: https://github.com/SPARC-X/sparc-dft-api
doc_url: https://github.com/SPARC-X/{{ name }}/blob/master/README.md
dev_url: https://github.com/SPARC-X/{{ name }}

extra:
recipe-maintainers: Tian Tian ([email protected])
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A concise description of the problem.
**To Reproduce**
Provide a minimal list of settings / codes to help us debug, such as
- Python version
- Version (git commit hash) of `sparc-dft-api`
- Version (git commit hash) of `SPARC-X-API`
- `SPARC` C-code version (see the SPARC .out file header)
- Your platform and architecture

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `SPARC-X-API`: A Python API for the SPARC-X DFT Code
[![Package](https://raw.githubusercontent.com/alchem0x2A/sparc-dft-api/badges/badges/package.svg)](https://raw.githubusercontent.com/alchem0x2A/sparc-dft-api/badges/badges/package.svg)
[![Coverage](https://raw.githubusercontent.com/alchem0x2A/sparc-dft-api/badges/badges/coverage.svg)](https://raw.githubusercontent.com/alchem0x2A/sparc-dft-api/badges/badges/coverage.svg)
[![Unit tests](https://github.com/alchem0x2A/sparc-dft-api/actions/workflows/installation_test.yml/badge.svg)](https://github.com/alchem0x2A/sparc-dft-api/actions/workflows/installation_test.yml)
[![Package](https://raw.githubusercontent.com/SPARC-X/SPARC-X-API/badges/badges/package.svg)](https://raw.githubusercontent.com/SPARC-X/SPARC-X-API/badges/badges/package.svg)
[![Coverage](https://raw.githubusercontent.com/SPARC-X/SPARC-X-API/badges/badges/coverage.svg)](https://raw.githubusercontent.com/SPARC-X/SPARC-X-API/badges/badges/coverage.svg)
[![Unit tests](https://github.com/SPARC-X/SPARC-X-API/actions/workflows/installation_test.yml/badge.svg)](https://github.com/SPARC-X/SPARC-X-API/actions/workflows/installation_test.yml)

`SPARC-X-API` is an [ASE](https://wiki.fysik.dtu.dk/ase/)-compatible Python API for the density functional theory (DFT) code [SPARC](https://github.com/SPARC-X/SPARC). It offers:

Expand All @@ -23,14 +23,14 @@ which includes the pseudopotential files:
# Change 'sparc-env' to your desired name if needed
conda create -n sparc-env
conda activate sparc-env
conda install -c alchem0x2a sparc-x-api
conda install -c alchem0x2a sparc-dft-api
```

On Linux platforms (x86_64, aarch64), you can also install the
precompiled `sparc` DFT binaries alongside the API:

```bash
conda install -c alchem0x2a sparc
conda install -c conda-forge sparc-x
conda activate sparc-env # Re-activate to have the env variables effective
```

Expand Down Expand Up @@ -281,7 +281,7 @@ short [MD trajectory](tests/outputs/NH3_sort_lbfgs_opt.sparc).

<img width="1200" alt="image" src="https://github.com/alchem0x2A/SPARC-X-API/assets/6829706/e72329ff-7194-4819-94f8-486ef2218844">

### 5. Units used in `SPARC-X-API`
### 5. Parameters and units used in `SPARC-X-API`

In the SPARC DFT code, all input parameters conventionally employ atomic units, such as Hartree and Bohr. Conversely, ASE objects (like `Atoms.positions`, `Atoms.cell`, `Atoms.get_potential_energy()`) utilize eV/Angstrom units.

Expand Down
4 changes: 2 additions & 2 deletions doc/advanced_topics.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Advanced Topics
The design of`sparc-dft-api` is schematically shown in the following figure
The design of `SPARC-X-API` is schematically shown in the following figure
<img width="929" alt="image" src="https://github.com/alchem0x2A/sparc-dft-api/assets/6829706/3419b1c4-3c56-4fd1-a6de-1ce2aea426e7">

### Behind the bundle file format
Expand Down Expand Up @@ -37,7 +37,7 @@ using only relevant data.
### Behind the JSON API

The JSON API are directly parsed from the `SPARC` documentation [LaTeX files](https://github.com/SPARC-X/SPARC/tree/master/doc/.LaTeX).
The JSON API file (`sparc/sparc_json_api/parameters.json`) distributed by `sparc-dft-api` is generated by:
The JSON API file (`sparc/sparc_json_api/parameters.json`) distributed by `SPARC-X-API` is generated by:

```bash
git clone https://github.com/SPARC-X/SPARC.git
Expand Down
4 changes: 2 additions & 2 deletions doc/changes_v0.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Major changes from `sparc-dft-api` [v0.1](https://github.com/SPARC-X/sparc-dft-api/tree/eac557f214b402122a506f88f38c7a8767283503)
## Major changes from `SPARC-X-API` [v0.1](https://github.com/SPARC-X/SPARC-X-API/tree/eac557f214b402122a506f88f38c7a8767283503)

`sparc-dft-api` has been heavily refactored in v1.0. If you're using legacy Python codes
`SPARC-X-API` has been heavily refactored in v1.0. If you're using legacy Python codes
that are written under v0.1 API, there are a few major changes that require your attention:

1. Support for single `.ion` file format is deprecated. Instead, `v0.2` API treats the whole SPARC directory as a bundle format. Please use `read_sparc` and `write_sparc` methods for basic file I/O instead.
Expand Down
18 changes: 9 additions & 9 deletions doc/contribution_guideline.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Submitting issues and pull requests
We welcome users of SPARC and its python-API to submit issues and pull requests via github.
We welcome users of SPARC-X and SPARC-X-API to submit issues and pull requests via github.
When reporting a bug, please make sure to include the following information:

- SPARC version (if available. Should look like "Month Day, Year" in the `.out` file)
- `sparc-python-api` version or commit hash
- `SPARC` version (if available. Should look like "Month Day, Year" in the `.out` file)
- `SPARC-X-API` version or commit hash
- Minimal example for reproducing the error
- Error trace message

Expand All @@ -17,8 +17,8 @@ Pip installation from github's master branch (or your own fork), and download
a copy of the latest pseudopotential files.

```python
git clone https://github.com/SPARC-X/sparc-dft-api.git
pip install -e "sparc-dft-api[test]"
git clone https://github.com/SPARC-X/SPARC-X-API.git
pip install -e "sparc-x-api[test]"
python -m sparc.download_data
```

Expand All @@ -43,14 +43,14 @@ python -m pytest -svv tests/test_all_dft.py
### Adding examples

All examples are listed in `examples/` directory. Please add examples that are important
for demonstrating the functionalities of `sparc-dft-api` while the calculations can be
for demonstrating the functionalities of `SPARC-X-API` while the calculations can be
finished using moderate computating power (e.g. a few minutes with 4 CPU cores).

The examples can have the name in the format `ex[Number]-[purpose].py`.

### Code structure

Below is a brief overview of the modules in `sparc-dft-api` with simple explanations
Below is a brief overview of the modules in `SPARC-X-API` with simple explanations
```
sparc
├── __init__.py
Expand Down Expand Up @@ -95,8 +95,8 @@ Please make sure to exclude any computationally-heavy tests from the step "Test

The CI workflow contains a coverage report step based on the unit test
and generates a [coverage
badge](https://github.com/SPARC-X/sparc-dft-api/blob/badges/badges/coverage.svg)
badge](https://github.com/SPARC-X/SPARC-X-API/blob/badges/badges/coverage.svg)
on the [`badges`
branch](https://github.com/SPARC-X/sparc-dft-api/tree/badges).
branch](https://github.com/SPARC-X/SPARC-X-API/tree/badges).

For repo maintainers, please make sure the `badges` branch is present and **do not merge to this branch**.
4 changes: 2 additions & 2 deletions doc/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Known issues
*This is a list of known bugs with the current sparc-dft-api, remove them when PRs are contributed*
*This is a list of known bugs with the current SPARC-X-API, remove them when PRs are contributed*
- [ ] `sparc-ase` command currently does not support multi-image yet
- [ ] `SPARC` calculator may occasionally require more DFT steps than needed during optimization
- [ ] Raw result parsing from SPARC files may need to be re-factored in a generator form
- [ ] Raw result parsing from SPARC files may need to be re-factored in a generator form
2 changes: 1 addition & 1 deletion examples/ex0-eos.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A simple example using sparc-dft-api to calculate the equation of state of bulk Al.
"""A simple example using SPARC-X-API to calculate the equation of state of bulk Al.
Example taken from GPAW's tutorial:
https://wiki.fysik.dtu.dk/gpaw/tutorialsexercises/structureoptimization/lattice_constants/lattice_constants.html
Expand Down
2 changes: 1 addition & 1 deletion sparc/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ def print_sysinfo(self, command=None):
command = self.command
msg = (
"\n" + "*" * 80 + "\n"
f"SPARC program started by sparc-python-api at {now}\n"
f"SPARC program started by SPARC-X-API at {now}\n"
f"command: {command}\n"
)
if self.log is None:
Expand Down
2 changes: 1 addition & 1 deletion sparc/download_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Download the pseudopotential and other related files after sparc-python-api is installed
"""Download the pseudopotential and other related files after sparc-x-api is installed
Run:
Expand Down
2 changes: 1 addition & 1 deletion sparc/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __find_psp_dir(self, psp_dir=None):
else:
warn(
(
"PSP directory bundled with sparc-dft-api is broken! "
"PSP directory bundled with SPARC-X-API is broken! "
"Please use `sparc.download_data` to re-download them!"
)
)
Expand Down
2 changes: 1 addition & 1 deletion sparc/psp/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is the folder for storing the pseudo potential files with sparc-dft-api.
This is the folder for storing the pseudo potential files with SPARC-X-API.
During installation, this folder will be intentially kept empty.

User `python -m sparc.download_data` to download the default pseudo potential files after installation.
2 changes: 1 addition & 1 deletion sparc/quicktest.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def main():
cprint(
"\nSome of the tests failed! Please refer to the following resources: \n"
"1. SPARC's documentation: https://github.com/SPARC-X/SPARC/blob/master/doc/Manual.pdf \n"
"2. Python API documentation: https://github.com/SPARC-X/sparc-dft-api/wiki\n",
"2. Python API documentation: https://github.com/alchem0x2A/SPARC-X-API/blob/master/README.md\n",
color="FAIL",
)

Expand Down
2 changes: 1 addition & 1 deletion sparc/sparc_parsers/aimd.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ def _write_aimd(
fileobj,
data_dict,
):
raise NotImplementedError("Writing aimd file from python-api " "not supported!")
raise NotImplementedError("Writing aimd file from SPARC-X-API " "not supported!")
2 changes: 1 addition & 1 deletion sparc/sparc_parsers/geopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ def _write_geopt(
fileobj,
data_dict,
):
raise NotImplementedError("Writing geopt file from python-api not supported!")
raise NotImplementedError("Writing geopt file from SPARC-X-API not supported!")
2 changes: 1 addition & 1 deletion sparc/sparc_parsers/out.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,4 @@ def _write_out(
fileobj,
data_dict,
):
raise NotImplementedError("Writing output file from python-api not supported!")
raise NotImplementedError("Writing output file from SPARC-X-API not supported!")
2 changes: 1 addition & 1 deletion sparc/sparc_parsers/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ def _write_static(
fileobj,
data_dict,
):
raise NotImplementedError("Writing static file from python-api not supported!")
raise NotImplementedError("Writing static file from SPARC-X-API not supported!")
2 changes: 1 addition & 1 deletion sparc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def deprecated(message):
def decorator(func):
def new_func(*args, **kwargs):
warn(
"Function {} is deprecated sparc-dft-api >= v0.2! {}".format(
"Function {} is deprecated! {}".format(
func.__name__, message
),
category=DeprecationWarning,
Expand Down

0 comments on commit 459b3a8

Please sign in to comment.