source: src/Actions/PotentialAction/FitPotentialAction.def@ 019b96

Last change on this file since 019b96 was 95cfac, checked in by Frederik Heber <heber@…>, 11 years ago

Added FileSuffixValidator to all Actions where missing but appropriate.

  • also clean up some unnecessary includes.
  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[48d20d]1/*
2 * FitPotentialAction.def
3 *
4 * Created on: Apr 08, 2013
5 * Author: heber
6 */
7
8// all includes and forward declarations necessary for non-integral types below
9#include <boost/filesystem/path.hpp>
10#include <string>
11#include <vector>
12
[baccf6]13#include "Parameters/Validators/DummyValidator.hpp"
[4792ab]14#include "Parameters/Validators/GenericValidators.hpp"
[a315e8]15#include "Parameters/Validators/Ops_Validator.hpp"
[48d20d]16#include "Parameters/Validators/RangeValidator.hpp"
17#include "Parameters/Validators/STLVectorValidator.hpp"
18#include "Parameters/Validators/Specific/ElementValidator.hpp"
[a315e8]19#include "Parameters/Validators/Specific/EmptyStringValidator.hpp"
[95cfac]20#include "Parameters/Validators/Specific/FileSuffixValidator.hpp"
[48d20d]21#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
22#include "Parameters/Validators/Specific/PotentialTypeValidator.hpp"
23
24// i.e. there is an integer with variable name Z that can be found in
25// ValueStorage by the token "Z" -> first column: int, Z, "Z"
26// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
[4792ab]27#define paramtypes (boost::filesystem::path)(std::string)(boost::filesystem::path)(std::vector<const element *>)(std::vector<const element *>)(unsigned int)(double)
28#define paramtokens ("training-file")("potential-type")("potential-file")("potential-charges")("fragment-charges")("take-best-of")("set-threshold")
[95cfac]29#define paramdescriptions ("optional file to write training data to")("potential type to fit")("optional potential file specifying multiple potentials to fit")("charges specifying the potential")("charges specifying the fragment")("take the best among this many approximations")("Require L2 error to be smaller than threshold, overrides number of attempts")
[4792ab]30#define paramdefaults (PARAM_DEFAULT(""))(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(3))(PARAM_DEFAULT(1.))
31#define paramreferences (training_file)(potentialtype)(potential_file)(charges)(fragment)(best_of_howmany)(threshold)
[48d20d]32#define paramvalids \
[a504946]33(DummyValidator<boost::filesystem::path>()) \
[a315e8]34(EmptyStringValidator() || PotentialTypeValidator()) \
[95cfac]35(!FilePresentValidator() || FileSuffixValidator("potentials")) \
[baccf6]36(STLVectorValidator< std::vector<const element *> >(0,99, ElementValidator())) \
[48d20d]37(STLVectorValidator< std::vector<const element *> >(1,99, ElementValidator())) \
[4792ab]38(PositiveValidator<unsigned int>()) \
39(PositiveValidator<double>())
[48d20d]40
41#undef statetypes
42#undef statereferences
43
44// some defines for all the names, you may use ACTION, STATE and PARAMS
[f5724f]45#define CATEGORY Potential
46#define MENUNAME "potential"
47#define MENUPOSITION 3
[48d20d]48#define ACTIONNAME FitPotential
49#define TOKEN "fit-potential"
50
51
52// finally the information stored in the ActionTrait specialization
53#define DESCRIPTION "fit an empirical potential to the given part of a specified fragment"
54#undef SHORTFORM
Note: See TracBrowser for help on using the repository browser.