This code (p3dstatistics.cpp) can be used to create statistics from p3d files. It is a modified version of fstatistics.cpp
39 logger(
ERROR,
"No arguments; use p3statistics.exe filename [-options]");
43 if (strcmp(argv[1],
"-help") != 0)
44 logger(
INFO,
"Getting statistics from %.p3* (or .p4*) files ...",argv[1]);
51 for (
int i = 2;
i<argc;
i++) {
52 if (!strcmp(argv[
i],
"-stattype")) {
53 if (!strcmp(argv[
i+1],
"XYZ")) T =
XYZ;
54 else if (!strcmp(argv[
i+1],
"RAZ")) T =
RAZ;
55 else if (!strcmp(argv[
i+1],
"RA")) T =
RA;
56 else if (!strcmp(argv[
i+1],
"RZ")) T =
RZ;
57 else if (!strcmp(argv[
i+1],
"AZ")) T =
AZ;
58 else if (!strcmp(argv[
i+1],
"R")) T =
R;
59 else if (!strcmp(argv[
i+1],
"A")) T =
A;
60 else if (!strcmp(argv[
i+1],
"YZ")) T =
YZ;
61 else if (!strcmp(argv[
i+1],
"XZ")) T =
XZ;
62 else if (!strcmp(argv[
i+1],
"XY")) T =
XY;
63 else if (!strcmp(argv[
i+1],
"X")) T =
X;
64 else if (!strcmp(argv[
i+1],
"Y")) T =
Y;
65 else if (!strcmp(argv[
i+1],
"Z")) T =
Z;
66 else if (!strcmp(argv[
i+1],
"O")) T =
O;
78 stats.setDoPeriodicWalls(
false);
79 stats.statistics_from_p3();
82 stats.setDoPeriodicWalls(
false);
83 stats.statistics_from_p3();
86 stats.setDoPeriodicWalls(
false);
87 stats.statistics_from_p3();
90 stats.setDoPeriodicWalls(
false);
91 stats.statistics_from_p3();
94 stats.setDoPeriodicWalls(
false);
95 stats.statistics_from_p3();
98 stats.setDoPeriodicWalls(
false);
99 stats.statistics_from_p3();
102 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