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 1180 by chuckv, Mon Sep 17 20:05:51 2007 UTC vs.
Revision 1413 by gezelter, Mon Mar 22 19:21:22 2010 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
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).          
39 + * [4]  Vardeman & Gezelter, in progress (2009).                        
40   */
41  
42   #include <iostream>
# Line 52 | Line 52
52   #include "applications/staticProps/StaticPropsCmd.h"
53   #include "applications/staticProps/StaticAnalyser.hpp"
54   #include "applications/staticProps/GofR.hpp"
55 + #include "applications/staticProps/GofZ.hpp"
56   #include "applications/staticProps/GofRAngle.hpp"
57   #include "applications/staticProps/GofAngle2.hpp"
58   #include "applications/staticProps/GofXyz.hpp"
# Line 62 | Line 63
63   #include "applications/staticProps/SCDOrderParameter.hpp"
64   #include "applications/staticProps/DensityPlot.hpp"
65   #include "applications/staticProps/RhoZ.hpp"
66 + #include "applications/staticProps/pAngle.hpp"
67   #include "applications/staticProps/BondAngleDistribution.hpp"
68   #include "applications/staticProps/NanoVolume.hpp"
69   #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H)
# Line 69 | Line 71
71   #endif
72   #include "applications/staticProps/RhoR.hpp"
73  
74 < using namespace oopse;
74 > using namespace OpenMD;
75  
76   int main(int argc, char* argv[]){
77    
# Line 96 | Line 98 | int main(int argc, char* argv[]){
98    if (args_info.sele1_given) {
99      sele1 = args_info.sele1_arg;
100    } else {
101 <    char*  sele1Env= getenv("OOPSE_SELE1");
101 >    char*  sele1Env= getenv("SELECTION1");
102      if (sele1Env) {
103        sele1 = sele1Env;
104      } else {
# Line 110 | Line 112 | int main(int argc, char* argv[]){
112    if (args_info.sele2_given) {
113      sele2 = args_info.sele2_arg;
114    } else {
115 <    char* sele2Env = getenv("OOPSE_SELE2");
115 >    char* sele2Env = getenv("SELECTION1");
116      if (sele2Env) {
117        sele2 = sele2Env;            
118      } else {
# Line 122 | Line 124 | int main(int argc, char* argv[]){
124    // Problems if sele1 wasn't specified, but
125   // if (!args_info.scd_given) {
126   //       sprintf( painCave.errMsg,
127 < //                "neither --sele1 option nor $OOPSE_SELE1 is set");
128 < //       painCave.severity = OOPSE_ERROR;
127 > //                "neither --sele1 option nor $SELECTION1 is set");
128 > //       painCave.severity = OPENMD_ERROR;
129   //       painCave.isFatal = 1;
130   //       simError();
131   //     }
# Line 133 | Line 135 | int main(int argc, char* argv[]){
135  
136   //     if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given)  {
137   //       sprintf( painCave.errMsg,
138 < //                "neither --sele2 option nor $OOPSE_SELE2 is set");
139 < //       painCave.severity = OOPSE_ERROR;
138 > //                "neither --sele2 option nor $SELECTION1 is set");
139 > //       painCave.severity = OPENMD_ERROR;
140   //       painCave.isFatal = 1;
141   //       simError();        
142   //     }
# Line 149 | Line 151 | int main(int argc, char* argv[]){
151          sprintf( painCave.errMsg,
152                   "below conditions are not satisfied:\n"
153                   "0 <= begin && 0<= end && begin <= end-2\n");
154 <        painCave.severity = OOPSE_ERROR;
154 >        painCave.severity = OPENMD_ERROR;
155          painCave.isFatal = 1;
156          simError();                    
157        }
# Line 158 | Line 160 | int main(int argc, char* argv[]){
160        sprintf( painCave.errMsg,
161                 "either --sele1, --sele2, --sele3 are specified,"
162                 " or --molname, --begin, --end are specified\n");
163 <      painCave.severity = OOPSE_ERROR;
163 >      painCave.severity = OPENMD_ERROR;
164        painCave.isFatal = 1;
165        simError();        
166      
# Line 182 | Line 184 | int main(int argc, char* argv[]){
184    if (args_info.gofr_given){
185      analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen,
186                         args_info.nbins_arg);        
187 +  } else if (args_info.gofz_given) {
188 +    analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen,
189 +                       args_info.nbins_arg);
190    } else if (args_info.r_theta_given) {
191      analyser  = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen,
192                                args_info.nbins_arg, args_info.nanglebins_arg);
# Line 198 | Line 203 | int main(int argc, char* argv[]){
203      } else {
204        sprintf( painCave.errMsg,
205                 "--refsele must set when --gxyz is used");
206 <      painCave.severity = OOPSE_ERROR;
206 >      painCave.severity = OPENMD_ERROR;
207        painCave.isFatal = 1;
208        simError();  
209      }
# Line 214 | Line 219 | int main(int argc, char* argv[]){
219      } else {
220        sprintf( painCave.errMsg,
221                 "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters");
222 <      painCave.severity = OOPSE_ERROR;
222 >      painCave.severity = OPENMD_ERROR;
223        painCave.isFatal = 1;
224        simError();
225      }
# Line 225 | Line 230 | int main(int argc, char* argv[]){
230      } else {
231        sprintf( painCave.errMsg,
232                 "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters");
233 <      painCave.severity = OOPSE_ERROR;
233 >      painCave.severity = OPENMD_ERROR;
234        painCave.isFatal = 1;
235        simError();
236      }
# Line 236 | Line 241 | int main(int argc, char* argv[]){
241      } else {
242        sprintf( painCave.errMsg,
243                 "A cutoff radius (rcut) must be specified when calculating Bond Angle Distributions");
244 <      painCave.severity = OOPSE_ERROR;
244 >      painCave.severity = OPENMD_ERROR;
245        painCave.isFatal = 1;
246        simError();
247      }
# Line 249 | Line 254 | int main(int argc, char* argv[]){
254        analyser  = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3);
255      }
256    }else if (args_info.density_given) {
257 <    analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen,
257 >    analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen,
258                                args_info.nbins_arg);  
259    } else if (args_info.slab_density_given) {
260 <    Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat();
261 <    analyser = new RhoZ(info, dumpFileName, sele1, hmat(2, 2), args_info.nbins_arg);
260 >    analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg);
261 >  } else if (args_info.p_angle_given) {
262 >    analyser = new pAngle(info, dumpFileName, sele1, args_info.nbins_arg);
263   #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H)
264    }else if (args_info.hxy_given) {
265      analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg,
# Line 265 | Line 271 | int main(int argc, char* argv[]){
271      }else{
272        sprintf( painCave.errMsg,
273                 "A particle radius (radius) must be specified when calculating Rho(r)");
274 <      painCave.severity = OOPSE_ERROR;
274 >      painCave.severity = OPENMD_ERROR;
275        painCave.isFatal = 1;
276        simError();
277      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines