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