diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fff0f9ad..6dc3b73e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- 2025-10-30: Added possibility to use alascan with ligands - Issue #1411 - 2025-10-22: Allow the definition of chain combinations to be used for scoring - Issue #1414 - 2025-09-11: Added `grid` mode - 2025-09-11: Corrected antibody-antigen notebook - Issue #1383 diff --git a/integration_tests/golden_data/protlig_complex_1.pdb b/integration_tests/golden_data/protlig_complex_1.pdb new file mode 100644 index 000000000..672b48532 --- /dev/null +++ b/integration_tests/golden_data/protlig_complex_1.pdb @@ -0,0 +1,354 @@ +REMARK FILENAME="rigidbody_1.pdb" +REMARK =============================================================== +REMARK HADDOCK run for /Users/rodrigo/repos/haddock3/examples/docking-protein-ligand/run1/01_rigidbody/rigidbody_1.pdb +REMARK initial structure: /Users/rodrigo/repos/haddock3/examples/docking-protein-ligand/run1/00_topoaa/neuraminidase-2BAT_haddock.pdb +REMARK initial structure: /Users/rodrigo/repos/haddock3/examples/docking-protein-ligand/run1/00_topoaa/oseltamivir_zwitterion_haddock.pdb +REMARK =============================================================== +REMARK total,bonds,angles,improper,dihe,vdw,elec,air,cdih,coup,rdcs,vean,dani,xpcs,rg +REMARK energies: -17.7016, 0, 0, 0, 0, -25.3743, -11.4322, 19.105, 0, 0, 0, 0, 0, 0, 0 +REMARK =============================================================== +REMARK bonds,angles,impropers,dihe,air,cdih,coup,rdcs,vean,dani,xpcs +REMARK rms-dev.: 0,0,0,0,0.233636,0,0, 0, 0, 0, 0 +REMARK =============================================================== +REMARK air,cdih,coup,rdcs,vean,dani,xpcs +REMARK >0.3,>5,>1,>0,>5,>0.2,>0.2 +REMARK violations.: 1, 0, 0, 0, 0, 0, 0 +REMARK =============================================================== +REMARK CVpartition#,violations,rms +REMARK AIRs cross-validation: 2, 5, 0.498682 +REMARK =============================================================== +REMARK NCS energy: 0 +REMARK =============================================================== +REMARK Symmetry energy: 0 +REMARK =============================================================== +REMARK Membrane restraining energy: 0 +REMARK =============================================================== +REMARK Local cross-correlation: 0.0000 +REMARK =============================================================== +REMARK Desolvation energy: 3.26757 +REMARK Internal energy free molecules: 2342.89 +REMARK Internal energy complex: 2342.89 +REMARK Binding energy: -33.539 +REMARK =============================================================== +REMARK buried surface area: 596.383 +REMARK =============================================================== +REMARK water - chain_1: 0 0 0 +REMARK water - chain_2: 0 0 0 +REMARK =============================================================== +REMARK water - water: 0 0 0 +REMARK =============================================================== +REMARK DATE:30-Dec-2021 12:38:00 created by user: unknown +REMARK VERSION:1.3U +ATOM 562 N ARG A 118 11.870 -2.253 -0.934 1.00 15.00 A N +ATOM 563 HN ARG A 118 11.555 -3.145 -0.683 1.00 15.00 A H +ATOM 564 CA ARG A 118 10.904 -1.339 -1.535 1.00 15.00 A C +ATOM 565 HA ARG A 118 10.906 -0.431 -0.951 1.00 15.00 A H +ATOM 566 CB ARG A 118 11.247 -1.004 -2.990 1.00 15.00 A C +ATOM 567 HB1 ARG A 118 10.347 -1.076 -3.584 1.00 15.00 A H +ATOM 568 HB2 ARG A 118 11.968 -1.722 -3.353 1.00 15.00 A H +ATOM 569 CG ARG A 118 11.828 0.387 -3.172 1.00 15.00 A C +ATOM 570 HG1 ARG A 118 12.900 0.304 -3.295 1.00 15.00 A H +ATOM 571 HG2 ARG A 118 11.608 0.982 -2.297 1.00 15.00 A H +ATOM 572 CD ARG A 118 11.243 1.077 -4.390 1.00 15.00 A C +ATOM 573 HD1 ARG A 118 11.252 0.380 -5.215 1.00 15.00 A H +ATOM 574 HD2 ARG A 118 11.857 1.936 -4.632 1.00 15.00 A H +ATOM 575 NE ARG A 118 9.871 1.525 -4.169 1.00 15.00 A N +ATOM 576 HE ARG A 118 9.599 1.731 -3.247 1.00 15.00 A H +ATOM 577 CZ ARG A 118 8.983 1.692 -5.145 1.00 15.00 A C +ATOM 578 NH1 ARG A 118 9.313 1.408 -6.404 1.00 15.00 A N +ATOM 579 HH11 ARG A 118 8.622 1.542 -7.167 1.00 15.00 A H +ATOM 580 HH12 ARG A 118 10.262 1.051 -6.624 1.00 15.00 A H +ATOM 581 NH2 ARG A 118 7.761 2.110 -4.861 1.00 15.00 A N +ATOM 582 HH21 ARG A 118 7.501 2.322 -3.873 1.00 15.00 A H +ATOM 583 HH22 ARG A 118 7.059 2.232 -5.621 1.00 15.00 A H +ATOM 584 C ARG A 118 9.519 -1.972 -1.437 1.00 15.00 A C +ATOM 585 O ARG A 118 9.409 -3.164 -1.140 1.00 15.00 A O +ATOM 586 N GLU A 119 8.475 -1.182 -1.695 1.00 15.00 A N +ATOM 587 HN GLU A 119 8.641 -0.250 -1.953 1.00 15.00 A H +ATOM 588 CA GLU A 119 7.087 -1.654 -1.598 1.00 15.00 A C +ATOM 589 HA GLU A 119 6.440 -0.802 -1.745 1.00 15.00 A H +ATOM 590 CB GLU A 119 6.761 -2.717 -2.653 1.00 15.00 A C +ATOM 591 HB1 GLU A 119 5.782 -3.123 -2.441 1.00 15.00 A H +ATOM 592 HB2 GLU A 119 7.490 -3.511 -2.581 1.00 15.00 A H +ATOM 593 CG GLU A 119 6.761 -2.207 -4.083 1.00 15.00 A C +ATOM 594 HG1 GLU A 119 6.428 -1.180 -4.088 1.00 15.00 A H +ATOM 595 HG2 GLU A 119 6.078 -2.809 -4.665 1.00 15.00 A H +ATOM 596 CD GLU A 119 8.131 -2.278 -4.726 1.00 15.00 A C +ATOM 597 OE1 GLU A 119 8.857 -3.260 -4.468 1.00 15.00 A O +ATOM 598 OE2 GLU A 119 8.477 -1.354 -5.489 1.00 15.00 A O +ATOM 599 C GLU A 119 6.813 -2.234 -0.209 1.00 15.00 A C +ATOM 600 O GLU A 119 6.451 -3.404 -0.078 1.00 15.00 A O +ATOM 1062 N ASP A 151 11.937 -3.581 -10.515 1.00 15.00 A N +ATOM 1063 HN ASP A 151 11.671 -3.265 -11.404 1.00 15.00 A H +ATOM 1064 CA ASP A 151 10.905 -4.084 -9.619 1.00 15.00 A C +ATOM 1065 HA ASP A 151 11.128 -3.738 -8.623 1.00 15.00 A H +ATOM 1066 CB ASP A 151 9.545 -3.521 -10.043 1.00 15.00 A C +ATOM 1067 HB1 ASP A 151 8.785 -3.868 -9.356 1.00 15.00 A H +ATOM 1068 HB2 ASP A 151 9.314 -3.881 -11.035 1.00 15.00 A H +ATOM 1069 CG ASP A 151 9.520 -2.006 -10.069 1.00 15.00 A C +ATOM 1070 OD1 ASP A 151 10.018 -1.387 -9.105 1.00 15.00 A O +ATOM 1071 OD2 ASP A 151 9.006 -1.437 -11.056 1.00 15.00 A O +ATOM 1072 C ASP A 151 10.815 -5.605 -9.605 1.00 15.00 A C +ATOM 1073 O ASP A 151 10.290 -6.182 -8.651 1.00 15.00 A O +ATOM 1074 N ARG A 152 11.324 -6.273 -10.636 1.00 15.00 A N +ATOM 1075 HN ARG A 152 11.781 -5.797 -11.359 1.00 15.00 A H +ATOM 1076 CA ARG A 152 11.196 -7.720 -10.674 1.00 15.00 A C +ATOM 1077 HA ARG A 152 10.881 -8.033 -9.693 1.00 15.00 A H +ATOM 1078 CB ARG A 152 10.101 -8.125 -11.659 1.00 15.00 A C +ATOM 1079 HB1 ARG A 152 9.999 -9.201 -11.644 1.00 15.00 A H +ATOM 1080 HB2 ARG A 152 10.392 -7.815 -12.651 1.00 15.00 A H +ATOM 1081 CG ARG A 152 8.748 -7.514 -11.337 1.00 15.00 A C +ATOM 1082 HG1 ARG A 152 8.895 -6.472 -11.085 1.00 15.00 A H +ATOM 1083 HG2 ARG A 152 8.317 -8.034 -10.493 1.00 15.00 A H +ATOM 1084 CD ARG A 152 7.796 -7.609 -12.516 1.00 15.00 A C +ATOM 1085 HD1 ARG A 152 6.832 -7.947 -12.156 1.00 15.00 A H +ATOM 1086 HD2 ARG A 152 8.194 -8.325 -13.227 1.00 15.00 A H +ATOM 1087 NE ARG A 152 7.630 -6.324 -13.184 1.00 15.00 A N +ATOM 1088 HE ARG A 152 7.033 -5.671 -12.760 1.00 15.00 A H +ATOM 1089 CZ ARG A 152 8.255 -5.974 -14.306 1.00 15.00 A C +ATOM 1090 NH1 ARG A 152 9.084 -6.823 -14.904 1.00 15.00 A N +ATOM 1091 HH11 ARG A 152 9.580 -6.541 -15.771 1.00 15.00 A H +ATOM 1092 HH12 ARG A 152 9.231 -7.770 -14.511 1.00 15.00 A H +ATOM 1093 NH2 ARG A 152 8.029 -4.790 -14.857 1.00 15.00 A N +ATOM 1094 HH21 ARG A 152 8.513 -4.526 -15.740 1.00 15.00 A H +ATOM 1095 HH22 ARG A 152 7.366 -4.122 -14.404 1.00 15.00 A H +ATOM 1096 C ARG A 152 12.467 -8.479 -11.010 1.00 15.00 A C +ATOM 1097 O ARG A 152 13.064 -8.318 -12.076 1.00 15.00 A O +ATOM 1499 N TRP A 178 7.781 -10.621 -5.934 1.00 15.00 A N +ATOM 1500 HN TRP A 178 7.193 -11.183 -6.477 1.00 15.00 A H +ATOM 1501 CA TRP A 178 8.080 -9.259 -6.381 1.00 15.00 A C +ATOM 1502 HA TRP A 178 8.729 -8.832 -5.632 1.00 15.00 A H +ATOM 1503 CB TRP A 178 8.790 -9.178 -7.757 1.00 15.00 A C +ATOM 1504 HB1 TRP A 178 9.853 -9.319 -7.593 1.00 15.00 A H +ATOM 1505 HB2 TRP A 178 8.636 -8.192 -8.161 1.00 15.00 A H +ATOM 1506 CG TRP A 178 8.362 -10.166 -8.816 1.00 15.00 A C +ATOM 1507 CD1 TRP A 178 9.103 -11.215 -9.295 1.00 15.00 A C +ATOM 1508 HD1 TRP A 178 10.099 -11.460 -8.954 1.00 15.00 A H +ATOM 1509 CD2 TRP A 178 7.123 -10.189 -9.541 1.00 15.00 A C +ATOM 1510 NE1 TRP A 178 8.416 -11.867 -10.291 1.00 15.00 A N +ATOM 1511 HE1 TRP A 178 8.743 -12.637 -10.804 1.00 15.00 A H +ATOM 1512 CE2 TRP A 178 7.189 -11.269 -10.444 1.00 15.00 A C +ATOM 1513 CE3 TRP A 178 5.975 -9.409 -9.509 1.00 15.00 A C +ATOM 1514 HE3 TRP A 178 5.894 -8.573 -8.842 1.00 15.00 A H +ATOM 1515 CZ2 TRP A 178 6.139 -11.576 -11.317 1.00 15.00 A C +ATOM 1516 HZ2 TRP A 178 6.198 -12.399 -12.022 1.00 15.00 A H +ATOM 1517 CZ3 TRP A 178 4.938 -9.709 -10.369 1.00 15.00 A C +ATOM 1518 HZ3 TRP A 178 4.039 -9.110 -10.361 1.00 15.00 A H +ATOM 1519 CH2 TRP A 178 5.023 -10.789 -11.262 1.00 15.00 A C +ATOM 1520 HH2 TRP A 178 4.187 -10.979 -11.927 1.00 15.00 A H +ATOM 1521 C TRP A 178 6.775 -8.453 -6.362 1.00 15.00 A C +ATOM 1522 O TRP A 178 6.662 -7.372 -6.947 1.00 15.00 A O +ATOM 1523 N SER A 179 5.807 -9.027 -5.645 1.00 15.00 A N +ATOM 1524 HN SER A 179 6.004 -9.893 -5.234 1.00 15.00 A H +ATOM 1525 CA SER A 179 4.475 -8.469 -5.430 1.00 15.00 A C +ATOM 1526 HA SER A 179 4.578 -7.457 -5.065 1.00 15.00 A H +ATOM 1527 CB SER A 179 3.645 -8.487 -6.716 1.00 15.00 A C +ATOM 1528 HB1 SER A 179 3.322 -9.497 -6.915 1.00 15.00 A H +ATOM 1529 HB2 SER A 179 4.247 -8.130 -7.540 1.00 15.00 A H +ATOM 1530 OG SER A 179 2.499 -7.661 -6.596 1.00 15.00 A O +ATOM 1531 HG SER A 179 2.757 -6.739 -6.685 1.00 15.00 A H +ATOM 1532 C SER A 179 3.808 -9.330 -4.367 1.00 15.00 A C +ATOM 1533 O SER A 179 3.724 -10.546 -4.534 1.00 15.00 A O +ATOM 2141 N ILE A 222 2.275 -9.621 -16.374 1.00 15.00 A N +ATOM 2142 HN ILE A 222 2.807 -10.341 -16.770 1.00 15.00 A H +ATOM 2143 CA ILE A 222 2.599 -9.200 -15.010 1.00 15.00 A C +ATOM 2144 HA ILE A 222 3.339 -9.897 -14.643 1.00 15.00 A H +ATOM 2145 CB ILE A 222 3.250 -7.794 -14.982 1.00 15.00 A C +ATOM 2146 HB ILE A 222 2.513 -7.065 -15.275 1.00 15.00 A H +ATOM 2147 CG1 ILE A 222 4.421 -7.751 -15.976 1.00 15.00 A C +ATOM 2148 HG11 ILE A 222 4.042 -7.921 -16.974 1.00 15.00 A H +ATOM 2149 HG12 ILE A 222 5.125 -8.533 -15.729 1.00 15.00 A H +ATOM 2150 CG2 ILE A 222 3.729 -7.453 -13.572 1.00 15.00 A C +ATOM 2151 HG21 ILE A 222 3.941 -6.395 -13.509 1.00 15.00 A H +ATOM 2152 HG22 ILE A 222 4.626 -8.010 -13.348 1.00 15.00 A H +ATOM 2153 HG23 ILE A 222 2.959 -7.708 -12.858 1.00 15.00 A H +ATOM 2154 CD1 ILE A 222 5.180 -6.442 -15.987 1.00 15.00 A C +ATOM 2155 HD11 ILE A 222 4.483 -5.621 -16.031 1.00 15.00 A H +ATOM 2156 HD12 ILE A 222 5.829 -6.411 -16.851 1.00 15.00 A H +ATOM 2157 HD13 ILE A 222 5.774 -6.365 -15.087 1.00 15.00 A H +ATOM 2158 C ILE A 222 1.397 -9.265 -14.063 1.00 15.00 A C +ATOM 2159 O ILE A 222 0.560 -8.360 -14.012 1.00 15.00 A O +ATOM 2179 N ARG A 224 -0.069 -8.803 -10.757 1.00 15.00 A N +ATOM 2180 HN ARG A 224 -0.807 -8.536 -11.347 1.00 15.00 A H +ATOM 2181 CA ARG A 224 0.238 -7.989 -9.577 1.00 15.00 A C +ATOM 2182 HA ARG A 224 1.165 -8.353 -9.164 1.00 15.00 A H +ATOM 2183 CB ARG A 224 0.440 -6.540 -10.019 1.00 15.00 A C +ATOM 2184 HB1 ARG A 224 1.247 -6.106 -9.446 1.00 15.00 A H +ATOM 2185 HB2 ARG A 224 -0.467 -5.987 -9.826 1.00 15.00 A H +ATOM 2186 CG ARG A 224 0.781 -6.408 -11.497 1.00 15.00 A C +ATOM 2187 HG1 ARG A 224 0.509 -7.327 -12.002 1.00 15.00 A H +ATOM 2188 HG2 ARG A 224 1.840 -6.239 -11.604 1.00 15.00 A H +ATOM 2189 CD ARG A 224 0.025 -5.262 -12.133 1.00 15.00 A C +ATOM 2190 HD1 ARG A 224 0.310 -4.344 -11.638 1.00 15.00 A H +ATOM 2191 HD2 ARG A 224 -1.034 -5.428 -11.997 1.00 15.00 A H +ATOM 2192 NE ARG A 224 0.300 -5.128 -13.561 1.00 15.00 A N +ATOM 2193 HE ARG A 224 1.171 -5.437 -13.887 1.00 15.00 A H +ATOM 2194 CZ ARG A 224 -0.573 -4.631 -14.426 1.00 15.00 A C +ATOM 2195 NH1 ARG A 224 -1.763 -4.230 -14.008 1.00 15.00 A N +ATOM 2196 HH11 ARG A 224 -2.015 -4.311 -13.002 1.00 15.00 A H +ATOM 2197 HH12 ARG A 224 -2.449 -3.840 -14.683 1.00 15.00 A H +ATOM 2198 NH2 ARG A 224 -0.253 -4.511 -15.702 1.00 15.00 A N +ATOM 2199 HH21 ARG A 224 -0.940 -4.118 -16.374 1.00 15.00 A H +ATOM 2200 HH22 ARG A 224 0.686 -4.812 -16.033 1.00 15.00 A H +ATOM 2201 C ARG A 224 -0.838 -8.057 -8.492 1.00 15.00 A C +ATOM 2202 O ARG A 224 -1.862 -8.718 -8.658 1.00 15.00 A O +ATOM 2234 N GLU A 227 0.256 -4.999 -2.431 1.00 15.00 A N +ATOM 2235 HN GLU A 227 0.126 -5.964 -2.328 1.00 15.00 A H +ATOM 2236 CA GLU A 227 1.541 -4.423 -2.005 1.00 15.00 A C +ATOM 2237 HA GLU A 227 2.262 -5.230 -1.968 1.00 15.00 A H +ATOM 2238 CB GLU A 227 2.066 -3.316 -2.948 1.00 15.00 A C +ATOM 2239 HB1 GLU A 227 3.024 -2.970 -2.585 1.00 15.00 A H +ATOM 2240 HB2 GLU A 227 1.371 -2.491 -2.931 1.00 15.00 A H +ATOM 2241 CG GLU A 227 2.238 -3.765 -4.395 1.00 15.00 A C +ATOM 2242 HG1 GLU A 227 2.654 -2.946 -4.967 1.00 15.00 A H +ATOM 2243 HG2 GLU A 227 1.268 -4.017 -4.790 1.00 15.00 A H +ATOM 2244 CD GLU A 227 3.148 -4.971 -4.547 1.00 15.00 A C +ATOM 2245 OE1 GLU A 227 2.798 -6.049 -4.022 1.00 15.00 A O +ATOM 2246 OE2 GLU A 227 4.201 -4.844 -5.205 1.00 15.00 A O +ATOM 2247 C GLU A 227 1.329 -3.895 -0.588 1.00 15.00 A C +ATOM 2248 O GLU A 227 2.115 -3.106 -0.061 1.00 15.00 A O +ATOM 2935 N GLU A 276 -5.002 -0.847 -9.597 1.00 15.00 A N +ATOM 2936 HN GLU A 276 -5.312 -0.015 -9.185 1.00 15.00 A H +ATOM 2937 CA GLU A 276 -3.675 -1.372 -9.225 1.00 15.00 A C +ATOM 2938 HA GLU A 276 -3.682 -2.442 -9.343 1.00 15.00 A H +ATOM 2939 CB GLU A 276 -2.569 -0.772 -10.089 1.00 15.00 A C +ATOM 2940 HB1 GLU A 276 -1.616 -1.050 -9.658 1.00 15.00 A H +ATOM 2941 HB2 GLU A 276 -2.659 0.302 -10.065 1.00 15.00 A H +ATOM 2942 CG GLU A 276 -2.571 -1.209 -11.538 1.00 15.00 A C +ATOM 2943 HG1 GLU A 276 -3.395 -0.730 -12.045 1.00 15.00 A H +ATOM 2944 HG2 GLU A 276 -2.689 -2.281 -11.582 1.00 15.00 A H +ATOM 2945 CD GLU A 276 -1.283 -0.826 -12.239 1.00 15.00 A C +ATOM 2946 OE1 GLU A 276 -0.668 0.187 -11.843 1.00 15.00 A O +ATOM 2947 OE2 GLU A 276 -0.886 -1.539 -13.184 1.00 15.00 A O +ATOM 2948 C GLU A 276 -3.340 -1.022 -7.783 1.00 15.00 A C +ATOM 2949 O GLU A 276 -3.736 0.039 -7.312 1.00 15.00 A O +ATOM 2950 N GLU A 277 -2.559 -1.893 -7.121 1.00 15.00 A N +ATOM 2951 HN GLU A 277 -2.259 -2.700 -7.585 1.00 15.00 A H +ATOM 2952 CA GLU A 277 -2.132 -1.682 -5.729 1.00 15.00 A C +ATOM 2953 HA GLU A 277 -1.899 -2.647 -5.310 1.00 15.00 A H +ATOM 2954 CB GLU A 277 -0.866 -0.812 -5.688 1.00 15.00 A C +ATOM 2955 HB1 GLU A 277 -0.613 -0.610 -4.655 1.00 15.00 A H +ATOM 2956 HB2 GLU A 277 -1.068 0.121 -6.189 1.00 15.00 A H +ATOM 2957 CG GLU A 277 0.349 -1.448 -6.354 1.00 15.00 A C +ATOM 2958 HG1 GLU A 277 0.021 -2.033 -7.200 1.00 15.00 A H +ATOM 2959 HG2 GLU A 277 0.842 -2.094 -5.640 1.00 15.00 A H +ATOM 2960 CD GLU A 277 1.352 -0.418 -6.839 1.00 15.00 A C +ATOM 2961 OE1 GLU A 277 1.110 0.790 -6.633 1.00 15.00 A O +ATOM 2962 OE2 GLU A 277 2.378 -0.818 -7.427 1.00 15.00 A O +ATOM 2963 C GLU A 277 -3.246 -1.050 -4.897 1.00 15.00 A C +ATOM 2964 O GLU A 277 -3.204 0.139 -4.563 1.00 15.00 A O +ATOM 3176 N ARG A 292 -5.070 2.509 -7.303 1.00 15.00 A N +ATOM 3177 HN ARG A 292 -5.021 1.537 -7.426 1.00 15.00 A H +ATOM 3178 CA ARG A 292 -4.266 3.352 -8.180 1.00 15.00 A C +ATOM 3179 HA ARG A 292 -4.375 4.375 -7.866 1.00 15.00 A H +ATOM 3180 CB ARG A 292 -2.801 2.933 -8.000 1.00 15.00 A C +ATOM 3181 HB1 ARG A 292 -2.756 1.853 -8.009 1.00 15.00 A H +ATOM 3182 HB2 ARG A 292 -2.456 3.282 -7.039 1.00 15.00 A H +ATOM 3183 CG ARG A 292 -1.839 3.449 -9.061 1.00 15.00 A C +ATOM 3184 HG1 ARG A 292 -1.661 4.502 -8.897 1.00 15.00 A H +ATOM 3185 HG2 ARG A 292 -2.279 3.299 -10.037 1.00 15.00 A H +ATOM 3186 CD ARG A 292 -0.513 2.701 -8.996 1.00 15.00 A C +ATOM 3187 HD1 ARG A 292 -0.705 1.646 -9.133 1.00 15.00 A H +ATOM 3188 HD2 ARG A 292 -0.077 2.856 -8.028 1.00 15.00 A H +ATOM 3189 NE ARG A 292 0.438 3.148 -10.014 1.00 15.00 A N +ATOM 3190 HE ARG A 292 0.075 3.541 -10.835 1.00 15.00 A H +ATOM 3191 CZ ARG A 292 1.760 3.035 -9.888 1.00 15.00 A C +ATOM 3192 NH1 ARG A 292 2.280 2.508 -8.787 1.00 15.00 A N +ATOM 3193 HH11 ARG A 292 3.311 2.415 -8.691 1.00 15.00 A H +ATOM 3194 HH12 ARG A 292 1.656 2.182 -8.023 1.00 15.00 A H +ATOM 3195 NH2 ARG A 292 2.563 3.454 -10.857 1.00 15.00 A N +ATOM 3196 HH21 ARG A 292 2.159 3.866 -11.726 1.00 15.00 A H +ATOM 3197 HH22 ARG A 292 3.595 3.369 -10.755 1.00 15.00 A H +ATOM 3198 C ARG A 292 -4.654 3.222 -9.656 1.00 15.00 A C +ATOM 3199 O ARG A 292 -4.577 2.138 -10.236 1.00 15.00 A O +ATOM 3212 N ASN A 294 -3.495 3.808 -13.071 1.00 15.00 A N +ATOM 3213 HN ASN A 294 -3.837 2.894 -12.997 1.00 15.00 A H +ATOM 3214 CA ASN A 294 -2.269 4.037 -13.839 1.00 15.00 A C +ATOM 3215 HA ASN A 294 -1.764 4.898 -13.429 1.00 15.00 A H +ATOM 3216 CB ASN A 294 -1.366 2.798 -13.678 1.00 15.00 A C +ATOM 3217 HB1 ASN A 294 -1.666 2.054 -14.402 1.00 15.00 A H +ATOM 3218 HB2 ASN A 294 -1.493 2.394 -12.687 1.00 15.00 A H +ATOM 3219 CG ASN A 294 0.109 3.082 -13.884 1.00 15.00 A C +ATOM 3220 OD1 ASN A 294 0.773 3.651 -13.024 1.00 15.00 A O +ATOM 3221 ND2 ASN A 294 0.628 2.658 -15.027 1.00 15.00 A N +ATOM 3222 HD21 ASN A 294 0.035 2.198 -15.656 1.00 15.00 A H +ATOM 3223 HD22 ASN A 294 1.581 2.812 -15.190 1.00 15.00 A H +ATOM 3224 C ASN A 294 -2.554 4.282 -15.330 1.00 15.00 A C +ATOM 3225 O ASN A 294 -1.631 4.315 -16.142 1.00 15.00 A O +ATOM 4009 N GLY A 348 1.213 6.646 -11.796 1.00 15.00 A N +ATOM 4010 HN GLY A 348 2.152 6.378 -11.878 1.00 15.00 A H +ATOM 4011 CA GLY A 348 0.633 6.863 -10.491 1.00 15.00 A C +ATOM 4012 HA1 GLY A 348 -0.254 6.255 -10.403 1.00 15.00 A H +ATOM 4013 HA2 GLY A 348 0.352 7.903 -10.404 1.00 15.00 A H +ATOM 4014 C GLY A 348 1.571 6.515 -9.354 1.00 15.00 A C +ATOM 4015 O GLY A 348 2.796 6.560 -9.492 1.00 15.00 A O +ATOM 4362 N ARG A 371 7.374 12.297 -6.326 1.00 15.00 A N +ATOM 4363 HN ARG A 371 8.138 11.975 -6.852 1.00 15.00 A H +ATOM 4364 CA ARG A 371 7.021 11.600 -5.097 1.00 15.00 A C +ATOM 4365 HA ARG A 371 5.965 11.734 -4.922 1.00 15.00 A H +ATOM 4366 CB ARG A 371 7.338 10.101 -5.207 1.00 15.00 A C +ATOM 4367 HB1 ARG A 371 7.308 9.666 -4.220 1.00 15.00 A H +ATOM 4368 HB2 ARG A 371 8.331 9.986 -5.615 1.00 15.00 A H +ATOM 4369 CG ARG A 371 6.370 9.331 -6.095 1.00 15.00 A C +ATOM 4370 HG1 ARG A 371 6.189 9.903 -6.994 1.00 15.00 A H +ATOM 4371 HG2 ARG A 371 5.441 9.194 -5.560 1.00 15.00 A H +ATOM 4372 CD ARG A 371 6.925 7.965 -6.477 1.00 15.00 A C +ATOM 4373 HD1 ARG A 371 7.296 7.478 -5.588 1.00 15.00 A H +ATOM 4374 HD2 ARG A 371 7.737 8.105 -7.175 1.00 15.00 A H +ATOM 4375 NE ARG A 371 5.914 7.109 -7.099 1.00 15.00 A N +ATOM 4376 HE ARG A 371 5.026 7.493 -7.242 1.00 15.00 A H +ATOM 4377 CZ ARG A 371 6.132 5.849 -7.476 1.00 15.00 A C +ATOM 4378 NH1 ARG A 371 7.323 5.289 -7.300 1.00 15.00 A N +ATOM 4379 HH11 ARG A 371 7.488 4.305 -7.595 1.00 15.00 A H +ATOM 4380 HH12 ARG A 371 8.095 5.836 -6.866 1.00 15.00 A H +ATOM 4381 NH2 ARG A 371 5.148 5.144 -8.024 1.00 15.00 A N +ATOM 4382 HH21 ARG A 371 4.211 5.576 -8.156 1.00 15.00 A H +ATOM 4383 HH22 ARG A 371 5.314 4.160 -8.320 1.00 15.00 A H +ATOM 4384 C ARG A 371 7.808 12.220 -3.942 1.00 15.00 A C +ATOM 4385 O ARG A 371 8.675 11.577 -3.351 1.00 15.00 A O +ATOM 4899 N TYR A 406 5.330 5.132 -1.775 1.00 15.00 A N +ATOM 4900 HN TYR A 406 6.187 4.655 -1.821 1.00 15.00 A H +ATOM 4901 CA TYR A 406 4.102 4.375 -1.596 1.00 15.00 A C +ATOM 4902 HA TYR A 406 3.392 4.716 -2.338 1.00 15.00 A H +ATOM 4903 CB TYR A 406 4.333 2.873 -1.781 1.00 15.00 A C +ATOM 4904 HB1 TYR A 406 3.541 2.332 -1.279 1.00 15.00 A H +ATOM 4905 HB2 TYR A 406 5.281 2.600 -1.343 1.00 15.00 A H +ATOM 4906 CG TYR A 406 4.344 2.420 -3.214 1.00 15.00 A C +ATOM 4907 CD1 TYR A 406 4.604 3.305 -4.249 1.00 15.00 A C +ATOM 4908 HD1 TYR A 406 4.801 4.337 -4.018 1.00 15.00 A H +ATOM 4909 CD2 TYR A 406 4.077 1.096 -3.531 1.00 15.00 A C +ATOM 4910 HD2 TYR A 406 3.857 0.397 -2.735 1.00 15.00 A H +ATOM 4911 CE1 TYR A 406 4.614 2.879 -5.563 1.00 15.00 A C +ATOM 4912 HE1 TYR A 406 4.819 3.587 -6.359 1.00 15.00 A H +ATOM 4913 CE2 TYR A 406 4.082 0.664 -4.840 1.00 15.00 A C +ATOM 4914 HE2 TYR A 406 3.876 -0.370 -5.068 1.00 15.00 A H +ATOM 4915 CZ TYR A 406 4.348 1.560 -5.852 1.00 15.00 A C +ATOM 4916 OH TYR A 406 4.351 1.135 -7.154 1.00 15.00 A O +ATOM 4917 HH TYR A 406 3.661 0.477 -7.277 1.00 15.00 A H +ATOM 4918 C TYR A 406 3.520 4.609 -0.223 1.00 15.00 A C +ATOM 4919 O TYR A 406 4.222 4.961 0.720 1.00 15.00 A O +ATOM 5885 C82 G39 B 500 2.819 -3.696 -13.410 1.00 15.00 B C +ATOM 5886 C81 G39 B 500 2.614 -2.210 -13.614 1.00 15.00 B C +ATOM 5887 C8 G39 B 500 2.781 -1.396 -12.332 1.00 15.00 B C +ATOM 5888 C9 G39 B 500 2.232 0.019 -12.571 1.00 15.00 B C +ATOM 5889 C91 G39 B 500 2.962 0.769 -13.674 1.00 15.00 B C +ATOM 5890 O7 G39 B 500 4.163 -1.386 -11.915 1.00 15.00 B O +ATOM 5891 C6 G39 B 500 4.385 -0.903 -10.572 1.00 15.00 B C +ATOM 5892 C7 G39 B 500 5.183 0.391 -10.617 1.00 15.00 B C +ATOM 5893 C2 G39 B 500 5.938 0.843 -9.591 1.00 15.00 B C +ATOM 5894 C1 G39 B 500 6.242 2.280 -9.477 1.00 15.00 B C +ATOM 5895 O1B G39 B 500 7.018 2.679 -8.575 1.00 15.00 B O +ATOM 5896 O1A G39 B 500 5.728 3.091 -10.288 1.00 15.00 B O +ATOM 5897 C3 G39 B 500 6.487 -0.125 -8.565 1.00 15.00 B C +ATOM 5898 C4 G39 B 500 5.591 -1.357 -8.396 1.00 15.00 B C +ATOM 5899 N4 G39 B 500 6.319 -2.354 -7.628 1.00 15.00 B N +ATOM 5900 HAB G39 B 500 7.286 -2.512 -7.822 1.00 15.00 B H +ATOM 5901 HAC G39 B 500 5.749 -3.064 -7.211 1.00 15.00 B H +ATOM 5902 HAA G39 B 500 6.464 -1.818 -6.796 1.00 15.00 B H +ATOM 5903 C5 G39 B 500 5.140 -1.940 -9.741 1.00 15.00 B C +ATOM 5904 N5 G39 B 500 4.304 -3.113 -9.549 1.00 15.00 B N +ATOM 5905 H07 G39 B 500 3.418 -2.924 -9.127 1.00 15.00 B H +ATOM 5906 C10 G39 B 500 4.676 -4.349 -9.904 1.00 15.00 B C +ATOM 5907 C11 G39 B 500 3.817 -5.457 -9.370 1.00 15.00 B C +ATOM 5908 O10 G39 B 500 5.647 -4.586 -10.611 1.00 15.00 B O +END diff --git a/integration_tests/test_alascan.py b/integration_tests/test_alascan.py index 82bb05ff4..e8046b7e6 100644 --- a/integration_tests/test_alascan.py +++ b/integration_tests/test_alascan.py @@ -27,6 +27,30 @@ def alascan_module(): yield alascan +@pytest.fixture +def alascan_module_protlig(): + """Return a default alascan module.""" + with tempfile.TemporaryDirectory() as tmpdir: + alascan = AlascanModule( + order=0, path=Path(tmpdir), initial_params=DEFAULT_ALASCAN_CONFIG + ) + alascan.params["int_cutoff"] = 3.5 + alascan.params["output_mutants"] = True + # Copy parameters and toplogy of the ligand + shutil.copy( + Path(GOLDEN_DATA, "ligand.top"), + Path(alascan.path, "ligand.top"), + ) + shutil.copy( + Path(GOLDEN_DATA, "ligand.param"), + Path(alascan.path, "ligand.param"), + ) + # Set the parameters to point the file + alascan.params["ligand_param_fname"] = Path(alascan.path, "ligand.param") + alascan.params["ligand_top_fname"] = Path(alascan.path, "ligand.top") + yield alascan + + class MockPreviousIO: def __init__(self, path): self.path = path @@ -70,6 +94,26 @@ def output(self): return None +class MockPreviousIO_protlig: + def __init__(self, path): + self.path = path + + def retrieve_models(self, individualize: bool = False): + fname = "protlig_complex_1.pdb" + shutil.copy( + Path(GOLDEN_DATA, fname), + Path(self.path, fname), + ) + model_list = [ + PDBFile(file_name=fname, path=self.path), + ] + + return model_list + + def output(self): + return None + + def test_alascan_default(alascan_module, mocker): """Test the alascan module.""" alascan_module.previous_io = MockPreviousIO(path=alascan_module.path) @@ -148,3 +192,47 @@ def test_alascan_mutation_resiudes(): config_allowed_resiudes = set(default_config["scan_residue"]["choices"]) script_allowed_resiudes = set(list(RES_CODES.keys())) assert config_allowed_resiudes == script_allowed_resiudes + + +def test_alascan_with_ligand_topar(alascan_module_protlig, mocker): + """Test the use of alascan in presence of a ligand.""" + alascan_module_protlig.previous_io = MockPreviousIO_protlig(path=alascan_module_protlig.path) + alascan_module_protlig.run() + + expected_csv = Path(alascan_module_protlig.path, "scan_protlig_complex_1.tsv") + expected_clt_csv = Path(alascan_module_protlig.path, "scan_clt_unclustered.tsv") + + assert expected_csv.exists(), f"{expected_csv} does not exist" + assert expected_clt_csv.exists(), f"{expected_clt_csv} does not exist" + + # List mutated files + mutated_filepaths = list(Path(alascan_module_protlig.path).glob("protlig_complex_1-*.pdb")) + assert len(mutated_filepaths) >= 1 + + # Loop over files + for mutated_fpath in mutated_filepaths: + # Make sure the ligand is in it + file_content = mutated_fpath.read_text() + assert file_content.count("G39") > 20 + + +def test_alascan_without_ligand_topar(alascan_module, mocker): + """Test the use of alascan in presence of a ligand without topo/param.""" + alascan_module.previous_io = MockPreviousIO_protlig(path=alascan_module.path) + alascan_module.run() + + expected_csv = Path(alascan_module.path, "scan_protlig_complex_1.tsv") + expected_clt_csv = Path(alascan_module.path, "scan_clt_unclustered.tsv") + + assert expected_csv.exists(), f"{expected_csv} does not exist" + assert expected_clt_csv.exists(), f"{expected_clt_csv} does not exist" + + # List mutated files + mutated_filepaths = list(Path(alascan_module.path).glob("protlig_complex_1-*.pdb")) + assert len(mutated_filepaths) >= 1 + + # Loop over files + for mutated_fpath in mutated_filepaths: + # Make sure the ligand is not in it + file_content = mutated_fpath.read_text() + assert file_content.count("G39") == 0 diff --git a/src/haddock/clis/cli_score.py b/src/haddock/clis/cli_score.py index 5abb0a1e5..a981996bb 100644 --- a/src/haddock/clis/cli_score.py +++ b/src/haddock/clis/cli_score.py @@ -149,7 +149,7 @@ def main( from contextlib import suppress from pathlib import Path - from haddock import log + from haddock import log, EmptyPath from haddock.gear.haddockmodel import HaddockModel from haddock.gear.yaml2cfg import read_from_yaml_config from haddock.gear.zerofill import zero_fill @@ -168,23 +168,29 @@ def main( ems_dict = default_emscoring.copy() n_warnings = 0 for param, value in kwargs.items(): + # Check if the parameter name is in the emscoring module ones if param not in default_emscoring: sys.exit( f"* ERROR * Parameter {param!r} is not a " f"valid `emscoring` parameter.{os.linesep}" - f"Valid emscoring parameters are: {', '.join(sorted(default_emscoring))}" + "Valid emscoring parameters are: " + f"{', '.join(sorted(default_emscoring))}" ) + # Compare the user-given value to the default one if value != default_emscoring[param]: print( - f"* ATTENTION * Value ({value}) of parameter {param} different from default ({default_emscoring[param]})" - ) # noqa:E501 + f"* ATTENTION * Value ({value}) of parameter {param} " + f"different from default ({default_emscoring[param]})" + ) # get the type of default value default_type = type(default_emscoring[param]) - # convert the value to the same type + # cast the value to the same type if default_type == bool: if value.lower() not in ["true", "false"]: sys.exit(f"* ERROR * Boolean parameter {param} should be True or False") value = value.lower() == "true" + elif param.endswith("_fname"): + value = EmptyPath() if str(value) == "" else Path(value).resolve() else: value = default_type(value) ems_dict[param] = value @@ -210,9 +216,14 @@ def main( # create a copy of the input pdb input_pdb_copy = Path(tmp.name) shutil.copy(input_pdb, input_pdb_copy) - - params = { - "topoaa": {"molecules": [input_pdb_copy]}, + + # Setting up a full workflow set of parameters + workflow_params = { + "topoaa": { + "molecules": [input_pdb_copy], + "ligand_param_fname": ems_dict["ligand_param_fname"], + "ligand_top_fname": ems_dict["ligand_top_fname"], + }, "emscoring": ems_dict, } @@ -221,13 +232,13 @@ def main( # run workflow with working_directory(run_dir): workflow = WorkflowManager( - workflow_params=params, + workflow_params=workflow_params, start=0, run_dir=run_dir, ) - workflow.run() + # Build expected pdb filepath minimized_mol = Path(run_dir, "1_emscoring", "emscoring_1.pdb") haddock_score_component_dic = HaddockModel(minimized_mol).energies @@ -237,6 +248,7 @@ def main( air = haddock_score_component_dic["air"] bsa = haddock_score_component_dic["bsa"] + # Compute the haddock score # emscoring is equivalent to itw haddock_score_itw = ( ems_dict["w_vdw"] * vdw diff --git a/src/haddock/modules/analysis/alascan/__init__.py b/src/haddock/modules/analysis/alascan/__init__.py index b0327dfa7..7c73aabb5 100644 --- a/src/haddock/modules/analysis/alascan/__init__.py +++ b/src/haddock/modules/analysis/alascan/__init__.py @@ -118,7 +118,7 @@ def _run(self): mutation_res=self.params["scan_residue"], model=model, params=self.params, - library_mode = False + library_mode=False, ) for model in models ] @@ -202,4 +202,4 @@ def _run(self): # Send models to the next step, no operation is done on them self.output_models = models - self.export_io_models() \ No newline at end of file + self.export_io_models() diff --git a/src/haddock/modules/analysis/alascan/defaults.yaml b/src/haddock/modules/analysis/alascan/defaults.yaml index 52b520a28..649a7ffc5 100644 --- a/src/haddock/modules/analysis/alascan/defaults.yaml +++ b/src/haddock/modules/analysis/alascan/defaults.yaml @@ -67,4 +67,21 @@ output_mutants: short: Dump the mutated, energy-minimized PDB files. long: Dump the mutated, energy-minimized PDB files. As the number of mutants can be very large, this option is allowed only when a single model is provided in input. group: analysis - explevel: easy \ No newline at end of file + explevel: easy +ligand_param_fname: + default: '' + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: Ligand parameter file in CNS format, for any ligand/residues/molecules not supported by default by HADDOCK. + group: 'force field' + explevel: easy +ligand_top_fname: + default: '' + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy diff --git a/src/haddock/modules/analysis/alascan/scan.py b/src/haddock/modules/analysis/alascan/scan.py index 5089dd616..dc7ae060f 100644 --- a/src/haddock/modules/analysis/alascan/scan.py +++ b/src/haddock/modules/analysis/alascan/scan.py @@ -108,10 +108,10 @@ def mutate(pdb_f, target_chain, target_resid, mut_resname): Path to the mutated pdb file. """ mut_pdb_l = [] - resname = '' - with open(pdb_f, 'r') as fh: + resname = "" + with open(pdb_f, "r") as fh: for line in fh.readlines(): - if line.startswith('ATOM'): + if line.startswith("ATOM"): chain = line[21] resid = int(line[22:26]) atom_name = line[12:16].strip() @@ -125,44 +125,65 @@ def mutate(pdb_f, target_chain, target_resid, mut_resname): else: mut_pdb_l.append(line) try: - mut_id = f'{RES_CODES[resname]}{target_resid}{RES_CODES[mut_resname]}' + mut_id = f"{RES_CODES[resname]}{target_resid}{RES_CODES[mut_resname]}" except KeyError: raise KeyError(f"Could not mutate {resname} into {mut_resname}.") mut_pdb_fname = Path( - pdb_f.name.replace('.pdb', f'-{target_chain}_{mut_id}.pdb')) - with open(mut_pdb_fname, 'w') as fh: - fh.write(''.join(mut_pdb_l)) + pdb_f.name.replace(".pdb", f"-{target_chain}_{mut_id}.pdb")) + with open(mut_pdb_fname, "w") as fh: + fh.write("".join(mut_pdb_l)) return mut_pdb_fname -def get_score_string(pdb_f, run_dir, outputpdb=False): +def get_score_string( + pdb_f: str, + run_dir: str, + outputpdb: bool = False, + ligand_param_fname: Union[Path, str] = "", + ligand_top_fname: Union[Path, str] = "", + ) -> List[str]: """Get score output from cli_score.main. Parameters ---------- pdb_f : str Path to the pdb file. - run_dir : str Path to the run directory. - outputpdb : bool, optional If True, the output, energy-minimized pdb file will be written. Default is False. + ligand_param_fname : Union[Path, str] + Path to additional parameter file used by CNS. + ligand_top_fname : Union[Path, str] + Path to additional topology file used by CNS. Returns ------- - out : list + out : list[str] List of strings with the score output. """ - f = io.StringIO() - with redirect_stdout(f): - cli_score.main(pdb_f, run_dir, full=True, outputpdb=outputpdb) - out = f.getvalue().split(os.linesep) + stdout = io.StringIO() + with redirect_stdout(stdout): + cli_score.main( + pdb_f, + run_dir, + full=True, + outputpdb=outputpdb, + ligand_param_fname=ligand_param_fname, + ligand_top_fname=ligand_top_fname, + ) + out = stdout.getvalue().split(os.linesep) return out -def calc_score(pdb_f, run_dir, outputpdb=False): +def calc_score( + pdb_f: str, + run_dir: str, + outputpdb: bool = False, + ligand_param_fname: Union[Path, str] = "", + ligand_top_fname: Union[Path, str] = "", + ) -> Tuple[float, float, float, float, float]: """Calculate the score of a model. Parameters @@ -174,9 +195,15 @@ def calc_score(pdb_f, run_dir, outputpdb=False): outputpdb : bool, optional If True, the output, energy-minimized pdb file will be written. Default is False. - + ligand_param_fname : Union[Path, str] + Path to additional parameter file used by CNS + ligand_top_fname : Union[Path, str] + Path to additional topology file used by CNS + Returns ------- + Tuple[float, float, float, float, float] + All the scores score : float Haddock score. vdw : float @@ -186,11 +213,21 @@ def calc_score(pdb_f, run_dir, outputpdb=False): desolv : float Desolvation energy. bsa : float - Buried surface area. - """ - out_string = get_score_string(pdb_f, run_dir, outputpdb=outputpdb) + Buried surface area. - for ln in out_string: + Raises + ------ + FileNotFoundError + Error when the file could not be located. + """ + scores_strings = get_score_string( + pdb_f, run_dir, + outputpdb=outputpdb, + ligand_param_fname=ligand_param_fname, + ligand_top_fname=ligand_top_fname, + ) + # Loop over lines to search for the score and components + for ln in scores_strings: if ln.startswith("> HADDOCK-score (emscoring)"): score = float(ln.split()[-1]) if ln.startswith("> vdw"): @@ -669,6 +706,8 @@ def __init__( self.library_mode = library_mode self.params = params or {} self.point_mutations_jobs = [] + self.ligand_param_fname = self.params.get("ligand_param_fname", "") + self.ligand_top_fname = self.params.get("ligand_top_fname", "") self.filter_resdic = { key[-1]: value for key, value in self.params.items() @@ -696,7 +735,13 @@ def run(self): # Calculate native scores sc_dir = f"haddock3-score-{self.model_id}-{os.getpid()}" try: - native_scores = calc_score(self.model_path, run_dir=sc_dir, outputpdb=False) + native_scores = calc_score( + self.model_path, + run_dir=sc_dir, + outputpdb=False, + ligand_param_fname=self.ligand_param_fname, + ligand_top_fname=self.ligand_top_fname, + ) finally: if os.path.exists(sc_dir): shutil.rmtree(sc_dir) @@ -731,7 +776,11 @@ def run(self): # if (user defined target chains) & (no user target residues) - do use user chains elif user_chains: - interface = {chain: res for chain, res in interface.items() if chain in user_chains} + interface = { + chain: res + for chain, res in interface.items() + if chain in user_chains + } # get all atoms of the model to verifiy residue type down the line resname_dict = {} @@ -757,7 +806,9 @@ def run(self): ori_resname=ori_resname, target_resname=end_resname, native_scores=native_scores, - output_mutants=output_mutants + output_mutants=output_mutants, + ligand_param_fname=self.ligand_param_fname, + ligand_top_fname=self.ligand_top_fname, ) self.point_mutations_jobs.append(job) @@ -804,7 +855,9 @@ def __init__( ori_resname: str, target_resname: str, native_scores: Tuple[float, float, float, float, float], - output_mutants: bool = False + output_mutants: bool = False, + ligand_param_fname: Union[Path, str] = "", + ligand_top_fname: Union[Path, str] = "", ) -> None: """ Initialize a single point mutation job. @@ -827,6 +880,10 @@ def __init__( Native model scores (score, vdw, elec, desolv, bsa) output_mutants : bool Whether to keep mutant PDB files + ligand_param_fname : Union[Path, str] + Path to additional parameter file used by CNS + ligand_top_fname : Union[Path, str] + Path to additional topology file used by CNS """ self.model_path = Path(model_path) self.model_id = model_id @@ -836,7 +893,9 @@ def __init__( self.target_resname = target_resname self.native_scores = native_scores self.output_mutants = output_mutants - + self.ligand_param_fname = ligand_param_fname + self.ligand_top_fname = ligand_top_fname + def run(self): """Execute the point mutation.""" mutation_id = f"{self.model_id}_{self.chain}{self.resid}{self.target_resname}" @@ -846,11 +905,17 @@ def run(self): sc_dir = f"haddock3-score-{mutation_id}" os.makedirs(sc_dir, exist_ok=True) - # Perform mutation + # Perform point mutation on pdb file mut_pdb = mutate(self.model_path, self.chain, self.resid, self.target_resname) # Calculate mutant scores - mutant_scores = calc_score(mut_pdb, run_dir=sc_dir, outputpdb=self.output_mutants) + mutant_scores = calc_score( + mut_pdb, + run_dir=sc_dir, + outputpdb=self.output_mutants, + ligand_param_fname=self.ligand_param_fname, + ligand_top_fname=self.ligand_top_fname, + ) # Calculate deltas (native - mutant) n_score, n_vdw, n_elec, n_des, n_bsa = self.native_scores