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; |
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 |
146 |
|
info.dipole = dipole; |
147 |
|
info.w0 = w0; |
148 |
|
info.v0 = v0; |
149 |
+ |
info.ident = ident; |
150 |
|
info.last = 0; |
151 |
|
} |
152 |
|
|
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; |
754 |
|
|
755 |
|
int isGB = 0; |
756 |
|
int isLJ = 1; |
757 |
+ |
int isEAM = 0; |
758 |
+ |
int isCharge = 0; |
759 |
|
double GB_dummy = 0.0; |
760 |
+ |
double charge = 0.0; |
761 |
|
|
762 |
|
|
763 |
< |
currentAtomType = headAtomType; |
763 |
> |
currentAtomType = headAtomType->next;; |
764 |
|
while( currentAtomType != NULL ){ |
765 |
|
|
766 |
|
if(currentAtomType->isDipole) entry_plug->useDipole = 1; |
767 |
< |
if(currentAtomType->isSSD) entry_plug->useSticky = 1; |
767 |
> |
if(currentAtomType->isSSD) { |
768 |
> |
entry_plug->useSticky = 1; |
769 |
> |
set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0)); |
770 |
> |
} |
771 |
|
|
772 |
|
if( currentAtomType->name[0] != '\0' ){ |
773 |
|
isError = 0; |
776 |
|
&(currentAtomType->isSSD), |
777 |
|
&(currentAtomType->isDipole), |
778 |
|
&isGB, |
779 |
+ |
&isEAM, |
780 |
+ |
&isCharge, |
781 |
|
&(currentAtomType->epslon), |
782 |
|
&(currentAtomType->sigma), |
783 |
+ |
&charge, |
784 |
|
&(currentAtomType->dipole), |
766 |
– |
&(currentAtomType->w0), |
767 |
– |
&(currentAtomType->v0), |
768 |
– |
&GB_dummy, |
769 |
– |
&GB_dummy, |
770 |
– |
&GB_dummy, |
771 |
– |
&GB_dummy, |
772 |
– |
&GB_dummy, |
773 |
– |
&GB_dummy, |
785 |
|
&isError ); |
786 |
|
if( isError ){ |
787 |
|
sprintf( painCave.errMsg, |
878 |
|
recieveFrcStruct( &bondInfo, mpiBondStructType ); |
879 |
|
} |
880 |
|
} |
881 |
+ |
|
882 |
+ |
sprintf( checkPointMsg, |
883 |
+ |
"TraPPE_ExFF bond structures broadcast successfully." ); |
884 |
+ |
MPIcheckPoint(); |
885 |
+ |
|
886 |
|
#endif // is_mpi |
887 |
|
|
888 |
|
|
961 |
|
recieveFrcStruct( &bendInfo, mpiBendStructType ); |
962 |
|
} |
963 |
|
} |
964 |
+ |
|
965 |
+ |
sprintf( checkPointMsg, |
966 |
+ |
"TraPPE_ExFF bend structures broadcast successfully." ); |
967 |
+ |
MPIcheckPoint(); |
968 |
+ |
|
969 |
|
#endif // is_mpi |
970 |
|
|
971 |
|
|
1046 |
|
recieveFrcStruct( &torsionInfo, mpiTorsionStructType ); |
1047 |
|
} |
1048 |
|
} |
1049 |
+ |
|
1050 |
+ |
sprintf( checkPointMsg, |
1051 |
+ |
"TraPPE_ExFF torsion structures broadcast successfully." ); |
1052 |
+ |
MPIcheckPoint(); |
1053 |
+ |
|
1054 |
|
#endif // is_mpi |
1055 |
|
|
1056 |
|
entry_plug->useLJ = 1; |
1251 |
|
else if( the_bends[i].ghost == a ){ |
1252 |
|
c = a; |
1253 |
|
a = b; |
1254 |
< |
b = a; |
1254 |
> |
b = c; |
1255 |
|
} |
1256 |
|
else{ |
1257 |
|
sprintf( painCave.errMsg, |