--- trunk/src/applications/staticProps/P2OrderParameter.hpp 2009/11/25 20:02:06 1390 +++ trunk/src/applications/staticProps/P2OrderParameter.hpp 2013/06/16 15:15:42 1879 @@ -35,8 +35,9 @@ * * [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). + * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ #ifndef APPLICATIONS_STATICPROPS_P2ORDERPARAMETER_HPP #define APPLICATIONS_STATICPROPS_P2ORDERPARAMETER_HPP @@ -44,34 +45,44 @@ #include "selection/SelectionManager.hpp" #include "applications/staticProps/StaticAnalyser.hpp" +using namespace std; namespace OpenMD { - class P2OrderParameter : public StaticAnalyser{ - public: - P2OrderParameter(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2); - virtual void process(); - - private: - - struct OrderParam{ - RealType p2; - Vector3d director; - RealType angle; - }; - void writeP2(); - - Snapshot* currentSnapshot_; - - std::string selectionScript1_; - std::string selectionScript2_; - SelectionManager seleMan1_; - SelectionManager seleMan2_; - SelectionEvaluator evaluator1_; - SelectionEvaluator evaluator2_; - std::vector > sdPairs_; /**< each pair is used to define a vector, vector = first - second */ - std::vector orderParams_; - + class P2OrderParameter : public StaticAnalyser{ + public: + P2OrderParameter(SimInfo* info, const string& filename, + const string& sele1); + P2OrderParameter(SimInfo* info, const string& filename, + const string& sele1, const string& sele2); + P2OrderParameter(SimInfo* info, const string& filename, + const string& sele1, const int seleOffset); + virtual void process(); + + private: + + struct OrderParam{ + RealType p2; + Vector3d director; + RealType angle; }; + + void writeP2(); + + Snapshot* currentSnapshot_; + + bool doVect_; + bool doOffset_; + string selectionScript1_; + string selectionScript2_; + SelectionManager seleMan1_; + SelectionManager seleMan2_; + SelectionEvaluator evaluator1_; + SelectionEvaluator evaluator2_; + int seleOffset_; + + vector orderParams_; + + }; } #endif