12 |
|
#include "fortranWrappers.hpp" |
13 |
|
|
14 |
|
#ifdef IS_MPI |
15 |
– |
#include <mpi++.h> |
15 |
|
#include "mpiForceField.h" |
16 |
|
#endif // is_mpi |
17 |
|
|
98 |
|
return NULL; |
99 |
|
} |
100 |
|
|
101 |
+ |
void printMe( void ){ |
102 |
+ |
|
103 |
+ |
std::cerr << "LinkedAtype " << name << ": ident = " << ident << "\n"; |
104 |
+ |
if( next != NULL ) next->printMe(); |
105 |
+ |
|
106 |
+ |
} |
107 |
+ |
|
108 |
|
void add( atomStruct &info ){ |
109 |
|
|
110 |
|
// check for duplicates |
120 |
|
|
121 |
|
if( next != NULL ) next->add(info); |
122 |
|
else{ |
123 |
< |
next = new LinkedType(); |
123 |
> |
next = new LinkedAtomType(); |
124 |
|
strcpy(next->name, info.name); |
125 |
|
next->isDipole = info.isDipole; |
126 |
|
next->isSSD = info.isSSD; |
146 |
|
info.dipole = dipole; |
147 |
|
info.w0 = w0; |
148 |
|
info.v0 = v0; |
149 |
+ |
info.ident = ident; |
150 |
|
info.last = 0; |
151 |
|
} |
152 |
|
|
204 |
|
|
205 |
|
if( next != NULL ) next->add(info); |
206 |
|
else{ |
207 |
< |
next = new LinkedType(); |
207 |
> |
next = new LinkedBondType(); |
208 |
|
strcpy(next->nameA, info.nameA); |
209 |
|
strcpy(next->nameB, info.nameB); |
210 |
|
strcpy(next->type, info.type); |
273 |
|
|
274 |
|
if( next != NULL ) next->add(info); |
275 |
|
else{ |
276 |
< |
next = new LinkedType(); |
276 |
> |
next = new LinkedBendType(); |
277 |
|
strcpy(next->nameA, info.nameA); |
278 |
|
strcpy(next->nameB, info.nameB); |
279 |
|
strcpy(next->nameC, info.nameC); |
357 |
|
|
358 |
|
if( next != NULL ) next->add(info); |
359 |
|
else{ |
360 |
< |
next = new LinkedType(); |
360 |
> |
next = new LinkedTorsionType(); |
361 |
|
strcpy(next->nameA, info.nameA); |
362 |
|
strcpy(next->nameB, info.nameB); |
363 |
|
strcpy(next->nameC, info.nameC); |
741 |
|
recieveFrcStruct( &atomInfo, mpiAtomStructType ); |
742 |
|
} |
743 |
|
} |
744 |
+ |
|
745 |
|
#endif // is_mpi |
746 |
|
|
747 |
+ |
|
748 |
+ |
|
749 |
|
// call new A_types in fortran |
750 |
|
|
751 |
|
int isError; |
852 |
|
"TraPPE_Ex bond structures read successfully." ); |
853 |
|
MPIcheckPoint(); |
854 |
|
|
855 |
< |
currentBondType = headBondType; |
855 |
> |
currentBondType = headBondType->next; |
856 |
|
while( currentBondType != NULL ){ |
857 |
|
currentBondType->duplicate( bondInfo ); |
858 |
|
sendFrcStruct( &bondInfo, mpiBondStructType ); |
867 |
|
|
868 |
|
// listen for node 0 to send out the force params |
869 |
|
|
870 |
< |
MPIcheckPoint(); |
870 |
> |
MPIcheckPoint(); |
871 |
|
|
872 |
|
headBondType = new LinkedBondType; |
873 |
|
recieveFrcStruct( &bondInfo, mpiBondStructType ); |
930 |
|
"TraPPE_Ex bend structures read successfully." ); |
931 |
|
MPIcheckPoint(); |
932 |
|
|
933 |
< |
currentBendType = headBendType; |
933 |
> |
currentBendType = headBendType->next; |
934 |
|
while( currentBendType != NULL ){ |
935 |
|
currentBendType->duplicate( bendInfo ); |
936 |
|
sendFrcStruct( &bendInfo, mpiBendStructType ); |
1010 |
|
"TraPPE_Ex torsion structures read successfully." ); |
1011 |
|
MPIcheckPoint(); |
1012 |
|
|
1013 |
< |
currentTorsionType = headTorsionType; |
1013 |
> |
currentTorsionType = headTorsionType->next; |
1014 |
|
while( currentTorsionType != NULL ){ |
1015 |
|
currentTorsionType->duplicate( torsionInfo ); |
1016 |
|
sendFrcStruct( &torsionInfo, mpiTorsionStructType ); |
1037 |
|
} |
1038 |
|
#endif // is_mpi |
1039 |
|
|
1040 |
+ |
entry_plug->useLJ = 1; |
1041 |
|
} |
1042 |
|
|
1043 |
|
|
1082 |
|
|
1083 |
|
DirectionalAtom* dAtom; |
1084 |
|
|
1085 |
< |
for( i=0; i<nAtoms; i++ ){ |
1085 |
> |
for(int i=0; i<nAtoms; i++ ){ |
1086 |
|
|
1087 |
|
currentAtomType = headAtomType->find( the_atoms[i]->getType() ); |
1088 |
|
if( currentAtomType == NULL ){ |
1149 |
|
} |
1150 |
|
} |
1151 |
|
} |
1141 |
– |
|
1142 |
– |
|
1143 |
– |
#ifdef IS_MPI |
1144 |
– |
sprintf( checkPointMsg, "TraPPE_Ex atoms initialized succesfully" ); |
1145 |
– |
MPIcheckPoint(); |
1146 |
– |
#endif // is_mpi |
1147 |
– |
|
1152 |
|
} |
1153 |
|
|
1154 |
|
void TraPPE_ExFF::initializeBonds( int nBonds, Bond** bondArray, |
1187 |
|
entry_plug->n_constraints++; |
1188 |
|
} |
1189 |
|
} |
1186 |
– |
|
1187 |
– |
#ifdef IS_MPI |
1188 |
– |
sprintf( checkPointMsg, "TraPPE_Ex bonds initialized succesfully" ); |
1189 |
– |
MPIcheckPoint(); |
1190 |
– |
#endif // is_mpi |
1191 |
– |
|
1190 |
|
} |
1191 |
|
|
1192 |
|
void TraPPE_ExFF::initializeBends( int nBends, Bend** bendArray, |
1268 |
|
} |
1269 |
|
} |
1270 |
|
} |
1273 |
– |
|
1274 |
– |
#ifdef IS_MPI |
1275 |
– |
sprintf( checkPointMsg, "TraPPE_Ex bends initialized succesfully" ); |
1276 |
– |
MPIcheckPoint(); |
1277 |
– |
#endif // is_mpi |
1278 |
– |
|
1271 |
|
} |
1272 |
|
|
1273 |
|
void TraPPE_ExFF::initializeTorsions( int nTorsions, Torsion** torsionArray, |
1315 |
|
torsionArray[i] = cTors; |
1316 |
|
} |
1317 |
|
} |
1326 |
– |
|
1327 |
– |
#ifdef IS_MPI |
1328 |
– |
sprintf( checkPointMsg, "TraPPE_Ex torsions initialized succesfully" ); |
1329 |
– |
MPIcheckPoint(); |
1330 |
– |
#endif // is_mpi |
1331 |
– |
|
1318 |
|
} |
1319 |
|
|
1320 |
|
void TraPPE_ExFF::fastForward( char* stopText, char* searchOwner ){ |