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
Supercells created with pymatgen seems to always fold sites into the unit cell, which may not be ideal as folding sites back into unit cell is fairly simple, but unfolding them may not be so straightforward at times. Is there any plan to change this default behavior in future versions?
I found two simple ways (maybe there is more?) to create supercells in pymatgen:
Multiply the structure with a matrix directly, which calls the pymatgen.core.IStructure.__mul__ function. It always returns a Structure with to_unit_cell=True.
Use pymatgen.core.Structure.make_supercell. This function comes with an option to change to_unit_cell. However, since the supercell in this function is created by calling the __mul__ function above, setting to_unit_cell=False will not behave as expected.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Supercells created with pymatgen seems to always fold sites into the unit cell, which may not be ideal as folding sites back into unit cell is fairly simple, but unfolding them may not be so straightforward at times. Is there any plan to change this default behavior in future versions?
I found two simple ways (maybe there is more?) to create supercells in pymatgen:
pymatgen.core.IStructure.__mul__function. It always returns a Structure withto_unit_cell=True.pymatgen.core.Structure.make_supercell. This function comes with an option to changeto_unit_cell. However, since the supercell in this function is created by calling the__mul__function above, settingto_unit_cell=Falsewill not behave as expected.Beta Was this translation helpful? Give feedback.
All reactions