#============================================================* # test simulation of dna using cylinders * #============================================================* # set units #---------- units units scale name = mass uname = reducedMass value = 10000.0 # open pdb file #-------------- database open name = dna format = pdb file = dna_bend.pdb # read molecule #-------------- molecule read database = dna name = m1 model = 1 type = dna # create domains #--------------- domain create helix = AB # translate domain so that ground joint will be (0,0,0) domain helix xform translation = [ 2.58377 -4.18649 -1.90172 ] #domain helix backbone color = [ 1 0 0 ] show = true #domain helix bonds atoms = true bond_color = element show = true domain create dna_a = A domain dna_a xform translation = [ 2.58377 -4.18649 -1.90172 ] domain dna_a backbone color = [ 1 0 0 ] width = 3 show = true domain dna_a bonds atoms = false bond_color = element show = true domain create dna_b = B domain dna_b xform translation = [ 2.58377 -4.18649 -1.90172 ] domain dna_b backbone color = [ 0 1 0 ] width = 3 show = true domain dna_b bonds atoms = false bond_color = element show = true # create cylinders #----------------- solid create name = cyl1 type = cylinder \ domain = helix \ region = A[6-16]B[156-166] \ color = [ 1 0 0 ] \ display = line \ show = true solid create name = cyl2 type = cylinder \ domain = helix \ region = A[16-26]B[146-156] \ allign = cyl1 \ allign_point = -1.0 \ color = [ 0 1 0 ] \ display = line \ show = true solid create name = cyl3 type = cylinder \ domain = helix \ region = A[26-36]B[136-146] \ allign = cyl2 \ allign_point = 1.0 \ color = [ 0 0 1 ] \ display = line \ show = true solid create name = cyl4 type = cylinder \ domain = helix \ region = A[36-46]B[126-136] \ allign = cyl3 \ allign_point = 1.0 \ color = [ 0 1 1 ] \ display = line \ show = true solid create name = cyl5 type = cylinder \ domain = helix \ region = A[46-56]B[116-126] \ allign = cyl4 \ allign_point = 1.0 \ color = [ 1 1 0 ] \ display = line \ show = true # create bodies #-------------- body create name = ground type = ground body create name = cyl1_body type = rigid solid = cyl1 body create name = cyl2_body type = rigid solid = cyl2 body create name = cyl3_body type = rigid solid = cyl3 body create name = cyl4_body type = rigid solid = cyl4 body create name = cyl5_body type = rigid solid = cyl5 # create joints #-------------- joint create name = jnt1 type = ball cylinder = cyl1 distance = 1.0 joint jnt1 color = [ 1 1 1 ] msize = 0.1 shading = color show = true joint jnt1 bodies = { ground cyl1_body } joint create name = jnt2 type = ball cylinder = cyl2 distance = 0.0 joint jnt2 color = [ 1 0 0 ] msize = 0.1 shading = color show = true joint jnt2 bodies = { cyl1_body cyl2_body } joint create name = jnt3 type = ball cylinder = cyl3 distance = 0.0 joint jnt3 color = [ 0 1 0 ] msize = 0.1 shading = color show = true joint jnt3 bodies = { cyl2_body cyl3_body } joint create name = jnt4 type = ball cylinder = cyl4 distance = 0.0 joint jnt4 color = [ 0 0 1 ] msize = 0.1 shading = color show = true joint jnt4 bodies = { cyl3_body cyl4_body } joint create name = jnt5 type = ball cylinder = cyl5 distance = 0.0 joint jnt5 color = [ 1 1 0 ] msize = 0.1 shading = color show = true joint jnt5 bodies = { cyl4_body cyl5_body } # create a rigid simulation #-------------------------- simulation create name = rsim type = rigid # set solver #----------- simulation rsim solver = ode simulation rsim solver finite_rotation = on simulation rsim momentum = on # add bodies #----------- simulation rsim add body = ground simulation rsim add body = cyl1_body simulation rsim add body = cyl2_body simulation rsim add body = cyl3_body simulation rsim add body = cyl4_body simulation rsim add body = cyl5_body # add joints #----------- simulation rsim add joint = jnt1 simulation rsim add joint = jnt2 simulation rsim add joint = jnt3 simulation rsim add joint = jnt4 simulation rsim add joint = jnt5 # add forces #----------- force create name = force1 \ type = explicit \ point = [ 0 0 0 ] \ direction = [ 0 10 0 ] \ scale = 1.0 simulation rsim add force = force1 \ body = cyl5_body \ time = { 0 1000 } # initialize simulation #---------------------- simulation rsim initialize # step simulation #---------------- #simulation rsim step = 500 graphics background color = [ 1 1 1 ]