/*
 * FragmentationAutomationAction.def
 *
 *  Created on: May 18, 2012
 *      Author: heber
 */

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

#include "Parameters/Validators/DummyValidator.hpp"
#include "Parameters/Validators/Ops_Validator.hpp"
#include "Parameters/Validators/RangeValidator.hpp"
#include "Parameters/Validators/Specific/BoxLengthValidator.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 (std::string)(std::string)(boost::filesystem::path)(double)(unsigned int)(unsigned int)(unsigned int)(bool)(bool)(bool)(bool)(bool)
#define paramtokens ("server-address")("server-port")("fragment-executable")("max-meshwidth")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")("DoValenceOnly")("DoPrintDebug")("DoSmearElectronicCharges")("UseImplicitCharges")
#define paramdescriptions ("hostname of server")("controller port of server")("executable to launch on clients")("maximum allowed mesh width, i.e. discrete points may be at most that far apart on the fragment grids")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")("whether the sampling uses only the valence electron and nuclei charge")("whether to print grids for debug visualization")("whether to smear out electronic charge distributions with bsplines or not")("whether to model any non-selected atoms by partial charges implicitly") 
#define paramdefaults (PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT(""))(PARAM_DEFAULT("mpqc"))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))(PARAM_DEFAULT("0"))
#define paramreferences (host)(port)(executable)(max_meshwidth)(level)(near_field_cells)(interpolation_degree)(DoLongrange)(DoValenceOnly)(DoPrintDebug)(DoSmearCharges)(UseImplicitCharges)
#define paramvalids \
(DummyValidator< std::string >()) \
(DummyValidator< std::string >()) \
(DummyValidator< boost::filesystem::path >()) \
(BoxLengthValidator()) \
(RangeValidator< unsigned int >(1, std::numeric_limits<unsigned int>::max())) \
(RangeValidator< unsigned int >(1, std::numeric_limits<unsigned int>::max())) \
(RangeValidator< unsigned int >(1, 10)) \
(DummyValidator< bool >()) \
(DummyValidator< bool >()) \
(DummyValidator< bool >()) \
(DummyValidator< bool >()) \
(DummyValidator< bool >())

#undef statetypes
#undef statereferences

// some defines for all the names, you may use ACTION, STATE and PARAMS
#define CATEGORY Fragmentation
#define MENUNAME "fragmentation"
#define MENUPOSITION 3
#define ACTIONNAME FragmentationAutomation
#define TOKEN "fragment-automation"

// if base class is undefined, it defaults to Action
#define BASECLASS Process

// finally the information stored in the ActionTrait specialization
#define DESCRIPTION "calculates each fragment by using a server with a client pool"
#undef SHORTFORM
