예제 #1
0
    def __init__(self, exclude=None):
        super(CompositionFeaturizers, self).__init__(exclude=exclude)

        self._fast_featurizers = [
            cf.AtomicOrbitals(),
            cf.ElementProperty.from_preset("matminer"),
            cf.ElementProperty.from_preset("magpie"),
            cf.ElementProperty.from_preset("matscholar_el"),
            cf.ElementProperty.from_preset("deml"),
            cf.ElementFraction(),
            cf.Stoichiometry(),
            cf.TMetalFraction(),
            cf.BandCenter(),
            cf.ValenceOrbital()
        ]

        self._slow_featurizers = [
            cf.Miedema(),
            cf.AtomicPackingEfficiency(),  # slower than the rest
            cf.CohesiveEnergy()  # requires mpid present
        ]

        self._need_oxi_featurizers = [
            cf.YangSolidSolution(),
            cf.CationProperty.from_preset(preset_name='deml'),
            cf.OxidationStates.from_preset(preset_name='deml'),
            cf.ElectronAffinity(),
            cf.ElectronegativityDiff(),
            cf.IonProperty()
        ]

        self._intermetallics_only = [
            cf.YangSolidSolution(),
            cf.Miedema(),
        ]
예제 #2
0
 def express(self):
     fs = [
         cf.ElementProperty.from_preset("magpie"),
         cf.OxidationStates.from_preset(preset_name='deml'),
         cf.ElectronAffinity(),
         cf.IonProperty(),
         cf.YangSolidSolution(),
         cf.Miedema(),
     ]
     return self._get_featurizers(fs)
예제 #3
0
 def all(self):
     fs = [
         cf.AtomicOrbitals(),
         cf.ElementProperty.from_preset("matminer"),
         cf.ElementProperty.from_preset("magpie"),
         cf.ElementProperty.from_preset("matscholar_el"),
         cf.ElementProperty.from_preset("deml"),
         cf.ElementFraction(),
         cf.Stoichiometry(),
         cf.TMetalFraction(),
         cf.BandCenter(),
         cf.ValenceOrbital(),
         cf.YangSolidSolution(),
         cf.CationProperty.from_preset(preset_name='deml'),
         cf.OxidationStates.from_preset(preset_name='deml'),
         cf.ElectronAffinity(),
         cf.ElectronegativityDiff(),
         cf.IonProperty(),
         cf.Miedema(),
         cf.AtomicPackingEfficiency(),  # slower than the rest
         cf.CohesiveEnergy()  # requires mpid present
     ]
     return self._get_featurizers(fs)
예제 #4
0
# ### adding features based on compositions from matminer package

# In[11]:


# element property 
ep_feat = composition.ElementProperty.from_preset(preset_name="magpie")
df_ft = ep_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True)# input the "composition" column to the featurizer
# atomic orbitals
ao_feat = composition.AtomicOrbitals()
df_ft = ao_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True)  
# band center
bc_feat  = composition.BandCenter()
df_ft = bc_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# miedema
m_feat  = composition.Miedema()
df_ft = m_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# stoichiometry
s_feat  = composition.Stoichiometry()
df_ft = s_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# t metal fraction
tmf_feat  = composition.TMetalFraction()
df_ft = tmf_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# # valence orbital
# vo_feat  = composition.ValenceOrbital()
# df_ft = vo_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# # yang solid solution
# yss_feat  = composition.YangSolidSolution()
# df_ft = yss_feat.featurize_dataframe(df_ft, col_id="composition", ignore_errors=True) 
# # atomic packing efficiency
# ape_feat  = composition.AtomicPackingEfficiency()