| 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. | 
| 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> | 
| 53 |  | #include "applications/staticProps/StaticAnalyser.hpp" | 
| 54 |  | #include "applications/staticProps/GofR.hpp" | 
| 55 |  | #include "applications/staticProps/GofZ.hpp" | 
| 56 | + | #include "applications/staticProps/GofRZ.hpp" | 
| 57 |  | #include "applications/staticProps/GofRAngle.hpp" | 
| 58 |  | #include "applications/staticProps/GofAngle2.hpp" | 
| 59 |  | #include "applications/staticProps/GofXyz.hpp" | 
| 64 |  | #include "applications/staticProps/SCDOrderParameter.hpp" | 
| 65 |  | #include "applications/staticProps/DensityPlot.hpp" | 
| 66 |  | #include "applications/staticProps/RhoZ.hpp" | 
| 67 | + | #include "applications/staticProps/pAngle.hpp" | 
| 68 |  | #include "applications/staticProps/BondAngleDistribution.hpp" | 
| 69 |  | #include "applications/staticProps/NanoVolume.hpp" | 
| 70 |  | #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) | 
| 72 |  | #endif | 
| 73 |  | #include "applications/staticProps/RhoR.hpp" | 
| 74 |  |  | 
| 75 | < | using namespace oopse; | 
| 75 | > | using namespace OpenMD; | 
| 76 |  |  | 
| 77 |  | int main(int argc, char* argv[]){ | 
| 78 |  |  | 
| 99 |  | if (args_info.sele1_given) { | 
| 100 |  | sele1 = args_info.sele1_arg; | 
| 101 |  | } else { | 
| 102 | < | char*  sele1Env= getenv("OOPSE_SELE1"); | 
| 102 | > | char*  sele1Env= getenv("SELECTION1"); | 
| 103 |  | if (sele1Env) { | 
| 104 |  | sele1 = sele1Env; | 
| 105 |  | } else { | 
| 113 |  | if (args_info.sele2_given) { | 
| 114 |  | sele2 = args_info.sele2_arg; | 
| 115 |  | } else { | 
| 116 | < | char* sele2Env = getenv("OOPSE_SELE2"); | 
| 116 | > | char* sele2Env = getenv("SELECTION1"); | 
| 117 |  | if (sele2Env) { | 
| 118 |  | sele2 = sele2Env; | 
| 119 |  | } else { | 
| 125 |  | // Problems if sele1 wasn't specified, but | 
| 126 |  | // if (!args_info.scd_given) { | 
| 127 |  | //       sprintf( painCave.errMsg, | 
| 128 | < | //                "neither --sele1 option nor $OOPSE_SELE1 is set"); | 
| 129 | < | //       painCave.severity = OOPSE_ERROR; | 
| 128 | > | //                "neither --sele1 option nor $SELECTION1 is set"); | 
| 129 | > | //       painCave.severity = OPENMD_ERROR; | 
| 130 |  | //       painCave.isFatal = 1; | 
| 131 |  | //       simError(); | 
| 132 |  | //     } | 
| 136 |  |  | 
| 137 |  | //     if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given)  { | 
| 138 |  | //       sprintf( painCave.errMsg, | 
| 139 | < | //                "neither --sele2 option nor $OOPSE_SELE2 is set"); | 
| 140 | < | //       painCave.severity = OOPSE_ERROR; | 
| 139 | > | //                "neither --sele2 option nor $SELECTION1 is set"); | 
| 140 | > | //       painCave.severity = OPENMD_ERROR; | 
| 141 |  | //       painCave.isFatal = 1; | 
| 142 |  | //       simError(); | 
| 143 |  | //     } | 
| 152 |  | sprintf( painCave.errMsg, | 
| 153 |  | "below conditions are not satisfied:\n" | 
| 154 |  | "0 <= begin && 0<= end && begin <= end-2\n"); | 
| 155 | < | painCave.severity = OOPSE_ERROR; | 
| 155 | > | painCave.severity = OPENMD_ERROR; | 
| 156 |  | painCave.isFatal = 1; | 
| 157 |  | simError(); | 
| 158 |  | } | 
| 161 |  | sprintf( painCave.errMsg, | 
| 162 |  | "either --sele1, --sele2, --sele3 are specified," | 
| 163 |  | " or --molname, --begin, --end are specified\n"); | 
| 164 | < | painCave.severity = OOPSE_ERROR; | 
| 164 | > | painCave.severity = OPENMD_ERROR; | 
| 165 |  | painCave.isFatal = 1; | 
| 166 |  | simError(); | 
| 167 |  |  | 
| 186 |  | analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen, | 
| 187 |  | args_info.nbins_arg); | 
| 188 |  | } else if (args_info.gofz_given) { | 
| 189 | < | analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen, | 
| 190 | < | args_info.nbins_arg); | 
| 189 | > | analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen, | 
| 190 | > | args_info.nbins_arg); | 
| 191 | > | } else if (args_info.r_z_given) { | 
| 192 | > | analyser  = new GofRZ(info, dumpFileName, sele1, sele2, maxLen, | 
| 193 | > | args_info.nbins_arg, args_info.nbins_z_arg); | 
| 194 |  | } else if (args_info.r_theta_given) { | 
| 195 |  | analyser  = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, | 
| 196 |  | args_info.nbins_arg, args_info.nanglebins_arg); | 
| 207 |  | } else { | 
| 208 |  | sprintf( painCave.errMsg, | 
| 209 |  | "--refsele must set when --gxyz is used"); | 
| 210 | < | painCave.severity = OOPSE_ERROR; | 
| 210 | > | painCave.severity = OPENMD_ERROR; | 
| 211 |  | painCave.isFatal = 1; | 
| 212 |  | simError(); | 
| 213 |  | } | 
| 223 |  | } else { | 
| 224 |  | sprintf( painCave.errMsg, | 
| 225 |  | "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); | 
| 226 | < | painCave.severity = OOPSE_ERROR; | 
| 226 | > | painCave.severity = OPENMD_ERROR; | 
| 227 |  | painCave.isFatal = 1; | 
| 228 |  | simError(); | 
| 229 |  | } | 
| 234 |  | } else { | 
| 235 |  | sprintf( painCave.errMsg, | 
| 236 |  | "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); | 
| 237 | < | painCave.severity = OOPSE_ERROR; | 
| 237 | > | painCave.severity = OPENMD_ERROR; | 
| 238 |  | painCave.isFatal = 1; | 
| 239 |  | simError(); | 
| 240 |  | } | 
| 245 |  | } else { | 
| 246 |  | sprintf( painCave.errMsg, | 
| 247 |  | "A cutoff radius (rcut) must be specified when calculating Bond Angle Distributions"); | 
| 248 | < | painCave.severity = OOPSE_ERROR; | 
| 248 | > | painCave.severity = OPENMD_ERROR; | 
| 249 |  | painCave.isFatal = 1; | 
| 250 |  | simError(); | 
| 251 |  | } | 
| 258 |  | analyser  = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); | 
| 259 |  | } | 
| 260 |  | }else if (args_info.density_given) { | 
| 261 | < | analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, | 
| 261 | > | analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, | 
| 262 |  | args_info.nbins_arg); | 
| 263 |  | } else if (args_info.slab_density_given) { | 
| 264 | < | Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat(); | 
| 265 | < | analyser = new RhoZ(info, dumpFileName, sele1, hmat(2, 2), args_info.nbins_arg); | 
| 264 | > | analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 265 | > | } else if (args_info.p_angle_given) { | 
| 266 | > | analyser = new pAngle(info, dumpFileName, sele1, args_info.nbins_arg); | 
| 267 |  | #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) | 
| 268 |  | }else if (args_info.hxy_given) { | 
| 269 |  | analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg, | 
| 275 |  | }else{ | 
| 276 |  | sprintf( painCave.errMsg, | 
| 277 |  | "A particle radius (radius) must be specified when calculating Rho(r)"); | 
| 278 | < | painCave.severity = OOPSE_ERROR; | 
| 278 | > | painCave.severity = OPENMD_ERROR; | 
| 279 |  | painCave.isFatal = 1; | 
| 280 |  | simError(); | 
| 281 |  | } |