#!/bin/csh

set sim = "$1"
echo "Randomizing ions in directory $sim";
set echo

cd $sim
ptraj $sim.topo << EOF
trajin $sim.coords
trajout $sim.coords.rand restart

prnlev 3

randomizeions :Na+,Cl? around :1-466 by 6.0 overlap 4.0 noimage

EOF

mv $sim.coords.rand.1 $sim.coords.rand

