Gromacs
2026.0-dev-20241212-74b8831
|
#include <gromacs/pulling/pullcoordexpressionparser.h>
Class with a mathematical expression and parser.
The class handles parser instantiation from an mathematical expression, e.g. 'x1*x2', and evaluates the expression given the variables' numerical values.
Note that for performance reasons you should not create a new PullCoordExpressionParser for every evaluation. Instead, instantiate one PullCoordExpressionParser per expression, then update the variables before the next evaluation.
Public Member Functions | |
PullCoordExpressionParser (const std::string &expression, int numVariables, bool allowTimeAsVariable) | |
Constructor which takes a mathematical expression and the number of variables as arguments. | |
double | evaluate (ArrayRef< const double > variables) |
Evaluates the expression with the numerical values passed in variables . | |