Skip to content

Commit

Permalink
Active and passive residue restraints
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjimenez committed Dec 17, 2018
1 parent dd94a97 commit c751702
Show file tree
Hide file tree
Showing 72 changed files with 9,870 additions and 536 deletions.
4 changes: 2 additions & 2 deletions bin/simulation/docking_mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ def set_scoring_function(parser, receptor, ligand, minion_id):

receptor_restraints = ligand_restraints = None
try:
receptor_restraints = parser.args.receptor_restraints
receptor_restraints = parser.args.receptor_restraints['active']
except:
pass
try:
ligand_restraints = parser.args.ligand_restraints
ligand_restraints = parser.args.ligand_restraints['active']
except:
pass
adapter = CurrentModelAdapter(receptor, ligand, receptor_restraints, ligand_restraints)
Expand Down
6 changes: 3 additions & 3 deletions bin/simulation/docking_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ def set_scoring_function(parser, receptor, ligand):
CurrentModelAdapter = getattr(module, "DefinedModelAdapter")
receptor_restraints = ligand_restraints = None
try:
receptor_restraints = parser.args.receptor_restraints
receptor_restraints = parser.args.receptor_restraints['active']
except:
pass
try:
ligand_restraints = parser.args.ligand_restraints
ligand_restraints = parser.args.ligand_restraints['active']
except:
pass
pass
adapter = CurrentModelAdapter(receptor, ligand, receptor_restraints, ligand_restraints)
scoring_function = CurrentScoringFunction(weight)
adapters.append(adapter)
Expand Down
28 changes: 25 additions & 3 deletions bin/simulation/lightdock_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,18 @@
if args.restraints:
log.info("Reading restraints from %s" % args.restraints)
restraints = parse_restraints_file(args.restraints)

# Calculate number of restraints in order to check them
num_rec_active = len(restraints['receptor']['active'])
num_rec_passive = len(restraints['receptor']['passive'])
num_lig_active = len(restraints['ligand']['active'])
num_lig_passive = len(restraints['ligand']['passive'])

# Check if restraints have been defined for the ligand, but not to the receptor
if len(restraints['ligand']) and not len(restraints['receptor']):
if not num_rec_active and not num_rec_passive and (num_lig_active or num_lig_passive):
raise LightDockError("Restraints defined for ligand, but not receptor. Try switching structures.")

if not len(restraints['receptor']) and not len(restraints['ligand']):
if not num_rec_active and not num_rec_passive and not num_lig_active and not num_lig_passive:
raise LightDockError("Restraints file specified, but not a single restraint found")

# Check if restraints correspond with real residues
Expand All @@ -82,11 +89,26 @@
ligand_restraints = get_restraints(ligand, restraints['ligand'])
args.ligand_restraints = restraints['ligand']

log.info("Number of receptor restraints is: %d (active), %d (passive)" % (num_rec_active, num_rec_passive))
log.info("Number of ligand restraints is: %d (active), %d (passive)" % (num_lig_active, num_lig_passive))

rec_restraints = None
try:
rec_restraints = receptor_restraints['active'] + receptor_restraints['passive']
except:
pass

lig_restraints = None
try:
lig_restraints = ligand_restraints['active'] + ligand_restraints['passive']
except:
pass

# Calculate surface points (swarm centers) over receptor structure
starting_points_files = calculate_starting_positions(receptor, ligand,
args.swarms, args.glowworms,
args.starting_points_seed,
receptor_restraints, ligand_restraints,
rec_restraints, lig_restraints,
rec_translation, lig_translation,
args.ftdock_file, args.use_anm, args.anm_seed,
args.anm_rec, args.anm_lig, args.membrane)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
19.611442323 -19.865011160 -6.395622260 -0.105840692 -0.484936911 0.599743027 -0.627648183
25.026641533 -21.859646889 1.101340616 -0.358805949 -0.497777677 -0.736352110 0.285063581
24.766667922 -28.158017118 4.405021706 -0.274174009 -0.810486598 -0.467085458 0.223094737
22.304404370 -15.330496957 6.515641535 -0.525762235 0.041557584 -0.845489079 -0.083637653
14.541092479 -19.153948137 2.539930199 -0.784522688 0.186614122 0.553103631 -0.209226420
21.749849586 -27.249178039 -5.987001908 -0.302466905 0.610810364 -0.555807916 0.475922296
20.300312113 -22.112925280 0.223596093 -0.373520573 0.208313183 -0.428766625 -0.795768296
21.480375018 -18.963863300 -8.396870740 0.719860526 -0.451506855 0.332746256 -0.408928249
24.784369041 -26.411540066 3.208495336 -0.884285660 -0.155960722 -0.086700689 -0.431506796
21.815411226 -19.792858829 8.209034194 -0.235809453 0.215334879 -0.938641307 0.130296927
22.297782015 -20.681655343 -3.826485520 0.889813079 -0.311562613 0.020139766 0.332799960
18.585785764 -23.687230975 8.907203552 -0.869407148 0.022254922 0.434764128 0.233700840
15.711115193 -19.017264147 1.405134486 0.742795013 0.334868783 0.215401299 -0.538257139
23.046961680 -21.308803579 -1.414829345 0.397215932 0.449457984 -0.773311905 0.205415973
16.337153979 -16.052379309 2.026693043 0.286303063 -0.735587259 -0.147552230 0.595961643
18.550661126 -20.611129849 9.059370975 0.105666062 -0.420231451 -0.490731721 -0.755924989
22.079506196 -26.429438832 2.241711580 -0.356668245 -0.006537492 0.301238881 0.884307730
19.082541357 -15.260168673 6.589996336 0.147393091 -0.623433551 -0.336685197 0.690107936
17.256194564 -24.912219761 4.793007728 -0.125965963 -0.425589257 0.188167032 0.876127575
17.365040226 -25.557520973 1.435725029 0.338396927 -0.938672708 -0.064540495 -0.014683068
16.092114944 -20.832134506 -3.355029113 0.190684711 -0.616345024 -0.570796232 -0.507887600
21.992058730 -21.611309864 -5.216756084 -0.022580679 0.548497357 -0.572568431 -0.608938547
24.084072870 -16.655083129 -2.514620958 0.335472389 0.188641060 0.589781245 0.709951343
14.976467504 -27.713594639 -1.198467498 -0.274672066 -0.860591014 -0.065255518 0.423886872
21.735962329 -23.163152792 8.769797835 -0.666869085 0.699630827 0.251556162 -0.050217791
19.611442323 -19.865011160 -6.395622260 0.784790961 0.320369254 0.412018845 0.334226210
16.658608756 -23.466589770 6.302388272 0.859111328 0.157102015 0.447230973 0.192953722
18.912655118 -20.609014879 2.493819389 0.792890779 0.231351365 0.522701708 0.211148487
24.766667922 -28.158017118 4.405021706 0.860380036 0.217986162 0.352409090 0.296708712
25.504619688 -19.458454869 -5.776759123 0.733561434 0.221406060 0.484019636 0.422601434
17.611605750 -27.725874458 -0.788924204 0.869458340 0.351748076 0.334822956 0.090603943
22.304404370 -15.330496957 6.515641535 0.758478693 -0.006999678 0.573200436 0.310003769
14.429737482 -26.231209528 2.556407358 0.891576993 0.255639480 0.245892411 0.281559664
24.829600405 -25.534911784 2.687903074 0.920385350 0.161461806 0.291854108 0.204063892
20.300312113 -22.112925280 0.223596093 0.716657455 0.259420165 0.599629664 0.244023637
20.659372347 -19.291926988 2.746492195 0.795509826 0.086765329 0.336109863 0.496654865
15.869392781 -23.860236408 5.722422529 0.885538089 0.200753712 0.320712162 0.269562515
12.960554875 -17.241735393 0.655467396 0.735437297 0.282289318 0.470388155 0.397718124
24.525306577 -18.474519991 1.028700152 0.869216129 0.115319584 0.357703875 0.321267261
19.506948520 -31.553776459 1.197919207 0.822361554 0.344975245 0.433639364 0.129114125
18.585785764 -23.687230975 8.907203552 0.905905939 0.168981536 0.360991665 0.143054839
12.516275966 -25.061186814 2.693091348 0.891418873 0.263690433 0.244445906 0.275836815
12.738089718 -22.897740867 3.985015169 0.886888541 0.217856211 0.257343502 0.315819109
16.337153979 -16.052379309 2.026693043 0.709991812 0.211650868 0.397686856 0.541258443
11.360426641 -22.221640881 1.099225646 0.724395913 0.478811541 0.482444629 0.115053241
18.302126671 -19.853224897 -9.440192274 0.838664694 0.290718930 0.436489376 0.146972985
22.079506196 -26.429438832 2.241711580 0.804773689 0.327799807 0.386855580 0.308592542
25.651942848 -19.893931920 -0.714678001 0.730247666 0.249488564 0.588544644 0.241058095
15.860082245 -16.917347767 6.084433082 0.900301138 0.076189373 0.308648949 0.297302652
17.365040226 -25.557520973 1.435725029 0.857253775 0.211870314 0.289470647 0.369369299
Loading

0 comments on commit c751702

Please sign in to comment.