- if (seed == 0)
- {
- rng = gmx_rng_init(gmx_rng_make_seed());
- }
- else
- {
- rng = gmx_rng_init(seed);
- }
- /* Now loop over the ions that have to be placed */
- while (p_num-- > 0)
- {
- insert_ion(nsa, &nw, bSet, repl, index, x, &pbc,
- 1, p_q, p_name, &atoms, rmin, rng);
- }
- while (n_num-- > 0)
- {
- insert_ion(nsa, &nw, bSet, repl, index, x, &pbc,
- -1, n_q, n_name, &atoms, rmin, rng);
- }
- gmx_rng_destroy(rng);
- fprintf(stderr, "\n");
+ if (seed == 0)
+ {
+ rng = gmx_rng_init(gmx_rng_make_seed());
+ }
+ else
+ {
+ rng = gmx_rng_init(seed);
+ }
+ /* Now loop over the ions that have to be placed */
+ while (p_num-- > 0)
+ {
+ insert_ion(nsa, &nw, bSet, repl, index, x, &pbc,
+ 1, p_q, p_name, &atoms, rmin, rng);
+ }
+ while (n_num-- > 0)
+ {
+ insert_ion(nsa, &nw, bSet, repl, index, x, &pbc,
+ -1, n_q, n_name, &atoms, rmin, rng);
+ }
+ gmx_rng_destroy(rng);
+ fprintf(stderr, "\n");