source: src/Actions/MoleculeAction/FillVoidWithMoleculeAction.def@ 2d50a2

Last change on this file since 2d50a2 was 6ba9ba, checked in by Frederik Heber <heber@…>, 13 years ago

Default values are properly set by the Action into their (Action)Parameters.

  • we changed the boost::preprocessor magic to accomplish this.
  • NODEFAULT -> NOPARAM_DEFAULT to be safe.
  • it has been a hell of a lot of work to make it possible to add a construct such as ", default" to the call of a function, either the comma or the default is easy but both could only be accomplished via a list contained in the sequence of default values. Because the list has an explicit NIL element which is taken as NOPARAM_DEFAULT.
  • PARAM_DEFAULT is a macro to wrap the default value into a list.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 * FillVoidWithMoleculeAction.def
3 *
4 * Created on: Aug 26, 2010
5 * Author: heber
6 */
7
8// all includes and forward declarations necessary for non-integral types below
9#include "LinearAlgebra/Vector.hpp"
10
11#include "LinearAlgebra/defs.hpp"
12#include "Parameters/Validators/DummyValidator.hpp"
13#include "Parameters/Validators/Ops_Validator.hpp"
14#include "Parameters/Validators/Specific/BoxLengthValidator.hpp"
15#include "Parameters/Validators/Specific/BoxVectorValidator.hpp"
16#include "Parameters/Validators/Specific/FilePresentValidator.hpp"
17#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
18
19// i.e. there is an integer with variable name Z that can be found in
20// ValueStorage by the token "Z" -> first column: int, Z, "Z"
21// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
22#define paramtypes (boost::filesystem::path)(Vector)(double)(double)(double)(double)(bool)
23#define paramtokens ("fill-void")("distances")("distance-to-molecule")("random-atom-displacement")("random-molecule-displacement")("distance-to-boundary")("DoRotate")
24#define paramdescriptions ("name of xyz file of filler molecule")("list of three of distances in space, one for each axis direction")("minimum distance to present molecules")("magnitude of random atom displacement")("magnitude of random molecule displacement")("minimum distance to boundary")("whether to rotate or not")
25#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(0.))(PARAM_DEFAULT(false))
26#define paramreferences (fillername)(distances)(boundary)(RandAtomDisplacement)(RandMoleculeDisplacement)(MinDistance)(DoRotate)
27#define paramvalids \
28(FilePresentValidator() && ParserFileValidator()) \
29(BoxVectorValidator()) \
30(BoxLengthValidator()) \
31(BoxLengthValidator()) \
32(BoxLengthValidator()) \
33(BoxLengthValidator()) \
34(DummyValidator< bool >())
35
36#define statetypes (std::vector<molecule *>)
37#define statereferences (fillermolecules)
38
39// some defines for all the names, you may use ACTION, STATE and PARAMS
40#define CATEGORY Molecule
41#define MENUNAME "molecule"
42#define MENUPOSITION 5
43#define ACTIONNAME FillVoidWithMolecule
44#define TOKEN "fill-void"
45
46
47// finally the information stored in the ActionTrait specialization
48#define DESCRIPTION "fill void space of box with a filler molecule"
49#undef SHORTFORM
Note: See TracBrowser for help on using the repository browser.