28 |
|
} atomStruct; |
29 |
|
MPI_Datatype mpiAtomStructType; |
30 |
|
|
31 |
+ |
typedef struct{ |
32 |
+ |
char nameA[15]; |
33 |
+ |
char nameB[15]; |
34 |
+ |
char type[30]; |
35 |
+ |
double d0; |
36 |
+ |
int last; // 0 -> default |
37 |
+ |
// 1 -> tells nodes to stop listening |
38 |
+ |
// -1 -> an error has occured. (handled in mpiForceField) |
39 |
+ |
} bondStruct; |
40 |
+ |
MPI_Datatype mpiBondStructType; |
41 |
+ |
|
42 |
+ |
typedef struct{ |
43 |
+ |
char nameA[15]; |
44 |
+ |
char nameB[15]; |
45 |
+ |
char nameC[15]; |
46 |
+ |
char type[30]; |
47 |
+ |
double k1, k2, k3, t0; |
48 |
+ |
int last; // 0 -> default |
49 |
+ |
// 1 -> tells nodes to stop listening |
50 |
+ |
// -1 -> an error has occured. (handled in mpiForceField) |
51 |
+ |
} bendStruct; |
52 |
+ |
MPI_Datatype mpiBendStructType; |
53 |
+ |
|
54 |
+ |
typedef struct{ |
55 |
+ |
char nameA[15]; |
56 |
+ |
char nameB[15]; |
57 |
+ |
char nameC[15]; |
58 |
+ |
char nameD[15]; |
59 |
+ |
char type[30]; |
60 |
+ |
double k1, k2, k3, k4; |
61 |
+ |
int last; // 0 -> default |
62 |
+ |
// 1 -> tells nodes to stop listening |
63 |
+ |
// -1 -> an error has occured. (handled in mpiForceField) |
64 |
+ |
} TorsionStruct; |
65 |
+ |
MPI_Datatype mpiTorsionStructType; |
66 |
+ |
|
67 |
|
#endif |
68 |
|
|
69 |
|
|
458 |
|
if( !strcmp(nameA, key2 ) && !strcmp( nameB, key1 ) ) return this; |
459 |
|
if( next != NULL ) return next->find(key1, key2); |
460 |
|
return NULL; |
461 |
+ |
} |
462 |
+ |
|
463 |
+ |
#ifdef IS_MPI |
464 |
+ |
void add( bondStruct &info ){ |
465 |
+ |
if( next != NULL ) next->add(info); |
466 |
+ |
else{ |
467 |
+ |
next = new LinkedType(); |
468 |
+ |
strcpy(next->nameA, info.nameA); |
469 |
+ |
strcpy(next->nameB, info.nameB); |
470 |
+ |
strcpy(next->type, info.type); |
471 |
+ |
next->d0 = info.d0; |
472 |
+ |
} |
473 |
|
} |
474 |
|
|
475 |
+ |
void duplicate( bondStruct &info ){ |
476 |
+ |
strcpy(info.nameA, nameA); |
477 |
+ |
strcpy(info.nameB, nameB); |
478 |
+ |
strcpy(info.type, type); |
479 |
+ |
info.d0 = d0; |
480 |
+ |
info.last = 0; |
481 |
+ |
} |
482 |
+ |
|
483 |
+ |
|
484 |
+ |
#endif |
485 |
+ |
|
486 |
|
char nameA[15]; |
487 |
|
char nameB[15]; |
488 |
|
char type[30]; |
671 |
|
&& !strcmp( nameC, key1 ) ) return this; |
672 |
|
if( next != NULL ) return next->find(key1, key2, key3); |
673 |
|
return NULL; |
674 |
+ |
} |
675 |
+ |
|
676 |
+ |
#ifdef IS_MPI |
677 |
+ |
|
678 |
+ |
void add( bendStruct &info ){ |
679 |
+ |
if( next != NULL ) next->add(info); |
680 |
+ |
else{ |
681 |
+ |
next = new LinkedType(); |
682 |
+ |
strcpy(next->nameA, info.nameA); |
683 |
+ |
strcpy(next->nameB, info.nameB); |
684 |
+ |
strcpy(next->nameC, info.nameC); |
685 |
+ |
strcpy(next->type, info.type); |
686 |
+ |
next->k1 = info.k1; |
687 |
+ |
next->k2 = info.k2; |
688 |
+ |
next->k3 = info.k3; |
689 |
+ |
next->t0 = info.t0; |
690 |
+ |
} |
691 |
|
} |
692 |
|
|
693 |
+ |
void duplicate( bendStruct &info ){ |
694 |
+ |
strcpy(info.nameA, nameA); |
695 |
+ |
strcpy(info.nameB, nameB); |
696 |
+ |
strcpy(info.nameC, nameC); |
697 |
+ |
strcpy(info.type, type); |
698 |
+ |
info.k1 = k1; |
699 |
+ |
info.k2 = k2; |
700 |
+ |
info.k3 = k3; |
701 |
+ |
info.t0 = t0; |
702 |
+ |
info.last = 0; |
703 |
+ |
} |
704 |
+ |
|
705 |
+ |
#endif |
706 |
+ |
|
707 |
|
char nameA[15]; |
708 |
|
char nameB[15]; |
709 |
|
char nameC[15]; |
930 |
|
|
931 |
|
if( next != NULL ) return next->find(key1, key2, key3, key4); |
932 |
|
return NULL; |
933 |
+ |
} |
934 |
+ |
|
935 |
+ |
#ifdef IS_MPI |
936 |
+ |
|
937 |
+ |
void add( torsionStruct &info ){ |
938 |
+ |
if( next != NULL ) next->add(info); |
939 |
+ |
else{ |
940 |
+ |
next = new LinkedType(); |
941 |
+ |
strcpy(next->nameA, info.nameA); |
942 |
+ |
strcpy(next->nameB, info.nameB); |
943 |
+ |
strcpy(next->nameC, info.nameC); |
944 |
+ |
strcpy(next->type, info.type); |
945 |
+ |
next->k1 = info.k1; |
946 |
+ |
next->k2 = info.k2; |
947 |
+ |
next->k3 = info.k3; |
948 |
+ |
next->k4 = info.k4; |
949 |
+ |
} |
950 |
|
} |
951 |
|
|
952 |
+ |
void duplicate( torsionStruct &info ){ |
953 |
+ |
strcpy(info.nameA, nameA); |
954 |
+ |
strcpy(info.nameB, nameB); |
955 |
+ |
strcpy(info.nameC, nameC); |
956 |
+ |
strcpy(info.nameD, nameD); |
957 |
+ |
strcpy(info.type, type); |
958 |
+ |
info.k1 = k1; |
959 |
+ |
info.k2 = k2; |
960 |
+ |
info.k3 = k3; |
961 |
+ |
info.k4 = k4; |
962 |
+ |
info.last = 0; |
963 |
+ |
} |
964 |
+ |
|
965 |
+ |
#endif |
966 |
+ |
|
967 |
|
char nameA[15]; |
968 |
|
char nameB[15]; |
969 |
|
char nameC[15]; |