ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/staticProps/NanoLength.cpp
(Generate patch)

Comparing trunk/src/applications/staticProps/NanoLength.cpp (file contents):
Revision 1585 by gezelter, Sun Jun 19 17:51:15 2011 UTC vs.
Revision 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 34 | Line 34
34   *                                                                      
35   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
36   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
37 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 < * [4]  Vardeman & Gezelter, in progress (2009).                        
37 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
38 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
39 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
40   */
41  
42   #include "applications/staticProps/NanoLength.hpp"
# Line 53 | Line 54 | NanoLength::NanoLength(SimInfo* info,
54   NanoLength::NanoLength(SimInfo* info,
55                         const std::string& filename,
56                         const std::string& sele)
57 <  : StaticAnalyser(info, filename), selectionScript_(sele), evaluator_(info), seleMan_(info) {
57 >  : StaticAnalyser(info, filename), selectionScript_(sele), seleMan_(info),
58 >    evaluator_(info) {
59 >  
60    setOutputName(getPrefix(filename) + ".length");
61    
62    osq.open(getOutputFileName().c_str());
63 <
63 >  
64    evaluator_.loadScriptString(sele);
65    if (!evaluator_.isDynamic()) {
66      seleMan_.setSelectionSet(evaluator_.evaluate());
67    }
68    frameCounter_ = 0;
69 < }
69 >    }
70  
71   void NanoLength::process() {
72    Molecule* mol;
70  Atom* atom;
73    RigidBody* rb;
72  int myIndex;
74    SimInfo::MoleculeIterator mi;
75    Molecule::RigidBodyIterator rbIter;
75  Molecule::AtomIterator ai;
76    StuntDouble* sd;
77    Vector3d vec;
78 <  int i,j;
78 >  int i;
79    
80    DumpReader reader(info_, dumpFilename_);
81    int nFrames = reader.getNFrames();
# Line 120 | Line 120 | void NanoLength::process() {
120        osq << time << "\t" << rodLength << std::endl;      
121      }
122    }
123 +  osq.close();
124   }
125      
126   RealType NanoLength::getLength(std::vector<StuntDouble*> atoms) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines