Changeset 1390 in sassie2
- Timestamp:
- Jan 16, 2018, 1:00:30 PM (4 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
bin/torsion_angle_monte_carlo
r1059 r1390 263 263 #### END USER EDIT 264 264 else: 265 runname = json_variables['runname'] 266 267 base_directory = json_variables['_base_directory'] 268 269 path = base_directory.replace('\/','/') + "/" 270 271 os.chdir(path) 272 data_path = path 273 274 pdbfile = json_variables['pdbfile'][0] 275 try: 276 psffile = json_variables['psffile'][0] 277 psf_flag = True 278 except: 279 psffile = 'None' 280 psf_flag = True 281 282 dcdfile = str(json_variables['dcdfile']) 283 print 'dcdfile = ',dcdfile 284 print 'type(dcdfile) = ',type(dcdfile) 285 286 try: 287 max_steps = json_variables['max_steps'] 288 energy_convergence = json_variables['energy_convergence'] 289 step_size = json_variables['step_size'] 290 except: 291 max_steps = '1000' 292 energy_convergence = '1.0' 293 step_size = '0.002' 294 295 number_of_flexible_regions = json_variables['number_of_flexible_regions'] 296 goback = json_variables['goback'] 297 temperature = json_variables['temperature'] 298 299 temperature = json_variables['temperature'] 300 trial_steps = json_variables['trial_steps'] 301 goback = json_variables['goback'] 302 303 temp_basis_string_array = json_variables['basis_string_array'] 304 print 'basis_string_array = ',temp_basis_string_array 305 print 'type(basis_string_array) = ',type(temp_basis_string_array) 306 307 basis_string_array = [] 308 for bs in temp_basis_string_array: 309 basis_string_array.append(str(bs)) 310 311 print 'basis_string_array = ',basis_string_array 312 print 'type(basis_string_array) = ',type(basis_string_array) 313 314 temp_post_basis_string_array = json_variables['post_basis_string_array'] 315 post_basis_string_array = [] 316 for bs in temp_post_basis_string_array: 317 post_basis_string_array.append(str(bs)) 318 319 temp_delta_theta_array = json_variables['delta_theta_array'] 320 delta_theta_array = '' 321 for delta in temp_delta_theta_array: 322 delta_theta_array += delta+ ',' 323 delta_theta_array = delta_theta_array[:-1] 324 325 print 'delta_theta_array = ',delta_theta_array 326 print 'type(delta_theta_array) = ',type(delta_theta_array) 327 #delta_theta_array = '30.0, 30.0' 328 choice_rotation_type_array = json_variables['rotation_type_array'] 329 print 'choice_rotation_type_array = ',choice_rotation_type_array 330 print 'type(choice_rotation_type_array) = ',type(choice_rotation_type_array) 331 rotation_type_array = [] 332 for choice in choice_rotation_type_array: 333 if choice == 'c1': 334 rotation_type_array.append('protein_backbone_torsion') 335 elif choice == 'c2': 336 rotation_type_array.append('single_stranded_nucleic_backbone_torsion') 337 elif choice == 'c3': 338 rotation_type_array.append('double_stranded_nucleic_torsion') 339 elif choice == 'c4': 340 rotation_type_array.append('isopeptide_bond_torsion') 341 choice_rotation_direction_array = json_variables['rotation_direction_array'] 342 343 rotation_direction_array = [] 344 for choice in choice_rotation_direction_array: 345 if choice == 'c1': 346 rotation_direction_array.append('forward') 347 elif choice == 'c2': 348 rotation_direction_array.append('reverse') 349 350 # sys.stdout.flush() 351 # sys.exit() 352 353 ### here 354 355 low_rg_cutoff = '0' 356 high_rg_cutoff = '400.0' 357 358 z_flag = False 359 z_cutoff = '0.0' 360 361 constraint_flag = False 362 constraint_file = 'constraints.txt' 363 364 directed_mc = '0' 365 366 nonbondflag = '0' 367 seed = '0, 123' # set this to '1,123' if you want to set the seed or '0,123' if not 368 369 overlap_list_box = json_variables['overlap_list_box'] 370 371 if(overlap_list_box == "c1"): 372 overlap_basis = 'heavy' 373 cutoff = '0.8' 374 elif(overlap_list_box == "c2"): 375 overlap_basis = 'all' 376 cutoff = '0.8' 377 elif(overlap_list_box == "c3"): 378 overlap_basis = 'backbone' 379 cutoff = '1.0' 380 else: 381 overlap_basis = 'heavy' 382 cutoff = '0.8' 383 384 ''' 265 266 runname = json_variables['runname'] 267 268 base_directory = json_variables['_base_directory'] 269 270 path = base_directory.replace('\/','/') + "/" 271 272 os.chdir(path) 273 data_path = path 274 275 pdbfile = json_variables['pdbfile'][0] 276 try: 277 psffile = json_variables['psffile'][0] 278 psf_flag = True 279 except: 280 psffile = 'None' 281 psf_flag = True 282 283 dcdfile = str(json_variables['dcdfile']) 284 print 'dcdfile = ',dcdfile 285 print 'type(dcdfile) = ',type(dcdfile) 286 287 try: 288 max_steps = json_variables['max_steps'] 289 energy_convergence = json_variables['energy_convergence'] 290 step_size = json_variables['step_size'] 291 except: 292 max_steps = '1000' 293 energy_convergence = '1.0' 294 step_size = '0.002' 295 296 number_of_flexible_regions = json_variables['number_of_flexible_regions'] 297 goback = json_variables['goback'] 298 temperature = json_variables['temperature'] 299 300 trial_steps = json_variables['trial_steps'] 301 goback = json_variables['goback'] 302 303 temp_basis_string_array = json_variables['basis_string_array'] 304 print 'basis_string_array = ',temp_basis_string_array 305 print 'type(basis_string_array) = ',type(temp_basis_string_array) 306 307 basis_string_array = [] 308 for bs in temp_basis_string_array: 309 basis_string_array.append(str(bs)) 310 311 print 'basis_string_array = ',basis_string_array 312 print 'type(basis_string_array) = ',type(basis_string_array) 313 314 temp_post_basis_string_array = json_variables['post_basis_string_array'] 315 post_basis_string_array = [] 316 for bs in temp_post_basis_string_array: 317 post_basis_string_array.append(str(bs)) 318 319 temp_delta_theta_array = json_variables['delta_theta_array'] 320 delta_theta_array = '' 321 for delta in temp_delta_theta_array: 322 delta_theta_array += delta+ ',' 323 delta_theta_array = delta_theta_array[:-1] 324 325 print 'delta_theta_array = ',delta_theta_array 326 print 'type(delta_theta_array) = ',type(delta_theta_array) 327 328 choice_rotation_type_array = json_variables['rotation_type_array'] 329 print 'choice_rotation_type_array = ',choice_rotation_type_array 330 print 'type(choice_rotation_type_array) = ',type(choice_rotation_type_array) 331 rotation_type_array = [] 332 for choice in choice_rotation_type_array: 333 if choice == 'c1': 334 rotation_type_array.append('protein_backbone_torsion') 335 elif choice == 'c2': 336 rotation_type_array.append('single_stranded_nucleic_backbone_torsion') 337 elif choice == 'c3': 338 rotation_type_array.append('double_stranded_nucleic_torsion') 339 elif choice == 'c4': 340 rotation_type_array.append('isopeptide_bond_torsion') 341 choice_rotation_direction_array = json_variables['rotation_direction_array'] 342 343 rotation_direction_array = [] 344 for choice in choice_rotation_direction_array: 345 if choice == 'c1': 346 rotation_direction_array.append('forward') 347 elif choice == 'c2': 348 rotation_direction_array.append('reverse') 349 350 overlap_list_box = json_variables['overlap_list_box'] 351 352 if(overlap_list_box == "c1"): 353 overlap_basis = 'heavy' 354 cutoff = '0.8' 355 elif(overlap_list_box == "c2"): 356 overlap_basis = 'all' 357 cutoff = '0.8' 358 elif(overlap_list_box == "c3"): 359 overlap_basis = 'backbone' 360 cutoff = '1.0' 361 else: 362 overlap_basis = 'heavy' 363 cutoff = '0.8' 364 385 365 try: 386 366 advanced_input = json_variables['advanced_input'] … … 390 370 if(advanced_input == "on"): 391 371 392 #basis = json_variables['basis'] 393 #cutoff = json_variables['cutoff'] 394 lowrg = json_variables['lowrg'] 395 highrg = json_variables['highrg'] 372 low_rg_cutoff = json_variables['lowrg'] 373 high_rg_cutoff = json_variables['highrg'] 396 374 397 375 try: … … 404 382 except: 405 383 cflag_list_box = 'off' 406 #plotflag_list_box = json_variables['plotflag_list_box'] 384 407 385 plotflag_list_box = "c1" 408 386 409 directed mc = json_variables['directedmc']387 directed_mc = "0" 410 388 411 389 else: 412 #basis = 'CA' 413 #cutoff = '3.0' 414 lowrg = "20.0" 415 highrg = "185.0" 416 zcutoff = "0.0" 390 low_rg_cutoff = "0.0" 391 high_rg_cutoff = "400.0" 417 392 zflag_check_box = "off" 418 393 cflag_list_box = "off" 419 394 plotflag_list_box = "c1" 420 directedmc = "0" 421 395 directed_mc = "0" 422 396 423 397 if(zflag_check_box == 'off'): 424 z flag = '0' # NO425 z cutoff = '0'398 z_flag = False 399 z_cutoff = '0.0' 426 400 elif(zflag_check_box == 'on'): 427 z flag = '1' # YES428 z cutoff = json_variables['zcutoff']401 z_flag = True 402 z_cutoff = json_variables['zcutoff'] 429 403 430 404 if(cflag_list_box == 'off'): 431 c flag = '0' # NO432 con file = 'constraints.txt'405 constraint_flag = False 406 constraint_file = 'constraints.txt' 433 407 elif(cflag_list_box == 'on'): 434 c flag = '1' # YES435 con file = json_variables['confile'][0]436 #head, confile = os.path.split(temp_confile[0]) 408 constraint_flag = True 409 constraint_file = json_variables['confile'][0] 410 437 411 if(plotflag_list_box == 'c1'): 438 412 plotflag = '0' # NO 439 elif(plotflag_list_box == 'c2'): 440 plotflag = '1' # YES 441 442 ''' 413 elif(plotflag_list_box == 'c2'): 414 plotflag = '1' # YES 415 416 nonbondflag = '0' 417 seed = '0, 123' # set this to '1,123' if you want to set the seed or '0,123' if not 418 443 419 plotflag = '0' 444 420 … … 468 444 svariables['cutoff'] = (cutoff, 'float') 469 445 470 471 446 svariables['low_rg_cutoff'] = (low_rg_cutoff, 'float') 472 447 svariables['high_rg_cutoff'] = (high_rg_cutoff, 'float') -
modules/torsion_angle_monte_carlo.json
r895 r1390 202 202 { 203 203 "role" : "input", 204 "id" : "dna_specific_input_header", 205 "label" : "NOT IMPLEMENTED: DNA Specific Input : NEEDS REFACTORING", 206 "type" : "label", 207 "default" : " ", 208 "prehline" : "true", 209 "posthline": "true", 210 "repeat" : "advanced_input" 211 }, 212 { 213 "role" : "input", 214 "id" : "bp_per_bead", 215 "label" : "number of base pairs per bead", 216 "type" : "text", 217 "default" : "1", 218 "repeat" : "advanced_input" 219 }, 220 { 221 "role" : "input", 222 "id" : "soft_rotation", 223 "label" : "soft rotation averaged over N beads", 224 "type" : "text", 225 "default" : "1", 226 "repeat" : "advanced_input" 227 }, 228 { 229 "role" : "input", 230 "id" : "n_dcd_write", 231 "label" : "DCD save frequency", 232 "type" : "text", 233 "default" : "1", 234 "repeat" : "advanced_input" 235 }, 236 { 237 "role" : "input", 238 "id" : "seed", 239 "label" : "random seed", 240 "type" : "text", 241 "default" : "0", 242 "repeat" : "advanced_input" 243 }, 244 { 245 "role" : "input", 246 "id" : "debug", 247 "label" : "print debugging information", 248 "type" : "listbox", 249 "values" : "no~c1~yes~c2", 250 "default" : "c1", 251 "repeat" : "advanced_input" 252 }, 253 { 254 "role" : "input", 255 "id" : "write_flex", 256 "label" : "save file labeling information", 257 "type" : "listbox", 258 "values" : "no~c1~yes~c2", 259 "default" : "c1", 260 "repeat" : "advanced_input" 261 }, 262 { 263 "role" : "input", 264 "id" : "keep_cg_files", 265 "label" : "keep coarse-grain DNA and protein pdb and dcd files", 266 "type" : "listbox", 267 "values" : "no~c1~yes~c2", 268 "default" : "c1", 269 "repeat" : "advanced_input" 270 }, 271 { 272 "role" : "input", 273 "id" : "keep_unique", 274 "label" : "keep duplicate structure when move fails", 275 "type" : "listbox", 276 "values" : "no~c1~yes~c2", 277 "default" : "c2", 278 "repeat" : "advanced_input" 279 }, 280 { 281 "role" : "input", 282 "id" : "rm_pkl", 283 "label" : "remove binary pkl cg file", 284 "type" : "listbox", 285 "values" : "no~c1~yes~c2", 286 "default" : "c1", 204 "id" : "lowrg", 205 "label" : "low Rg cutoff :", 206 "type" : "float", 207 "default" : 0.0, 208 "min" : 0.0, 209 "step" : 0.01, 210 "required" : "true", 211 "repeat" : "advanced_input" 212 }, 213 { 214 "role" : "input", 215 "id" : "highrg", 216 "label" : "high Rg cutoff :", 217 "type" : "float", 218 "default" : 300.0, 219 "step" : 0.01, 220 "required" : "true", 221 "repeat" : "advanced_input" 222 }, 223 { 224 "role" : "input", 225 "id" : "zflag_list_box", 226 "name" : "zflag_list_box", 227 "label" : "Z coordinate filter :", 228 "type" : "listbox", 229 "values" : "no~c1~yes~c2", 230 "default" : "c1", 231 "repeat" : "advanced_input" 232 }, 233 { 234 "role" : "input", 235 "id" : "zcutoff", 236 "label" : "Z cutoff (angstroms) :", 237 "type" : "text", 238 "default" : "0.0", 239 "required" : "true", 287 240 "repeat" : "advanced_input" 288 241 }, … … 295 248 "prehline" : "true", 296 249 "posthline": "true", 297 "repeat" : "advanced_input"298 },299 {300 "role" : "input",301 "id" : "lowrg",302 "label" : "low Rg cutoff : NOT USED",303 "type" : "float",304 "default" : 0.0,305 "min" : 0.0,306 "step" : 0.01,307 "required" : "true",308 "repeat" : "advanced_input"309 },310 {311 "role" : "input",312 "id" : "highrg",313 "label" : "high Rg cutoff : NOT USED",314 "type" : "float",315 "default" : 300.0,316 "step" : 0.01,317 "required" : "true",318 "repeat" : "advanced_input"319 },320 {321 "role" : "input",322 "id" : "zflag_list_box",323 "name" : "zflag_list_box",324 "label" : "Z coordinate filter : NOT USED",325 "type" : "listbox",326 "values" : "no~c1~yes~c2",327 "default" : "c1",328 "repeat" : "advanced_input"329 },330 {331 "role" : "input",332 "id" : "zcutoff",333 "label" : "Z cutoff (angstroms) : NOT USED",334 "type" : "text",335 "default" : "0.0",336 "required" : "true",337 250 "repeat" : "advanced_input" 338 251 }, … … 405 318 }, 406 319 { 320 "role" : "input", 321 "id" : "dna_specific_input_header", 322 "label" : "NOT IMPLEMENTED: DNA Specific Input : NEEDS REFACTORING", 323 "type" : "label", 324 "default" : " ", 325 "prehline" : "true", 326 "posthline": "true", 327 "repeat" : "advanced_input" 328 }, 329 { 330 "role" : "input", 331 "id" : "bp_per_bead", 332 "label" : "number of base pairs per bead", 333 "type" : "text", 334 "default" : "1", 335 "repeat" : "advanced_input" 336 }, 337 { 338 "role" : "input", 339 "id" : "soft_rotation", 340 "label" : "soft rotation averaged over N beads", 341 "type" : "text", 342 "default" : "1", 343 "repeat" : "advanced_input" 344 }, 345 { 346 "role" : "input", 347 "id" : "n_dcd_write", 348 "label" : "DCD save frequency", 349 "type" : "text", 350 "default" : "1", 351 "repeat" : "advanced_input" 352 }, 353 { 354 "role" : "input", 355 "id" : "seed", 356 "label" : "random seed", 357 "type" : "text", 358 "default" : "0", 359 "repeat" : "advanced_input" 360 }, 361 { 362 "role" : "input", 363 "id" : "debug", 364 "label" : "print debugging information", 365 "type" : "listbox", 366 "values" : "no~c1~yes~c2", 367 "default" : "c1", 368 "repeat" : "advanced_input" 369 }, 370 { 371 "role" : "input", 372 "id" : "write_flex", 373 "label" : "save file labeling information", 374 "type" : "listbox", 375 "values" : "no~c1~yes~c2", 376 "default" : "c1", 377 "repeat" : "advanced_input" 378 }, 379 { 380 "role" : "input", 381 "id" : "keep_cg_files", 382 "label" : "keep coarse-grain DNA and protein pdb and dcd files", 383 "type" : "listbox", 384 "values" : "no~c1~yes~c2", 385 "default" : "c1", 386 "repeat" : "advanced_input" 387 }, 388 { 389 "role" : "input", 390 "id" : "keep_unique", 391 "label" : "keep duplicate structure when move fails", 392 "type" : "listbox", 393 "values" : "no~c1~yes~c2", 394 "default" : "c2", 395 "repeat" : "advanced_input" 396 }, 397 { 398 "role" : "input", 399 "id" : "rm_pkl", 400 "label" : "remove binary pkl cg file", 401 "type" : "listbox", 402 "values" : "no~c1~yes~c2", 403 "default" : "c1", 404 "repeat" : "advanced_input" 405 }, 406 { 407 407 "role" : "output", 408 408 "id" : "progress_output",
Note: See TracChangeset
for help on using the changeset viewer.