Mine MOF oxidation states and featurize metal sites.
Project description
oximachine_featurizer
Mine oxidation states for structures from the (MOF) subset of the CSD and calculate features for them. Runscripts are automatically installed for the most important steps. Some of these runscripts contain hardcoded paths, that would need to be updated. This code generates inputs that can be used with the learnmofox package.
⚠️ Warning: For the mining of the oxidation states, you need the CSD Python API. You need to export the
CSD_HOME
path. Due to the licensing issues, this cannot be done automatically.
Installation
The commands below automatically install several command-line tools (CLI) which are detailed below.
The full process should take some seconds.
Latest version
To install the latest version of the software with all dependencies, you can use
pip install git+https://github.com/kjappelbaum/oximachine_featurizer.git
Stable release
pip install oximachine_featurizer
How to use it
- To run the featurization
run_featurization {structure} {outdir}
for each metal center this should take seconds if there is no disorder.
Note that the metal center features are added using methods from the FeatureCollector
class.
- To collect separate files with features into one file for the feature matrix, you can use the featurecollector, e.g.
run_featurecollection --only_racs {FEATURESPATH} {LABELSPATH} {labelsoutpath} {featureoutspath} {helperoutpath} 0.2 {holdoutpath} 60000 {RACSDATAPATH} column row crystal_nn_no_steinhardt
The bottleneck of this approach is that it currently checks for each name if we exclude it (e.g., due to wrong assignments). One should expect a runtime in the order of several minutes for several structures.
Some output can be found on the MaterialsCloud Archive (doi: 10.24435/materialscloud:2019.0085/v1 ).
Example usage
The use of the main functions of this package is shown in the Jupyter Notebook in the example directory. It contains some example structures and the output, which should be produces in seconds.
Testing the installation
For testing, you can---as it is done for the continuous integration (CI)---use pytest
and run the files in the test
directory. For example
pip install pytest
pytest test/test_featurize.py
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
Hashes for oximachine_featurizer-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 917d4e2344eb5365c459f2eb1f056185fcd46cd4bf1d0f9f0d60d9bc008b8d31 |
|
MD5 | 38ebce987ff6e7641bef91dc1480dc1e |
|
BLAKE2b-256 | 50c7ca272ae07fcf23906314f2fd4cbfcb5446193a07e15043c20b69830f0485 |
Hashes for oximachine_featurizer-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d12de64b058bc958290038abb6fba1db152ef983af5c628322adfdee5cb275cf |
|
MD5 | 8d238629159952730e374d907f4772ef |
|
BLAKE2b-256 | cb726dfa840f751652bf07289328d1b0bd5d5725b5c1f88fcb7bfed2b819aa9a |