Skip to content
Snippets Groups Projects
Commit a710e0d1 authored by Aakash Ashok Naik's avatar Aakash Ashok Naik :eyes:
Browse files

Upload New File

parent a0c34e8b
Branches
No related tags found
No related merge requests found
%% Cell type:markdown id: tags:
<div id="teaser" style=' background-position: right center; background-size: 00px; background-repeat: no-repeat;
padding-top: 20px;
padding-right: 10px;
padding-bottom: 170px;
padding-left: 10px;
border-bottom: 14px double #333;
border-top: 14px double #333;' >
<div style="text-align:center">
<b><font size="6.4">atomic-features-package usage demonstration</font></b>
</div>
<p>
created by:
Aakash Naik<sup>1</sup>,
Luca Ghiringhelli<sup> 1</sup> <br><br>
<sup>1</sup> Fritz Haber Institute of the Max Planck Society, Faradayweg 4-6, D-14195 Berlin, Germany <br>
<span class="nomad--last-updated" data-version="v1.0.0">[Last updated: April 8, 2020]</span>
<div>
<img style="float: left;" src="assets/image/Logo_MPG.png" width="200">
<img style="float: right;" src="assets/image/Logo_NOMAD.png" width="250">
</div>
</div>
%% Cell type:markdown id: tags:
Unified package that contains atomic-features from various sources like PYMATGEN, MAGPIE, LDA2015 amd FHI_dft can be imported into Jupyter-notebook for performing various machine learning studies
In this demonstration I will show how one can use the package to access material features from different sources using this package
%% Cell type:markdown id: tags:
# --------------------------------------------------------------------------------------------------------------
# Getting Started
%% Cell type:markdown id: tags:
To install this package clone it using this following link:
``git clone git@gitlab.mpcdf.mpg.de:nomad-lab/atomic-features-package.git``
Then use the following command to install it like any other python package
```pip install ./atomic-features-package```
%% Cell type:code id: tags:
``` python
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
```
%% Cell type:markdown id: tags:
# --------------------------------------------------------------------------------------------------------------
# Importing this package modules in Jupyter notebook
%% Cell type:code id: tags:
``` python
from atomicfeaturespackage.atomicproperties import periodictable
```
%% Cell type:markdown id: tags:
This module is a visualization tool that allows us to visualize atomic properites of all elements accross periodic table as a heatmap
%% Cell type:markdown id: tags:
After importing periodictable module one must call this heatmap method to get interactive heatmaps. One must supply Spin and method appropirate keywords agruments as per one's interest.
**Spin** arg value could be :
* "True"
* "False"
**method** arg value could be :
* "hse06"
* "pbe"
* "pbe0"
* "pbesol"
* "pw-lda"
* "revpbe"
* "magpie"
* "lda2015"
* "pymat"
**<font color='red'>Note</font>**: for **method** “magpie”/“lda2015”/“pymat” , **Spin** arg value has to be set to **"False"**
As per different combinations specific element features will be loaded in heatmap plots.
%% Cell type:markdown id: tags:
Below is an example line of code you need to run to visualize data calculated via the HSE06 functional and spinless settings.
%% Cell type:code id: tags:
``` python
periodictable.heatmap(Spin = 'False', method = 'hse06')
```
%% Output
%% Cell type:markdown id: tags:
After running the above line of code one gets a plot of complete periodic table of elements. From the dropdown menu, one can select which property one is interested to check and the table is updated automatically to show the corresponding heatmap.
%% Cell type:markdown id: tags:
# --------------------------------------------------------------------------------------------------------------
%% Cell type:markdown id: tags:
Besides ```periodictable module``` this package has 4 other modules that consist to atomic features from sources corresponding to its name. And it can be imported according to ones need to atomic features.
I will breifly depict each of these module to access atomic feature and functions that are available with it.
```atomic_properties_dft``` module : This module contains several atomic features accessible from FHI-AIMS dft calculations
Import this module using following code shown in next cell block
%% Cell type:code id: tags:
``` python
from atomicfeaturespackage.atomicproperties import atomic_properties_dft as dft
```
%% Cell type:markdown id: tags:
After importing ``atomic_properties_dft`` module one must call **method** function to instantiate element objects. One must supply Spin and method appropirate keywords agruments as per one's interest.
Spin arg value could be :
* "True"
* "False"
method arg value could be :
* "hse06"
* "pbe"
* "pbe0"
* "pbesol"
* "pw-lda"
* "revpbe"
As per different combinations specific datafiles will be read and element features could be accessed. This can be done as follows :
%% Cell type:code id: tags:
``` python
dft.method(method = 'pbe', Spin = 'False')
```
%% Cell type:code id: tags:
``` python
dft.C.atomic_ea
```
%% Output
-1.2418694571568608e-19
%% Cell type:markdown id: tags:
To view a dropdown list of properties accessible one can just press **Tab** after typing in dft.C.
%% Cell type:markdown id: tags:
Use **symbol** method from ```atomic_properties_dft module``` to acess property of interest of elements at once.
Say for example we have a python list ```element = ['Sc','Ti', 'V', 'Cr']``` and we wish to get atomic number of these elements we can do the following
%% Cell type:code id: tags:
``` python
element = ['Sc','Ti', 'V', 'Cr']
atomic_number = []
for ele in element:
atomic_number.append(dft.symbol(ele).atomic_number)
```
%% Cell type:markdown id: tags:
You can also get a python list of all feature names accessible from ```atomic_properties_dft``` module. For getting this one can use following command
%% Cell type:code id: tags:
``` python
dft.method_list
```
%% Output
['atomic_ea',
'atomic_ea_by_half_charged_homo',
'atomic_element_symbol',
'atomic_hfomo',
'atomic_hpomo',
'atomic_ip',
'atomic_ip_by_half_charged_homo',
'atomic_lfumo',
'atomic_lpumo',
'atomic_number',
'atomic_r_d',
'atomic_r_d_05',
'atomic_r_d_1',
'atomic_r_d_neg_05',
'atomic_r_d_neg_1',
'atomic_r_p',
'atomic_r_p_05',
'atomic_r_p_1',
'atomic_r_p_neg_05',
'atomic_r_p_neg_1',
'atomic_r_s',
'atomic_r_s_05',
'atomic_r_s_1',
'atomic_r_s_neg_05',
'atomic_r_s_neg_1',
'atomic_r_val',
'atomic_r_val_05',
'atomic_r_val_1',
'atomic_r_val_neg_05',
'atomic_r_val_neg_1']
%% Cell type:markdown id: tags:
# --------------------------------------------------------------------------------------------------------------
%% Cell type:markdown id: tags:
``atomic_properties_pymat`` module contains several atomic features accessible from pymatgen
Import this module using following code shown in next cell block
%% Cell type:code id: tags:
``` python
from atomicfeaturespackage.atomicproperties import atomic_properties_pymat as pymat
```
%% Cell type:code id: tags:
``` python
pymat.C.boiling_point
```
%% Output
4300.0
%% Cell type:markdown id: tags:
To get a list of properties accessible one can just press **Tab** after typing in pymat.C.
Use **symbol** method from ``atomic_properties_pymat`` module to acess property of interest of elements at once in similar manner as described for ``atomic_properties_dft`` module above.
Similarly you can also get a python list of all feature names accessible from ```atomic_properties_pymat``` module.
%% Cell type:markdown id: tags:
# --------------------------------------------------------------------------------------------------------------
%% Cell type:markdown id: tags:
Similarly remaining two modules ```atomic_properties_pymat``` and ```atomic_properties_magpie``` can be imported and atomic features can be accessed. Use the following commands for importing the modules respectively
%% Cell type:code id: tags:
``` python
from atomicfeaturespackage.atomicproperties import atomic_properties_lda2015 as lda
from atomicfeaturespackage.atomicproperties import atomic_properties_magpie as mp
```
%% Cell type:markdown id: tags:
One is referred to this documentation for further details on this package
[atomic-features-package](https://gitlab.mpcdf.mpg.de/nomad-lab/atomic-features-package/-/blob/master/atomicfeaturespackage/docs/_build/latex/atomic-features-package.pdf)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment