亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? displace.f90

?? 蒙特卡羅的一個程序分析 與大家分享 共同研究
?? F90
?? 第 1 頁 / 共 2 頁
字號:

subroutine Disp_Rot( MaxSp, Nmol, Nlj, Nion, &
					 Xlj, Ylj, Zlj, TYPElj, DAMPlj2, DAMPlj3, &
					 Xion, Yion, Zion, TYPEion, DAMPion, &
					 BoxSize, DXYZ, DROT, &
					 LENGTHlj, LENGTHion, SPECIES, STARTlj, STARTion, &
					 PROB_TR, PROB_SP, Nham, BETA, LNW, LNPSI, LnPi, &
					 Nljgrs, EPS, SIG, CP, ALP, RMAX, MASSlj, Niongrs, &
					 CHARGE, MASSion, Alpha, Kmax, Nkvec, KX, KY, KZ, &
					 CONST, EXPX, EXPY, EXPZ, SUMQEXPV, &
					 SUMQX, SUMQY, SUMQZ, ULJ, UFOURIER, UREAL, USURF, &
					 DispOrRot, SpeciesID, Success, Seed )

implicit none

! Nmol is the number of molecules in the simulation box.
! MaxSp is the maximum number of species in the system.
! Nlj is the number of LJ beads in the simulation box.
! Nion is the number of ionic beads in the simulation box.

integer, intent(in)									:: MaxSp
integer, dimension(0:MaxSp), intent(in)				:: Nmol
integer, intent(in)									:: Nlj
integer, intent(in)									:: Nion

! Xlj, Ylj, and Zlj are the coordinates of the LJ beads.
! Xion, Yion, and Zion are the coordinates of the ionic beads.

real, dimension(Nlj), intent(inout)					:: Xlj, Ylj, Zlj
real, dimension(Nion), intent(inout)				:: Xion, Yion, Zion

! TYPElj contains the group identity of each LJ bead.
! TYPEion contains the group identity of each ionic bead.

integer, dimension(Nlj), intent(in)					:: TYPElj
integer, dimension(Nion), intent(in)				:: TYPEion

real, dimension(Nlj), intent(inout)					:: DAMPlj2, DAMPlj3
real, dimension(Nion), intent(inout)				:: DAMPion

! BoxSize is the length of the simulation box.

real, intent(in)									:: BoxSize

! DXYZ is the maximum displacement for each species.
! DROT is the maximum rotation for each species.

real, dimension(MaxSp), intent(in)					:: DXYZ, DROT

! LENGTHlj contains the number of LJ beads in each molecule.
! LENGTHion	contains the number of ionic beads in each molecule.
! SPECIES contains the species identity of each molecule.
! STARTlj contains the starting LJ bead number for each molecule.
! STARTion contains the starting ionic bead number for each molecule.

integer, dimension(Nmol(0)), intent(in)				:: LENGTHlj, LENGTHion
integer, dimension(Nmol(0)), intent(in)				:: SPECIES
integer, dimension(Nmol(0)), intent(in)				:: STARTlj, STARTion

! PROB_TR contains the accumulative probability of translation or rotation.
! PROB_SP contains the accumulative probability of selecting a given species.

real, dimension(2), intent(in)						:: PROB_TR
real, dimension(MaxSp), intent(in)					:: PROB_SP

! Nham is the number of hamiltonians being used.

integer, intent(in)									:: Nham

! beta contains the reciprical temperature.

real, dimension(Nham), intent(in)					:: BETA

! LNW contains the weight of each hamiltonian.

real, dimension(Nham), intent(in)					:: LNW

! LNPSI contains the log(psi) for each hamiltonian.

real, dimension(Nham), intent(inout)				:: LNPSI

! LnPi contains the log(pi).

real, intent(inout)									:: LnPi

! Nljgrs is the number of LJ groups in the system.
! EPS is a rank 3 array containing the eps_ij parameters for each hamiltonian.
! SIG is a rank 3 array containing the sigma_ij parameters for each hamiltonian.
! CP is a rank 3 array containing the C_ij parameters for each hamiltonian.
! ALP is a rank 3 array containing the alpha_ij parameters for each hamiltonian.
! RMAX is a rank 3 array containing the Rmax_ij parameters for each hamiltonian.
									
integer, intent(in)									:: Nljgrs
real, dimension(Nljgrs, Nljgrs, Nham), intent(in)	:: EPS, SIG, CP, ALP, RMAX

! MASSlj contains the mass of the LJ groups.

real, dimension(Nljgrs), intent(in)					:: MASSlj

! Niongrs is the number of ionic groups in the system.
! CHARGE is a rank 2 array containing the charge of group i for each hamiltonian.
									
integer, intent(in)									:: Niongrs
real, dimension(Niongrs, Nham), intent(in)			:: CHARGE

! MASSion contains the mass of the ionic groups.

real, dimension(Niongrs), intent(in)				:: MASSion

! Alpha is an Ewald sum parameter, Alpha = kappa * L, for kappa in A + T.

real, intent(in)									:: Alpha

! Kmax is an Ewald sum parameter.
! Nkvec is the number of k-vectors used in the Fourier sum.
! KX, KY, KZ contain the vector identity of the Nkvec vectors.
! CONST contains the constant part of the Fourier summation for a given Nkvec.

integer, intent(in)									:: Kmax
integer, intent(in)									:: Nkvec
integer, dimension(Nkvec), intent(in)				:: KX, KY, KZ
real, dimension(Nkvec), intent(in)					:: CONST

! EXPX contains the value of exp( i*kx*x ) for a given kx and ion.

complex, dimension(0:Kmax, Nion), intent(inout)		:: EXPX
complex, dimension(-Kmax:Kmax, Nion), intent(inout)	:: EXPY, EXPZ

! SUMQEXPV contains the summation of qi*exp(i*(kx*x + ky*y + kz*z)) 
! for a given k-vector and hamiltonian.

complex, dimension(Nkvec, Nham), intent(inout)	 	:: SUMQEXPV

! SUMQX is the summation of qi * xi for all ions in the box.

real, dimension(Nham), intent(inout)				:: SUMQX, SUMQY, SUMQZ

! ULJ is the LJ energy of the system without the long range correction.
! UFOURIER is the coulombic fourier energy of the system.
! UREAL is the coulombic real energy of the system.
! USURF is the coulombic surface energy of the system.

real, dimension(Nham), intent(inout)				:: ULJ, UFOURIER
real, dimension(Nham), intent(inout)				:: UREAL, USURF

! DispOrRot is a flag to indicate whether a displacement or rotation was attempted.
! DispOrRot = 1 for Displacement.
! DispOrRot = 2 for Rotation.

integer, intent(out)								:: DispOrRot

! SpeciesID gives the identity of the species that was displaced or rotated.

integer, intent(out)								:: SpeciesID

! Success is a logical indicating whether the move was successful or not.

logical, intent(out)								:: Success

! Seed is the current random number generator seed value.

integer, intent(inout)								:: Seed 

real, external										:: ran2

! Local Variables.

integer												:: Mol, MolSpecies
integer												:: i, Count
integer												:: axis
integer												:: lenlj, stlj, endlj
integer												:: lenion, stion, endion
integer, dimension( Nlj )							:: temp4
integer, dimension( Nion )							:: temp8
integer, dimension( Nlj + Nion )					:: temp12

real												:: r, CoulCombo
real												:: Largest, LnPi_new
real												:: dx, dy, dz, dtheta
real												:: xcom, ycom, zcom

real, allocatable, dimension( : )					:: Xlj_old, Ylj_old, Zlj_old
real, allocatable, dimension( : )					:: Xlj_new, Ylj_new, Zlj_new
real, dimension( Nlj )								:: temp1, temp2, temp3
real, dimension( Nion )								:: temp5, temp6, temp7
real, dimension( Nlj + Nion )						:: temp9, temp10, temp11
real, dimension( Nljgrs + Niongrs )					:: temp13
real, dimension( Nlj )								:: temp20, temp21
real, dimension( Nion )								:: temp22
real, dimension(2,2)								:: M
real, dimension(2)									:: T
real, dimension(Nham)								:: LNPSI_new
real, dimension(Nham)								:: ULJ_old, ULJ_new, dULJ
real, dimension(Nham)								:: UREAL_old, UREAL_new, dUREAL
real, dimension(Nham)								:: SUMQX_NEW, SUMQY_NEW, SUMQZ_NEW
real, dimension(Nham)								:: dUSURF
real, dimension(Nham)								:: dUFOURIER
real, dimension(Nham)								:: dU
real, allocatable, dimension( : )					:: Xion_new, Yion_new, Zion_new
real, allocatable, dimension( : )					:: Xion_old, Yion_old, Zion_old
real, allocatable, dimension( : )					:: DELTAX, DELTAY, DELTAZ

real, parameter										:: Pi = 3.14159265359
real, parameter										:: ec = 1.60217733e-19
real, parameter										:: eps0 = 8.854187817e-12
real, parameter										:: kB = 1.380658e-23

complex, allocatable, dimension( : , : )			:: EXPX_NEW
complex, allocatable, dimension( : , : )			:: EXPY_NEW, EXPZ_NEW
complex, dimension(Nkvec, Nham)					 	:: SUMQEXPV_NEW


Success = .False.

DispOrRot = 1

SpeciesID = 1

if( Nmol(0) == 0 ) return

r = ran2(Seed)
SpeciesID = 0
i = 1

do while ( SpeciesID == 0 )

	if( r < PROB_SP(i) ) SpeciesID = i

	i = i + 1

end do


MolSpecies = int( Nmol( SpeciesID ) * ran2(Seed) ) + 1

i = 0
Count = 0

do while ( Count < MolSpecies )
	
	i = i + 1
	
	if( SPECIES(i) == SpeciesID ) Count = Count + 1

end do

Mol = i

lenlj = LENGTHlj( Mol )
stlj = STARTlj( Mol )
endlj = stlj + lenlj - 1

lenion = LENGTHion( Mol )
stion = STARTion( Mol )
endion = stion + lenion - 1

allocate( Xlj_old(lenlj) )
allocate( Ylj_old(lenlj) )
allocate( Zlj_old(lenlj) )

allocate( Xlj_new(lenlj) )
allocate( Ylj_new(lenlj) )
allocate( Zlj_new(lenlj) )

Xlj_old( 1:lenlj ) = Xlj( stlj:endlj )
Ylj_old( 1:lenlj ) = Ylj( stlj:endlj )
Zlj_old( 1:lenlj ) = Zlj( stlj:endlj )

if( lenion > 0 ) then

	allocate( Xion_old(lenion) )
	allocate( Yion_old(lenion) )
	allocate( Zion_old(lenion) )

	allocate( Xion_new(lenion) )
	allocate( Yion_new(lenion) )
	allocate( Zion_new(lenion) )

	allocate( DELTAX(lenion) )
	allocate( DELTAY(lenion) )
	allocate( DELTAZ(lenion) )

	allocate( EXPX_NEW(0:Kmax, lenion ) )
	allocate( EXPY_NEW(-Kmax:Kmax, lenion ) )
	allocate( EXPZ_NEW(-Kmax:Kmax, lenion ) )
	
	Xion_old( 1:lenion ) = Xion( stion:endion )
	Yion_old( 1:lenion ) = Yion( stion:endion )
	Zion_old( 1:lenion ) = Zion( stion:endion )

end if

if( stlj == 1 )	then

	if( Nmol(0) == 1 ) then
	
		ULJ_old	= 0.0

	else

		call e6molecule( lenlj, Xlj_old, Ylj_old, Zlj_old, &
						 TYPElj(1:lenlj), DAMPlj2(1:lenlj), &
						 DAMPlj3(1:lenlj), &
						 Nlj - lenlj, Xlj(endlj+1:Nlj), Ylj(endlj+1:Nlj), &
						 Zlj(endlj+1:Nlj), TYPElj(endlj+1:Nlj), &
						 DAMPlj2(endlj+1:Nlj), DAMPlj3(endlj+1:Nlj), &
						 Nham, Nljgrs, EPS, SIG, CP, ALP, RMAX, &
						 BoxSize, ULJ_old )

	end if

else if( stlj + lenlj - 1 == Nlj ) then

	call e6molecule( lenlj, Xlj_old, Ylj_old, Zlj_old, &
					 TYPElj(stlj:endlj), DAMPlj2(stlj:endlj), &
					 DAMPlj3(stlj:endlj), &
					 Nlj - lenlj, Xlj(1:stlj-1), Ylj(1:stlj-1), &
					 Zlj(1:stlj-1), TYPElj(1:stlj-1), &
					 DAMPlj2(1:stlj-1), DAMPlj3(1:stlj-1), &
					 Nham, Nljgrs, EPS, SIG, CP, ALP, RMAX, &
					 BoxSize, ULJ_old )
	
else

	temp1( 1:stlj-1 ) = Xlj( 1:stlj-1 )
	temp1( stlj:Nlj-lenlj ) = Xlj( endlj+1:Nlj )
	
	temp2( 1:stlj-1 ) = Ylj( 1:stlj-1)
	temp2( stlj:Nlj-lenlj ) = Ylj( endlj+1:Nlj)
	
	temp3( 1:stlj-1 ) = Zlj( 1:stlj-1)
	temp3( stlj:Nlj-lenlj ) = Zlj( endlj+1:Nlj)
	
	temp4( 1:stlj-1 ) = TYPElj( 1:stlj-1)
	temp4( stlj:Nlj-lenlj ) = TYPElj( endlj+1:Nlj)

	temp20( 1:stlj-1 ) = DAMPlj2( 1:stlj-1)
	temp20( stlj:Nlj-lenlj ) = DAMPlj2( endlj+1:Nlj)

	temp21( 1:stlj-1 ) = DAMPlj3( 1:stlj-1)
	temp21( stlj:Nlj-lenlj ) = DAMPlj3( endlj+1:Nlj)

	call e6molecule( lenlj, Xlj_old, Ylj_old, Zlj_old, &
					 TYPElj(stlj:endlj), DAMPlj2(stlj:endlj), &
					 DAMPlj3(stlj:endlj), &
					 Nlj - lenlj, temp1, temp2, temp3, temp4, &
					 temp20, temp21, &
					 Nham, Nljgrs, EPS, SIG, CP, ALP, RMAX, &
					 BoxSize, ULJ_old )

end if

if( ran2(Seed) < PROB_TR(1) ) then
	
	DispOrRot = 1

	dx = ( 2.0 * ran2(Seed) - 1.0 ) * DXYZ( SpeciesID ) * BoxSize
	dy = ( 2.0 * ran2(Seed) - 1.0 ) * DXYZ( SpeciesID ) * BoxSize
	dz = ( 2.0 * ran2(Seed) - 1.0 ) * DXYZ( SpeciesID ) * BoxSize

	Xlj_new = Xlj_old + dx
	Ylj_new = Ylj_old + dy
	Zlj_new = Zlj_old + dz

	if( lenion > 0 ) then

		Xion_new = Xion_old + dx
		Yion_new = Yion_old + dy
		Zion_new = Zion_old + dz
	
	end if

else 

	DispOrRot = 2

	call Outfold( lenlj, lenion, BoxSize, Xlj_old, Ylj_old, Zlj_old, &
				  Xion_old, Yion_old, Zion_old )

	if( lenion == 0 ) then

		call CenterOfMass( lenlj, Xlj_old, Ylj_old, Zlj_old,  &
						   TYPElj( stlj:endlj ), Nljgrs, MASSlj, & 
						   xcom, ycom, zcom )

	else

		temp9( 1:lenlj ) = Xlj_old( 1:lenlj )
		temp9( lenlj+1:lenlj+lenion ) = Xion_old( 1:lenion )
		
		temp10( 1:lenlj ) = Ylj_old( 1:lenlj )
		temp10( lenlj+1:lenlj+lenion ) = Yion_old( 1:lenion )
		
		temp11( 1:lenlj ) = Zlj_old( 1:lenlj )
		temp11( lenlj+1:lenlj+lenion ) = Zion_old( 1:lenion )
		
		temp12( 1:lenlj ) = TYPElj( stlj:endlj )	 
		temp12( lenlj+1:lenlj+lenion ) = TYPEion( 1:lenion ) + Nljgrs
		
		temp13( 1:Nljgrs ) = MASSlj( 1:Nljgrs )			
		temp13( Nljgrs+1:Nljgrs+Niongrs ) = MASSion( 1:Niongrs )

		call CenterOfMass( lenlj + lenion, temp9, temp10, temp11, temp12, &
						   Nljgrs + Niongrs, temp13, xcom, ycom, zcom )
	end if

	dtheta = ( 2.0 * ran2(Seed) - 1.0 ) * Pi * DROT( SpeciesID )

	M = reshape( (/ cos( dtheta ), -sin( dtheta ), sin( dtheta ), cos( dtheta ) /), &
			     (/ 2, 2 /) )

	axis = int( 3.0 * ran2(Seed) ) + 1

	
	Select Case ( axis )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美在线视频| 久久精品一区二区三区不卡牛牛| 91亚洲精品乱码久久久久久蜜桃 | 日韩国产欧美视频| 日韩福利视频导航| 成人黄色片在线观看| 国产成人免费xxxxxxxx| 91国偷自产一区二区三区观看| 宅男噜噜噜66一区二区66| 久久久综合网站| 亚洲综合无码一区二区| 国产综合色产在线精品| 91亚洲精华国产精华精华液| 欧美亚洲禁片免费| 久久综合色播五月| 亚洲一区二区在线观看视频| 美女脱光内衣内裤视频久久网站| 国产激情视频一区二区在线观看| 欧美视频中文字幕| 国产精品久久久久一区| 日韩福利视频导航| 欧美在线免费观看亚洲| 国产精品―色哟哟| 韩日精品视频一区| 欧美www视频| 日韩av一区二区三区四区| 欧美在线免费观看亚洲| 一区二区三区四区在线播放| 国产精品一级在线| 日韩一区二区三区电影在线观看 | 欧美丝袜丝交足nylons图片| 亚洲素人一区二区| 国产一区二区三区四区五区美女| 欧美另类变人与禽xxxxx| 中文字幕欧美一区| 成人久久视频在线观看| 国产日本欧洲亚洲| 成年人国产精品| 国产精品九色蝌蚪自拍| gogogo免费视频观看亚洲一| 中文在线一区二区| 色老头久久综合| 亚洲国产精品久久人人爱| 欧美日韩性生活| 久久精品国产在热久久| 精品免费视频一区二区| 国产在线精品一区二区夜色| 日本一区二区成人| 在线观看欧美精品| 亚洲午夜电影在线观看| 91精品国产91久久久久久一区二区 | 成人avav影音| 一区二区三区在线播放| 日韩欧美黄色影院| 色综合天天视频在线观看 | 欧美国产精品中文字幕| 色婷婷av一区二区三区软件| 蜜臀精品久久久久久蜜臀| 国产精品久久久久天堂| 欧美顶级少妇做爰| 91欧美一区二区| 蜜桃av一区二区在线观看| 777色狠狠一区二区三区| 成人激情免费网站| 一区二区三区鲁丝不卡| 欧美一区二区精品| 91在线观看免费视频| 奇米亚洲午夜久久精品| 国产精品成人午夜| 久久婷婷国产综合精品青草| 欧美性生活久久| 久久精品久久精品| 午夜久久久影院| ...av二区三区久久精品| 精品美女一区二区| 一本色道a无线码一区v| a4yy欧美一区二区三区| 国产精品一区二区你懂的| 亚洲一区欧美一区| 国产精品色呦呦| 久久精品视频网| 精品久久人人做人人爰| 日韩视频一区在线观看| 欧美日本一区二区三区| 91网站黄www| 99精品视频一区| www.亚洲色图| av午夜精品一区二区三区| 91免费国产在线观看| 成a人片国产精品| 成人激情综合网站| 91麻豆swag| 欧美日韩国产三级| 欧美一区二区精品在线| 亚洲国产精品成人久久综合一区| 久久精品视频一区二区三区| 国产精品系列在线| 国产欧美精品一区二区色综合| 欧美激情资源网| 亚洲一区日韩精品中文字幕| 亚洲欧洲国产日韩| 日本少妇一区二区| 国产福利不卡视频| 色国产精品一区在线观看| 欧美精品日韩精品| 久久综合狠狠综合| 亚洲欧美另类图片小说| 蜜臀av一区二区在线免费观看| 亚洲成人资源网| 国产精品资源网站| 欧美精品色一区二区三区| 久久婷婷色综合| 亚洲一区在线免费观看| 国产精品 欧美精品| 欧美图片一区二区三区| 久久影院电视剧免费观看| 欧美一区二区视频在线观看 | 丝袜美腿一区二区三区| 国产精品一区不卡| 欧美日本视频在线| 亚洲成人高清在线| 在线观看精品一区| 亚洲精品一区二区三区99| 午夜精品123| 在线视频亚洲一区| 亚洲曰韩产成在线| 色8久久精品久久久久久蜜 | 亚洲精品高清在线| 色婷婷香蕉在线一区二区| 中文字幕av一区二区三区免费看| 香蕉加勒比综合久久| 粉嫩久久99精品久久久久久夜| 日韩无一区二区| 三级久久三级久久久| 欧美老女人第四色| 天天综合日日夜夜精品| 欧洲国产伦久久久久久久| 午夜激情一区二区三区| 69p69国产精品| 男男gaygay亚洲| 国产校园另类小说区| 成人美女视频在线观看18| 亚洲一区二区四区蜜桃| 欧美日韩国产三级| 另类的小说在线视频另类成人小视频在线| 日本乱码高清不卡字幕| 日韩av网站在线观看| 欧美电影免费观看完整版| 毛片av一区二区| 国产精品高潮呻吟| 91精品国产高清一区二区三区| 美女一区二区视频| 精品国产乱子伦一区| 色综合中文综合网| 国产精品成人在线观看| 欧美三级视频在线播放| 麻豆成人免费电影| 久久亚洲精品小早川怜子| 精品国产91九色蝌蚪| 精品在线播放免费| 日韩专区中文字幕一区二区| 国产婷婷色一区二区三区四区 | 欧美中文字幕不卡| 成人精品视频一区二区三区尤物| 免费的成人av| 婷婷六月综合亚洲| 亚洲精品视频观看| 欧美国产一区二区| 欧美老肥妇做.爰bbww视频| 日本久久一区二区| 成人av在线一区二区三区| 激情欧美一区二区三区在线观看| 亚洲综合色噜噜狠狠| 亚洲视频一区在线| 亚洲午夜激情av| 一区二区三区高清| 亚洲精品免费看| 亚洲精品菠萝久久久久久久| 欧美一区二区啪啪| 精品国产露脸精彩对白 | 精品裸体舞一区二区三区| 精品久久久久久久久久久久包黑料| 色综合天天做天天爱| 成人免费毛片片v| www.日本不卡| 欧美日韩在线精品一区二区三区激情| 欧美喷水一区二区| 精品国产网站在线观看| 2022国产精品视频| 日本一区二区三区在线观看| 国产精品久久久久一区二区三区 | 日韩欧美在线观看一区二区三区| 欧美一区二区视频网站| 久久亚洲精华国产精华液 | 亚洲综合色丁香婷婷六月图片| 亚洲精品免费在线| 久久国产欧美日韩精品| 91伊人久久大香线蕉| 日韩你懂的在线观看| 国产精品九色蝌蚪自拍|