1
0
mirror of https://github.com/TREX-CoE/fparser.git synced 2024-11-03 20:54:11 +01:00

explicit data read from the block

This commit is contained in:
Ravindra Shinde 2021-03-08 10:29:30 +01:00
parent b69b89d558
commit 9e5e51d3df
3 changed files with 54 additions and 75 deletions

View File

@ -212,7 +212,7 @@ PROGRAM iochamp
if (.not. fdf_block('molecule', bfdf)) then if (.not. fdf_block('molecule', bfdf)) then
! External file reading ! External file reading
write(6,*) 'Reading coordinates of the moleculle from an external file' write(6,*) 'Reading coordinates of the molecule from an external file'
ia = 1 ia = 1
open (unit=12,file=file_molecule, iostat=iostat, action='read' ) open (unit=12,file=file_molecule, iostat=iostat, action='read' )
@ -227,17 +227,14 @@ PROGRAM iochamp
read(12,*) symbol(i), cent(1,i), cent(2,i), cent(3,i) read(12,*) symbol(i), cent(1,i), cent(2,i), cent(3,i)
enddo enddo
close(12) close(12)
endif
write(6,*) 'Coordinates from Molecule load construct: ' write(6,*) 'Coordinates from Molecule load construct: '
do ia= 1, natoms do ia= 1, natoms
write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3) write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3)
enddo enddo
endif
write(6,'(A)') write(6,'(A)')
write(6,*) '------------------------------------------------------' write(6,*) '------------------------------------------------------'
@ -266,20 +263,19 @@ PROGRAM iochamp
ia = ia + 1 ia = ia + 1
endif endif
enddo enddo
endif
write(6,*) 'Coordinates from Molecule block: ' write(6,*) 'Coordinates from single line Molecule block: '
do ia= 1, natoms do ia= 1, natoms
write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3) write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3)
enddo enddo
endif
write(6,'(A)') write(6,'(A)')
write(6,*) '------------------------------------------------------' write(6,*) '------------------------------------------------------'
! Molecule coordinate block begins here ! Molecule coordinate block begins here for demonstration
if (fdf_block('Coordinates', bfdf)) then if (fdf_block('Coordinates', bfdf)) then
ia = 1 ia = 1
@ -290,18 +286,12 @@ PROGRAM iochamp
enddo enddo
ia = ia + 1 ia = ia + 1
enddo enddo
na = ia - 1 write(6,*) 'Coordinates from explicit data block:'
do j = 1, ia
endif write(6,'(A, 4x, 3F10.6)') symbol(j), (xa(i,j),i=1,3)
if (fdf_block('Coordinates', bfdf)) then
write(6,*) 'Coordinates:'
do ia = 1, na
write(6,'(A, 4x, 3F10.6)') symbol(ia), (xa(i,ia),i=1,3)
enddo enddo
endif endif
write(6,*) '------------------------------------------------------' write(6,*) '------------------------------------------------------'
@ -353,12 +343,12 @@ PROGRAM iochamp
endif endif
if (fdf_block('Coordinates', bfdf)) then ! if (fdf_block('Coordinates', bfdf)) then
write(6,*) 'Coordinates:' ! write(6,*) 'Coordinates:'
do ia = 1, na ! do ia = 1, na
write(6,'(A, 4x, 3F10.6)') symbol(ia), (xa(i,ia),i=1,3) ! write(6,'(A, 4x, 3F10.6)') symbol(ia), (xa(i,ia),i=1,3)
enddo ! enddo
endif ! endif
write(6,*) '------------------------------------------------------' write(6,*) '------------------------------------------------------'

View File

@ -12,17 +12,23 @@ load basis BFD-T-normf0.bas
load determinants TZ_1M_500.det load determinants TZ_1M_500.det
%block molecule < caffeine.xyz #%block molecule < caffeine.xyz
#%block determinants
#%end block
%block Coordinates
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
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
%module optimization %module optimization
@ -31,13 +37,11 @@ load determinants TZ_1M_500.det
optimize_jastrow yes optimize_jastrow yes
optimize_orbitals true optimize_orbitals true
sr_tau 0.025 sr_tau 0.025
sr_eps 0.001 sr_eps 0.001
sr_adiag 0.01 sr_adiag 0.01
energy_tol 1.0E-5 energy_tol 1.0E-5
ncore 0 no_active 0 ncore 0 no_active 0
nextorb 280 ; nblk_max 200 nextorb 280 ; nblk_max 200
nopt_iter 2 nopt_iter 2

View File

@ -32,33 +32,18 @@ etrial -408.1744362 eV
# above item originally: etrial -15.00000000 Ha # above item originally: etrial -15.00000000 Ha
excess_charge 0 # default value excess_charge 0 # default value
multiplicity 1 # default value multiplicity 1 # default value
%block molecule %block Coordinates
%block molecule C 0.00000 1.40272 0
24 H 0.00000 2.49029 0
molecule 1,3,7-Trimethylpurine-2,6-dione C -1.21479 0.70136 0
N 1.5808 0.7027 -0.2279 H -2.15666 1.24515 0
C 1.7062 -0.7374 -0.2126 C -1.21479 -0.70136 0
N 0.5340 -1.5671 -0.3503 H -2.15666 -1.24515 0
C 0.3231 1.3600 0.0274 C 0.00000 -1.40272 0
C -0.8123 0.4553 0.0817 H 0.00000 -2.49029 0
C -0.6967 -0.9322 -0.0662 C 1.21479 -0.70136 0
N -2.1886 0.6990 0.2783 H 2.15666 -1.24515 0
C -2.8512 -0.5205 0.2532 C 1.21479 0.70136 0
N -1.9537 -1.5188 0.0426 H 2.15666 1.24515 0
C 0.6568 -3.0274 -0.1675 %endblock Coordinates
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 #:defined? determinants T