From d0f84fd74415e8759ef4d768faa4bd86e5ea97fe Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Wed, 29 Sep 2021 14:16:06 -0400
Subject: [PATCH 01/56] Always provide CJSON to interface scripts to enable
selection, etc.
Signed-off-by: Geoff Hutchison
---
avogadro/qtgui/interfacescript.cpp | 63 ++++++++++++++++--------------
1 file changed, 34 insertions(+), 29 deletions(-)
diff --git a/avogadro/qtgui/interfacescript.cpp b/avogadro/qtgui/interfacescript.cpp
index 2a6cd59c13..44e017768d 100644
--- a/avogadro/qtgui/interfacescript.cpp
+++ b/avogadro/qtgui/interfacescript.cpp
@@ -163,7 +163,8 @@ bool InterfaceScript::runCommand(const QJsonObject& options_,
if (!insertMolecule(allOptions, *mol))
return false;
- connect(m_interpreter, &PythonScript::finished, this, &::Avogadro::QtGui::InterfaceScript::commandFinished);
+ connect(m_interpreter, &PythonScript::finished, this,
+ &::Avogadro::QtGui::InterfaceScript::commandFinished);
m_interpreter->asyncExecute(QStringList() << QStringLiteral("--run-command"),
QJsonDocument(allOptions).toJson());
return true;
@@ -471,18 +472,20 @@ bool InterfaceScript::insertMolecule(QJsonObject& json,
if (m_moleculeExtension == QLatin1String("None"))
return true;
- // insert the selected atoms
+ // Always insert the selected atoms
QJsonArray selectedList;
for (Index i = 0; i < mol.atomCount(); ++i) {
if (mol.atomSelected(i))
selectedList.append(static_cast(i));
}
- json.insert("selectedatoms", selectedList);
+ json.insert("selectedAtoms", selectedList);
Io::FileFormatManager& formats = Io::FileFormatManager::instance();
QScopedPointer format(
formats.newFormatFromFileExtension(m_moleculeExtension.toStdString()));
+ QScopedPointer cjsonFormat(formats.newFormatFromFileExtension("cjson"));
+ // If we want something *other* than CJSON, check that we can supply that format
if (format.isNull()) {
m_errors << tr("Error writing molecule representation to string: "
"Unrecognized file format: %1")
@@ -499,29 +502,31 @@ bool InterfaceScript::insertMolecule(QJsonObject& json,
if (m_moleculeExtension != QLatin1String("cjson")) {
json.insert(m_moleculeExtension, QJsonValue(QString::fromStdString(str)));
- } else {
- // If cjson was requested, embed the actual JSON, rather than the string.
- QJsonParseError error;
- QJsonDocument doc = QJsonDocument::fromJson(str.c_str(), &error);
- if (error.error != QJsonParseError::NoError) {
- m_errors << tr("Error generating cjson object: Parse error at offset %1: "
- "%2\nRaw JSON:\n\n%3")
- .arg(error.offset)
- .arg(error.errorString())
- .arg(QString::fromStdString(str));
- return false;
- }
+ }
- if (!doc.isObject()) {
- m_errors << tr("Error generator cjson object: Parsed JSON is not an "
- "object:\n%1")
- .arg(QString::fromStdString(str));
- return false;
- }
+ // And we *always* write the CJSON representation
+ // Embed CJSON as actual JSON, rather than a string, so we have to parse it again
+ cjsonFormat->writeString(str, mol);
+ QJsonParseError error;
+ QJsonDocument doc = QJsonDocument::fromJson(str.c_str(), &error);
+ if (error.error != QJsonParseError::NoError) {
+ m_errors << tr("Error generating cjson object: Parse error at offset %1: "
+ "%2\nRaw JSON:\n\n%3")
+ .arg(error.offset)
+ .arg(error.errorString())
+ .arg(QString::fromStdString(str));
+ return false;
+ }
- json.insert(m_moleculeExtension, doc.object());
+ if (!doc.isObject()) {
+ m_errors << tr("Error generator cjson object: Parsed JSON is not an "
+ "object:\n%1")
+ .arg(QString::fromStdString(str));
+ return false;
}
+ json.insert("cjson", doc.object());
+
return true;
}
@@ -604,7 +609,7 @@ bool InterfaceScript::parseHighlightStyles(const QJsonArray& json) const
GenericHighlighter* highlighter(
new GenericHighlighter(const_cast(this)));
if (!parseRules(rulesArray, *highlighter)) {
- qDebug() << "Error parsing style" << styleName << endl
+ qDebug() << "Error parsing style" << styleName << Qt::endl
<< QString(QJsonDocument(styleObj).toJson());
highlighter->deleteLater();
result = false;
@@ -629,13 +634,13 @@ bool InterfaceScript::parseRules(const QJsonArray& json,
QJsonObject ruleObj(ruleVal.toObject());
if (!ruleObj.contains(QStringLiteral("patterns"))) {
- qDebug() << "Rule missing 'patterns' array:" << endl
+ qDebug() << "Rule missing 'patterns' array:" << Qt::endl
<< QString(QJsonDocument(ruleObj).toJson());
result = false;
continue;
}
if (!ruleObj.value(QStringLiteral("patterns")).isArray()) {
- qDebug() << "Rule 'patterns' member is not an array:" << endl
+ qDebug() << "Rule 'patterns' member is not an array:" << Qt::endl
<< QString(QJsonDocument(ruleObj).toJson());
result = false;
continue;
@@ -644,13 +649,13 @@ bool InterfaceScript::parseRules(const QJsonArray& json,
ruleObj.value(QStringLiteral("patterns")).toArray());
if (!ruleObj.contains(QStringLiteral("format"))) {
- qDebug() << "Rule missing 'format' object:" << endl
+ qDebug() << "Rule missing 'format' object:" << Qt::endl
<< QString(QJsonDocument(ruleObj).toJson());
result = false;
continue;
}
if (!ruleObj.value(QStringLiteral("format")).isObject()) {
- qDebug() << "Rule 'format' member is not an object:" << endl
+ qDebug() << "Rule 'format' member is not an object:" << Qt::endl
<< QString(QJsonDocument(ruleObj).toJson());
result = false;
continue;
@@ -662,7 +667,7 @@ bool InterfaceScript::parseRules(const QJsonArray& json,
foreach (QJsonValue patternVal, patternsArray) {
QRegExp pattern;
if (!parsePattern(patternVal, pattern)) {
- qDebug() << "Error while parsing pattern:" << endl
+ qDebug() << "Error while parsing pattern:" << Qt::endl
<< QString(QJsonDocument(patternVal.toObject()).toJson());
result = false;
continue;
@@ -672,7 +677,7 @@ bool InterfaceScript::parseRules(const QJsonArray& json,
QTextCharFormat format;
if (!parseFormat(formatObj, format)) {
- qDebug() << "Error while parsing format:" << endl
+ qDebug() << "Error while parsing format:" << Qt::endl
<< QString(QJsonDocument(formatObj).toJson());
result = false;
}
From fb3728ae27028dade103c5cc454e7f9bacf3ae9a Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Tue, 17 Oct 2023 12:54:21 -0400
Subject: [PATCH 02/56] Add rotate / translate / zoom to the navigator tool
Signed-off-by: Geoff Hutchison
---
avogadro/qtplugins/navigator/navigator.cpp | 57 +++++++++++++++++++---
avogadro/qtplugins/navigator/navigator.h | 5 ++
2 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/avogadro/qtplugins/navigator/navigator.cpp b/avogadro/qtplugins/navigator/navigator.cpp
index d901615a68..cd55a466c5 100644
--- a/avogadro/qtplugins/navigator/navigator.cpp
+++ b/avogadro/qtplugins/navigator/navigator.cpp
@@ -13,12 +13,13 @@
#include
#include
-#include
+#include
+#include
#include
+#include
#include
#include
#include
-#include
#include
#include
@@ -42,11 +43,53 @@ Navigator::Navigator(QObject* parent_)
"Left Mouse: \tClick and drag to rotate the view.\n"
"Middle Mouse: \tClick and drag to zoom in or out.\n"
"Right Mouse: \tClick and drag to move the view.\n"));
-
+
QSettings settings;
m_zoomDirection = settings.value("navigator/zoom", 1).toInt();
}
+void Navigator::registerCommands()
+{
+ emit registerCommand("rotateScene",
+ tr("Rotate the scene along the x, y, or z axes."));
+ emit registerCommand("zoomScene", tr("Zoom the scene."));
+ emit registerCommand("translateScene", tr("Translate the scene."));
+}
+
+bool Navigator::handleCommand(const QString& command,
+ const QVariantMap& options)
+{
+ qDebug() << "Navigator::handleCommand: " << command;
+ qDebug() << (m_renderer == nullptr);
+ qDebug() << (m_glWidget == nullptr);
+ qDebug() << (m_molecule == nullptr);
+
+ if (m_renderer == nullptr)
+ return false; // No camera
+
+ if (command == "rotateScene") {
+ float x = options.value("x").toFloat() * DEG_TO_RAD;
+ float y = options.value("y").toFloat() * DEG_TO_RAD;
+ float z = options.value("z").toFloat() * DEG_TO_RAD;
+ rotate(m_renderer->camera().focus(), x, y, z);
+ m_glWidget->requestUpdate();
+ qDebug() << "rotateScene: " << x << y << z;
+ return true;
+ } else if (command == "zoomScene") {
+ float d = options.value("delta").toFloat();
+ zoom(m_renderer->camera().focus(), d);
+ m_glWidget->requestUpdate();
+ return true;
+ } else if (command == "translateScene") {
+ float x = options.value("x").toFloat();
+ float y = options.value("y").toFloat();
+ translate(m_renderer->camera().focus(), x, y);
+ m_glWidget->requestUpdate();
+ return true;
+ }
+ return false;
+}
+
Navigator::~Navigator() {}
QWidget* Navigator::toolWidget() const
@@ -55,8 +98,7 @@ QWidget* Navigator::toolWidget() const
m_toolWidget = new QWidget(qobject_cast(parent()));
auto* layout = new QVBoxLayout;
- auto* swapZoom =
- new QCheckBox(tr("Reverse Direction of Zoom on Scroll"));
+ auto* swapZoom = new QCheckBox(tr("Reverse Direction of Zoom on Scroll"));
swapZoom->setToolTip(
tr("Default:\t Scroll down to shrink, scroll up to zoom\n"
"Reversed:\t Scroll up to shrink, scroll down to zoom"));
@@ -169,7 +211,8 @@ QUndoCommand* Navigator::wheelEvent(QWheelEvent* e)
QPoint numDegrees = e->angleDelta() * 0.125;
// see https://doc.qt.io/qt-5/qwheelevent.html#pixelDelta
- if (!numPixels.isNull() && QGuiApplication::platformName().toStdString().compare("xcb"))
+ if (!numPixels.isNull() &&
+ QGuiApplication::platformName().toStdString().compare("xcb"))
d = numPixels.y(); // use pixelDelta() when available, except on X11
else if (!numDegrees.isNull())
d = numDegrees.y(); // fall back to angleDelta()
@@ -299,4 +342,4 @@ inline void Navigator::translate(const Vector3f& ref, const Vector2f& fromScr,
m_renderer->camera().translate(to - from);
}
-} // namespace Avogadro
+} // namespace Avogadro::QtPlugins
diff --git a/avogadro/qtplugins/navigator/navigator.h b/avogadro/qtplugins/navigator/navigator.h
index ee1d1ec05a..8a1cd73441 100644
--- a/avogadro/qtplugins/navigator/navigator.h
+++ b/avogadro/qtplugins/navigator/navigator.h
@@ -49,6 +49,11 @@ class Navigator : public QtGui::ToolPlugin
QUndoCommand* keyPressEvent(QKeyEvent* e) override;
QUndoCommand* keyReleaseEvent(QKeyEvent* e) override;
+ bool handleCommand(const QString& command,
+ const QVariantMap& options) override;
+
+ void registerCommands() override;
+
protected slots:
void swapZoomDirection(bool checked);
From c6afa7e9ceb59a773b5a4aad2b9c7870df130d81 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Mon, 23 Oct 2023 22:29:28 -0400
Subject: [PATCH 03/56] Install ligand and functional group fragments
Signed-off-by: Geoff Hutchison
---
.../qtplugins/templatetool/CMakeLists.txt | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/avogadro/qtplugins/templatetool/CMakeLists.txt b/avogadro/qtplugins/templatetool/CMakeLists.txt
index 91a10eb9cf..9f66eb38cf 100644
--- a/avogadro/qtplugins/templatetool/CMakeLists.txt
+++ b/avogadro/qtplugins/templatetool/CMakeLists.txt
@@ -21,4 +21,26 @@ avogadro_plugin(TemplateTool
"${template_rcs}"
)
+# Install the fragments
+set(_molecules "${AvogadroLibs_SOURCE_DIR}/../fragments")
+
+# Look in parallel directory for the molecule fragment repository
+if(NOT EXISTS "${_fragments}")
+# download molecules...
+ExternalProject_Add(fragments
+ GIT_REPOSITORY https://github.com/openchemistry/fragments
+ GIT_TAG main
+ # or https://github.com/OpenChemistry/molecules/archive/refs/heads/master.zip
+ SOURCE_DIR "${AvogadroLibs_SOURCE_DIR}/../fragments"
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+)
+endif()
+
+install(DIRECTORY "${AvogadroLibs_SOURCE_DIR}/../fragments"
+ DESTINATION "${INSTALL_DATA_DIR}/avogadro2"
+ PATTERN ".git" EXCLUDE
+)
+
target_link_libraries(TemplateTool LINK_PRIVATE Avogadro::QtOpenGL)
From c26c95bdc913aa31baa25b59fa7a0af8f44c3f52 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Fri, 3 Nov 2023 23:49:33 -0400
Subject: [PATCH 04/56] Move code for shared use of the fragment dialog
Signed-off-by: Geoff Hutchison
---
avogadro/qtgui/CMakeLists.txt | 5 +++++
.../insertfragment => qtgui}/insertfragmentdialog.cpp | 3 +--
.../insertfragment => qtgui}/insertfragmentdialog.h | 0
.../insertfragment => qtgui}/insertfragmentdialog.ui | 0
.../insertfragment => qtgui}/sortfiltertreeproxymodel.cpp | 2 --
.../insertfragment => qtgui}/sortfiltertreeproxymodel.h | 0
avogadro/qtplugins/insertfragment/CMakeLists.txt | 3 +--
avogadro/qtplugins/insertfragment/insertfragment.cpp | 3 +--
8 files changed, 8 insertions(+), 8 deletions(-)
rename avogadro/{qtplugins/insertfragment => qtgui}/insertfragmentdialog.cpp (99%)
rename avogadro/{qtplugins/insertfragment => qtgui}/insertfragmentdialog.h (100%)
rename avogadro/{qtplugins/insertfragment => qtgui}/insertfragmentdialog.ui (100%)
rename avogadro/{qtplugins/insertfragment => qtgui}/sortfiltertreeproxymodel.cpp (99%)
rename avogadro/{qtplugins/insertfragment => qtgui}/sortfiltertreeproxymodel.h (100%)
diff --git a/avogadro/qtgui/CMakeLists.txt b/avogadro/qtgui/CMakeLists.txt
index dd8fda69c2..c49b733968 100644
--- a/avogadro/qtgui/CMakeLists.txt
+++ b/avogadro/qtgui/CMakeLists.txt
@@ -42,6 +42,7 @@ avogadro_headers(QtGui
fileformatdialog.h
generichighlighter.h
hydrogentools.h
+ insertfragmentdialog.h
interfacescript.h
interfacewidget.h
jsonwidget.h
@@ -60,6 +61,7 @@ avogadro_headers(QtGui
sceneplugin.h
scenepluginmodel.h
scriptloader.h
+ sortfiltertreeproxymodel.h
toolplugin.h
utilities.h
viewfactory.h
@@ -78,6 +80,7 @@ target_sources(QtGui PRIVATE
fileformatdialog.cpp
generichighlighter.cpp
hydrogentools.cpp
+ insertfragmentdialog.cpp
interfacescript.cpp
interfacewidget.cpp
jsonwidget.cpp
@@ -95,6 +98,7 @@ target_sources(QtGui PRIVATE
sceneplugin.cpp
scenepluginmodel.cpp
scriptloader.cpp
+ sortfiltertreeproxymodel.cpp
toolplugin.cpp
utilities.cpp
viewfactory.cpp
@@ -102,6 +106,7 @@ target_sources(QtGui PRIVATE
set(UIS
customelementdialog.ui
+ insertfragmentdialog.ui
)
qt_wrap_ui(UI_SOURCES ${UIS})
target_sources(QtGui PRIVATE ${UI_SOURCES})
diff --git a/avogadro/qtplugins/insertfragment/insertfragmentdialog.cpp b/avogadro/qtgui/insertfragmentdialog.cpp
similarity index 99%
rename from avogadro/qtplugins/insertfragment/insertfragmentdialog.cpp
rename to avogadro/qtgui/insertfragmentdialog.cpp
index c9e9962f2b..177937a85a 100644
--- a/avogadro/qtplugins/insertfragment/insertfragmentdialog.cpp
+++ b/avogadro/qtgui/insertfragmentdialog.cpp
@@ -14,9 +14,8 @@
******************************************************************************/
-#include "insertfragmentdialog.h"
#include "ui_insertfragmentdialog.h"
-
+#include "insertfragmentdialog.h"
#include "sortfiltertreeproxymodel.h"
#include
diff --git a/avogadro/qtplugins/insertfragment/insertfragmentdialog.h b/avogadro/qtgui/insertfragmentdialog.h
similarity index 100%
rename from avogadro/qtplugins/insertfragment/insertfragmentdialog.h
rename to avogadro/qtgui/insertfragmentdialog.h
diff --git a/avogadro/qtplugins/insertfragment/insertfragmentdialog.ui b/avogadro/qtgui/insertfragmentdialog.ui
similarity index 100%
rename from avogadro/qtplugins/insertfragment/insertfragmentdialog.ui
rename to avogadro/qtgui/insertfragmentdialog.ui
diff --git a/avogadro/qtplugins/insertfragment/sortfiltertreeproxymodel.cpp b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
similarity index 99%
rename from avogadro/qtplugins/insertfragment/sortfiltertreeproxymodel.cpp
rename to avogadro/qtgui/sortfiltertreeproxymodel.cpp
index 94f2845b8f..89456ad5ad 100644
--- a/avogadro/qtplugins/insertfragment/sortfiltertreeproxymodel.cpp
+++ b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
@@ -5,8 +5,6 @@
#include "sortfiltertreeproxymodel.h"
-#include
-
namespace Avogadro {
// Custom class for Avogadro to handle filtering files
diff --git a/avogadro/qtplugins/insertfragment/sortfiltertreeproxymodel.h b/avogadro/qtgui/sortfiltertreeproxymodel.h
similarity index 100%
rename from avogadro/qtplugins/insertfragment/sortfiltertreeproxymodel.h
rename to avogadro/qtgui/sortfiltertreeproxymodel.h
diff --git a/avogadro/qtplugins/insertfragment/CMakeLists.txt b/avogadro/qtplugins/insertfragment/CMakeLists.txt
index c67f35a406..3484257ca9 100644
--- a/avogadro/qtplugins/insertfragment/CMakeLists.txt
+++ b/avogadro/qtplugins/insertfragment/CMakeLists.txt
@@ -5,8 +5,7 @@ avogadro_plugin(InsertFragment
ExtensionPlugin
insertfragment.h
InsertFragment
- "insertfragment.cpp;insertfragmentdialog.cpp;sortfiltertreeproxymodel.cpp"
- "insertfragmentdialog.ui"
+ insertfragment.cpp
)
# Install the fragments & crystals
diff --git a/avogadro/qtplugins/insertfragment/insertfragment.cpp b/avogadro/qtplugins/insertfragment/insertfragment.cpp
index 99b6f5e58d..123c9e3c8a 100644
--- a/avogadro/qtplugins/insertfragment/insertfragment.cpp
+++ b/avogadro/qtplugins/insertfragment/insertfragment.cpp
@@ -4,7 +4,7 @@
******************************************************************************/
#include "insertfragment.h"
-#include "insertfragmentdialog.h"
+#include
#include
#include
@@ -13,7 +13,6 @@
#include
#include
-#include
#include
#include
From 9f53d4cfac47459f7ac59baba5fdf5cd75536b3f Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Tue, 14 Nov 2023 15:38:43 -0500
Subject: [PATCH 05/56] Fix GFN-FF energy - redirect GFN-FF output through a
hack
Signed-off-by: Geoff Hutchison
---
.../qtplugins/forcefield/scripts/gfnff.py | 62 ++++++++++++++++---
1 file changed, 55 insertions(+), 7 deletions(-)
diff --git a/avogadro/qtplugins/forcefield/scripts/gfnff.py b/avogadro/qtplugins/forcefield/scripts/gfnff.py
index e8f5b1ae73..ddb0d44596 100644
--- a/avogadro/qtplugins/forcefield/scripts/gfnff.py
+++ b/avogadro/qtplugins/forcefield/scripts/gfnff.py
@@ -4,16 +4,59 @@
import argparse
import json
import sys
+import os
try:
import numpy as np
from xtb.libxtb import VERBOSITY_MUTED
- from xtb.interface import Calculator, Param
+ from xtb.interface import Calculator, Param, Environment
imported = True
except ImportError:
imported = False
+# we need to redirect stdout
+# this is from https://eli.thegreenplace.net/2015/redirecting-all-kinds-of-stdout-in-python/
+from contextlib import contextmanager
+import ctypes
+import io
+import tempfile
+
+libc = ctypes.CDLL(None)
+
+@contextmanager
+def stdout_redirector(stream):
+ # The original fd stdout points to. Usually 1 on POSIX systems.
+ original_stdout_fd = sys.stdout.fileno()
+
+ def _redirect_stdout(to_fd):
+ """Redirect stdout to the given file descriptor."""
+ # Flush the C-level buffer stdout
+ #libc.fflush(c_stdout)
+ # Flush and close sys.stdout - also closes the file descriptor (fd)
+ sys.stdout.close()
+ # Make original_stdout_fd point to the same file as to_fd
+ os.dup2(to_fd, original_stdout_fd)
+ # Create a new sys.stdout that points to the redirected fd
+ sys.stdout = io.TextIOWrapper(os.fdopen(original_stdout_fd, 'wb'))
+
+ # Save a copy of the original stdout fd in saved_stdout_fd
+ saved_stdout_fd = os.dup(original_stdout_fd)
+ try:
+ # Create a temporary file and redirect stdout to it
+ tfile = tempfile.TemporaryFile(mode='w+b')
+ _redirect_stdout(tfile.fileno())
+ # Yield to caller, then redirect stdout back to the saved fd
+ yield
+ _redirect_stdout(saved_stdout_fd)
+ # Copy contents of temporary file to the given stream
+ tfile.flush()
+ tfile.seek(0, io.SEEK_SET)
+ stream.write(tfile.read())
+ finally:
+ tfile.close()
+ os.close(saved_stdout_fd)
+
def getMetaData():
# before we return metadata, make sure xtb is in the path
@@ -57,16 +100,21 @@ def run(filename):
if "totalSpinMultiplicity" in mol_cjson["properties"]:
spin = mol_cjson["properties"]["totalSpinMultiplicity"]
- calc = Calculator(Param.GFNFF, atoms, coordinates,
+ # xtb doesn't properly mute
+ # so we redirect stdout to a StringIO
+ # and then just ignore it
+ f = io.BytesIO()
+ with stdout_redirector(f):
+ calc = Calculator(Param.GFNFF, atoms, coordinates,
charge=charge, uhf=spin)
- calc.set_verbosity(VERBOSITY_MUTED)
- res = calc.singlepoint()
+ calc.set_verbosity(VERBOSITY_MUTED)
+ res = calc.singlepoint()
# we loop forever - Avogadro will kill our process when done
while True:
# read new coordinates from stdin
for i in range(len(atoms)):
- coordinates[i] = np.fromstring(input())
+ coordinates[i] = np.fromstring(input(), sep=' ')
# .. convert from Angstrom to Bohr
coordinates /= 0.52917721067
@@ -74,8 +122,8 @@ def run(filename):
calc.update(coordinates)
calc.singlepoint(res)
- # first print the energy of these coordinates
print("AvogadroEnergy:", res.get_energy()) # in Hartree
+ # times 2625.5 kJ/mol
# now print the gradient
# .. we don't want the "[]" in the output
@@ -87,7 +135,7 @@ def run(filename):
if __name__ == "__main__":
- parser = argparse.ArgumentParser("GFN2 calculator")
+ parser = argparse.ArgumentParser("GFN-FF calculator")
parser.add_argument("--display-name", action="store_true")
parser.add_argument("--metadata", action="store_true")
parser.add_argument("-f", "--file", nargs=1)
From 8652889b9799f3c1f398ece1627b88e5339c0f82 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sat, 18 Nov 2023 22:52:21 -0500
Subject: [PATCH 06/56] Fix insert fragment to use dialog moved into QtGui
Signed-off-by: Geoff Hutchison
---
avogadro/qtgui/insertfragmentdialog.cpp | 4 ++--
avogadro/qtgui/insertfragmentdialog.h | 12 +++++++-----
avogadro/qtgui/insertfragmentdialog.ui | 4 ++--
avogadro/qtgui/sortfiltertreeproxymodel.cpp | 2 +-
avogadro/qtgui/sortfiltertreeproxymodel.h | 12 +++++++-----
avogadro/qtplugins/insertfragment/insertfragment.cpp | 3 ++-
avogadro/qtplugins/insertfragment/insertfragment.h | 6 +++---
7 files changed, 24 insertions(+), 19 deletions(-)
diff --git a/avogadro/qtgui/insertfragmentdialog.cpp b/avogadro/qtgui/insertfragmentdialog.cpp
index 177937a85a..c52dbb5e23 100644
--- a/avogadro/qtgui/insertfragmentdialog.cpp
+++ b/avogadro/qtgui/insertfragmentdialog.cpp
@@ -33,7 +33,7 @@
#include
-namespace Avogadro::QtPlugins {
+namespace Avogadro::QtGui {
class InsertFragmentDialog::Private
{
@@ -233,4 +233,4 @@ void InsertFragmentDialog::activated()
emit performInsert(currentFileName, m_implementation->crystalFiles);
}
-} // namespace Avogadro::QtPlugins
+} // namespace Avogadro::QtGui
diff --git a/avogadro/qtgui/insertfragmentdialog.h b/avogadro/qtgui/insertfragmentdialog.h
index a9c45bf633..b751a0697a 100644
--- a/avogadro/qtgui/insertfragmentdialog.h
+++ b/avogadro/qtgui/insertfragmentdialog.h
@@ -3,13 +3,15 @@
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/
-#ifndef AVOGADRO_QTPLUGINS_INSERTFRAGMENTDIALOG_H
-#define AVOGADRO_QTPLUGINS_INSERTFRAGMENTDIALOG_H
+#ifndef AVOGADRO_QTGUI_INSERTFRAGMENTDIALOG_H
+#define AVOGADRO_QTGUI_INSERTFRAGMENTDIALOG_H
+
+#include "avogadroqtguiexport.h"
#include
namespace Avogadro {
-namespace QtPlugins {
+namespace QtGui {
namespace Ui {
class InsertFragmentDialog;
@@ -18,7 +20,7 @@ class InsertFragmentDialog;
/**
* @brief Dialog to prompt a format and descriptor string.
*/
-class InsertFragmentDialog : public QDialog
+class AVOGADROQTGUI_EXPORT InsertFragmentDialog : public QDialog
{
Q_OBJECT
@@ -52,4 +54,4 @@ public Q_SLOTS:
} // namespace QtPlugins
} // namespace Avogadro
-#endif // AVOGADRO_QTPLUGINS_InsertFragmentDIALOG_H
+#endif // AVOGADRO_QTGUI_InsertFragmentDIALOG_H
diff --git a/avogadro/qtgui/insertfragmentdialog.ui b/avogadro/qtgui/insertfragmentdialog.ui
index cc3313318a..8455caebfa 100644
--- a/avogadro/qtgui/insertfragmentdialog.ui
+++ b/avogadro/qtgui/insertfragmentdialog.ui
@@ -1,7 +1,7 @@
- Avogadro::QtPlugins::InsertFragmentDialog
-
+ Avogadro::QtGui::InsertFragmentDialog
+
0
diff --git a/avogadro/qtgui/sortfiltertreeproxymodel.cpp b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
index 89456ad5ad..994bc6f0da 100644
--- a/avogadro/qtgui/sortfiltertreeproxymodel.cpp
+++ b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
@@ -5,7 +5,7 @@
#include "sortfiltertreeproxymodel.h"
-namespace Avogadro {
+namespace Avogadro::QtGui {
// Custom class for Avogadro to handle filtering files
// Directories are at most 2 levels deep until we get to files
diff --git a/avogadro/qtgui/sortfiltertreeproxymodel.h b/avogadro/qtgui/sortfiltertreeproxymodel.h
index e99fd09a23..e372749bdf 100644
--- a/avogadro/qtgui/sortfiltertreeproxymodel.h
+++ b/avogadro/qtgui/sortfiltertreeproxymodel.h
@@ -3,14 +3,16 @@
This source code is released under the 3-Clause BSD License, (see "LICENSE").
******************************************************************************/
-#ifndef SORTFILTERTREEPROXYMODEL_H
-#define SORTFILTERTREEPROXYMODEL_H
+#ifndef AVOGADRO_QTGUI_SORTFILTERTREEPROXYMODEL_H
+#define AVOGADRO_QTGUI_SORTFILTERTREEPROXYMODEL_H
+
+#include "avogadroqtguiexport.h"
#include
-namespace Avogadro {
+namespace Avogadro::QtGui {
- class SortFilterTreeProxyModel: public QSortFilterProxyModel
+ class AVOGADROQTGUI_EXPORT SortFilterTreeProxyModel: public QSortFilterProxyModel
{
Q_OBJECT
public:
@@ -29,6 +31,6 @@ namespace Avogadro {
QModelIndex m_sourceRoot;
};
-}
+} // End Avogadro QtGui namespace
#endif
diff --git a/avogadro/qtplugins/insertfragment/insertfragment.cpp b/avogadro/qtplugins/insertfragment/insertfragment.cpp
index 123c9e3c8a..f2a4cba340 100644
--- a/avogadro/qtplugins/insertfragment/insertfragment.cpp
+++ b/avogadro/qtplugins/insertfragment/insertfragment.cpp
@@ -4,8 +4,8 @@
******************************************************************************/
#include "insertfragment.h"
-#include
+#include
#include
#include
#include
@@ -21,6 +21,7 @@
using Avogadro::Io::FileFormatManager;
using Avogadro::QtGui::Molecule;
+using Avogadro::QtGui::InsertFragmentDialog;
namespace Avogadro::QtPlugins {
diff --git a/avogadro/qtplugins/insertfragment/insertfragment.h b/avogadro/qtplugins/insertfragment/insertfragment.h
index 39f2b2fdad..cfbe9ad33f 100644
--- a/avogadro/qtplugins/insertfragment/insertfragment.h
+++ b/avogadro/qtplugins/insertfragment/insertfragment.h
@@ -16,7 +16,7 @@ namespace Avogadro {
namespace Io {
class FileFormat;
}
-namespace QtPlugins {
+namespace QtGui {
class InsertFragmentDialog;
}
@@ -46,8 +46,8 @@ private slots:
private:
QList m_actions;
- InsertFragmentDialog* m_moleculeDialog;
- InsertFragmentDialog* m_crystalDialog;
+ QtGui::InsertFragmentDialog* m_moleculeDialog;
+ QtGui::InsertFragmentDialog* m_crystalDialog;
/// Maps identifier to extension:
QMap m_formats;
From 06679fc4de601a0df23e80e3059d5e73ca37bfea Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sat, 18 Nov 2023 22:53:04 -0500
Subject: [PATCH 07/56] Add support for settings in template tool (remember
previous options)
Signed-off-by: Geoff Hutchison
---
.../templatetool/templatetoolwidget.cpp | 109 ++++++++++++------
.../templatetool/templatetoolwidget.h | 3 +
2 files changed, 79 insertions(+), 33 deletions(-)
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
index a9b310fc8f..fc4d6a1c3b 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
@@ -8,6 +8,7 @@
#include
+#include
#include
#include
@@ -39,29 +40,18 @@ enum LigandType
};
TemplateToolWidget::TemplateToolWidget(QWidget* parent_)
- : QWidget(parent_), m_ui(new Ui::TemplateToolWidget), m_elementSelector(NULL),
- m_currentElement(26)
+ : QWidget(parent_), m_ui(new Ui::TemplateToolWidget),
+ m_elementSelector(nullptr), m_fragmentDialog(nullptr), m_currentElement(26)
{
m_ui->setupUi(this);
buildElements();
- connect(m_ui->elementComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(elementChanged(int)));
-
- connect(m_ui->coordinationComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(coordinationChanged(int)));
-
- connect(m_ui->typeComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(typeChanged(int)));
-
- connect(m_ui->ligandComboBox, SIGNAL(currentIndexChanged(int)), this,
- SLOT(ligandChanged(int)));
-
- // Show iron at startup.
- selectElement(26);
- // default coordination = octahedral
- m_ui->centerPreview->setIcon(QIcon(":/icons/centers/6-oct.png"));
+ // Get default options
+ QSettings settings;
+ settings.beginGroup("templatetool");
+ unsigned int currentElement = settings.value("element", 26).toUInt();
+ selectElement(currentElement);
// In the same order of the coordinationComboBox
// append ".png" for the icon and ".cjson" for the template
@@ -77,7 +67,33 @@ TemplateToolWidget::TemplateToolWidget(QWidget* parent_)
<< "7-pbp"
<< "8-sqa";
- typeChanged(LigandType::Monodentate);
+ connect(m_ui->elementComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(elementChanged(int)));
+
+ connect(m_ui->coordinationComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(coordinationChanged(int)));
+
+ connect(m_ui->typeComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(typeChanged(int)));
+
+ connect(m_ui->ligandComboBox, SIGNAL(currentIndexChanged(int)), this,
+ SLOT(ligandChanged(int)));
+
+ // default coordination = octahedral
+ QString currentCoord = settings.value("coordination", "6-oct").toString();
+ int index = m_centers.indexOf(currentCoord);
+ if (index < 0)
+ index = 7; // octahedral
+ m_ui->coordinationComboBox->setCurrentIndex(index);
+
+ // update the preview icon
+ QString iconPath = QString(":/icons/centers/%1.png").arg(currentCoord);
+ m_ui->centerPreview->setIcon(QIcon(iconPath));
+
+ unsigned int ligandType = settings.value("ligandType", 0).toUInt();
+ m_ui->typeComboBox->setCurrentIndex(ligandType);
+ // update the ligand combo box
+ typeChanged(ligandType);
}
TemplateToolWidget::~TemplateToolWidget()
@@ -150,6 +166,9 @@ void TemplateToolWidget::coordinationChanged(int index)
// get the icon name
QString iconName = m_centers[index];
+ QSettings settings;
+ settings.setValue("templatetool/coordination", iconName);
+
m_ui->centerPreview->setIcon(QIcon(":/icons/centers/" + iconName + ".png"));
}
@@ -160,11 +179,26 @@ void TemplateToolWidget::ligandChanged(int index)
// get the icon name
QString iconName = m_ligands[index];
+
+ // check if it's "other"
+ if (iconName.endsWith("-other")) {
+ if (!m_fragmentDialog) {
+ m_fragmentDialog = new QtGui::InsertFragmentDialog(this);
+ connect(m_fragmentDialog, SIGNAL(accepted()), this, SLOT(accepted()));
+ }
+ m_fragmentDialog->show();
+ return;
+ }
+
m_ui->ligandPreview->setIcon(QIcon(":/icons/ligands/" + iconName + ".png"));
}
void TemplateToolWidget::typeChanged(int index)
{
+ QSettings settings;
+ settings.beginGroup("templatetool");
+ settings.setValue("ligandType", index);
+
m_selectedUIDs.clear();
m_ui->ligandComboBox->clear();
m_ligands = QStringList();
@@ -176,50 +210,56 @@ void TemplateToolWidget::typeChanged(int index)
<< "carbonyl"
<< "cyano"
<< "phosphine"
- << "thiol";
+ << "thiol" << tr("Other…");
m_ligands << "1-ammine"
<< "1-aqua"
<< "1-carbonyl"
<< "1-cyano"
<< "1-phosphine"
- << "1-thiol";
+ << "1-thiol"
+ << "1-other";
m_denticity = 1;
break;
case LigandType::Bidentate: // Bidentate
ligandNames << "acetylacetonate"
<< "bipyridine"
- << "ethylenediamine";
+ << "ethylenediamine" << tr("Other…");
m_ligands << "2-acetylacetonate"
<< "2-bipyridine"
- << "2-ethylenediamine";
+ << "2-ethylenediamine"
+ << "2-other";
m_denticity = 2;
break;
case LigandType::Tridentate: // Tridentate
- ligandNames << "terpyridine";
- m_ligands << "3-terpyridine";
+ ligandNames << "terpyridine" << tr("Other…");
+ m_ligands << "3-terpyridine"
+ << "3-other";
m_denticity = 3;
break;
case LigandType::Tetradentate: // Tetradentate
ligandNames << "phthalocyanine"
<< "porphin"
- << "salen";
+ << "salen" << tr("Other…");
m_ligands << "4-phthalocyanine"
<< "4-porphin"
- << "4-salen";
+ << "4-salen"
+ << "4-other";
m_denticity = 4;
break;
case LigandType::Hexadentate: // Hexadentate
- ligandNames << "edta";
- m_ligands << "6-edta";
+ ligandNames << "edta" << tr("Other…");
+ m_ligands << "6-edta"
+ << "6-other";
m_denticity = 6;
break;
case LigandType::Haptic: // Haptic
ligandNames << "η2-ethylene"
<< "η5-cyclopentyl"
- << "η6-benzene";
+ << "η6-benzene" << tr("Other…");
m_ligands << "eta2-ethylene"
<< "eta5-cyclopentyl"
- << "eta6-benzene";
+ << "eta6-benzene"
+ << "eta-other";
m_denticity = 1;
break;
case LigandType::FunctionalGroup: // Functional Groups
@@ -228,7 +268,7 @@ void TemplateToolWidget::typeChanged(int index)
<< "ester"
<< "nitro"
<< "phenyl"
- << "sulfonate";
+ << "sulfonate" << tr("Other…");
m_ligands = ligandNames;
m_denticity = 1;
break;
@@ -261,6 +301,9 @@ void TemplateToolWidget::elementChanged(int index)
m_currentElement = static_cast(itemData.toInt());
}
}
+
+ QSettings settings;
+ settings.setValue("templatetool/element", m_currentElement);
}
void TemplateToolWidget::updateElementCombo()
@@ -285,7 +328,7 @@ void TemplateToolWidget::updateElementCombo()
atomicNum);
}
m_ui->elementComboBox->insertSeparator(m_ui->elementComboBox->count());
- m_ui->elementComboBox->addItem(tr("Other..."), ELEMENT_SELECTOR_TAG);
+ m_ui->elementComboBox->addItem(tr("Other…"), ELEMENT_SELECTOR_TAG);
// Reset the element if it still exists
selectElement(static_cast(
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.h b/avogadro/qtplugins/templatetool/templatetoolwidget.h
index 274c27d05e..8fe7451d55 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.h
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.h
@@ -11,6 +11,7 @@
namespace Avogadro {
namespace QtGui {
class PeriodicTableView;
+class InsertFragmentDialog;
}
namespace QtPlugins {
@@ -60,12 +61,14 @@ private slots:
void saveElements();
Ui::TemplateToolWidget *m_ui;
+ QtGui::InsertFragmentDialog *m_fragmentDialog;
QtGui::PeriodicTableView *m_elementSelector;
QList m_defaultElements;
QList m_userElements;
unsigned char m_currentElement;
QStringList m_centers;
QStringList m_ligands;
+ QString m_ligandPath;
int m_denticity;
std::vector m_selectedUIDs;
From c1ea51ed7310258e10d55db2e5aca4bb3f87ba99 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sat, 18 Nov 2023 23:45:40 -0500
Subject: [PATCH 08/56] Add support for inserting fragments from library
Signed-off-by: Geoff Hutchison
---
.../qtplugins/templatetool/templatetool.cpp | 11 ++-
.../templatetool/templatetoolwidget.cpp | 67 +++++++++++++++++--
.../templatetool/templatetoolwidget.h | 2 +
3 files changed, 74 insertions(+), 6 deletions(-)
diff --git a/avogadro/qtplugins/templatetool/templatetool.cpp b/avogadro/qtplugins/templatetool/templatetool.cpp
index c40bbd79d8..863026428d 100644
--- a/avogadro/qtplugins/templatetool/templatetool.cpp
+++ b/avogadro/qtplugins/templatetool/templatetool.cpp
@@ -408,8 +408,15 @@ void TemplateTool::atomLeftClick(QMouseEvent*)
return;
} else {
- QFile templ(":/templates/ligands/" + m_toolWidget->ligandString() +
- ".cjson");
+ QString path;
+ if (m_toolWidget->ligandString().endsWith(".cjson")) {
+ // we already have the full path .. from the insert browser
+ path = m_toolWidget->ligandString();
+ } else {
+ path = ":/templates/ligands/" + m_toolWidget->ligandString() + ".cjson";
+ }
+
+ QFile templ(path);
if (!templ.open(QFile::ReadOnly | QFile::Text))
return;
QTextStream templateStream(&templ);
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
index fc4d6a1c3b..2eeee329e6 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
@@ -156,6 +156,10 @@ QString TemplateToolWidget::ligandString() const
// tell us if we are using the clipboard
if (m_ui->typeComboBox->currentIndex() == LigandType::Clipboard)
return "Clipboard";
+ // check if it's "other"
+ if (m_ligands.at(m_ui->ligandComboBox->currentIndex()).endsWith("other"))
+ return m_ligandPath;
+
return m_ligands.at(m_ui->ligandComboBox->currentIndex());
}
@@ -181,11 +185,43 @@ void TemplateToolWidget::ligandChanged(int index)
QString iconName = m_ligands[index];
// check if it's "other"
- if (iconName.endsWith("-other")) {
- if (!m_fragmentDialog) {
- m_fragmentDialog = new QtGui::InsertFragmentDialog(this);
- connect(m_fragmentDialog, SIGNAL(accepted()), this, SLOT(accepted()));
+ if (iconName.endsWith("other")) {
+
+ // figure out the ligand type and the resulting path
+ // to the fragment files
+ int ligandType = m_ui->typeComboBox->currentIndex();
+ QString path = "fragments";
+
+ switch (ligandType) {
+ case LigandType::Monodentate:
+ path += "/ligands/monodentate";
+ break;
+ case LigandType::Bidentate:
+ path += "/ligands/bidentate";
+ break;
+ case LigandType::Tridentate:
+ path += "/ligands/tridentate";
+ break;
+ case LigandType::Tetradentate:
+ path += "/ligands/tetradentate";
+ break;
+ case LigandType::Hexadentate:
+ path += "/ligands/hexadentate";
+ break;
+ case LigandType::Haptic:
+ path += "/ligands/haptic";
+ break;
+ case LigandType::FunctionalGroup:
+ path += "/groups";
+ break;
}
+
+ if (m_fragmentDialog != nullptr)
+ m_fragmentDialog->deleteLater();
+
+ m_fragmentDialog = new QtGui::InsertFragmentDialog(this, path);
+ connect(m_fragmentDialog, SIGNAL(performInsert(const QString&, bool)), this,
+ SLOT(otherLigandInsert(const QString&, bool)));
m_fragmentDialog->show();
return;
}
@@ -193,6 +229,27 @@ void TemplateToolWidget::ligandChanged(int index)
m_ui->ligandPreview->setIcon(QIcon(":/icons/ligands/" + iconName + ".png"));
}
+void TemplateToolWidget::otherLigandInsert(const QString& fileName, bool crystal)
+{
+ if (m_fragmentDialog == nullptr)
+ return;
+
+ // get the ligand name
+ QString ligandName = m_fragmentDialog->fileName();
+ m_ligandPath = ligandName;
+
+ m_fragmentDialog->hide();
+ // it will be deleted later
+
+ // update the icon from the filename (so check for .png)
+ QString iconName = fileName;
+ if (iconName.endsWith(".cjson"))
+ iconName.chop(6);
+ iconName += ".png";
+ m_ui->ligandPreview->setIcon(QIcon(iconName));
+}
+
+
void TemplateToolWidget::typeChanged(int index)
{
QSettings settings;
@@ -270,6 +327,8 @@ void TemplateToolWidget::typeChanged(int index)
<< "phenyl"
<< "sulfonate" << tr("Other…");
m_ligands = ligandNames;
+ // make sure last one is "other"
+ m_ligands.last() = "1-other";
m_denticity = 1;
break;
case LigandType::Clipboard: // Clipboard
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.h b/avogadro/qtplugins/templatetool/templatetoolwidget.h
index 8fe7451d55..5f209c96a0 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.h
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.h
@@ -55,6 +55,8 @@ private slots:
void typeChanged(int index);
void ligandChanged(int index);
+ void otherLigandInsert(const QString& fileName, bool crystal);
+
private:
void buildElements();
void buildBondOrders();
From a35d7f72f11b2b291d5c35665e1bfe7d67a93d06 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sun, 19 Nov 2023 00:02:30 -0500
Subject: [PATCH 09/56] Fix formatting
Signed-off-by: Geoff Hutchison
---
avogadro/qtgui/insertfragmentdialog.cpp | 5 +-
avogadro/qtgui/insertfragmentdialog.h | 2 +-
avogadro/qtgui/sortfiltertreeproxymodel.cpp | 106 +++++++++---------
avogadro/qtgui/sortfiltertreeproxymodel.h | 43 +++----
.../insertfragment/insertfragment.cpp | 6 +-
.../qtplugins/insertfragment/insertfragment.h | 6 +-
.../templatetool/templatetoolwidget.cpp | 4 +-
.../templatetool/templatetoolwidget.h | 20 ++--
8 files changed, 100 insertions(+), 92 deletions(-)
diff --git a/avogadro/qtgui/insertfragmentdialog.cpp b/avogadro/qtgui/insertfragmentdialog.cpp
index c52dbb5e23..b1b514c3b0 100644
--- a/avogadro/qtgui/insertfragmentdialog.cpp
+++ b/avogadro/qtgui/insertfragmentdialog.cpp
@@ -14,9 +14,9 @@
******************************************************************************/
-#include "ui_insertfragmentdialog.h"
#include "insertfragmentdialog.h"
#include "sortfiltertreeproxymodel.h"
+#include "ui_insertfragmentdialog.h"
#include
@@ -117,7 +117,8 @@ InsertFragmentDialog::InsertFragmentDialog(QWidget* aParent, QString directory,
if (m_implementation->crystalFiles)
filters << "*.cif";
else
- filters << "*.cjson" << "*.cml";
+ filters << "*.cjson"
+ << "*.cml";
m_implementation->model->setNameFilters(filters);
m_implementation->proxy = new SortFilterTreeProxyModel(this);
diff --git a/avogadro/qtgui/insertfragmentdialog.h b/avogadro/qtgui/insertfragmentdialog.h
index b751a0697a..9655fd3053 100644
--- a/avogadro/qtgui/insertfragmentdialog.h
+++ b/avogadro/qtgui/insertfragmentdialog.h
@@ -52,6 +52,6 @@ public Q_SLOTS:
Private* m_implementation;
};
-} // namespace QtPlugins
+} // namespace QtGui
} // namespace Avogadro
#endif // AVOGADRO_QTGUI_InsertFragmentDIALOG_H
diff --git a/avogadro/qtgui/sortfiltertreeproxymodel.cpp b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
index 994bc6f0da..7eb1a07572 100644
--- a/avogadro/qtgui/sortfiltertreeproxymodel.cpp
+++ b/avogadro/qtgui/sortfiltertreeproxymodel.cpp
@@ -7,64 +7,66 @@
namespace Avogadro::QtGui {
- // Custom class for Avogadro to handle filtering files
- // Directories are at most 2 levels deep until we get to files
- bool SortFilterTreeProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const
- {
- // First we see if we're the source root node
- QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent);
- if (!sourceIndex.isValid() || !sourceParent.isValid())
- return true; // viewer will handle filtering
- // Make sure the root is always accepted, or we become rootless
- // See http://stackoverflow.com/questions/3212392/qtreeview-qfilesystemmodel-setrootpath-and-qsortfilterproxymodel-with-regexp-fo
- if (m_sourceRoot.isValid() && sourceIndex == m_sourceRoot) {
- return true; // true root, always accept
- }
+// Custom class for Avogadro to handle filtering files
+// Directories are at most 2 levels deep until we get to files
+bool SortFilterTreeProxyModel::filterAcceptsRow(
+ int sourceRow, const QModelIndex& sourceParent) const
+{
+ // First we see if we're the source root node
+ QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent);
+ if (!sourceIndex.isValid() || !sourceParent.isValid())
+ return true; // viewer will handle filtering
+ // Make sure the root is always accepted, or we become rootless
+ // See
+ // http://stackoverflow.com/questions/3212392/qtreeview-qfilesystemmodel-setrootpath-and-qsortfilterproxymodel-with-regexp-fo
+ if (m_sourceRoot.isValid() && sourceIndex == m_sourceRoot) {
+ return true; // true root, always accept
+ }
- // Now we see if we're a child of the root
- // If not, we accept -- only filter under *our* tree
- // Along the way, we'll see if a parent matches the filter
- if (sourceParent != m_sourceRoot) {
- bool childOfRoot = false;
- QModelIndex parent = sourceParent;
- for (int depth = 3; depth > 0; depth--) {
- if (sourceModel()->data(parent).toString().contains(filterRegExp()))
- return true; // a parent matches the pattern
+ // Now we see if we're a child of the root
+ // If not, we accept -- only filter under *our* tree
+ // Along the way, we'll see if a parent matches the filter
+ if (sourceParent != m_sourceRoot) {
+ bool childOfRoot = false;
+ QModelIndex parent = sourceParent;
+ for (int depth = 3; depth > 0; depth--) {
+ if (sourceModel()->data(parent).toString().contains(filterRegExp()))
+ return true; // a parent matches the pattern
- parent = parent.parent();
- if (!parent.isValid())
- return true; // tree view handles filtering, and we ascended too far
- if (parent == m_sourceRoot) {
- childOfRoot = true;
- break;
- }
+ parent = parent.parent();
+ if (!parent.isValid())
+ return true; // tree view handles filtering, and we ascended too far
+ if (parent == m_sourceRoot) {
+ childOfRoot = true;
+ break;
}
- // OK, we've gone up the tree, did we find our root?
- if (!childOfRoot)
- return true;
}
- // else, sourceParent is a root, so we're good to filter
-
- // Check if the data for this row matches. If so, the default is to accept
- QString data = sourceModel()->data(sourceIndex).toString();
- if (data.contains(filterRegExp()))
+ // OK, we've gone up the tree, did we find our root?
+ if (!childOfRoot)
return true;
+ }
+ // else, sourceParent is a root, so we're good to filter
- // Now we have to check the child nodes
- // We'll show the row if any child is accepted
- // (i.e., if a file matches, we'll show the directory path to it)
- // Try to fetchMore() first
- sourceModel()->fetchMore(sourceIndex);
- for(int i = 0; i < sourceModel()->rowCount(sourceIndex); ++i) {
- QModelIndex subRow = sourceModel()->index(i, 0, sourceIndex);
- if (!subRow.isValid())
- continue;
+ // Check if the data for this row matches. If so, the default is to accept
+ QString data = sourceModel()->data(sourceIndex).toString();
+ if (data.contains(filterRegExp()))
+ return true;
- QString rowData = sourceModel()->data(subRow).toString();
- if (rowData.contains(filterRegExp()))
- return true;
- }
- return false; // nothing matched
- }
+ // Now we have to check the child nodes
+ // We'll show the row if any child is accepted
+ // (i.e., if a file matches, we'll show the directory path to it)
+ // Try to fetchMore() first
+ sourceModel()->fetchMore(sourceIndex);
+ for (int i = 0; i < sourceModel()->rowCount(sourceIndex); ++i) {
+ QModelIndex subRow = sourceModel()->index(i, 0, sourceIndex);
+ if (!subRow.isValid())
+ continue;
+ QString rowData = sourceModel()->data(subRow).toString();
+ if (rowData.contains(filterRegExp()))
+ return true;
+ }
+ return false; // nothing matched
}
+
+} // namespace Avogadro::QtGui
diff --git a/avogadro/qtgui/sortfiltertreeproxymodel.h b/avogadro/qtgui/sortfiltertreeproxymodel.h
index e372749bdf..36d77bacbe 100644
--- a/avogadro/qtgui/sortfiltertreeproxymodel.h
+++ b/avogadro/qtgui/sortfiltertreeproxymodel.h
@@ -12,25 +12,30 @@
namespace Avogadro::QtGui {
- class AVOGADROQTGUI_EXPORT SortFilterTreeProxyModel: public QSortFilterProxyModel
+class AVOGADROQTGUI_EXPORT SortFilterTreeProxyModel
+ : public QSortFilterProxyModel
+{
+ Q_OBJECT
+public:
+ SortFilterTreeProxyModel(QObject* parent = nullptr)
+ : QSortFilterProxyModel(parent), m_sourceRoot()
{
- Q_OBJECT
- public:
- SortFilterTreeProxyModel(QObject* parent = nullptr)
- : QSortFilterProxyModel(parent), m_sourceRoot()
- {}
- // From http://kodeclutz.blogspot.com/2008/12/filtering-qtreeview.html
- bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const;
-
- // This is a hack to prevent us from becoming root-less
- // See http://stackoverflow.com/questions/3212392/qtreeview-qfilesystemmodel-setrootpath-and-qsortfilterproxymodel-with-regexp-fo
- void setSourceRoot(const QModelIndex &sourceRoot)
- { m_sourceRoot = sourceRoot; }
-
- private:
- QModelIndex m_sourceRoot;
- };
-
-} // End Avogadro QtGui namespace
+ }
+ // From http://kodeclutz.blogspot.com/2008/12/filtering-qtreeview.html
+ bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const;
+
+ // This is a hack to prevent us from becoming root-less
+ // See
+ // http://stackoverflow.com/questions/3212392/qtreeview-qfilesystemmodel-setrootpath-and-qsortfilterproxymodel-with-regexp-fo
+ void setSourceRoot(const QModelIndex& sourceRoot)
+ {
+ m_sourceRoot = sourceRoot;
+ }
+
+private:
+ QModelIndex m_sourceRoot;
+};
+
+} // namespace Avogadro::QtGui
#endif
diff --git a/avogadro/qtplugins/insertfragment/insertfragment.cpp b/avogadro/qtplugins/insertfragment/insertfragment.cpp
index f2a4cba340..6a1cd8a7e6 100644
--- a/avogadro/qtplugins/insertfragment/insertfragment.cpp
+++ b/avogadro/qtplugins/insertfragment/insertfragment.cpp
@@ -5,8 +5,8 @@
#include "insertfragment.h"
-#include
#include
+#include
#include
#include
@@ -20,8 +20,8 @@
#include
using Avogadro::Io::FileFormatManager;
-using Avogadro::QtGui::Molecule;
using Avogadro::QtGui::InsertFragmentDialog;
+using Avogadro::QtGui::Molecule;
namespace Avogadro::QtPlugins {
@@ -123,4 +123,4 @@ void InsertFragment::performInsert(const QString& fileName, bool crystal)
}
}
-} // namespace Avogadro
+} // namespace Avogadro::QtPlugins
diff --git a/avogadro/qtplugins/insertfragment/insertfragment.h b/avogadro/qtplugins/insertfragment/insertfragment.h
index cfbe9ad33f..5db01c54f7 100644
--- a/avogadro/qtplugins/insertfragment/insertfragment.h
+++ b/avogadro/qtplugins/insertfragment/insertfragment.h
@@ -17,13 +17,13 @@ namespace Io {
class FileFormat;
}
namespace QtGui {
-class InsertFragmentDialog;
+class InsertFragmentDialog;
}
namespace QtPlugins {
/**
- * @brief Load single-line molecule descriptors through an input dialog.
+ * @brief Load molecules through a tree browser.
*/
class InsertFragment : public QtGui::ExtensionPlugin
{
@@ -42,7 +42,7 @@ public slots:
private slots:
void showDialog();
- void performInsert(const QString &fileName, bool crystal);
+ void performInsert(const QString& fileName, bool crystal);
private:
QList m_actions;
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
index 2eeee329e6..7191d61b7b 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.cpp
@@ -229,7 +229,8 @@ void TemplateToolWidget::ligandChanged(int index)
m_ui->ligandPreview->setIcon(QIcon(":/icons/ligands/" + iconName + ".png"));
}
-void TemplateToolWidget::otherLigandInsert(const QString& fileName, bool crystal)
+void TemplateToolWidget::otherLigandInsert(const QString& fileName,
+ bool crystal)
{
if (m_fragmentDialog == nullptr)
return;
@@ -249,7 +250,6 @@ void TemplateToolWidget::otherLigandInsert(const QString& fileName, bool crystal
m_ui->ligandPreview->setIcon(QIcon(iconName));
}
-
void TemplateToolWidget::typeChanged(int index)
{
QSettings settings;
diff --git a/avogadro/qtplugins/templatetool/templatetoolwidget.h b/avogadro/qtplugins/templatetool/templatetoolwidget.h
index 5f209c96a0..1889a6ce10 100644
--- a/avogadro/qtplugins/templatetool/templatetoolwidget.h
+++ b/avogadro/qtplugins/templatetool/templatetoolwidget.h
@@ -12,7 +12,7 @@ namespace Avogadro {
namespace QtGui {
class PeriodicTableView;
class InsertFragmentDialog;
-}
+} // namespace QtGui
namespace QtPlugins {
@@ -25,7 +25,7 @@ class TemplateToolWidget : public QWidget
Q_OBJECT
public:
- explicit TemplateToolWidget(QWidget *parent_ = 0);
+ explicit TemplateToolWidget(QWidget* parent_ = 0);
~TemplateToolWidget();
void setAtomicNumber(unsigned char atomicNum);
@@ -39,9 +39,9 @@ class TemplateToolWidget : public QWidget
unsigned char ligand() const;
QString ligandString() const;
-
+
int denticity() const;
- std::vector &selectedUIDs();
+ std::vector& selectedUIDs();
private slots:
void elementChanged(int index);
@@ -49,9 +49,9 @@ private slots:
void addUserElement(unsigned char element);
void elementSelectedFromTable(int element);
void selectElement(unsigned char element);
-
+
void coordinationChanged(int index);
-
+
void typeChanged(int index);
void ligandChanged(int index);
@@ -62,16 +62,16 @@ private slots:
void buildBondOrders();
void saveElements();
- Ui::TemplateToolWidget *m_ui;
- QtGui::InsertFragmentDialog *m_fragmentDialog;
- QtGui::PeriodicTableView *m_elementSelector;
+ Ui::TemplateToolWidget* m_ui;
+ QtGui::InsertFragmentDialog* m_fragmentDialog;
+ QtGui::PeriodicTableView* m_elementSelector;
QList m_defaultElements;
QList m_userElements;
unsigned char m_currentElement;
QStringList m_centers;
QStringList m_ligands;
QString m_ligandPath;
-
+
int m_denticity;
std::vector m_selectedUIDs;
};
From c3d124f561743d2aaf8b22c8bb3ba8a86ebcb962 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sun, 19 Nov 2023 08:32:15 -0500
Subject: [PATCH 10/56] Add better tooltip
Signed-off-by: Geoff Hutchison
---
avogadro/qtplugins/templatetool/templatetool.cpp | 8 ++++++++
avogadro/qtplugins/templatetool/templatetool.h | 15 +++++----------
2 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/avogadro/qtplugins/templatetool/templatetool.cpp b/avogadro/qtplugins/templatetool/templatetool.cpp
index 863026428d..6016c14b97 100644
--- a/avogadro/qtplugins/templatetool/templatetool.cpp
+++ b/avogadro/qtplugins/templatetool/templatetool.cpp
@@ -80,6 +80,14 @@ TemplateTool::TemplateTool(QObject* parent_)
{
m_activateAction->setText(tr("Template"));
m_activateAction->setIcon(QIcon(":/icons/template.png"));
+ m_activateAction->setToolTip(
+ tr("Template Tool\n\n"
+ "Insert fragments, including metal centers.\n"
+ "Select an element and coordination geometry,"
+ "then click to insert a fragment.\n\n"
+ "Select a ligand or functional group and click"
+ "on a hydrogen atom to attach it."));
+
reset();
}
diff --git a/avogadro/qtplugins/templatetool/templatetool.h b/avogadro/qtplugins/templatetool/templatetool.h
index e8c1777fe7..5979c510ed 100644
--- a/avogadro/qtplugins/templatetool/templatetool.h
+++ b/avogadro/qtplugins/templatetool/templatetool.h
@@ -19,10 +19,11 @@ namespace QtPlugins {
class TemplateToolWidget;
/**
- * @class TemplateTool templatetool.h
+ * @class TemplateTool templatetool.h
+
* @brief The Template tool inserts fragments, including metal centers.
* @author Geoffrey R. Hutchison, Aritz, Erkiaga
-
+
*/
class TemplateTool : public QtGui::ToolPlugin
{
@@ -43,15 +44,9 @@ class TemplateTool : public QtGui::ToolPlugin
m_molecule = mol->undoMolecule();
}
- void setEditMolecule(QtGui::RWMolecule* mol) override
- {
- m_molecule = mol;
- }
+ void setEditMolecule(QtGui::RWMolecule* mol) override { m_molecule = mol; }
- void setGLWidget(QtOpenGL::GLWidget* widget) override
- {
- m_glWidget = widget;
- }
+ void setGLWidget(QtOpenGL::GLWidget* widget) override { m_glWidget = widget; }
void setGLRenderer(Rendering::GLRenderer* renderer) override
{
From b47cd1b29311df95794cd238d3bdbcd3142c53a7 Mon Sep 17 00:00:00 2001
From: ghutchis
Date: Sun, 19 Nov 2023 14:57:55 +0000
Subject: [PATCH 11/56] Automated translation updates
Signed-off-by: GitHub
---
i18n/avogadrolibs.pot | 168 ++++++++++++++++++++++--------------------
1 file changed, 89 insertions(+), 79 deletions(-)
diff --git a/i18n/avogadrolibs.pot b/i18n/avogadrolibs.pot
index 4c85805b98..546dff438c 100644
--- a/i18n/avogadrolibs.pot
+++ b/i18n/avogadrolibs.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: Avogadro 1.98.0\n"
+"Project-Id-Version: Avogadro 1.98.1\n"
"Report-Msgid-Bugs-To: avogadro-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2023-10-29 02:01+0000\n"
+"POT-Creation-Date: 2023-11-19 14:57+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -955,65 +955,60 @@ msgstr ""
msgid "Select executable:"
msgstr ""
-#: qtgui/fileformatdialog.cpp:48
-msgid ""
-"The file name contains invalid characters. Please choose another file name."
-msgstr ""
-
-#: qtgui/fileformatdialog.cpp:60
+#: qtgui/fileformatdialog.cpp:52
msgid "Unable to find a suitable file reader for the selected file."
msgstr ""
-#: qtgui/fileformatdialog.cpp:108
+#: qtgui/fileformatdialog.cpp:100
msgid ""
"The file extension is missing, so the format cannot be determined.Do you "
"want to add it?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:122
+#: qtgui/fileformatdialog.cpp:114
msgid "Unable to find a suitable file writer for the selected format."
msgstr ""
-#: qtgui/fileformatdialog.cpp:171
+#: qtgui/fileformatdialog.cpp:163
msgctxt "File handlers"
msgid "handlers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:172
+#: qtgui/fileformatdialog.cpp:164
msgctxt "e.g. file handlers that can 'handle' this file."
msgid "handle"
msgstr ""
-#: qtgui/fileformatdialog.cpp:176
+#: qtgui/fileformatdialog.cpp:168
msgctxt "File readers"
msgid "readers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:177
+#: qtgui/fileformatdialog.cpp:169
msgctxt "e.g. file readers that can 'read' this file."
msgid "read"
msgstr ""
-#: qtgui/fileformatdialog.cpp:181
+#: qtgui/fileformatdialog.cpp:173
msgctxt "File writers"
msgid "writers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:182
+#: qtgui/fileformatdialog.cpp:174
msgctxt "e.g. file writers that can 'write' this file."
msgid "write"
msgstr ""
-#: qtgui/fileformatdialog.cpp:187
+#: qtgui/fileformatdialog.cpp:179
#, qt-format
msgid "Multiple %1 found that can %2 this format. Which should be used?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:287
+#: qtgui/fileformatdialog.cpp:279
msgid "All files"
msgstr ""
-#: qtgui/fileformatdialog.cpp:290
+#: qtgui/fileformatdialog.cpp:282
msgid "All supported formats"
msgstr ""
@@ -1288,7 +1283,7 @@ msgstr ""
#. i18n: file: qtplugins/selectiontool/selectiontoolwidget.ui:39
#. i18n: ectx: property (text), widget (QLabel, label)
#: qtgui/rwlayermanager.cpp:220 qtgui/rwlayermanager.cpp:223
-#: qtplugins/select/select.cpp:527
+#: qtplugins/select/select.cpp:548
#: qtplugins/selectiontool/selectiontool.cpp:254 :1567
msgid "Change Layer"
msgstr ""
@@ -1308,7 +1303,7 @@ msgstr ""
#. i18n: file: qtplugins/editor/editortoolwidget.ui:43
#. i18n: ectx: property (text), widget (QCheckBox, adjustHydrogens)
-#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114 :447
+#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114 :459
msgid "Adjust Hydrogens"
msgstr ""
@@ -1567,7 +1562,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsDialog)
-#: qtplugins/apbs/apbs.h:31 :84
+#: qtplugins/apbs/apbs.h:31 :96
msgid "APBS"
msgstr ""
@@ -1630,7 +1625,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsoutputdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsOutputDialog)
-#: qtplugins/apbs/apbsdialog.cpp:178 :144
+#: qtplugins/apbs/apbsdialog.cpp:178 :156
msgid "Success"
msgstr ""
@@ -1749,7 +1744,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:122
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:756 :171 rc.cpp:1615
+#: qtplugins/surfaces/surfaces.cpp:756 :183 rc.cpp:1615
msgctxt "colormap"
msgid "Spectral"
msgstr ""
@@ -1759,7 +1754,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:169
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:124
-#: qtplugins/surfaces/surfaces.cpp:758 :168 rc.cpp:1612
+#: qtplugins/surfaces/surfaces.cpp:758 :180 rc.cpp:1612
msgctxt "colormap"
msgid "Coolwarm"
msgstr ""
@@ -1769,7 +1764,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:159
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:126
-#: qtplugins/surfaces/surfaces.cpp:760 :162 rc.cpp:1606
+#: qtplugins/surfaces/surfaces.cpp:760 :174 rc.cpp:1606
msgctxt "colormap"
msgid "Balance"
msgstr ""
@@ -1779,7 +1774,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:164
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:128
-#: qtplugins/surfaces/surfaces.cpp:762 :165 rc.cpp:1609
+#: qtplugins/surfaces/surfaces.cpp:762 :177 rc.cpp:1609
msgctxt "colormap"
msgid "Blue-DarkRed"
msgstr ""
@@ -1791,7 +1786,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:130
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:764 :174 rc.cpp:1618
+#: qtplugins/surfaces/surfaces.cpp:764 :186 rc.cpp:1618
msgctxt "colormap"
msgid "Turbo"
msgstr ""
@@ -1825,7 +1820,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:143
#. i18n: ectx: property (text), widget (QLabel, label_7)
#: qtplugins/applycolors/applycolors.cpp:213
-#: qtplugins/applycolors/applycolors.cpp:305 :159 rc.cpp:1603
+#: qtplugins/applycolors/applycolors.cpp:305 :171 rc.cpp:1603
msgid "Colormap:"
msgstr ""
@@ -2038,7 +2033,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:265
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, resolutionDoubleSpinBox)
#: qtplugins/closecontacts/closecontacts.cpp:215
-#: qtplugins/noncovalent/noncovalent.cpp:351 :189 rc.cpp:192 rc.cpp:369
+#: qtplugins/noncovalent/noncovalent.cpp:351 :201 rc.cpp:204 rc.cpp:381
msgid " Å"
msgstr ""
@@ -2293,7 +2288,7 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:108
#. i18n: ectx: property (text), widget (QToolButton, copy)
-#: qtplugins/copypaste/copypaste.cpp:31 :240
+#: qtplugins/copypaste/copypaste.cpp:31 :252
msgid "Copy"
msgstr ""
@@ -2309,13 +2304,13 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:101
#. i18n: ectx: property (text), widget (QToolButton, cut)
-#: qtplugins/copypaste/copypaste.cpp:34 :237
+#: qtplugins/copypaste/copypaste.cpp:34 :249
msgid "Cut"
msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:142
#. i18n: ectx: property (text), widget (QPushButton, clear)
-#: qtplugins/copypaste/copypaste.cpp:35 :249
+#: qtplugins/copypaste/copypaste.cpp:35 :261
msgid "Clear"
msgstr ""
@@ -2658,6 +2653,14 @@ msgid "Editor tool"
msgstr ""
#: qtplugins/editor/editortoolwidget.cpp:129
+#: qtplugins/templatetool/templatetoolwidget.cpp:270
+#: qtplugins/templatetool/templatetoolwidget.cpp:283
+#: qtplugins/templatetool/templatetoolwidget.cpp:291
+#: qtplugins/templatetool/templatetoolwidget.cpp:299
+#: qtplugins/templatetool/templatetoolwidget.cpp:307
+#: qtplugins/templatetool/templatetoolwidget.cpp:315
+#: qtplugins/templatetool/templatetoolwidget.cpp:328
+#: qtplugins/templatetool/templatetoolwidget.cpp:390
msgid "Other…"
msgstr ""
@@ -2776,17 +2779,17 @@ msgstr ""
msgid "&Calculate"
msgstr ""
-#: qtplugins/forcefield/forcefield.cpp:288 qtplugins/openbabel/openbabel.cpp:45
+#: qtplugins/forcefield/forcefield.cpp:285 qtplugins/openbabel/openbabel.cpp:45
#: qtplugins/openbabel/openbabel.cpp:525
msgid "Optimize Geometry"
msgstr ""
-#: qtplugins/forcefield/forcefield.cpp:329
+#: qtplugins/forcefield/forcefield.cpp:326
#, qt-format
msgid "%1 Energy = %L2"
msgstr ""
-#: qtplugins/forcefield/forcefield.cpp:330
+#: qtplugins/forcefield/forcefield.cpp:327
#: qtplugins/playertool/playertool.cpp:343
#: qtplugins/playertool/playertool.cpp:375 qtplugins/surfaces/surfaces.cpp:886
#: qtplugins/surfaces/surfaces.cpp:930 qtplugins/surfaces/surfaces.cpp:942
@@ -2987,7 +2990,7 @@ msgstr ""
#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:79
#. i18n: ectx: property (toolTip), widget (QToolButton, toolButton_TU)
-#: qtplugins/insertdna/insertdna.cpp:168 :600
+#: qtplugins/insertdna/insertdna.cpp:168 :612
msgid "Thymine"
msgstr ""
@@ -3027,7 +3030,7 @@ msgstr ""
#. i18n: file: qtplugins/crystal/importcrystaldialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ImportCrystalDialog)
-#: qtplugins/insertfragment/insertfragment.cpp:117 :342
+#: qtplugins/insertfragment/insertfragment.cpp:117 :354
msgid "Import Crystal"
msgstr ""
@@ -4198,7 +4201,7 @@ msgstr ""
msgid "Select None"
msgstr ""
-#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:516
+#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:537
msgid "Invert Selection"
msgstr ""
@@ -4226,11 +4229,11 @@ msgstr ""
msgid "Select Water…"
msgstr ""
-#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:352
+#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:368
msgid "Enlarge Selection"
msgstr ""
-#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:387
+#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:404
msgid "Shrink Selection"
msgstr ""
@@ -4250,39 +4253,39 @@ msgstr ""
msgid "Select Element"
msgstr ""
-#: qtplugins/select/select.cpp:216
+#: qtplugins/select/select.cpp:217
msgid "Select Water"
msgstr ""
-#: qtplugins/select/select.cpp:254
+#: qtplugins/select/select.cpp:266
msgid "Select Backbone"
msgstr ""
-#: qtplugins/select/select.cpp:288
+#: qtplugins/select/select.cpp:302
msgid "Select Sidechain"
msgstr ""
-#: qtplugins/select/select.cpp:409
+#: qtplugins/select/select.cpp:428
msgid "Select Atoms by Index"
msgstr ""
-#: qtplugins/select/select.cpp:410
+#: qtplugins/select/select.cpp:429
msgid "Atoms to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:415
+#: qtplugins/select/select.cpp:434
msgid "Select Atom"
msgstr ""
-#: qtplugins/select/select.cpp:448
+#: qtplugins/select/select.cpp:469
msgid "Select Atoms by Residue"
msgstr ""
-#: qtplugins/select/select.cpp:449
+#: qtplugins/select/select.cpp:470
msgid "Residues to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:454
+#: qtplugins/select/select.cpp:475
msgid "Select Residue"
msgstr ""
@@ -4623,23 +4626,30 @@ msgstr ""
msgid "Template"
msgstr ""
-#: qtplugins/templatetool/templatetool.cpp:294
+#: qtplugins/templatetool/templatetool.cpp:84
+msgid ""
+"Template Tool\n"
+"\n"
+"Insert fragments, including metal centers.\n"
+"Select an element and coordination geometry,then click to insert a "
+"fragment.\n"
+"\n"
+"Select a ligand or functional group and clickon a hydrogen atom to attach it."
+msgstr ""
+
+#: qtplugins/templatetool/templatetool.cpp:302
msgid "Insert Template"
msgstr ""
-#: qtplugins/templatetool/templatetool.cpp:544
+#: qtplugins/templatetool/templatetool.cpp:559
msgid "Insert Ligand"
msgstr ""
-#: qtplugins/templatetool/templatetool.h:34
#: qtplugins/templatetool/templatetool.h:35
+#: qtplugins/templatetool/templatetool.h:36
msgid "Template tool"
msgstr ""
-#: qtplugins/templatetool/templatetoolwidget.cpp:288
-msgid "Other..."
-msgstr ""
-
#: qtplugins/vanderwaals/vanderwaals.h:33
msgid "Simple display of VdW spheres."
msgstr ""
@@ -4854,6 +4864,28 @@ msgstr ""
msgid "Rename Elements"
msgstr ""
+#. i18n: file: qtgui/insertfragmentdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtGui::InsertFragmentDialog)
+msgid "Insert Fragment…"
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:22
+#. i18n: ectx: property (text), widget (QLabel, label)
+msgid "Filter:"
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:29
+#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
+msgid "Type a name or part of a name to show only matching files."
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:86
+#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
+#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
+#. i18n: ectx: property (text), widget (QPushButton, insertButton)
+msgid "Insert"
+msgstr ""
+
#. i18n: file: qtplugins/3dmol/3dmoldialog.ui:17
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ThreeDMolDialog)
msgid "3DMol HTML Snippet"
@@ -5694,28 +5726,6 @@ msgctxt "double-strand DNA"
msgid "Double"
msgstr ""
-#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
-#. i18n: ectx: property (text), widget (QPushButton, insertButton)
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:86
-#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
-msgid "Insert"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:14
-#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::InsertFragmentDialog)
-msgid "Insert Fragment…"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:22
-#. i18n: ectx: property (text), widget (QLabel, label)
-msgid "Filter:"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:29
-#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
-msgid "Type a name or part of a name to show only matching files."
-msgstr ""
-
#. i18n: file: qtplugins/lammpsinput/lammpsinputdialog.ui:20
#. i18n: ectx: property (windowTitle), widget (QDialog, LammpsInputDialog)
msgid "LAMMPS Input"
From 5916cbb948d747e1b2b1e6834985a7f4d1fbea58 Mon Sep 17 00:00:00 2001
From: Geoff Hutchison
Date: Sun, 19 Nov 2023 11:48:23 -0500
Subject: [PATCH 12/56] [no-ci] Fix a few remaining cases of .. instead of
ellipsis character Signed-off-by: Geoff Hutchison
---
avogadro/qtplugins/coordinateeditor/coordinateeditordialog.ui | 2 +-
avogadro/qtplugins/cp2kinput/cp2kinputdialog.ui | 4 ++--
avogadro/qtplugins/gamessinput/gamessinputdialog.ui | 4 ++--
avogadro/qtplugins/lammpsinput/lammpsinputdialog.ui | 2 +-
avogadro/qtplugins/openmminput/openmminputdialog.ui | 2 +-
avogadro/qtplugins/plugindownloader/downloaderwidget.ui | 2 +-
avogadro/qtplugins/surfaces/surfacedialog.ui | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.ui b/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.ui
index 1862a884e3..e7f65a9382 100644
--- a/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.ui
+++ b/avogadro/qtplugins/coordinateeditor/coordinateeditordialog.ui
@@ -75,7 +75,7 @@
-
- Help...
+ Help…
diff --git a/avogadro/qtplugins/cp2kinput/cp2kinputdialog.ui b/avogadro/qtplugins/cp2kinput/cp2kinputdialog.ui
index fc9e912a5b..c957c72ee2 100644
--- a/avogadro/qtplugins/cp2kinput/cp2kinputdialog.ui
+++ b/avogadro/qtplugins/cp2kinput/cp2kinputdialog.ui
@@ -49,14 +49,14 @@
-
- Submit Calculation...
+ Submit Calculation…
-
- Save File...
+ Save File…
diff --git a/avogadro/qtplugins/gamessinput/gamessinputdialog.ui b/avogadro/qtplugins/gamessinput/gamessinputdialog.ui
index c0ee47a4bc..0736d15a37 100644
--- a/avogadro/qtplugins/gamessinput/gamessinputdialog.ui
+++ b/avogadro/qtplugins/gamessinput/gamessinputdialog.ui
@@ -285,14 +285,14 @@
-
- Submit Calculation...
+ Submit Calculation…
-
- Save File...
+ Save File…
diff --git a/avogadro/qtplugins/lammpsinput/lammpsinputdialog.ui b/avogadro/qtplugins/lammpsinput/lammpsinputdialog.ui
index 13982a7d2b..36edbd1066 100644
--- a/avogadro/qtplugins/lammpsinput/lammpsinputdialog.ui
+++ b/avogadro/qtplugins/lammpsinput/lammpsinputdialog.ui
@@ -945,7 +945,7 @@ p, li { white-space: pre-wrap; }
-
- Generate...
+ Generate…
diff --git a/avogadro/qtplugins/openmminput/openmminputdialog.ui b/avogadro/qtplugins/openmminput/openmminputdialog.ui
index 0884f1015b..8b6c3540e3 100644
--- a/avogadro/qtplugins/openmminput/openmminputdialog.ui
+++ b/avogadro/qtplugins/openmminput/openmminputdialog.ui
@@ -1009,7 +1009,7 @@
-
- Generate...
+ Generate…
diff --git a/avogadro/qtplugins/plugindownloader/downloaderwidget.ui b/avogadro/qtplugins/plugindownloader/downloaderwidget.ui
index 9c3fb925f1..506e89f964 100644
--- a/avogadro/qtplugins/plugindownloader/downloaderwidget.ui
+++ b/avogadro/qtplugins/plugindownloader/downloaderwidget.ui
@@ -11,7 +11,7 @@
- Download Plugins...
+ Download Plugins…
-
diff --git a/avogadro/qtplugins/surfaces/surfacedialog.ui b/avogadro/qtplugins/surfaces/surfacedialog.ui
index 0b06d2410d..47a3a10c7d 100644
--- a/avogadro/qtplugins/surfaces/surfacedialog.ui
+++ b/avogadro/qtplugins/surfaces/surfacedialog.ui
@@ -525,7 +525,7 @@
false
- Record Movie...
+ Record Movie…
true
From 573118a27671c909737016b40b9da168f8d6134a Mon Sep 17 00:00:00 2001
From: ghutchis
Date: Sun, 19 Nov 2023 16:50:12 +0000
Subject: [PATCH 13/56] Automated translation updates
Signed-off-by: GitHub
---
i18n/avogadrolibs.pot | 37 ++++++++++++++-----------------------
1 file changed, 14 insertions(+), 23 deletions(-)
diff --git a/i18n/avogadrolibs.pot b/i18n/avogadrolibs.pot
index 546dff438c..e52c697372 100644
--- a/i18n/avogadrolibs.pot
+++ b/i18n/avogadrolibs.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Avogadro 1.98.1\n"
"Report-Msgid-Bugs-To: avogadro-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2023-11-19 14:57+0000\n"
+"POT-Creation-Date: 2023-11-19 16:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -3708,7 +3708,9 @@ msgstr ""
msgid "Dynamic bonding?"
msgstr ""
-#: qtplugins/playertool/playertool.cpp:139
+#. i18n: file: qtplugins/surfaces/surfacedialog.ui:528
+#. i18n: ectx: property (text), widget (QPushButton, recordButton)
+#: qtplugins/playertool/playertool.cpp:139 :1684
msgid "Record Movie…"
msgstr ""
@@ -3860,7 +3862,9 @@ msgstr ""
msgid "Error while extracting: %1"
msgstr ""
-#: qtplugins/plugindownloader/plugindownloader.cpp:27
+#. i18n: file: qtplugins/plugindownloader/downloaderwidget.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, DownloaderWidget)
+#: qtplugins/plugindownloader/plugindownloader.cpp:27 :1540
msgid "Download Plugins…"
msgstr ""
@@ -4787,6 +4791,10 @@ msgstr ""
#. i18n: file: molequeue/inputgeneratorwidget.ui:116
#. i18n: ectx: property (text), widget (QPushButton, computeButton)
+#. i18n: file: qtplugins/cp2kinput/cp2kinputdialog.ui:52
+#. i18n: ectx: property (text), widget (QPushButton, computeButton)
+#. i18n: file: qtplugins/gamessinput/gamessinputdialog.ui:288
+#. i18n: ectx: property (text), widget (QPushButton, computeButton)
msgid "Submit Calculation…"
msgstr ""
@@ -5112,7 +5120,7 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:78
#. i18n: ectx: property (text), widget (QToolButton, help)
-msgid "Help..."
+msgid "Help…"
msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:115
@@ -5149,18 +5157,11 @@ msgstr ""
msgid "Defaults"
msgstr ""
-#. i18n: file: qtplugins/cp2kinput/cp2kinputdialog.ui:52
-#. i18n: ectx: property (text), widget (QPushButton, computeButton)
-#. i18n: file: qtplugins/gamessinput/gamessinputdialog.ui:288
-#. i18n: ectx: property (text), widget (QPushButton, computeButton)
-msgid "Submit Calculation..."
-msgstr ""
-
#. i18n: file: qtplugins/cp2kinput/cp2kinputdialog.ui:59
#. i18n: ectx: property (text), widget (QPushButton, generateButton)
#. i18n: file: qtplugins/gamessinput/gamessinputdialog.ui:295
#. i18n: ectx: property (text), widget (QPushButton, generateButton)
-msgid "Save File..."
+msgid "Save File…"
msgstr ""
#. i18n: file: qtplugins/cp2kinput/cp2kinputdialog.ui:95
@@ -6232,7 +6233,7 @@ msgstr ""
#. i18n: ectx: property (text), widget (QPushButton, generateButton)
#. i18n: file: qtplugins/openmminput/openmminputdialog.ui:1012
#. i18n: ectx: property (text), widget (QPushButton, generateButton)
-msgid "Generate..."
+msgid "Generate…"
msgstr ""
#. i18n: file: qtplugins/lineformatinput/lineformatinputdialog.ui:41
@@ -6856,11 +6857,6 @@ msgstr ""
msgid "Max 2*theta:"
msgstr ""
-#. i18n: file: qtplugins/plugindownloader/downloaderwidget.ui:14
-#. i18n: ectx: property (windowTitle), widget (QDialog, DownloaderWidget)
-msgid "Download Plugins..."
-msgstr ""
-
#. i18n: file: qtplugins/plugindownloader/downloaderwidget.ui:20
#. i18n: ectx: property (text), widget (QPushButton, downloadButton)
msgid "Download Selected"
@@ -7005,11 +7001,6 @@ msgstr ""
msgid "Calculate"
msgstr ""
-#. i18n: file: qtplugins/surfaces/surfacedialog.ui:528
-#. i18n: ectx: property (text), widget (QPushButton, recordButton)
-msgid "Record Movie..."
-msgstr ""
-
#. i18n: file: qtplugins/symmetry/symmetrywidget.ui:28
#. i18n: ectx: property (text), widget (QLabel, pointGroupLabel)
msgid "C1"
From bff25e6d98b9ac802f373e37facce8778d6dd003 Mon Sep 17 00:00:00 2001
From: Hosted Weblate
Date: Sun, 19 Nov 2023 16:42:22 +0000
Subject: [PATCH 14/56] Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.
Translation: Avogadro/avogadrolibs
Translate-URL: https://hosted.weblate.org/projects/avogadro/avogadrolibs/
---
i18n/af.po | 166 ++++++++++++++-------------
i18n/ar.po | 166 ++++++++++++++-------------
i18n/bg.po | 166 ++++++++++++++-------------
i18n/bs.po | 173 +++++++++++++++-------------
i18n/ca.po | 175 +++++++++++++++-------------
i18n/ca@valencia.po | 173 +++++++++++++++-------------
i18n/cs.po | 175 +++++++++++++++-------------
i18n/da.po | 177 +++++++++++++++-------------
i18n/de.po | 171 ++++++++++++++-------------
i18n/el.po | 177 +++++++++++++++-------------
i18n/en_AU.po | 274 ++++++++++++++++++++++++--------------------
i18n/en_CA.po | 274 ++++++++++++++++++++++++--------------------
i18n/en_GB.po | 274 ++++++++++++++++++++++++--------------------
i18n/eo.po | 177 +++++++++++++++-------------
i18n/es.po | 182 ++++++++++++++++-------------
i18n/et.po | 166 ++++++++++++++-------------
i18n/eu.po | 177 +++++++++++++++-------------
i18n/fa.po | 166 ++++++++++++++-------------
i18n/fi.po | 173 +++++++++++++++-------------
i18n/fr.po | 173 +++++++++++++++-------------
i18n/fr_CA.po | 166 ++++++++++++++-------------
i18n/gl.po | 173 +++++++++++++++-------------
i18n/he.po | 166 ++++++++++++++-------------
i18n/hi.po | 166 ++++++++++++++-------------
i18n/hr.po | 166 ++++++++++++++-------------
i18n/hu.po | 182 ++++++++++++++++-------------
i18n/id.po | 173 +++++++++++++++-------------
i18n/it.po | 177 +++++++++++++++-------------
i18n/ja.po | 169 ++++++++++++++-------------
i18n/ka.po | 169 ++++++++++++++-------------
i18n/kn.po | 166 ++++++++++++++-------------
i18n/ko.po | 169 ++++++++++++++-------------
i18n/ms.po | 173 +++++++++++++++-------------
i18n/nb.po | 170 ++++++++++++++-------------
i18n/nl.po | 173 +++++++++++++++-------------
i18n/oc.po | 173 +++++++++++++++-------------
i18n/pl.po | 168 ++++++++++++++-------------
i18n/pt.po | 177 +++++++++++++++-------------
i18n/pt_BR.po | 177 +++++++++++++++-------------
i18n/ro.po | 166 ++++++++++++++-------------
i18n/ru.po | 177 +++++++++++++++-------------
i18n/sa.po | 166 ++++++++++++++-------------
i18n/sk.po | 177 +++++++++++++++-------------
i18n/sl.po | 173 +++++++++++++++-------------
i18n/sq.po | 166 ++++++++++++++-------------
i18n/sr.po | 177 +++++++++++++++-------------
i18n/sv.po | 170 ++++++++++++++-------------
i18n/ta.po | 166 ++++++++++++++-------------
i18n/te.po | 166 ++++++++++++++-------------
i18n/th.po | 166 ++++++++++++++-------------
i18n/tr.po | 173 +++++++++++++++-------------
i18n/ug.po | 169 ++++++++++++++-------------
i18n/uk.po | 173 +++++++++++++++-------------
i18n/vi.po | 173 +++++++++++++++-------------
i18n/zh_CN.po | 173 +++++++++++++++-------------
i18n/zh_TW.po | 173 +++++++++++++++-------------
56 files changed, 5307 insertions(+), 4605 deletions(-)
diff --git a/i18n/af.po b/i18n/af.po
index 539182a6de..d2a4a5c19c 100644
--- a/i18n/af.po
+++ b/i18n/af.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Avogadro 1.90.0\n"
"Report-Msgid-Bugs-To: avogadro-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2023-10-29 02:01+0000\n"
+"POT-Creation-Date: 2023-11-19 14:57+0000\n"
"PO-Revision-Date: 2021-06-19 13:34+0000\n"
"Last-Translator: Nathan \n"
"Language-Team: Afrikaans \n"
"Language-Team: Arabic \n"
"Language-Team: Bulgarian \n"
"Language-Team: Bosnian \n"
"Language-Team: Catalan \n"
"Language-Team: Catalan (Valencia) \n"
@@ -958,67 +958,62 @@ msgstr ""
msgid "Select executable:"
msgstr ""
-#: qtgui/fileformatdialog.cpp:48
-msgid ""
-"The file name contains invalid characters. Please choose another file name."
-msgstr ""
-
-#: qtgui/fileformatdialog.cpp:60
+#: qtgui/fileformatdialog.cpp:52
msgid "Unable to find a suitable file reader for the selected file."
msgstr ""
-#: qtgui/fileformatdialog.cpp:108
+#: qtgui/fileformatdialog.cpp:100
msgid ""
"The file extension is missing, so the format cannot be determined.Do you "
"want to add it?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:122
+#: qtgui/fileformatdialog.cpp:114
msgid "Unable to find a suitable file writer for the selected format."
msgstr ""
-#: qtgui/fileformatdialog.cpp:171
+#: qtgui/fileformatdialog.cpp:163
msgctxt "File handlers"
msgid "handlers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:172
+#: qtgui/fileformatdialog.cpp:164
msgctxt "e.g. file handlers that can 'handle' this file."
msgid "handle"
msgstr ""
-#: qtgui/fileformatdialog.cpp:176
+#: qtgui/fileformatdialog.cpp:168
msgctxt "File readers"
msgid "readers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:177
+#: qtgui/fileformatdialog.cpp:169
msgctxt "e.g. file readers that can 'read' this file."
msgid "read"
msgstr ""
-#: qtgui/fileformatdialog.cpp:181
+#: qtgui/fileformatdialog.cpp:173
msgctxt "File writers"
msgid "writers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:182
+#: qtgui/fileformatdialog.cpp:174
msgctxt "e.g. file writers that can 'write' this file."
msgid "write"
msgstr ""
-#: qtgui/fileformatdialog.cpp:187
+#: qtgui/fileformatdialog.cpp:179
#, qt-format
msgid "Multiple %1 found that can %2 this format. Which should be used?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:287
+#: qtgui/fileformatdialog.cpp:279
#, fuzzy
#| msgid "All Files"
msgid "All files"
msgstr "Tots els fitxers"
-#: qtgui/fileformatdialog.cpp:290
+#: qtgui/fileformatdialog.cpp:282
msgid "All supported formats"
msgstr ""
@@ -1305,7 +1300,7 @@ msgstr ""
#. i18n: file: qtplugins/selectiontool/selectiontoolwidget.ui:39
#. i18n: ectx: property (text), widget (QLabel, label)
#: qtgui/rwlayermanager.cpp:220 qtgui/rwlayermanager.cpp:223
-#: qtplugins/select/select.cpp:527
+#: qtplugins/select/select.cpp:548
#: qtplugins/selectiontool/selectiontool.cpp:254:1567
#, fuzzy
msgid "Change Layer"
@@ -1326,7 +1321,7 @@ msgstr ""
#. i18n: file: qtplugins/editor/editortoolwidget.ui:43
#. i18n: ectx: property (text), widget (QCheckBox, adjustHydrogens)
-#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114:447
+#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114:459
msgid "Adjust Hydrogens"
msgstr "Ajusta els hidrògens"
@@ -1610,7 +1605,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsDialog)
-#: qtplugins/apbs/apbs.h:31:84
+#: qtplugins/apbs/apbs.h:31:96
msgid "APBS"
msgstr ""
@@ -1673,7 +1668,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsoutputdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsOutputDialog)
-#: qtplugins/apbs/apbsdialog.cpp:178:144
+#: qtplugins/apbs/apbsdialog.cpp:178:156
#, fuzzy
msgid "Success"
msgstr "Èxit!"
@@ -1801,7 +1796,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:122
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:756:171 rc.cpp:1615
+#: qtplugins/surfaces/surfaces.cpp:756:183 rc.cpp:1615
#, fuzzy
#| msgid "Spectra"
msgctxt "colormap"
@@ -1813,7 +1808,7 @@ msgstr "Espectre"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:169
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:124
-#: qtplugins/surfaces/surfaces.cpp:758:168 rc.cpp:1612
+#: qtplugins/surfaces/surfaces.cpp:758:180 rc.cpp:1612
msgctxt "colormap"
msgid "Coolwarm"
msgstr ""
@@ -1823,7 +1818,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:159
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:126
-#: qtplugins/surfaces/surfaces.cpp:760:162 rc.cpp:1606
+#: qtplugins/surfaces/surfaces.cpp:760:174 rc.cpp:1606
#, fuzzy
#| msgid "Cancel"
msgctxt "colormap"
@@ -1835,7 +1830,7 @@ msgstr "Cancel·la"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:164
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:128
-#: qtplugins/surfaces/surfaces.cpp:762:165 rc.cpp:1609
+#: qtplugins/surfaces/surfaces.cpp:762:177 rc.cpp:1609
msgctxt "colormap"
msgid "Blue-DarkRed"
msgstr ""
@@ -1847,7 +1842,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:130
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:764:174 rc.cpp:1618
+#: qtplugins/surfaces/surfaces.cpp:764:186 rc.cpp:1618
msgctxt "colormap"
msgid "Turbo"
msgstr ""
@@ -1885,7 +1880,7 @@ msgstr "Colors seleccionats"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:143
#. i18n: ectx: property (text), widget (QLabel, label_7)
#: qtplugins/applycolors/applycolors.cpp:213
-#: qtplugins/applycolors/applycolors.cpp:305:159 rc.cpp:1603
+#: qtplugins/applycolors/applycolors.cpp:305:171 rc.cpp:1603
#, fuzzy
#| msgid "Color:"
msgid "Colormap:"
@@ -2122,7 +2117,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:265
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, resolutionDoubleSpinBox)
#: qtplugins/closecontacts/closecontacts.cpp:215
-#: qtplugins/noncovalent/noncovalent.cpp:351:189 rc.cpp:192 rc.cpp:369
+#: qtplugins/noncovalent/noncovalent.cpp:351:201 rc.cpp:204 rc.cpp:381
msgid " Å"
msgstr ""
@@ -2396,7 +2391,7 @@ msgstr "Entrada turbomole"
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:108
#. i18n: ectx: property (text), widget (QToolButton, copy)
-#: qtplugins/copypaste/copypaste.cpp:31:240
+#: qtplugins/copypaste/copypaste.cpp:31:252
#, fuzzy
msgid "Copy"
msgstr "Copia-ho tot"
@@ -2414,13 +2409,13 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:101
#. i18n: ectx: property (text), widget (QToolButton, cut)
-#: qtplugins/copypaste/copypaste.cpp:34:237
+#: qtplugins/copypaste/copypaste.cpp:34:249
msgid "Cut"
msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:142
#. i18n: ectx: property (text), widget (QPushButton, clear)
-#: qtplugins/copypaste/copypaste.cpp:35:249
+#: qtplugins/copypaste/copypaste.cpp:35:261
#, fuzzy
msgid "Clear"
msgstr "Suprimeix-ho tot"
@@ -2774,6 +2769,14 @@ msgid "Editor tool"
msgstr ""
#: qtplugins/editor/editortoolwidget.cpp:129
+#: qtplugins/templatetool/templatetoolwidget.cpp:270
+#: qtplugins/templatetool/templatetoolwidget.cpp:283
+#: qtplugins/templatetool/templatetoolwidget.cpp:291
+#: qtplugins/templatetool/templatetoolwidget.cpp:299
+#: qtplugins/templatetool/templatetoolwidget.cpp:307
+#: qtplugins/templatetool/templatetoolwidget.cpp:315
+#: qtplugins/templatetool/templatetoolwidget.cpp:328
+#: qtplugins/templatetool/templatetoolwidget.cpp:390
#, fuzzy
#| msgid "Other"
msgid "Other…"
@@ -2908,19 +2911,19 @@ msgstr "Fixa els àtoms seleccionats"
msgid "&Calculate"
msgstr "Calcula"
-#: qtplugins/forcefield/forcefield.cpp:288 qtplugins/openbabel/openbabel.cpp:45
+#: qtplugins/forcefield/forcefield.cpp:285 qtplugins/openbabel/openbabel.cpp:45
#: qtplugins/openbabel/openbabel.cpp:525
#, fuzzy
msgid "Optimize Geometry"
msgstr "&Optimitza Geometria"
-#: qtplugins/forcefield/forcefield.cpp:329
+#: qtplugins/forcefield/forcefield.cpp:326
#, fuzzy, qt-format
#| msgid "Energy = %L1 %2"
msgid "%1 Energy = %L2"
msgstr "Energia = %L1 %2"
-#: qtplugins/forcefield/forcefield.cpp:330
+#: qtplugins/forcefield/forcefield.cpp:327
#: qtplugins/playertool/playertool.cpp:343
#: qtplugins/playertool/playertool.cpp:375 qtplugins/surfaces/surfaces.cpp:886
#: qtplugins/surfaces/surfaces.cpp:930 qtplugins/surfaces/surfaces.cpp:942
@@ -3141,7 +3144,7 @@ msgstr "T"
#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:79
#. i18n: ectx: property (toolTip), widget (QToolButton, toolButton_TU)
-#: qtplugins/insertdna/insertdna.cpp:168:600
+#: qtplugins/insertdna/insertdna.cpp:168:612
msgid "Thymine"
msgstr ""
@@ -3187,7 +3190,7 @@ msgstr ""
#. i18n: file: qtplugins/crystal/importcrystaldialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ImportCrystalDialog)
-#: qtplugins/insertfragment/insertfragment.cpp:117:342
+#: qtplugins/insertfragment/insertfragment.cpp:117:354
msgid "Import Crystal"
msgstr ""
@@ -4460,7 +4463,7 @@ msgstr ""
msgid "Select None"
msgstr ""
-#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:516
+#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:537
msgid "Invert Selection"
msgstr ""
@@ -4496,13 +4499,13 @@ msgstr "Index d'àtoms"
msgid "Select Water…"
msgstr "Index d'àtoms"
-#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:352
+#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:368
#, fuzzy
#| msgid "Ignore Selection"
msgid "Enlarge Selection"
msgstr "Ignora la selecció"
-#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:387
+#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:404
#, fuzzy
#| msgid "Selection"
msgid "Shrink Selection"
@@ -4526,44 +4529,44 @@ msgstr "&Selecciona"
msgid "Select Element"
msgstr "Color per element"
-#: qtplugins/select/select.cpp:216
+#: qtplugins/select/select.cpp:217
#, fuzzy
msgid "Select Water"
msgstr "Index d'àtoms"
-#: qtplugins/select/select.cpp:254
+#: qtplugins/select/select.cpp:266
#, fuzzy
msgid "Select Backbone"
msgstr "Index d'àtoms"
-#: qtplugins/select/select.cpp:288
+#: qtplugins/select/select.cpp:302
#, fuzzy
msgid "Select Sidechain"
msgstr "Index d'àtoms"
-#: qtplugins/select/select.cpp:409
+#: qtplugins/select/select.cpp:428
msgid "Select Atoms by Index"
msgstr ""
-#: qtplugins/select/select.cpp:410
+#: qtplugins/select/select.cpp:429
msgid "Atoms to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:415
+#: qtplugins/select/select.cpp:434
#, fuzzy
#| msgid "Delete Atom"
msgid "Select Atom"
msgstr "Suprimeix l'àtom"
-#: qtplugins/select/select.cpp:448
+#: qtplugins/select/select.cpp:469
msgid "Select Atoms by Residue"
msgstr ""
-#: qtplugins/select/select.cpp:449
+#: qtplugins/select/select.cpp:470
msgid "Residues to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:454
+#: qtplugins/select/select.cpp:475
#, fuzzy
#| msgid "Select by Residue..."
msgid "Select Residue"
@@ -4933,28 +4936,35 @@ msgstr ""
msgid "Template"
msgstr "Temperatura:"
-#: qtplugins/templatetool/templatetool.cpp:294
+#: qtplugins/templatetool/templatetool.cpp:84
+msgid ""
+"Template Tool\n"
+"\n"
+"Insert fragments, including metal centers.\n"
+"Select an element and coordination geometry,then click to insert a "
+"fragment.\n"
+"\n"
+"Select a ligand or functional group and clickon a hydrogen atom to attach it."
+msgstr ""
+
+#: qtplugins/templatetool/templatetool.cpp:302
#, fuzzy
#| msgid "Insert Peptide"
msgid "Insert Template"
msgstr "Insereix un pèptid"
-#: qtplugins/templatetool/templatetool.cpp:544
+#: qtplugins/templatetool/templatetool.cpp:559
#, fuzzy
#| msgid "Insert Peptide"
msgid "Insert Ligand"
msgstr "Insereix un pèptid"
-#: qtplugins/templatetool/templatetool.h:34
#: qtplugins/templatetool/templatetool.h:35
+#: qtplugins/templatetool/templatetool.h:36
#, fuzzy
msgid "Template tool"
msgstr "Mesura"
-#: qtplugins/templatetool/templatetoolwidget.cpp:288
-msgid "Other..."
-msgstr "Altre..."
-
#: qtplugins/vanderwaals/vanderwaals.h:33
msgid "Simple display of VdW spheres."
msgstr ""
@@ -5174,6 +5184,30 @@ msgstr ""
msgid "Rename Elements"
msgstr ""
+#. i18n: file: qtgui/insertfragmentdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtGui::InsertFragmentDialog)
+#, fuzzy
+#| msgid "Insert Fragment"
+msgid "Insert Fragment…"
+msgstr "Insereix un fragment"
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:22
+#. i18n: ectx: property (text), widget (QLabel, label)
+msgid "Filter:"
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:29
+#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
+msgid "Type a name or part of a name to show only matching files."
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:86
+#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
+#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
+#. i18n: ectx: property (text), widget (QPushButton, insertButton)
+msgid "Insert"
+msgstr ""
+
#. i18n: file: qtplugins/3dmol/3dmoldialog.ui:17
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ThreeDMolDialog)
msgid "3DMol HTML Snippet"
@@ -6048,30 +6082,6 @@ msgctxt "double-strand DNA"
msgid "Double"
msgstr "Doble"
-#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
-#. i18n: ectx: property (text), widget (QPushButton, insertButton)
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:86
-#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
-msgid "Insert"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:14
-#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::InsertFragmentDialog)
-#, fuzzy
-#| msgid "Insert Fragment"
-msgid "Insert Fragment…"
-msgstr "Insereix un fragment"
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:22
-#. i18n: ectx: property (text), widget (QLabel, label)
-msgid "Filter:"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:29
-#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
-msgid "Type a name or part of a name to show only matching files."
-msgstr ""
-
#. i18n: file: qtplugins/lammpsinput/lammpsinputdialog.ui:20
#. i18n: ectx: property (windowTitle), widget (QDialog, LammpsInputDialog)
msgid "LAMMPS Input"
@@ -7801,6 +7811,9 @@ msgstr ""
"devel@lists.sourceforge.net,,el.libre@gmail.com,,,avogadro-devel@lists."
"sourceforge.net,,el.libre@gmail.com"
+#~ msgid "Other..."
+#~ msgstr "Altre..."
+
#, fuzzy
#~ msgid "Filename"
#~ msgstr "Nom de fitxer:"
diff --git a/i18n/cs.po b/i18n/cs.po
index 86f82446ce..b758c94697 100644
--- a/i18n/cs.po
+++ b/i18n/cs.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: avogadro\n"
"Report-Msgid-Bugs-To: avogadro-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2023-10-29 02:01+0000\n"
+"POT-Creation-Date: 2023-11-19 14:57+0000\n"
"PO-Revision-Date: 2023-10-31 11:02+0000\n"
"Last-Translator: Martin Slavík \n"
"Language-Team: Czech \n"
"Language-Team: Danish \n"
@@ -956,67 +956,62 @@ msgstr ""
msgid "Select executable:"
msgstr ""
-#: qtgui/fileformatdialog.cpp:48
-msgid ""
-"The file name contains invalid characters. Please choose another file name."
-msgstr ""
-
-#: qtgui/fileformatdialog.cpp:60
+#: qtgui/fileformatdialog.cpp:52
msgid "Unable to find a suitable file reader for the selected file."
msgstr ""
-#: qtgui/fileformatdialog.cpp:108
+#: qtgui/fileformatdialog.cpp:100
msgid ""
"The file extension is missing, so the format cannot be determined.Do you "
"want to add it?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:122
+#: qtgui/fileformatdialog.cpp:114
msgid "Unable to find a suitable file writer for the selected format."
msgstr ""
-#: qtgui/fileformatdialog.cpp:171
+#: qtgui/fileformatdialog.cpp:163
msgctxt "File handlers"
msgid "handlers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:172
+#: qtgui/fileformatdialog.cpp:164
msgctxt "e.g. file handlers that can 'handle' this file."
msgid "handle"
msgstr ""
-#: qtgui/fileformatdialog.cpp:176
+#: qtgui/fileformatdialog.cpp:168
msgctxt "File readers"
msgid "readers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:177
+#: qtgui/fileformatdialog.cpp:169
msgctxt "e.g. file readers that can 'read' this file."
msgid "read"
msgstr ""
-#: qtgui/fileformatdialog.cpp:181
+#: qtgui/fileformatdialog.cpp:173
msgctxt "File writers"
msgid "writers"
msgstr ""
-#: qtgui/fileformatdialog.cpp:182
+#: qtgui/fileformatdialog.cpp:174
msgctxt "e.g. file writers that can 'write' this file."
msgid "write"
msgstr ""
-#: qtgui/fileformatdialog.cpp:187
+#: qtgui/fileformatdialog.cpp:179
#, qt-format
msgid "Multiple %1 found that can %2 this format. Which should be used?"
msgstr ""
-#: qtgui/fileformatdialog.cpp:287
+#: qtgui/fileformatdialog.cpp:279
#, fuzzy
#| msgid "All Files"
msgid "All files"
msgstr "Alle filer"
-#: qtgui/fileformatdialog.cpp:290
+#: qtgui/fileformatdialog.cpp:282
msgid "All supported formats"
msgstr ""
@@ -1300,7 +1295,7 @@ msgstr ""
#. i18n: file: qtplugins/selectiontool/selectiontoolwidget.ui:39
#. i18n: ectx: property (text), widget (QLabel, label)
#: qtgui/rwlayermanager.cpp:220 qtgui/rwlayermanager.cpp:223
-#: qtplugins/select/select.cpp:527
+#: qtplugins/select/select.cpp:548
#: qtplugins/selectiontool/selectiontool.cpp:254:1567
#, fuzzy
msgid "Change Layer"
@@ -1321,7 +1316,7 @@ msgstr ""
#. i18n: file: qtplugins/editor/editortoolwidget.ui:43
#. i18n: ectx: property (text), widget (QCheckBox, adjustHydrogens)
-#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114:447
+#: qtgui/rwmolecule.cpp:106 qtgui/rwmolecule.cpp:114:459
msgid "Adjust Hydrogens"
msgstr "Juster brintatomer"
@@ -1604,7 +1599,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsDialog)
-#: qtplugins/apbs/apbs.h:31:84
+#: qtplugins/apbs/apbs.h:31:96
msgid "APBS"
msgstr ""
@@ -1667,7 +1662,7 @@ msgstr ""
#. i18n: file: qtplugins/apbs/apbsoutputdialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, ApbsOutputDialog)
-#: qtplugins/apbs/apbsdialog.cpp:178:144
+#: qtplugins/apbs/apbsdialog.cpp:178:156
#, fuzzy
msgid "Success"
msgstr "Succes!"
@@ -1794,7 +1789,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:122
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:756:171 rc.cpp:1615
+#: qtplugins/surfaces/surfaces.cpp:756:183 rc.cpp:1615
#, fuzzy
#| msgid "Spectra"
msgctxt "colormap"
@@ -1806,7 +1801,7 @@ msgstr "Spektre"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:169
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:124
-#: qtplugins/surfaces/surfaces.cpp:758:168 rc.cpp:1612
+#: qtplugins/surfaces/surfaces.cpp:758:180 rc.cpp:1612
msgctxt "colormap"
msgid "Coolwarm"
msgstr ""
@@ -1816,7 +1811,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:159
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:126
-#: qtplugins/surfaces/surfaces.cpp:760:162 rc.cpp:1606
+#: qtplugins/surfaces/surfaces.cpp:760:174 rc.cpp:1606
#, fuzzy
#| msgid "Cancel"
msgctxt "colormap"
@@ -1828,7 +1823,7 @@ msgstr "Annullér"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:164
#. i18n: ectx: property (text), item, widget (QComboBox, colormapCombo)
#: qtplugins/applycolors/applycolors.cpp:128
-#: qtplugins/surfaces/surfaces.cpp:762:165 rc.cpp:1609
+#: qtplugins/surfaces/surfaces.cpp:762:177 rc.cpp:1609
msgctxt "colormap"
msgid "Blue-DarkRed"
msgstr ""
@@ -1840,7 +1835,7 @@ msgstr ""
#: qtplugins/applycolors/applycolors.cpp:130
#: qtplugins/applycolors/applycolors.cpp:210
#: qtplugins/applycolors/applycolors.cpp:302
-#: qtplugins/surfaces/surfaces.cpp:764:174 rc.cpp:1618
+#: qtplugins/surfaces/surfaces.cpp:764:186 rc.cpp:1618
msgctxt "colormap"
msgid "Turbo"
msgstr ""
@@ -1878,7 +1873,7 @@ msgstr "Valgte farver"
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:143
#. i18n: ectx: property (text), widget (QLabel, label_7)
#: qtplugins/applycolors/applycolors.cpp:213
-#: qtplugins/applycolors/applycolors.cpp:305:159 rc.cpp:1603
+#: qtplugins/applycolors/applycolors.cpp:305:171 rc.cpp:1603
#, fuzzy
msgid "Colormap:"
msgstr "Farver:"
@@ -2110,7 +2105,7 @@ msgstr ""
#. i18n: file: qtplugins/surfaces/surfacedialog.ui:265
#. i18n: ectx: property (suffix), widget (QDoubleSpinBox, resolutionDoubleSpinBox)
#: qtplugins/closecontacts/closecontacts.cpp:215
-#: qtplugins/noncovalent/noncovalent.cpp:351:189 rc.cpp:192 rc.cpp:369
+#: qtplugins/noncovalent/noncovalent.cpp:351:201 rc.cpp:204 rc.cpp:381
msgid " Å"
msgstr ""
@@ -2379,7 +2374,7 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:108
#. i18n: ectx: property (text), widget (QToolButton, copy)
-#: qtplugins/copypaste/copypaste.cpp:31:240
+#: qtplugins/copypaste/copypaste.cpp:31:252
msgid "Copy"
msgstr ""
@@ -2396,13 +2391,13 @@ msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:101
#. i18n: ectx: property (text), widget (QToolButton, cut)
-#: qtplugins/copypaste/copypaste.cpp:34:237
+#: qtplugins/copypaste/copypaste.cpp:34:249
msgid "Cut"
msgstr ""
#. i18n: file: qtplugins/coordinateeditor/coordinateeditordialog.ui:142
#. i18n: ectx: property (text), widget (QPushButton, clear)
-#: qtplugins/copypaste/copypaste.cpp:35:249
+#: qtplugins/copypaste/copypaste.cpp:35:261
msgid "Clear"
msgstr ""
@@ -2762,6 +2757,14 @@ msgid "Editor tool"
msgstr ""
#: qtplugins/editor/editortoolwidget.cpp:129
+#: qtplugins/templatetool/templatetoolwidget.cpp:270
+#: qtplugins/templatetool/templatetoolwidget.cpp:283
+#: qtplugins/templatetool/templatetoolwidget.cpp:291
+#: qtplugins/templatetool/templatetoolwidget.cpp:299
+#: qtplugins/templatetool/templatetoolwidget.cpp:307
+#: qtplugins/templatetool/templatetoolwidget.cpp:315
+#: qtplugins/templatetool/templatetoolwidget.cpp:328
+#: qtplugins/templatetool/templatetoolwidget.cpp:390
#, fuzzy
#| msgid "Other..."
msgid "Other…"
@@ -2895,19 +2898,19 @@ msgstr "Ret valgte atomer"
msgid "&Calculate"
msgstr "Udregn energi"
-#: qtplugins/forcefield/forcefield.cpp:288 qtplugins/openbabel/openbabel.cpp:45
+#: qtplugins/forcefield/forcefield.cpp:285 qtplugins/openbabel/openbabel.cpp:45
#: qtplugins/openbabel/openbabel.cpp:525
#, fuzzy
msgid "Optimize Geometry"
msgstr "&Optimer geometri"
-#: qtplugins/forcefield/forcefield.cpp:329
+#: qtplugins/forcefield/forcefield.cpp:326
#, fuzzy, qt-format
#| msgid "Energy = %L1 %2"
msgid "%1 Energy = %L2"
msgstr "Energi = %L1 %2"
-#: qtplugins/forcefield/forcefield.cpp:330
+#: qtplugins/forcefield/forcefield.cpp:327
#: qtplugins/playertool/playertool.cpp:343
#: qtplugins/playertool/playertool.cpp:375 qtplugins/surfaces/surfaces.cpp:886
#: qtplugins/surfaces/surfaces.cpp:930 qtplugins/surfaces/surfaces.cpp:942
@@ -3124,7 +3127,7 @@ msgstr ""
#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:79
#. i18n: ectx: property (toolTip), widget (QToolButton, toolButton_TU)
-#: qtplugins/insertdna/insertdna.cpp:168:600
+#: qtplugins/insertdna/insertdna.cpp:168:612
msgid "Thymine"
msgstr ""
@@ -3171,7 +3174,7 @@ msgstr ""
#. i18n: file: qtplugins/crystal/importcrystaldialog.ui:14
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ImportCrystalDialog)
-#: qtplugins/insertfragment/insertfragment.cpp:117:342
+#: qtplugins/insertfragment/insertfragment.cpp:117:354
msgid "Import Crystal"
msgstr ""
@@ -4427,7 +4430,7 @@ msgstr ""
msgid "Select None"
msgstr ""
-#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:516
+#: qtplugins/select/select.cpp:48 qtplugins/select/select.cpp:537
msgid "Invert Selection"
msgstr ""
@@ -4463,13 +4466,13 @@ msgstr "Atom nummer"
msgid "Select Water…"
msgstr "Atom nummer"
-#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:352
+#: qtplugins/select/select.cpp:88 qtplugins/select/select.cpp:368
#, fuzzy
#| msgid "Ignore Selection"
msgid "Enlarge Selection"
msgstr "Ignorér markering"
-#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:387
+#: qtplugins/select/select.cpp:93 qtplugins/select/select.cpp:404
#, fuzzy
#| msgid "Selection"
msgid "Shrink Selection"
@@ -4493,44 +4496,44 @@ msgstr "&Vælg"
msgid "Select Element"
msgstr "Vælg efter rest..."
-#: qtplugins/select/select.cpp:216
+#: qtplugins/select/select.cpp:217
#, fuzzy
msgid "Select Water"
msgstr "Atom nummer"
-#: qtplugins/select/select.cpp:254
+#: qtplugins/select/select.cpp:266
#, fuzzy
msgid "Select Backbone"
msgstr "Atom nummer"
-#: qtplugins/select/select.cpp:288
+#: qtplugins/select/select.cpp:302
#, fuzzy
msgid "Select Sidechain"
msgstr "Atom nummer"
-#: qtplugins/select/select.cpp:409
+#: qtplugins/select/select.cpp:428
msgid "Select Atoms by Index"
msgstr ""
-#: qtplugins/select/select.cpp:410
+#: qtplugins/select/select.cpp:429
msgid "Atoms to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:415
+#: qtplugins/select/select.cpp:434
#, fuzzy
#| msgid "Delete Atom"
msgid "Select Atom"
msgstr "Slet atom"
-#: qtplugins/select/select.cpp:448
+#: qtplugins/select/select.cpp:469
msgid "Select Atoms by Residue"
msgstr ""
-#: qtplugins/select/select.cpp:449
+#: qtplugins/select/select.cpp:470
msgid "Residues to Select:"
msgstr ""
-#: qtplugins/select/select.cpp:454
+#: qtplugins/select/select.cpp:475
#, fuzzy
#| msgid "Select by Residue..."
msgid "Select Residue"
@@ -4897,30 +4900,35 @@ msgstr ""
msgid "Template"
msgstr ""
-#: qtplugins/templatetool/templatetool.cpp:294
+#: qtplugins/templatetool/templatetool.cpp:84
+msgid ""
+"Template Tool\n"
+"\n"
+"Insert fragments, including metal centers.\n"
+"Select an element and coordination geometry,then click to insert a "
+"fragment.\n"
+"\n"
+"Select a ligand or functional group and clickon a hydrogen atom to attach it."
+msgstr ""
+
+#: qtplugins/templatetool/templatetool.cpp:302
#, fuzzy
#| msgid "Insert Peptide"
msgid "Insert Template"
msgstr "Indsæt peptid"
-#: qtplugins/templatetool/templatetool.cpp:544
+#: qtplugins/templatetool/templatetool.cpp:559
#, fuzzy
#| msgid "Insert Peptide"
msgid "Insert Ligand"
msgstr "Indsæt peptid"
-#: qtplugins/templatetool/templatetool.h:34
#: qtplugins/templatetool/templatetool.h:35
+#: qtplugins/templatetool/templatetool.h:36
#, fuzzy
msgid "Template tool"
msgstr "Mål"
-#: qtplugins/templatetool/templatetoolwidget.cpp:288
-#, fuzzy
-#| msgid "Other..."
-msgid "Other..."
-msgstr "Andet..."
-
#: qtplugins/vanderwaals/vanderwaals.h:33
msgid "Simple display of VdW spheres."
msgstr ""
@@ -5137,6 +5145,30 @@ msgstr ""
msgid "Rename Elements"
msgstr ""
+#. i18n: file: qtgui/insertfragmentdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtGui::InsertFragmentDialog)
+#, fuzzy
+#| msgid "Insert Fragment"
+msgid "Insert Fragment…"
+msgstr "Indsæt fragment"
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:22
+#. i18n: ectx: property (text), widget (QLabel, label)
+msgid "Filter:"
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:29
+#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
+msgid "Type a name or part of a name to show only matching files."
+msgstr ""
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:86
+#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
+#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
+#. i18n: ectx: property (text), widget (QPushButton, insertButton)
+msgid "Insert"
+msgstr ""
+
#. i18n: file: qtplugins/3dmol/3dmoldialog.ui:17
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ThreeDMolDialog)
msgid "3DMol HTML Snippet"
@@ -5996,30 +6028,6 @@ msgctxt "double-strand DNA"
msgid "Double"
msgstr "Dobbelt"
-#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
-#. i18n: ectx: property (text), widget (QPushButton, insertButton)
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:86
-#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
-msgid "Insert"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:14
-#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::InsertFragmentDialog)
-#, fuzzy
-#| msgid "Insert Fragment"
-msgid "Insert Fragment…"
-msgstr "Indsæt fragment"
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:22
-#. i18n: ectx: property (text), widget (QLabel, label)
-msgid "Filter:"
-msgstr ""
-
-#. i18n: file: qtplugins/insertfragment/insertfragmentdialog.ui:29
-#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
-msgid "Type a name or part of a name to show only matching files."
-msgstr ""
-
#. i18n: file: qtplugins/lammpsinput/lammpsinputdialog.ui:20
#. i18n: ectx: property (windowTitle), widget (QDialog, LammpsInputDialog)
msgid "LAMMPS Input"
@@ -7742,6 +7750,11 @@ msgstr ""
"devel@lists.sourceforge.net,,olegb@omgwtf.dk,,loniedavid@gmail.com,jvd@tuta."
"io,"
+#, fuzzy
+#~| msgid "Other..."
+#~ msgid "Other..."
+#~ msgstr "Andet..."
+
#, fuzzy
#~ msgid "Filename"
#~ msgstr "Filnavn:"
diff --git a/i18n/de.po b/i18n/de.po
index 186695b1e0..1f7be26da8 100644
--- a/i18n/de.po
+++ b/i18n/de.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: _avogadro-de\n"
"Report-Msgid-Bugs-To: avogadro-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2023-10-29 02:01+0000\n"
+"POT-Creation-Date: 2023-11-19 14:57+0000\n"
"PO-Revision-Date: 2023-08-17 15:50+0000\n"
"Last-Translator: Norwid Behrnd \n"
"Language-Team: German \n"
"Language-Team: Greek \n"
"Language-Team: English (United Kingdom)
Number of processor cores to reserve for this job."
"p>"
msgstr ""
-"
Number of processor cores to reserve for this "
-"job.
"
+"Number of processor cores to reserve for this job."
+"p>"
#. i18n: file: molequeue/molequeuewidget.ui:88
#. i18n: ectx: property (text), widget (QLabel, label_7)
@@ -4986,8 +4996,8 @@ msgid ""
"body>"
msgstr ""
"
Delete remote working files upon job completion. "
-"Results will still be copied to the local MoleQueue job cache "
-"first.
"
+"Results will still be copied to the local MoleQueue job cache first.
"
+"body>"
#. i18n: file: molequeue/molequeuewidget.ui:128
#. i18n: ectx: property (text), widget (QLabel, label)
@@ -5032,6 +5042,28 @@ msgstr "Open output when finished:"
msgid "Rename Elements"
msgstr "Rename Elements"
+#. i18n: file: qtgui/insertfragmentdialog.ui:14
+#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtGui::InsertFragmentDialog)
+msgid "Insert Fragment…"
+msgstr "Insert Fragment…"
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:22
+#. i18n: ectx: property (text), widget (QLabel, label)
+msgid "Filter:"
+msgstr "Filter:"
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:29
+#. i18n: ectx: property (toolTip), widget (QLineEdit, filterLineEdit)
+msgid "Type a name or part of a name to show only matching files."
+msgstr "Type a name or part of a name to show only matching files."
+
+#. i18n: file: qtgui/insertfragmentdialog.ui:86
+#. i18n: ectx: property (text), widget (QPushButton, insertFragmentButton)
+#. i18n: file: qtplugins/insertdna/insertdnadialog.ui:227
+#. i18n: ectx: property (text), widget (QPushButton, insertButton)
+msgid "Insert"
+msgstr "Insert"
+
#. i18n: file: qtplugins/3dmol/3dmoldialog.ui:17
#. i18n: ectx: property (windowTitle), widget (QDialog, Avogadro::QtPlugins::ThreeDMolDialog)
msgid "3DMol HTML Snippet"
@@ -5261,20 +5293,20 @@ msgstr ""
"span> - Atomic number (e.g. \"6\" for carbon)
G - GAMESS-style atomic number (e.g. \"6.0\" for "
"carbon)
N - Element name (e.g. "
-"\"Carbon\")
S - Element symbol ("
-"e.g. \"C\" for carbon)
L - Atom "
-"label (e.g., \"C2\" for second carbon atom, \"H1\" for first hydrogen)
x - X position coordinate
S - Element symbol "
+"(e.g. \"C\" for carbon)
L - "
+"Atom label (e.g., \"C2\" for second carbon atom, \"H1\" for first hydrogen) "
+"
x - X position coordinate
y - Y position coordinate
z - Z position coordinate
a - 'a' lattice coordinate ("
-"crystals only)
b - 'b' lattice "
+">a - 'a' lattice coordinate "
+"(crystals only)
b - 'b' lattice "
"coordinate (crystals only)
c - "
-"'c' lattice coordinate (crystals only)
_ - A literal space (\" \"), useful for alignment
0 - A literal 0 (\"0\"), useful for optimization "
-"flags
1 - A literal 1 (\"1\"), "
-"useful for optimization flags