| 50 |  | #include "utils/simError.h" | 
| 51 |  |  | 
| 52 |  | #include "applications/staticProps/StaticPropsCmd.h" | 
| 53 | + | #include "applications/staticProps/StaticAnalyser.hpp" | 
| 54 |  | #include "applications/staticProps/GofR.hpp" | 
| 55 |  | #include "applications/staticProps/GofRAngle.hpp" | 
| 56 |  | #include "applications/staticProps/GofAngle2.hpp" | 
| 57 |  | #include "applications/staticProps/GofXyz.hpp" | 
| 58 | + | #include "applications/staticProps/P2OrderParameter.hpp" | 
| 59 | + | #include "applications/staticProps/SCDOrderParameter.hpp" | 
| 60 |  |  | 
| 61 |  | using namespace oopse; | 
| 62 |  |  | 
| 112 |  | } | 
| 113 |  | } | 
| 114 |  |  | 
| 115 | + | bool batchMode; | 
| 116 | + | if (args_info.scd_given){ | 
| 117 | + | if (args_info.sele1_given && args_info.sele2_given && args_info.sele3_given) { | 
| 118 | + | batchMode = false; | 
| 119 | + | } else if (args_info.molname_given && args_info.begin_given && args_info.end_given) { | 
| 120 | + | if (args_info.begin_arg < 0 || args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { | 
| 121 | + | sprintf( painCave.errMsg, | 
| 122 | + | "below conditions are not satisfied:\n" | 
| 123 | + | "0 <= begin && 0<= end && begin <= end-2\n"); | 
| 124 | + | painCave.severity = OOPSE_ERROR; | 
| 125 | + | painCave.isFatal = 1; | 
| 126 | + | simError(); | 
| 127 | + | } | 
| 128 | + | batchMode = true; | 
| 129 | + | } else{ | 
| 130 | + | sprintf( painCave.errMsg, | 
| 131 | + | "either --sele1, --sele2, --sele3 are specified," | 
| 132 | + | " or --molname, --begin, --end are specified\n"); | 
| 133 | + | painCave.severity = OOPSE_ERROR; | 
| 134 | + | painCave.isFatal = 1; | 
| 135 | + | simError(); | 
| 136 | + |  | 
| 137 | + | } | 
| 138 | + | } | 
| 139 | + |  | 
| 140 |  | //parse md file and set up the system | 
| 141 |  | SimCreator creator; | 
| 142 |  | SimInfo* info = creator.createSim(mdFileName); | 
| 149 |  | maxLen = std::min(std::min(hmat(0, 0), hmat(1, 1)), hmat(2, 2)) /2.0; | 
| 150 |  | } | 
| 151 |  |  | 
| 152 | < | RadialDistrFunc* rdf; | 
| 152 | > | StaticAnalyser* analyser; | 
| 153 |  | if (args_info.gofr_given){ | 
| 154 | < | rdf= new GofR(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg); | 
| 154 | > | analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg); | 
| 155 |  | } else if (args_info.r_theta_given) { | 
| 156 | < | rdf  = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg, args_info.nanglebins_arg); | 
| 156 | > | analyser  = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg, args_info.nanglebins_arg); | 
| 157 |  | } else if (args_info.r_omega_given) { | 
| 158 | < | rdf  = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg, args_info.nanglebins_arg); | 
| 158 | > | analyser  = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, args_info.nrbins_arg, args_info.nanglebins_arg); | 
| 159 |  | } else if (args_info.theta_omega_given) { | 
| 160 | < | rdf  = new GofAngle2(info, dumpFileName, sele1, sele2, args_info.nanglebins_arg); | 
| 160 | > | analyser  = new GofAngle2(info, dumpFileName, sele1, sele2, args_info.nanglebins_arg); | 
| 161 |  | } else if (args_info.gxyz_given) { | 
| 162 |  | if (args_info.refsele_given) { | 
| 163 | < | rdf= new GofXyz(info, dumpFileName, sele1, sele2,args_info.refsele_arg, maxLen, args_info.nrbins_arg); | 
| 163 | > | analyser= new GofXyz(info, dumpFileName, sele1, sele2,args_info.refsele_arg, maxLen, args_info.nrbins_arg); | 
| 164 |  | } else { | 
| 165 |  | sprintf( painCave.errMsg, | 
| 166 |  | "--refsele must set when --gxyz is used"); | 
| 168 |  | painCave.isFatal = 1; | 
| 169 |  | simError(); | 
| 170 |  | } | 
| 171 | + | } else if (args_info.p2_given) { | 
| 172 | + | analyser  = new P2OrderParameter(info, dumpFileName, sele1, sele2); | 
| 173 | + | } else if (args_info.scd_given) { | 
| 174 | + | if (batchMode) { | 
| 175 | + | analyser  = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg, | 
| 176 | + | args_info.begin_arg, args_info.end_arg); | 
| 177 | + | } else{ | 
| 178 | + | std::string sele3 = args_info.sele3_arg; | 
| 179 | + | analyser  = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); | 
| 180 | + | } | 
| 181 |  | } | 
| 182 |  |  | 
| 183 |  | if (args_info.output_given) { | 
| 184 | < | rdf->setOutputName(args_info.output_arg); | 
| 184 | > | analyser->setOutputName(args_info.output_arg); | 
| 185 |  | } | 
| 186 |  | if (args_info.step_given) { | 
| 187 | < | rdf->setStep(args_info.step_arg); | 
| 187 | > | analyser->setStep(args_info.step_arg); | 
| 188 |  | } | 
| 189 |  |  | 
| 190 | < | rdf->process(); | 
| 190 | > | analyser->process(); | 
| 191 |  |  | 
| 192 | < | delete rdf; | 
| 192 | > | delete analyser; | 
| 193 |  | delete info; | 
| 194 |  |  | 
| 195 |  | return 0; |