# | Line 22 | Line 22 | using namespace std; | |
---|---|---|
22 | #define HARMONIC_BOND 1 | |
23 | ||
24 | ||
25 | < | namespace TPE { // restrict the access of the folowing to this file only. |
25 | > | namespace DUFF_NS { // restrict the access of the folowing to this file only. |
26 | ||
27 | ||
28 | // Declare the structures that will be passed by MPI | |
# | Line 35 | Line 35 | namespace TPE { // restrict the access of the folowin | |
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 TPE { // restrict the access of the folowin | |
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 TPE { // restrict the access of the folowin | |
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 TPE { // restrict the access of the folowin | |
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 420 | Line 440 | namespace TPE { // restrict the access of the folowin | |
440 | ||
441 | } // namespace | |
442 | ||
443 | < | using namespace TPE; |
443 | > | using namespace DUFF_NS; |
444 | ||
445 | ||
446 | //**************************************************************** | |
# | 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 | ||
790 | ||
# | Line 773 | Line 794 | void DUFF::readParams( void ){ | |
794 | if(currentAtomType->isDipole) entry_plug->useDipole = 1; | |
795 | if(currentAtomType->isSSD) { | |
796 | entry_plug->useSticky = 1; | |
797 | < | set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0)); |
797 | > | set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0), |
798 | > | &(currentAtomType->v0p), |
799 | > | &(currentAtomType->rl), &(currentAtomType->ru), |
800 | > | &(currentAtomType->rlp), &(currentAtomType->rup)); |
801 | } | |
802 | ||
803 | if( currentAtomType->name[0] != '\0' ){ | |
# | Line 783 | Line 807 | void DUFF::readParams( void ){ | |
807 | &(currentAtomType->isSSD), | |
808 | &(currentAtomType->isDipole), | |
809 | &isGB, | |
810 | + | &isEAM, |
811 | &(currentAtomType->epslon), | |
812 | &(currentAtomType->sigma), | |
813 | &(currentAtomType->dipole), | |
# | Line 1285 | Line 1310 | void DUFF::initializeBends( int nBends, Bend** bendArr | |
1310 | } | |
1311 | ||
1312 | gBend = new GhostBend( *the_atoms[a], | |
1313 | < | *the_atoms[b] ); |
1313 | > | *the_atoms[b]); |
1314 | > | |
1315 | gBend->setConstants( currentBendType->k1, | |
1316 | currentBendType->k2, | |
1317 | currentBendType->k3, | |
# | Line 1301 | Line 1327 | void DUFF::initializeBends( int nBends, Bend** bendArr | |
1327 | currentBendType->k3, | |
1328 | currentBendType->t0 ); | |
1329 | bendArray[i] = qBend; | |
1330 | < | } |
1330 | > | } |
1331 | } | |
1332 | } | |
1333 | } | |
# | Line 1408 | Line 1434 | void DUFF::fastForward( char* stopText, char* searchOw | |
1434 | } | |
1435 | ||
1436 | ||
1437 | < | int TPE::parseAtom( char *lineBuffer, int lineNum, atomStruct &info ){ |
1437 | > | int DUFF_NS::parseAtom( char *lineBuffer, int lineNum, atomStruct &info ){ |
1438 | ||
1439 | char* the_token; | |
1440 | ||
# | Line 1494 | Line 1520 | int TPE::parseAtom( char *lineBuffer, int lineNum, ato | |
1520 | } | |
1521 | ||
1522 | info.v0 = atof( the_token ); | |
1523 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1524 | + | sprintf( painCave.errMsg, |
1525 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1526 | + | painCave.isFatal = 1; |
1527 | + | simError(); |
1528 | + | } |
1529 | + | |
1530 | + | info.v0p = atof( the_token ); |
1531 | + | |
1532 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1533 | + | sprintf( painCave.errMsg, |
1534 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1535 | + | painCave.isFatal = 1; |
1536 | + | simError(); |
1537 | + | } |
1538 | + | |
1539 | + | info.rl = atof( the_token ); |
1540 | + | |
1541 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1542 | + | sprintf( painCave.errMsg, |
1543 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1544 | + | painCave.isFatal = 1; |
1545 | + | simError(); |
1546 | + | } |
1547 | + | |
1548 | + | info.ru = atof( the_token ); |
1549 | + | |
1550 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1551 | + | sprintf( painCave.errMsg, |
1552 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1553 | + | painCave.isFatal = 1; |
1554 | + | simError(); |
1555 | + | } |
1556 | + | |
1557 | + | info.rlp = atof( the_token ); |
1558 | + | |
1559 | + | if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
1560 | + | sprintf( painCave.errMsg, |
1561 | + | "Error parseing AtomTypes: line %d\n", lineNum ); |
1562 | + | painCave.isFatal = 1; |
1563 | + | simError(); |
1564 | + | } |
1565 | + | |
1566 | + | info.rup = atof( the_token ); |
1567 | } | |
1568 | < | else info.v0 = info.w0 = 0.0; |
1568 | > | else info.v0 = info.w0 = info.v0p = info.rl = info.ru = info.rlp = info.rup = 0.0; |
1569 | ||
1570 | return 1; | |
1571 | } | |
1572 | else return 0; | |
1573 | } | |
1574 | ||
1575 | < | int TPE::parseBond( char *lineBuffer, int lineNum, bondStruct &info ){ |
1575 | > | int DUFF_NS::parseBond( char *lineBuffer, int lineNum, bondStruct &info ){ |
1576 | ||
1577 | char* the_token; | |
1578 | char bondType[30]; | |
# | Line 1541 | Line 1611 | int TPE::parseBond( char *lineBuffer, int lineNum, bon | |
1611 | } | |
1612 | ||
1613 | info.d0 = atof( the_token ); | |
1614 | + | |
1615 | + | info.k0=0.0; |
1616 | } | |
1617 | else if( !strcmp( bondType, "harmonic" ) ){ | |
1618 | info.type = HARMONIC_BOND; | |
# | Line 1579 | Line 1651 | int TPE::parseBond( char *lineBuffer, int lineNum, bon | |
1651 | } | |
1652 | ||
1653 | ||
1654 | < | int TPE::parseBend( char *lineBuffer, int lineNum, bendStruct &info ){ |
1654 | > | int DUFF_NS::parseBend( char *lineBuffer, int lineNum, bendStruct &info ){ |
1655 | ||
1656 | char* the_token; | |
1657 | ||
# | Line 1667 | Line 1739 | int TPE::parseBend( char *lineBuffer, int lineNum, ben | |
1739 | else return 0; | |
1740 | } | |
1741 | ||
1742 | < | int TPE::parseTorsion( char *lineBuffer, int lineNum, torsionStruct &info ){ |
1742 | > | int DUFF_NS::parseTorsion( char *lineBuffer, int lineNum, torsionStruct &info ){ |
1743 | ||
1744 | char* the_token; | |
1745 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |