--- trunk/src/applications/sequentialProps/SequentialProps.cpp 2014/10/16 19:13:51 2024 +++ trunk/src/applications/sequentialProps/SequentialProps.cpp 2015/03/07 21:41:51 2071 @@ -51,7 +51,9 @@ #include "applications/sequentialProps/SequentialPropsCmd.h" #include "applications/sequentialProps/SequentialAnalyzer.hpp" -#include "applications/sequentialProps/DensityAnalyzer.hpp" +#include "applications/sequentialProps/CenterOfMass.hpp" +#include "applications/sequentialProps/ContactAngle1.hpp" +#include "applications/sequentialProps/ContactAngle2.hpp" using namespace OpenMD; @@ -104,9 +106,67 @@ int main(int argc, char* argv[]){ SimCreator creator; SimInfo* info = creator.createSim(dumpFileName, false); - SequentialAnalyzer* analyzer; - if(args_info.density_given){ - analyzer = new DensityAnalyzer(info, dumpFileName, sele1); + SequentialAnalyzer* analyzer = NULL; + if(args_info.com_given){ + analyzer = new CenterOfMass(info, dumpFileName, sele1); + } else if(args_info.ca1_given){ + RealType solidZ(0.0); + if (args_info.referenceZ_given) + solidZ = args_info.referenceZ_arg; + else { + sprintf( painCave.errMsg, + "--referenceZ must be set if --ca1 is used\n"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + RealType dropletR(0.0); + if (args_info.dropletR_given) + dropletR = args_info.dropletR_arg; + else { + sprintf( painCave.errMsg, + "--dropletR must be set if --ca1 is used\n"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + + analyzer = new ContactAngle1(info, dumpFileName, sele1, solidZ, dropletR); + } else if(args_info.ca2_given){ + RealType solidZ(0.0); + if (args_info.referenceZ_given) + solidZ = args_info.referenceZ_arg; + else { + sprintf( painCave.errMsg, + "--referenceZ must be set if --ca2 is used\n"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + RealType threshDens(0.0); + if (args_info.threshDens_given) + threshDens = args_info.threshDens_arg; + else { + sprintf( painCave.errMsg, + "--threshDens must be set if --ca2 is used\n"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + RealType bufferLength(0.0); + if (args_info.bufferLength_given) + bufferLength = args_info.bufferLength_arg; + else { + sprintf( painCave.errMsg, + "--bufferLength must be set if --ca2 is used\n"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + + analyzer = new ContactAngle2(info, dumpFileName, sele1, solidZ, + threshDens, bufferLength, args_info.nbins_arg, + args_info.nbins_z_arg); } if (args_info.output_given) {