108
6 Ratchet Dimer Brownian Motor with Hydrodynamic Interactions
c ** *************** **
c ** ** warning ** **
c ** *************** **
c ** **
c ** good random number generators are machine specific. **
c ** please use the one recommended for your machine. **
c ***************************************************************
integer l, c, m
parameter ( l = 1029, c = 221591, m = 1048576 )
integer seed
real dummy
save seed
data seed / 0 /
c ***************************************************************
seed = mod ( seed * l + c, m )
ranf = real ( seed ) / m
end
real function gauss ( dummy )
c ***************************************************************
c ** function gauss returns a uniform random normal variate from **
c ** a distribution with zero mean and unit variance. **
c ** **
c ** reference: **
c ** knuth d, the art of computer programming, (2nd edition **
c ** addison-wesley), 1978. **
c ***************************************************************
real a1, a3, a5, a7, a9
parameter ( a1 = 3.949846138, a3 = 0.252408784 )
parameter ( a5 = 0.076542912, a7 = 0.008355968 )
parameter ( a9 = 0.029899776 )
real sum, r, r2
integer i
c ***************************************************************
sum = 0.0
do 10 i = 1, 12
sum = sum + ranf ( dummy )
10 continue
r = ( sum - 6.0 ) / 4.0
r2 = r * r
gauss = (((( a9 * r2 + a7 ) * r2 + a5 ) * r2 + a3 ) * r2 + a1 )
* * r
end
subroutine setup(cnfile,itape)
common / block1 / rx, ry, rz
integer i, n
6 Ratchet Dimer Brownian Motor with Hydrodynamic Interactions
c ** *************** **
c ** ** warning ** **
c ** *************** **
c ** **
c ** good random number generators are machine specific. **
c ** please use the one recommended for your machine. **
c ***************************************************************
integer l, c, m
parameter ( l = 1029, c = 221591, m = 1048576 )
integer seed
real dummy
save seed
data seed / 0 /
c ***************************************************************
seed = mod ( seed * l + c, m )
ranf = real ( seed ) / m
end
real function gauss ( dummy )
c ***************************************************************
c ** function gauss returns a uniform random normal variate from **
c ** a distribution with zero mean and unit variance. **
c ** **
c ** reference: **
c ** knuth d, the art of computer programming, (2nd edition **
c ** addison-wesley), 1978. **
c ***************************************************************
real a1, a3, a5, a7, a9
parameter ( a1 = 3.949846138, a3 = 0.252408784 )
parameter ( a5 = 0.076542912, a7 = 0.008355968 )
parameter ( a9 = 0.029899776 )
real sum, r, r2
integer i
c ***************************************************************
sum = 0.0
do 10 i = 1, 12
sum = sum + ranf ( dummy )
10 continue
r = ( sum - 6.0 ) / 4.0
r2 = r * r
gauss = (((( a9 * r2 + a7 ) * r2 + a5 ) * r2 + a3 ) * r2 + a1 )
* * r
end
subroutine setup(cnfile,itape)
common / block1 / rx, ry, rz
integer i, n
