littleread.f90

来自「蒙特卡罗的一个程序分析 与大家分享 共同研究」· F90 代码 · 共 103 行

F90
103
字号

subroutine LittleRead( InputFile, Nljgrs, Niongrs, NSp, Nham, Nstages, Nres )

implicit none

! InputFile contains the parameters for the run.

character*30, intent(in)					:: InputFile


! Nljgrs is the number of Lennard-Jones groups in the simulation.
! Niongrs is the number of ionic groups in the simulation.
! Nsp is the number of species in the simulation.
! Nham is the number of hamiltonians.
! Nstages is the number of stages used to change hamiltonian weights.

integer, intent(out)						:: Nljgrs
integer, intent(out)						:: Niongrs
integer, intent(out)						:: NSp
integer, intent(out)						:: Nham
integer, intent(out)						:: Nstages
integer, intent(out)						:: Nres

! Local

integer										:: i


open( 20, file = InputFile )

read(20,*)
read(20,*) Nham 
read(20,*)
read(20,*) 
read(20,*)
read(20,*)
read(20,*)
read(20,*) 
read(20,*)
read(20,*)
read(20,*)
read(20,*) Nstages
read(20,*)
read(20,*) Nljgrs
read(20,*)

do i = 1, Nljgrs
	read(20,*)
end do

read(20,*)

do i = 1, Nljgrs * Nham
	read(20,*)
end do

do i = 1, Nham
	read(20,*)
	read(20,*)
	read(20,*)
	read(20,*)
	read(20,*)
	read(20,*)
	read(20,*)
end do

read(20,*)
read(20,*) Niongrs

if( Niongrs > 0 ) then

	read(20,*)

	do i = 1, Niongrs
		read(20,*)
	end do

	read(20,*)

	do i = 1, Niongrs * Nham
		read(20,*)
	end do

end if

read(20,*)
read(20,*) Nres
read(20,*)
read(20,*)
read(20,*)
read(20,*) NSp

close(20)

return

end subroutine LittleRead





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?