c init_circular.f c *********************************************************************** c subroutine init_circular(n) c Given out an initial configuration: flat circle (Wr=0) c initialize x(i,j) as well as (f,v,u) implicit double precision(a-h,o-z) parameter(maxa=500,maxn=maxa*3,pi2=2.d0*3.1415926535d0) integer n common/matrix/x(maxa,3),bangle(maxa),rz(maxa) common/matrix2/ r(maxa,maxa) common/param/temp,bendc,r0,beadr,ss1,interval,dtime,gamma, +amass,am(maxn),coef,dtime2 common/bf_coords/f(maxa,3),v(maxa,3),u(maxa,3) common/tor_param/dr,cg,phi0,dlk,phii,subseg angle = pi2/n radius=1.02*r0/2/sin(angle/2) x(1,1) = radius x(1,2) = 0.d0 x(1,3) = 0.d0 do i = 2, n x(i,1) = radius*cos((i-1)*angle) x(i,2) = radius*sin((i-1)*angle) x(i,3) = 0.d0 enddo call update_bond(n) c next part need to be finished when euler angle is needed do i = 1, n angle = (i-1)*phii c set the torsional placement cos1 = cos(angle) sin1 = sin(angle) f(i,1) = -sin1*u(i,2) f(i,2) = sin1*u(i,1) f(i,3) = -cos1 v(i,1) = -cos1*u(i,2) v(i,2) = cos1*u(i,1) v(i,3) = sin1 enddo c the (f,v,u) systhesized by the procedure above are c already orthogonal call update_euler(n) call update_rij(n) return end