12 #define domainEdge 20.0 14 #define van_der_Waals_thresh (1.049*1.049) 21 return dx*dx + dy*dy + dz*dz;
35 int main(
int argc,
char **argv)
54 for( j=0; j<
i; j++ ) {
71 for( i=0; i<
nAtoms; i++ ) {
72 for( j=0; j<
nAtoms; j++ ) {
73 neighbor_list[j].
index = j;
75 neighbor_list[j].
dist_sq = infinity;
82 data.
NL[i*maxNeighbors +j] = neighbor_list[j].
index;
89 fd = open(
"input.data", O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
90 assert( fd>0 &&
"Couldn't open input data file" );
static uint64_t prng_rand(struct prng_rand_t *state)
void qsort(void *base, size_t nel, size_t width, int(*cmp)(const void *, const void *))
void data_to_input(int fd, void *vdata)
int32_t NL[nAtoms *maxNeighbors]
#define van_der_Waals_thresh
static TYPE dist_sq(TYPE x1, TYPE y1, TYPE z1, TYPE x2, TYPE y2, TYPE z2)
int neighbor_compar(const void *v_lhs, const void *v_rhs)
int main(int argc, char **argv)
static void prng_srand(uint64_t seed, struct prng_rand_t *state)
x
Return the smallest n such that 2^n >= _x.