This code (p3dstatistics.cpp) can be used to create statistics from p3d files. It is a modified version of fstatistics.cpp
37 if (argc>1&&strcmp(argv[1],
"-help") != 0)
38 logger(
INFO,
"Get statistics from %.* files", argv[1]);
42 for (
int i = 2;
i<argc;
i++) {
43 if (!strcmp(argv[
i],
"-stattype")) {
44 if (!strcmp(argv[
i+1],
"XYZ")) T =
XYZ;
45 else if (!strcmp(argv[
i+1],
"RAZ")) T =
RAZ;
46 else if (!strcmp(argv[
i+1],
"RA")) T =
RA;
47 else if (!strcmp(argv[
i+1],
"RZ")) T =
RZ;
48 else if (!strcmp(argv[
i+1],
"AZ")) T =
AZ;
49 else if (!strcmp(argv[
i+1],
"R")) T =
R;
50 else if (!strcmp(argv[
i+1],
"A")) T =
A;
51 else if (!strcmp(argv[
i+1],
"YZ")) T =
YZ;
52 else if (!strcmp(argv[
i+1],
"XZ")) T =
XZ;
53 else if (!strcmp(argv[
i+1],
"XY")) T =
XY;
54 else if (!strcmp(argv[
i+1],
"X")) T =
X;
55 else if (!strcmp(argv[
i+1],
"Y")) T =
Y;
56 else if (!strcmp(argv[
i + 1],
"Z")) T =
Z;
57 else if (!strcmp(argv[
i + 1],
"O")) T =
O;
65 logger(
INFO,
"Creating xy-statistics, averaged in z");
67 stats.setDoPeriodicWalls(
false);
68 stats.statistics_from_p3();
70 logger(
INFO,
"Creating xz-statistics, averaged in y");
72 stats.setDoPeriodicWalls(
false);
73 stats.statistics_from_p3();
75 logger(
INFO,
"Creating yz-statistics, averaged in x");
77 stats.setDoPeriodicWalls(
false);
78 stats.statistics_from_p3();
80 logger(
INFO,
"Creating x-statistics, averaged in yz");
82 stats.setDoPeriodicWalls(
false);
83 stats.statistics_from_p3();
85 logger(
INFO,
"Creating y-statistics, averaged in xz");
87 stats.setDoPeriodicWalls(
false);
88 stats.statistics_from_p3();
90 logger(
INFO,
"Creating z-statistics, averaged in xy");
92 stats.setDoPeriodicWalls(
false);
93 stats.statistics_from_p3();
95 logger(
INFO,
"Creating global statistics, averaged in xyz");
97 stats.setDoPeriodicWalls(
false);
98 stats.statistics_from_p3();
126 logger(
INFO,
"Creating non-averaged statistics");
129 stats.statistics_from_p3();
LL< Log::INFO > INFO
Info log level.
Definition: Logger.cc:55
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
LL< Log::ERROR > ERROR
Error log level.
Definition: Logger.cc:53
StatType
Creates averaged statistics (only valid if density field is homogenous along averaged direction)
Definition: StatisticsVector.h:41
@ AZ
Definition: StatisticsVector.h:42
@ XY
Definition: StatisticsVector.h:42
@ XZ
Definition: StatisticsVector.h:42
@ R
Definition: StatisticsVector.h:42
@ RA
Definition: StatisticsVector.h:42
@ YZ
Definition: StatisticsVector.h:42
@ A
Definition: StatisticsVector.h:42
@ Y
Definition: StatisticsVector.h:42
@ X
Definition: StatisticsVector.h:42
@ Z
Definition: StatisticsVector.h:42
@ XYZ
Definition: StatisticsVector.h:42
@ RAZ
Definition: StatisticsVector.h:42
@ RZ
Definition: StatisticsVector.h:42
@ O
Definition: StatisticsVector.h:42
This class is used to extract statistical data from MD simulations.
Definition: StatisticsVector.h:62
const std::complex< Mdouble > i
Definition: ExtendedMath.h:51