#============================================================* # test rigid body simulation * #============================================================* # set units units units scale name = mass uname = reducedMass value = 10000.0 # open pdb file database open name = neck format = pdb file = ../../data/neck_xform.pdb # read molecule molecule read name = m1 database = neck # create a some domains domain create iq1 = AC[762-788] domain iq1 backbone color = [ 1 0 0 ] width = 2 show domain create iq2 = BC[788-813] domain iq2 backbone color = [ 0 1 0 ] width = 2 show #--------------------------------------------------------------# # create bodies # #--------------------------------------------------------------# body create name = ground type = ground body create name = iq1_body type = rigid domain = iq1 body create name = iq2_body type = rigid domain = iq2 #body create name = surf1 type = rigid surface = iq1surf #--------------------------------------------------------------# # create joints # #--------------------------------------------------------------# joint create \ name = 1 \ type = ball \ domain = iq1 \ res = C[762] \ use = CA joint 1 color = [ 1 0 0 ] msize = 0.1 shading = color show = true joint 1 bodies = { ground iq1_body } joint create \ name = 2 \ type = ball \ domain = iq1 \ res = C[788] \ use = CA joint 2 color = [ 0 1 0 ] msize = 0.1 shading = flat display = line show = true joint 2 bodies = { iq1_body iq2_body } #--------------------------------------------------------------# # create a course-grained model # #--------------------------------------------------------------# model create name = model_1 # add joints model model_1 add joint = 1 model model_1 add joint = 2 # add bodies model model_1 add body = iq1_body model model_1 add body = iq2_body model model_1 joints msize = 0.5 show = true model model_1 bodies msize = 0.5 show = true #--------------------------------------------------------------# # create a rigid simulation # #--------------------------------------------------------------# simulation create name = rsim type = rigid # add bodies #----------- simulation rsim add body = iq1_body simulation rsim add body = iq2_body simulation rsim add body = ground # add joints #----------- simulation rsim add joint = 1 simulation rsim add joint = 2 # set solver #----------- simulation rsim solver = ode simulation rsim solver finite_rotation = on # add forces #----------- force create name = force1 \ type = explicit \ point = [ 10 10 0 ] \ direction = [ 1 0 0 ] \ scale = 0.1 simulation rsim add force = force1 \ body = iq1_body \ time = { 0 1000 } # initialize simulation #---------------------- simulation rsim initialize # step simulation #---------------- simulation rsim step #simulation rsim step #simulation rsim step #simulation rsim step