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
96 stars 56 forks source link

Special quasirandom structure: example PbSnTe gives errors #50

Closed stanroozen closed 2 years ago

stanroozen commented 2 years ago

Dear Supercell developers.

I installed Supercell and Gulp on linux and tested both softwares separately and they seem to work. I added both gulp and supercell to Path in the /.bashrc. However every time i run the df_cfg.bash from the quasirandom structure example with PbSnTe i get the following error:

sed: can't read /home/stanroozen/GULP/PbSnTe/cell_1x1x2/.cif: No such file or directory STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error sed: can't read /home/stanroozen/GULP/PbSnTe/cell_1x2x2/.cif: No such file or directory STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error

The first for loop in the df_cfg.bash file makes a new folder with the supercell structures. However, when i run the complete script the cif files get overwritten by a folder called * which has a folder called gulp that has gulp input files.

I was wondering if you had any idea what is going on?

Greetings, Stan Roozen

df_cfg_bash.txt

orex commented 2 years ago

Hello Stan,

Thank you for reporting the issue. It looks like that files are not generated by supercell. Can you check cell_*/cell_*.out files? If you find nothing suspicious there, please zip and attach all the folder you have to the issue. I'll check.

Best, Kirill.

stanroozen commented 2 years ago

Hello Kirill, When I run the first for loop in the df_cfg.bash file on Linux (by deleting the second loop (I called this file df_cfg_part1.bash) this makes a new folder with the supercell structures (see attached zip file, part 1). Nothing looks suspicious. However, when i run the complete script (df_cfg.bash) the cif files get overwritten by a folder called (i now named them star as signs are not allowed names for windows folders and i had to zip it) which has a folder called gulp that has gulp input files (see part 2 in the zip file) so it seems that the cif files get overwritten by a new folder called star and the cif files are no longer availible.

Greetings, Stan

supercell results PbSnTe2.zip

orex commented 2 years ago

Hi Stan! It is very strange behavior which linux you are using? Can you run command echo cell_1x2x2/*.cif after first step? Best, Kirill.

stanroozen commented 2 years ago

Hello Kirill, I am working on a Ubuntu 20.04.2 LTS. However, it is installed as a subsystem under windows. like this: https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview

the command echo cell_1x2x2/*.cif just echoes me back:

cell_1x2x2/.cif sed: can't read /home/stanroozen/GULP/PbSnTe/cell_1x1x2/.cif: No such file or directory STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error sed: can't read /home/stanroozen/GULP/PbSnTe/cell_1x2x2/*.cif: No such file or directory STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error STOP GULP terminated with an error (base) stanroozen@DESKTOP-45DKSLF:~

gr, Stan

orex commented 2 years ago

Hello, Stan! It looks like something with glob is totally wrong in WSL. You can try to change

  for j in cell_${i}/*.cif
  do
    pth=`dirname $j`/`basename $j .cif`

to

  for j in `ls cell_${i} | grep cif`
  do
    pth="cell_${i}/"`basename $j .cif`

Probably it can work. if not, I recommend you to use "good" virtualization solutions to use Linux on Windows. For example, free VirtualBox should work fine.

Best, Kirill.

stanroozen commented 2 years ago

Hello Kirill,

I have installed Ubuntu using VirtualBox as you recommended and the example PbSnTe is working!

I am a Phd student in Geology and would like to calculate the special quasirandom structure of one of my (disordered) endmembers in the tourmaline solid solution (a borosilicate mineral). I would like to use supercell for this purpose.

However, I do have a question how to modify the df_cfg.bash files and the PbSnte-SQS.gin_template for my noncubic structure (trigonal cell however using a hexagonal cell, so it has 3 formula units within the cell)? in PbSnTe-SQS.gin_template I have modified the angles to my structure, however how do i add my cell size dimentions? Also what value of cutd do i have to use (i now use the cell dimension of the trigonal cell)? Lastly now that the site occupancy is no longer 50/50 but 1/6 does this mean the correlation should be (2x-1)^k (eq in your paper) (2*(5/6)-1)^2 = 0.44?

In df_cfg.part1.bash i enumerate the possibilities of a 1x1x2 cell for the disordered endmember and using the coulomb energies randomly select 1000 structures and the top 100 lowest and highest energy structures because the enumeration has too many structures to treat with gulp. Is such a statistical sampling suffient to find a SQS structure or do i have to increase this number?

input files.zip

Greetings, Stan roozen

orex commented 2 years ago

Hello Stan.

I can see from the structure, you attached, that your system is a very bad candidate for SQS. No chances that Al-Mg substitution is quasirandom. I suggest to use electrostatic sampling, like I described in paper

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

Please also check papers, that uses supercell. I think more than half of them uses such approach. Probably you can find something more relevant.

Best, Kirill

stanroozen commented 2 years ago

Hello Kirill,

I will read the article for sure and will try to do some calculations on structures that give low coulomb energies to get some idea about energy changes related to (short range) order disorder.

However, in the thermodynamic databases and thermodynamic solution models used in the earth sciences that calculate phase equilibria at high temperatures used closed form analytical expressions to parameterize the equations of state of the minerals and calculates their stabilities based on their relative energies. Such (simpler) low parameter thermodynamic models often incorporate simplifications (no short range order, only long range order-disorder modelled) in the hope that some of these neglected complexities are incorporated in the empirical parameters that are used to describe the model. These models use endmember thermodynamic data as ankerpoint to fit the analytical equations that describe the mixing and (long range) ordering between endmembers. The analytical expressions are often fit to data that comes from xrd. calorimetry or phase relationships. Often such endmembers are not the most stable structures that exits but are just used to fix the thermodynamic equations used to describe the solid solution data obtained from experiment. Many natural minerals are solid solution (disorder systems) by definition and true endmembers often do not exits. In the thermodynamic databases used in the earth sciences randomly distributed end members are used for this purpose (with no short range order). Configurational entropy contributions are often calculated using statistical mechanics using this same random distribution assumption. Therefore to describe order-disorder/mixing and how it evolved with pressure and temperature i need to have some thermodynamic values for the disordered structures to fix my equations (even if such structures are probably not the most stable structure that exist at any particalar pressure and temperature). Therefore I would still like to know how to perform a SQS calculation on a disordered endmember (even if it would be just to compare it with the structures that i obtain with the coulomb method)

As a side note, at the moment my input structures are based on refined structured by single crystal XRD and are not geometrically optimized yet. Should i geometrically optimize the structure (using a virtual atom) before doing the enumeration?

Many Thanks in advance for your help Greetings, Stan

orex commented 2 years ago

Hi Stan! The discussion softly changed to scientific one. Just a few remarks:

I don't want to be "unscrupulous seller", therefore be honest with you. If you would like to work with SQS and only with SQS ATAT package. from my point of view, is a better choice. The question you asked about SQS and supercell are absolutely valid and to have a clear answer for them you should check GULP manual. When I created this example, I simply create a basic structure in GULP and after that change numbers to variables. Initially I have an idea to implement SQS in supercell natively (without GULP). But based on my background, I'm quite confident, that several random structures (which you can get from supercell, of course) are always better than SQS. Therefore I don't progressing in the direction. Best, Kirill.