AiiDA plugin for running the CRYSTAL17 code
AiiDA plugin for running the CRYSTAL17 code. The code is principally tested against CRYSTAL17, but the output parsing has also been tested against CRYSTAL14.
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/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.)
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:
>> pip install -e .[testing] >> reentry scan -r aiida >> pytest -v
To omit tests which call external executables (like
>> pytest --cry17-skip-exec
To call the actual executables (e.g.
crystal17 instead of
>> pytest --cry17-no-mock
To output the results of calcjob executions to a specific directory:
>> pytest --cry17-workdir "test_workdir"
Coding Style Requirements
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 -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:
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 in
Copy or symlink the
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for aiida_crystal17-0.11.0-py3-none-any.whl