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

Comparing branches/development/src/applications/dump2Xyz/Dump2XYZ.cpp (file contents):
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
Revision 1725 by gezelter, Sat May 26 18:13:43 2012 UTC

# Line 64 | Line 64 | using namespace OpenMD;
64  
65   using namespace OpenMD;
66  
67 + using namespace std;
68   int main(int argc, char* argv[]){
69    
69  //register force fields
70  registerForceFields();
71  
70    gengetopt_args_info args_info;
71 <  std::string dumpFileName;
72 <  std::string xyzFileName;
73 <  bool printVel;
74 <  bool printFrc;
75 <  bool printVec;
76 <  bool printChrg;
71 >  string dumpFileName;
72 >  string xyzFileName;
73 >
74 >  bool printVel(false);
75 >  bool printFrc(false);
76 >  bool printVec(false);
77 >  bool printChrg(false);
78    
79    //parse the command line option
80    if (cmdline_parser (argc, argv, &args_info) != 0) {
# Line 86 | Line 85 | int main(int argc, char* argv[]){
85    if (args_info.input_given){
86      dumpFileName = args_info.input_arg;
87    } else {
88 <    std::cerr << "Does not have input file name" << std::endl;
88 >    cerr << "Does not have input file name" << endl;
89      exit(1);
90    }
91    
# Line 139 | Line 138 | int main(int argc, char* argv[]){
138    if (args_info.basetype_flag) {
139      AtomNameVisitor* atomNameVisitor = new AtomNameVisitor(info);
140      compositeVisitor->addVisitor(atomNameVisitor, 550);    
141 <    std::cout << compositeVisitor->toString();
141 >    cout << compositeVisitor->toString();
142    }
143    
144    //create ZconsVisitor
# Line 181 | Line 180 | int main(int argc, char* argv[]){
180                                                         args_info.refsele_arg),
181                                   250);
182    } else if (args_info.refsele_given || args_info.originsele_given) {
183 <    std::cerr << "Both of --refsele and --originsele should appear by pair"
184 <              << std::endl;
183 >    cerr << "Both of --refsele and --originsele should appear by pair"
184 >              << endl;
185      exit(1);
186    }
187    
# Line 221 | Line 220 | int main(int argc, char* argv[]){
220    DumpReader* dumpReader = new DumpReader(info, dumpFileName);
221    int nframes = dumpReader->getNFrames();
222    
223 <  std::ofstream xyzStream(xyzFileName.c_str());
223 >  ofstream xyzStream(xyzFileName.c_str());
224    
225    SimInfo::MoleculeIterator miter;
226    Molecule::IntegrableObjectIterator  iiter;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines