# | Line 35 | Line 35 | namespace DUFF_NS { // restrict the access of the fol | |
---|---|---|
35 | double dipole; | |
36 | double w0; | |
37 | double v0; | |
38 | + | double v0p; |
39 | + | double rl; |
40 | + | double ru; |
41 | + | double rlp; |
42 | + | double rup; |
43 | int isSSD; | |
44 | int isDipole; | |
45 | int ident; | |
# | Line 138 | Line 143 | namespace DUFF_NS { // restrict the access of the fol | |
143 | next->dipole = info.dipole; | |
144 | next->w0 = info.w0; | |
145 | next->v0 = info.v0; | |
146 | + | next->v0p = info.v0p; |
147 | + | next->rl = info.rl; |
148 | + | next->ru = info.ru; |
149 | + | next->rlp = info.rlp; |
150 | + | next->rup = info.rup; |
151 | next->ident = info.ident; | |
152 | } | |
153 | } | |
# | Line 154 | Line 164 | namespace DUFF_NS { // restrict the access of the fol | |
164 | info.dipole = dipole; | |
165 | info.w0 = w0; | |
166 | info.v0 = v0; | |
167 | + | info.v0p = v0p; |
168 | + | info.rl = rl; |
169 | + | info.ru = ru; |
170 | + | info.rlp = rlp; |
171 | + | info.rup = rup; |
172 | info.ident = ident; | |
173 | info.last = 0; | |
174 | } | |
# | Line 170 | Line 185 | namespace DUFF_NS { // restrict the access of the fol | |
185 | double dipole; | |
186 | double w0; | |
187 | double v0; | |
188 | + | double v0p; |
189 | + | double rl; |
190 | + | double ru; |
191 | + | double rlp; |
192 | + | double rup; |
193 | int ident; | |
194 | LinkedAtomType* next; | |
195 | }; | |
# | Line 456 | Line 476 | DUFF::DUFF(){ | |
476 | // Init the atomStruct mpi type | |
477 | ||
478 | atomStruct atomProto; // mpiPrototype | |
479 | < | int atomBC[3] = {15,6,4}; // block counts |
479 | > | int atomBC[3] = {15,11,4}; // block counts |
480 | MPI_Aint atomDspls[3]; // displacements | |
481 | MPI_Datatype atomMbrTypes[3]; // member mpi types | |
482 | ||
# | Line 764 | Line 784 | void DUFF::readParams( void ){ | |
784 | ||
785 | int isGB = 0; | |
786 | int isLJ = 1; | |
787 | + | int isEAM =0; |
788 | double GB_dummy = 0.0; | |
789 | < | |
769 | < | |
789 | > | |
790 | currentAtomType = headAtomType->next;; | |
791 | while( currentAtomType != NULL ){ | |
792 | ||
793 | if(currentAtomType->isDipole) entry_plug->useDipole = 1; | |
794 | if(currentAtomType->isSSD) { | |
795 | entry_plug->useSticky = 1; | |
796 | < | set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0)); |
796 | > | set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0), |
797 | > | &(currentAtomType->v0p), |
798 | > | &(currentAtomType->rl), &(currentAtomType->ru), |
799 | > | &(currentAtomType->rlp), &(currentAtomType->rup)); |
800 | } | |
801 | ||
802 | if( currentAtomType->name[0] != '\0' ){ | |
# | Line 783 | Line 806 | void DUFF::readParams( void ){ | |
806 | &(currentAtomType->isSSD), | |
807 | &(currentAtomType->isDipole), | |
808 | &isGB, | |
809 | + | &isEAM, |
810 | &(currentAtomType->epslon), | |
811 | &(currentAtomType->sigma), | |
812 | &(currentAtomType->dipole), | |
# | Line 1285 | Line 1309 | void DUFF::initializeBends( int nBends, Bend** bendArr | |
1309 | } | |
1310 | ||
1311 | gBend = new GhostBend( *the_atoms[a], | |
1312 | < | *the_atoms[b] ); |
1312 | > | *the_atoms[b]); |
1313 | > | |
1314 | gBend->setConstants( currentBendType->k1, | |
1315 | currentBendType->k2, | |
1316 | currentBendType->k3, | |
# | Line 1301 | Line 1326 | void DUFF::initializeBends( int nBends, Bend** bendArr | |
1326 | currentBendType->k3, | |
1327 | currentBendType->t0 ); | |
1328 | bendArray[i] = qBend; | |
1329 | < | } |
1329 | > | } |
1330 | } | |
1331 | } | |
1332 | } | |
# | Line 1494 | Line 1519 | int DUFF_NS::parseAtom( char *lineBuffer, int lineNum, | |
1519 | } | |
1520 | ||
1521 | info.v0 = atof( the_token ); | |
1522 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1523 | + | sprintf( painCave.errMsg, |
1524 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1525 | + | painCave.isFatal = 1; |
1526 | + | simError(); |
1527 | + | } |
1528 | + | |
1529 | + | info.v0p = atof( the_token ); |
1530 | + | |
1531 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1532 | + | sprintf( painCave.errMsg, |
1533 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1534 | + | painCave.isFatal = 1; |
1535 | + | simError(); |
1536 | + | } |
1537 | + | |
1538 | + | info.rl = atof( the_token ); |
1539 | + | |
1540 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1541 | + | sprintf( painCave.errMsg, |
1542 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1543 | + | painCave.isFatal = 1; |
1544 | + | simError(); |
1545 | + | } |
1546 | + | |
1547 | + | info.ru = atof( the_token ); |
1548 | + | |
1549 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1550 | + | sprintf( painCave.errMsg, |
1551 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1552 | + | painCave.isFatal = 1; |
1553 | + | simError(); |
1554 | + | } |
1555 | + | |
1556 | + | info.rlp = atof( the_token ); |
1557 | + | |
1558 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1559 | + | sprintf( painCave.errMsg, |
1560 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1561 | + | painCave.isFatal = 1; |
1562 | + | simError(); |
1563 | + | } |
1564 | + | |
1565 | + | info.rup = atof( the_token ); |
1566 | } | |
1567 | < | else info.v0 = info.w0 = 0.0; |
1567 | > | else info.v0 = info.w0 = info.v0p = info.rl = info.ru = info.rlp = info.rup = 0.0; |
1568 | ||
1569 | return 1; | |
1570 | } | |
# | Line 1541 | Line 1610 | int DUFF_NS::parseBond( char *lineBuffer, int lineNum, | |
1610 | } | |
1611 | ||
1612 | info.d0 = atof( the_token ); | |
1613 | + | |
1614 | + | info.k0=0.0; |
1615 | } | |
1616 | else if( !strcmp( bondType, "harmonic" ) ){ | |
1617 | info.type = HARMONIC_BOND; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |