Commit 55bf6435 authored by Elisa Rebolini's avatar Elisa Rebolini
Browse files

Merge branch 'dev/prop' into 'master'

Implementation of the density matrix

See merge request !5
parents 714f713e 3b2447a1
Pipeline #13620 passed with stage
in 15 minutes and 11 seconds
# Cmake Project file for RelaxSE
cmake_minimum_required(VERSION 3.0)
project (RelaxSE)
project (RelaxSE LANGUAGES Fortran C )
# these are paths that CMake will search for cmake
# module files that end with .cmake
......@@ -100,9 +100,18 @@ if(ENABLE_MPI)
endif()
endif()
#===============================================
include(RelaxSE_Sources)
include(RelaxSE_dens)
if(ENABLE_DEV)
add_definitions(-DVAR_DEV)
include(RelaxSE_dev)
endif()
# Common Libraries
#===============================================
add_library(RelaxSE_common
${RELAXSE_COMMON})
......@@ -154,13 +163,30 @@ add_dependencies(RelaxSE_lib RelaxSE_type)
add_dependencies(RelaxSE_lib RelaxSE_IO)
add_dependencies(RelaxSE_lib RelaxSE_common)
add_library(RelaxSE_prop
${RELAXSE_SOURCES_prop})
add_dependencies(RelaxSE_prop RelaxSE_type)
add_dependencies(RelaxSE_prop RelaxSE_IO)
add_dependencies(RelaxSE_prop RelaxSE_common)
add_dependencies(RelaxSE_prop RelaxSE_lib)
if(ENABLE_DEV)
add_library(RelaxSE_prop
${RELAXSE_SOURCES_prop}
${RELAXSE_dens}
${RELAXSE_dev})
else()
add_library(RelaxSE_prop
${RELAXSE_SOURCES_prop}
${RELAXSE_dens})
endif()
if (ENABLE_NOGEN)
add_dependencies(RelaxSE_prop RelaxSE_type)
add_dependencies(RelaxSE_prop RelaxSE_IO)
add_dependencies(RelaxSE_prop RelaxSE_common)
add_dependencies(RelaxSE_prop RelaxSE_lib)
else()
add_dependencies(RelaxSE_prop RelaxSE_type)
add_dependencies(RelaxSE_prop RelaxSE_IO)
add_dependencies(RelaxSE_prop RelaxSE_common)
add_dependencies(RelaxSE_prop RelaxSE_fockgen)
add_dependencies(RelaxSE_prop RelaxSE_intgen)
add_dependencies(RelaxSE_prop RelaxSE_lib)
endif()
if(MPI_Fortran_FOUND)
target_include_directories(RelaxSE_lib PRIVATE
......@@ -197,18 +223,30 @@ if(ENABLE_NOGEN)
execute_process(COMMAND cp -r ${CMAKE_SOURCE_DIR}/src/generator/update_gencode.sh ${CMAKE_BINARY_DIR}/)
### SASS program
### RelaxSE program (nogen)
add_executable(relaxse.x src/RelaxSE.F90)
target_link_libraries(relaxse.x
RelaxSE_lib
RelaxSE_type
RelaxSE_IO
RelaxSE_common
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
RelaxSE_lib
RelaxSE_type
RelaxSE_IO
RelaxSE_common
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
### Code for properties calculations
add_executable(prop.x src/prop.F90)
target_link_libraries(prop.x
RelaxSE_lib
RelaxSE_prop
RelaxSE_type
RelaxSE_IO
RelaxSE_common
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
else()
### SASS program
### RelaxSE program (gen)
add_executable(relaxse.x src/RelaxSE.F90)
target_link_libraries(relaxse.x
RelaxSE_lib
......@@ -220,19 +258,23 @@ else()
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
### Code for properties calculations
add_executable(prop.x src/prop.F90)
target_link_libraries(prop.x
RelaxSE_lib
RelaxSE_prop
RelaxSE_type
RelaxSE_IO
RelaxSE_common
RelaxSE_fockgen
RelaxSE_intgen
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
endif()
### Code for properties calculations
add_executable(prop.x src/prop.F90)
target_link_libraries(prop.x
RelaxSE_lib
RelaxSE_prop
RelaxSE_type
RelaxSE_IO
RelaxSE_common
${LAPACK_LIBRARIES}
${BLAS_LIBRARIES}
)
### Unitests
enable_testing()
......@@ -249,4 +291,3 @@ execute_process(COMMAND cp ${CMAKE_SOURCE_DIR}/test/runtest_v1.py ${CMAKE_BINARY
include(TestsRelaxSE)
include(CTest)
......@@ -94,5 +94,4 @@ set(RELAXSE_gen_SOURCES
)
include(RelaxSE_prop)
set(RELAXSE_dens
src/dens/dens.F90
src/dens/dens_act.F90
src/dens/dens_part.F90
src/dens/dens_trou.F90
src/dens/dens_exdiag_tp.F90
src/dens/dens_exdiag_ap.F90
src/dens/dens_exdiag_ta.F90
#src/dens/verif_dens.F90
)
set(RELAXSE_dev
#
)
set(RELAXSE_SOURCES_prop
src/proprietes.F90
src/lect_data_prop.F90
src/def_files_prop.F90
src/info_prop.F90
src/def_files_prop.F90
# src/init_prop.F90
src/info_prop.F90
)
......@@ -45,10 +45,10 @@ add_runtest(CuO_00800_LS)
if(NOT ENABLE_NOGEN)
add_runtest(CuO_02240)
add_runtest(CuO_30405)
add_runtest(CuO_03450_nodet2)
add_runtest(CuO_03450_nodet3)
add_runtest(CuO_03450_nocontraction)
add_runtest(CuO_03450_allcontraction)
#add_runtest(CuO_03450_nodet2)
#add_runtest(CuO_03450_nodet3)
#add_runtest(CuO_03450_nocontraction)
#add_runtest(CuO_03450_allcontraction)
add_runtest(CuO_03450)
add_runtest(CuO_12423)
add_runtest(CuO_CAS+S)
......@@ -64,3 +64,34 @@ if(ENABLE_MPI)
add_runtest(CuO_03450_smallbatch_MPIload)
add_runtest(CuO_03450_smallbatch_noMPIload)
endif()
if (CMAKE_Fortran_COMPILER_ID MATCHES GNU) #would need Intel binaries as input to test with Intel
add_test(
NAME prop_CuO_02204
COMMAND python3 ${CMAKE_SOURCE_DIR}/test/prop_CuO_02204/test_prop --binary-dir=${CMAKE_BINARY_DIR} --work-dir=${CMAKE_BINARY_DIR}/test/prop_CuO_02204 --verbose --log=${CMAKE_BINARY_DIR}/test/prop_CuO_02204/runtest.stderr.logprop)
set_tests_properties(prop_CuO_02204 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/prop_CuO_02204)
add_test(
NAME prop_CuO_20204
COMMAND python3 ${CMAKE_SOURCE_DIR}/test/prop_CuO_20204/test_prop --binary-dir=${CMAKE_BINARY_DIR} --work-dir=${CMAKE_BINARY_DIR}/test/prop_CuO_20204 --verbose --log=${CMAKE_BINARY_DIR}/test/prop_CuO_20204/runtest.stderr.logprop)
set_tests_properties(prop_CuO_20204 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/prop_CuO_20204)
add_test(
NAME prop_CuO_02240
COMMAND python3 ${CMAKE_SOURCE_DIR}/test/prop_CuO_02240/test_prop --binary-dir=${CMAKE_BINARY_DIR} --work-dir=${CMAKE_BINARY_DIR}/test/prop_CuO_02240 --verbose --log=${CMAKE_BINARY_DIR}/test/prop_CuO_02240/runtest.stderr.logprop)
set_tests_properties(prop_CuO_02240 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/prop_CuO_02240)
add_test(
NAME prop_CuO_03450
COMMAND python3 ${CMAKE_SOURCE_DIR}/test/prop_CuO_03450/test_prop --binary-dir=${CMAKE_BINARY_DIR} --work-dir=${CMAKE_BINARY_DIR}/test/prop_CuO_03450 --verbose --log=${CMAKE_BINARY_DIR}/test/prop_CuO_03450/runtest.stderr.logprop)
set_tests_properties(prop_CuO_03450 PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/test/prop_CuO_03450)
endif()
if(ENABLE_DEV)
endif()
......@@ -84,6 +84,10 @@ def parse_input():
action='store_true',
default=False,
help='disable generated code [default: %(default)s]')
group.add_argument('--dev',
action='store_true',
default=False,
help='enable development code [default: %(default)s]')
group = parser.add_argument_group('parallelization')
group.add_argument('--mpi',
......@@ -154,6 +158,7 @@ def gen_cmake_command(args):
command += ' -DENABLE_MPI=%s' % translate_cmake(args.mpi)
command += ' -DENABLE_OMP=%s' % translate_cmake(args.omp)
command += ' -DENABLE_NOGEN=%s' % translate_cmake(args.nogen)
command += ' -DENABLE_DEV=%s' % translate_cmake(args.dev)
if args.build_type:
command += ' -DCMAKE_BUILD_TYPE=%s' % args.build_type
......
......@@ -40,13 +40,24 @@ calculations.
printing of the \program{\sass} wave functions projection on
the CAS. \\
\item[whichprop]: list of the \keyword{nprop} \keyword{keywords} of the
properties to be computed \\
properties to be computed
\begin{itemize}
\item \keyword{dens}: one-particle density matrix calculation (OpenMP parallelization available)
\item \keyword{lcoef}: printing of wave-function determinants with a
coefficient larger than a threshold (default 0.05).
\item \keyword{seuilcoef}: only if \keyword{lcoef} is present~; threshold
for printing of the wave-function determinants. \keyword{seuilcoef}
should not be counted in \keyword{nprop}.
\item \keyword{S-S2}: computation of $S^2$ and $S$ (long: no parallelization available yet)
\item \keyword{WF}: printing of the complete wave-function (to be used with care)
\end{itemize}
\devonly{Properties to be implemented in near future \\
\keyword{pref1}: printing of the \program{\sass} wave functions projection
on the Ref1 space \\
\keyword{lcoef}: printing of the \program{\sass} wave functions
coefficients larger than 0.05. \\
\keyword{dens}: one-particule density matrix calculation \\
\keyword{dens2}: two-particules density matrix calculation.
}
\end{keywordlist}
......
No preview for this file type
......@@ -10,7 +10,7 @@
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{fullpage}
%\usepackage{fullpage}
\usepackage{graphicx}
%\usepackage{geometry}
\usepackage{algorithm}
......
......@@ -233,7 +233,7 @@ Program RelaxSE
flush(f_bdet)
call deter_free(det)
endif
!Initialisation of the bare h matrix
! contains ntot * ntot elements
! their indices run from ngel+1 to ngel+ntot
......@@ -259,7 +259,7 @@ Program RelaxSE
#ifdef VAR_MPI
call MPI_BARRIER(MPI_COMM_WORLD,ierr)
#endif
!Build the fock matrix
!Add the 2e- part to the bare h_pq
!f_pq = h_pq + sum[ 2(ij|oo) - (io|jo)]
......@@ -283,7 +283,8 @@ Program RelaxSE
flush(f_output)
endif
call get_e0(ener_info, hcoeur, o_info, int_info, prog_info)
!-----
!----- Diag 0
!-----
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -41,6 +41,7 @@ Module files
!!$ f_det : tous les determinants en clair
!!$ f_bdet : tous les determinants en binaire
!!$ f_info : variables globales x_info
!!$ f_dens : matrice densite
!!$ Autres
!!$ f_hcore : Hcore (a voir si vraiment nécessaire)
......@@ -52,7 +53,7 @@ Module files
!!$ -----------------------------------------------------------
integer, parameter :: f_input=1, f_output=7, f_ref0=8, f_det=9, f_bdet=39
integer, parameter :: f_fock=10
integer, parameter :: f_info=24
integer, parameter :: f_info=24, f_dens=25
integer, parameter :: f_gen=14, f_restart = 15, f_gen0 = 16
integer, parameter :: f_tone=31, f_tint=32, f_mat=33, f_bmat=34, f_mat2=35
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment