https://github.com/aiidaplugins/aiida-crystal17
A plugin for AiiDA, to run the CRYSTAL17 code
https://github.com/aiidaplugins/aiida-crystal17
Last synced: 9 days ago
JSON representation
A plugin for AiiDA, to run the CRYSTAL17 code
- Host: GitHub
- URL: https://github.com/aiidaplugins/aiida-crystal17
- Owner: aiidaplugins
- License: lgpl-3.0
- Created: 2018-08-23T14:44:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-03T14:12:12.000Z (over 3 years ago)
- Last Synced: 2025-05-08T05:49:46.663Z (14 days ago)
- Language: Python
- Homepage: https://aiida-crystal17.readthedocs.io
- Size: 3.97 MB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aiida-crystal17
[](https://github.com/aiidaplugins/aiida-crystal17)
[](https://codecov.io/gh/aiidaplugins/aiida-crystal17)
[](http://aiida-crystal17.readthedocs.io/)
[](https://pypi.python.org/pypi/aiida-crystal17/)
[](https://anaconda.org/conda-forge/aiida-crystal17)
[](https://doi.org/10.5281/zenodo.3357615)AiiDA plugin for running the [CRYSTAL17](http://www.crystal.unito.it/) code.
The code is principally tested against CRYSTAL17,
but the output parsing has also been tested against CRYSTAL14.**Documentation**: https://readthedocs.org/projects/aiida-crystal17
## Installation
To install from Conda (recommended)::
```shell
>> conda install -c conda-forge aiida-crystal17 aiida-core.services
```To install from pypi::
```shell
>> pip install aiida-crystal17
```To install the development version:
```shell
>> git clone https://github.com/aiidaplugins/aiida-crystal17 .
>> cd aiida-crystal17
>> pip install -e . # also installs aiida, if missing (but not postgres)
>> #pip install -e .[pre-commit,testing] # install extras for more features
>> verdi quicksetup # set up a new profile
>> verdi calculation plugins # should now show the calclulation plugins (with prefix crystal17.)
```## Development
### Testing against mock CRYSTAL17 executables
Because CRYSTAL17 is a licensed software, it is not possible to source a copy of the executable on Travis CI.
Therefore, a mock executable (`mock_runcry17`) has been created for testing purposes (which also speeds up test runs).This executable computes the md5 hash of the supplied input file and tries to match it against a dictionary of
precomputed hashes. If found, the executable will write the matching output (from `test/output_files`) to stdout.The following will discover and run all unit test:
```shell
>> pip install -e .[testing]
>> reentry scan -r aiida
>> pytest -v
```To omit tests which call external executables (like `crystal17`):
```shell
>> pytest --cry17-skip-exec
```To call the actual executables (e.g. `crystal17` instead of `mock_crystal17`):
```shell
>> pytest --cry17-no-mock
```To output the results of calcjob executions to a specific directory:
```shell
>> pytest --cry17-workdir "test_workdir"
```### Coding Style Requirements
The code style is tested using [flake8](http://flake8.pycqa.org),
with the configuration set in `.flake8`, and code should be formatted with [yapf](https://github.com/google/yapf) (configuration set in `.style.yapf`).Installing with `aiida-crystal17[code_style]` makes the [pre-commit](https://pre-commit.com/)
package available, which will ensure these tests are passed by reformatting the code
and testing for lint errors before submitting a commit.
It can be setup by:```shell
>> cd aiida-crystal17
>> pre-commit install
```Optionally you can run `yapf` and `flake8` separately:
```shell
>> yapf -r -i . # recrusively find and format files in-place
>> flake8
```Editors like VS Code also have automatic code reformat utilities, which can adhere to this standard.
### Setting up CRYSTAL17 locally
To set up local version of CRYSTAL17 on a mac (after downloading a copy from the distributor), I had to:
1. Remove the quarantine from the executable permissions:
```shell
xattr -c crystal
xattr -c properties
```2. Create versions of the lapack/blas libraries in the expected folders:
```shell
sudo port install lapack
sudo cp /opt/local/lib/lapack/liblapack.3.dylib /usr/local/opt/lapack/lib/liblapack.3.dylib
sudo cp /opt/local/lib/lapack/libblas.3.dylib /usr/local/opt/lapack/lib/libblas.3.dylib
```3. Define environmental variables in `~/.bashrc`, as detailed in `cry17_scripts/cry17.bashrc`
4. Copy or symlink the `cry17_scripts/runcry17` script into `/usr/local/bin/`## License
See ``LICENSE`` file
## Contact