fortran语言,读不懂啊,请高人指点迷津,或是参看书籍,最好有电子版的,会的朋友可以下面交谈,另有谢!
!Crystal:Asimpleprogramtogeneratefcccoordinatesandwritethem!inacoordinatefile.Thisfil...
! Crystal: A simple program to generate fcc coordinates and write them
! in a coordinate file. This file can be read by the companion MD programs
! (and also by the BallRoom plotting program for visualization) and
! provides a starting point for a simulation.
! Crystal is meant to be an interactive program: prompts for the input
! parameters are provided, as well as some suggestions for the two
! materials simulated by the example MD programs (Lennard-Jonesium and
! Aluminum).
!
! Furio Ercolessi, SISSA, Trieste, May 1995, revised May 1997
program Crystal
implicit none
character*80 :: FileName
double precision :: alat,displac
integer :: nx,ny,nz
call Read_Parameters(FileName,alat,nx,ny,nz,displac)
call Generate_Crystal(FileName(1:len_trim(FileName)), &
alat,nx,ny,nz,displac)
end program Crystal
subroutine Read_Parameters(FileName,alat,nx,ny,nz,displac)
!
! Obtain all parameters from user
!
implicit none
integer, parameter :: crtout = 6
character*(*) :: FileName
double precision :: alat,displac
integer :: nx,ny,nz
logical :: AlreadyThere
double precision, parameter :: cutoffLJ = 2.5d0
double precision, parameter :: cutoffAl = 5.55805441821810d0 展开
! in a coordinate file. This file can be read by the companion MD programs
! (and also by the BallRoom plotting program for visualization) and
! provides a starting point for a simulation.
! Crystal is meant to be an interactive program: prompts for the input
! parameters are provided, as well as some suggestions for the two
! materials simulated by the example MD programs (Lennard-Jonesium and
! Aluminum).
!
! Furio Ercolessi, SISSA, Trieste, May 1995, revised May 1997
program Crystal
implicit none
character*80 :: FileName
double precision :: alat,displac
integer :: nx,ny,nz
call Read_Parameters(FileName,alat,nx,ny,nz,displac)
call Generate_Crystal(FileName(1:len_trim(FileName)), &
alat,nx,ny,nz,displac)
end program Crystal
subroutine Read_Parameters(FileName,alat,nx,ny,nz,displac)
!
! Obtain all parameters from user
!
implicit none
integer, parameter :: crtout = 6
character*(*) :: FileName
double precision :: alat,displac
integer :: nx,ny,nz
logical :: AlreadyThere
double precision, parameter :: cutoffLJ = 2.5d0
double precision, parameter :: cutoffAl = 5.55805441821810d0 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询