The OBForceFieldDialog class is used to prompt the user for parameters to be used in an OpenBabel force field optimization.
#include <obforcefielddialog.h>
|
static QStringList | prompt (QWidget *parent_, const QStringList &forceFields, const QStringList &startingOptions, const QString &recommendedForceField_=QString()) |
|
◆ OBForceFieldDialog()
Construct a new dialog using the forcefields in forceFields.
◆ prompt()
static QStringList prompt |
( |
QWidget * |
parent_, |
|
|
const QStringList & |
forceFields, |
|
|
const QStringList & |
startingOptions, |
|
|
const QString & |
recommendedForceField_ = QString() |
|
) |
| |
|
static |
Construct a new dialog using the forcefields in forceFields and initialize the options to those in startingOptions (see setOptions). If the user chooses the recommended force field, recommendedForceField_ will be set. This is useful for preferring a specific force field for a particular molecule. When the user closes the dialog, the options they selected are returned. If the user cancels the dialog, an empty list is returned.
◆ options()
QStringList options |
( |
| ) |
const |
Get/set the options displayed in the dialog. The option format is a list of
strings that may be used directly as arguments in a call to
QProcess::start, with the exception of the `-i<input format>`,
`-o<output format>` and `--minimize` options, which are not used by this
class. See `obabel -L minimize` for a complete listing of available
options.
Each option (and argument, if applicable) must be a separate string in the
list. For instance, to refer to the options in the call:
obabel -icml -ocml --minimize --log --crit 1e-05 --ff Ghemical --sd"
The option list should contain, in order:
- `--crit`
- `1e-05`
- `--ff`
- `Ghemical`
- `--sd`
@note The `--log` option is always added in the list returned by
options, and is ignored by the setOptions method.
@{
◆ recommendedForceField()
QString recommendedForceField |
( |
| ) |
const |
Get/set the recommended forcefield for the current molecule. If an empty string, the user will not be shown an option to use the recommended forcefield. If the string is non-empty (and in the forceFields list passed in the constructor), the user will have the option of setting the forcefield to this value.
◆ setRecommendedForceField()
void setRecommendedForceField |
( |
const QString & |
rff | ) |
|
Get/set the recommended forcefield for the current molecule. If an empty string, the user will not be shown an option to use the recommended forcefield. If the string is non-empty (and in the forceFields list passed in the constructor), the user will have the option of setting the forcefield to this value.
The documentation for this class was generated from the following file: