orex / supercell

The program allows you to create regular structure supercell from cif file with partial occupancy and/or substitutions.
GNU General Public License v2.0
91 stars 56 forks source link

Combining selection (-n) options possible? #54

Closed Charlaiz closed 1 year ago

Charlaiz commented 2 years ago

Hello,

I'd like to use SuperCell to generate random Si/Al distributions in zeolite structures, similar to the Rb-PST reference in the manual. I have noticed that selecting for the lowest energy structures does an excellent job in selecting the structures that abide by Loewenstein's criterion. However, even when treating the different symmetry groups of T-sites separately like suggested in the tutorial, in some cases the total number of configuration still exceeds what my computer (and supercell itself) can handle due to large unit cells involved. Is it possible to, for instance, request only the first 10^8 structures generated ( -n f100000000 ) and on top, out of those 10^8 only write the 50 structures with the lowest energy from electrostatic calculation ( -n l50 )?

Thanks a lot,

karel

orex commented 2 years ago

Hi Karel!

Thank you for using my program. It is not possible to use supercell in such way. I can say also you should not use it in such way. To get a reliable result you should process all the structures. How many structures you have? My program can process 1E13 structures within a few days on modern workstation. If you have two different sites disordered, you can use step-by-step processing ad described in manual. Note, that the random structures can be obtained regardless of the system size. See https://arxiv.org/abs/1606.08062

Best, Kirill.

Charlaiz commented 2 years ago

Dear Kirill,

thanks so much for the swift reply! and for making this a free software, its really great. Understood, its indeed better to sample all structures for the most reliable results. Even using the step-by step approach I can still get a number of configurations in the range of 1E12 - 1E14 for some structures, of course this depends on the size of the supercell I choose. I guess these numbers are doable in principle, but I am still messing around playing with the possibilities and different structures so a few days per run is a little unpractical.
I want to immediately disregard structures with Al-O-Al linkages, but other than evaluating the electrostatic energy I haven't found a way to do this yet. I have only started trying out supercell today so perhaps I am missing something? Is there an option to exclude configurations where an element is within a user-specified cutoff distance from itself?

thank you, Karel

orex commented 2 years ago

Dear Karel,

Answering to your question: 1) 1E12-1E14 structures is OK. If you are going to perform DFT on them, it will also takes several days, right? 2) If you need to avoid Al-O-Al linkage in special cases, when the amount of Al is not much, what you can do is to generate random structures and after select the only ones which obey LW rule. For this you can have two ways: a) Use special packages like pymatgen or ASE. There is a method called cluster expansion, which probably can help you to solve the problem (need python and programming knowledge). Or b) You can modify the scripts I did https://github.com/orex/rs_ses for random sampling (see https://arxiv.org/abs/1606.08062) and https://github.com/orex/supercell/tree/master/data/examples/ice-Ih-adv as a base for calculation distances. (see tutorial).

Some pieces of scientific advice: 1) Although the variant "b" is the simplest one. If you are going to work a lot with "custom" structures, probably it is better to use special frameworks. My recommendation is ASE (https://gitlab.com/ase/ase). 2) I worked quite a lot with Al-Si systems. What I learnt, is that the best structures for DFT are the low electrostatic ones. So it is good to spend some time for supercell, than redo DFT after.

Best, Kirill.

Charlaiz commented 2 years ago

Thank you for all the info, i'll dig into the links you provided and see what the best way forward is for my case.

Best regards, Karel

Charlaiz commented 2 years ago

Dear Kirill,

I've been following your advise, and trying out various settings and configurations in supercell to generate Al distributions for several frameworks. Enjoying the software a lot! I'd like to verify whether the cells selected by the lowest electrostatic energy have Si(nAl) distributions comparable to the experimentally determined values (from 29Si NMR for instance). Is there a straightforward method to calculate this distribution from an .cif input file generated with supercel? I can probably code it up with pymatgen but I have not used it before and have limited scripting experience (I'm an experimentalist) so I wondered whether a generic script is available for this purpose.

thank you,

Karel

orex commented 2 years ago

I have a program which I used in the my papers for glasses and disordered systems. I'm attached this stat.tar.gz. If you can compile it by yourself, please use it. I wrote it for glasses to check Q^n_m units, but used for crystal systems also. See, for example

Cadars, S., Ho Ahn, N., Okhotnikov, K., Shin, J., Vicente, A., Bong Hong, S., & Fernandez, C. (2017). Modeling Short-Range Substitution Order and Disorder in Crystals: Application to the Ga/Si Distribution in a Natrolite Zeolite. Solid State Nuclear Magnetic Resonance. https://doi.org/10.1016/j.ssnmr.2017.04.001

You need to install boost, openbabel to use it. The easiest will be to use Linux. On Windows I have no idea how to setup this.

Charlaiz commented 2 years ago

Thank you for sharing your code, that's very generous! I'll see if i can compile and run it, i have a linux machine so that should be ok. Karel