/*
 * FitCompoundPotentialAction.def
 *
 *  Created on: Sep 10, 2014
 *      Author: heber
 */

// all includes and forward declarations necessary for non-integral types below
#include <boost/filesystem/path.hpp>
#include <string>
#include <vector>

#include "Parameters/Validators/DummyValidator.hpp"
#include "Parameters/Validators/GenericValidators.hpp"
#include "Parameters/Validators/Ops_Validator.hpp"
#include "Parameters/Validators/RangeValidator.hpp"
#include "Parameters/Validators/STLVectorValidator.hpp"
#include "Parameters/Validators/Specific/ElementValidator.hpp"
#include "Parameters/Validators/Specific/FileSuffixValidator.hpp"
#include "Parameters/Validators/Specific/PotentialTypeValidator.hpp"

// i.e. there is an integer with variable name Z that can be found in
// ValueStorage by the token "Z" -> first column: int, Z, "Z"
// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
#define paramtypes (boost::filesystem::path)(std::vector<const element *>)(unsigned int)(double)
#define paramtokens ("training-file")("fragment-charges")("take-best-of")("set-threshold")
#define paramdescriptions ("optional file to write training data to")("charges specifying the fragment")("take the best among this many approximations")("Require L2 error to be smaller than threshold, overrides number of attempts")
#define paramdefaults (PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(PARAM_DEFAULT(3))(PARAM_DEFAULT(1.))
#define paramreferences (training_file)(fragment)(best_of_howmany)(threshold)
#define paramvalids \
(DummyValidator<boost::filesystem::path>()) \
(STLVectorValidator< std::vector<const element *> >(1,99, ElementValidator())) \
(PositiveValidator<unsigned int>()) \
(PositiveValidator<double>())

#undef statetypes
#undef statereferences

// some defines for all the names, you may use ACTION, STATE and PARAMS
#define CATEGORY Potential
#define MENUNAME "potential"
#define MENUPOSITION 4
#define ACTIONNAME FitCompoundPotential
#define TOKEN "fit-compound-potential"


// finally the information stored in the ActionTrait specialization
#define DESCRIPTION "fit an empirical potential to the given part of a specified fragment"
#undef SHORTFORM
