dgehringer / sqsgenerator Goto Github PK
View Code? Open in Web Editor NEWA command line tool written in Python/C++ for finding optimized SQS structures
Home Page: https://sqsgenerator.readthedocs.io/
License: MIT License
A command line tool written in Python/C++ for finding optimized SQS structures
Home Page: https://sqsgenerator.readthedocs.io/
License: MIT License
Hi ,
It would be very nice to output configurational entropy. Would it be doable?
Thanks a lot.
Hi @dnoeger,
I just noticed that there is no licence specified for your sqsgenerator. I currently try to push it to conda-forge and I would need a license to upload it there.
conda-forge/staged-recipes#8891
Best,
Jan
Hello,
I'd like to ask You, how to specify the composition on a sublattice in Your code.
Let's have a POSCAR file like this
New structure
1.000000
1.0000000000 0.0000000000 0.0000000000
0.0000000000 1.0000000000 0.0000000000
0.0000000000 0.0000000000 1.0000000000
B C N
2 4 4
how it is possible using the --lattice option to place e.g. 50%Fe and 50%Co at the B sublattice, please.
I've tried the command like the following one, but it doesn't work.
sqsgenerator sqs POSCAR 2 2 2 B:0.2,C:0.4,N:0.4 -B=Fe:0.5,Co:0.5
Thank You
Hi Dominik,
I would have a feature request: it would be nice to have a progress bar during the SQS generation (i.e. when I run sqsgen run iteration
). Would it be doable?
Thanks,
David
I have the following raised value error: raise ValueError(f"Format not specified and could not infer from {filename=}")
ValueError: Format not specified and could not infer from filename='poscar'
when running the sqsgenerator with: "sqsgen run iteration -e -f poscar -c xz -w pymatgen" like in the doc or a modified one for my purpose (sqsgen run iteration -e -w pymatgen -f poscar -di objective -di parameters $workdir/$SYSTEM.yaml)
Although pymatgen and ase are updated to latest versions. Is there any approach, how to solve this issue?
Thanks in advance
Hello.
First I would like to really thank you for this tool. The problem of Sqs generation is very time consuming and you have made it work on parallel machines.
I have a question about the parallel implementation: I cannot initialize the mpi runtime for the tool. I was able to specify the threads_per_rank for instance as [8,8,8 ...] 16 times then I run mpirun -n 16. I get the message that the mpi runtime was not initialized and even though the program does it and continues but I would like to be able to know how to do it to be able to calculate the estimated time etc.
Also, is there is anyway to output the structures during the mpirun? I would like to be able to see how the objective function changes for instance. Sometimes the difference in objective function is very small but it takes numerous iterations to reach to it. I realize the log level can be changed, but the program will basically stop giving any kind of output when the iterations start until it is done with the number of iterations.
Thank you.
Khaled.
Hi!
I am trying to use sqsgenerator for a binary alloy with varying composition.
I have an AxBx-1 tetragonal alloy and would like to generate SQS for different x.
e.g. x=0.25 x=0.33 and so on.
There are 12 sites in the unit cell.
I have a POSCAR for all different x, looking something like this
vasp
1.00000000
5.928100 0.000000 0.000000
0.000000 5.928100 0.000000
0.000000 0.000000 6.980300
A B
9 3
Direct
positions
I would like to mix on all the positions and look for the SQS for each x
I guess the syntax would be something like:
sqsgenerator POSCAR 2 2 2 A:0.75,B:0,25
for the above example of x=0.75, is that correct? or am I missing something?
When I try to limit the number of threads used I get the following error:
sqsgenerator/core/base.pyx in sqsgenerator.core.base.BaseIterator.__cinit__()
TypeError: __cinit__() got an unexpected keyword argument 'num_threads'
conda-forge/staged-recipes#8891
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-m6_dbiah/setup.py", line 119, in <module>
rmtree('build')
File "/home/conda/feedstock_root/build_artifacts/sqsgenerator_1563833945940/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/shutil.py", line 471, in rmtree
onerror(os.lstat, path, sys.exc_info())
File "/home/conda/feedstock_root/build_artifacts/sqsgenerator_1563833945940/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehol/lib/python3.6/shutil.py", line 469, in rmtree
orig_st = os.lstat(path)
FileNotFoundError: [Errno 2] No such file or directory: 'build'
Hi,
I have a queation about short-range-order (SRO) when I use your code "sqsgenerator-fix-alpha-command". Taking Ni3Al (L12) as an example. The POSCAR file like this.
# Ni Al L12
3.0
1.0000000000 0.0000000000 0.0000000000
0.0000000000 1.0000000000 0.0000000000
0.0000000000 0.0000000000 1.0000000000
Al Ni
1 3
D
0.0 0.0 0.0
0.5 0.5 0.0
0.5 0.0 0.5
0.0 0.5 0.5
I use the command "sqsgenerator alpha sqs POSCAR --weight=1 --verbosity=3", and the result is as follows,
α=1.8888888888888888
α[Al-Al]=1.00000000000000
α[Al-Ni]=-0.33333333333333
α[Ni-Ni]=0.55555555555556
The SRO of Ni-Ni does not agree with theoretical result (i.e. 1/9). In addition, I test the SRO of pure Ni (fcc), and the vaule is 0.5. I hope to calculate SRO of multi-component alloys. Whether the SRO of A-B bond should be ignored when A and B are the same element?
Thank you!
When running the simple example: an ideal Re0.5W0.5 solution, errors always occurs as:
"
(sqsgen) Qiangs-MacBook-Pro:file qiangbai$ sqsgen run iteration re-w.first.yaml
AttributeError: 'tuple' object has no attribute 'class'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/qiangbai/anaconda3/envs/sqsgen/bin/sqsgen", line 11, in
sys.exit(cli())
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/commands/common.py", line 88, in _inner
result = f(*args, **kwargs)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/commands/common.py", line 130, in _dummy
settings = process_settings(settings, params=process, ignore=ignore)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/settings/readers.py", line 296, in process_settings
settings[param] = processor(settings)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/settings/functional.py", line 43, in _wrapped
try: processed_value = f(settings)
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/settings/readers.py", line 103, in read_structure
structure = Structure(lattice, coords, species, (True, True, True))
File "/Users/qiangbai/anaconda3/envs/sqsgen/lib/python3.10/site-packages/sqsgenerator/core/structure.py", line 40, in init
super(Structure, self).init(lattice, frac_coords, symbols, pbc)
SystemError: <method-wrapper 'iter' of list object at 0x1130e1080> returned a result with an exception set
"
conda version: conda 4.12.0
python version: 3.10
OS: Mac OS 12.5.1
Hi!
I highly appreciate your help. I have a question now. I want to test the number of Ni-Al and Al-Al bonds of (111)-oriented supercells, so that for further investigations of planar faults. This supercell has 18 Al and 54 Ni atoms. Theoretically, there are 72*3=216 Ni-Ni bonds and 216 Ni-Al bonds.
However, when I use "sqsgen analyse POSCAR --settings yaml", the result shows that the numbers Ni-Ni is only 198. That is to say, 216-198=18 Ni-Ni bonds are missing. This error has nothing to do with the deviations from the perfect lattice. I don't know why. The screenshot, yaml file and POSCAR are attached as follows:
yaml file:
rtol: 0.05
shell_weights:
1: 1.0
prefactor_mode: set
prefactors: -1
POSCAR file:
Ni3Al-POSCAR
1.0
5.0463247299 0.0000000000 0.0000000000
0.0000000000 8.7521600723 0.0000000000
0.0000000000 0.0056848720 18.5539599293
Ni Al
54 18
Cartesian
1.261581483 6.564122170 0.000094803
3.784744450 2.188042134 0.000094888
1.261584942 0.729883473 2.061565357
3.784748059 5.105963770 2.061565495
1.261571482 3.648053724 4.123167485
3.784734223 8.024133760 4.123167485
1.261584190 6.566021302 6.184752472
3.784746555 2.189940744 6.184753025
1.261587649 0.731832860 8.246367595
3.784748661 5.107913026 8.246368148
1.261575768 3.649937769 10.307960600
3.784736329 8.026017283 10.307959494
1.261579378 6.567909531 12.369580146
3.784740840 2.191828582 12.369581252
1.261593515 0.733707900 14.431141079
3.784755579 5.109787676 14.431142185
1.261575016 3.651882305 16.492678789
3.784737532 8.027962341 16.492677683
1.261580280 2.188042134 0.000094883
3.784743247 6.564122170 0.000094686
1.261576821 5.105963770 2.061565495
1.261590507 8.024133760 4.123167485
3.784739938 0.729883407 2.061565357
3.784753173 3.648053724 4.123167762
1.261578250 2.189940744 6.184753025
3.784740540 6.566021302 6.184752472
1.261575919 5.107912505 8.246368148
1.261588251 8.026017805 10.307959494
3.784736930 0.731832729 8.246367595
3.784748962 3.649937769 10.307959494
1.261583890 2.191828582 12.369581252
3.784745352 6.567909531 12.369580146
1.261569226 5.109788197 14.431142185
1.261587198 8.027962341 16.492677683
3.784731215 0.733707965 14.431141079
3.784749563 3.651882305 16.492678789
0.000000000 4.376083195 0.000092964
2.523162365 0.000002327 0.000093686
0.000000000 7.294003269 2.061575448
2.523162365 2.917923755 2.061575448
0.000000000 1.460001056 4.123169144
2.523162365 5.836082266 4.123168591
0.000000000 4.377977630 6.184746390
2.523162365 0.001898301 6.184746390
0.000000000 7.295961914 8.246371466
2.523162215 2.919882138 8.246370913
0.000000000 1.461890056 10.307957282
2.523162215 5.837971005 10.307957282
0.000000000 4.379868994 12.369588993
2.523162215 8.755947987 12.369588993
0.000000000 7.297846473 14.431138868
2.523162365 2.921765393 14.431138868
0.000000000 1.463836677 16.492671048
2.523162365 5.839916061 16.492671048
0.000000000 0.000001526 0.000090592
2.523162365 4.376082150 0.000089676
0.000000000 2.917811375 2.061706913
2.523162365 7.293891151 2.061707466
0.000000000 5.836245042 4.123219186
0.000000000 0.001899484 6.184636906
2.523162365 1.460164093 4.123220016
2.523162365 4.377978119 6.184638011
0.000000000 2.919846372 8.246265852
2.523162365 7.295926409 8.246268617
0.000000000 5.837996072 10.308044648
0.000000000 8.755930294 12.369732760
2.523162064 1.461914992 10.308044648
2.523161914 4.379850518 12.369731655
0.000000000 2.921561415 14.431122279
2.523162215 7.297642495 14.431122279
0.000000000 5.840060524 16.492543869
2.523162365 1.463980879 16.492542763
Hi,
I was trying to use the sqs_analyse function using an ASE Atoms object.
` from ase.io import read
from sqsgenerator.public import sqs_analyse
ase_struct = read('converted.cfg')
sqs_analyse(ase_struct,structure_format='ase') `
This returns
File "/home/abuanand/miniconda3/lib/python3.8/site-packages/sqsgenerator/adapters.py", line 95, in from_ase_atoms lattice = np.array(atoms.cell) AttributeError: 'Atom' object has no attribute 'cell'
Although, np.array(ase_struct.cell)
returns the cell dimensions properly.
Any input on this would be great. Thanks for your help!
Hi,
Thanks a lot for your previous help. I have another question now. When I can get a structure, I use "sqsgenerator alpha sqs POSCAR --weight=1 --verbosity=3" to get the short-range-order (SRO). However, I find slight changes the distance of one A-B bond (just 0.0001 Ångstrom) lead to different SRO values.
The difference may be due to the precision of lattice vector and atomic fractional coordinate. I want to know the precision, and how to get the number of A-B bonds in "sqsgenerator" to check the SRO values.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.