64 |
|
#include "applications/staticProps/RippleOP.hpp" |
65 |
|
#include "applications/staticProps/SCDOrderParameter.hpp" |
66 |
|
#include "applications/staticProps/DensityPlot.hpp" |
67 |
+ |
#include "applications/staticProps/ObjectCount.hpp" |
68 |
|
#include "applications/staticProps/RhoZ.hpp" |
69 |
|
#include "applications/staticProps/pAngle.hpp" |
70 |
|
#include "applications/staticProps/BondAngleDistribution.hpp" |
73 |
|
#include "applications/staticProps/Hxy.hpp" |
74 |
|
#endif |
75 |
|
#include "applications/staticProps/RhoR.hpp" |
76 |
+ |
#include "applications/staticProps/AngleR.hpp" |
77 |
+ |
#include "applications/staticProps/RhoAngleR.hpp" |
78 |
+ |
#include "applications/staticProps/TetrahedralityParam.hpp" |
79 |
|
|
80 |
|
using namespace OpenMD; |
81 |
|
|
82 |
|
int main(int argc, char* argv[]){ |
83 |
|
|
84 |
< |
//register force fields |
85 |
< |
registerForceFields(); |
86 |
< |
|
87 |
< |
gengetopt_args_info args_info; |
88 |
< |
|
89 |
< |
//parse the command line option |
90 |
< |
if (cmdline_parser (argc, argv, &args_info) != 0) { |
91 |
< |
exit(1) ; |
92 |
< |
} |
93 |
< |
|
94 |
< |
//get the dumpfile name |
95 |
< |
std::string dumpFileName = args_info.input_arg; |
96 |
< |
std::string sele1; |
97 |
< |
std::string sele2; |
98 |
< |
bool userSpecifiedSelect1; |
99 |
< |
bool userSpecifiedSelect2; |
100 |
< |
|
101 |
< |
// check the first selection argument, or set it to the environment |
102 |
< |
// variable, or failing that, set it to "select all" |
103 |
< |
|
104 |
< |
if (args_info.sele1_given) { |
105 |
< |
sele1 = args_info.sele1_arg; |
84 |
> |
//register force fields |
85 |
> |
registerForceFields(); |
86 |
> |
|
87 |
> |
gengetopt_args_info args_info; |
88 |
> |
|
89 |
> |
//parse the command line option |
90 |
> |
if (cmdline_parser (argc, argv, &args_info) != 0) { |
91 |
> |
exit(1) ; |
92 |
> |
} |
93 |
> |
|
94 |
> |
//get the dumpfile name |
95 |
> |
std::string dumpFileName = args_info.input_arg; |
96 |
> |
std::string sele1; |
97 |
> |
std::string sele2; |
98 |
> |
bool userSpecifiedSelect1; |
99 |
> |
bool userSpecifiedSelect2; |
100 |
> |
|
101 |
> |
// check the first selection argument, or set it to the environment |
102 |
> |
// variable, or failing that, set it to "select all" |
103 |
> |
|
104 |
> |
if (args_info.sele1_given) { |
105 |
> |
sele1 = args_info.sele1_arg; |
106 |
> |
} else { |
107 |
> |
char* sele1Env= getenv("SELECTION1"); |
108 |
> |
if (sele1Env) { |
109 |
> |
sele1 = sele1Env; |
110 |
|
} else { |
111 |
< |
char* sele1Env= getenv("SELECTION1"); |
104 |
< |
if (sele1Env) { |
105 |
< |
sele1 = sele1Env; |
106 |
< |
} else { |
107 |
< |
sele1 = "select all"; |
108 |
< |
} |
111 |
> |
sele1 = "select all"; |
112 |
|
} |
113 |
< |
|
111 |
< |
// check the second selection argument, or set it to the environment |
112 |
< |
// variable, or failing that, set it to "select all" |
113 |
> |
} |
114 |
|
|
115 |
< |
if (args_info.sele2_given) { |
116 |
< |
sele2 = args_info.sele2_arg; |
117 |
< |
} else { |
118 |
< |
char* sele2Env = getenv("SELECTION1"); |
119 |
< |
if (sele2Env) { |
120 |
< |
sele2 = sele2Env; |
121 |
< |
} else { |
122 |
< |
sele2 = "select all"; |
123 |
< |
} |
115 |
> |
// check the second selection argument, or set it to the environment |
116 |
> |
// variable, or failing that, set it to "select all" |
117 |
> |
|
118 |
> |
if (args_info.sele2_given) { |
119 |
> |
sele2 = args_info.sele2_arg; |
120 |
> |
} else { |
121 |
> |
char* sele2Env = getenv("SELECTION1"); |
122 |
> |
if (sele2Env) { |
123 |
> |
sele2 = sele2Env; |
124 |
> |
} else { |
125 |
> |
sele2 = "select all"; |
126 |
|
} |
127 |
< |
|
128 |
< |
|
129 |
< |
// Problems if sele1 wasn't specified, but |
130 |
< |
// if (!args_info.scd_given) { |
131 |
< |
// sprintf( painCave.errMsg, |
132 |
< |
// "neither --sele1 option nor $SELECTION1 is set"); |
133 |
< |
// painCave.severity = OPENMD_ERROR; |
134 |
< |
// painCave.isFatal = 1; |
135 |
< |
// simError(); |
136 |
< |
// } |
137 |
< |
// } |
138 |
< |
|
139 |
< |
// Problems if sele1 wasn't specified |
140 |
< |
|
141 |
< |
// if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given) { |
142 |
< |
// sprintf( painCave.errMsg, |
143 |
< |
// "neither --sele2 option nor $SELECTION1 is set"); |
144 |
< |
// painCave.severity = OPENMD_ERROR; |
145 |
< |
// painCave.isFatal = 1; |
146 |
< |
// simError(); |
147 |
< |
// } |
148 |
< |
// } |
149 |
< |
|
150 |
< |
bool batchMode; |
151 |
< |
if (args_info.scd_given){ |
152 |
< |
if (args_info.sele1_given && args_info.sele2_given && args_info.sele3_given) { |
153 |
< |
batchMode = false; |
154 |
< |
} else if (args_info.molname_given && args_info.begin_given && args_info.end_given) { |
155 |
< |
if (args_info.begin_arg < 0 || args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { |
156 |
< |
sprintf( painCave.errMsg, |
154 |
< |
"below conditions are not satisfied:\n" |
155 |
< |
"0 <= begin && 0<= end && begin <= end-2\n"); |
156 |
< |
painCave.severity = OPENMD_ERROR; |
157 |
< |
painCave.isFatal = 1; |
158 |
< |
simError(); |
159 |
< |
} |
160 |
< |
batchMode = true; |
161 |
< |
} else{ |
162 |
< |
sprintf( painCave.errMsg, |
163 |
< |
"either --sele1, --sele2, --sele3 are specified," |
164 |
< |
" or --molname, --begin, --end are specified\n"); |
165 |
< |
painCave.severity = OPENMD_ERROR; |
166 |
< |
painCave.isFatal = 1; |
167 |
< |
simError(); |
168 |
< |
|
169 |
< |
} |
170 |
< |
} |
171 |
< |
|
172 |
< |
//parse md file and set up the system |
173 |
< |
SimCreator creator; |
174 |
< |
std::cout << "dumpFile = " << dumpFileName << "\n"; |
175 |
< |
SimInfo* info = creator.createSim(dumpFileName); |
176 |
< |
|
177 |
< |
RealType maxLen; |
178 |
< |
RealType zmaxLen; |
179 |
< |
if (args_info.length_given) { |
180 |
< |
maxLen = args_info.length_arg; |
181 |
< |
if (args_info.zlength_given){ |
182 |
< |
zmaxLen = args_info.zlength_arg; |
183 |
< |
} |
184 |
< |
} else { |
185 |
< |
Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat(); |
186 |
< |
maxLen = std::min(std::min(hmat(0, 0), hmat(1, 1)), hmat(2, 2)) /2.0; |
187 |
< |
zmaxLen = hmat(2,2); |
188 |
< |
} |
189 |
< |
|
190 |
< |
StaticAnalyser* analyser; |
191 |
< |
if (args_info.gofr_given){ |
192 |
< |
analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen, |
193 |
< |
args_info.nbins_arg); |
194 |
< |
} else if (args_info.gofz_given) { |
195 |
< |
analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen, |
196 |
< |
args_info.nbins_arg); |
197 |
< |
} else if (args_info.r_z_given) { |
198 |
< |
analyser = new GofRZ(info, dumpFileName, sele1, sele2, maxLen, zmaxLen, |
199 |
< |
args_info.nbins_arg, args_info.nbins_z_arg); |
200 |
< |
} else if (args_info.r_theta_given) { |
201 |
< |
analyser = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, |
202 |
< |
args_info.nbins_arg, args_info.nanglebins_arg); |
203 |
< |
} else if (args_info.r_omega_given) { |
204 |
< |
analyser = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, |
205 |
< |
args_info.nbins_arg, args_info.nanglebins_arg); |
206 |
< |
} else if (args_info.theta_omega_given) { |
207 |
< |
analyser = new GofAngle2(info, dumpFileName, sele1, sele2, |
208 |
< |
args_info.nanglebins_arg); |
209 |
< |
} else if (args_info.gxyz_given) { |
210 |
< |
if (args_info.refsele_given) { |
211 |
< |
analyser= new GofXyz(info, dumpFileName, sele1, sele2,args_info.refsele_arg, |
212 |
< |
maxLen, args_info.nbins_arg); |
213 |
< |
} else { |
214 |
< |
sprintf( painCave.errMsg, |
215 |
< |
"--refsele must set when --gxyz is used"); |
216 |
< |
painCave.severity = OPENMD_ERROR; |
217 |
< |
painCave.isFatal = 1; |
218 |
< |
simError(); |
219 |
< |
} |
220 |
< |
} else if (args_info.twodgofr_given){ |
221 |
< |
if (args_info.dz_given) { |
222 |
< |
analyser= new TwoDGofR(info, dumpFileName, sele1, sele2, maxLen, |
223 |
< |
args_info.dz_arg, args_info.nbins_arg); |
224 |
< |
} else { |
127 |
> |
} |
128 |
> |
|
129 |
> |
|
130 |
> |
// Problems if sele1 wasn't specified, but |
131 |
> |
// if (!args_info.scd_given) { |
132 |
> |
// sprintf( painCave.errMsg, |
133 |
> |
// "neither --sele1 option nor $SELECTION1 is set"); |
134 |
> |
// painCave.severity = OPENMD_ERROR; |
135 |
> |
// painCave.isFatal = 1; |
136 |
> |
// simError(); |
137 |
> |
// } |
138 |
> |
// } |
139 |
> |
|
140 |
> |
// Problems if sele1 wasn't specified |
141 |
> |
|
142 |
> |
// if(!args_info.scd_given && !args_info.density_given && !args_info.slab_density_given) { |
143 |
> |
// sprintf( painCave.errMsg, |
144 |
> |
// "neither --sele2 option nor $SELECTION1 is set"); |
145 |
> |
// painCave.severity = OPENMD_ERROR; |
146 |
> |
// painCave.isFatal = 1; |
147 |
> |
// simError(); |
148 |
> |
// } |
149 |
> |
// } |
150 |
> |
|
151 |
> |
bool batchMode; |
152 |
> |
if (args_info.scd_given){ |
153 |
> |
if (args_info.sele1_given && args_info.sele2_given && args_info.sele3_given) { |
154 |
> |
batchMode = false; |
155 |
> |
} else if (args_info.molname_given && args_info.begin_given && args_info.end_given) { |
156 |
> |
if (args_info.begin_arg < 0 || args_info.end_arg < 0 || args_info.begin_arg > args_info.end_arg-2) { |
157 |
|
sprintf( painCave.errMsg, |
158 |
< |
"A slab width (dz) must be specified when calculating TwoDGofR"); |
158 |
> |
"below conditions are not satisfied:\n" |
159 |
> |
"0 <= begin && 0<= end && begin <= end-2\n"); |
160 |
|
painCave.severity = OPENMD_ERROR; |
161 |
|
painCave.isFatal = 1; |
162 |
< |
simError(); |
162 |
> |
simError(); |
163 |
|
} |
164 |
< |
} else if (args_info.p2_given) { |
165 |
< |
analyser = new P2OrderParameter(info, dumpFileName, sele1, sele2); |
166 |
< |
} else if (args_info.rp2_given){ |
167 |
< |
analyser = new RippleOP(info, dumpFileName, sele1, sele2); |
168 |
< |
} else if (args_info.bo_given){ |
169 |
< |
if (args_info.rcut_given) { |
170 |
< |
analyser = new BondOrderParameter(info, dumpFileName, sele1, |
171 |
< |
args_info.rcut_arg, |
172 |
< |
args_info.nbins_arg); |
240 |
< |
} else { |
241 |
< |
sprintf( painCave.errMsg, |
242 |
< |
"A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); |
243 |
< |
painCave.severity = OPENMD_ERROR; |
244 |
< |
painCave.isFatal = 1; |
245 |
< |
simError(); |
246 |
< |
} |
247 |
< |
} else if (args_info.bor_given){ |
248 |
< |
if (args_info.rcut_given) { |
249 |
< |
analyser = new BOPofR(info, dumpFileName, sele1, args_info.rcut_arg, |
250 |
< |
args_info.nbins_arg, maxLen); |
251 |
< |
} else { |
252 |
< |
sprintf( painCave.errMsg, |
253 |
< |
"A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); |
254 |
< |
painCave.severity = OPENMD_ERROR; |
255 |
< |
painCave.isFatal = 1; |
256 |
< |
simError(); |
257 |
< |
} |
258 |
< |
} else if (args_info.bad_given){ |
259 |
< |
if (args_info.rcut_given) { |
260 |
< |
analyser = new BondAngleDistribution(info, dumpFileName, sele1, args_info.rcut_arg, |
261 |
< |
args_info.nbins_arg); |
262 |
< |
} else { |
263 |
< |
sprintf( painCave.errMsg, |
264 |
< |
"A cutoff radius (rcut) must be specified when calculating Bond Angle Distributions"); |
265 |
< |
painCave.severity = OPENMD_ERROR; |
266 |
< |
painCave.isFatal = 1; |
267 |
< |
simError(); |
268 |
< |
} |
269 |
< |
} else if (args_info.scd_given) { |
270 |
< |
if (batchMode) { |
271 |
< |
analyser = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg, |
272 |
< |
args_info.begin_arg, args_info.end_arg); |
273 |
< |
} else{ |
274 |
< |
std::string sele3 = args_info.sele3_arg; |
275 |
< |
analyser = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); |
276 |
< |
} |
277 |
< |
}else if (args_info.density_given) { |
278 |
< |
analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, |
279 |
< |
args_info.nbins_arg); |
280 |
< |
} else if (args_info.slab_density_given) { |
281 |
< |
analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg); |
282 |
< |
} else if (args_info.p_angle_given) { |
283 |
< |
analyser = new pAngle(info, dumpFileName, sele1, args_info.nbins_arg); |
284 |
< |
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) |
285 |
< |
}else if (args_info.hxy_given) { |
286 |
< |
analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg, |
287 |
< |
args_info.nbins_y_arg, args_info.nbins_arg); |
288 |
< |
#endif |
289 |
< |
}else if (args_info.rho_r_given) { |
290 |
< |
if (args_info.radius_given){ |
291 |
< |
analyser = new RhoR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg,args_info.radius_arg); |
292 |
< |
}else{ |
293 |
< |
sprintf( painCave.errMsg, |
294 |
< |
"A particle radius (radius) must be specified when calculating Rho(r)"); |
295 |
< |
painCave.severity = OPENMD_ERROR; |
296 |
< |
painCave.isFatal = 1; |
297 |
< |
simError(); |
298 |
< |
} |
299 |
< |
}else if (args_info.hullvol_given) { |
300 |
< |
analyser = new NanoVolume(info, dumpFileName, sele1); |
164 |
> |
batchMode = true; |
165 |
> |
} else{ |
166 |
> |
sprintf( painCave.errMsg, |
167 |
> |
"either --sele1, --sele2, --sele3 are specified," |
168 |
> |
" or --molname, --begin, --end are specified\n"); |
169 |
> |
painCave.severity = OPENMD_ERROR; |
170 |
> |
painCave.isFatal = 1; |
171 |
> |
simError(); |
172 |
> |
|
173 |
|
} |
174 |
+ |
} |
175 |
|
|
176 |
< |
if (args_info.output_given) { |
177 |
< |
analyser->setOutputName(args_info.output_arg); |
176 |
> |
//parse md file and set up the system |
177 |
> |
SimCreator creator; |
178 |
> |
std::cout << "dumpFile = " << dumpFileName << "\n"; |
179 |
> |
SimInfo* info = creator.createSim(dumpFileName); |
180 |
> |
|
181 |
> |
RealType maxLen; |
182 |
> |
RealType zmaxLen; |
183 |
> |
if (args_info.length_given) { |
184 |
> |
maxLen = args_info.length_arg; |
185 |
> |
if (args_info.zlength_given){ |
186 |
> |
zmaxLen = args_info.zlength_arg; |
187 |
|
} |
188 |
< |
if (args_info.step_given) { |
189 |
< |
analyser->setStep(args_info.step_arg); |
188 |
> |
} else { |
189 |
> |
Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat(); |
190 |
> |
maxLen = std::min(std::min(hmat(0, 0), hmat(1, 1)), hmat(2, 2)) /2.0; |
191 |
> |
zmaxLen = hmat(2,2); |
192 |
> |
} |
193 |
> |
|
194 |
> |
StaticAnalyser* analyser; |
195 |
> |
if (args_info.gofr_given){ |
196 |
> |
analyser= new GofR(info, dumpFileName, sele1, sele2, maxLen, |
197 |
> |
args_info.nbins_arg); |
198 |
> |
} else if (args_info.gofz_given) { |
199 |
> |
analyser= new GofZ(info, dumpFileName, sele1, sele2, maxLen, |
200 |
> |
args_info.nbins_arg); |
201 |
> |
} else if (args_info.r_z_given) { |
202 |
> |
analyser = new GofRZ(info, dumpFileName, sele1, sele2, maxLen, zmaxLen, |
203 |
> |
args_info.nbins_arg, args_info.nbins_z_arg); |
204 |
> |
} else if (args_info.r_theta_given) { |
205 |
> |
analyser = new GofRTheta(info, dumpFileName, sele1, sele2, maxLen, |
206 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
207 |
> |
} else if (args_info.r_omega_given) { |
208 |
> |
analyser = new GofROmega(info, dumpFileName, sele1, sele2, maxLen, |
209 |
> |
args_info.nbins_arg, args_info.nanglebins_arg); |
210 |
> |
} else if (args_info.theta_omega_given) { |
211 |
> |
analyser = new GofAngle2(info, dumpFileName, sele1, sele2, |
212 |
> |
args_info.nanglebins_arg); |
213 |
> |
} else if (args_info.gxyz_given) { |
214 |
> |
if (args_info.refsele_given) { |
215 |
> |
analyser= new GofXyz(info, dumpFileName, sele1, sele2,args_info.refsele_arg, |
216 |
> |
maxLen, args_info.nbins_arg); |
217 |
> |
} else { |
218 |
> |
sprintf( painCave.errMsg, |
219 |
> |
"--refsele must set when --gxyz is used"); |
220 |
> |
painCave.severity = OPENMD_ERROR; |
221 |
> |
painCave.isFatal = 1; |
222 |
> |
simError(); |
223 |
|
} |
224 |
+ |
} else if (args_info.twodgofr_given){ |
225 |
+ |
if (args_info.dz_given) { |
226 |
+ |
analyser= new TwoDGofR(info, dumpFileName, sele1, sele2, maxLen, |
227 |
+ |
args_info.dz_arg, args_info.nbins_arg); |
228 |
+ |
} else { |
229 |
+ |
sprintf( painCave.errMsg, |
230 |
+ |
"A slab width (dz) must be specified when calculating TwoDGofR"); |
231 |
+ |
painCave.severity = OPENMD_ERROR; |
232 |
+ |
painCave.isFatal = 1; |
233 |
+ |
simError(); |
234 |
+ |
} |
235 |
+ |
} else if (args_info.p2_given) { |
236 |
+ |
analyser = new P2OrderParameter(info, dumpFileName, sele1, sele2); |
237 |
+ |
} else if (args_info.rp2_given){ |
238 |
+ |
analyser = new RippleOP(info, dumpFileName, sele1, sele2); |
239 |
+ |
} else if (args_info.bo_given){ |
240 |
+ |
if (args_info.rcut_given) { |
241 |
+ |
analyser = new BondOrderParameter(info, dumpFileName, sele1, |
242 |
+ |
args_info.rcut_arg, |
243 |
+ |
args_info.nbins_arg); |
244 |
+ |
} else { |
245 |
+ |
sprintf( painCave.errMsg, |
246 |
+ |
"A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); |
247 |
+ |
painCave.severity = OPENMD_ERROR; |
248 |
+ |
painCave.isFatal = 1; |
249 |
+ |
simError(); |
250 |
+ |
} |
251 |
+ |
|
252 |
+ |
} else if (args_info.tet_param_given) { |
253 |
+ |
if (args_info.rcut_given) { |
254 |
+ |
analyser = new TetrahedralityParam(info, dumpFileName, sele1, |
255 |
+ |
args_info.rcut_arg, |
256 |
+ |
args_info.nbins_arg); |
257 |
+ |
} else { |
258 |
+ |
sprintf( painCave.errMsg, |
259 |
+ |
"A cutoff radius (rcut) must be specified when calculating Tetrahedrality Parameters"); |
260 |
+ |
painCave.severity = OPENMD_ERROR; |
261 |
+ |
painCave.isFatal = 1; |
262 |
+ |
simError(); |
263 |
+ |
} |
264 |
+ |
} else if (args_info.bor_given){ |
265 |
+ |
if (args_info.rcut_given) { |
266 |
+ |
analyser = new BOPofR(info, dumpFileName, sele1, args_info.rcut_arg, |
267 |
+ |
args_info.nbins_arg, maxLen); |
268 |
+ |
} else { |
269 |
+ |
sprintf( painCave.errMsg, |
270 |
+ |
"A cutoff radius (rcut) must be specified when calculating Bond Order Parameters"); |
271 |
+ |
painCave.severity = OPENMD_ERROR; |
272 |
+ |
painCave.isFatal = 1; |
273 |
+ |
simError(); |
274 |
+ |
} |
275 |
+ |
} else if (args_info.bad_given){ |
276 |
+ |
if (args_info.rcut_given) { |
277 |
+ |
analyser = new BondAngleDistribution(info, dumpFileName, sele1, args_info.rcut_arg, |
278 |
+ |
args_info.nbins_arg); |
279 |
+ |
} else { |
280 |
+ |
sprintf( painCave.errMsg, |
281 |
+ |
"A cutoff radius (rcut) must be specified when calculating Bond Angle Distributions"); |
282 |
+ |
painCave.severity = OPENMD_ERROR; |
283 |
+ |
painCave.isFatal = 1; |
284 |
+ |
simError(); |
285 |
+ |
} |
286 |
+ |
} else if (args_info.scd_given) { |
287 |
+ |
if (batchMode) { |
288 |
+ |
analyser = new SCDOrderParameter(info, dumpFileName, args_info.molname_arg, |
289 |
+ |
args_info.begin_arg, args_info.end_arg); |
290 |
+ |
} else{ |
291 |
+ |
std::string sele3 = args_info.sele3_arg; |
292 |
+ |
analyser = new SCDOrderParameter(info, dumpFileName, sele1, sele2, sele3); |
293 |
+ |
} |
294 |
+ |
}else if (args_info.density_given) { |
295 |
+ |
analyser= new DensityPlot(info, dumpFileName, sele1, sele2, maxLen, |
296 |
+ |
args_info.nbins_arg); |
297 |
+ |
} else if (args_info.count_given) { |
298 |
+ |
analyser = new ObjectCount(info, dumpFileName, sele1 ); |
299 |
+ |
} else if (args_info.slab_density_given) { |
300 |
+ |
analyser = new RhoZ(info, dumpFileName, sele1, args_info.nbins_arg); |
301 |
+ |
} else if (args_info.p_angle_given) { |
302 |
+ |
analyser = new pAngle(info, dumpFileName, sele1, args_info.nbins_arg); |
303 |
+ |
#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H) |
304 |
+ |
}else if (args_info.hxy_given) { |
305 |
+ |
analyser = new Hxy(info, dumpFileName, sele1, args_info.nbins_x_arg, |
306 |
+ |
args_info.nbins_y_arg, args_info.nbins_arg); |
307 |
+ |
#endif |
308 |
+ |
}else if (args_info.rho_r_given) { |
309 |
+ |
if (args_info.radius_given){ |
310 |
+ |
analyser = new RhoR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg,args_info.radius_arg); |
311 |
+ |
}else{ |
312 |
+ |
sprintf( painCave.errMsg, |
313 |
+ |
"A particle radius (radius) must be specified when calculating Rho(r)"); |
314 |
+ |
painCave.severity = OPENMD_ERROR; |
315 |
+ |
painCave.isFatal = 1; |
316 |
+ |
simError(); |
317 |
+ |
} |
318 |
+ |
} else if (args_info.hullvol_given) { |
319 |
+ |
analyser = new NanoVolume(info, dumpFileName, sele1); |
320 |
+ |
} else if (args_info.angle_r_given) { |
321 |
+ |
analyser = new AngleR(info, dumpFileName, sele1, maxLen,args_info.nbins_arg); |
322 |
+ |
} |
323 |
+ |
|
324 |
+ |
if (args_info.output_given) { |
325 |
+ |
analyser->setOutputName(args_info.output_arg); |
326 |
+ |
} |
327 |
+ |
if (args_info.step_given) { |
328 |
+ |
analyser->setStep(args_info.step_arg); |
329 |
+ |
} |
330 |
+ |
|
331 |
+ |
analyser->process(); |
332 |
+ |
|
333 |
+ |
delete analyser; |
334 |
+ |
delete info; |
335 |
|
|
336 |
< |
analyser->process(); |
311 |
< |
|
312 |
< |
delete analyser; |
313 |
< |
delete info; |
314 |
< |
|
315 |
< |
return 0; |
336 |
> |
return 0; |
337 |
|
} |
338 |
|
|