| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
| 39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 42 |
|
|
| 43 |
|
#include <iostream> |
| 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 |
|
|
| 117 |
|
SSDAtomVisitor* ssdVisitor = new SSDAtomVisitor(info); |
| 118 |
|
compositeVisitor->addVisitor(ssdVisitor, 800); |
| 119 |
|
|
| 120 |
+ |
//create GBtail atom visitor |
| 121 |
+ |
GBtailVisitor* gbtVisitor = new GBtailVisitor(info); |
| 122 |
+ |
compositeVisitor->addVisitor(gbtVisitor, 790); |
| 123 |
+ |
|
| 124 |
+ |
//create GBhead atom visitor |
| 125 |
+ |
GBheadVisitor* gbhVisitor = new GBheadVisitor(info); |
| 126 |
+ |
compositeVisitor->addVisitor(gbhVisitor, 789); |
| 127 |
+ |
|
| 128 |
|
//create default atom visitor |
| 129 |
|
DefaultAtomVisitor* defaultAtomVisitor = new DefaultAtomVisitor(info); |
| 130 |
|
compositeVisitor->addVisitor(defaultAtomVisitor, 700); |
| 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; |
| 240 |
|
for (int i = 0; i < nframes; i += args_info.frame_arg){ |
| 241 |
|
dumpReader->readFrame(i); |
| 242 |
|
|
| 243 |
< |
if (printFrc) forceMan->calcForces(true, false); |
| 243 |
> |
if (printFrc) forceMan->calcForces(); |
| 244 |
|
|
| 245 |
|
//wrapping the molecule |
| 246 |
|
if(args_info.periodicBox_flag) { |