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

Comparing trunk/src/applications/dump2Xyz/Dump2XYZ.cpp (file contents):
Revision 1212 by xsun, Wed Jan 23 21:21:13 2008 UTC vs.
Revision 1303 by cli2, Mon Oct 13 21:35:22 2008 UTC

# Line 127 | Line 127 | int main(int argc, char* argv[]){
127    DefaultAtomVisitor* defaultAtomVisitor = new DefaultAtomVisitor(info);
128    compositeVisitor->addVisitor(defaultAtomVisitor, 700);
129    
130 <  //create waterType visitor
131 <  if(args_info.watertype_flag){
132 <    WaterTypeVisitor* waterTypeVisitor = new WaterTypeVisitor;
133 <    compositeVisitor->addVisitor(waterTypeVisitor, 600);
130 >  // if we gave the -w option, we want to skip the waters:
131 >  std::cerr << "-w flag was set to:" << args_info.water_given << "\n";
132 >  if (!args_info.water_given) {
133 >    //create waterType visitor
134 >    if(args_info.watertype_flag){
135 >      WaterTypeVisitor* waterTypeVisitor = new WaterTypeVisitor;
136 >      compositeVisitor->addVisitor(waterTypeVisitor, 600);
137 >    }
138    }
139  
140    if (args_info.basetype_flag) {
# Line 200 | Line 204 | int main(int argc, char* argv[]){
204    int nframes = dumpReader->getNFrames();
205    
206    
207 <  std::ofstream xyzStream;    
204 <  xyzStream .open(xyzFileName.c_str());
207 >  std::ofstream xyzStream(xyzFileName.c_str());
208    
206  
209    SimInfo::MoleculeIterator miter;
210    Molecule::IntegrableObjectIterator  iiter;
211    Molecule::RigidBodyIterator rbIter;
# Line 266 | Line 268 | int main(int argc, char* argv[]){
268      xyzVisitor->clear();
269      
270    }//end for (int i = 0; i < nframes; i += args_info.frame_arg)
271 <  
271 >
272    xyzStream.close();
271  
273    delete prepareVisitor;
274    delete compositeVisitor;
275    delete info;
275  
276   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines