14 |
|
#include "sysBuild.hpp" |
15 |
|
#include "nanoBuilder.hpp" |
16 |
|
|
17 |
– |
|
18 |
– |
|
17 |
|
nanoBuilder::nanoBuilder(int thisIsRandom, int thisHasVacancies, |
18 |
|
int thisLatticeType, double thisParticleRadius, |
19 |
|
double thisCoreRadius, double thisVacancyFraction, |
24 |
|
int Errors; |
25 |
|
int foundCore,foundShell; |
26 |
|
int i; |
27 |
< |
|
27 |
> |
|
28 |
|
//Zero variables |
29 |
|
particleRadius = 0.0; |
30 |
|
coreRadius = 0.0; |
198 |
|
double *rz; |
199 |
|
double pos[3]; |
200 |
|
double A[3][3]; |
201 |
< |
double HmatI[9]; |
201 |
> |
double HmatI[3][3]; |
202 |
|
|
203 |
|
int nCellSites; |
204 |
|
int iref; |
210 |
|
int nShellAtomCounter = 0; |
211 |
|
int hasError; |
212 |
|
|
213 |
< |
int i; |
213 |
> |
int i, j; |
214 |
|
|
215 |
|
int interfaceIndex = 0; |
216 |
|
double dist; |
221 |
|
DumpWriter* writer; |
222 |
|
SimInfo* simnfo; |
223 |
|
|
224 |
< |
Lattice::Lattice *myLattice; |
225 |
< |
MoLocator::MoLocator *coreLocate; |
226 |
< |
MoLocator::MoLocator *shellLocate; |
224 |
> |
Lattice *myLattice; |
225 |
> |
MoLocator *coreLocate; |
226 |
> |
MoLocator *shellLocate; |
227 |
|
|
228 |
|
|
229 |
|
Atom** atoms; |
354 |
|
|
355 |
|
// shellLocate.placeMol(pos, A, moleculeVector,shellAtomCount); |
356 |
|
|
357 |
< |
for (i=0;i<9;i++) simnfo->Hmat[i] = 0; |
358 |
< |
simnfo->Hmat[0] = 1; |
359 |
< |
simnfo->Hmat[4] = 1; |
362 |
< |
simnfo->Hmat[8] = 1; |
357 |
> |
for (i=0;i<3;i++) |
358 |
> |
for (j=0; j<3; j++) |
359 |
> |
simnfo->Hmat[i][j] = 0.0; |
360 |
|
|
361 |
+ |
simnfo->Hmat[0][0] = 1.0; |
362 |
+ |
simnfo->Hmat[1][1] = 1.0; |
363 |
+ |
simnfo->Hmat[2][2] = 1.0; |
364 |
+ |
|
365 |
|
// set up the SimInfo object |
366 |
+ |
|
367 |
|
simnfo = new SimInfo(); |
368 |
|
simnfo->n_atoms = nAtoms; |
367 |
– |
|
369 |
|
|
370 |
|
sprintf( simnfo->sampleName, "%s.dump", bsInfo.outPrefix ); |
371 |
|
sprintf( simnfo->finalName, "%s.init", bsInfo.outPrefix ); |