From a8819a38d1e10b70d6fdadfea465dc1517736595 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bouysset?=
Date: Wed, 3 Oct 2018 17:51:13 +0200
Subject: [PATCH 01/65] fix on debug mode and made GUI install available
---
install.sh | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/install.sh b/install.sh
index d2f24f6..df6ffdb 100755
--- a/install.sh
+++ b/install.sh
@@ -41,6 +41,7 @@ _install(){
echo "ChemFlow successfully installed !"
else
echo "ChemFlow would be installed in $DESTINATION"
+ CHEMFLOW_HOME="$DESTINATION/ChemFlow"
if [ "$DESTINATION" != $(abspath "$PWD") ]; then
echo "Would copy files from $PWD to $DESTINATION/"
COPY=1
@@ -66,6 +67,7 @@ _update(){
echo "Update successful"
else
echo "ChemFlow would be updated to $DESTINATION"
+ CHEMFLOW_HOME="$DESTINATION/ChemFlow"
if [ "$DESTINATION" != $(abspath "$PWD") ]; then
echo "Would copy files from $PWD to $DESTINATION/"
COPY=1
@@ -76,9 +78,7 @@ _update(){
_install_gui(){
if [ -z "$1" ]; then
echo "Installing GUI from release $RELEASE"
- #TODO: uncomment when repository made public
- #wget -P /tmp/ https://github.com/IFMlab/ChemFlow/releases/download/${RELEASE}/${GUI_NAME}
- #mv /tmp/${GUI_NAME} ${CHEMFLOW_HOME}/bin/
+ wget -P ${CHEMFLOW_HOME}/bin/ https://github.com/IFMlab/ChemFlow/releases/download/${RELEASE}/${GUI_NAME}
else
echo "Would download GUI from release $RELEASE"
fi
@@ -140,11 +140,11 @@ _check(){
}
_help(){
-echo"\
+echo "\
Usage: $0
-h|--help : show this help message and quit
-d|--destination STR : install ChemFlow at the specified destination
- --gui : install GUI from release $RELEASE (not working yet)
+ --gui : install GUI from release $RELEASE
--debug : only verify the installation, don't do anything
"
}
From 3727c3bf2a3a4ca114242931ec9f1d6859fbfe90 Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Wed, 3 Oct 2018 19:58:40 +0200
Subject: [PATCH 02/65] Added a '--yes' option. This was required to
automatize. So far it only applies to a this place at DockFlow: "Continue
[y/n]".
---
ChemFlow/src/DockFlow_functions.bash | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ChemFlow/src/DockFlow_functions.bash b/ChemFlow/src/DockFlow_functions.bash
index 3a5c0bf..ce23903 100644
--- a/ChemFlow/src/DockFlow_functions.bash
+++ b/ChemFlow/src/DockFlow_functions.bash
@@ -772,6 +772,8 @@ JOB SCHEDULLER: ${JOB_SCHEDULLER}
OVERWRITE: ${OVERWRITE}
"
+if [ "${YESTOALL}" != 'yes' ] ; then
+
echo -n "
Continue [y/n]? "
read opt
@@ -779,6 +781,8 @@ case $opt in
"Y"|"YES"|"Yes"|"yes"|"y") ;;
*) echo "Exiting" ; exit 0 ;;
esac
+
+fi
}
@@ -841,6 +845,7 @@ DockFlow -r receptor.mol2 -l ligand.mol2 -p myproject --center X Y Z [--protocol
[ Additional ]
--overwrite : Overwrite results
+ --yes : Yes to all questions
[ Options for docking program ]
*--center LIST : xyz coordinates of the center of the binding site, separated by a space
@@ -998,6 +1003,9 @@ while [[ $# -gt 0 ]]; do
ARCHIVE='yes'
ARCHIVE_ALL="yes"
;;
+ "--yes")
+ YESTOALL='yes'
+ ;;
*)
unknown="$1" # unknown option
echo "Unknown flag \"$unknown\""
From dcaed9dc6d42282b30306fcf245f04c833b4444c Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Fri, 5 Oct 2018 10:48:35 +0200
Subject: [PATCH 03/65] Checking for pre-computed values either in ChemBase or
LigFlow folder was a huge bottleneck for large libraries. The ineficiency
came from .mol2 file checking AND "grep" the same file over and over, a huge
problem especially over Network file systems (clusters and HPC).
In my desktop it took:
~800 ligands - 1m 30s to compute
~30000 took > 5 minutes
@Mazinger it took:
~800 ligands - 5m 30s to compute
~30000 took > 15 minutes
This new implementation is orders of magnitude faster for two reasons:
1 - ChemBase and previous computed are stored in arrays. No more "grep".
2 - "for loops" were replaced by single line "case", which was amazingly faster.
---
ChemFlow/src/LigFlow_functions.bash | 110 ++++++++++++++++++++++------
1 file changed, 87 insertions(+), 23 deletions(-)
diff --git a/ChemFlow/src/LigFlow_functions.bash b/ChemFlow/src/LigFlow_functions.bash
index fb4908a..665e2cb 100644
--- a/ChemFlow/src/LigFlow_functions.bash
+++ b/ChemFlow/src/LigFlow_functions.bash
@@ -76,31 +76,52 @@ fi
}
+
LigFlow_filter_ligand_list() {
+
NEW_LIGAND_LIST=""
-for LIGAND in ${LIGAND_LIST[@]} ; do
- DONE_CHARGE="false"
+# Step 1 - Check if ChemBase and ChemBase.lst exist
+if [ -s ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.lst ] && [ -s ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.mol2 ] ; then
- if [ "${DONE_CHARGE}" == "false" ] && [ -s ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.lst ] && [ -s ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.mol2 ] ; then
- if [ "$(grep ${LIGAND} ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.lst)" == ${LIGAND} ] ; then
- DONE_CHARGE="true"
- fi
- fi
- if [ "${DONE_CHARGE}" == "false" ] && [ -f ${RUNDIR}/${CHARGE}/${LIGAND}.mol2 ] ; then
- DONE_CHARGE="true"
- fi
- if [ "${DONE_CHARGE}" == "false" ] ; then
- if [ ! -n "`echo ${NEW_LIGAND_LIST} | xargs -n1 echo | grep -e \"^${LIGAND}$\"`" ] ; then
- NEW_LIGAND_LIST="${NEW_LIGAND_LIST} $LIGAND"
- fi
- fi
-done
+ # Step 2 - Populate CHEMBASE_LIST
+ CHEMBASE_LIST=$(cat ${CHEMFLOW_HOME}/ChemBase/${CHARGE}/ChemBase_${CHARGE}.lst)
+ CHEMBASE_LIST=($CHEMBASE_LIST)
+else
+ CHEMBASE_LIST=''
+fi
+
+ # Step 3 - Populate COMPUTED_LIST of charges
+if [ -d ${RUNDIR}/${CHARGE}/ ] ; then
+ COMPUTED_LIST=$(ls -U ${RUNDIR}/${CHARGE}/ | sed s/\.mol2// )
+ COMPUTED_LIST=($COMPUTED_LIST)
+else
+ COMPUTED_LIST=''
+fi
+
+ # Step 3 - Check if LIGAND already exists on CHEMBASE
+ echo "Checking for precomputed charges. Please wait ..."
+
+ conter=0
+ for LIGAND in ${LIGAND_LIST[@]} ; do
+
+ # If found at LigFlow, proceed to next LIGAND.
+ case "${COMPUTED_LIST[@]}" in *"${LIGAND}"*) continue ;; esac
+
+ # If found at ChemBase, proceed to next LIGAND.
+ case "${CHEMBASE_LIST[@]}" in *"${LIGAND}"*) continue ;; esac
+
+ # Add list of ligands to compute
+ NEW_LIGAND_LIST[$counter]=${LIGAND}
+ let counter++
+
+ done
unset LIGAND_LIST
LIGAND_LIST=(${NEW_LIGAND_LIST[@]})
-}
+unset NEW_LIGAND_LIST
+}
LigFlow_write_HPC_header() {
#=== FUNCTION ================================================================
@@ -146,8 +167,10 @@ fi
LigFlow_prepare_ligands_charges() {
-# Actualize the ligand list
+
+# UPDATE the ligand list
LigFlow_filter_ligand_list
+
NCHARGE=${#LIGAND_LIST[@]}
if [ ${NCHARGE} == 0 ] ; then
@@ -156,12 +179,14 @@ else
echo "There are ${NLIGANDS} compounds and ${NCHARGE} remaining to prepare"
fi
+
cd ${RUNDIR}
if [ ! -d ${RUNDIR}/gas ] ; then
mkdir -p ${RUNDIR}/gas
fi
+
if [ ! -d ${RUNDIR}/${CHARGE} ] ; then
mkdir -p ${RUNDIR}/${CHARGE}
fi
@@ -172,6 +197,14 @@ case ${JOB_SCHEDULLER} in
rm -rf LigFlow.run
fi
+
+# By dgomes - 2018-10-04
+# Gastaiger charges are soon to be removed.
+# Their only reason to be here is to GUESS the charges from a sybyl .mol2.
+# - This GUESS has proven not to be valid (ex. many compounds from the Greenidge dataset)
+# - SmilesTo3D already adds Gastaiger charges to molecules, by default.
+# In addition, I noticed that antechamber "-c gas" will ignore any charge from "-nc".
+
for LIGAND in ${LIGAND_LIST[@]} ; do
if [ ! -f ${RUNDIR}/gas/${LIGAND}.mol2 ] ; then
echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/original/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/gas/${LIGAND}.mol2 -fo mol2 -c gas -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/" >> ${RUNDIR}/LigFlow.xargs
@@ -187,12 +220,24 @@ case ${JOB_SCHEDULLER} in
for LIGAND in ${LIGAND_LIST[@]} ; do
case ${CHARGE} in
"bcc")
+ if [ "${CHARGE_FILE}" == '' ] ; then
# Compute am1-bcc charges
- echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> ${RUNDIR}/LigFlow.xargs
+ echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> ${RUNDIR}/LigFlow.xargs
+ else
+ net_charge=$(awk -v i=${LIGAND} '$0 ~ i {print $2}' ${CHARGE_FILE})
+ echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 -nc ${net_charge} &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> ${RUNDIR}/LigFlow.xargs
+
+ fi
;;
"resp")
# Prepare Gaussian
- antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no &> antechamber.log
+ if [ "${CHARGE_FILE}" == '' ] ; then
+ antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no &> antechamber.log
+
+ else
+ net_charge=$(awk -v i=${LIGAND} '$0 ~ i {print $2}' ${CHARGE_FILE})
+ antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no -nc ${net_charge} &> antechamber.log
+ fi
# Run Gaussian to optimize structure and generate electrostatic potential grid
g09 <${RUNDIR}/resp/${LIGAND}.gau>${RUNDIR}/resp/${LIGAND}.gout
@@ -240,12 +285,21 @@ case ${JOB_SCHEDULLER} in
case ${CHARGE} in
"bcc")
# Compute am1-bcc charges
- echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> LigFlow_bcc.${first}.xargs
+ if [ "${CHARGE_FILE}" == '' ] ; then
+ echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> LigFlow_bcc.${first}.xargs
+ else
+ net_charge=$(awk -v i=${LIGAND} '$0 ~ i {print $2}' ${CHARGE_FILE})
+ echo "mkdir -p /tmp/${USER}/${LIGAND}; cd /tmp/${USER}/${LIGAND} ; antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/bcc/${LIGAND}.mol2 -fo mol2 -c bcc -s 2 -eq 1 -rn MOL -pf y -dr no -at gaff2 -nc ${net_charge} &> antechamber.log ; rm -rf /tmp/${USER}/${LIGAND}/">> LigFlow_bcc.${first}.xargs
+ fi
;;
"resp")
# Prepare Gaussian
- echo "antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no &> antechamber.log" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
-
+ if [ "${CHARGE_FILE}" == '' ] ; then
+ echo "antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no &> antechamber.log" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
+ else
+ net_charge=$(awk -v i=${LIGAND} '$0 ~ i {print $2}' ${CHARGE_FILE})
+ echo "antechamber -i ${RUNDIR}/gas/${LIGAND}.mol2 -fi mol2 -o ${RUNDIR}/resp/${LIGAND}.gau -fo gcrt -gv 1 -ge ${RUNDIR}/resp/${LIGAND}.gesp -ch ${RUNDIR}/resp/${LIGAND} -gm %mem=16Gb -gn %nproc=${NCORES} -s 2 -eq 1 -rn MOL -pf y -dr no -nc ${net_charge} &> antechamber.log" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
+ fi
# Run Gaussian to optimize structure and generate electrostatic potential grid
echo "g09 <${RUNDIR}/resp/${LIGAND}.gau>${RUNDIR}/resp/${LIGAND}.gout" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
@@ -361,6 +415,10 @@ LigFlow -l ligand.mol2 -p myproject [--bcc] [--resp]
--pbs/--slurm : Workload manager, PBS or SLURM
--header FILE : Header file provided to run on your cluster.
+[ Develpment ]
+ --charges-file FILE : Contains the net charges for all ligands in a library.
+ ( name charge ) ( CHEMBL123 -1 )
+
"
exit 0
}
@@ -418,6 +476,12 @@ while [[ $# -gt 0 ]]; do
HEADER_FILE=$(abspath "$2")
shift
;;
+ # Features under Development
+ "--charges-file")
+ CHARGES_FILE=$(abspath "$2")
+ if [ ! -f ${CHARGES_FILE} ] ; then echo "Charge file \"${CHARGES_FILE}\" not found " ; exit 1 ; fi
+ shift
+ ;;
*)
unknown="$1" # unknown option
echo "Unknown flag \"$unknown\""
From 0078d0cac803541a79c05807064985b223e2208e Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Fri, 5 Oct 2018 12:45:04 +0200
Subject: [PATCH 04/65] Speed improvement in #DockFlow_update_ligand_list
---
ChemFlow/src/DockFlow_functions.bash | 54 +++++++++++++++++++++++++++-
1 file changed, 53 insertions(+), 1 deletion(-)
diff --git a/ChemFlow/src/DockFlow_functions.bash b/ChemFlow/src/DockFlow_functions.bash
index ce23903..43006b7 100644
--- a/ChemFlow/src/DockFlow_functions.bash
+++ b/ChemFlow/src/DockFlow_functions.bash
@@ -38,7 +38,8 @@ DockFlow_dock() {
# Always work here
cd ${RUNDIR}
-DockFlow_update_ligand_list
+#DockFlow_update_ligand_list
+DockFlow_update_ligand_list_DEV
NDOCK=${#LIGAND_LIST[@]}
if [ ${NDOCK} == 0 ] ; then
@@ -165,6 +166,55 @@ unset LIGAND_LIST
LIGAND_LIST=(${DOCK_LIST[@]})
}
+DockFlow_update_ligand_list_DEV() {
+# Creation of the docking list, checkpoint calculations.
+DOCK_LIST=""
+case ${DOCK_PROGRAM} in
+"PLANTS")
+ # If the folder exists but there's no "bestranking.csv" its incomplete.
+ FILE="bestranking.csv"
+;;
+"VINA")
+ # If the folder exists but there's no "output.pdbqt" its incomplete.
+ FILE="output.pdbqt"
+;;
+esac
+
+
+if [ "${OVERWRITE}" == "no" ] ; then # Useless to update ligand list if we overwrite
+
+ counter=0
+ for LIGAND in ${LIGAND_LIST[@]} ; do
+ if [ -d ${LIGAND}/${DOCK_PROGRAM} ] && [ ! -f ${LIGAND}/${DOCK_PROGRAM}/${FILE} ] ; then
+# echo "[ NOTE ] ${RECEPTOR_NAME} and ${LIGAND} incomplete... redoing it !"
+ rm -rf ${LIGAND}/${DOCK_PROGRAM}
+ DOCK_LIST[${counter}]="$LIGAND"
+ fi
+ if [ -f ${LIGAND}/${DOCK_PROGRAM}/${FILE} ] ; then
+ if [ $(wc -l ${LIGAND}/${DOCK_PROGRAM}/${FILE} | cut -d' ' -f1) -lt 2 ] ; then
+# echo "[ NOTE ] ${RECEPTOR_NAME} and ${LIGAND} incomplete... redoing it !"
+ rm -rf ${LIGAND}/${DOCK_PROGRAM}
+ DOCK_LIST[${counter}]="$LIGAND"
+ fi
+ fi
+ if [ ! -d ${LIGAND}/${DOCK_PROGRAM} ] ; then
+ DOCK_LIST[${counter}]="$LIGAND"
+ # Still unused.
+ fi
+
+ let counter++
+ done
+else
+ DOCK_LIST=(${LIGAND_LIST[@]})
+fi
+
+unset LIGAND_LIST
+LIGAND_LIST=(${DOCK_LIST[@]})
+}
+
+
+
+
DockFlow_write_plants_HPC() {
#=== FUNCTION ================================================================
@@ -319,6 +369,7 @@ DockFlow_prepare_ligands() {
#===============================================================================
cd ${RUNDIR}
+echo "[Preparing ligands]"
# Create ligand folder into the project
for LIGAND in ${LIGAND_LIST[@]} ; do
if [ ! -d ${LIGAND} ] ; then
@@ -343,6 +394,7 @@ for LIGAND in ${LIGAND_LIST[@]} ; do
;;
esac
done
+echo "[ DONE ]"
}
From e00ebf4cdfb6b514999170241641f45a8b1b2491 Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Fri, 5 Oct 2018 14:20:17 +0200
Subject: [PATCH 05/65] Bugfix, wrong variable for CHARGE_FILE.
---
ChemFlow/src/LigFlow_functions.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ChemFlow/src/LigFlow_functions.bash b/ChemFlow/src/LigFlow_functions.bash
index 665e2cb..ad06d48 100644
--- a/ChemFlow/src/LigFlow_functions.bash
+++ b/ChemFlow/src/LigFlow_functions.bash
@@ -478,8 +478,8 @@ while [[ $# -gt 0 ]]; do
;;
# Features under Development
"--charges-file")
- CHARGES_FILE=$(abspath "$2")
- if [ ! -f ${CHARGES_FILE} ] ; then echo "Charge file \"${CHARGES_FILE}\" not found " ; exit 1 ; fi
+ CHARGE_FILE=$(abspath "$2")
+ if [ ! -f ${CHARGE_FILE} ] ; then echo "Charge file \"${CHARGE_FILE}\" not found " ; exit 1 ; fi
shift
;;
*)
From 1a25a4855e4aa1e974e6110f8b0f1f672210e509 Mon Sep 17 00:00:00 2001
From: cbouy
Date: Sat, 6 Oct 2018 19:13:32 +0200
Subject: [PATCH 06/65] Put SmilesTo3D as a tab
---
ChemFlow/src/GUI/GUI.py | 105 +++-
ChemFlow/src/GUI/ToolsClasses.py | 68 ---
ChemFlow/src/GUI/qt_creator/UImainwindow.py | 184 ++++++-
.../src/GUI/qt_creator/UItool_smiles_to_3d.py | 183 -------
ChemFlow/src/GUI/qt_creator/mainwindow.ui | 499 +++++++++++++++++-
.../src/GUI/qt_creator/tool_smiles_to_3d.ui | 459 ----------------
6 files changed, 753 insertions(+), 745 deletions(-)
delete mode 100644 ChemFlow/src/GUI/qt_creator/UItool_smiles_to_3d.py
delete mode 100644 ChemFlow/src/GUI/qt_creator/tool_smiles_to_3d.ui
diff --git a/ChemFlow/src/GUI/GUI.py b/ChemFlow/src/GUI/GUI.py
index 39ba074..28661c5 100755
--- a/ChemFlow/src/GUI/GUI.py
+++ b/ChemFlow/src/GUI/GUI.py
@@ -15,7 +15,7 @@
from DockingClasses import DialogDockVina, DialogDockPlants
from ScoringClasses import DialogScoreVina, DialogScorePlants, DialogScoreMmgbsa
from ExecutionClasses import DialogRunLocal, DialogRunPbs, DialogRunSlurm
-from ToolsClasses import DialogToolBoundingShape, DialogToolSmilesTo3D
+from ToolsClasses import DialogToolBoundingShape
from qt_creator.UImainwindow import Ui_MainWindow
@@ -32,6 +32,7 @@ def __init__(self, parent=None):
# set other icons
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(os.path.realpath(os.path.join(WORKDIR, "img", "run.png"))), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.commandLinkButton_smiles_run.setIcon(icon)
self.commandLinkButton_ligflow_run.setIcon(icon)
self.commandLinkButton_docking_run.setIcon(icon)
self.commandLinkButton_scoring_run.setIcon(icon)
@@ -49,6 +50,7 @@ def __init__(self, parent=None):
self.actionAbout.triggered.connect(self.about)
self.actionGitHub.triggered.connect(self.github)
self.actionReport_issue.triggered.connect(self.report_issue)
+ self.actionDocumentation.triggered.connect(self.documentation)
self.actionTutorial.triggered.connect(self.tutorial)
self.actionDebug_mode.triggered.connect(self.debug_mode)
self.actionLogfile.triggered.connect(self.read_logs)
@@ -63,6 +65,8 @@ def __init__(self, parent=None):
self.pushButton_docking_lig.clicked.connect(self.browse_ligand)
self.pushButton_scoring_rec.clicked.connect(self.browse_receptor)
self.pushButton_scoring_lig.clicked.connect(self.browse_ligand)
+ self.pushButton_smiles_input.clicked.connect(self.select_smiles_input)
+ self.lineEdit_smiles_input.textChanged.connect(lambda text: self.set_smiles_output(text))
## Protocol
self.pushButton_docking_configure_protocol.clicked.connect(self.configure_docking_protocol)
self.pushButton_scoring_configure_protocol.clicked.connect(self.configure_scoring_protocol)
@@ -71,6 +75,7 @@ def __init__(self, parent=None):
self.pushButton_docking_configure_job_queue.clicked.connect(self.configure_workflow_execution)
self.pushButton_scoring_configure_job_queue.clicked.connect(self.configure_workflow_execution)
## Actions
+ self.commandLinkButton_smiles_run.clicked.connect(self.run_smiles)
self.commandLinkButton_ligflow_run.clicked.connect(self.run_ligflow)
self.commandLinkButton_docking_run.clicked.connect(self.run_docking)
self.commandLinkButton_docking_postprocess.clicked.connect(self.run_docking_postprocess)
@@ -80,6 +85,7 @@ def __init__(self, parent=None):
self.commandLinkButton_scoring_archive.clicked.connect(self.run_scoring_archive)
self.commandLinkButton_tools_run.clicked.connect(self.run_tools)
self.action_buttons = [
+ self.commandLinkButton_smiles_run,
self.commandLinkButton_ligflow_run,
self.commandLinkButton_docking_run,
self.commandLinkButton_docking_postprocess,
@@ -133,8 +139,11 @@ def report_issue(self):
def tutorial(self):
"""Open the tutorial section in a web browser"""
- # TODO update link when commit to master branch
- browser_open('https://github.com/IFMlab/ChemFlow/blob/devel/tutorial/TUTORIAL.rst')
+ browser_open('https://chemflow-docs.readthedocs.io/en/latest/tutorial.html')
+
+ def documentation(self):
+ """Open the documentation in a web browser"""
+ browser_open('http://chemflow.cc')
def debug_mode(self):
"""Activate the debug mode. Prints commands instead of running them"""
@@ -208,6 +217,21 @@ def browse_ligand(self):
self.lineEdit_docking_lig.setText(self.input['Ligand'])
self.lineEdit_scoring_lig.setText(self.input['Ligand'])
+ def select_smiles_input(self):
+ filetypes = "All Files (*)"
+ value, _ = QFileDialog.getOpenFileName(None,"Select input SMILES file", os.getcwd(), filetypes)
+ if value:
+ self.lineEdit_smiles_input.setText(value)
+
+ def set_smiles_output(self, text):
+ """Suggest path to SDF output file automatically from SMILES input file"""
+ output = self.lineEdit_smiles_output.text()
+ output_dir = os.path.dirname(output)
+ input_dir = os.path.dirname(text)
+ if (output_dir[:len(input_dir)] in input_dir) or (output in EMPTY_VALUES):
+ filename, file_extension = os.path.splitext(text)
+ self.lineEdit_smiles_output.setText('{}.sdf'.format(filename))
+
def configure_docking_protocol(self):
'''Configure the docking protocol'''
self.input['docking_software'] = self.comboBox_docking_software.currentText()
@@ -333,6 +357,37 @@ def check_scoring_required_args(self):
missing.append('- Protocol name')
return missing
+ def run_smiles(self):
+ """Run SmilesTo3D.py to create a single 3D conformation per SMILES"""
+ missing = []
+ self.input['InputFile'] = self.lineEdit_smiles_input.text()
+ self.input['OutputFile'] = self.lineEdit_smiles_output.text()
+ self.input['SmilesColumn'] = self.spinBox_smiles_col.value()
+ self.input['NamesColumn'] = self.spinBox_names_col.value()
+ self.input['NThreads'] = self.spinBox_nthreads.value()
+ self.input['Header'] = self.checkBox_header.isChecked()
+ self.input['AllHydrogens'] = self.checkBox_hydrogen.isChecked()
+ self.input['Verbose'] = self.checkBox_verbose.isChecked()
+ self.input['MPI'] = self.checkBox_mpi.isChecked()
+ value = self.comboBox_delimiter.currentText()
+ if value == 'Tab':
+ delimiter = '\t'
+ elif value == 'Space':
+ delimiter = ' '
+ else:
+ delimiter = value
+ self.input['Delimiter'] = delimiter
+ self.input['Method'] = self.comboBox_method.currentText().lower()
+ if self.input['InputFile'] in EMPTY_VALUES:
+ missing.append('- Input SMILES file')
+ if self.input['OutputFile'] in EMPTY_VALUES:
+ missing.append('- Output SDF file')
+ if missing:
+ missingParametersDialog(*missing)
+ else:
+ # Execute
+ self.execute_command(self.build_smiles_command())
+
def run_ligflow(self):
'''Run ligand preparation with LigFlow'''
# search for missing configuration
@@ -467,8 +522,6 @@ def describe_tools(self, tool):
"""Set the description label for ChemFlow tools"""
if tool == 'Bounding shape':
self.label_tools_description.setText('Reads a mol2 file and returns the center and radius/size of the smallest shape containing all the atoms of the given molecule.')
- elif tool == 'SMILES to 3D':
- self.label_tools_description.setText('Generates 3D structures in SDF format from SMILES, using RDKIT.')
else:
self.label_tools_description.setText('')
@@ -482,8 +535,6 @@ def configure_tools(self):
self.input['Tool'] = tool
if tool == 'Bounding shape':
tool_dialog = DialogToolBoundingShape()
- elif tool == 'SMILES to 3D':
- tool_dialog = DialogToolSmilesTo3D()
tool_dialog.exec_()
try:
tool_parameters = tool_dialog.values
@@ -500,6 +551,7 @@ def run_tools(self):
except KeyError:
errorDialog(message="Please configure a ChemFlow tool first")
else:
+ # Bounding shape
if self.input['Tool'] == 'Bounding shape':
command = ['bounding_shape.py']
command.append(self.input['InputFile'])
@@ -507,25 +559,28 @@ def run_tools(self):
command.extend(['--padding', self.input['Padding']])
if self.input['PyMOL']:
command.append('--pymol')
- elif self.input['Tool'] == 'SMILES to 3D':
- command = ['SmilesTo3D.py']
- command.extend(['-i', self.input['InputFile']])
- command.extend(['-o', self.input['OutputFile']])
- command.extend(['-sc', self.input['SmilesColumn']])
- command.extend(['-nc', self.input['NamesColumn']])
- command.extend(['-d', self.input['Delimiter']])
- command.extend(['-m', self.input['Method']])
- command.extend(['-nt', self.input['NThreads']])
- if self.input['Header']:
- command.append('--header')
- if self.input['AllHydrogens']:
- command.append('--hydrogen')
- if self.input['Verbose']:
- command.append('-v')
- if self.input['MPI']:
- command.append('--mpi')
+ # Run
self.execute_command(command)
+ def build_smiles_command(self):
+ command = ['SmilesTo3D.py']
+ command.extend(['-i', self.input['InputFile']])
+ command.extend(['-o', self.input['OutputFile']])
+ command.extend(['-sc', self.input['SmilesColumn']])
+ command.extend(['-nc', self.input['NamesColumn']])
+ command.extend(['-d', '\"' + self.input['Delimiter'] + '\"'])
+ command.extend(['-m', self.input['Method']])
+ command.extend(['-nt', self.input['NThreads']])
+ if self.input['Header']:
+ command.append('--header')
+ if self.input['AllHydrogens']:
+ command.append('--hydrogen')
+ if self.input['Verbose']:
+ command.append('-v')
+ if self.input['MPI']:
+ command.append('--mpi')
+ return command
+
def build_ligflow_command(self):
command = ['LigFlow']
# Project
@@ -730,6 +785,7 @@ def process_started(self):
self.display(command)
self.summary_text = ''
self.display('[ ChemFlow ] {} was spawned with PID {}'.format(self.process.program(), self.process.processId()))
+ self.statusBar.showMessage('Running {}'.format(self.process.program()), 3000)
# Prevent user from launching other commands
for button in self.action_buttons:
button.setEnabled(False)
@@ -738,6 +794,7 @@ def process_finished(self, status):
"""Routine launched when a QProcess is finished"""
self.display('[ ChemFlow ] {} process ended with exit status {}'.format(self.process.program(), status))
self.pushButton_kill.setEnabled(False)
+ self.statusBar.showMessage('Finished running {}'.format(self.process.program()), 3000)
# Allow user to send new commands
for button in self.action_buttons:
button.setEnabled(True)
diff --git a/ChemFlow/src/GUI/ToolsClasses.py b/ChemFlow/src/GUI/ToolsClasses.py
index 9131b0d..a116dae 100644
--- a/ChemFlow/src/GUI/ToolsClasses.py
+++ b/ChemFlow/src/GUI/ToolsClasses.py
@@ -2,7 +2,6 @@
from PyQt5.QtWidgets import QDialog, QFileDialog
from PyQt5.QtCore import QSettings
from qt_creator.UItool_boundingshape import Ui_ToolBoundingShape
-from qt_creator.UItool_smiles_to_3d import Ui_ToolSmilesTo3d
from utils import (
WORKDIR, INI_FILE, EMPTY_VALUES,
guiSave, guiRestore,
@@ -45,70 +44,3 @@ def select_input(self):
value, _ = QFileDialog.getOpenFileName(None,"Select MOL2 file", os.getcwd(), filetypes)
if value:
self.lineEdit_path.setText(value)
-
-
-class DialogToolSmilesTo3D(QDialog, Ui_ToolSmilesTo3d):
- def __init__(self, parent=None):
- super().__init__(parent)
- self.setupUi(self)
- # Buttons
- self.pushButton_ok.clicked.connect(self.validate)
- self.pushButton_cancel.clicked.connect(self.cancel)
- self.pushButton_input.clicked.connect(self.select_input)
- self.lineEdit_input.textChanged.connect(lambda text: self.set_output(text))
- # Settings
- self.values = {}
- self.settings = QSettings(INI_FILE, QSettings.IniFormat)
- guiRestore(self, self.settings)
-
- def closeEvent(self, event):
- guiSave(self, self.settings)
- QDialog.closeEvent(self, event)
-
- def validate(self):
- missing = []
- self.values['InputFile'] = self.lineEdit_input.text()
- self.values['OutputFile'] = self.lineEdit_output.text()
- self.values['SmilesColumn'] = self.spinBox_smiles_col.value()
- self.values['NamesColumn'] = self.spinBox_names_col.value()
- self.values['NThreads'] = self.spinBox_nthreads.value()
- self.values['Header'] = self.checkBox_header.isChecked()
- self.values['AllHydrogens'] = self.checkBox_hydrogen.isChecked()
- self.values['Verbose'] = self.checkBox_verbose.isChecked()
- self.values['MPI'] = self.checkBox_mpi.isChecked()
- value = self.comboBox_delimiter.currentText()
- if value == 'Tab':
- delimiter = '\t'
- elif value == 'Space':
- delimiter = ' '
- else:
- delimiter = value
- self.values['Delimiter'] = delimiter
- self.values['Method'] = self.comboBox_delimiter.currentText().lower()
- if self.values['InputFile'] in EMPTY_VALUES:
- missing.append('- Input SMILES file')
- if self.values['OutputFile'] in EMPTY_VALUES:
- missing.append('- Output SDF file')
- if len(missing):
- missingParametersDialog(*missing)
- else:
- self.close()
-
- def cancel(self):
- del self.values
- self.close()
-
- def select_input(self):
- filetypes = "All Files (*)"
- value, _ = QFileDialog.getOpenFileName(None,"Select input SMILES file", os.getcwd(), filetypes)
- if value:
- self.lineEdit_input.setText(value)
-
- def set_output(self, text):
- """Suggest path to output file automatically from input file"""
- output = self.lineEdit_output.text()
- output_dir = os.path.dirname(output)
- input_dir = os.path.dirname(text)
- if (output_dir[:len(input_dir)] in input_dir) or (output in EMPTY_VALUES):
- filename, file_extension = os.path.splitext(text)
- self.lineEdit_output.setText('{}.sdf'.format(filename))
diff --git a/ChemFlow/src/GUI/qt_creator/UImainwindow.py b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
index 6ff0125..63aeed3 100644
--- a/ChemFlow/src/GUI/qt_creator/UImainwindow.py
+++ b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
@@ -32,6 +32,145 @@ def setupUi(self, MainWindow):
self.tabWidget = QtWidgets.QTabWidget(self.centralWidget)
self.tabWidget.setGeometry(QtCore.QRect(10, 70, 641, 423))
self.tabWidget.setObjectName("tabWidget")
+ self.tab_Smiles = QtWidgets.QWidget()
+ self.tab_Smiles.setObjectName("tab_Smiles")
+ self.label_9 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_9.setGeometry(QtCore.QRect(11, 95, 67, 17))
+ self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.label_9.setObjectName("label_9")
+ self.comboBox_method = QtWidgets.QComboBox(self.tab_Smiles)
+ self.comboBox_method.setGeometry(QtCore.QRect(90, 228, 85, 27))
+ self.comboBox_method.setObjectName("comboBox_method")
+ self.comboBox_method.addItem("")
+ self.comboBox_method.addItem("")
+ self.comboBox_method.addItem("")
+ self.checkBox_verbose = QtWidgets.QCheckBox(self.tab_Smiles)
+ self.checkBox_verbose.setGeometry(QtCore.QRect(349, 194, 151, 22))
+ self.checkBox_verbose.setObjectName("checkBox_verbose")
+ self.spinBox_smiles_col = QtWidgets.QSpinBox(self.tab_Smiles)
+ self.spinBox_smiles_col.setGeometry(QtCore.QRect(158, 57, 48, 27))
+ self.spinBox_smiles_col.setMinimum(1)
+ self.spinBox_smiles_col.setProperty("value", 1)
+ self.spinBox_smiles_col.setObjectName("spinBox_smiles_col")
+ self.comboBox_delimiter = QtWidgets.QComboBox(self.tab_Smiles)
+ self.comboBox_delimiter.setGeometry(QtCore.QRect(90, 89, 85, 27))
+ self.comboBox_delimiter.setObjectName("comboBox_delimiter")
+ self.comboBox_delimiter.addItem("")
+ self.comboBox_delimiter.addItem("")
+ self.comboBox_delimiter.addItem("")
+ self.comboBox_delimiter.addItem("")
+ self.comboBox_delimiter.addItem("")
+ self.label_10 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_10.setGeometry(QtCore.QRect(94, 288, 91, 20))
+ self.label_10.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_10.setObjectName("label_10")
+ self.checkBox_mpi = QtWidgets.QCheckBox(self.tab_Smiles)
+ self.checkBox_mpi.setGeometry(QtCore.QRect(349, 289, 131, 22))
+ self.checkBox_mpi.setObjectName("checkBox_mpi")
+ self.lineEdit_smiles_input = QtWidgets.QLineEdit(self.tab_Smiles)
+ self.lineEdit_smiles_input.setGeometry(QtCore.QRect(92, 30, 441, 21))
+ font = QtGui.QFont()
+ font.setPointSize(9)
+ self.lineEdit_smiles_input.setFont(font)
+ self.lineEdit_smiles_input.setObjectName("lineEdit_smiles_input")
+ self.checkBox_header = QtWidgets.QCheckBox(self.tab_Smiles)
+ self.checkBox_header.setGeometry(QtCore.QRect(90, 120, 171, 22))
+ self.checkBox_header.setObjectName("checkBox_header")
+ self.checkBox_hydrogen = QtWidgets.QCheckBox(self.tab_Smiles)
+ self.checkBox_hydrogen.setGeometry(QtCore.QRect(90, 194, 221, 22))
+ self.checkBox_hydrogen.setObjectName("checkBox_hydrogen")
+ self.spinBox_names_col = QtWidgets.QSpinBox(self.tab_Smiles)
+ self.spinBox_names_col.setGeometry(QtCore.QRect(300, 57, 48, 27))
+ self.spinBox_names_col.setMinimum(1)
+ self.spinBox_names_col.setProperty("value", 2)
+ self.spinBox_names_col.setObjectName("spinBox_names_col")
+ self.label_rec_2 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_rec_2.setGeometry(QtCore.QRect(13, 10, 51, 17))
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.label_rec_2.setFont(font)
+ self.label_rec_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_rec_2.setObjectName("label_rec_2")
+ self.label_11 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_11.setGeometry(QtCore.QRect(11, 32, 67, 17))
+ self.label_11.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.label_11.setObjectName("label_11")
+ self.label_12 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_12.setGeometry(QtCore.QRect(13, 261, 81, 17))
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.label_12.setFont(font)
+ self.label_12.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_12.setObjectName("label_12")
+ self.spinBox_nthreads = QtWidgets.QSpinBox(self.tab_Smiles)
+ self.spinBox_nthreads.setGeometry(QtCore.QRect(190, 284, 48, 27))
+ self.spinBox_nthreads.setMinimum(1)
+ self.spinBox_nthreads.setProperty("value", 1)
+ self.spinBox_nthreads.setObjectName("spinBox_nthreads")
+ self.label_18 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_18.setGeometry(QtCore.QRect(246, 60, 51, 20))
+ font = QtGui.QFont()
+ font.setItalic(True)
+ self.label_18.setFont(font)
+ self.label_18.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_18.setObjectName("label_18")
+ self.pushButton_smiles_input = QtWidgets.QPushButton(self.tab_Smiles)
+ self.pushButton_smiles_input.setGeometry(QtCore.QRect(538, 29, 91, 23))
+ self.pushButton_smiles_input.setObjectName("pushButton_smiles_input")
+ self.label_19 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_19.setGeometry(QtCore.QRect(13, 143, 67, 17))
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.label_19.setFont(font)
+ self.label_19.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_19.setObjectName("label_19")
+ self.label_20 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_20.setGeometry(QtCore.QRect(13, 234, 71, 17))
+ font = QtGui.QFont()
+ font.setBold(True)
+ font.setWeight(75)
+ self.label_20.setFont(font)
+ self.label_20.setObjectName("label_20")
+ self.lineEdit_smiles_output = QtWidgets.QLineEdit(self.tab_Smiles)
+ self.lineEdit_smiles_output.setGeometry(QtCore.QRect(92, 165, 391, 21))
+ font = QtGui.QFont()
+ font.setPointSize(9)
+ self.lineEdit_smiles_output.setFont(font)
+ self.lineEdit_smiles_output.setObjectName("lineEdit_smiles_output")
+ self.label_21 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_21.setGeometry(QtCore.QRect(10, 169, 67, 17))
+ self.label_21.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.label_21.setObjectName("label_21")
+ self.label_22 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_22.setGeometry(QtCore.QRect(-33, 60, 111, 20))
+ self.label_22.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
+ self.label_22.setObjectName("label_22")
+ self.line_6 = QtWidgets.QFrame(self.tab_Smiles)
+ self.line_6.setGeometry(QtCore.QRect(0, 320, 640, 3))
+ self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken)
+ self.line_6.setFrameShape(QtWidgets.QFrame.HLine)
+ self.line_6.setObjectName("line_6")
+ self.commandLinkButton_smiles_run = QtWidgets.QCommandLinkButton(self.tab_Smiles)
+ self.commandLinkButton_smiles_run.setGeometry(QtCore.QRect(230, 330, 181, 51))
+ font = QtGui.QFont()
+ font.setPointSize(14)
+ self.commandLinkButton_smiles_run.setFont(font)
+ icon = QtGui.QIcon()
+ icon.addPixmap(QtGui.QPixmap("../img/run.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.commandLinkButton_smiles_run.setIcon(icon)
+ self.commandLinkButton_smiles_run.setIconSize(QtCore.QSize(36, 36))
+ self.commandLinkButton_smiles_run.setObjectName("commandLinkButton_smiles_run")
+ self.label_23 = QtWidgets.QLabel(self.tab_Smiles)
+ self.label_23.setGeometry(QtCore.QRect(94, 62, 61, 17))
+ font = QtGui.QFont()
+ font.setItalic(True)
+ self.label_23.setFont(font)
+ self.label_23.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
+ self.label_23.setObjectName("label_23")
+ self.tabWidget.addTab(self.tab_Smiles, "")
self.tab_LigFlow = QtWidgets.QWidget()
self.tab_LigFlow.setObjectName("tab_LigFlow")
self.pushButton_ligflow_lig = QtWidgets.QPushButton(self.tab_LigFlow)
@@ -96,8 +235,6 @@ def setupUi(self, MainWindow):
font = QtGui.QFont()
font.setPointSize(14)
self.commandLinkButton_ligflow_run.setFont(font)
- icon = QtGui.QIcon()
- icon.addPixmap(QtGui.QPixmap("../img/run.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.commandLinkButton_ligflow_run.setIcon(icon)
self.commandLinkButton_ligflow_run.setIconSize(QtCore.QSize(36, 36))
self.commandLinkButton_ligflow_run.setObjectName("commandLinkButton_ligflow_run")
@@ -397,7 +534,6 @@ def setupUi(self, MainWindow):
self.comboBox_tools.setFrame(True)
self.comboBox_tools.setObjectName("comboBox_tools")
self.comboBox_tools.addItem("")
- self.comboBox_tools.addItem("")
self.label_tools_description = QtWidgets.QLabel(self.tab_Tools)
self.label_tools_description.setGeometry(QtCore.QRect(20, 94, 595, 211))
self.label_tools_description.setText("")
@@ -492,13 +628,16 @@ def setupUi(self, MainWindow):
self.actionDefault_theme.setObjectName("actionDefault_theme")
self.actionDark_theme = QtWidgets.QAction(MainWindow)
self.actionDark_theme.setObjectName("actionDark_theme")
+ self.actionDocumentation = QtWidgets.QAction(MainWindow)
+ self.actionDocumentation.setObjectName("actionDocumentation")
self.menuProject.addAction(self.actionNew_project)
self.menuProject.addAction(self.actionLoad_project)
self.menuProject.addSeparator()
self.menuProject.addAction(self.actionExit)
+ self.menuHelp.addAction(self.actionDocumentation)
+ self.menuHelp.addAction(self.actionTutorial)
self.menuHelp.addAction(self.actionGitHub)
self.menuHelp.addAction(self.actionReport_issue)
- self.menuHelp.addAction(self.actionTutorial)
self.menuHelp.addSeparator()
self.menuHelp.addAction(self.actionDebug_mode)
self.menuHelp.addAction(self.actionLogfile)
@@ -561,6 +700,41 @@ def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "ChemFlow"))
self.label_logo_text.setText(_translate("MainWindow", "ChemFlow"))
+ self.label_9.setText(_translate("MainWindow", "Delimiter"))
+ self.comboBox_method.setToolTip(_translate("MainWindow", "Method used to generate 3D conformations:
- UFF : distance geometry + force field minimization with UFF
- MMFF : distance geometry + force field minimization with MMFF
- ETKDG : distance geometry with experimental torsion angles knowledge from the CSD
"))
+ self.comboBox_method.setItemText(0, _translate("MainWindow", "ETKDG"))
+ self.comboBox_method.setItemText(1, _translate("MainWindow", "MMFF"))
+ self.comboBox_method.setItemText(2, _translate("MainWindow", "UFF"))
+ self.checkBox_verbose.setToolTip(_translate("MainWindow", "Print additional information to the terminal
"))
+ self.checkBox_verbose.setText(_translate("MainWindow", "Verbose output"))
+ self.spinBox_smiles_col.setToolTip(_translate("MainWindow", "Index of the column containing the SMILES
"))
+ self.comboBox_delimiter.setItemText(0, _translate("MainWindow", "Tab"))
+ self.comboBox_delimiter.setItemText(1, _translate("MainWindow", "Space"))
+ self.comboBox_delimiter.setItemText(2, _translate("MainWindow", ","))
+ self.comboBox_delimiter.setItemText(3, _translate("MainWindow", ";"))
+ self.comboBox_delimiter.setItemText(4, _translate("MainWindow", ":"))
+ self.label_10.setText(_translate("MainWindow", "CPU threads"))
+ self.checkBox_mpi.setText(_translate("MainWindow", "Run with MPI"))
+ self.lineEdit_smiles_input.setPlaceholderText(_translate("MainWindow", "Path to input SMILES file"))
+ self.checkBox_header.setText(_translate("MainWindow", "Fist line is a header"))
+ self.checkBox_hydrogen.setText(_translate("MainWindow", "Write all Hydrogen atoms"))
+ self.spinBox_names_col.setToolTip(_translate("MainWindow", "Index of the column containing the names of your molecules. Leave to 2 if there are no names.
"))
+ self.label_rec_2.setText(_translate("MainWindow", "Input"))
+ self.label_11.setText(_translate("MainWindow", "File"))
+ self.label_12.setText(_translate("MainWindow", "Execution"))
+ self.spinBox_nthreads.setToolTip(_translate("MainWindow", "Number of threads used for the generation of conformations
"))
+ self.label_18.setText(_translate("MainWindow", "Name"))
+ self.pushButton_smiles_input.setToolTip(_translate("MainWindow", "
Text file containing one molecule in SMILES format per line.
"))
+ self.pushButton_smiles_input.setText(_translate("MainWindow", "Browse"))
+ self.label_19.setText(_translate("MainWindow", "Output"))
+ self.label_20.setText(_translate("MainWindow", "Method"))
+ self.lineEdit_smiles_output.setPlaceholderText(_translate("MainWindow", "Path to output SDF file"))
+ self.label_21.setText(_translate("MainWindow", "File"))
+ self.label_22.setText(_translate("MainWindow", "Index"))
+ self.commandLinkButton_smiles_run.setToolTip(_translate("MainWindow", "Generates 3D structures in SDF format from SMILES, using RDKIT
"))
+ self.commandLinkButton_smiles_run.setText(_translate("MainWindow", "Generate 3D"))
+ self.label_23.setText(_translate("MainWindow", "SMILES"))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_Smiles), _translate("MainWindow", "SmilesTo3D"))
self.pushButton_ligflow_lig.setToolTip(_translate("MainWindow", "Ligands MOL2 file"))
self.pushButton_ligflow_lig.setText(_translate("MainWindow", "Browse"))
self.label_inputFiles_2.setText(_translate("MainWindow", "Input files"))
@@ -674,7 +848,6 @@ def retranslateUi(self, MainWindow):
self.label_7.setText(_translate("MainWindow", "Name"))
self.label_8.setText(_translate("MainWindow", "Description"))
self.comboBox_tools.setItemText(0, _translate("MainWindow", "Bounding shape"))
- self.comboBox_tools.setItemText(1, _translate("MainWindow", "SMILES to 3D"))
self.pushButton_configure_tools.setText(_translate("MainWindow", "Configure"))
self.commandLinkButton_tools_run.setToolTip(_translate("MainWindow", "Run the ChemFlow tool
"))
self.commandLinkButton_tools_run.setText(_translate("MainWindow", "Run"))
@@ -698,6 +871,7 @@ def retranslateUi(self, MainWindow):
self.actionLogfile.setText(_translate("MainWindow", "Logfile"))
self.actionDefault_theme.setText(_translate("MainWindow", "Default theme"))
self.actionDark_theme.setText(_translate("MainWindow", "Dark theme"))
+ self.actionDocumentation.setText(_translate("MainWindow", "Documentation"))
if __name__ == "__main__":
diff --git a/ChemFlow/src/GUI/qt_creator/UItool_smiles_to_3d.py b/ChemFlow/src/GUI/qt_creator/UItool_smiles_to_3d.py
deleted file mode 100644
index 6d3695e..0000000
--- a/ChemFlow/src/GUI/qt_creator/UItool_smiles_to_3d.py
+++ /dev/null
@@ -1,183 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Form implementation generated from reading ui file '/home/cedric/software/ChemFlow/ChemFlow/src/GUI/qt_creator/tool_smiles_to_3d.ui'
-#
-# Created by: PyQt5 UI code generator 5.11.2
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt5 import QtCore, QtGui, QtWidgets
-
-class Ui_ToolSmilesTo3d(object):
- def setupUi(self, ToolSmilesTo3d):
- ToolSmilesTo3d.setObjectName("ToolSmilesTo3d")
- ToolSmilesTo3d.resize(480, 499)
- self.label = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label.setGeometry(QtCore.QRect(20, 10, 111, 17))
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.label.setFont(font)
- self.label.setObjectName("label")
- self.lineEdit_input = QtWidgets.QLineEdit(ToolSmilesTo3d)
- self.lineEdit_input.setGeometry(QtCore.QRect(152, 57, 212, 20))
- self.lineEdit_input.setObjectName("lineEdit_input")
- self.pushButton_input = QtWidgets.QPushButton(ToolSmilesTo3d)
- self.pushButton_input.setGeometry(QtCore.QRect(368, 55, 86, 23))
- self.pushButton_input.setObjectName("pushButton_input")
- self.label_rec = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_rec.setGeometry(QtCore.QRect(40, 36, 61, 20))
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.label_rec.setFont(font)
- self.label_rec.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
- self.label_rec.setObjectName("label_rec")
- self.pushButton_ok = QtWidgets.QPushButton(ToolSmilesTo3d)
- self.pushButton_ok.setGeometry(QtCore.QRect(131, 461, 86, 29))
- self.pushButton_ok.setObjectName("pushButton_ok")
- self.pushButton_cancel = QtWidgets.QPushButton(ToolSmilesTo3d)
- self.pushButton_cancel.setGeometry(QtCore.QRect(261, 461, 86, 29))
- self.pushButton_cancel.setObjectName("pushButton_cancel")
- self.label_2 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_2.setGeometry(QtCore.QRect(60, 59, 67, 17))
- self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.label_2.setObjectName("label_2")
- self.spinBox_smiles_col = QtWidgets.QSpinBox(ToolSmilesTo3d)
- self.spinBox_smiles_col.setGeometry(QtCore.QRect(150, 83, 48, 27))
- self.spinBox_smiles_col.setMinimum(1)
- self.spinBox_smiles_col.setProperty("value", 1)
- self.spinBox_smiles_col.setObjectName("spinBox_smiles_col")
- self.label_3 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_3.setGeometry(QtCore.QRect(16, 86, 111, 20))
- self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.label_3.setObjectName("label_3")
- self.label_4 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_4.setGeometry(QtCore.QRect(16, 116, 111, 20))
- self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.label_4.setObjectName("label_4")
- self.spinBox_names_col = QtWidgets.QSpinBox(ToolSmilesTo3d)
- self.spinBox_names_col.setGeometry(QtCore.QRect(150, 113, 48, 27))
- self.spinBox_names_col.setMinimum(1)
- self.spinBox_names_col.setProperty("value", 2)
- self.spinBox_names_col.setObjectName("spinBox_names_col")
- self.label_5 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_5.setGeometry(QtCore.QRect(60, 149, 67, 17))
- self.label_5.setObjectName("label_5")
- self.comboBox_delimiter = QtWidgets.QComboBox(ToolSmilesTo3d)
- self.comboBox_delimiter.setGeometry(QtCore.QRect(150, 143, 85, 27))
- self.comboBox_delimiter.setObjectName("comboBox_delimiter")
- self.comboBox_delimiter.addItem("")
- self.comboBox_delimiter.addItem("")
- self.comboBox_delimiter.addItem("")
- self.comboBox_delimiter.addItem("")
- self.comboBox_delimiter.addItem("")
- self.checkBox_header = QtWidgets.QCheckBox(ToolSmilesTo3d)
- self.checkBox_header.setGeometry(QtCore.QRect(150, 174, 171, 22))
- self.checkBox_header.setObjectName("checkBox_header")
- self.label_6 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_6.setGeometry(QtCore.QRect(40, 214, 67, 17))
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.label_6.setFont(font)
- self.label_6.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
- self.label_6.setObjectName("label_6")
- self.lineEdit_output = QtWidgets.QLineEdit(ToolSmilesTo3d)
- self.lineEdit_output.setGeometry(QtCore.QRect(152, 236, 301, 20))
- self.lineEdit_output.setObjectName("lineEdit_output")
- self.label_7 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_7.setGeometry(QtCore.QRect(59, 240, 67, 17))
- self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.label_7.setObjectName("label_7")
- self.checkBox_hydrogen = QtWidgets.QCheckBox(ToolSmilesTo3d)
- self.checkBox_hydrogen.setGeometry(QtCore.QRect(150, 265, 221, 22))
- self.checkBox_hydrogen.setObjectName("checkBox_hydrogen")
- self.checkBox_verbose = QtWidgets.QCheckBox(ToolSmilesTo3d)
- self.checkBox_verbose.setGeometry(QtCore.QRect(150, 291, 221, 22))
- self.checkBox_verbose.setObjectName("checkBox_verbose")
- self.label_8 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_8.setGeometry(QtCore.QRect(40, 367, 91, 17))
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.label_8.setFont(font)
- self.label_8.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
- self.label_8.setObjectName("label_8")
- self.comboBox_method = QtWidgets.QComboBox(ToolSmilesTo3d)
- self.comboBox_method.setGeometry(QtCore.QRect(150, 324, 85, 27))
- self.comboBox_method.setObjectName("comboBox_method")
- self.comboBox_method.addItem("")
- self.comboBox_method.addItem("")
- self.comboBox_method.addItem("")
- self.label_9 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_9.setGeometry(QtCore.QRect(40, 330, 81, 17))
- font = QtGui.QFont()
- font.setBold(True)
- font.setWeight(75)
- self.label_9.setFont(font)
- self.label_9.setObjectName("label_9")
- self.spinBox_nthreads = QtWidgets.QSpinBox(ToolSmilesTo3d)
- self.spinBox_nthreads.setGeometry(QtCore.QRect(150, 390, 48, 27))
- self.spinBox_nthreads.setMinimum(1)
- self.spinBox_nthreads.setProperty("value", 1)
- self.spinBox_nthreads.setObjectName("spinBox_nthreads")
- self.label_10 = QtWidgets.QLabel(ToolSmilesTo3d)
- self.label_10.setGeometry(QtCore.QRect(25, 394, 101, 20))
- self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
- self.label_10.setObjectName("label_10")
- self.checkBox_mpi = QtWidgets.QCheckBox(ToolSmilesTo3d)
- self.checkBox_mpi.setGeometry(QtCore.QRect(150, 425, 131, 22))
- self.checkBox_mpi.setObjectName("checkBox_mpi")
-
- self.retranslateUi(ToolSmilesTo3d)
- QtCore.QMetaObject.connectSlotsByName(ToolSmilesTo3d)
-
- def retranslateUi(self, ToolSmilesTo3d):
- _translate = QtCore.QCoreApplication.translate
- ToolSmilesTo3d.setWindowTitle(_translate("ToolSmilesTo3d", "SMILES to 3D"))
- self.label.setText(_translate("ToolSmilesTo3d", "SMILES to 3D"))
- self.lineEdit_input.setPlaceholderText(_translate("ToolSmilesTo3d", "Path to input SMILES file"))
- self.pushButton_input.setToolTip(_translate("ToolSmilesTo3d", "Text file containing one molecule in SMILES format per line.
"))
- self.pushButton_input.setText(_translate("ToolSmilesTo3d", "Browse"))
- self.label_rec.setText(_translate("ToolSmilesTo3d", "Input"))
- self.pushButton_ok.setText(_translate("ToolSmilesTo3d", "Ok"))
- self.pushButton_cancel.setText(_translate("ToolSmilesTo3d", "Cancel"))
- self.label_2.setText(_translate("ToolSmilesTo3d", "File"))
- self.spinBox_smiles_col.setToolTip(_translate("ToolSmilesTo3d", "Index of the column containing the SMILES
"))
- self.label_3.setText(_translate("ToolSmilesTo3d", "SMILES column"))
- self.label_4.setText(_translate("ToolSmilesTo3d", "Name column"))
- self.spinBox_names_col.setToolTip(_translate("ToolSmilesTo3d", "Index of the column containing the names of your molecules
"))
- self.label_5.setText(_translate("ToolSmilesTo3d", "Delimiter"))
- self.comboBox_delimiter.setItemText(0, _translate("ToolSmilesTo3d", "Tab"))
- self.comboBox_delimiter.setItemText(1, _translate("ToolSmilesTo3d", "Space"))
- self.comboBox_delimiter.setItemText(2, _translate("ToolSmilesTo3d", ","))
- self.comboBox_delimiter.setItemText(3, _translate("ToolSmilesTo3d", ";"))
- self.comboBox_delimiter.setItemText(4, _translate("ToolSmilesTo3d", ":"))
- self.checkBox_header.setText(_translate("ToolSmilesTo3d", "Fist line is a header"))
- self.label_6.setText(_translate("ToolSmilesTo3d", "Output"))
- self.lineEdit_output.setPlaceholderText(_translate("ToolSmilesTo3d", "Path to output SDF file"))
- self.label_7.setText(_translate("ToolSmilesTo3d", "File"))
- self.checkBox_hydrogen.setText(_translate("ToolSmilesTo3d", "Write all Hydrogen atoms"))
- self.checkBox_verbose.setToolTip(_translate("ToolSmilesTo3d", "Print additional information to the terminal
"))
- self.checkBox_verbose.setText(_translate("ToolSmilesTo3d", "Increase output verbosity"))
- self.label_8.setText(_translate("ToolSmilesTo3d", "Execution"))
- self.comboBox_method.setToolTip(_translate("ToolSmilesTo3d", "Method used to generate 3D conformations:
- UFF : distance geometry + force field minimization with UFF
- MMFF : distance geometry + force field minimization with MMFF
- ETKDG : distance geometry with experimental torsion angles knowledge from the CSD
"))
- self.comboBox_method.setItemText(0, _translate("ToolSmilesTo3d", "ETKDG"))
- self.comboBox_method.setItemText(1, _translate("ToolSmilesTo3d", "MMFF"))
- self.comboBox_method.setItemText(2, _translate("ToolSmilesTo3d", "UFF"))
- self.label_9.setText(_translate("ToolSmilesTo3d", "Method"))
- self.spinBox_nthreads.setToolTip(_translate("ToolSmilesTo3d", "Number of threads used for the generation of conformations
"))
- self.label_10.setText(_translate("ToolSmilesTo3d", "CPU threads"))
- self.checkBox_mpi.setText(_translate("ToolSmilesTo3d", "Run with MPI"))
-
-
-if __name__ == "__main__":
- import sys
- app = QtWidgets.QApplication(sys.argv)
- ToolSmilesTo3d = QtWidgets.QWidget()
- ui = Ui_ToolSmilesTo3d()
- ui.setupUi(ToolSmilesTo3d)
- ToolSmilesTo3d.show()
- sys.exit(app.exec_())
-
diff --git a/ChemFlow/src/GUI/qt_creator/mainwindow.ui b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
index 0d03207..e0bd40b 100644
--- a/ChemFlow/src/GUI/qt_creator/mainwindow.ui
+++ b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
@@ -66,6 +66,492 @@
0
+
+
+ SmilesTo3D
+
+
+
+
+ 11
+ 95
+ 67
+ 17
+
+
+
+ Delimiter
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 90
+ 228
+ 85
+ 27
+
+
+
+ <html><head/><body><p>Method used to generate 3D conformations: </p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">UFF</span> : distance geometry + force field minimization with UFF</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">MMFF</span> : distance geometry + force field minimization with MMFF</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ETKDG </span>: distance geometry with experimental torsion angles knowledge from the CSD</li></ul></body></html>
+
+ -
+
+ ETKDG
+
+
+ -
+
+ MMFF
+
+
+ -
+
+ UFF
+
+
+
+
+
+
+ 349
+ 194
+ 151
+ 22
+
+
+
+ <html><head/><body><p>Print additional information to the terminal</p></body></html>
+
+
+ Verbose output
+
+
+
+
+
+ 158
+ 57
+ 48
+ 27
+
+
+
+ <html><head/><body><p>Index of the column containing the SMILES</p></body></html>
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ 90
+ 89
+ 85
+ 27
+
+
+ -
+
+ Tab
+
+
+ -
+
+ Space
+
+
+ -
+
+ ,
+
+
+ -
+
+ ;
+
+
+ -
+
+ :
+
+
+
+
+
+
+ 94
+ 288
+ 91
+ 20
+
+
+
+ CPU threads
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 349
+ 289
+ 131
+ 22
+
+
+
+ Run with MPI
+
+
+
+
+
+ 92
+ 30
+ 441
+ 21
+
+
+
+
+ 9
+
+
+
+ Path to input SMILES file
+
+
+
+
+
+ 90
+ 120
+ 171
+ 22
+
+
+
+ Fist line is a header
+
+
+
+
+
+ 90
+ 194
+ 221
+ 22
+
+
+
+ Write all Hydrogen atoms
+
+
+
+
+
+ 300
+ 57
+ 48
+ 27
+
+
+
+ <html><head/><body><p>Index of the column containing the names of your molecules. Leave to 2 if there are no names.</p></body></html>
+
+
+ 1
+
+
+ 2
+
+
+
+
+
+ 13
+ 10
+ 51
+ 17
+
+
+
+
+ 75
+ true
+
+
+
+ Input
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 11
+ 32
+ 67
+ 17
+
+
+
+ File
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 13
+ 261
+ 81
+ 17
+
+
+
+
+ 75
+ true
+
+
+
+ Execution
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 190
+ 284
+ 48
+ 27
+
+
+
+ <html><head/><body><p>Number of threads used for the generation of conformations</p></body></html>
+
+
+ 1
+
+
+ 1
+
+
+
+
+
+ 246
+ 60
+ 51
+ 20
+
+
+
+
+ true
+
+
+
+ Name
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 538
+ 29
+ 91
+ 23
+
+
+
+ <html><head/><body><p>Text file containing one molecule in SMILES format per line.</p></body></html>
+
+
+ Browse
+
+
+
+
+
+ 13
+ 143
+ 67
+ 17
+
+
+
+
+ 75
+ true
+
+
+
+ Output
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
+
+
+ 13
+ 234
+ 71
+ 17
+
+
+
+
+ 75
+ true
+
+
+
+ Method
+
+
+
+
+
+ 92
+ 165
+ 391
+ 21
+
+
+
+
+ 9
+
+
+
+ Path to output SDF file
+
+
+
+
+
+ 10
+ 169
+ 67
+ 17
+
+
+
+ File
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ -33
+ 60
+ 111
+ 20
+
+
+
+ Index
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
+ 0
+ 320
+ 640
+ 3
+
+
+
+ QFrame::Sunken
+
+
+ Qt::Horizontal
+
+
+
+
+
+ 230
+ 330
+ 181
+ 51
+
+
+
+
+ 14
+
+
+
+ <html><head/><body><p>Generates 3D structures in SDF format from SMILES, using RDKIT</p></body></html>
+
+
+ Generate 3D
+
+
+
+ ../img/run.png../img/run.png
+
+
+
+ 36
+ 36
+
+
+
+
+
+
+ 94
+ 62
+ 61
+ 17
+
+
+
+
+ true
+
+
+
+ SMILES
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
+
+
+
LigFlow
@@ -1414,11 +1900,6 @@
Bounding shape
- -
-
- SMILES to 3D
-
-
@@ -1631,9 +2112,10 @@
Help
+
+
-
@@ -1714,6 +2196,11 @@
Dark theme
+
+
+ Documentation
+
+
diff --git a/ChemFlow/src/GUI/qt_creator/tool_smiles_to_3d.ui b/ChemFlow/src/GUI/qt_creator/tool_smiles_to_3d.ui
deleted file mode 100644
index 22fa804..0000000
--- a/ChemFlow/src/GUI/qt_creator/tool_smiles_to_3d.ui
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
- ToolSmilesTo3d
-
-
-
- 0
- 0
- 480
- 499
-
-
-
- SMILES to 3D
-
-
-
-
- 20
- 10
- 111
- 17
-
-
-
-
- 75
- true
-
-
-
- SMILES to 3D
-
-
-
-
-
- 152
- 57
- 212
- 20
-
-
-
- Path to input SMILES file
-
-
-
-
-
- 368
- 55
- 86
- 23
-
-
-
- <html><head/><body><p>Text file containing one molecule in SMILES format per line.</p></body></html>
-
-
- Browse
-
-
-
-
-
- 40
- 36
- 61
- 20
-
-
-
-
- 75
- true
-
-
-
- Input
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
-
-
- 131
- 461
- 86
- 29
-
-
-
- Ok
-
-
-
-
-
- 261
- 461
- 86
- 29
-
-
-
- Cancel
-
-
-
-
-
- 60
- 59
- 67
- 17
-
-
-
- File
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- 150
- 83
- 48
- 27
-
-
-
- <html><head/><body><p>Index of the column containing the SMILES</p></body></html>
-
-
- 1
-
-
- 1
-
-
-
-
-
- 16
- 86
- 111
- 20
-
-
-
- SMILES column
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- 16
- 116
- 111
- 20
-
-
-
- Name column
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- 150
- 113
- 48
- 27
-
-
-
- <html><head/><body><p>Index of the column containing the names of your molecules</p></body></html>
-
-
- 1
-
-
- 2
-
-
-
-
-
- 60
- 149
- 67
- 17
-
-
-
- Delimiter
-
-
-
-
-
- 150
- 143
- 85
- 27
-
-
- -
-
- Tab
-
-
- -
-
- Space
-
-
- -
-
- ,
-
-
- -
-
- ;
-
-
- -
-
- :
-
-
-
-
-
-
- 150
- 174
- 171
- 22
-
-
-
- Fist line is a header
-
-
-
-
-
- 40
- 214
- 67
- 17
-
-
-
-
- 75
- true
-
-
-
- Output
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
-
-
- 152
- 236
- 301
- 20
-
-
-
- Path to output SDF file
-
-
-
-
-
- 59
- 240
- 67
- 17
-
-
-
- File
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- 150
- 265
- 221
- 22
-
-
-
- Write all Hydrogen atoms
-
-
-
-
-
- 150
- 291
- 221
- 22
-
-
-
- <html><head/><body><p>Print additional information to the terminal</p></body></html>
-
-
- Increase output verbosity
-
-
-
-
-
- 40
- 367
- 91
- 17
-
-
-
-
- 75
- true
-
-
-
- Execution
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
-
-
-
- 150
- 324
- 85
- 27
-
-
-
- <html><head/><body><p>Method used to generate 3D conformations: </p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">UFF</span> : distance geometry + force field minimization with UFF</li><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">MMFF</span> : distance geometry + force field minimization with MMFF</li><li style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ETKDG </span>: distance geometry with experimental torsion angles knowledge from the CSD</li></ul></body></html>
-
- -
-
- ETKDG
-
-
- -
-
- MMFF
-
-
- -
-
- UFF
-
-
-
-
-
-
- 40
- 330
- 81
- 17
-
-
-
-
- 75
- true
-
-
-
- Method
-
-
-
-
-
- 150
- 390
- 48
- 27
-
-
-
- <html><head/><body><p>Number of threads used for the generation of conformations</p></body></html>
-
-
- 1
-
-
- 1
-
-
-
-
-
- 25
- 394
- 101
- 20
-
-
-
- CPU threads
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
-
-
- 150
- 425
- 131
- 22
-
-
-
- Run with MPI
-
-
-
-
-
-
From d5a2595014be2a63ffc1c18f233036b0145e8ff0 Mon Sep 17 00:00:00 2001
From: cbouy
Date: Sat, 6 Oct 2018 19:19:46 +0200
Subject: [PATCH 07/65] fixed order when pressing tab
---
ChemFlow/src/GUI/qt_creator/UImainwindow.py | 15 ++++++++++++++-
ChemFlow/src/GUI/qt_creator/mainwindow.ui | 13 +++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/ChemFlow/src/GUI/qt_creator/UImainwindow.py b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
index 63aeed3..81554be 100644
--- a/ChemFlow/src/GUI/qt_creator/UImainwindow.py
+++ b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
@@ -655,7 +655,20 @@ def setupUi(self, MainWindow):
self.tabWidget.setCurrentIndex(0)
self.comboBox_tools.setCurrentIndex(-1)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
- MainWindow.setTabOrder(self.tabWidget, self.lineEdit_ligflow_lig)
+ MainWindow.setTabOrder(self.tabWidget, self.lineEdit_smiles_input)
+ MainWindow.setTabOrder(self.lineEdit_smiles_input, self.pushButton_smiles_input)
+ MainWindow.setTabOrder(self.pushButton_smiles_input, self.spinBox_smiles_col)
+ MainWindow.setTabOrder(self.spinBox_smiles_col, self.spinBox_names_col)
+ MainWindow.setTabOrder(self.spinBox_names_col, self.comboBox_delimiter)
+ MainWindow.setTabOrder(self.comboBox_delimiter, self.checkBox_header)
+ MainWindow.setTabOrder(self.checkBox_header, self.lineEdit_smiles_output)
+ MainWindow.setTabOrder(self.lineEdit_smiles_output, self.checkBox_hydrogen)
+ MainWindow.setTabOrder(self.checkBox_hydrogen, self.checkBox_verbose)
+ MainWindow.setTabOrder(self.checkBox_verbose, self.comboBox_method)
+ MainWindow.setTabOrder(self.comboBox_method, self.spinBox_nthreads)
+ MainWindow.setTabOrder(self.spinBox_nthreads, self.checkBox_mpi)
+ MainWindow.setTabOrder(self.checkBox_mpi, self.commandLinkButton_smiles_run)
+ MainWindow.setTabOrder(self.commandLinkButton_smiles_run, self.lineEdit_ligflow_lig)
MainWindow.setTabOrder(self.lineEdit_ligflow_lig, self.pushButton_ligflow_lig)
MainWindow.setTabOrder(self.pushButton_ligflow_lig, self.comboBox_charges)
MainWindow.setTabOrder(self.comboBox_charges, self.comboBox_ligflow_job_queue)
diff --git a/ChemFlow/src/GUI/qt_creator/mainwindow.ui b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
index e0bd40b..fb0c720 100644
--- a/ChemFlow/src/GUI/qt_creator/mainwindow.ui
+++ b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
@@ -2205,6 +2205,19 @@
tabWidget
+ lineEdit_smiles_input
+ pushButton_smiles_input
+ spinBox_smiles_col
+ spinBox_names_col
+ comboBox_delimiter
+ checkBox_header
+ lineEdit_smiles_output
+ checkBox_hydrogen
+ checkBox_verbose
+ comboBox_method
+ spinBox_nthreads
+ checkBox_mpi
+ commandLinkButton_smiles_run
lineEdit_ligflow_lig
pushButton_ligflow_lig
comboBox_charges
From c1170fae275cced2ef0fa8a3f4640d2e5c0778bf Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Tue, 9 Oct 2018 11:11:36 +0200
Subject: [PATCH 08/65] "_resp" as being added to RESP .mol2 files, only whe
using HPC resources. It's LigFlow folder is already named "resp" (bcc, gas,
original..) to simplify the naming schema.
---
ChemFlow/src/LigFlow_functions.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ChemFlow/src/LigFlow_functions.bash b/ChemFlow/src/LigFlow_functions.bash
index ad06d48..ab59283 100644
--- a/ChemFlow/src/LigFlow_functions.bash
+++ b/ChemFlow/src/LigFlow_functions.bash
@@ -304,7 +304,7 @@ case ${JOB_SCHEDULLER} in
echo "g09 <${RUNDIR}/resp/${LIGAND}.gau>${RUNDIR}/resp/${LIGAND}.gout" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
# Read Gaussian output and write new optimized ligand with RESP charges
- echo "antechamber -i ${RUNDIR}/resp/${LIGAND}.gout -fi gout -o ${RUNDIR}/resp/${LIGAND}_resp.mol2 -fo mol2 -c resp -s 2 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
+ echo "antechamber -i ${RUNDIR}/resp/${LIGAND}.gout -fi gout -o ${RUNDIR}/resp/${LIGAND}.mol2 -fo mol2 -c resp -s 2 -rn MOL -pf y -dr no -at gaff2 &> antechamber.log" >> ${RUNDIR}/LigFlow.${JOB_SCHEDULLER,,}
;;
esac
done
From 3bf2641a7436a42a7837c1074170a51199e4a111 Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Wed, 10 Oct 2018 12:40:54 +0200
Subject: [PATCH 09/65] DockFlow --postprocess was appending results in case
"docked_ligands.mol2" already existed. Now if it's there already we delete it
first.
---
ChemFlow/src/DockFlow_functions.bash | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ChemFlow/src/DockFlow_functions.bash b/ChemFlow/src/DockFlow_functions.bash
index 43006b7..5878c7c 100644
--- a/ChemFlow/src/DockFlow_functions.bash
+++ b/ChemFlow/src/DockFlow_functions.bash
@@ -576,6 +576,11 @@ for LIGAND in ${LIGAND_LIST[@]}; do
echo -ne "PostDock: ${PROTOCOL} - ${LIGAND} \r"
head -${DOCK_POSES} ${LIGAND}/PLANTS/ranking.csv | awk -v protocol=${PROTOCOL} -v target=${RECEPTOR_NAME} -v ligand=${LIGAND} -F, '!/LIGAND_ENTRY/ {print "PLANTS",protocol,target,ligand,$1,$2}' >> DockFlow.csv
+ # First, a clean up.
+ if [ -f ${RUNDIR}/docked_ligands.mol2 ] ; then
+ rm -rf ${RUNDIR}/docked_ligands.mol2
+ fi
+
# Create the docked_ligands.mol2, a file containing every conformations of every ligands.
OLDIFS=$IFS
IFS='%'
From f3aca87ab3c6d31a08b9c74c59d9105d0faa0d9f Mon Sep 17 00:00:00 2001
From: Diego Gomes
Date: Wed, 10 Oct 2018 13:50:21 +0200
Subject: [PATCH 10/65] Introduced "-dr no" and "--yes" into ScoreFlow to allow
scripting.
---
ChemFlow/src/DockFlow_functions.bash | 17 ++++++++++-------
ChemFlow/src/ScoreFlow_functions.bash | 22 ++++++++++++++--------
2 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/ChemFlow/src/DockFlow_functions.bash b/ChemFlow/src/DockFlow_functions.bash
index 5878c7c..6bd10e7 100644
--- a/ChemFlow/src/DockFlow_functions.bash
+++ b/ChemFlow/src/DockFlow_functions.bash
@@ -743,13 +743,16 @@ else
echo "[ DockFlow ] Done with post-processing."
# Archiving.
- echo -n "[ DockFlow ] Archive the docking results (folders) in TAR files? [y/n] "
- read opt
- case ${opt} in
- "y"|"yes"|"Yes"|"Y"|"YES")
- DockFlow_archive
- ;;
- esac
+ if [ ! -z ${ARCHIVE} ] ; then
+ echo -n "[ DockFlow ] Archive the docking results (folders) in TAR files? [y/n] "
+ read opt
+ case ${opt} in
+ "y"|"yes"|"Yes"|"Y"|"YES")
+ DockFlow_archive
+ ;;
+ esac
+ fi
+
fi
unset FAIL
diff --git a/ChemFlow/src/ScoreFlow_functions.bash b/ChemFlow/src/ScoreFlow_functions.bash
index 0d0205e..5e38d0c 100644
--- a/ChemFlow/src/ScoreFlow_functions.bash
+++ b/ChemFlow/src/ScoreFlow_functions.bash
@@ -343,7 +343,7 @@ if [ ${CHARGE} != 'gas' ] ; then
echo "${CHARGE} charges found in LigFlow for ${LIGAND}"
awk '/1 MOL/&&!/TEMP/ {print $9}' ${WORKDIR}/${PROJECT}.chemflow/LigFlow/${CHARGE}/${LIGAND_NAME}.mol2 > charges.dat
- antechamber -i ligand_gas.mol2 -o ligand_${CHARGE}.mol2 -fi mol2 -fo mol2 -cf charges.dat -c rc -pf yes &> /dev/null
+ antechamber -i ligand_gas.mol2 -o ligand_${CHARGE}.mol2 -fi mol2 -fo mol2 -cf charges.dat -c rc -pf yes -dr no &> /dev/null
# Done
DONE_CHARGE="true"
@@ -750,13 +750,16 @@ JOB SCHEDULLER: ${JOB_SCHEDULLER}
OVERWRITE: ${OVERWRITE}
"
-echo -n "
-Continue [y/n]? "
-read opt
-case $opt in
-"Y"|"YES"|"Yes"|"yes"|"y") ;;
-*) echo "Exiting" ; exit 0 ;;
-esac
+if [ "${YESTOALL}" != 'yes' ] ; then
+ echo -n "
+ Continue [y/n]? "
+ read opt
+ case $opt in
+ "Y"|"YES"|"Yes"|"yes"|"y") ;;
+ *) echo "Exiting" ; exit 0 ;;
+ esac
+fi
+
}
@@ -986,6 +989,9 @@ while [[ $# -gt 0 ]]; do
# --archive)
# ARCHIVE='yes'
# ;;
+ "--yes")
+ YESTOALL='yes'
+ ;;
*)
unknown="$1" # unknown option
echo "Unknown flag \"$unknown\". RTFM"
From 448e5c7249e3d77d14cbda0592aafc1f36f4fb35 Mon Sep 17 00:00:00 2001
From: cbouy
Date: Thu, 11 Oct 2018 21:52:49 +0200
Subject: [PATCH 11/65] SmilesTo3D update and bugfix on GUI
---
ChemFlow/bin/SmilesTo3D.py | 8 +++----
ChemFlow/src/GUI/GUI.py | 25 ++++++++++++---------
ChemFlow/src/GUI/qss/dark.css | 10 +++++++++
ChemFlow/src/GUI/qt_creator/UImainwindow.py | 5 +++--
ChemFlow/src/GUI/qt_creator/mainwindow.ui | 8 ++++++-
install.sh | 2 +-
6 files changed, 40 insertions(+), 18 deletions(-)
diff --git a/ChemFlow/bin/SmilesTo3D.py b/ChemFlow/bin/SmilesTo3D.py
index e312918..55fcaaa 100755
--- a/ChemFlow/bin/SmilesTo3D.py
+++ b/ChemFlow/bin/SmilesTo3D.py
@@ -75,10 +75,10 @@ def Generate3D(mol):
else:
AllChem.MMFFOptimizeMolecule(m_H)
# Keep hydrogens or not
- if args.hydrogen:
- m = m_H
- else:
+ if args.no_hydrogen:
m = Chem.RemoveHs(m_H)
+ else:
+ m = m_H
return m
def ExThreadSubmit(smiles, args):
@@ -148,7 +148,7 @@ def OutputSDF(structures, args):
group_output = parser.add_argument_group('OUTPUT arguments')
group_output.add_argument("-o", "--output", metavar='filename', required=True, type=str, help="Path to the output SDF file")
- group_output.add_argument("--hydrogen", action="store_true", help="Output with all hydrogen atoms" )
+ group_output.add_argument("-noh", "--no-hydrogen", action="store_true", help="Remove hydrogen atoms from the output" )
group_output.add_argument("-v", "--verbose", action="store_true", help="Increase terminal output verbosity")
group_args = parser.add_argument_group('Other arguments')
diff --git a/ChemFlow/src/GUI/GUI.py b/ChemFlow/src/GUI/GUI.py
index 28661c5..112e2d3 100755
--- a/ChemFlow/src/GUI/GUI.py
+++ b/ChemFlow/src/GUI/GUI.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
from PyQt5 import QtGui, QtWidgets
-from PyQt5.QtWidgets import QFileDialog, QMainWindow
+from PyQt5.QtWidgets import QFileDialog, QMainWindow, QDesktopWidget
from PyQt5.QtCore import QProcess, QByteArray, QRegExp
from webbrowser import open as browser_open
from time import strftime, gmtime
@@ -23,6 +23,11 @@ class Main(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)
+ # show the main window at the center of the screen
+ qtRectangle = self.frameGeometry()
+ centerPoint = QDesktopWidget().availableGeometry().center()
+ qtRectangle.moveCenter(centerPoint)
+ self.move(qtRectangle.topLeft())
# set window icon and logo
icon = QtGui.QIcon()
logo_path = os.path.realpath(os.path.join(WORKDIR, "img", "logo.png"))
@@ -271,11 +276,11 @@ def configure_scoring_protocol(self):
def configure_workflow_execution(self):
'''Configure how the workflow is going to run on the local machine'''
# get the selected execution mode
- if self.tabWidget.currentIndex() == 0: # LigFlow
+ if self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_LigFlow): # LigFlow
self.input['JobQueue'] = self.comboBox_ligflow_job_queue.currentText()
- elif self.tabWidget.currentIndex() == 1: # DockFlow
+ elif self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_DockFlow): # DockFlow
self.input['JobQueue'] = self.comboBox_docking_job_queue.currentText()
- elif self.tabWidget.currentIndex() == 2: # ScoreFlow
+ elif self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_ScoreFlow): # ScoreFlow
self.input['JobQueue'] = self.comboBox_scoring_job_queue.currentText()
# launch appropriate dialog
@@ -295,11 +300,11 @@ def configure_workflow_execution(self):
if workflow_execution:
for kw in workflow_execution:
self.input[kw] = workflow_execution[kw]
- if self.tabWidget.currentIndex() == 0: # LigFlow
+ if self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_LigFlow): # LigFlow
self.ligflow_execution = True
- elif self.tabWidget.currentIndex() == 1: # DockFlow
+ elif self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_DockFlow): # DockFlow
self.docking_execution = True
- elif self.tabWidget.currentIndex() == 2: # ScoreFlow
+ elif self.tabWidget.currentIndex() == self.tabWidget.indexOf(self.tab_ScoreFlow): # ScoreFlow
self.scoring_execution = True
def check_ligflow_required_args(self):
@@ -366,7 +371,7 @@ def run_smiles(self):
self.input['NamesColumn'] = self.spinBox_names_col.value()
self.input['NThreads'] = self.spinBox_nthreads.value()
self.input['Header'] = self.checkBox_header.isChecked()
- self.input['AllHydrogens'] = self.checkBox_hydrogen.isChecked()
+ self.input['NoHydrogen'] = self.checkBox_hydrogen.isChecked()
self.input['Verbose'] = self.checkBox_verbose.isChecked()
self.input['MPI'] = self.checkBox_mpi.isChecked()
value = self.comboBox_delimiter.currentText()
@@ -573,8 +578,8 @@ def build_smiles_command(self):
command.extend(['-nt', self.input['NThreads']])
if self.input['Header']:
command.append('--header')
- if self.input['AllHydrogens']:
- command.append('--hydrogen')
+ if self.input['NoHydrogen']:
+ command.append('-noh')
if self.input['Verbose']:
command.append('-v')
if self.input['MPI']:
diff --git a/ChemFlow/src/GUI/qss/dark.css b/ChemFlow/src/GUI/qss/dark.css
index f868cc8..e6b38d7 100644
--- a/ChemFlow/src/GUI/qss/dark.css
+++ b/ChemFlow/src/GUI/qss/dark.css
@@ -1,6 +1,9 @@
/*
Custom theme settings
*/
+QMenuBar {
+ border-bottom: 1px solid red;
+}
QTabBar::tab {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
@@ -48,6 +51,13 @@ QPushButton:disabled {
background-color: #474747;
color: #8e8e8e;
}
+QCheckBox::indicator:disabled {
+ background-color: #8e8e8e;
+}
+QLabel:disabled,
+QCheckBox:disabled {
+ color: #8e8e8e;
+}
QLabel,
QCheckBox {
background-color: transparent;
diff --git a/ChemFlow/src/GUI/qt_creator/UImainwindow.py b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
index 81554be..f65bf10 100644
--- a/ChemFlow/src/GUI/qt_creator/UImainwindow.py
+++ b/ChemFlow/src/GUI/qt_creator/UImainwindow.py
@@ -593,6 +593,7 @@ def setupUi(self, MainWindow):
MainWindow.setCentralWidget(self.centralWidget)
self.menuBar = QtWidgets.QMenuBar(MainWindow)
self.menuBar.setGeometry(QtCore.QRect(0, 0, 662, 25))
+ self.menuBar.setNativeMenuBar(False)
self.menuBar.setObjectName("menuBar")
self.menuProject = QtWidgets.QMenu(self.menuBar)
self.menuProject.setObjectName("menuProject")
@@ -730,7 +731,8 @@ def retranslateUi(self, MainWindow):
self.checkBox_mpi.setText(_translate("MainWindow", "Run with MPI"))
self.lineEdit_smiles_input.setPlaceholderText(_translate("MainWindow", "Path to input SMILES file"))
self.checkBox_header.setText(_translate("MainWindow", "Fist line is a header"))
- self.checkBox_hydrogen.setText(_translate("MainWindow", "Write all Hydrogen atoms"))
+ self.checkBox_hydrogen.setToolTip(_translate("MainWindow", "Remove hydrogen atoms from the output
"))
+ self.checkBox_hydrogen.setText(_translate("MainWindow", "Remove hydrogen atoms"))
self.spinBox_names_col.setToolTip(_translate("MainWindow", "Index of the column containing the names of your molecules. Leave to 2 if there are no names.
"))
self.label_rec_2.setText(_translate("MainWindow", "Input"))
self.label_11.setText(_translate("MainWindow", "File"))
@@ -895,4 +897,3 @@ def retranslateUi(self, MainWindow):
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())
-
diff --git a/ChemFlow/src/GUI/qt_creator/mainwindow.ui b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
index fb0c720..83def21 100644
--- a/ChemFlow/src/GUI/qt_creator/mainwindow.ui
+++ b/ChemFlow/src/GUI/qt_creator/mainwindow.ui
@@ -253,8 +253,11 @@
22
+
+ <html><head/><body><p>Remove hydrogen atoms from the output</p></body></html>
+
- Write all Hydrogen atoms
+ Remove hydrogen atoms
@@ -2099,6 +2102,9 @@
25
+
+ false
+