| 1 |
< |
#include <cstdlib> |
| 2 |
< |
#include <cstdio> |
| 3 |
< |
#include <cstring> |
| 1 |
> |
#include <stdlib.h> |
| 2 |
> |
#include <stdio.h> |
| 3 |
> |
#include <string.h> |
| 4 |
|
|
| 5 |
|
#include <iostream> |
| 6 |
|
using namespace std; |
| 123 |
|
char* ffPath_env = "FORCE_PARAM_PATH"; |
| 124 |
|
char* ffPath; |
| 125 |
|
char temp[200]; |
| 126 |
– |
char errMsg[1000]; |
| 126 |
|
|
| 127 |
|
headAtomType = NULL; |
| 128 |
|
currentAtomType = NULL; |
| 248 |
|
info.last = 1; // initialize last to have the last set. |
| 249 |
|
// if things go well, last will be set to 0 |
| 250 |
|
|
| 252 |
– |
int i; |
| 251 |
|
int identNum; |
| 252 |
|
|
| 253 |
|
|
| 331 |
|
MPIcheckPoint(); |
| 332 |
|
|
| 333 |
|
headAtomType = new LinkedAtomType; |
| 334 |
< |
recieveFrcStruct( &info, mpiAtomStructType ); |
| 334 |
> |
receiveFrcStruct( &info, mpiAtomStructType ); |
| 335 |
|
|
| 336 |
|
while( !info.last ){ |
| 337 |
|
|
| 341 |
|
|
| 342 |
|
MPIcheckPoint(); |
| 343 |
|
|
| 344 |
< |
recieveFrcStruct( &info, mpiAtomStructType ); |
| 344 |
> |
receiveFrcStruct( &info, mpiAtomStructType ); |
| 345 |
|
} |
| 346 |
|
} |
| 347 |
|
#endif // is_mpi |
| 356 |
|
int isSSD = 0; |
| 357 |
|
int isGB = 0; |
| 358 |
|
int isEAM = 0; |
| 359 |
+ |
int isCharge = 0; |
| 360 |
+ |
double charge = 0.0; |
| 361 |
|
double dipole = 0.0; |
| 362 |
|
|
| 363 |
|
currentAtomType = headAtomType; |
| 371 |
|
&isDipole, |
| 372 |
|
&isGB, |
| 373 |
|
&isEAM, |
| 374 |
+ |
&isCharge, |
| 375 |
|
&(currentAtomType->epslon), |
| 376 |
|
&(currentAtomType->sigma), |
| 377 |
+ |
&charge, |
| 378 |
|
&dipole, |
| 379 |
|
&isError ); |
| 380 |
|
if( isError ){ |
| 406 |
|
// initialize the atoms |
| 407 |
|
|
| 408 |
|
|
| 407 |
– |
Atom* thisAtom; |
| 408 |
– |
|
| 409 |
|
for( i=0; i<nAtoms; i++ ){ |
| 410 |
|
|
| 411 |
|
currentAtomType = headAtomType->find( the_atoms[i]->getType() ); |
| 418 |
|
} |
| 419 |
|
|
| 420 |
|
the_atoms[i]->setMass( currentAtomType->mass ); |
| 421 |
– |
the_atoms[i]->setEpslon( currentAtomType->epslon ); |
| 422 |
– |
the_atoms[i]->setSigma( currentAtomType->sigma ); |
| 421 |
|
the_atoms[i]->setIdent( currentAtomType->ident ); |
| 424 |
– |
the_atoms[i]->setLJ(); |
| 422 |
|
|
| 423 |
|
if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; |
| 424 |
|
} |