diff --git a/src/iochamp.f90 b/src/iochamp.f90 index 8c4d9ff..5b0ce9d 100644 --- a/src/iochamp.f90 +++ b/src/iochamp.f90 @@ -200,23 +200,24 @@ PROGRAM iochamp do while((fdf_bline(bfdf, pline))) if (pline%ntokens == 1) then - number_of_atoms = fdf_bintegers(pline, 1) - write(*,*) "number of atoms", number_of_atoms + natoms = fdf_bintegers(pline, 1) + write(*,*) "Number of atoms = ", natoms endif - na = number_of_atoms + + if (.not. allocated(cent)) allocate(cent(3,natoms)) if (pline%ntokens == 4) then symbol(ia) = fdf_bnames(pline, 1) do i= 1, 3 - xa(i,ia) = fdf_bvalues(pline, i) + cent(i,ia) = fdf_bvalues(pline, i) enddo ia = ia + 1 endif enddo endif write(6,*) 'Coordinates from Molecule block: External file' - do ia= 1, na - write(6,'(A4,3F10.6)') symbol(ia), (xa(i,ia),i=1,3) + do ia= 1, natoms + write(6,'(A4,3F10.6)') symbol(ia), (cent(i,ia),i=1,3) enddo diff --git a/src/test-champ.inp b/src/test-champ.inp index 987f46c..2d8e088 100644 --- a/src/test-champ.inp +++ b/src/test-champ.inp @@ -4,7 +4,7 @@ pool ./pool pseudopot BFD basis BFD-T-normf0 -# %include global.fdf +%include global.fdf %block molecule < caffeine.xyz %block determinants < sample.det diff --git a/src/test-champ.out b/src/test-champ.out index 458402e..0f00c30 100644 --- a/src/test-champ.out +++ b/src/test-champ.out @@ -22,7 +22,7 @@ energy_tol 0.1000000000E-04 opt_method sr_n multiple_adiag F Debug T # default value -ianalyt_lap 1 # default value +ianalyt_lap 1 nspin1 1 # default value nspin2 1 # default value ifock 1 # default value