Git Product home page Git Product logo

mstsuite / must Goto Github PK

View Code? Open in Web Editor NEW
51.0 51.0 29.0 307.03 MB

Multiple Scattering Theory code for first principles calculations

License: BSD 3-Clause "New" or "Revised" License

C++ 8.42% Makefile 0.53% Fortran 59.73% Cuda 5.17% C 4.36% Shell 0.24% Python 0.32% Roff 20.43% TeX 0.21% CSS 0.08% Perl 0.02% HTML 0.01% JavaScript 0.12% Lua 0.01% CMake 0.16% Dockerfile 0.02% NASL 0.18%

must's Issues

Can MuST handle structures more than cubic

Dear developer,

I'm trying to use MuST to calculate the elastic constants, which requires the energy or stress of deformed structures (not cubic).

All the samples and tutorials included in the package are cubic, even for Mg, Hf and Ti, whose stable structures are HCP.

Though the position.dat can handle any structure, I noticed that all the start potentials are FCC or BCC (1 for fcc and 2 for bcc in the input file of newss). If newss can generate potentials more than cubic, what the number is for other structure, e.g. bct.

Thank you very much.

Error occured during mst2 run: forrtl: severe (174): SIGSEGV, segmentation fault occurred

I just compile MuST code by running the two commands:
(1) make linux-intel-nogpu
(2) make install
Note:
(1) No changes in "MuST-1.8.3.6/architecture/linux-intel-nogpu"
(2) parallel studio xe 2018.4.057 is used.

An Error occured during mst2 run. I am runing the example located at MuST/Tutorials/CuZn/B2. Here are the details.
== Beigin ==

$ mpirun -np 2 ~/softwares/MuST-1.8.3.6/bin/mst2 < i_new 
  
             ********************************************************
             *                                                      *
             *              Fortran 90 Interface Module             *
             *                                                      *
             *                         For                          *
             *                                                      *
             *              MPI Message Passing Library             *
             *                                                      *
             *                   Version No. 2.0k                   *
             *                                                      *
             ********************************************************
  
 CHARACTER_BYTES =            1
 INTEGER_BYTES   =            4
 REAL_BYTES      =            8
 COMPLEX_BYTES   =           16
 ADDRESS_BYTES   =            8
  
 Number of Procs =            2
  
Execution starts at 12:45:34, 11-28-2022 on     2 nodes
#-------------------------------------------------------------------------------
#
#
#           ********************************************************
#           *                                                      *
#           *    Full-Potential Multiple Scattering Theory Based   *
#           *                                                      *
#           *  Ab Initio Electronic Structure Calculation Package  *
#           *                                                      *
#           ********************************************************
#
#
#   username                 : guoqilin
#   system name              : slurm-login-2
#   code compiled            : Monday, November 28 2022 10:22:54
#   MuST source code version : Develop
#-------------------------------------------------------------------------------

 The Position Data File: ./position.dat

 The Position Data is read successfully!


================================================================================

 The lattice system is: Cubic       

********************************
* Output from SPACEGRP         *
********************************

The point group of the crystal is the full cubic        group
Space group is symmorphic
--------------------------------------------------------------------------------

********************************
* Output from CHECKSYMM        *
********************************

Symmetry is correct
--------------------------------------------------------------------------------

********************************
* Output from SPACEGRP         *
********************************

The point group of the crystal is the full cubic        group
Space group is symmorphic
--------------------------------------------------------------------------------

********************************
* Output from SPKPT            *
********************************

Timing in setting up wvkl:     0     0.10800
Wavevector mesh contains    1728 points
--------------------------------------------------------------------------------

================================================================================

            *********************************************
            *     Output from createParallelization     *
            *            in ProcMappingModule           *
            *********************************************

The number of processors in each box :    2
The number of repeats along k-dimen. :    1
The number of repeats along e-dimen. :    1
Dimension of the box (to be repeated to produce processor grid):    2  X    1  X    1
Dimension of processors :    2  X    1  X    1
Proc Grid Dimension:      3
Total Number of Procs:    2
Proc Grid Size in Each Dimension: (  2,  1,  1)
MyPE =     0 is at (  0,  0,  0)
MyPE =     1 is at (  1,  0,  0)
MyPE =     0, NumEs, NumEsPerBox =    30   30
MyPE =     1, NumEs, NumEsPerBox =    30   30
MyPE =     1, NumKs, NumKsPerBox =    56   56
MyPE =     1, K index =     1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16, ...,...
Energy point index =     1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20, ...
Process in E-group =     0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0, ...
MyPE =     0, NumKs, NumKsPerBox =    56   56
MyPE =     0, K index =     1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16, ...,...
IBZ K point index  =     1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20, ...,...
Process in K-group =     0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0, ...,...

================================================================================

The number of processes that write output data:      1
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
libifcore.so.5     00007F57F9FAE9AC  for__signal_handl     Unknown  Unknown
libpthread-2.17.s  00007F57F8908630  Unknown               Unknown  Unknown
mst2               0000000000726DE0  Unknown               Unknown  Unknown
mst2               000000000040E883  Unknown               Unknown  Unknown
mst2               000000000040925E  Unknown               Unknown  Unknown
libc-2.17.so       00007F57F824B555  __libc_start_main     Unknown  Unknown
mst2               0000000000409169  Unknown               Unknown  Unknown
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
libifcore.so.5     00007FC890D4C9AC  for__signal_handl     Unknown  Unknown
libpthread-2.17.s  00007FC88F6A6630  Unknown               Unknown  Unknown
mst2               0000000000726DE0  Unknown               Unknown  Unknown
mst2               000000000040E883  Unknown               Unknown  Unknown
mst2               000000000040925E  Unknown               Unknown  Unknown
libc-2.17.so       00007FC88EFE9555  __libc_start_main     Unknown  Unknown
mst2               0000000000409169  Unknown               Unknown  Unknown

== End ==

add topics

I suggest adding the topic electronic-structure and other topics you think appropriate in the About section.

document properties that can be calculated

There's not much discussion of what properties can be calculated. Is it true that the only available energetic is total energy and electronic structure, but not forces?

How to generate new potential

Dear developer,

I want to do some calculations which containing Sn, and I found there is no Sn potential in the potentials folder. How to generate the potential for Sn.

I know the newa and newss are used to produce the potential, but I'm not quite clear with some settings in the input file.

  1. How to set the mixing parameter?
  2. If the structure is not bcc and not fcc, how to set the crystal type?

Thank you very much.

About scf error: rho0(ir) < 0

Hello, developers,

I'm trying to use the code to calculate the equation of state for a system. In some volume, it works fine, but in some volume, the scf error (rho0(ir)<0) occurred. How to fix this error?

The following is the last rows:

Charge Density :: Spherical Val Charge in IS   =    10.10566437837118
Charge Density :: Spherical Val Charge in VP   =     7.61140077508768
Charge Density :: Sph. DeepCore Charge in MT-Sphere =     9.99999994575232
Charge Density :: Sph. DeepCore Charge in WS-Sphere =     9.99999994575232
Charge Density :: Sph. DeepCore Charge in EX-Sphere =     9.99999994575232
Charge Density :: Sph. DeepCore Charge in Insc. Sph.=     9.99999994575232
Charge Density :: Sph. DeepCore Charge in VP        =     9.99999994575232
Charge Density :: Sph. SemiCore Charge in MT-Sphere =     7.99922668305437
Charge Density :: Sph. SemiCore Charge in WS-Sphere =     7.99999999540989
Charge Density :: Sph. SemiCore Charge in EX-Sphere =     7.99999999540989
Charge Density :: Sph. SemiCore Charge in Insc. Sph.=     7.99922668198491
Charge Density :: Sph. SemiCore Charge in VP        =     7.99969479201574
For id =     1, ir =   993, r(ir) =   2.38411532
ERROR: rho0(ir) < 0
VALUE:     -0.9781096D-04
STOP AT constructChargeDensity

The i_new file is generated by the ase_must.py, as follows:

================================================================================
                           Input Parameter Data File
================================================================================
                  * * *              * * *              * * *
================================================================================
                           System Related Parameters
================================================================================
No. Atoms in System (> 0)  ::  1
================================================================================
                  * * *              * * *              * * *
================================================================================
Default Potential Input File Name  ::  Cu_ss_pot Zn_ss_pot Sn_ss_pot Al_ss_pot
Default Potential Output File Name  ::  CuZnSnAl_mt_v
Default Potential Input File Form  ::  0
No. Iterations (> 0)  ::  100
Method of SCF Calculation  ::  3
Potential Type (>= 0)  ::  0
Exch-Corr. LDA Type (>= 0)  ::  0
Spin Index Param (>= 1)  ::  1
Kx, Ky, Kz Division (> 0)  ::  12, 12, 12
Mixing algorithm  ::  2
Mixing quantity type  ::  1
Symmetrize BZ Integration  ::  1

The position.dat is as follows:

1.0

0.         3.65246291 3.65246291
3.65246291 0.         3.65246291
3.65246291 3.65246291 0.

CPA  0. 0. 0.  Cu 0.7222537109795818  Zn 0.26683691213263494  Sn 0.010885418756503172  Al 2.3958131279963568e-05

Thank you very much.

KKR calculations fail

In all of the tutorial examples, and using the ase python library, KKR calculations fail with the output


********************************************************************************
                            SCF Iteration Number:   1
********************************************************************************

start LOOP_j2:     5    0
start LOOP_j2:     5    0
start LOOP_j2:     5    0
... (127 lines omitted)
start LOOP_j2:     5    0
start LOOP_j2:     5    0
start LOOP_j2:     5    0
ERROR: not enough nodes                                            
STOP AT outws

I'm using a custom architecture file which looks like

Acceleration = 0

HDF5_PATH =
ACCEL =
ACCEL_PATH =
LIBXC_PATH =
FFTW_PATH =
P3DFFT_PATH =
LUA_PATH =
LIBS += $(shell pkg-config --libs lapack blas)

CC = mpicc
CXX = mpicxx
F77 = mpif77 -fallow-argument-mismatch
FC = mpif90 -fallow-argument-mismatch
MPICC = mpicc
ACCEL_CXX =
ARCHV = ar -r

FPPDEFS = -cpp
CPPDEFS =
FPPFLAGS = -DMPI -DMaxOutProcs=1

CFLAGS = -O3
CXXFLAGS = -O3 -std=c++14
FFLAGS = -O3
F77FLAGS = -O3
OPT_OPENMP = -fopenmp

XDR_INCLUDE = $(shell pkg-config --cflags libtirpc)
XDR_LIB = $(shell pkg-config --libs libtirpc)

LD_FLAGS = 
LD = $(FC) $(LD_FLAGS)

HDF5_CONFIG_FLAGS = --enable-fortran --enable-static-exec CC="$(CC)" CXX="$(CXX)" FC="$(FC)"
LIBXC_CONFIG_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" FC="$(FC)" FFLAGS="$(FFLAGS)"
P3DFFT_CONFIG_FLAGS = --enable-openmpi FC="$(FC)" FFLAGS="$(FFLAGS)" CC="$(CC)" LIBS="$(LIBS)" CCLD="$(FC)"
FFTW_CONFIG_FLAGS = --enable-mpi --enable-fortran CC="$(CC)" CFLAGS="$(CFLAGS)" MPICC="$(MPICC)" F77="$(F77)" FFLAGS="$(FFLAGS)"

mst2 is interrupted in Tutorial CuZn/BCC, but B2 and Supercell work fine

I compiled MST/bin/mst2 (with arch/bolt_intel_O3) and no error warning was reported during compilation. Both B2 and Supercell of CuZn Tutorials can work. However, when the random alloy of the CuZn-BCC directory is calculated, the calculation is interrupted and an error occurs as:

mpirun -np 4 /home/zhouq/work/Must/MST/bin/mst2 <i_new > vout &
[1] 4777
[zhouq@y01]$ *** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000d51fe50 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000dea26b0***
glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000d51fe50 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000dea26b0 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000dea26b0 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000d2f1e30 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000d2f1e30 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000ea75e50 ***
*** glibc detected *** /home/zhouq/work/Must/MST/bin/mst2: malloc(): memory corruption: 0x000000000ea75e50 ***

Also, the last lines of the o_n00000_CuZn file:

                         **********************
                         * Output from mufind *
                         **********************

At Old Fermi Energy
GLOBAL VP Int[n(e)] per Atom = 11.511893519396
GLOBAL (Val-Int[n(e)]) per Site = -0.011893519396
Fermi Energy DOS per Site = 3.613883712604
Specific Heat Coefficient per Site = 0.000000000477
Magnetic Susceptibility per Site = 0.000000000000
Num Valence Electrons per Atom = 11.500000000000

New Fermi energy = 0.638490358364
Change in Fermi energy = -0.003291063117

After mufind, the integrated DOS are:
id = 1, ia = 1, is = 1, MS+SS DOS_mt = 0.10334066D+02, MS+SS DOS_ws = 0.11176943D+02
id = 1, ia = 2, is = 1, MS+SS DOS_mt = 0.11008870D+02, MS+SS DOS_ws = 0.11823057D+02


Did I set the compilation options incorrectly?
thx

Installation Issue in MACOS

Dear Developer,
Please advise to solve this error. Thank you -
I'm getting following errors while installation using osx-gnu-openmpi file.

I'm using - Darwin 23.2.0 Darwin Kernel Version 23.2.0: root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64

--
/Users/pshatom/Documents/MUST/MuST/external/p3dfft/P3DFFT
/Library/Developer/CommandLineTools/usr/bin/make all-recursive
Making all in build
mpif90 -DHAVE_CONFIG_H -I. -I.. -I/Users/pshatom/Documents/MUST/MuST/external/fftw/FFTW/./include -DMEASURE -DFFTW -g -O2 -c -o fft_spec.o fft_spec.F90
mpif90 -DHAVE_CONFIG_H -I. -I.. -I/Users/pshatom/Documents/MUST/MuST/external/fftw/FFTW/./include -DMEASURE -DFFTW -g -O2 -c -o module.o module.F90
bcomm2.F90:281:26:

281 | call mpi_alltoallv (buf1,KrSndCnts, KrSndStrt, mpi_byte, buf2,KrRcvCnts,KrRcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm2.F90:281:63:

281 | call mpi_alltoallv (buf1,KrSndCnts, KrSndStrt, mpi_byte, buf2,KrRcvCnts,KrRcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm2.F90:168:26:

168 | call mpi_alltoallv (buf1,SndCnts, SndStrt, mpi_byte, buf2,RcvCnts,RcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm2.F90:168:59:

168 | call mpi_alltoallv (buf1,SndCnts, SndStrt, mpi_byte, buf2,RcvCnts,RcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm1.F90:295:25:

295 | call mpi_alltoallv(source,JrSndCnts, JrSndStrt,mpi_byte, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm1.F90:296:11:

296 | buf2,JrRcvCnts, JrRcvStrt,mpi_byte,mpi_comm_col,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm1.F90:124:25:

124 | call mpi_alltoallv(buf1,SndCnts, SndStrt,mpi_byte, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
bcomm1.F90:125:11:

125 | buf2,RcvCnts, RcvStrt,mpi_byte,mpi_comm_col,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm2.F90:313:25:

313 | call mpi_alltoallv(buf1,KfSndCnts, KfSndStrt,mpi_byte, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm2.F90:314:11:

314 | dest,KfRcvCnts, KfRcvStrt,mpi_byte,mpi_comm_col,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm2.F90:126:25:

126 | call mpi_alltoallv(buf1,SndCnts, SndStrt,mpi_byte, &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm2.F90:127:11:

127 | buf2,RcvCnts, RcvStrt,mpi_byte,mpi_comm_col,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm1.F90:271:25:

271 | call mpi_alltoallv(buf1,IfSndCnts, IfSndStrt,mpi_byte, buf2,IfRcvCnts, IfRcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm1.F90:271:61:

271 | call mpi_alltoallv(buf1,IfSndCnts, IfSndStrt,mpi_byte, buf2,IfRcvCnts, IfRcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm1.F90:151:25:

151 | call mpi_alltoallv(buf1,SndCnts, SndStrt,mpi_byte, buf2,RcvCnts, RcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
fcomm1.F90:151:57:

151 | call mpi_alltoallv(buf1,SndCnts, SndStrt,mpi_byte, buf2,RcvCnts, RcvStrt,mpi_byte,mpi_comm_row,ierr)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
ftran.F90:811:32:

811 | call exec_f_r2c (rXgYZ, nx, cXgYZ, nxhp, nx, jisize*kjsize)
| 1
......
825 | call exec_f_r2c(source(1,j),str1,dest(1,1,j),str2,n,m)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
ftran.F90:526:33:

526 | call init_f_r2c(XgYZ,nx,buf2,nxhp,nx,jisizekjsize)
| 1
......
810 | call init_f_r2c (rXgYZ, nx, cXgYZ, nxhp, nx, jisize
kjsize)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
ftran.F90:173:33:

173 | call init_f_r2c(XgYZ,nx,buf2,nxhp,nx,jisizekjsize)
| 1
......
810 | call init_f_r2c (rXgYZ, nx, cXgYZ, nxhp, nx, jisize
kjsize)
| 2
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
make[4]: *** [module.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [p3dfft] Error 2
make: *** [osx-gnu-openmpi] Error 2

Help with CPA: Setup and Convergence

Hello All,

I am trying to setup a CPA calculation of L12 structure (of type AB3) with A site occupied by a mix of "Ti, Al and Fe" and the three B sites each occupied by a mix of "Ni, Co and Fe".

Following the examples and using ASE MuST, I setup the system. I know how to setup the system if all CPA atoms are of the same kind, but not sure if I am doing it correctly in case of two kinds of CPA atoms. Can someone take a look at the python code below and help me.

Secondly, when I run the code, it runs for a while and fails with the following error:

ERROR: rho0(ir) < 0
VALUE: -0.1586309D-01
STOP AT constructChargeDensity
For id = 1, ir = 977, r(ir) = 1.89201989
ERROR: rho0(ir) < 0
VALUE: -0.1586309D-01
STOP AT constructChargeDensity
For id = 1, ir = 977, r(ir) = 1.89201989
ERROR: rho0(ir) < 0
VALUE: -0.1586309D-01
STOP AT constructChargeDensity
For id = 1, ir = 977, r(ir) = 1.89201989
ERROR: rho0(ir) < 0
VALUE: -0.1586309D-01
STOP AT constructChargeDensity

Following another issue on this GitHub page (#31) and the suggestions by Professor Yang Wang, I tried changing k-points, mixing types and values etc, but it did not help.

Thank you,
Subrahmanyam Pattamatta
The University of Hong Kong


CODE to the setup

import os
import ase
from ase.build import bulk
from ase.units import kJ, Ry, Bohr
from ase.lattice.compounds import L1_2
from must import MuST, generate_starting_potentials

if name == 'main':

# Setup MuST calculator
calc = MuST(
    #####################################
    # Position and Potential Data Files #
    #####################################
    default_in_pot='Ni_ss_pot Co_ss_pot Ti_ss_pot Fe_ss_pot Al_ss_pot', 
    pot_in_form=0, 
    default_out_pot='NiCoTiFeAl',
    pot_out_form=1,
    ##########################
    # SCF-related Parameters #
    ##########################
    stop_rout_name='main', 
    nscf=200,
    method=3, 
    out_to_scr='n', 
    temperature=0.0, 
    ####################################
    # LDA Potential-related Parameters #
    ####################################
    potential_type=0,
    xc=0, 
    uniform_grid=(64,64,64),
    ####################################
    # Energy (Ryd.) Contour Parameters #
    ####################################
    read_mesh=0, 
    n_egrids=30,
    erbot=-0.4,
    real_axis_method=0,
    real_axis_points=300,
    ################################
    # Magnetism-related Parameters #
    ################################
    spin=1,
    #int_espin=1,
    ########################################
    # Scattering Theory-related Parameters #
    ########################################
    lmax_T=3, 
    ndivin=1001, 
    #########################################
    # R-space or K-space Related Parameters #
    #########################################
    liz_cutoff=8.5 * Bohr,
    k_scheme=0, 
    kpts=(12, 12, 12),
    bzsym=1,
    ###################################
    # Mixing and Tolerance Parameters #
    ###################################
    mix_algo=2,
    mix_quantity=1,
    mix_param=0.1,
    etol=5.0E-6 * Ry,
    ptol=1.0E-7 * Ry,
    ########################################################
    # Mixing and Tolerance Parameters for Effective Medium #
    ########################################################
    em_iter=80,
    em_scheme=2,
    em_mix_param=(0.1, 0.1),
    em_eswitch=0.003,
    em_tmatrix_tol=1E-7,
    #######################
    # No. of cores to run #
    #######################
    ntasks=16,
    )

# Experimental value of L12 lattice parameter in Angstrom
a = 3.6

# (Ti,Al,Fe) (Ni,Co,Fe)3 of type AB3 i.e L12 structure
# Create TiNi3 Alloy first
atoms = L1_2(directions=[[1,0,0], [0,1,0], [0,0,1]],
             size=(1,1,1), 
             symbol=('Ti','Ni'),
             pbc = (1,1,1),
             latticeconstant=a)
atoms = ase.build.sort(atoms) # Reorders atoms alphabetically -> Ni3 Ti

# Add CPA sites to make it (Ni43.3 Co23.7 Fe8)3 (Ti14.4 Al8.6 Fe2) 
atoms.info = {'CPA': [{'index': 0, 'Ni': 43.3/75, 'Co': 23.7/75, 'Fe': 8/75},
                      {'index': 1, 'Ni': 43.3/75, 'Co': 23.7/75, 'Fe': 8/75},
                      {'index': 2, 'Ni': 43.3/75, 'Co': 23.7/75, 'Fe': 8/75},
                      {'index': 3, 'Ti': 14.4/25, 'Al':  8.6/25, 'Fe': 2/25}]}    

# Move to new work directory
work_dir = 'work'
if not os.path.exists(work_dir):
    os.makedirs(work_dir)
os.chdir(work_dir)

generate_starting_potentials(atoms, crystal_type=1, a=a, moment=0.0, nspins=1, cpa=True)

# Attach calculator to the atoms object
atoms.set_calculator(calc)

# Trigger KKR calculation using .get_potential_energy() in eV
energy = atoms.get_potential_energy()
print(energy)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.