ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/staticProps/StaticProps.cpp
(Generate patch)

Comparing trunk/src/applications/staticProps/StaticProps.cpp (file contents):
Revision 1522 by kstocke1, Fri Nov 19 20:26:36 2010 UTC vs.
Revision 1785 by jmichalk, Wed Aug 22 18:43:27 2012 UTC

# Line 36 | Line 36
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).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
43   #include <iostream>
44   #include <fstream>
45   #include <string>
46  
46 #include "brains/Register.hpp"
47   #include "brains/SimCreator.hpp"
48   #include "brains/SimInfo.hpp"
49   #include "io/DumpReader.hpp"
# Line 69 | Line 69
69   #include "applications/staticProps/pAngle.hpp"
70   #include "applications/staticProps/BondAngleDistribution.hpp"
71   #include "applications/staticProps/NanoVolume.hpp"
72 + #include "applications/staticProps/NanoLength.hpp"
73   #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H)
74   #include "applications/staticProps/Hxy.hpp"
75   #endif
76   #include "applications/staticProps/RhoR.hpp"
77   #include "applications/staticProps/AngleR.hpp"
77 #include "applications/staticProps/RhoAngleR.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[]){
83    
84  //register force fields
85  registerForceFields();
84    
85    gengetopt_args_info args_info;
86    
# Line 95 | Line 93 | int main(int argc, char* argv[]){
93    std::string dumpFileName = args_info.input_arg;
94    std::string sele1;
95    std::string sele2;
98  bool userSpecifiedSelect1;
99  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"
# Line 122 | Line 118 | int main(int argc, char* argv[]){
118      if (sele2Env) {
119        sele2 = sele2Env;            
120      } else {
121 <      sele2 = "select all";
121 >      //It seems likely (from previous discussions) that if sele2 is not specified, then the default behavior
122 >      //should not be 'select all' but rather what is already intended for sele1
123 >      //JRM 8/22/12
124 >      sele2 = sele1;
125 >      //sele2 = "select all";
126      }
127    }
128    
# Line 233 | Line 233 | int main(int argc, char* argv[]){
233        simError();
234      }    
235    } else if (args_info.p2_given) {
236 <    analyser  = new P2OrderParameter(info, dumpFileName, sele1, sele2);
236 >    if (args_info.sele1_given) {    
237 >      if (args_info.sele2_given)
238 >        analyser  = new P2OrderParameter(info, dumpFileName, sele1, sele2);
239 >      else
240 >        analyser  = new P2OrderParameter(info, dumpFileName, sele1);
241 >    } else {
242 >      sprintf( painCave.errMsg,
243 >               "At least one selection script (--sele1) must be specified when calculating P2 order parameters");
244 >      painCave.severity = OPENMD_ERROR;
245 >      painCave.isFatal = 1;
246 >      simError();
247 >    }
248    } else if (args_info.rp2_given){
249      analyser = new RippleOP(info, dumpFileName, sele1, sele2);
250    } else if (args_info.bo_given){
# Line 261 | Line 272 | int main(int argc, char* argv[]){
272        painCave.isFatal = 1;
273        simError();
274      }
275 +  } else if (args_info.tet_param_z_given) {
276 +    if (args_info.rcut_given) {  
277 +      analyser = new TetrahedralityParamZ(info, dumpFileName, sele1,
278 +                                         args_info.rcut_arg,
279 +                                         args_info.nbins_arg);
280 +    } else {
281 +      sprintf( painCave.errMsg,
282 +               "A cutoff radius (rcut) must be specified when calculating Tetrahedrality Parameters");
283 +      painCave.severity = OPENMD_ERROR;
284 +      painCave.isFatal = 1;
285 +      simError();
286 +    }
287    } else if (args_info.bor_given){
288      if (args_info.rcut_given) {
289        analyser = new BOPofR(info, dumpFileName, sele1, args_info.rcut_arg,
# Line 317 | Line 340 | int main(int argc, char* argv[]){
340      }
341    } else if (args_info.hullvol_given) {
342      analyser = new NanoVolume(info, dumpFileName, sele1);
343 +  } else if (args_info.rodlength_given) {
344 +    analyser = new NanoLength(info, dumpFileName, sele1);
345    } else if (args_info.angle_r_given) {
346      analyser = new AngleR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg);
347    }
# Line 327 | Line 352 | int main(int argc, char* argv[]){
352    if (args_info.step_given) {
353      analyser->setStep(args_info.step_arg);
354    }
355 <  
355 >
356    analyser->process();
357    
358    delete analyser;    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines