81 |
|
#include "applications/staticProps/RNEMDStats.hpp" |
82 |
|
#include "applications/staticProps/NitrileFrequencyMap.hpp" |
83 |
|
#include "applications/staticProps/MultipoleSum.hpp" |
84 |
+ |
#include "applications/staticProps/SurfaceDiffusion.hpp" |
85 |
+ |
#include "applications/staticProps/HBondGeometric.hpp" |
86 |
|
|
87 |
|
using namespace OpenMD; |
88 |
|
|
100 |
|
std::string dumpFileName = args_info.input_arg; |
101 |
|
std::string sele1; |
102 |
|
std::string sele2; |
103 |
+ |
std::string sele3; |
104 |
|
|
105 |
|
// check the first selection argument, or set it to the environment |
106 |
|
// variable, or failing that, set it to "select all" |
132 |
|
} |
133 |
|
} |
134 |
|
|
135 |
< |
bool batchMode; |
135 |
> |
// check the third selection argument, which is only set if |
136 |
> |
// requested by the user |
137 |
> |
|
138 |
> |
if (args_info.sele3_given) sele3 = args_info.sele3_arg; |
139 |
> |
|
140 |
> |
bool batchMode(false); |
141 |
|
if (args_info.scd_given){ |
142 |
|
if (args_info.sele1_given && |
143 |
|
args_info.sele2_given && args_info.sele3_given) { |
169 |
|
SimInfo* info = creator.createSim(dumpFileName); |
170 |
|
|
171 |
|
RealType maxLen; |
172 |
< |
RealType zmaxLen; |
172 |
> |
RealType zmaxLen(0.0); |
173 |
|
if (args_info.length_given) { |
174 |
|
maxLen = args_info.length_arg; |
175 |
|
if (args_info.zlength_given){ |
192 |
|
analyser = new GofRZ(info, dumpFileName, sele1, sele2, maxLen, zmaxLen, |
193 |
|
args_info.nbins_arg, args_info.nbins_z_arg); |
194 |
|
} else if (args_info.r_theta_given) { |
195 |
< |
analyser = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, |
196 |
< |
args_info.nbins_arg, args_info.nanglebins_arg); |
195 |
> |
if (args_info.sele3_given) |
196 |
> |
analyser = new GofRTheta(info, dumpFileName, sele1, sele2, sele3, maxLen, |
197 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
198 |
> |
else |
199 |
> |
analyser = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, |
200 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
201 |
|
} else if (args_info.r_omega_given) { |
202 |
< |
analyser = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, |
203 |
< |
args_info.nbins_arg, args_info.nanglebins_arg); |
202 |
> |
if (args_info.sele3_given) |
203 |
> |
analyser = new GofROmega(info, dumpFileName, sele1, sele2, sele3, maxLen, |
204 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
205 |
> |
else |
206 |
> |
analyser = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, |
207 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
208 |
> |
|
209 |
|
} else if (args_info.theta_omega_given) { |
210 |
< |
analyser = new GofAngle2(info, dumpFileName, sele1, sele2, |
211 |
< |
args_info.nanglebins_arg); |
210 |
> |
if (args_info.sele3_given) |
211 |
> |
analyser = new GofAngle2(info, dumpFileName, sele1, sele2, sele3, |
212 |
> |
args_info.nanglebins_arg); |
213 |
> |
else |
214 |
> |
analyser = new GofAngle2(info, dumpFileName, sele1, sele2, |
215 |
> |
args_info.nanglebins_arg); |
216 |
|
} else if (args_info.gxyz_given) { |
217 |
|
if (args_info.refsele_given) { |
218 |
|
analyser= new GofXyz(info, dumpFileName, sele1, sele2, |
363 |
|
args_info.molname_arg, |
364 |
|
args_info.begin_arg, args_info.end_arg); |
365 |
|
} else{ |
345 |
– |
std::string sele3 = args_info.sele3_arg; |
366 |
|
analyser = new SCDOrderParameter(info, dumpFileName, |
367 |
|
sele1, sele2, sele3); |
368 |
|
} |
416 |
|
analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg, |
417 |
|
args_info.nbins_y_arg, args_info.nbins_arg); |
418 |
|
#endif |
419 |
+ |
}else if (args_info.surfDiffusion_given){ |
420 |
+ |
analyser = new SurfaceDiffusion(info, dumpFileName, sele1, maxLen); |
421 |
|
}else if (args_info.rho_r_given) { |
422 |
|
if (args_info.radius_given){ |
423 |
|
analyser = new RhoR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg,args_info.radius_arg); |
434 |
|
analyser = new NanoLength(info, dumpFileName, sele1); |
435 |
|
} else if (args_info.angle_r_given) { |
436 |
|
analyser = new AngleR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg); |
437 |
+ |
} else if (args_info.hbond_given){ |
438 |
+ |
if (args_info.rcut_given) { |
439 |
+ |
if (args_info.thetacut_given) { |
440 |
+ |
|
441 |
+ |
analyser = new HBondGeometric(info, dumpFileName, sele1, sele2, |
442 |
+ |
args_info.rcut_arg, |
443 |
+ |
args_info.thetacut_arg, |
444 |
+ |
args_info.nbins_arg); |
445 |
+ |
} else { |
446 |
+ |
sprintf( painCave.errMsg, |
447 |
+ |
"A cutoff angle (thetacut) must be specified when calculating Hydrogen Bonding Statistics"); |
448 |
+ |
painCave.severity = OPENMD_ERROR; |
449 |
+ |
painCave.isFatal = 1; |
450 |
+ |
simError(); |
451 |
+ |
} |
452 |
+ |
} else { |
453 |
+ |
sprintf( painCave.errMsg, |
454 |
+ |
"A cutoff radius (rcut) must be specified when calculating Hydrogen Bonding Statistics"); |
455 |
+ |
painCave.severity = OPENMD_ERROR; |
456 |
+ |
painCave.isFatal = 1; |
457 |
+ |
simError(); |
458 |
+ |
} |
459 |
|
} |
460 |
|
|
461 |
|
if (args_info.output_given) { |