190 |
|
int newN; |
191 |
|
Atom** atoms; |
192 |
|
double pos[3]; |
193 |
< |
char atomType[100]; |
193 |
> |
char* atomType; |
194 |
|
double HMat[3][3]; |
195 |
|
int numNonSSD; |
196 |
|
int numSSD; |
202 |
|
|
203 |
|
//Determine the number of SSD molecules and Non-SSD molecules |
204 |
|
for (int i = 0; i < info->n_atoms; i++){ |
205 |
< |
atoms[i]->getType(); |
206 |
< |
if (strcmp(atomType, "SSD") || strcmp(atomType+2, "SSD")) |
205 |
> |
atomType = atoms[i]->getType(); |
206 |
> |
if (!strcmp(atomType, "SSD") || !strcmp(atomType+2, "SSD")) |
207 |
|
numSSD++; |
208 |
|
else |
209 |
|
numNonSSD++; |
231 |
|
|
232 |
|
for (int l = 0; l < info->n_atoms; l++){ |
233 |
|
atoms[l]->getPos(pos); |
234 |
< |
strcpy(atomType, atoms[l]->getType()); |
234 |
> |
atomType = atoms[l]->getType(); |
235 |
|
|
236 |
|
if (periodicBox_given) |
237 |
|
info->wrapVector(pos); |
276 |
|
atomType, pos[0], pos [1], pos[2], u[0], u[1], u[2] ); |
277 |
|
} |
278 |
|
else |
279 |
< |
sprintf(buffer,"%s\t%lf\t%lf\t%lf\t0.0\t0.0\t0.0\n", |
279 |
> |
sprintf(buffer,"%s\t%lf\t%lf\t%lf\n", |
280 |
|
atomType,pos[0], pos [1], pos[2]); |
281 |
|
} |
282 |
|
} |
283 |
|
else{ |
284 |
< |
sprintf(buffer,"%s\t%lf\t%lf\t%lf\n", |
284 |
> |
if (dipole_given) |
285 |
> |
sprintf(buffer,"%s\t%lf\t%lf\t%lf\t0.0\t0.0\t0.0\n", |
286 |
|
atomType,pos[0], pos [1], pos[2]); |
287 |
+ |
|
288 |
+ |
else |
289 |
+ |
sprintf(buffer,"%s\t%lf\t%lf\t%lf\n", |
290 |
+ |
atomType,pos[0], pos [1], pos[2]); |
291 |
|
}//end if atoms[i]->isDirectional() |
292 |
|
|
293 |
|
(*xyzStream) << buffer; |
381 |
|
} |
382 |
|
else{ |
383 |
|
if(mols[i].getGlobalIndex() == zmolIndex[curIndex]){ |
384 |
< |
isZmol = zmolIndex[curIndex]; |
384 |
> |
isZmol = curIndex; |
385 |
|
curIndex ++; |
386 |
|
} |
387 |
|
else |