-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StructureData constructor should accept ASE object with zero cell data #5248
Comments
Just ran into this as well and I strongly second this feature request. When creating an empty aiida-core/aiida/orm/nodes/data/structure.py Lines 762 to 763 in dce0041
I don't know why this was considered a better default value than Unless there are good reasons for this default value that escape me, I would vote to replace it by aiida-core/aiida/orm/nodes/data/structure.py Lines 765 to 766 in dce0041
it may give the impression that a periodic calculation can be performed on a structure for which no cell was specified, leading to garbage results. Thoughts @giovannipizzi @sphuber ? Edit: I will prepare a PR for this. |
P.S. ASE uses a default of
I don't have a strong opinion on |
I didn't write the original So ideally we would improve this, but since the What are you suggesting as a change though? Would you suggest adopting the ASE default for the cell? I am not sure if |
Here's a possible PR that uses |
Thanks. I designed the original class; I agree that in the end it would have probably better to define multiple classes for different dimensionalities, as pymatgen does, but I followed the ASE approach to have only one and define The issue is that the fix in #5341 only works for molecules; what about 2D and 1D materials? If we change this we need to change the default cell also for those cases. A few things to do then:
Also as a general comment: we should not enforce that the cell is not |
I assume here the structure means that made of atoms. There are a variety of symmetries of structures. Periodicity is one of them. Crystal is made of combination of periodicity and rotation + fractional translation. For example, plane symmetry and layer symmetry (for so-called 2D materials?) are different. We might not consider many types structures that may be categorized by symmetry. We may want to describe nanotubes in the best symmetrical way. I feel it is good to discuss which types of structural symmetries the StructureData would like to cover (if this is a serious issue). So I think @sphuber's comment above is only the starting point we can choose, i.e., we should design it assuming we don't know many things about structures. |
Hi Togo, thanks for your comment! In order not to derail this discussion (which is about a much smaller fix), I would suggest opening a new issue & thread for this. |
Is your feature request related to a problem? Please describe
StructureData(ase=ase.Atoms(...)) fails if the cell parameters are not provided to the ase.Atoms() constructor.
Describe the solution you'd like
StructureData should accept the ASE default cell, perhaps converting it to aiida default.
Describe alternatives you've considered
Keeping this behavior might be useful for consistency?
Additional context
Quality of life for quantum chemists working in the gas phase. :-)
The text was updated successfully, but these errors were encountered: