diff --git a/atomicfeaturespackage/atomicproperties/atomic_properties_dft.py b/atomicfeaturespackage/atomicproperties/atomic_properties_dft.py index 06ea3f788aaace93d598bd92e7427fbb80c1e680..8e002e07620268bf1dc298f06c82ebed35854edf 100644 --- a/atomicfeaturespackage/atomicproperties/atomic_properties_dft.py +++ b/atomicfeaturespackage/atomicproperties/atomic_properties_dft.py @@ -1,21 +1,23 @@ #!/usr/bin/env python # coding: utf-8 -# In[1]: +''' +Module : atomic_properties_dft +This module with help of atomic_properties_fhi class from metainfo module instantiates objects with atomic element symbol as identifier to access atomic features available +''' from atomicfeaturespackage.metainfo.metainfo import atomic_properties_fhi,metadata import pandas as pd import os -# -# # Section instantiation and its objects attributes are filled using functions f and t. Each function call will create 102 objects unique ( atomic element symbol) which can be used to access its properties - -# In[2]: - def f(df1,objs): + ''' + This method instantiates objects of class atomic_properties_fhi when spin arg is set to "FALSE". + ''' + for i in df1['atomic_element_symbol']: fhi = atomic_properties_fhi() prop = fhi.m_create(metadata) @@ -65,6 +67,9 @@ def f(df1,objs): def t(df1,objs): + ''' + This method instantiates objects of class atomic_properties_fhi when spin arg is set to "TRUE". + ''' for i in df1['atomic_element_symbol']: fhi = atomic_properties_fhi() prop = fhi.m_create(metadata) @@ -120,6 +125,14 @@ def t(df1,objs): path = os.path.abspath(os.path.join(os.path.dirname(__file__),"..")) def method(Spin = '', method = ''): + ''' +After importing atomic_properties_dft module one must call this 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" or "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 + ''' + if Spin.lower() == 'false' and method.lower() == 'hse06': path_new = os.path.join(path, "data","dft", "no_spin_hse06_really_tight.csv") df1 = pd.read_csv(path_new) @@ -185,12 +198,11 @@ def method(Spin = '', method = ''): -# ### This function can be called to access quantity definitions - -# In[4]: - - def definition(abc): + + ''' + This function can be used to access quantity definitions for each element features accessible + ''' if abc == 'atomic_number': return atomic_properties_fhi.atomic_number.__doc__ if abc == 'atomic_element_symbol': @@ -265,24 +277,14 @@ def definition(abc): return metadata.atomic_basis_set.__doc__ - - - - - - - -# ### This function utilty is, it can be called to access element properties based on its symbol in periodic table. Can be usefull if want to acess particular property of multiple elements at once - -# In[5]: - def symbol(abc): + ''' +This function utilty is, it can be called to access element properties based on its symbol in periodic table. Can be usefull if want to acess particular property of multiple elements at once + ''' return globals()[abc] - -# In[ ]: - +# This method_list object could be called after importing this module so one can easily see all the quantities accessible. method_list = [method for method in dir(atomic_properties_fhi) if (method.startswith('m_') or method.startswith('_') or method.startswith('__') or method.startswith('val') or method.startswith('section_') or method.startswith('get')) is False]