--- trunk/src/applications/staticProps/NanoLength.cpp 2012/08/22 02:28:28 1782 +++ trunk/src/applications/staticProps/NanoLength.cpp 2015/03/07 21:41:51 2071 @@ -34,7 +34,7 @@ * * [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). + * [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). */ @@ -54,24 +54,25 @@ NanoLength::NanoLength(SimInfo* info, NanoLength::NanoLength(SimInfo* info, const std::string& filename, const std::string& sele) - : StaticAnalyser(info, filename), selectionScript_(sele), evaluator_(info), seleMan_(info) { + : StaticAnalyser(info, filename), selectionScript_(sele), seleMan_(info), + evaluator_(info) { + setOutputName(getPrefix(filename) + ".length"); osq.open(getOutputFileName().c_str()); - + evaluator_.loadScriptString(sele); if (!evaluator_.isDynamic()) { seleMan_.setSelectionSet(evaluator_.evaluate()); } frameCounter_ = 0; -} + } void NanoLength::process() { Molecule* mol; RigidBody* rb; SimInfo::MoleculeIterator mi; Molecule::RigidBodyIterator rbIter; - Molecule::AtomIterator ai; StuntDouble* sd; Vector3d vec; int i; @@ -119,6 +120,7 @@ void NanoLength::process() { osq << time << "\t" << rodLength << std::endl; } } + osq.close(); } RealType NanoLength::getLength(std::vector atoms) {