mirror of
https://github.com/TREX-CoE/fparser.git
synced 2024-11-03 12:43:58 +01:00
merging the libfdf
This commit is contained in:
parent
31dd42e876
commit
930e7102a7
@ -1 +1 @@
|
||||
Subproject commit 7c6a4ff29296800726a941dd3b96dd772849ea09
|
||||
Subproject commit a3e127c01dae87f55acc1d5f8eaa9591953806ed
|
BIN
parser/a.out
BIN
parser/a.out
Binary file not shown.
@ -28,7 +28,7 @@ PROGRAM iochamp
|
||||
character(len=80) :: logical_format = '(A, T40, L)'
|
||||
|
||||
! for determinants sections
|
||||
integer :: nelectrons, nexcitation, iostat
|
||||
integer :: nelectrons, iostat
|
||||
real(kind=8), allocatable :: det_coeff(:)
|
||||
character(len=20) :: temp1, temp2, temp3
|
||||
!------------------------------------------------------------------------- BEGIN
|
||||
@ -217,7 +217,7 @@ PROGRAM iochamp
|
||||
if (iostat .ne. 0) stop "Problem in opening the determinant file"
|
||||
read(11,*) temp1, temp2, nelectrons, temp3, nalpha
|
||||
|
||||
read(11,*) temp1, ndeterminants, nexcitation
|
||||
read(11,*) temp1, ndeterminants, iwctype
|
||||
if (.not. allocated(det_coeff)) allocate(det_coeff(ndeterminants))
|
||||
|
||||
read(11,*) (det_coeff(i), i=1,ndeterminants)
|
||||
|
@ -31,121 +31,39 @@ MODULE keywords
|
||||
public :: path_pool
|
||||
public :: file_input, file_output
|
||||
public :: file_basis
|
||||
public :: file_pseudo
|
||||
public :: file_orbitals
|
||||
public :: file_molecule
|
||||
public :: file_determinants
|
||||
public :: file_jastrow
|
||||
public :: file_jastrow_deriv
|
||||
|
||||
public :: irn, rand_seed
|
||||
public :: ijas, form_jastrow ! form of Jastrow. (between 1 and 6, mostly we use 4)
|
||||
public :: isc, form_jastrow_scaling ! isc form of scaling function for ri,rj,rij in Jastrow (between 1 and 7, mostly use 2,4,6,7)
|
||||
! 2 [1-exp(scalek*r)]/scalek
|
||||
! 3 [1-exp{-scalek*r-(scalek*r)**2/2}]/scalek
|
||||
! 4 r/(1+scalek*r)
|
||||
! 5 r/{1+(scalek*r)**2}**.5
|
||||
! 6 Short-range version of 2 (range given bu cutjas)
|
||||
! 7 Short-range version of 4 (range given bu cutjas)
|
||||
public :: iperiodic, periodic
|
||||
public :: ibasis, form_basis
|
||||
public :: hb, hbar
|
||||
public :: etrial, energy_trial
|
||||
public :: eunit, energy_unit
|
||||
public :: nstep, nsteps
|
||||
public :: nblk, nblocks
|
||||
public :: nblkeq, nequil_blocks ! number of equilibration blocks
|
||||
public :: nconf, nconfigs ! target number of MC configurations in dmc
|
||||
public :: nconf_new, nconfigs_new ! number of new MC configs. saved per processor.
|
||||
public :: idump, unit_restart_dump ! unit of a dump restart file
|
||||
public :: irstar, restart ! Currently integer :: restart from restart file; proposed logical
|
||||
|
||||
|
||||
public :: isite, generate_config ! call sites to generate starting MC config. in vmc
|
||||
public :: ipr, print_level ! print level
|
||||
public :: imetro, form_metropolis ! form of Metropolis (6 is most efficient choice for most systems)
|
||||
! 1 simple algorithm with force-bias
|
||||
! 6 accelerated Metropolis algorithm from Cyrus' 1993 PRL
|
||||
public :: delta, step_size ! step-size for simple algorithm
|
||||
public :: deltar, step_size_radial ! radial step-size for accelerated algorithm
|
||||
public :: deltat, step_size_angular ! angular step-size for accelerated algorithm
|
||||
public :: fbias, force_bias ! force-bias. (Use 1 always).
|
||||
public :: idmc, form_dmc ! form of dmc algorithm
|
||||
! 1 simple dmc
|
||||
! 2 improved dmc from Umrigar, Nightingale, Runge 1993 JCP
|
||||
public :: nfprod ! number of products to undo for estimating population control bias in dmc
|
||||
public :: tau ! time-step in dmc
|
||||
public :: nloc, pseudo_format ! nonlocal pseudopotential
|
||||
! 0 local
|
||||
! 1 in Fahy format
|
||||
! 2 in Troullier-Martins format (unformatted)
|
||||
! 3 in Troullier-Martins format (formatted)
|
||||
public :: nquad, nquadrature ! number of angular quadrature points for nonlocal psp.
|
||||
public :: nelec ! number of electrons
|
||||
public :: nup, nalpha ! number of up-spin electrons
|
||||
public :: ndown, nbeta ! number of down-spin electrons
|
||||
public :: nctype, ntypes_atom ! number of atom/center types
|
||||
public :: ncent, natoms, ncenters, ncentres ! number of atoms/centers
|
||||
public :: iwctype ! specify atom-type for each atom
|
||||
|
||||
public :: znuc, znuclear, atomic_number ! nuclear charge
|
||||
public :: cent !atom_coords ! atom positions
|
||||
public :: ndet, ndeterminants ! number of determinants in wavefunction
|
||||
public :: nbasis ! number of basis functions
|
||||
public :: norb, norbitals ! number of orbitals
|
||||
public :: cdet !det_coeffs ! coefficients of determinants
|
||||
public :: iworbd ! which orbitals enter in which determinants
|
||||
public :: ianalyt_lap, analytic_laplacian ! analytic laplacian or not
|
||||
|
||||
public :: nspin1, ifock
|
||||
public :: nspin2 ! 1,2,3,-1,-2 -> nspin2b=abs(nspin2)
|
||||
! nspin2 > 0 nspin2 sets of a, c parms, nspin2b sets of b parms
|
||||
! nocuspb=0 parallel e-e cusp conditions satisfied (b=1/2,1/4)
|
||||
! nspin2 < 0 -> nspin2=1
|
||||
! nspin2=1 sets of a and c parms, nspin2b sets of b parms
|
||||
! -1 nocuspb=1 parallel e-e cusp conditions not satisfied (1/2,1/2)
|
||||
! -2 nocuspb=0 parallel e-e cusp conditions satisfied (1/2,1/4)
|
||||
public :: nord, order_poly ! order of the polynmial
|
||||
public :: norda, order_poly_en ! order of the e-n polynmial in Jastrow4
|
||||
public :: nordb, order_poly_ee ! order of the e-e polynmial in Jastrow4
|
||||
public :: nordc, order_poly_een ! order of the e-e-n polynmial in Jastrow4
|
||||
public :: nspin1
|
||||
|
||||
public :: cjas1 ! simple jastrow1 (0.5 to satisfy cusps, parallel-spins automatically take half this value)
|
||||
public :: cjas2 ! simple jastrow1 parameter
|
||||
public :: scalek, scaling_jastrow ! scale factor for Jastrow
|
||||
public :: a1,a2 ! Jastrow parameters for Jastrow2
|
||||
public :: a,b,c ! Jastrow parameters for Jastrow3
|
||||
public :: a4 ! Jastrow parameters for Jastrow4,5,6
|
||||
public :: cutjas, cutoff_jastrow ! cutoff for Jastrow4,5,6 if cutjas=6,7
|
||||
public :: itau_eff, itau_effective
|
||||
|
||||
public :: optimize_wave
|
||||
public :: optimize_ci
|
||||
|
||||
public :: ncore
|
||||
public :: nextorb
|
||||
public :: nopt_iter
|
||||
public :: no_active
|
||||
public :: nblk_max
|
||||
|
||||
public :: sr_tau
|
||||
public :: sr_eps
|
||||
public :: sr_adiag
|
||||
|
||||
public :: energy_tol
|
||||
public :: opt_method
|
||||
public :: multiple_adiag
|
||||
|
||||
public :: excess_charge
|
||||
public :: multiplicity
|
||||
|
||||
! Gaussian ECP pseudopotential keywords
|
||||
public :: necp_term
|
||||
public :: necp_power
|
||||
public :: ecp_coef
|
||||
public :: ecp_exponent
|
||||
|
||||
! Following not yet added
|
||||
! rlobx(y) Lobachevsky parameters for Fock expansion
|
||||
! ipq,iacc_rej,icross,icuspg,idiv_v
|
||||
|
||||
private :: sp, dp
|
||||
|
||||
@ -159,90 +77,12 @@ MODULE keywords
|
||||
character(len=132) :: path_pool
|
||||
character(len=132) :: file_input, file_output
|
||||
character(len=132) :: file_basis
|
||||
character(len=132) :: file_pseudo
|
||||
character(len=132) :: file_molecule
|
||||
character(len=132) :: file_orbitals
|
||||
character(len=132) :: file_determinants
|
||||
character(len=132) :: file_jastrow
|
||||
character(len=132) :: file_jastrow_deriv
|
||||
|
||||
integer, target :: irn
|
||||
integer, pointer :: rand_seed => irn
|
||||
|
||||
integer, target :: ijas
|
||||
integer, pointer :: form_jastrow => ijas
|
||||
|
||||
integer, target :: isc
|
||||
integer, pointer :: form_jastrow_scaling => isc
|
||||
|
||||
integer, target :: iperiodic
|
||||
integer, pointer :: periodic => iperiodic
|
||||
|
||||
integer, target :: ibasis
|
||||
integer, pointer :: form_basis => ibasis
|
||||
|
||||
real(dp), target :: hb
|
||||
real(dp), pointer :: hbar => hb
|
||||
|
||||
real(dp), target :: etrial
|
||||
real(dp), pointer :: energy_trial => etrial
|
||||
|
||||
integer, target :: eunit
|
||||
integer, pointer :: energy_unit => eunit
|
||||
|
||||
integer, target :: nstep
|
||||
integer, pointer :: nsteps => nstep
|
||||
|
||||
integer, target :: nblk
|
||||
integer, pointer :: nblocks => nblk
|
||||
|
||||
integer, target :: nblkeq
|
||||
integer, pointer :: nequil_blocks => nblkeq
|
||||
|
||||
integer, target :: nconf
|
||||
integer, pointer :: nconfigs => nconf
|
||||
|
||||
integer, target :: nconf_new
|
||||
integer, pointer :: nconfigs_new => nconf_new
|
||||
|
||||
integer, target :: idump
|
||||
integer, pointer :: unit_restart_dump => idump
|
||||
|
||||
integer, target :: irstar
|
||||
integer, pointer :: restart => irstar
|
||||
|
||||
integer, target :: isite
|
||||
integer, pointer :: generate_config => isite
|
||||
|
||||
integer, target :: ipr
|
||||
integer, pointer :: print_level => ipr
|
||||
|
||||
integer, target :: imetro
|
||||
integer, pointer :: form_metropolis => imetro
|
||||
|
||||
integer, target :: delta
|
||||
integer, pointer :: step_size => delta
|
||||
|
||||
integer, target :: deltar
|
||||
integer, pointer :: step_size_radial => deltar
|
||||
|
||||
integer, target :: deltat
|
||||
integer, pointer :: step_size_angular => deltat
|
||||
|
||||
integer, target :: fbias
|
||||
integer, pointer :: force_bias => fbias
|
||||
|
||||
integer, target :: idmc
|
||||
integer, pointer :: form_dmc => idmc
|
||||
|
||||
integer :: nfprod
|
||||
real(sp) :: tau
|
||||
|
||||
integer, target :: nloc
|
||||
integer, pointer :: pseudo_format => nloc
|
||||
|
||||
integer, target :: nquad
|
||||
integer, pointer :: nquadrature => nquad
|
||||
|
||||
integer :: nelec
|
||||
|
||||
@ -261,59 +101,14 @@ MODULE keywords
|
||||
integer :: iwctype
|
||||
integer, allocatable :: iworbd(:,:) ! to store orbital mapping in determinants
|
||||
|
||||
integer, target :: znuc
|
||||
integer, pointer :: znuclear => znuc, atomic_number => znuc
|
||||
|
||||
real(dp), allocatable :: cent(:,:)
|
||||
! real(dp), pointer :: atom_coords => cent !! this might have issues in performance
|
||||
|
||||
integer, target :: ndet
|
||||
integer, pointer :: ndeterminants => ndet
|
||||
|
||||
|
||||
integer :: nbasis
|
||||
|
||||
integer, target :: norb
|
||||
integer, pointer :: norbitals => norb
|
||||
|
||||
real(dp), allocatable :: cdet(:)
|
||||
! integer, pointer :: det_coeffs => cdet ! issues in performance
|
||||
|
||||
|
||||
integer, target :: ianalyt_lap
|
||||
integer, pointer :: analytic_laplacian => ianalyt_lap
|
||||
|
||||
integer :: nspin1, nspin2 , ifock
|
||||
|
||||
integer, target :: nord
|
||||
integer, pointer :: order_poly => nord
|
||||
|
||||
integer, target :: norda
|
||||
integer, pointer :: order_poly_en => norda
|
||||
|
||||
integer, target :: nordb
|
||||
integer, pointer :: order_poly_ee => nordb
|
||||
|
||||
integer, target :: nordc
|
||||
integer, pointer :: order_poly_een => nordc
|
||||
|
||||
integer, target :: scalek
|
||||
integer, pointer :: scaling_jastrow => scalek
|
||||
|
||||
integer :: cjas1
|
||||
integer :: cjas2
|
||||
|
||||
real(dp) :: a1,a2
|
||||
real(dp) :: a,b,c
|
||||
real(dp) :: a4
|
||||
|
||||
|
||||
real(dp), target :: cutjas
|
||||
real(dp), pointer :: cutoff_jastrow => cutjas
|
||||
|
||||
real(dp), target :: itau_eff
|
||||
real(dp), pointer :: itau_effective => itau_eff
|
||||
|
||||
integer :: nspin1
|
||||
|
||||
logical :: optimize_wave
|
||||
logical :: optimize_ci
|
||||
@ -321,28 +116,11 @@ MODULE keywords
|
||||
|
||||
integer :: ncore
|
||||
integer :: nextorb
|
||||
integer :: nopt_iter
|
||||
integer :: no_active
|
||||
integer :: nblk_max
|
||||
|
||||
real(dp) :: sr_tau
|
||||
real(dp) :: sr_tau, tau
|
||||
real(dp) :: sr_eps
|
||||
real(dp) :: sr_adiag
|
||||
real(dp) :: energy_tol
|
||||
|
||||
character(len=20) :: opt_method
|
||||
|
||||
|
||||
integer :: multiplicity
|
||||
integer :: excess_charge
|
||||
|
||||
! Gaussian ECP pseudopotential keywords
|
||||
integer, allocatable :: necp_term(:,:)
|
||||
integer, allocatable :: necp_power(:,:,:)
|
||||
real(dp), allocatable :: ecp_coef(:,:,:)
|
||||
real(dp), allocatable :: ecp_exponent(:,:,:)
|
||||
|
||||
|
||||
|
||||
|
||||
end module
|
@ -1,97 +0,0 @@
|
||||
title "A Sample QMC input file parsed by libfdf interfaced to CHAMP"
|
||||
|
||||
pool ./pool
|
||||
pseudopot BFD
|
||||
basis BFD-T-normf0
|
||||
|
||||
# %include global.fdf
|
||||
|
||||
%block molecule < caffeine.xyz
|
||||
|
||||
|
||||
optimize_wavefunction 1
|
||||
optimize_ci = false
|
||||
optimize_jastrow yes
|
||||
optimize_orbitals true
|
||||
|
||||
|
||||
sr_tau 0.025
|
||||
sr_eps 0.001
|
||||
sr_adiag 0.01
|
||||
energy_tol 1.0E-5
|
||||
|
||||
|
||||
ncore 0 no_active 0
|
||||
nextorb 280 ; nblk_max 200
|
||||
nopt_iter 2
|
||||
|
||||
opt_method sr_n
|
||||
multiple_adiag no
|
||||
|
||||
|
||||
|
||||
# Initial spaces, in-between tabs do not matter
|
||||
max_iteration 2147483647 # Max allowed int
|
||||
Energy_Cutoff 500.0 eV
|
||||
float_value 3.14e10
|
||||
filename 'sample read input.txt'
|
||||
|
||||
|
||||
|
||||
# An alternative way to provide coordinates
|
||||
|
||||
%block Coordinates
|
||||
C 0.00000 1.40272 0 # can have comments in between or after the data
|
||||
H 0.00000 2.49029 0
|
||||
C -1.21479 0.70136 0
|
||||
H -2.15666 1.24515 0
|
||||
C -1.21479 -0.70136 0
|
||||
H -2.15666 -1.24515 0
|
||||
C 0.00000 -1.40272 0
|
||||
H 0.00000 -2.49029 0
|
||||
C 1.21479 -0.70136 0
|
||||
H 2.15666 -1.24515 0
|
||||
C 1.21479 0.70136 0
|
||||
H 2.15666 1.24515 0
|
||||
%endblock
|
||||
|
||||
%block inline_xyz
|
||||
3
|
||||
sample comment
|
||||
O 4.013 0.831 -9.083
|
||||
H 4.941 0.844 -8.837
|
||||
H 3.750 -0.068 -9.293
|
||||
%endblock inline_xyz
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Two blocks with the same name not supported. Ignored without warning
|
||||
|
||||
%block molecule2 < benzene.xyz %dump
|
||||
|
||||
|
||||
|
||||
## To include another file having fdf syntax
|
||||
|
||||
%include temp.fdf
|
||||
|
||||
|
||||
|
||||
## Lists
|
||||
|
||||
%block ListBlock
|
||||
list_integers [1 to 6 7 9 10 ] [ 1 to 7 8 9 11 12 ]
|
||||
%endblock ListBlock
|
||||
|
||||
|
||||
list_floats [ 0.94725807 -0.09274559 -0.05238276 -0.05238264 -0.04867531 -0.04162750 -0.04054186 -0.04017050 -0.04017045 -0.02963522 ]
|
||||
|
||||
|
||||
### Read determinants directly from the .det file
|
||||
|
||||
#%block determinants < TZ_1M_500.det # sample.det
|
||||
|
||||
%block determinants < sample.det
|
@ -1,46 +0,0 @@
|
||||
title A Sample QMC input file parsed by libfdf interfaced to CHAMP
|
||||
pool ./pool
|
||||
basis BFD-T-normf0.bas
|
||||
determinants TZ_1M_500.det
|
||||
optimize_wavefunction T
|
||||
ncore 0
|
||||
sr_eps 0.1000000000E-02
|
||||
Debug T # default value
|
||||
sr_tau 0.2500000000E-01
|
||||
nspin1 1 # default value
|
||||
energy_tol 0.1000000000E-04
|
||||
opt_method sr_n
|
||||
multiple_adiag F
|
||||
tau 0.3999999911E-01
|
||||
etrial -408.1744362 eV
|
||||
# above item originally: etrial -15.00000000 Ha
|
||||
%block molecule
|
||||
%block molecule
|
||||
24
|
||||
molecule 1,3,7-Trimethylpurine-2,6-dione
|
||||
N 1.5808 0.7027 -0.2279
|
||||
C 1.7062 -0.7374 -0.2126
|
||||
N 0.5340 -1.5671 -0.3503
|
||||
C 0.3231 1.3600 0.0274
|
||||
C -0.8123 0.4553 0.0817
|
||||
C -0.6967 -0.9322 -0.0662
|
||||
N -2.1886 0.6990 0.2783
|
||||
C -2.8512 -0.5205 0.2532
|
||||
N -1.9537 -1.5188 0.0426
|
||||
C 0.6568 -3.0274 -0.1675
|
||||
O 2.8136 -1.2558 -0.1693
|
||||
O 0.2849 2.5744 0.1591
|
||||
C -2.8096 2.0031 0.5032
|
||||
C 2.8301 1.5004 -0.1968
|
||||
H -3.9271 -0.6787 0.3762
|
||||
H 1.4823 -3.4046 -0.7865
|
||||
H -0.2708 -3.5204 -0.4868
|
||||
H 0.8567 -3.2990 0.8788
|
||||
H -2.4123 2.7478 -0.2017
|
||||
H -2.6042 2.3621 1.5221
|
||||
H -3.8973 1.9344 0.3695
|
||||
H 3.5959 1.0333 -0.8314
|
||||
H 3.2249 1.5791 0.8255
|
||||
H 2.6431 2.5130 -0.5793
|
||||
%endblock molecule
|
||||
#:defined? determinants T
|
Loading…
Reference in New Issue
Block a user