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

Replace atomic_properties_lda2015.py

parent 55769b0c
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
# coding: utf-8
# In[1]:
'''
Module : atomic_properties_lda2015
This module with help of atomic_properties_lda2015 class from metainfo module instantiates objects with atomic element symbol as identifier to access atomic features available
'''
from atomicfeaturespackage.metainfo.metainfo import atomic_properties_lda2015,metadata
......@@ -9,22 +13,17 @@ import pandas as pd
import os
# In[2]:
path = os.path.abspath(os.path.join(os.path.dirname(__file__),".."))
path_new = os.path.join(path, "data","lda2015", "Atomic_features.csv")
df1 = pd.read_csv(path_new)
method_list = [method for method in dir(atomic_properties_lda2015) if (method.startswith('m_') or method.startswith('_') or method.startswith('__') or method.startswith('val') or method.startswith('section_') or method.startswith('get')) is False]
# In[4]:
# 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_lda2015) if (method.startswith('m_') or method.startswith('_') or method.startswith('__') or method.startswith('val') or method.startswith('section_') or method.startswith('get')) is False]
objs = []
# In[5]:
for i in df1['atomic_element_symbol']:
fhi = atomic_properties_lda2015()
......@@ -32,8 +31,6 @@ for i in df1['atomic_element_symbol']:
objs.append(fhi)
# In[6]:
count = 0
......@@ -59,12 +56,12 @@ for count, symbol in enumerate(atomic_element_symbol):
globals()[symbol] = objs[count]
# ### This function can be called to access quantity definitions
# In[7]:
def definition(abc):
'''
This function can be used to access quantity definitions for each element features accessible
'''
if abc == 'atomic_number':
return atomic_properties_lda2015.atomic_number.__doc__
if abc == 'atomic_element_symbol':
......@@ -92,12 +89,9 @@ def definition(abc):
if abc == 'atomic_basis_set':
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[8]:
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 one wants to acess particular property of multiple elements at once
'''
return globals()[abc]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment