9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-12 16:33:37 +01:00

Merge branch 'master' into dev
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Anthony Scemama 2022-04-14 01:15:32 +02:00
commit c99bc33a4f
11 changed files with 162 additions and 15 deletions

28
.drone.yml Normal file
View File

@ -0,0 +1,28 @@
---
kind: pipeline
type: docker
name: default
clone:
depth: 10
steps:
- name: configure
image: scemama666/qp2_env
commands:
- ./configure -i all -c ./config/gfortran_debug.cfg
- bash -c "source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama"
- bash -c "source quantum_package.rc ; qp plugins install champ"
- name: compile
image: scemama666/qp2_env
commands:
- bash -c "source quantum_package.rc ; exec ninja"
- name: testing
image: scemama666/qp2_env
commands:
- bash -c "source quantum_package.rc ; qp test -a"

8
drone/Docker/README.md Normal file
View File

@ -0,0 +1,8 @@
Docker files to build the containers used with DroneCI.
Example:
```
docker build -t ubuntu/qp2_env .
```

View File

@ -0,0 +1,27 @@
ARG UBUNTU_VERSION=20.04
FROM ubuntu:${UBUNTU_VERSION} AS builder
# Timezone for tzdata
ARG tz=Etc/UTC
RUN echo $tz > /etc/timezone && rm -rf /etc/localtime
# Install
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
curl \
wget \
python3 \
gfortran \
gcc \
g++ \
make \
build-essential \
rsync \
unzip \
libopenblas-dev \
pkg-config \
m4
RUN ln -s /usr/bin/python3 /usr/bin/python

30
drone/drone_docker.yml Normal file
View File

@ -0,0 +1,30 @@
---
kind: pipeline
type: docker
name: default
clone:
depth: 10
steps:
- name: configure
pull: never
image: ubuntu/qp2_env
commands:
- ./configure -i all -c ./config/gfortran_debug.cfg
- source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama
- source quantum_package.rc ; qp plugins install champ
- name: compile
pull: never
image: ubuntu/qp2_env
commands:
- ninja
- name: testing
pull: never
image: ubuntu/qp2_env
commands:
- qp test

29
drone/drone_ssh.yml Normal file
View File

@ -0,0 +1,29 @@
kind: pipeline
type: ssh
name: default
clone:
depth: 10
server:
host: 130.120.229.139
user: test
password:
from_secret: ssh_pass
steps:
- name: configure
commands:
- ./configure -i all -c ./config/gfortran_debug.cfg
- source quantum_package.rc ; qp plugins download https://gitlab.com/scemama/qp_plugins_scemama
- source quantum_package.rc ; qp plugins install champ
- name: compile
commands:
- ninja
- name: testing
commands:
- qp test

View File

@ -34,3 +34,9 @@ doc: Maximum number of excitation for beta determinants with respect to the Hart
interface: ezfio,ocaml,provider
default: -1
[twice_hierarchy_max]
type: integer
doc: Twice the maximum hierarchy parameter (excitation degree plus half the seniority number). Using -1 selects all determinants
interface: ezfio,ocaml,provider
default: -1

View File

@ -713,6 +713,25 @@ subroutine fill_buffer_double(i_generator, sp, h1, h2, bannedOrb, banned, fock_d
if (do_cycle) cycle
endif
if (twice_hierarchy_max >= 0) then
s = 0
do k=1,N_int
s = s + popcnt(ieor(det(k,1),det(k,2)))
enddo
if ( mod(s,2)>0 ) stop 'For now, hierarchy CI is defined only for an even number of electrons'
if (excitation_ref == 1) then
call get_excitation_degree(HF_bitmask,det(1,1),degree,N_int)
else if (excitation_ref == 2) then
stop 'For now, hierarchy CI is defined only for a single reference determinant'
! do k=1,N_dominant_dets_of_cfgs
! call get_excitation_degree(dominant_dets_of_cfgs(1,1,k),det(1,1),degree,N_int)
! enddo
endif
integer :: twice_hierarchy
twice_hierarchy = degree + s/2
if (twice_hierarchy > twice_hierarchy_max) cycle
endif
Hii = diag_H_mat_elem_fock(psi_det_generators(1,1,i_generator),det,fock_diag_tmp,N_int)
w = 0d0

View File

@ -59,43 +59,43 @@ function run_stoch() {
@test "HCO" { # 12.2868s
qp set_file hco.ezfio
run -113.389297812482 6.e-4 100000
run -113.393356604085 1.e-3 100000
}
@test "H2O2" { # 12.9214s
qp set_file h2o2.ezfio
qp set_mo_class --core="[1-2]" --act="[3-24]" --del="[25-38]"
run -151.00467 1.e-4 100000
run -151.005848404095 1.e-3 100000
}
@test "HBO" { # 13.3144s
[[ -n $TRAVIS ]] && skip
qp set_file hbo.ezfio
run -100.212560384678 1.e-3 100000
run -100.214099486337 1.e-3 100000
}
@test "H2O" { # 11.3727s
[[ -n $TRAVIS ]] && skip
qp set_file h2o.ezfio
run -76.2361605151999 3.e-4 100000
run -76.2361605151999 5.e-4 100000
}
@test "ClO" { # 13.3755s
[[ -n $TRAVIS ]] && skip
qp set_file clo.ezfio
run -534.545616787223 3.e-4 100000
run -534.546453546852 1.e-3 100000
}
@test "SO" { # 13.4952s
[[ -n $TRAVIS ]] && skip
qp set_file so.ezfio
run -26.0096209515081 1.e-3 100000
run -26.0176563764039 1.e-3 100000
}
@test "H2S" { # 13.6745s
[[ -n $TRAVIS ]] && skip
qp set_file h2s.ezfio
run -398.859168655255 3.e-4 100000
run -398.859577605891 5.e-4 100000
}
@test "OH" { # 13.865s
@ -113,13 +113,13 @@ function run_stoch() {
@test "H3COH" { # 14.7299s
[[ -n $TRAVIS ]] && skip
qp set_file h3coh.ezfio
run -115.205191406072 3.e-4 100000
run -115.205632960026 1.e-3 100000
}
@test "SiH3" { # 15.99s
[[ -n $TRAVIS ]] && skip
qp set_file sih3.ezfio
run -5.57241217753818 3.e-4 100000
run -5.57241217753818 5.e-4 100000
}
@test "CH4" { # 16.1612s
@ -132,28 +132,28 @@ function run_stoch() {
@test "ClF" { # 16.8864s
[[ -n $TRAVIS ]] && skip
qp set_file clf.ezfio
run -559.169313755572 3.e-4 100000
run -559.169748890031 1.5e-3 100000
}
@test "SO2" { # 17.5645s
[[ -n $TRAVIS ]] && skip
qp set_file so2.ezfio
qp set_mo_class --core="[1-8]" --act="[9-87]"
run -41.5746738713298 3.e-4 100000
run -41.5746738713298 1.5e-3 100000
}
@test "C2H2" { # 17.6827s
[[ -n $TRAVIS ]] && skip
qp set_file c2h2.ezfio
qp set_mo_class --act="[1-30]" --del="[31-36]"
run -12.3685464085969 3.e-4 100000
run -12.3685464085969 2.e-3 100000
}
@test "N2" { # 18.0198s
[[ -n $TRAVIS ]] && skip
qp set_file n2.ezfio
qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-60]"
run -109.28681540699360 3.e-4 100000
run -109.287917088107 1.5e-3 100000
}
@test "N2H4" { # 18.5006s
@ -167,7 +167,7 @@ function run_stoch() {
[[ -n $TRAVIS ]] && skip
qp set_file co2.ezfio
qp set_mo_class --core="[1,2]" --act="[3-30]" --del="[31-42]"
run -187.968547952413 3.e-4 100000
run -187.970184372047 1.5e-3 100000
}
@ -182,6 +182,6 @@ function run_stoch() {
[[ -n $TRAVIS ]] && skip
qp set_file hcn.ezfio
qp set_mo_class --core="[1,2]" --act="[3-40]" --del="[41-55]"
run -93.0771143355433 3.e-4 100000
run -93.0777619629755 1.e-3 100000
}