Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge updates #4

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*/obj/*
*mod.mod*
irpf90.a
*DS_Store*
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ${BIN_DIR}:
directories: ${OBJ_DIR} ${LIB_DIR} ${BIN_DIR}

${LIB_DIR}/irpf90.a: directories
cd ${SRC_DIR} && irpf90 init && $(MAKE) irpf90.a && cp irpf90.a ../${LIB_DIR}
cd ${SRC_DIR} && irpf90 init && $(MAKE) && cp IRPF90_temp/irpf90.a ../${LIB_DIR}

${OBJ_DIR}/get_ntot.o: ${SRC_DIR}/get_ntot.c directories chkopts
${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}
Expand All @@ -45,12 +45,18 @@ ${OBJ_DIR}/get_s2_mov.o: ${SRC_DIR}/get_s2_mov.c directories chkopts
${OBJ_DIR}/get_dmat.o: ${SRC_DIR}/get_dmat.c directories chkopts
${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}

${OBJ_DIR}/get_proj_9_3h.o: ${SRC_DIR}/get_proj_9_3h.c directories chkopts
${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}

${OBJ_DIR}/get_proj_9_3h.o: ${SRC_DIR}/get_proj_9_3h.c directories chkopts
${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}

${OBJ_DIR}/get_val_iaa2.o: ${SRC_DIR}/get_val_iaa2.c directories chkopts
${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}

${OBJ_DIR}/ex1.o: ${SRC_DIR}/ex1.c
-${CC} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -c -o $@ $< ${SLEPC_EPS_LIB}

${BIN_DIR}/ex1: ${OBJ_DIR}/get_ntot.o ${OBJ_DIR}/read2.o ${OBJ_DIR}/get_s2_mov.o ${OBJ_DIR}/get_s2_cyclic.o ${OBJ_DIR}/get_s2.o ${OBJ_DIR}/get_dmat.o ${OBJ_DIR}/get_val_iaa2.o ${LIB_DIR}/irpf90.a ${OBJ_DIR}/ex1.o ${SRC_DIR}/read2.h ${SRC_DIR}/get_ntot.h ${SRC_DIR}/stimsyr.h chkopts
-${CLINKER} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -o ${BIN_DIR}/ex1 ${OBJ_DIR}/ex1.o ${OBJ_DIR}/read2.o ${OBJ_DIR}/get_ntot.o ${OBJ_DIR}/get_s2.o ${OBJ_DIR}/get_s2_mov.o ${OBJ_DIR}/get_s2_cyclic.o ${OBJ_DIR}/get_dmat.o ${OBJ_DIR}/get_val_iaa2.o ${LIB_DIR}/irpf90.a ${SLEPC_EPS_LIB}
${BIN_DIR}/ex1: ${OBJ_DIR}/get_ntot.o ${OBJ_DIR}/read2.o ${OBJ_DIR}/get_s2_mov.o ${OBJ_DIR}/get_s2_cyclic.o ${OBJ_DIR}/get_s2.o ${OBJ_DIR}/get_dmat.o ${OBJ_DIR}/get_proj_9_3h.o ${OBJ_DIR}/get_val_iaa2.o ${LIB_DIR}/irpf90.a ${OBJ_DIR}/ex1.o ${SRC_DIR}/read2.h ${SRC_DIR}/get_ntot.h ${SRC_DIR}/stimsyr.h chkopts
-${CLINKER} ${SLEPC_INCLUDE} ${PETSC_CC_INCLUDES} -o ${BIN_DIR}/ex1 ${OBJ_DIR}/ex1.o ${OBJ_DIR}/read2.o ${OBJ_DIR}/get_ntot.o ${OBJ_DIR}/get_s2.o ${OBJ_DIR}/get_s2_mov.o ${OBJ_DIR}/get_s2_cyclic.o ${OBJ_DIR}/get_dmat.o ${OBJ_DIR}/get_proj_9_3h.o ${OBJ_DIR}/get_val_iaa2.o ${LIB_DIR}/irpf90.a ${SLEPC_EPS_LIB}
# ${RM} ex1.o read2.o
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ Double Exchange Hamiltonian: Complete Version

(under GNU GENERAL PUBLIC LICENSE v2)

This program can perform Exact diagonalization calculations of various types of
model Hamiltonians. It is especially optimized for the t-J (or Double Exchange)
type model Hamiltonians. The core feature which the program is specialized for
is the adressing of determinant in an efficient manner to quickly construct the
Hamiltonian non-zero matrix-elements. Once the Hamiltonian is constructed in
its sparse format, it is stored in distributed memory for all linear algebra
operations.

The main work of diagonalizing the Hamiltonian is performed using PETSc and
SLEPc helper functions. These functions return the eigenvectors which are
not stored to disk by default due to their large size.

This project also contains subroutines which analyze the wavefunction in
its distributed memory form and calculates the various observables. The
output of the program are the energies and the various observables such as
the total Spin, various Spin-Spin correlation functions, and one-and two-body
density matrices.

_Dependencies_
---------------

Expand All @@ -33,8 +51,6 @@ export C_INCLUDE_PATH+=:$PETSC_DIR/include/:$SLEPC_DIR/include:$PETSC_DIR/arch-l
make ex1
```

[![asciicast](https://asciinema.org/a/Ng3tSNDoWBkV5C9ZYvbxCW43B.png)](https://asciinema.org/a/Ng3tSNDoWBkV5C9ZYvbxCW43B)


_Using DEHam_
---------------
Expand All @@ -48,27 +64,27 @@ _Using DEHam_
140 # The largest number of non-zero elements per row (Multiple of Ndet)
1 # The total number of processors used in parallel (Multiple of Ndet)
1 # The number of holes
0 # The isz (ms-1/2) value
0 # The Sz (nalpha-nbeta-1) (odd spins) value or (nalpha-nbeta) (even spins)
true # Restrict the hole to the 1'st (i.e. half of natom) Family of states. *false* for no restrictions
1,2,3,1,2,3,4,5,6,7 # The topology of the system is specified here
2,3,4,8,7,6,5,6,7,8 # first and second line contain the two sites linked
1,1,1,2,2,2,2,3,3,3 # third line contains the type of link (1 for t or J, 2 for K and 3 for none)
.1430,-0.20,0.0000 # The three types of links this line gives J, K
.1430,-0.20,0.0000 #
-1.00,0.0,0.00 # This line gives t
0.,0.,0.,0.,0.,0.,0.,0.,0. # Energy of each orbital + one extra term
1,1,1,2,2,2,2,3,3,3 # third line contains the type of link (1 for t or J, 2 for K and 3 for J in the second family of states)
.1430,-0.20,0.0000 # The three types of links this line gives J, K, J2 along x axis
.1430,-0.20,0.0000 # The three types of links this line gives J, K, J2 along y axis
-1.00,0.0,0.00 # This line gives t
0.,0.,0.,0.,0.,0.,0.,0.,0. # Energy of each orbital + *one extra term*
2 # The total number of roots
1 # I The position of the first
1 # I SBox
1 # I
1 # I
1 # I a1 The position of the first
1 # I a2 SBox (starts from 0 )
1 # I b1
1 # I b2
1 # II The positions of the second
1 # II SBox
1 # II
1 # II SBox (starts from 0)
1 # II
1 # II
1 # III
1 # III The positions of the third
1 # III SBox
1 # III SBox (starts from 0)
1 # III
1 # positio of the hole
0 # fix the position of the first hole during the CI
Expand All @@ -92,7 +108,7 @@ t-J Hamiltonians.
![](https://raw.githubusercontent.com/v1j4y/DEHam/master/notebooks/graph.png)


_Publications using this code_
_Research using this code please cite the following publication_
-------------------------------

1. High-Spin Chains and Crowns from Double-Exchange Mechanism [doi:10.3390/cryst6040039](http://www.dx.doi.org/10.3390/cryst6040039)
30 changes: 30 additions & 0 deletions examples/tJ_4.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
4
2
1
1
0
false
1,2,3
2,3,4
1,1,1
1.0,-1.0,0.0000
1.0,-1.0,0.0000
-1.00,0.0,0.00
0.0,0.0,0.0,0.0
12
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
85 changes: 85 additions & 0 deletions examples/tJ_4.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

1-D t-J Eigenproblem, n=12

start: 0 end: 12
HAMILTONIEN t-J
Le nombre de trou est : 1
Famille 1 : F


LECTURE DES ATOMES, DES LIAISONS, DES INTEGRALES


================ CLUSTER 1 ==================

Liaisons entre les atomes 3
Les atomes 1 et 2 forment la liaison 1 qui est de type 1
Les atomes 2 et 3 forment la liaison 2 qui est de type 1
Les atomes 3 et 4 forment la liaison 3 qui est de type 1
=============================================
Le nombre total d atomes est 4
=============================================
Nombre de J differents 3
type de liaison 1 1
type de liaison 2 1
type de liaison 3 1
type de J 1.0000000000000000
type de J -1.0000000000000000
type de J 0.0000000000000000
Parametres : Jz 1 = 1.0000000000000000
Parametres : Jxy 1 = 1.0000000000000000
Parametre : t 1 = -1.0000000000000000
Parametres : Jz 2 = 1.0000000000000000
Parametres : Jxy 2 = 1.0000000000000000
Parametre : t 2 = -1.0000000000000000
Parametres : Jz 3 = 1.0000000000000000
Parametres : Jxy 3 = 1.0000000000000000
Parametre : t 3 = -1.0000000000000000
coucoudslect3
coucou
Parametres pour le t-J
xj1 = 1.0000000000000000E-002
xj2 = 0.0000000000000000
xt1 = -0.20000000000000001
xt2 = 0.0000000000000000
xv1 = 0.0000000000000000
xv2 = 0.0000000000000000
xv3 = 0.0000000000000000
xbj = 0.0000000000000000
xbt = 0.0000000000000000
xeneparJ = 0.0000000000000000
xeneperpJ = 0.0000000000000000
xeneparT = 0.0000000000000000
xeneperpT = 0.0000000000000000
xenediagJ = 0.0000000000000000
xenediagT = 0.0000000000000000
xspar = -0.0000000000000000
xsperp = -0.0000000000000000
Le systeme comporte 0 plaquettes.
Spin total 0
Nombre de vecteurs demande 8
Nombre maximal d iterations de Davidson 280
Vecteur calcule le plus bas 1
Variable Nes4 (vecteurs d essai) 0
Nombre de determinants en donnees 100
Variable Ysuiv (suivre le vecteur initial) F
Seuil au dela duquel seront ecrits les vecteurs 9.9999999392252903E-009
Option d ecriture des determinants sur FIL2 T
=======nombre de centres de spin alpha===== 2
nt2= 3
nt1 4
nt2= 3 nbeta= 1
Time used to build the matrix: 0.007272
time = 0.007272 mpiid = 0
Time used to assemble the matrix: 0.000024
Time used: 0.000336
Number of iterations of the method: 1
Solution method: krylovschur

Number of converged eigenvalues: 2
Stopping condition: tol=1e-09, maxit=10000000
k ||Ax-kx||/||kx|| <S>
----------------- ----------------- ------------------
-3.855773 6.4802e-16 0.500000 0.000000 0.000000 1.000000
-3.414214 1.59311e-15 0.500000 0.000000 0.000000 1.000000

30 changes: 30 additions & 0 deletions examples/tJ_4x5.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
20
26
4
1
0
false
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
2, 3, 4, 1, 6, 7, 8, 5, 10, 11, 12, 9, 14, 15, 16, 13, 18, 19, 20, 17, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1.0,-1.0,0.00
1.0,-1.0,0.00
-1.000,0.0,0.00
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
2
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
30 changes: 30 additions & 0 deletions examples/tJ_4x6.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
24
7
4
1
0
false
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24
2, 3, 4, 1, 6, 7, 8, 5, 10, 11, 12, 9, 14, 15, 16, 13, 18, 19, 20, 17, 22, 23, 24, 21, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 2, 3, 4
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1.0,-1.0,0.00
1.0,-1.0,0.00
-1.000,0.0,0.00
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
2
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
30 changes: 30 additions & 0 deletions examples/tJ_cycl_4.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
4
2
1
1
0
false
1,2,3,1
2,3,4,4
1,1,1,1
1.0,-1.0,0.0000
1.0,-1.0,0.0000
-1.00,0.0,0.00
1.0,1.0,1.0,1.0
120
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
Loading