| 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; |
| 32 |
|
double mass; |
| 33 |
|
double epslon; |
| 34 |
|
double sigma; |
| 35 |
+ |
double charge; |
| 36 |
|
double dipole; |
| 37 |
|
double w0; |
| 38 |
|
double v0; |
| 42 |
|
double rlp; |
| 43 |
|
double rup; |
| 44 |
|
int isSSD; |
| 45 |
+ |
int isCharge; |
| 46 |
|
int isDipole; |
| 47 |
|
int ident; |
| 48 |
|
int last; // 0 -> default |
| 456 |
|
char* ffPath_env = "FORCE_PARAM_PATH"; |
| 457 |
|
char* ffPath; |
| 458 |
|
char temp[200]; |
| 457 |
– |
char errMsg[1000]; |
| 459 |
|
|
| 460 |
|
headAtomType = NULL; |
| 461 |
|
currentAtomType = NULL; |
| 477 |
|
// Init the atomStruct mpi type |
| 478 |
|
|
| 479 |
|
atomStruct atomProto; // mpiPrototype |
| 480 |
< |
int atomBC[3] = {15,6,4}; // block counts |
| 480 |
> |
int atomBC[3] = {15,11,4}; // block counts |
| 481 |
|
MPI_Aint atomDspls[3]; // displacements |
| 482 |
|
MPI_Datatype atomMbrTypes[3]; // member mpi types |
| 483 |
|
|
| 659 |
|
|
| 660 |
|
void DUFF::readParams( void ){ |
| 661 |
|
|
| 661 |
– |
int i, a, b, c, d; |
| 662 |
|
int identNum; |
| 663 |
– |
char* atomA; |
| 664 |
– |
char* atomB; |
| 665 |
– |
char* atomC; |
| 666 |
– |
char* atomD; |
| 663 |
|
|
| 664 |
|
atomStruct atomInfo; |
| 665 |
|
bondStruct bondInfo; |
| 781 |
|
int isGB = 0; |
| 782 |
|
int isLJ = 1; |
| 783 |
|
int isEAM =0; |
| 784 |
< |
double GB_dummy = 0.0; |
| 785 |
< |
|
| 786 |
< |
|
| 784 |
> |
int isCharge = 0; |
| 785 |
> |
double charge=0.0; |
| 786 |
> |
|
| 787 |
|
currentAtomType = headAtomType->next;; |
| 788 |
|
while( currentAtomType != NULL ){ |
| 789 |
|
|
| 790 |
< |
if(currentAtomType->isDipole) entry_plug->useDipole = 1; |
| 790 |
> |
if(currentAtomType->isDipole) entry_plug->useDipoles = 1; |
| 791 |
|
if(currentAtomType->isSSD) { |
| 792 |
|
entry_plug->useSticky = 1; |
| 793 |
|
set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0), |
| 804 |
|
&(currentAtomType->isDipole), |
| 805 |
|
&isGB, |
| 806 |
|
&isEAM, |
| 807 |
+ |
&isCharge, |
| 808 |
|
&(currentAtomType->epslon), |
| 809 |
|
&(currentAtomType->sigma), |
| 810 |
+ |
&charge, |
| 811 |
|
&(currentAtomType->dipole), |
| 812 |
|
&isError ); |
| 813 |
|
if( isError ){ |
| 1308 |
|
} |
| 1309 |
|
|
| 1310 |
|
gBend = new GhostBend( *the_atoms[a], |
| 1311 |
< |
*the_atoms[b], |
| 1314 |
< |
*the_atoms[c] ); |
| 1311 |
> |
*the_atoms[b]); |
| 1312 |
|
|
| 1313 |
|
gBend->setConstants( currentBendType->k1, |
| 1314 |
|
currentBendType->k2, |
| 1637 |
|
else{ |
| 1638 |
|
sprintf( painCave.errMsg, |
| 1639 |
|
"Unknown DUFF bond type \"%s\" at line %d\n", |
| 1640 |
< |
info.type, |
| 1640 |
> |
bondType, |
| 1641 |
|
lineNum ); |
| 1642 |
|
painCave.isFatal = 1; |
| 1643 |
|
simError(); |