AiiDA plugin for running the CRYSTAL17 code
Project description
aiida-crystal17
AiiDA plugin for running the CRYSTAL17 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)::
>> conda install -c conda-forge aiida-crystal17 aiida-core.services
To install from pypi::
>> pip install aiida-crystal17
To install the development version:
>> git clone https://github.com/chrisjsewell/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
The following will discover and run all unit test:
>> pip install -e .[testing]
>> reentry scan -r aiida
>> pytest -v
To omit tests which call crystal
executable:
>> pytest -v -m "not process_execution"
or alternatively to call the mock_crystal17
executable,
first set the global environmental variable:
>> export MOCK_CRY17_EXECUTABLES=true
Coding Style Requirements
The code style is tested using flake8,
with the configuration set in .flake8
, and code should be formatted with yapf (configuration set in .style.yapf
).
Installing with aiida-crystal17[code_style]
makes the pre-commit
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:
>> cd aiida-crystal17
>> pre-commit install
Optionally you can run yapf
and flake8
separately:
>> 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.
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.
To use this mock executable when running tests, set the global variable MOCK_CRY17_EXECUTABLES=true
.
Setting up CRYSTAL17 locally
To set up local version of CRYSTAL17 on a mac (after downloading a copy from the distributor), I had to:
-
Remove the quarantine from the executable permissions:
xattr -c crystal xattr -c properties
-
Create versions of the lapack/blas libraries in the expected folders:
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
-
Define environmental variables in
~/.bashrc
, as detailed incry17_scripts/cry17.bashrc
-
Copy or symlink the
cry17_scripts/runcry17
script into/usr/local/bin/
License
MIT
Contact
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file aiida-crystal17-0.9.1b5.tar.gz
.
File metadata
- Download URL: aiida-crystal17-0.9.1b5.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7773f0dd9b5c86f48b5331a34b36e55d26f5bdd5f9de32b20901c423128922e7 |
|
MD5 | 7f8b5c46c2e3ad576803b112365a8a43 |
|
BLAKE2b-256 | a4da25eeefbce96d8c55a027e1f3f63af13719b8eb7ea6ee95f2a8b188c34f10 |
Provenance
File details
Details for the file aiida_crystal17-0.9.1b5-py3-none-any.whl
.
File metadata
- Download URL: aiida_crystal17-0.9.1b5-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0fe0c299e6880aefafe3a866e9db6f589254ef6e61bbf42b2718e6d3da66255 |
|
MD5 | 8bc56cde92955089453c1c4822088109 |
|
BLAKE2b-256 | 07b49a584eb330eef54b74c5f798d278540bb96265126f4b323f1a005ca6a3c1 |