Skip to content

Commit c751702

Browse files
committed
Active and passive residue restraints
1 parent dd94a97 commit c751702

File tree

72 files changed

+9870
-536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+9870
-536
lines changed

bin/simulation/docking_mpi.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def set_scoring_function(parser, receptor, ligand, minion_id):
6969

7070
receptor_restraints = ligand_restraints = None
7171
try:
72-
receptor_restraints = parser.args.receptor_restraints
72+
receptor_restraints = parser.args.receptor_restraints['active']
7373
except:
7474
pass
7575
try:
76-
ligand_restraints = parser.args.ligand_restraints
76+
ligand_restraints = parser.args.ligand_restraints['active']
7777
except:
7878
pass
7979
adapter = CurrentModelAdapter(receptor, ligand, receptor_restraints, ligand_restraints)

bin/simulation/docking_multiprocessing.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ def set_scoring_function(parser, receptor, ligand):
6868
CurrentModelAdapter = getattr(module, "DefinedModelAdapter")
6969
receptor_restraints = ligand_restraints = None
7070
try:
71-
receptor_restraints = parser.args.receptor_restraints
71+
receptor_restraints = parser.args.receptor_restraints['active']
7272
except:
7373
pass
7474
try:
75-
ligand_restraints = parser.args.ligand_restraints
75+
ligand_restraints = parser.args.ligand_restraints['active']
7676
except:
77-
pass
77+
pass
7878
adapter = CurrentModelAdapter(receptor, ligand, receptor_restraints, ligand_restraints)
7979
scoring_function = CurrentScoringFunction(weight)
8080
adapters.append(adapter)

bin/simulation/lightdock_setup.py

+25-3
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,18 @@
6969
if args.restraints:
7070
log.info("Reading restraints from %s" % args.restraints)
7171
restraints = parse_restraints_file(args.restraints)
72+
73+
# Calculate number of restraints in order to check them
74+
num_rec_active = len(restraints['receptor']['active'])
75+
num_rec_passive = len(restraints['receptor']['passive'])
76+
num_lig_active = len(restraints['ligand']['active'])
77+
num_lig_passive = len(restraints['ligand']['passive'])
78+
7279
# Check if restraints have been defined for the ligand, but not to the receptor
73-
if len(restraints['ligand']) and not len(restraints['receptor']):
80+
if not num_rec_active and not num_rec_passive and (num_lig_active or num_lig_passive):
7481
raise LightDockError("Restraints defined for ligand, but not receptor. Try switching structures.")
7582

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

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

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

0 commit comments

Comments
 (0)