63 |
|
double mass, rpar, eps; |
64 |
|
double xyz3[3]; |
65 |
|
double moments[3][3]; |
66 |
+ |
double tolerance; |
67 |
|
string fileName; |
68 |
|
char vdwFileName[2002]; |
69 |
|
char structureFileName[2002]; |
94 |
|
if (cmdline_parser (argc, argv, &args_info) != 0) |
95 |
|
exit(1) ; |
96 |
|
|
97 |
< |
if (args_info.input_given){ |
98 |
< |
fileName = args_info.input_arg; |
99 |
< |
} |
100 |
< |
else{ |
97 |
> |
|
98 |
> |
if (args_info.inputs_num > 0) { |
99 |
> |
fileName = args_info.inputs[0]; |
100 |
> |
} else { |
101 |
|
std::cerr << "Does not have input file name" << endl; |
102 |
|
exit(1); |
103 |
|
} |
110 |
|
strcpy(shapeName, token); |
111 |
|
strcat(xyzFile, "Ref.xyz"); |
112 |
|
strcat(shapeFile, ".shape"); |
112 |
– |
strcat(shapeName, "_RB_0"); |
113 |
|
ofstream xfiles(xyzFile); |
114 |
|
|
115 |
|
//the bandwidth has a default value (default=16), so it is always given |
116 |
|
bandwidth = args_info.bandwidth_arg; |
117 |
|
gridwidth = bandwidth*2; |
118 |
< |
|
118 |
> |
|
119 |
> |
//the tolerance has a default value (default=0.01), so it is always given |
120 |
> |
tolerance = args_info.tolerance_arg; |
121 |
> |
|
122 |
|
if (args_info.charmm_given) { |
123 |
|
FF=CHARMM; |
124 |
|
strcpy(vdwFileName, "charmm27.vdw"); |
223 |
|
strcpy(structureFileName, fileName.c_str() ); |
224 |
|
|
225 |
|
PDBReader* PDBread = new PDBReader(); |
226 |
< |
PDBread->setPDBfile(structureFileName); |
226 |
> |
PDBread->setPDBfileName(structureFileName); |
227 |
|
theAtoms = PDBread->getAtomList(); |
228 |
|
printf("Found %d atoms\n", theAtoms.size()); |
229 |
|
|
303 |
|
printf("Doing SHAPE calculations and outputting results...\n"); |
304 |
|
//do the transforms and write to the shapes file |
305 |
|
harmonize->doTransforms(sigmaGrid); |
306 |
< |
harmonize->printToShapesFile(shapeFile, 0); |
306 |
> |
harmonize->printToShapesFile(shapeFile, 0, tolerance); |
307 |
|
harmonize->doTransforms(sGrid); |
308 |
< |
harmonize->printToShapesFile(shapeFile, 1); |
308 |
> |
harmonize->printToShapesFile(shapeFile, 1, tolerance); |
309 |
|
harmonize->doTransforms(epsGrid); |
310 |
< |
harmonize->printToShapesFile(shapeFile, 2); |
310 |
> |
harmonize->printToShapesFile(shapeFile, 2, tolerance); |
311 |
|
|
312 |
|
//clean everything up |
313 |
|
harmonize->~SphereHarm(); |