| 35 | 
  | 
 *                                                                       | 
| 36 | 
  | 
 * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).              | 
| 37 | 
  | 
 * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).           | 
| 38 | 
< | 
 * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).           | 
| 38 | 
> | 
 * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).           | 
| 39 | 
  | 
 * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010). | 
| 40 | 
  | 
 * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). | 
| 41 | 
  | 
 */ | 
| 77 | 
  | 
#include "applications/staticProps/AngleR.hpp" | 
| 78 | 
  | 
#include "applications/staticProps/TetrahedralityParam.hpp" | 
| 79 | 
  | 
#include "applications/staticProps/TetrahedralityParamZ.hpp" | 
| 80 | 
+ | 
#include "applications/staticProps/RNEMDStats.hpp" | 
| 81 | 
+ | 
 | 
| 82 | 
  | 
using namespace OpenMD; | 
| 83 | 
  | 
 | 
| 84 | 
  | 
int main(int argc, char* argv[]){ | 
| 123 | 
  | 
      //If sele2 is not specified, then the default behavior | 
| 124 | 
  | 
      //should be what is already intended for sele1 | 
| 125 | 
  | 
      sele2 = sele1; | 
| 124 | 
– | 
      //sele2 = "select all"; | 
| 126 | 
  | 
    } | 
| 127 | 
  | 
  } | 
| 128 | 
< | 
   | 
| 128 | 
< | 
   | 
| 129 | 
< | 
  // Problems if sele1 wasn't specified, but  | 
| 130 | 
< | 
  // if (!args_info.scd_given) { | 
| 131 | 
< | 
  //       sprintf( painCave.errMsg, | 
| 132 | 
< | 
  //                "neither --sele1 option nor $SELECTION1 is set"); | 
| 133 | 
< | 
  //       painCave.severity = OPENMD_ERROR; | 
| 134 | 
< | 
  //       painCave.isFatal = 1; | 
| 135 | 
< | 
  //       simError(); | 
| 136 | 
< | 
  //     } | 
| 137 | 
< | 
  //   } | 
| 138 | 
< | 
   | 
| 139 | 
< | 
  // Problems if sele1 wasn't specified | 
| 140 | 
< | 
   | 
| 141 | 
< | 
  //     if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given)  { | 
| 142 | 
< | 
  //       sprintf( painCave.errMsg, | 
| 143 | 
< | 
  //                "neither --sele2 option nor $SELECTION1 is set"); | 
| 144 | 
< | 
  //       painCave.severity = OPENMD_ERROR; | 
| 145 | 
< | 
  //       painCave.isFatal = 1; | 
| 146 | 
< | 
  //       simError();         | 
| 147 | 
< | 
  //     } | 
| 148 | 
< | 
  //   } | 
| 149 | 
< | 
   | 
| 128 | 
> | 
 | 
| 129 | 
  | 
  bool batchMode; | 
| 130 | 
  | 
  if (args_info.scd_given){ | 
| 131 | 
< | 
    if (args_info.sele1_given && args_info.sele2_given && args_info.sele3_given) { | 
| 131 | 
> | 
    if (args_info.sele1_given &&  | 
| 132 | 
> | 
        args_info.sele2_given && args_info.sele3_given) { | 
| 133 | 
  | 
      batchMode = false; | 
| 134 | 
< | 
    } else if (args_info.molname_given && args_info.begin_given && args_info.end_given) { | 
| 135 | 
< | 
      if (args_info.begin_arg < 0 || args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { | 
| 134 | 
> | 
    } else if (args_info.molname_given &&  | 
| 135 | 
> | 
               args_info.begin_given && args_info.end_given) { | 
| 136 | 
> | 
      if (args_info.begin_arg < 0 ||  | 
| 137 | 
> | 
          args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { | 
| 138 | 
  | 
        sprintf( painCave.errMsg, | 
| 139 | 
  | 
                 "below conditions are not satisfied:\n" | 
| 140 | 
  | 
                 "0 <= begin && 0<= end && begin <= end-2\n"); | 
| 149 | 
  | 
               " or --molname, --begin, --end are specified\n"); | 
| 150 | 
  | 
      painCave.severity = OPENMD_ERROR; | 
| 151 | 
  | 
      painCave.isFatal = 1; | 
| 152 | 
< | 
      simError();         | 
| 171 | 
< | 
       | 
| 152 | 
> | 
      simError(); | 
| 153 | 
  | 
    } | 
| 154 | 
  | 
  } | 
| 155 | 
  | 
   | 
| 156 | 
  | 
  //parse md file and set up the system | 
| 157 | 
  | 
  SimCreator creator; | 
| 177 | 
– | 
  std::cout << "dumpFile = " << dumpFileName << "\n"; | 
| 158 | 
  | 
  SimInfo* info = creator.createSim(dumpFileName); | 
| 159 | 
  | 
 | 
| 160 | 
  | 
  RealType maxLen; | 
| 191 | 
  | 
                              args_info.nanglebins_arg); | 
| 192 | 
  | 
  } else if (args_info.gxyz_given) { | 
| 193 | 
  | 
    if (args_info.refsele_given) { | 
| 194 | 
< | 
      analyser= new GofXyz(info, dumpFileName, sele1, sele2,args_info.refsele_arg,  | 
| 195 | 
< | 
                           maxLen, args_info.nbins_arg);         | 
| 194 | 
> | 
      analyser= new GofXyz(info, dumpFileName, sele1, sele2, | 
| 195 | 
> | 
                           args_info.refsele_arg, maxLen, args_info.nbins_arg); | 
| 196 | 
  | 
    } else { | 
| 197 | 
  | 
      sprintf( painCave.errMsg, | 
| 198 | 
  | 
               "--refsele must set when --gxyz is used"); | 
| 257 | 
  | 
    } | 
| 258 | 
  | 
  } else if (args_info.tet_param_z_given) { | 
| 259 | 
  | 
    if (args_info.rcut_given) {    | 
| 260 | 
< | 
      analyser = new TetrahedralityParamZ(info, dumpFileName, sele1,  | 
| 261 | 
< | 
                                         args_info.rcut_arg,  | 
| 262 | 
< | 
                                         args_info.nbins_arg); | 
| 260 | 
> | 
      analyser = new TetrahedralityParamZ(info, dumpFileName, sele1, sele2, | 
| 261 | 
> | 
                                          args_info.rcut_arg,  | 
| 262 | 
> | 
                                          args_info.nbins_arg); | 
| 263 | 
  | 
    } else { | 
| 264 | 
  | 
      sprintf( painCave.errMsg, | 
| 265 | 
  | 
               "A cutoff radius (rcut) must be specified when calculating Tetrahedrality Parameters"); | 
| 280 | 
  | 
    } | 
| 281 | 
  | 
  } else if (args_info.bad_given){ | 
| 282 | 
  | 
    if (args_info.rcut_given) { | 
| 283 | 
< | 
      analyser = new BondAngleDistribution(info, dumpFileName, sele1, args_info.rcut_arg, | 
| 283 | 
> | 
      analyser = new BondAngleDistribution(info, dumpFileName, sele1,  | 
| 284 | 
> | 
                                           args_info.rcut_arg, | 
| 285 | 
  | 
                                           args_info.nbins_arg); | 
| 286 | 
  | 
    } else { | 
| 287 | 
  | 
      sprintf( painCave.errMsg, | 
| 289 | 
  | 
      painCave.severity = OPENMD_ERROR; | 
| 290 | 
  | 
      painCave.isFatal = 1; | 
| 291 | 
  | 
      simError(); | 
| 292 | 
< | 
      } | 
| 292 | 
> | 
    } | 
| 293 | 
  | 
  } else if (args_info.scd_given) { | 
| 294 | 
  | 
    if (batchMode) { | 
| 295 | 
< | 
      analyser  = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg,  | 
| 295 | 
> | 
      analyser  = new SCDOrderParameter(info, dumpFileName,  | 
| 296 | 
> | 
                                        args_info.molname_arg,  | 
| 297 | 
  | 
                                        args_info.begin_arg, args_info.end_arg); | 
| 298 | 
  | 
    } else{ | 
| 299 | 
  | 
      std::string sele3 = args_info.sele3_arg; | 
| 300 | 
< | 
      analyser  = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); | 
| 300 | 
> | 
      analyser  = new SCDOrderParameter(info, dumpFileName,  | 
| 301 | 
> | 
                                        sele1, sele2, sele3); | 
| 302 | 
  | 
    } | 
| 303 | 
  | 
  }else if (args_info.density_given) { | 
| 304 | 
  | 
    analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, | 
| 307 | 
  | 
    analyser = new ObjectCount(info, dumpFileName, sele1 ); | 
| 308 | 
  | 
  } else if (args_info.slab_density_given) { | 
| 309 | 
  | 
    analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 310 | 
+ | 
  } else if (args_info.rnemdz_given) { | 
| 311 | 
+ | 
    analyser = new RNEMDZ(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 312 | 
+ | 
  } else if (args_info.rnemdr_given) { | 
| 313 | 
+ | 
    analyser = new RNEMDR(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 314 | 
  | 
  } else if (args_info.p_angle_given) { | 
| 315 | 
  | 
    analyser = new pAngle(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 316 | 
  | 
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) | 
| 335 | 
  | 
  } else if (args_info.angle_r_given) { | 
| 336 | 
  | 
    analyser = new AngleR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg); | 
| 337 | 
  | 
  } | 
| 338 | 
< | 
     | 
| 338 | 
> | 
   | 
| 339 | 
  | 
  if (args_info.output_given) { | 
| 340 | 
  | 
    analyser->setOutputName(args_info.output_arg); | 
| 341 | 
  | 
  } | 
| 342 | 
  | 
  if (args_info.step_given) { | 
| 343 | 
  | 
    analyser->setStep(args_info.step_arg); | 
| 344 | 
  | 
  } | 
| 345 | 
< | 
  | 
| 345 | 
> | 
   | 
| 346 | 
  | 
  analyser->process(); | 
| 347 | 
  | 
   | 
| 348 | 
  | 
  delete analyser;     | 
| 349 | 
  | 
  delete info; | 
| 350 | 
< | 
 | 
| 350 | 
> | 
   | 
| 351 | 
  | 
  return 0;    | 
| 352 | 
  | 
} | 
| 366 | 
– | 
 |