Open bastonero opened 9 months ago
For the docs probably we just need to add pymatgen
to conf.py
@mbercx @t-reents @sphuber good to have your feedbacks here.
Example of usage:
from aiida.orm import *
from ase.io import read
from aiida_quantumespresso.utils.hubbard import initialize_hubbard_parameters
atoms = read('./input.pwi') # anything ASE can parse
s = StructureData(ase=atoms)
hs = initialize_hubbard_parameters( # returns an initialized HubbardStructureData using nearest neighbours analysis
structure=s,
pairs={
# onsite manifold, onsite value, intersite value, dict of intersites {kind name: manifold}
'Mn': ['3d', 4.5, 1.0e-5, {'O':'2p', 'S':'2p'}],
'Fe1': ['3d', 5.0, 1.0e-5, {'O1':'2p', 'S':'2p'}],
...
},
)
Cristiano and myself used it for different calculations, and the logics seem now robust. Probably not the best input API for the initialization of Hubbard parameters, but it is the price to avoid reinventing other classes which makes even more complicated to use this method, which should be easy to use and should hide the underlying complexity of the HubbardStructureData.
Useful utility functions for
HubbardStructureData
are added:This helps issues like #991