| 76 |
|
#include "applications/staticProps/RhoR.hpp" |
| 77 |
|
#include "applications/staticProps/AngleR.hpp" |
| 78 |
|
#include "applications/staticProps/TetrahedralityParam.hpp" |
| 79 |
< |
|
| 79 |
> |
#include "applications/staticProps/TetrahedralityParamZ.hpp" |
| 80 |
|
using namespace OpenMD; |
| 81 |
|
|
| 82 |
|
int main(int argc, char* argv[]){ |
| 93 |
|
std::string dumpFileName = args_info.input_arg; |
| 94 |
|
std::string sele1; |
| 95 |
|
std::string sele2; |
| 96 |
– |
bool userSpecifiedSelect1; |
| 97 |
– |
bool userSpecifiedSelect2; |
| 96 |
|
|
| 97 |
|
// check the first selection argument, or set it to the environment |
| 98 |
|
// variable, or failing that, set it to "select all" |
| 118 |
|
if (sele2Env) { |
| 119 |
|
sele2 = sele2Env; |
| 120 |
|
} else { |
| 121 |
< |
sele2 = "select all"; |
| 121 |
> |
//If sele2 is not specified, then the default behavior |
| 122 |
> |
//should be what is already intended for sele1 |
| 123 |
> |
sele2 = sele1; |
| 124 |
> |
//sele2 = "select all"; |
| 125 |
|
} |
| 126 |
|
} |
| 127 |
|
|
| 236 |
|
if (args_info.sele2_given) |
| 237 |
|
analyser = new P2OrderParameter(info, dumpFileName, sele1, sele2); |
| 238 |
|
else |
| 239 |
< |
analyser = new P2OrderParameter(info, dumpFileName, sele1); |
| 239 |
> |
if (args_info.seleoffset_given) |
| 240 |
> |
analyser = new P2OrderParameter(info, dumpFileName, sele1, |
| 241 |
> |
args_info.seleoffset_arg); |
| 242 |
> |
else |
| 243 |
> |
analyser = new P2OrderParameter(info, dumpFileName, sele1); |
| 244 |
|
} else { |
| 245 |
|
sprintf( painCave.errMsg, |
| 246 |
|
"At least one selection script (--sele1) must be specified when calculating P2 order parameters"); |
| 275 |
|
painCave.isFatal = 1; |
| 276 |
|
simError(); |
| 277 |
|
} |
| 278 |
+ |
} else if (args_info.tet_param_z_given) { |
| 279 |
+ |
if (args_info.rcut_given) { |
| 280 |
+ |
analyser = new TetrahedralityParamZ(info, dumpFileName, sele1, |
| 281 |
+ |
args_info.rcut_arg, |
| 282 |
+ |
args_info.nbins_arg); |
| 283 |
+ |
} else { |
| 284 |
+ |
sprintf( painCave.errMsg, |
| 285 |
+ |
"A cutoff radius (rcut) must be specified when calculating Tetrahedrality Parameters"); |
| 286 |
+ |
painCave.severity = OPENMD_ERROR; |
| 287 |
+ |
painCave.isFatal = 1; |
| 288 |
+ |
simError(); |
| 289 |
+ |
} |
| 290 |
|
} else if (args_info.bor_given){ |
| 291 |
|
if (args_info.rcut_given) { |
| 292 |
|
analyser = new BOPofR(info, dumpFileName, sele1, args_info.rcut_arg, |
| 355 |
|
if (args_info.step_given) { |
| 356 |
|
analyser->setStep(args_info.step_arg); |
| 357 |
|
} |
| 358 |
< |
|
| 358 |
> |
|
| 359 |
|
analyser->process(); |
| 360 |
|
|
| 361 |
|
delete analyser; |