This is a simple workflow to generate Magpie features for materials when a set of POSCAR files are provided.
- Clone this repository or download as a zip file and unzip it.
- Enter the workdir (i.e., 'cd magpie_workflow')
- Create a directory with name 'input_poscars' (i.e., 'mkdir input_poscars') and add all the POSCAR files to it. This directory SHOULD contain only the POSCAR files in it. (Only other file that is optionally permitted to be in this directory is 'properties.txt'. But it will be deleted at the beginning of workflow and a new 'properties.txt' is created. So it is not required to manually create a 'properties.txt' file. Any other files will be raise error when it is considered as an POSCAR file by Magpie.)
- Run the workflow.py script in python3 (haven't tested in python2)
- All the newly generated files are inside "./OUTDIR/"
NB: For testing purposes, a random set of POSCAR files are hosted here at : https://drive.google.com/open?id=1K2aoFptylrPOzJEFbNBoF3pPHPAjdAeH (can be accessed while signed in with a northwestern.edu Google account), if anyone is interested to just check the workflow's functionality very quick.
It is created inside the 'input_poscars' directory. This is a necessary file for Magpie to run successfully. it contains only the POSCAR filenames (in the attribute 'filename') and a 'local_reference' attribute name which is just the index of that material in the list. The latter attribute, even thoguh seemingly trivial, is necessary to do a cross-reference with the geenrated Magpie features in './OUTDIR/features_generated_magpie.csv'
- features_processed_final.csv : Final output file with POSCAR filename and corresponding features (elemental and voronoi)
- features_generated_magpie.csv : Raw output file from Magpie. The final attribute ('local_reference') is to cross reference between the Magpie output data and properties.txt generated inside the 'input_poscars' directory. It is necessary because the Magpie removes any materials (i.e., poscars) whose features cannot be generated. Also, the Magpie output file doesn't explicitely contain any data-point identifiers.
- out.workflow.txt : Output messages from Magpie
- err.worksflow.txt : Error messages from Magpie
- generate-attributes.in : A Java based, Magpie input file generated by the workflow. Magpien executables are called explicitely from python in this workflow.
- This workflow system does nothing other than saving one's time by automating many of 'learn-copy-paste-removal' manual labour. All the calculations on elemental properties and Voronoi tesselations are still completely done within Magpie (So, thanks, Logan!).
- workflow.py is a simple script using basic python functions and in-built python3 libraries. Always welcome to have a look and/or make edits.
- Internal configurations and default values can be edited inside the workflow.py - if necessary. But no edits are needed at all by default - if Steps 1-4 above are followed.
- Adding a configuration file could've made this system flexible, but I just wanted to keep it simple to use, at least for now.
- Any pull requests with relevant modifications are highly appreciated. If someone wanna make this README file less messy, you're always welcome to do that.
Magpie is hosted at https://bitbucket.org/wolverton/magpie/src/master/
Citations should be referenced to : Ward, Logan, et al. "A general-purpose machine learning framework for predicting properties of inorganic materials." npj Computational Materials 2 (2016): 16028.