--- trunk/src/applications/staticProps/StaticProps.cpp 2006/11/10 18:45:29 1091 +++ trunk/src/applications/staticProps/StaticProps.cpp 2009/11/25 20:02:06 1390 @@ -6,19 +6,10 @@ * redistribute this software in source and binary code form, provided * that the following conditions are met: * - * 1. Acknowledgement of the program authors must be made in any - * publication of scientific results based in part on use of the - * program. An acceptable form of acknowledgement is citation of - * the article in which the program was described (Matthew - * A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher - * J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented - * Parallel Simulation Engine for Molecular Dynamics," - * J. Comput. Chem. 26, pp. 252-271 (2005)) - * - * 2. Redistributions of source code must retain the above copyright + * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - * 3. Redistributions in binary form must reproduce the above copyright + * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. @@ -37,6 +28,15 @@ * arising out of the use of or inability to use software, even if the * University of Notre Dame has been advised of the possibility of * such damages. + * + * SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your + * research, please cite the appropriate papers when you publish your + * work. Good starting points are: + * + * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). + * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). + * [4] Vardeman & Gezelter, in progress (2009). */ #include @@ -52,21 +52,25 @@ #include "applications/staticProps/StaticPropsCmd.h" #include "applications/staticProps/StaticAnalyser.hpp" #include "applications/staticProps/GofR.hpp" +#include "applications/staticProps/GofZ.hpp" #include "applications/staticProps/GofRAngle.hpp" #include "applications/staticProps/GofAngle2.hpp" #include "applications/staticProps/GofXyz.hpp" #include "applications/staticProps/P2OrderParameter.hpp" #include "applications/staticProps/BondOrderParameter.hpp" +#include "applications/staticProps/BOPofR.hpp" #include "applications/staticProps/RippleOP.hpp" #include "applications/staticProps/SCDOrderParameter.hpp" #include "applications/staticProps/DensityPlot.hpp" #include "applications/staticProps/RhoZ.hpp" +#include "applications/staticProps/BondAngleDistribution.hpp" +#include "applications/staticProps/NanoVolume.hpp" #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) #include "applications/staticProps/Hxy.hpp" #endif #include "applications/staticProps/RhoR.hpp" -using namespace oopse; +using namespace OpenMD; int main(int argc, char* argv[]){ @@ -93,7 +97,7 @@ int main(int argc, char* argv[]){ if (args_info.sele1_given) { sele1 = args_info.sele1_arg; } else { - char* sele1Env= getenv("OOPSE_SELE1"); + char* sele1Env= getenv("SELECTION1"); if (sele1Env) { sele1 = sele1Env; } else { @@ -107,7 +111,7 @@ int main(int argc, char* argv[]){ if (args_info.sele2_given) { sele2 = args_info.sele2_arg; } else { - char* sele2Env = getenv("OOPSE_SELE2"); + char* sele2Env = getenv("SELECTION1"); if (sele2Env) { sele2 = sele2Env; } else { @@ -119,8 +123,8 @@ int main(int argc, char* argv[]){ // Problems if sele1 wasn't specified, but // if (!args_info.scd_given) { // sprintf( painCave.errMsg, -// "neither --sele1 option nor $OOPSE_SELE1 is set"); -// painCave.severity = OOPSE_ERROR; +// "neither --sele1 option nor $SELECTION1 is set"); +// painCave.severity = OPENMD_ERROR; // painCave.isFatal = 1; // simError(); // } @@ -130,8 +134,8 @@ int main(int argc, char* argv[]){ // if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given) { // sprintf( painCave.errMsg, -// "neither --sele2 option nor $OOPSE_SELE2 is set"); -// painCave.severity = OOPSE_ERROR; +// "neither --sele2 option nor $SELECTION1 is set"); +// painCave.severity = OPENMD_ERROR; // painCave.isFatal = 1; // simError(); // } @@ -146,7 +150,7 @@ int main(int argc, char* argv[]){ sprintf( painCave.errMsg, "below conditions are not satisfied:\n" "0 <= begin && 0<= end && begin <= end-2\n"); - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; painCave.isFatal = 1; simError(); } @@ -155,7 +159,7 @@ int main(int argc, char* argv[]){ sprintf( painCave.errMsg, "either --sele1, --sele2, --sele3 are specified," " or --molname, --begin, --end are specified\n"); - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; painCave.isFatal = 1; simError(); @@ -179,6 +183,9 @@ int main(int argc, char* argv[]){ if (args_info.gofr_given){ analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen, args_info.nbins_arg); + } else if (args_info.gofz_given) { + analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen, + args_info.nbins_arg); } else if (args_info.r_theta_given) { analyser = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, args_info.nbins_arg, args_info.nanglebins_arg); @@ -195,7 +202,7 @@ int main(int argc, char* argv[]){ } else { sprintf( painCave.errMsg, "--refsele must set when --gxyz is used"); - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; painCave.isFatal = 1; simError(); } @@ -211,10 +218,32 @@ int main(int argc, char* argv[]){ } else { sprintf( painCave.errMsg, "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; painCave.isFatal = 1; simError(); } + } else if (args_info.bor_given){ + if (args_info.rcut_given) { + analyser = new BOPofR(info, dumpFileName, sele1, args_info.rcut_arg, + args_info.nbins_arg, maxLen); + } else { + sprintf( painCave.errMsg, + "A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } + } else if (args_info.bad_given){ + if (args_info.rcut_given) { + analyser = new BondAngleDistribution(info, dumpFileName, sele1, args_info.rcut_arg, + args_info.nbins_arg); + } else { + sprintf( painCave.errMsg, + "A cutoff radius (rcut) must be specified when calculating Bond Angle Distributions"); + painCave.severity = OPENMD_ERROR; + painCave.isFatal = 1; + simError(); + } } else if (args_info.scd_given) { if (batchMode) { analyser = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg, @@ -224,11 +253,10 @@ int main(int argc, char* argv[]){ analyser = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); } }else if (args_info.density_given) { - analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, + analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, args_info.nbins_arg); } else if (args_info.slab_density_given) { - Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat(); - analyser = new RhoZ(info, dumpFileName, sele1, hmat(2, 2), args_info.nbins_arg); + analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg); #if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) }else if (args_info.hxy_given) { analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg, @@ -240,10 +268,12 @@ int main(int argc, char* argv[]){ }else{ sprintf( painCave.errMsg, "A particle radius (radius) must be specified when calculating Rho(r)"); - painCave.severity = OOPSE_ERROR; + painCave.severity = OPENMD_ERROR; painCave.isFatal = 1; simError(); } + }else if (args_info.hullvol_given) { + analyser = new NanoVolume(info, dumpFileName, sele1); } if (args_info.output_given) {