You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use an already existing HubbardStructureData for a new calculation. If I upload it to qe-app and enable the Hubbard calculation, it asks me to provide Hubbard U values again and creates (surprisingly) a new HubbardStructureData. In my case, I had both U and V values and the V values were lost. Would it be possible to take the input HubbardStructureData as it is without the need to override the Hubbard parameters?
The workaround that we did with @mikibonacci in src/aiidalab_qe/workflows/__init__.py, starting from the line 135:
# Check if hubbard_dict is provided
if hubbard_dict is not None:
if isinstance(structure,HubbardStructureData):
builder.structure = structure
else:
hubbard_parameters = hubbard_dict["hubbard_u"]
hubbard_structure = HubbardStructureData.from_structure(structure)
# Initialize on-site Hubbard values
for key, value in hubbard_parameters.items():
kind, orbital = key.rsplit(" - ", 1)
hubbard_structure.initialize_onsites_hubbard(
atom_name=kind,
atom_manifold=orbital,
value=value,
hubbard_type="U",
use_kinds=True,
)
# Determine whether to store and use hubbard_structure based on conditions
if (
isinstance(structure, HubbardStructureData)
and hubbard_structure.hubbard == structure.hubbard
):
# If the structure is HubbardStructureData and hubbard parameters match, assign the original structure
builder.structure = structure
else:
# In all other cases, store and assign hubbard_structure
hubbard_structure.store()
builder.structure = hubbard_structure
The text was updated successfully, but these errors were encountered:
This is weird since Qe app didn't have this behaviour. On the other hand, QE app shouldn't do a U + V calculation , since we dont have any way to assign them ( at the moment ).
I want to use an already existing HubbardStructureData for a new calculation. If I upload it to qe-app and enable the Hubbard calculation, it asks me to provide Hubbard U values again and creates (surprisingly) a new HubbardStructureData. In my case, I had both U and V values and the V values were lost. Would it be possible to take the input HubbardStructureData as it is without the need to override the Hubbard parameters?
The workaround that we did with @mikibonacci in src/aiidalab_qe/workflows/__init__.py, starting from the line 135:
The text was updated successfully, but these errors were encountered: