bfee2 2.5.0__py3-none-any.whl → 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bfee2 might be problematic. Click here for more details.
- BFEE2/commonTools/commonSlots.py +1 -1
- BFEE2/gui.py +326 -12
- BFEE2/inputGenerator.py +236 -201
- BFEE2/postTreatment.py +156 -0
- BFEE2/templates_namd/configTemplate.py +10 -6
- BFEE2/templates_namd/fep_lddm.tcl +312 -0
- BFEE2/templates_namd/scriptTemplate.py +155 -0
- BFEE2/third_party/py_bar.py +251 -1
- BFEE2/version.py +2 -2
- {bfee2-2.5.0.data → bfee2-3.0.0.data}/scripts/BFEE2Gui.py +19 -18
- {bfee2-2.5.0.dist-info → bfee2-3.0.0.dist-info}/METADATA +84 -76
- {bfee2-2.5.0.dist-info → bfee2-3.0.0.dist-info}/RECORD +15 -14
- {bfee2-2.5.0.dist-info → bfee2-3.0.0.dist-info}/WHEEL +1 -1
- {bfee2-2.5.0.dist-info → bfee2-3.0.0.dist-info/licenses}/LICENSE +0 -0
- {bfee2-2.5.0.dist-info → bfee2-3.0.0.dist-info}/top_level.txt +0 -0
BFEE2/commonTools/commonSlots.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# simple and general slots called by gui.py
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from PySide6.QtWidgets import QLineEdit, QFileDialog, QMessageBox
|
|
4
4
|
|
|
5
5
|
def openFileDialog(fileType, lineEdit):
|
|
6
6
|
"""return a openFile function that opens special type of files
|
BFEE2/gui.py
CHANGED
|
@@ -8,9 +8,9 @@ import webbrowser
|
|
|
8
8
|
import numpy as np
|
|
9
9
|
# use appdirs to manage persistent configuration
|
|
10
10
|
from appdirs import user_config_dir
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
11
|
+
from PySide6 import QtCore
|
|
12
|
+
from PySide6.QtGui import QFont, QIcon, QAction
|
|
13
|
+
from PySide6.QtWidgets import ( QApplication, QCheckBox, QComboBox,
|
|
14
14
|
QFileDialog, QGridLayout, QGroupBox,
|
|
15
15
|
QHBoxLayout, QLabel, QLineEdit, QListWidget,
|
|
16
16
|
QMainWindow, QMessageBox, QPushButton,
|
|
@@ -456,7 +456,8 @@ class alchemicalAdvancedSettings(QWidget):
|
|
|
456
456
|
|
|
457
457
|
# strategy settings
|
|
458
458
|
self.strategy = QGroupBox('Strategy settings')
|
|
459
|
-
self.strategyLayout =
|
|
459
|
+
self.strategyLayout = QVBoxLayout()
|
|
460
|
+
self.strategyLine1Layout = QHBoxLayout()
|
|
460
461
|
|
|
461
462
|
self.considerRMSDCVCheckbox = QCheckBox('Take into account RMSD CV')
|
|
462
463
|
self.considerRMSDCVCheckbox.setChecked(True)
|
|
@@ -464,8 +465,14 @@ class alchemicalAdvancedSettings(QWidget):
|
|
|
464
465
|
self.reEqCheckbox = QCheckBox('Re-equilibration after histogram')
|
|
465
466
|
self.reEqCheckbox.setChecked(False)
|
|
466
467
|
|
|
467
|
-
self.
|
|
468
|
-
self.
|
|
468
|
+
self.LDDMCheckbox = QCheckBox('Use LDDM strategy')
|
|
469
|
+
self.LDDMCheckbox.setChecked(False)
|
|
470
|
+
|
|
471
|
+
self.strategyLine1Layout.addWidget(self.considerRMSDCVCheckbox)
|
|
472
|
+
self.strategyLine1Layout.addWidget(self.reEqCheckbox)
|
|
473
|
+
|
|
474
|
+
self.strategyLayout.addLayout(self.strategyLine1Layout)
|
|
475
|
+
self.strategyLayout.addWidget(self.LDDMCheckbox)
|
|
469
476
|
self.strategy.setLayout(self.strategyLayout)
|
|
470
477
|
|
|
471
478
|
# membrane protein
|
|
@@ -506,10 +513,36 @@ class alchemicalAdvancedSettings(QWidget):
|
|
|
506
513
|
self.mainLayout.addLayout(self.alchemicalAdvancedSettingsButtonLayout)
|
|
507
514
|
self.setLayout(self.mainLayout)
|
|
508
515
|
|
|
516
|
+
# below are slow functions
|
|
517
|
+
def _toggleLDDMBox(self, checked):
|
|
518
|
+
"""when enable LDDM, restraint simulations and considering RMSD are not needed, and
|
|
519
|
+
re-equilbration and double-wide simulations are necessary.
|
|
520
|
+
"""
|
|
521
|
+
|
|
522
|
+
if checked:
|
|
523
|
+
self.boundRestraintsLineEdit.setEnabled(False)
|
|
524
|
+
self.unboundRestraintsLineEdit.setEnabled(False)
|
|
525
|
+
self.considerRMSDCVCheckbox.setChecked(False)
|
|
526
|
+
self.considerRMSDCVCheckbox.setEnabled(False)
|
|
527
|
+
self.reEqCheckbox.setChecked(True)
|
|
528
|
+
self.reEqCheckbox.setEnabled(False)
|
|
529
|
+
self.doubleWideCheckbox.setChecked(True)
|
|
530
|
+
self.doubleWideCheckbox.setEnabled(False)
|
|
531
|
+
self.minBeforeSampleCheckbox.setChecked(False)
|
|
532
|
+
self.minBeforeSampleCheckbox.setEnabled(False)
|
|
533
|
+
else:
|
|
534
|
+
self.boundRestraintsLineEdit.setEnabled(True)
|
|
535
|
+
self.unboundRestraintsLineEdit.setEnabled(True)
|
|
536
|
+
self.considerRMSDCVCheckbox.setEnabled(True)
|
|
537
|
+
self.reEqCheckbox.setEnabled(True)
|
|
538
|
+
self.doubleWideCheckbox.setEnabled(True)
|
|
539
|
+
self.minBeforeSampleCheckbox.setEnabled(True)
|
|
540
|
+
|
|
509
541
|
def _initSingalsSlots(self):
|
|
510
542
|
"""initialize (connect) signals and slots for the alchemical advanced settings
|
|
511
543
|
"""
|
|
512
544
|
|
|
545
|
+
self.LDDMCheckbox.toggled.connect(self._toggleLDDMBox)
|
|
513
546
|
self.alchemicalAdvancedSettingsOKButton.clicked.connect(self.close)
|
|
514
547
|
|
|
515
548
|
class mainUI(QMainWindow):
|
|
@@ -531,6 +564,7 @@ class mainUI(QMainWindow):
|
|
|
531
564
|
|
|
532
565
|
self._initGeometricTab()
|
|
533
566
|
self._initAlchemicalTab()
|
|
567
|
+
self._initLDDMTab()
|
|
534
568
|
self._initPostTreatmentTab()
|
|
535
569
|
|
|
536
570
|
self._initSingalsSlots()
|
|
@@ -571,6 +605,35 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
571
605
|
self.exitAction.setStatusTip('Exit application')
|
|
572
606
|
self.exitAction.triggered.connect(QApplication.quit)
|
|
573
607
|
|
|
608
|
+
# quick settings
|
|
609
|
+
# geometrical protein protein
|
|
610
|
+
self.quickGeometricProteinProteinAction = QAction('Protein-Protein / Geometrical')
|
|
611
|
+
self.quickGeometricProteinProteinAction.setStatusTip(
|
|
612
|
+
'Change settings for geometrical protein-protein binding free-energy calculations'
|
|
613
|
+
)
|
|
614
|
+
self.quickGeometricProteinProteinAction.triggered.connect(self._quickSetProteinProteinGeometric)
|
|
615
|
+
|
|
616
|
+
# geometrical protein ligand
|
|
617
|
+
self.quickGeometricProteinLigandAction = QAction('Protein-Ligand / Geometrical')
|
|
618
|
+
self.quickGeometricProteinLigandAction.setStatusTip(
|
|
619
|
+
'Change settings for geometrical protein-ligand binding free-energy calculations'
|
|
620
|
+
)
|
|
621
|
+
self.quickGeometricProteinLigandAction.triggered.connect(self._quickSetProteinLigandGeometric)
|
|
622
|
+
|
|
623
|
+
# alchemical protein ligand
|
|
624
|
+
self.quickAlchemicalProteinLigandAction = QAction('Protein-Ligand / Alchemical')
|
|
625
|
+
self.quickAlchemicalProteinLigandAction.setStatusTip(
|
|
626
|
+
'Change settings for alchemical protein-ligand binding free-energy calculations'
|
|
627
|
+
)
|
|
628
|
+
self.quickAlchemicalProteinLigandAction.triggered.connect(self._quickSetProteinLigandAlchemical)
|
|
629
|
+
|
|
630
|
+
# LDDM
|
|
631
|
+
self.quickLDDMProteinLigandAction = QAction('Protein-Ligand / LDDM')
|
|
632
|
+
self.quickLDDMProteinLigandAction.setStatusTip(
|
|
633
|
+
'Change settings for protein-ligand binding free-energy calculations using the LDDM strategy'
|
|
634
|
+
)
|
|
635
|
+
self.quickLDDMProteinLigandAction.triggered.connect(self._quickSetProteinLigandLDDM)
|
|
636
|
+
|
|
574
637
|
# help
|
|
575
638
|
self.helpAction = QAction('&Help', self)
|
|
576
639
|
self.helpAction.setStatusTip('Open user manual')
|
|
@@ -602,6 +665,12 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
602
665
|
self.fileMenu.addSeparator()
|
|
603
666
|
self.fileMenu.addAction(self.exitAction)
|
|
604
667
|
|
|
668
|
+
self.quickSettingsMenu = menubar.addMenu('&Quick Settings')
|
|
669
|
+
self.quickSettingsMenu.addAction(self.quickGeometricProteinProteinAction)
|
|
670
|
+
self.quickSettingsMenu.addAction(self.quickGeometricProteinLigandAction)
|
|
671
|
+
self.quickSettingsMenu.addAction(self.quickAlchemicalProteinLigandAction)
|
|
672
|
+
self.quickSettingsMenu.addAction(self.quickLDDMProteinLigandAction)
|
|
673
|
+
|
|
605
674
|
self.helpMenu = menubar.addMenu('&Help')
|
|
606
675
|
self.helpMenu.addAction(self.helpAction)
|
|
607
676
|
self.helpMenu.addAction(self.pythonAPIAction)
|
|
@@ -868,6 +937,7 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
868
937
|
|
|
869
938
|
self.postTreatmentMainTabs.addTab(self.geometricTab, 'Geometric')
|
|
870
939
|
self.postTreatmentMainTabs.addTab(self.alchemicalTab, 'Alchemical')
|
|
940
|
+
self.postTreatmentMainTabs.addTab(self.LDDMTab, 'LDDM')
|
|
871
941
|
|
|
872
942
|
self.postTreatmentMainLayout = QVBoxLayout()
|
|
873
943
|
self.postTreatmentMainLayout.addWidget(self.postTreatmentMainTabs)
|
|
@@ -1174,6 +1244,7 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
1174
1244
|
self.alchemicalPostTypeBox = QComboBox()
|
|
1175
1245
|
self.alchemicalPostTypeBox.addItem('FEP')
|
|
1176
1246
|
self.alchemicalPostTypeBox.addItem('BAR')
|
|
1247
|
+
self.alchemicalPostTypeBox.setCurrentIndex(1)
|
|
1177
1248
|
|
|
1178
1249
|
self.alchemicalRCLayout.addWidget(self.alchemicalRCThetaLabel)
|
|
1179
1250
|
self.alchemicalRCLayout.addWidget(self.alchemicalRCThetaLineEdit)
|
|
@@ -1193,6 +1264,94 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
1193
1264
|
self.alchemicalTabLayout.addWidget(self.alchemicalRestraintCenters)
|
|
1194
1265
|
self.alchemicalTab.setLayout(self.alchemicalTabLayout)
|
|
1195
1266
|
|
|
1267
|
+
def _initLDDMTab(self):
|
|
1268
|
+
"""initialize LDDM tab of post-treatment
|
|
1269
|
+
"""
|
|
1270
|
+
|
|
1271
|
+
self.LDDMTab = QWidget()
|
|
1272
|
+
self.LDDMTabLayout = QVBoxLayout()
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
self.LDDMSimulationInputs = QGroupBox('Inputs for LDDM simulations:')
|
|
1276
|
+
self.LDDMSimulationInputsLayout = QVBoxLayout()
|
|
1277
|
+
|
|
1278
|
+
# step 1
|
|
1279
|
+
self.LDDMStep1Label = QLabel('Step 1:')
|
|
1280
|
+
self.LDDMStep1Layout = QGridLayout()
|
|
1281
|
+
|
|
1282
|
+
self.LDDMStep1ColvarsLabel = QLabel('colvars.in.tmp file:')
|
|
1283
|
+
self.LDDMStep1ColvarsLineEdit = QLineEdit()
|
|
1284
|
+
self.LDDMStep1ColvarsButton = QPushButton('Browse')
|
|
1285
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsLabel, 0, 0)
|
|
1286
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsLineEdit, 0, 1)
|
|
1287
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsButton, 0, 2)
|
|
1288
|
+
|
|
1289
|
+
self.LDDMStep1ColvarsTrajLabel = QLabel('colvars.traj file:')
|
|
1290
|
+
self.LDDMStep1ColvarsTrajLineEdit = QLineEdit()
|
|
1291
|
+
self.LDDMStep1ColvarsTrajButton = QPushButton('Browse')
|
|
1292
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsTrajLabel, 1, 0)
|
|
1293
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsTrajLineEdit, 1, 1)
|
|
1294
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1ColvarsTrajButton, 1, 2)
|
|
1295
|
+
|
|
1296
|
+
self.LDDMStep1FepoutLabel = QLabel('fepout file:')
|
|
1297
|
+
self.LDDMStep1FepoutLineEdit = QLineEdit()
|
|
1298
|
+
self.LDDMStep1FepoutButton = QPushButton('Browse')
|
|
1299
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1FepoutLabel, 2, 0)
|
|
1300
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1FepoutLineEdit, 2, 1)
|
|
1301
|
+
self.LDDMStep1Layout.addWidget(self.LDDMStep1FepoutButton, 2, 2)
|
|
1302
|
+
|
|
1303
|
+
self.LDDMStep3Label = QLabel('Step 3:')
|
|
1304
|
+
self.LDDMStep3Layout = QGridLayout()
|
|
1305
|
+
|
|
1306
|
+
self.LDDMStep3FepoutLabel = QLabel('fepout file: ')
|
|
1307
|
+
self.LDDMStep3FepoutLineEdit = QLineEdit()
|
|
1308
|
+
self.LDDMStep3FepoutButton = QPushButton('Browse')
|
|
1309
|
+
self.LDDMStep3Layout.addWidget(self.LDDMStep3FepoutLabel, 0, 0)
|
|
1310
|
+
self.LDDMStep3Layout.addWidget(self.LDDMStep3FepoutLineEdit, 0, 1)
|
|
1311
|
+
self.LDDMStep3Layout.addWidget(self.LDDMStep3FepoutButton, 0, 2)
|
|
1312
|
+
|
|
1313
|
+
self.LDDMSimulationInputsLayout.addWidget(self.LDDMStep1Label)
|
|
1314
|
+
self.LDDMSimulationInputsLayout.addLayout(self.LDDMStep1Layout)
|
|
1315
|
+
self.LDDMSimulationInputsLayout.addWidget(self.LDDMStep3Label)
|
|
1316
|
+
self.LDDMSimulationInputsLayout.addLayout(self.LDDMStep3Layout)
|
|
1317
|
+
self.LDDMSimulationInputs.setLayout(self.LDDMSimulationInputsLayout)
|
|
1318
|
+
|
|
1319
|
+
# other parameter
|
|
1320
|
+
self.LDDMParameters = QGroupBox('Other parameters:')
|
|
1321
|
+
|
|
1322
|
+
# all widgets
|
|
1323
|
+
self.LDDMParametersLayout = QGridLayout()
|
|
1324
|
+
self.LDDMStep1StepsPerWindowLabel = QLabel('Steps per window (Step 1):')
|
|
1325
|
+
self.LDDMStep1StepsPerWindowLineEdit = QLineEdit('500000')
|
|
1326
|
+
self.LDDMStep1EquilStepsPerWindowLabel = QLabel('Equilbration per window (Step 1): ')
|
|
1327
|
+
self.LDDMStep1EquilStepsPerWindowLineEdit = QLineEdit('100000')
|
|
1328
|
+
self.LDDMStep1WindowsLabel = QLabel('Windows (Step 1): ')
|
|
1329
|
+
self.LDDMStep1WindowsLineEdit = QLineEdit('200')
|
|
1330
|
+
self.LDDMPostTemperatureLabel = QLabel('temperature:')
|
|
1331
|
+
self.LDDMPostTemperatureLineEdit = QLineEdit('300')
|
|
1332
|
+
self.LDDMPostTypeLabel = QLabel('Post-treatment type:')
|
|
1333
|
+
self.LDDMPostTypeBox = QComboBox()
|
|
1334
|
+
self.LDDMPostTypeBox.addItem('FEP')
|
|
1335
|
+
self.LDDMPostTypeBox.addItem('BAR')
|
|
1336
|
+
self.LDDMPostTypeBox.setCurrentIndex(1)
|
|
1337
|
+
|
|
1338
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1StepsPerWindowLabel, 0, 0)
|
|
1339
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1StepsPerWindowLineEdit, 0, 1)
|
|
1340
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1WindowsLabel, 0, 2)
|
|
1341
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1WindowsLineEdit, 0, 3)
|
|
1342
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1EquilStepsPerWindowLabel, 1, 0)
|
|
1343
|
+
self.LDDMParametersLayout.addWidget(self.LDDMStep1EquilStepsPerWindowLineEdit, 1, 1)
|
|
1344
|
+
self.LDDMParametersLayout.addWidget(self.LDDMPostTemperatureLabel, 1, 2)
|
|
1345
|
+
self.LDDMParametersLayout.addWidget(self.LDDMPostTemperatureLineEdit, 1, 3)
|
|
1346
|
+
self.LDDMParametersLayout.addWidget(self.LDDMPostTypeLabel, 2, 0)
|
|
1347
|
+
self.LDDMParametersLayout.addWidget(self.LDDMPostTypeBox, 2, 1)
|
|
1348
|
+
|
|
1349
|
+
self.LDDMParameters.setLayout(self.LDDMParametersLayout)
|
|
1350
|
+
|
|
1351
|
+
self.LDDMTabLayout.addWidget(self.LDDMSimulationInputs)
|
|
1352
|
+
self.LDDMTabLayout.addWidget(self.LDDMParameters)
|
|
1353
|
+
self.LDDMTab.setLayout(self.LDDMTabLayout)
|
|
1354
|
+
|
|
1196
1355
|
def _initQuickPlotTab(self):
|
|
1197
1356
|
"""initialize quick-plot tab
|
|
1198
1357
|
"""
|
|
@@ -1407,11 +1566,12 @@ Please use the same or a later version of NAMD if you have any problem.\n'
|
|
|
1407
1566
|
the Free Software Foundation, either version 3 of the License, or
|
|
1408
1567
|
(at your option) any later version.<br>
|
|
1409
1568
|
<b>Reference:</b><br>
|
|
1410
|
-
<b>BFEE2:</b> Fu et al. Nat. Protoc. 2022, 17, 1114-1141 and Fu et al. J. Chem. Inf. Model. 2021, 61, 2116
|
|
1411
|
-
<b>Alchemical and geometric routes:</b> Gumbart et al. J. Chem. Theory Comput. 2013, 9, 794
|
|
1412
|
-
<b>WTM-eABF:</b> Fu et al. Acc. Chem. Res. 2019, 52, 3254
|
|
1413
|
-
<b>
|
|
1414
|
-
<b>
|
|
1569
|
+
<b>BFEE2:</b> Fu et al. Nat. Protoc. 2022, 17, 1114-1141 and Fu et al. J. Chem. Inf. Model. 2021, 61, 2116-2123<br>
|
|
1570
|
+
<b>Alchemical and geometric routes:</b> Gumbart et al. J. Chem. Theory Comput. 2013, 9, 794-802<br>
|
|
1571
|
+
<b>WTM-eABF:</b> Fu et al. Acc. Chem. Res. 2019, 52, 3254-3264 and Fu et al. J. Phys. Chem. Lett. 2018, 9, 4738-4745<br>
|
|
1572
|
+
<b>GaWTM-eABF:</b> Chen et al. J. Chem. Theory Comput. 2021, 17, 3886-3894<br>
|
|
1573
|
+
<b>Collective variables:</b> Fu et al. J. Chem. Theory Comput. 2017, 13, 5173-5178<br>
|
|
1574
|
+
<b>Streamlined geometric route:</b> Fu et al. J. Chem. Inf. Model. 2023, 63, 2512-2519<br>
|
|
1415
1575
|
''')
|
|
1416
1576
|
return f
|
|
1417
1577
|
|
|
@@ -1588,6 +1748,84 @@ Standard Binding Free Energy:\n\
|
|
|
1588
1748
|
ΔG(total) = {result[5]:.2f} ± {errors[5]:.2f} kcal/mol\n'
|
|
1589
1749
|
)
|
|
1590
1750
|
|
|
1751
|
+
def _showLDDMResults(self, unit):
|
|
1752
|
+
"""calculate binding from the LDDM route,
|
|
1753
|
+
parameters in the LDDM tab will be read.
|
|
1754
|
+
Show a QMessageBox for the result
|
|
1755
|
+
|
|
1756
|
+
Args:
|
|
1757
|
+
unit (str): 'namd' or 'gromacs'
|
|
1758
|
+
"""
|
|
1759
|
+
|
|
1760
|
+
pTreat = postTreatment.postTreatment(
|
|
1761
|
+
float(self.LDDMPostTemperatureLineEdit.text()), unit, 'LDDM')
|
|
1762
|
+
|
|
1763
|
+
# alchemical outputs
|
|
1764
|
+
try:
|
|
1765
|
+
temperature = float(self.LDDMPostTemperatureLineEdit.text())
|
|
1766
|
+
except:
|
|
1767
|
+
QMessageBox.warning(self, 'Error', f'temperature input error!')
|
|
1768
|
+
return
|
|
1769
|
+
if self.LDDMPostTypeBox.currentText() == 'FEP':
|
|
1770
|
+
jobType = 'fep'
|
|
1771
|
+
elif self.LDDMPostTypeBox.currentText() == 'BAR':
|
|
1772
|
+
jobType = 'bar'
|
|
1773
|
+
|
|
1774
|
+
# check inputs
|
|
1775
|
+
rigid_ligand = False
|
|
1776
|
+
for index, item in enumerate([
|
|
1777
|
+
self.LDDMStep1ColvarsLineEdit.text(),
|
|
1778
|
+
self.LDDMStep1ColvarsTrajLineEdit.text(),
|
|
1779
|
+
self.LDDMStep1FepoutLineEdit.text(),
|
|
1780
|
+
self.LDDMStep3FepoutLineEdit.text()
|
|
1781
|
+
]):
|
|
1782
|
+
if (not os.path.exists(item)) and (index != 3):
|
|
1783
|
+
QMessageBox.warning(self, 'Error', f'{item} does not exist and is not empty!')
|
|
1784
|
+
return
|
|
1785
|
+
|
|
1786
|
+
try:
|
|
1787
|
+
int(self.LDDMStep1StepsPerWindowLineEdit.text())
|
|
1788
|
+
int(self.LDDMStep1EquilStepsPerWindowLineEdit.text())
|
|
1789
|
+
int(self.LDDMStep1WindowsLineEdit.text())
|
|
1790
|
+
except:
|
|
1791
|
+
QMessageBox.warning(self, 'Error', f'Invalid value in LDDM parameters!')
|
|
1792
|
+
return
|
|
1793
|
+
|
|
1794
|
+
# calculate free energies
|
|
1795
|
+
try:
|
|
1796
|
+
step1_result, step3_result = pTreat.LDDMBindingFreeEnergy(
|
|
1797
|
+
self.LDDMStep1ColvarsLineEdit.text(),
|
|
1798
|
+
self.LDDMStep1ColvarsTrajLineEdit.text(),
|
|
1799
|
+
self.LDDMStep1FepoutLineEdit.text(),
|
|
1800
|
+
int(self.LDDMStep1StepsPerWindowLineEdit.text()),
|
|
1801
|
+
int(self.LDDMStep1EquilStepsPerWindowLineEdit.text()),
|
|
1802
|
+
int(self.LDDMStep1WindowsLineEdit.text()) + 1,
|
|
1803
|
+
self.LDDMStep3FepoutLineEdit.text(),
|
|
1804
|
+
temperature = temperature,
|
|
1805
|
+
jobType = jobType
|
|
1806
|
+
)
|
|
1807
|
+
except Exception as e:
|
|
1808
|
+
print(e)
|
|
1809
|
+
QMessageBox.warning(
|
|
1810
|
+
self,
|
|
1811
|
+
'Error',
|
|
1812
|
+
f'\
|
|
1813
|
+
LDDM result calculation failed! The error message is: \n\
|
|
1814
|
+
{e}\n'
|
|
1815
|
+
)
|
|
1816
|
+
|
|
1817
|
+
QMessageBox.about(
|
|
1818
|
+
self,
|
|
1819
|
+
'Result',
|
|
1820
|
+
f'\
|
|
1821
|
+
Results:\n\
|
|
1822
|
+
ΔG(Step 1) = {step1_result[0]:.2f} ± {step1_result[1]:.2f} kcal/mol\n\
|
|
1823
|
+
ΔG(Step 3) = {step3_result[0]:.2f} ± {step3_result[1]:.2f} kcal/mol\n\
|
|
1824
|
+
\n\
|
|
1825
|
+
Standard Binding Free Energy:\n\
|
|
1826
|
+
ΔG(total) = {step1_result[0] + step3_result[0]:.2f} ± {np.sqrt(step1_result[1]**2 + step3_result[1]**2):.2f} kcal/mol\n'
|
|
1827
|
+
)
|
|
1828
|
+
|
|
1591
1829
|
def _showFinalResults(self):
|
|
1592
1830
|
"""calculate binding free energy and show the final results
|
|
1593
1831
|
|
|
@@ -1605,11 +1843,15 @@ Standard Binding Free Energy:\n\
|
|
|
1605
1843
|
jobType = 'geometric'
|
|
1606
1844
|
elif self.postTreatmentMainTabs.currentIndex() == 1:
|
|
1607
1845
|
jobType = 'alchemical'
|
|
1846
|
+
elif self.postTreatmentMainTabs.currentIndex() == 2:
|
|
1847
|
+
jobType = 'LDDM'
|
|
1608
1848
|
|
|
1609
1849
|
if jobType == 'geometric':
|
|
1610
1850
|
self._showGeometricResults(unit)
|
|
1611
1851
|
elif jobType == 'alchemical':
|
|
1612
1852
|
self._showAlchemicalResults(unit)
|
|
1853
|
+
elif jobType == 'LDDM':
|
|
1854
|
+
self._showLDDMResults(unit)
|
|
1613
1855
|
|
|
1614
1856
|
return f
|
|
1615
1857
|
|
|
@@ -1829,7 +2071,8 @@ Unknown error! The error message is: \n\
|
|
|
1829
2071
|
self.alchemicalAdvancedSettings.considerRMSDCVCheckbox.isChecked(),
|
|
1830
2072
|
self.alchemicalAdvancedSettings.useCUDASOAIntegrator.isChecked(),
|
|
1831
2073
|
float(self.alchemicalAdvancedSettings.timestepLineEdit.text()),
|
|
1832
|
-
self.alchemicalAdvancedSettings.reEqCheckbox.isChecked()
|
|
2074
|
+
self.alchemicalAdvancedSettings.reEqCheckbox.isChecked(),
|
|
2075
|
+
self.alchemicalAdvancedSettings.LDDMCheckbox.isChecked()
|
|
1833
2076
|
)
|
|
1834
2077
|
except PermissionError:
|
|
1835
2078
|
QMessageBox.warning(
|
|
@@ -2068,7 +2311,71 @@ Unknown error!'
|
|
|
2068
2311
|
backwardProfile = np.transpose(pTreat._tiLogFile(backwardFilePath))
|
|
2069
2312
|
ploter.plotHysteresis(forwardProfile, backwardProfile)
|
|
2070
2313
|
return f
|
|
2314
|
+
|
|
2315
|
+
def _quickSetProteinProteinGeometric(self):
|
|
2316
|
+
"""quick setting for protein-protein binding free energy calculations through the geometrical route
|
|
2317
|
+
"""
|
|
2318
|
+
|
|
2319
|
+
self.selectMDEngineCombobox.setCurrentText("NAMD")
|
|
2320
|
+
self.selectStrategyCombobox.setCurrentText("Geometric")
|
|
2321
|
+
self.geometricAdvancedSettings.stratificationRLineEdit.setText("5")
|
|
2322
|
+
self.geometricAdvancedSettings.useCUDASOAIntegrator.setChecked(False)
|
|
2323
|
+
self.geometricAdvancedSettings.considerRMSDCVCheckbox.setChecked(False)
|
|
2324
|
+
self.geometricAdvancedSettings.useGaWTMCheckbox.setChecked(True)
|
|
2325
|
+
QMessageBox.information(self, 'Settings', f'Changed settings for protein-protein binding free-energy calculations \
|
|
2326
|
+
through the geometrical route!')
|
|
2327
|
+
|
|
2328
|
+
def _quickSetProteinLigandGeometric(self):
|
|
2329
|
+
"""quick setting for protein-ligand binding free energy calculations through the geometrical route
|
|
2330
|
+
"""
|
|
2331
|
+
|
|
2332
|
+
self.selectMDEngineCombobox.setCurrentText("NAMD")
|
|
2333
|
+
self.selectStrategyCombobox.setCurrentText("Geometric")
|
|
2334
|
+
self.geometricAdvancedSettings.stratificationRMSDBoundLineEdit.setText("3")
|
|
2335
|
+
self.geometricAdvancedSettings.stratificationRMSDUnboundLineEdit.setText("3")
|
|
2336
|
+
self.geometricAdvancedSettings.stratificationRLineEdit.setText("5")
|
|
2337
|
+
self.geometricAdvancedSettings.useCUDASOAIntegrator.setChecked(True)
|
|
2338
|
+
self.geometricAdvancedSettings.considerRMSDCVCheckbox.setChecked(True)
|
|
2339
|
+
self.geometricAdvancedSettings.useGaWTMCheckbox.setChecked(False)
|
|
2340
|
+
QMessageBox.information(self, 'Settings', f'Changed settings for protein-ligand binding free-energy calculations \
|
|
2341
|
+
through the geometrical route!')
|
|
2342
|
+
|
|
2343
|
+
def _quickSetProteinLigandAlchemical(self):
|
|
2344
|
+
"""quick setting for protein-ligand binding free energy calculations through the alchemical route
|
|
2345
|
+
"""
|
|
2346
|
+
|
|
2347
|
+
self.selectMDEngineCombobox.setCurrentText("NAMD")
|
|
2348
|
+
self.selectStrategyCombobox.setCurrentText("Alchemical")
|
|
2349
|
+
self.alchemicalAdvancedSettings.boundLigandLineEdit.setText("200")
|
|
2350
|
+
self.alchemicalAdvancedSettings.boundRestraintsLineEdit.setText("200")
|
|
2351
|
+
self.alchemicalAdvancedSettings.unboundLigandLineEdit.setText("100")
|
|
2352
|
+
self.alchemicalAdvancedSettings.unboundRestraintsLineEdit.setText("100")
|
|
2353
|
+
self.alchemicalAdvancedSettings.doubleWideCheckbox.setChecked(True)
|
|
2354
|
+
self.alchemicalAdvancedSettings.useCUDASOAIntegrator.setChecked(True)
|
|
2355
|
+
self.alchemicalAdvancedSettings.reEqCheckbox.setChecked(True)
|
|
2356
|
+
self.alchemicalAdvancedSettings.LDDMCheckbox.setChecked(False)
|
|
2357
|
+
self.alchemicalAdvancedSettings.considerRMSDCVCheckbox.setChecked(True)
|
|
2358
|
+
QMessageBox.information(self, 'Settings', f'Changed settings for protein-ligand binding free-energy calculations \
|
|
2359
|
+
through the alchemical route!')
|
|
2360
|
+
|
|
2361
|
+
def _quickSetProteinLigandLDDM(self):
|
|
2362
|
+
"""quick setting for protein-ligand binding free energy calculations through the alchemical route
|
|
2363
|
+
"""
|
|
2071
2364
|
|
|
2365
|
+
self.selectMDEngineCombobox.setCurrentText("NAMD")
|
|
2366
|
+
self.selectStrategyCombobox.setCurrentText("Alchemical")
|
|
2367
|
+
|
|
2368
|
+
self.alchemicalAdvancedSettings.pinDownProCheckbox.setChecked(True)
|
|
2369
|
+
self.alchemicalAdvancedSettings.useCUDASOAIntegrator.setChecked(True)
|
|
2370
|
+
|
|
2371
|
+
self.alchemicalAdvancedSettings.LDDMCheckbox.setChecked(True)
|
|
2372
|
+
|
|
2373
|
+
self.alchemicalAdvancedSettings.boundLigandLineEdit.setText('200')
|
|
2374
|
+
self.alchemicalAdvancedSettings.unboundLigandLineEdit.setText('100')
|
|
2375
|
+
|
|
2376
|
+
self.alchemicalAdvancedSettings.timestepLineEdit.setText('2.0')
|
|
2377
|
+
QMessageBox.information(self, 'Settings', f'Changed settings for protein-ligand binding free-energy calculations \
|
|
2378
|
+
through the LDDM!')
|
|
2072
2379
|
|
|
2073
2380
|
def _initSingalsSlots(self):
|
|
2074
2381
|
"""initialize (connect) singals and slots
|
|
@@ -2116,6 +2423,12 @@ Unknown error!'
|
|
|
2116
2423
|
self.alchemicalForwardButton4.clicked.connect(commonSlots.openFileDialog('fepout', self.alchemicalForwardLineEdit4))
|
|
2117
2424
|
self.alchemicalBackwardButton4.clicked.connect(commonSlots.openFileDialog('fepout', self.alchemicalBackwardLineEdit4))
|
|
2118
2425
|
|
|
2426
|
+
# LDDM tab
|
|
2427
|
+
self.LDDMStep1ColvarsButton.clicked.connect(commonSlots.openFileDialog('in.tmp', self.LDDMStep1ColvarsLineEdit))
|
|
2428
|
+
self.LDDMStep1ColvarsTrajButton.clicked.connect(commonSlots.openFileDialog('colvars.traj', self.LDDMStep1ColvarsTrajLineEdit))
|
|
2429
|
+
self.LDDMStep1FepoutButton.clicked.connect(commonSlots.openFileDialog('fepout', self.LDDMStep1FepoutLineEdit))
|
|
2430
|
+
self.LDDMStep3FepoutButton.clicked.connect(commonSlots.openFileDialog('in.tmp', self.LDDMStep3FepoutLineEdit))
|
|
2431
|
+
|
|
2119
2432
|
# generate input files
|
|
2120
2433
|
self.generateInputButton.clicked.connect(self._generateInputFiles())
|
|
2121
2434
|
|
|
@@ -2134,3 +2447,4 @@ Unknown error!'
|
|
|
2134
2447
|
self.plotHysteresisForwardButton.clicked.connect(commonSlots.openFileDialog('fepout/log', self.plotHysteresisForwardLineEdit))
|
|
2135
2448
|
self.plotHysteresisBackwardButton.clicked.connect(commonSlots.openFileDialog('fepout/log', self.plotHysteresisBackwardLineEdit))
|
|
2136
2449
|
self.plotHysteresisPlotButton.clicked.connect(self._plotHysteresis())
|
|
2450
|
+
|